Skip to content

Conversation

enoldev
Copy link
Collaborator

@enoldev enoldev commented Sep 9, 2024

No description provided.

@enoldev enoldev requested a review from a team as a code owner September 9, 2024 13:17
Comment on lines +8 to +9
- Substreams allows you to speed up the indexing times of your subgraph.
- Substreams allows you to index non-EVM data (Solana, Injective, Starknet, Vara...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be "Substreams allow you"?

- Substreams allows you to index non-EVM data (Solana, Injective, Starknet, Vara...)

With Substreams, developers can quickly extract data from different blockchains (Ethereum, BNB, Solana, ect.) and send it to various locations of their choice, such as a Postgres database, a Mongo database, or a Subgraph. Additionally, Substreams packages enable developers to specify which data they want to extract from the blockchain.
This is possible because your subgraph can use a Substreams package as a data source, thus creating a Substreams-powered Subgraph (SpS).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This is possible because your subgraph can use a Substreams package as a data source, thus creating a Substreams-powered Subgraph (SpS).
This is possible because your subgraph can use a Substreams package as a data source, thus creating a Substreams-powered subgraph.

According to "The Graph Style Guide", we shouldn't capitalize "subgraph", even in the phrase "Substreams-powered subgraphs".

(@bermchain, should we make that document public, and maybe link to it from the docs' CONTRIBUTING guidelines?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh and I propose removing the acronym because it's not used anywhere else on this page, but maybe it's used somewhere else and I'm not aware?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed @benface with lowercase subgraph and not using the acronym unless it's recurring.

I like the idea of publicizing the style guide in the Docs! Let's do it -- I'll select sections that make sense to share.

Also, re: "Substreams is" vs. "Substreams are" -- I believe it's the former because Substreams is a collective noun for the technology (i.e., powered by Substreams tech, not powered by a Substream).


With Substreams, developers can quickly extract data from different blockchains (Ethereum, BNB, Solana, ect.) and send it to various locations of their choice, such as a Postgres database, a Mongo database, or a Subgraph. Additionally, Substreams packages enable developers to specify which data they want to extract from the blockchain.
This is possible because your subgraph can use a Substreams package as a data source, thus creating a Substreams-powered Subgraph (SpS).
A Substreams package a binary file that contains all the definitions of the data that you want to extract from the blockchain (similar to the `mapping.ts` file of your subgraph).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A Substreams package a binary file that contains all the definitions of the data that you want to extract from the blockchain (similar to the `mapping.ts` file of your subgraph).
A Substreams package is a binary file that contains all the definitions of the data that you want to extract from the blockchain (similar to the `mapping.ts` file of your subgraph).

Comment on lines +14 to +15
The following example shows a subgraph manifest (`subgraph.yaml`) that uses a Substreams package as data source, thus receiving the data extracted by the Substreams.
Then, you can use this data in your `mapping.ts` and perform all the transformations needed as a usual subgraph.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following example shows a subgraph manifest (`subgraph.yaml`) that uses a Substreams package as data source, thus receiving the data extracted by the Substreams.
Then, you can use this data in your `mapping.ts` and perform all the transformations needed as a usual subgraph.
The following example shows a subgraph manifest (`subgraph.yaml`) that uses a Substreams package as data source, thus receiving the data extracted by the Substreams.
Then, you can use this data in your `mapping.ts` and perform all the transformations needed as a usual subgraph.

I'm thinking this is why the Prettier check is failing, but it could be more than one thing. If you're using VS Code, I recommend installing the Prettier extension with "auto-format on save" enabled.

Then, you can use this data in your `mapping.ts` and perform all the transformations needed as a usual subgraph.

1. **You write a Rust program, which defines the transformations that you want to apply to the blockchain data.** For example, the following Rust function extracts relevant information from an Ethereum block (number, hash, and parent hash).
// example
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I just realized this was a WIP; sorry I didn't pay attention to the title. 😅 I'll stop reviewing now unless you want me to continue.

@enoldev
Copy link
Collaborator Author

enoldev commented Sep 13, 2024

Closing because some of the documentation will live in the SF website.

@enoldev enoldev closed this Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants