-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
6,469 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,42 @@ | ||
--- | ||
description: StreamingFast Substreams documentation | ||
--- | ||
Substreams is a powerful indexing technology, which allows you to: | ||
- Extract data from several blockchains (Ethereum, Polygon, BNB, Solana...). | ||
- Apply custom transformations to the data. | ||
- Send the data to a place of your choice (for example, a Postgres database or a file). | ||
|
||
# Substreams | ||
<figure><img src=".gitbook/assets/intro/supported-chains.png" width="100%" /></figure> | ||
|
||
## Welcome to Substreams documentation | ||
**You can use Substreams packages to define which specific data you want to extract from the blockchain**. For example, consider that you want to retrieve data from the Uniswap v3 smart contract. You can simply use the [Uniswap v3 Substreams Package](https://substreams.dev/streamingfast/uniswap-v3/v0.2.7) and send that data wherever you want! | ||
|
||
Substreams is a powerful blockchain indexing technology, developed for [The Graph Network](https://thegraph.com). | ||
## Consume Substreams | ||
|
||
> Substreams enables developers to write Rust modules, composing data streams alongside the community, and provides extremely high-performance indexing by virtue of parallelization, in a streaming-first fashion. | ||
> | ||
> Substreams have all the benefits of StreamingFast Firehose, like low-cost caching and archiving of blockchain data, high throughput processing, and cursor-based reorgs handling. | ||
There are many ready-to-use Substreams packages, so you can simply consume them. Use the **([Substreams.dev Registry](https://substreams.dev)) to explore packages**. | ||
|
||
### Where to start | ||
Once you find a package that fits your needs, you only have choose **how you want to consume the data**. Send the data to a SQL database, configure a webhook or stream directly from your application! | ||
|
||
Learn about Substreams in a short, dense 25-minute intro and understand its impact on the blockchain ecosystem. | ||
<figure><img src=".gitbook/assets/intro/consume-flow.png" width="100%" /></figure> | ||
|
||
{% embed url="https://www.youtube.com/watch?v=K-nhC2FCB5k" %} | ||
A walkthrough of Firehose features, Substreams modules, including a sample Rust module and StreamingFast's vision. | ||
{% endembed %} | ||
## Develop Substreams | ||
|
||
Learn about the benefits of Substreams, and how it compares to otheressential facts about Substreams through [reading the Benefits and comparison](concepts-and-fundamentals/benefits.md). | ||
If you can't find a Substreams package that retrieves exactly the data you need, **you can develop your own Substreams**. | ||
|
||
The primary ways to use Substreams include: | ||
You can write your own Rust function to extract data from the blockchain: | ||
|
||
* [Installing the `substreams` CLI](getting-started/installing-the-cli.md) | ||
* [Going through the Quickstart](getting-started/quickstart.md) | ||
```rust | ||
fn get_usdt_transaction(block: eth::Block) -> Result<Vec<Transaction>, substreams:error:Error> { | ||
let my_transactions = block.transactions(). | ||
.filter(|transaction| transaction.to == USDT_CONTRACT_ADDRESS) | ||
.map(|transaction| MyTransaction(transaction.hash, transaction.from, transaction.to)) | ||
.collect(); | ||
Ok(my_transactions) | ||
} | ||
``` | ||
|
||
After installing Substreams and reviewing the Quickstart: | ||
<figure><img src=".gitbook/assets/intro/develop-flow.png" width="100%" /></figure> | ||
|
||
* You can [learn more about ](developers-guide/modules/)modules, and then [study the Developer's guide](developers-guide/overview.md). | ||
## How Does It Work? | ||
|
||
Find pre-built Substreams by using the following resources: | ||
The following video covers how Substreams works in less than 2 minutes: | ||
|
||
* The [Substreams Template](https://github.com/streamingfast/substreams-template) helps expedite the process of getting you up and running. | ||
* A [list of maintained Substreams examples](reference-and-specs/examples.md) | ||
|
||
### Network model diagram | ||
|
||
<img src=".gitbook/assets/substreams.excalidraw.svg" alt="" class="gitbook-drawing"> | ||
|
||
**You can view Substreams from two perspectives** as illustrated in the high-level visual diagram. It can be viewed through the perspective of the **Substreams engine** itself and also the perspective of the **end-user developer and consumer**. | ||
|
||
### Community | ||
|
||
Substreams is an open source community effort, so feel free to suggest new topics, report issues, and provide feedback. Contribute through GitHub [pull requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests). | ||
|
||
* [StreamingFast Discord](https://discord.gg/mYPcRAzeVN) | ||
* [The Graph Discord](https://discord.gg/vtvv7FP) | ||
* [StreamingFast on Twitter](https://twitter.com/streamingfastio) | ||
* [StreamingFast on YouTube](https://www.youtube.com/c/streamingfast) | ||
|
||
### Contributing | ||
|
||
For additional information, [refer to the general StreamingFast contribution guide](https://github.com/streamingfast/streamingfast/blob/master/CONTRIBUTING.md). | ||
|
||
### License | ||
|
||
Substreams uses the [Apache 2.0](../LICENSE/) license. | ||
|
||
### Disclaimer | ||
|
||
The content in the Substreams documentation was created through StreamingFast's full effort. It is up to the reader to validate the accuracy of all content presented. Substreams is in active development and, at times, the associated documentation becomes outdated. [Contact StreamingFast](https://discord.gg/mYPcRAzeVN) to report problems or service interruptions. | ||
|
||
{% hint style="info" %} | ||
**Note**: The Substreams documentation uses the [Google developer documentation style guide](https://developers.google.com/style) for its style and formatting. | ||
{% endhint %} | ||
{% embed url="https://www.youtube.com/watch?v=gVqGCqKVM08" %} | ||
Get an overview of Substreams | ||
{% endembed %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
description: StreamingFast Substreams documentation | ||
--- | ||
|
||
# Substreams | ||
|
||
## Welcome to Substreams documentation | ||
|
||
Substreams is a powerful blockchain indexing technology, developed for [The Graph Network](https://thegraph.com). | ||
|
||
> Substreams enables developers to write Rust modules, composing data streams alongside the community, and provides extremely high-performance indexing by virtue of parallelization, in a streaming-first fashion. | ||
> | ||
> Substreams have all the benefits of StreamingFast Firehose, like low-cost caching and archiving of blockchain data, high throughput processing, and cursor-based reorgs handling. | ||
### Where to start | ||
|
||
Learn about Substreams in a short, dense 25-minute intro and understand its impact on the blockchain ecosystem. | ||
|
||
{% embed url="https://www.youtube.com/watch?v=K-nhC2FCB5k" %} | ||
A walkthrough of Firehose features, Substreams modules, including a sample Rust module and StreamingFast's vision. | ||
{% endembed %} | ||
|
||
Learn about the benefits of Substreams, and how it compares to otheressential facts about Substreams through [reading the Benefits and comparison](concepts-and-fundamentals/benefits.md). | ||
|
||
The primary ways to use Substreams include: | ||
|
||
* [Installing the `substreams` CLI](getting-started/installing-the-cli.md) | ||
* [Going through the Quickstart](getting-started/quickstart.md) | ||
|
||
After installing Substreams and reviewing the Quickstart: | ||
|
||
* You can [learn more about ](developers-guide/modules/)modules, and then [study the Developer's guide](developers-guide/overview.md). | ||
|
||
Find pre-built Substreams by using the following resources: | ||
|
||
* The [Substreams Template](https://github.com/streamingfast/substreams-template) helps expedite the process of getting you up and running. | ||
* A [list of maintained Substreams examples](reference-and-specs/examples.md) | ||
|
||
### Network model diagram | ||
|
||
<img src=".gitbook/assets/substreams.excalidraw.svg" alt="" class="gitbook-drawing"> | ||
|
||
**You can view Substreams from two perspectives** as illustrated in the high-level visual diagram. It can be viewed through the perspective of the **Substreams engine** itself and also the perspective of the **end-user developer and consumer**. | ||
|
||
### Community | ||
|
||
Substreams is an open source community effort, so feel free to suggest new topics, report issues, and provide feedback. Contribute through GitHub [pull requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests). | ||
|
||
* [StreamingFast Discord](https://discord.gg/mYPcRAzeVN) | ||
* [The Graph Discord](https://discord.gg/vtvv7FP) | ||
* [StreamingFast on Twitter](https://twitter.com/streamingfastio) | ||
* [StreamingFast on YouTube](https://www.youtube.com/c/streamingfast) | ||
|
||
### Contributing | ||
|
||
For additional information, [refer to the general StreamingFast contribution guide](https://github.com/streamingfast/streamingfast/blob/master/CONTRIBUTING.md). | ||
|
||
### License | ||
|
||
Substreams uses the [Apache 2.0](../LICENSE/) license. | ||
|
||
### Disclaimer | ||
|
||
The content in the Substreams documentation was created through StreamingFast's full effort. It is up to the reader to validate the accuracy of all content presented. Substreams is in active development and, at times, the associated documentation becomes outdated. [Contact StreamingFast](https://discord.gg/mYPcRAzeVN) to report problems or service interruptions. | ||
|
||
{% hint style="info" %} | ||
**Note**: The Substreams documentation uses the [Google developer documentation style guide](https://developers.google.com/style) for its style and formatting. | ||
{% endhint %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.