Skip to content

Commit

Permalink
Revert "New Docs" (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
enoldev authored Jan 18, 2024
1 parent 112a8a9 commit 9197246
Show file tree
Hide file tree
Showing 70 changed files with 125 additions and 6,064 deletions.
37 changes: 0 additions & 37 deletions .gitbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,3 @@ root: ./docs/

structure:
summary: SUMMARY.md

redirects:
concepts-and-fundamentals/modules: ./new/common/manifest-modules.md
developers-guide/creating-protobuf-schema: ./new/develop/creating-protobuf-schemas.md
developers-guide/creating-your-manifest: ./new/common/manifest-modules.md
developers-guide/gui: ./new/common/manifest-modules.md
developers-guide/installation-requirements: ./new/common/installing-the-cli.md
developers-guide/overview: ./new/common/introduction.md
developers-guide/parallel-execution: ./new/develop/architecture.md
developers-guide/running-substreams: ./new/common/running-substreams.md
developers-guide/modules/inputs: ./new/develop/modules/inputs.md
developers-guide/modules/outputs: ./new/develop/modules/outputs.md
developers-guide/modules/setting-up-handlers: ./new/develop/modules/setting-up-handlers.md
developers-guide/modules/types: ./new/develop/modules/types.md
developers-guide/modules/writing-module-handlers: ./new/develop/modules/writing-module-handlers.md
developers-guide/cookbook/advanced-params: ./new/develop/parameterized-modules.md
developers-guide/cookbook/aggregation-windows: ./new/develop/modules/aggregation-windows.md
developers-guide/cookbook/dynamic-data-sources: ./new/develop/modules/dynamic-data-sources.md
developers-guide/cookbook/factory-params: ./new/develop/parameterized-modules.md
developers-guide/cookbook/keys-in-stores: ./new/develop/modules/keys-in-stores.md
developers-guide/sink-targets/substreams-powered-subgraph: ./new/consume/subgraph/quickstart.md
developers-guide/sink-targets/substreams-sink-sql: ./new/consume/sql/introduction.md
getting-started/installing-the-cli: ./new/common/installing-the-cli.md
getting-started/quickstart: ./new/common/introduction.md
references-and-specs/chains-and-endpoints: ./new/references/chains-and-endpoints.md
references-and-specs/command-line-interface: ./new/references/command-line-interface.md
references-and-specs/examples: ./new/tutorials/overview.md
references-and-specs/gui: ./new/references/gui.md
references-and-specs/faq: ./new/references/faq.md
references-and-specs/manifests: ./new/references/manifests.md
references-and-specs/packages: ./new/common/packages.md
references-and-specs/rust-crates: ./new/develop/rust-crates.md
glossary/glossary: ./new/references/glossary.md
quick-access/change-log: ./new/references/change-log.md



Binary file modified docs/.gitbook/assets/chains-endpoints.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file removed docs/.gitbook/assets/consume/consume-services.png
Binary file not shown.
Binary file not shown.
Binary file removed docs/.gitbook/assets/consume/service-sql.png
Binary file not shown.
Binary file removed docs/.gitbook/assets/consume/service-stream.png
Binary file not shown.
Binary file removed docs/.gitbook/assets/consume/service-subgraph.png
Binary file not shown.
Binary file removed docs/.gitbook/assets/develop/provider-gif.gif
Binary file not shown.
Binary file removed docs/.gitbook/assets/develop/rust-package-gif.gif
Binary file not shown.
Binary file removed docs/.gitbook/assets/develop/sending-gif.gif
Binary file not shown.
Binary file not shown.
Binary file removed docs/.gitbook/assets/intro/consume-flow.png
Binary file not shown.
Binary file removed docs/.gitbook/assets/intro/develop-flow.png
Binary file not shown.
Binary file removed docs/.gitbook/assets/intro/supported-chains.png
Binary file not shown.
Binary file removed docs/.gitbook/assets/packages/arch.png
Binary file not shown.
Binary file not shown.
Binary file removed docs/.gitbook/assets/sql/explore-pgweb.png
Binary file not shown.
82 changes: 54 additions & 28 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,68 @@
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).
---
description: StreamingFast Substreams documentation
---

<figure><img src=".gitbook/assets/intro/supported-chains.png" width="100%" /></figure>
# Substreams

**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!
## Welcome to Substreams documentation

## Consume Substreams
Substreams is a powerful blockchain indexing technology, developed for [The Graph Network](https://thegraph.com).

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**.
> 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.
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!
### Where to start

<figure><img src=".gitbook/assets/intro/consume-flow.png" width="100%" /></figure>
Learn about Substreams in a short, dense 25-minute intro and understand its impact on the blockchain ecosystem.

## Develop Substreams
{% 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 %}

If you can't find a Substreams package that retrieves exactly the data you need, **you can develop your own 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).

You can write your own Rust function to extract data from the blockchain:
The primary ways to use Substreams include:

```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)
}
```
* [Installing the `substreams` CLI](getting-started/installing-the-cli.md)
* [Going through the Quickstart](getting-started/quickstart.md)

<figure><img src=".gitbook/assets/intro/develop-flow.png" width="100%" /></figure>
After installing Substreams and reviewing the Quickstart:

## How Does It Work?
* You can [learn more about ](developers-guide/modules/)modules, and then [study the Developer's guide](developers-guide/overview.md).

The following video covers how Substreams works in less than 2 minutes:
Find pre-built Substreams by using the following resources:

{% embed url="https://www.youtube.com/watch?v=gVqGCqKVM08" %}
Get an overview of Substreams
{% endembed %}
* 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 %}
68 changes: 0 additions & 68 deletions docs/README_old.md

This file was deleted.

121 changes: 71 additions & 50 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,80 @@

* [Substreams](README.md)

## Documentation

* [Consume Substreams](new/consume/introduction.md)
* [Install the CLI](new/common/installing-the-cli.md)
* [Authentication](new/common/authentication.md)
* [Packages](new/common/packages.md)
* [Deployable Services](new/common/deployable-services.md)
* [Substreams:SQL](new/consume/sql/introduction.md)
* [Deployable Services](new/consume/sql/deployable-services/introduction.md)
* [Remote Service](new/consume/sql/deployable-services/remote-service.md)
* [Local Service](new/consume/sql/deployable-services/local-service.md)
* [SQL Sink](new/consume/sql/sql-sink.md)
* [Substreams:Stream](new/consume/stream/quickstart.md)
* [JavaScript](new/consume/stream/javascript.md)
* [Substreams:Subgraph](new/consume/subgraph/quickstart.md)
* [Develop Substreams](new/develop/introduction.md)
* [Install the CLI](new/common/installing-the-cli.md)
* [Authentication](new/common/authentication.md)
* [Quickstart](new/develop/init-project.md)
* [Manifest & Modules](new/common/manifest-modules.md)
* [Module types](new/develop/modules/types.md)
* [Inputs](new/develop/modules/inputs.md)
* [Output](new/develop/modules/outputs.md)
* [Module handlers](new/develop/modules/setting-up-handlers.md)
* [Module handler creation](new/develop/modules/writing-module-handlers.md)
* [Keys in stores](new/develop/modules/keys-in-stores.md)
* [Dynamic data sources](new/develop/modules/dynamic-data-sources.md)
* [Aggregation Windows](new/develop/modules/aggregation-windows.md)
* [Protobuf Schemas](new/develop/creating-protobuf-schemas.md)
* [Packages](new/common/packages.md)
* [Run a Substreams](new/common/running-substreams.md)
* [Deployable Services](new/common/deployable-services.md)
* [Rust Dependencies](new/develop/rust-crates.md)
* [Parameterized Modules](new/develop/parameterized-modules.md)
* [Chain-Specific Extensions](new/develop/chain-specific/overview.md)
* [EVM Chain-Specific Extensions](new/develop/chain-specific/evm/overview.md)
* [Making eth_calls](new/develop/chain-specific/evm/eth-calls.md)
* [Architecture](new/develop/architecture.md)
## Quick Access

* [Glossary](glossary/glossary.md)
* [Change log](release-notes/change-log.md)

## Concepts & Fundamentals

* [Benefits and comparisons](concepts-and-fundamentals/benefits.md)
* [Modules basics](concepts-and-fundamentals/modules.md)
* [Fundamentals](concepts-and-fundamentals/fundamentals.md)

## Getting Started

* [Installing the Substreams CLI](getting-started/installing-the-cli.md)
* [Quickstart](getting-started/quickstart.md)

## Cheatsheet

* [EVM](cheatsheet/evm/overview.md)
* [Blocks](cheatsheet/evm/blocks.md)
* [Transactions](cheatsheet/evm/transactions.md)
* [Logs](cheatsheet/evm/logs.md)

## Tutorials

* [Exploring Ethereum](new/tutorials/ethereum/exploring-ethereum/overview.md)
* [Mapping Blocks](new/tutorials/ethereum/exploring-ethereum/map_block_meta_module.md)
* [Filtering Transactions](new/tutorials/ethereum/exploring-ethereum/map_filter_transactions_module.md)
* [Retrieving Events of a Smart Contract](new/tutorials/ethereum/exploring-ethereum/map_contract_events_module.md)
* [Rust](new/tutorials/rust/overview.md)
* [From Ethereum address to SQL](tutorials/from-ethereum-address-to-SQL.md)
* [Substreams:SQL Deployable Service](tutorials/substreams-sql.md)
* [Exploring Ethereum](tutorials/exploring-ethereum/overview.md)
* [Mapping Blocks](tutorials/exploring-ethereum/map_block_meta_module.md)
* [Filtering Transactions](tutorials/exploring-ethereum/map_filter_transactions_module.md)
* [Retrieving Events of a Smart Contract](tutorials/exploring-ethereum/map_contract_events_module.md)
* [Making eth_calls](tutorials/eth-calls.md)
* [Rust](tutorials/rust/overview.md)
* [The Option struct](tutorials/rust/option.md)
* [The Result struct](tutorials/rust/result.md)

## Developer's Guide

* [Overview](developers-guide/overview.md)
* [Dependency installation](developers-guide/installation-requirements.md)
* [Manifest](developers-guide/creating-your-manifest.md)
* [Protobuf schemas](developers-guide/creating-protobuf-schemas.md)
* [Modules](developers-guide/modules/README.md)
* [Module types](developers-guide/modules/types.md)
* [Inputs](developers-guide/modules/inputs.md)
* [Output](developers-guide/modules/outputs.md)
* [Module handlers](developers-guide/modules/setting-up-handlers.md)
* [Module handler creation](developers-guide/modules/writing-module-handlers.md)
* [Running Substreams](developers-guide/running-substreams.md)
* [GUI](developers-guide/gui.md)
* [Parallel Execution](developers-guide/parallel-execution.md)
* [Sink targets](developers-guide/sink-targets/README.md)
* [Substreams-powered subgraph](developers-guide/sink-targets/substreams-powered-subgraph.md)
* [Files](developers-guide/sink-targets/substreams-sink-files.md)
* [Key/value store](developers-guide/sink-targets/substreams-sink-kv.md)
* [SQL (Postgres, Clickhouse, others)](developers-guide/sink-targets/substreams-sink-sql.md)
* [Prometheus](developers-guide/sink-targets/substreams-sink-prometheus.md)
* [MongoDB](developers-guide/sink-targets/substreams-sink-mongodb.md)
* [Custom Sink Using JavaScript](developers-guide/sink-targets/custom-sink-js.md)
* [Cookbook](developers-guide/cookbook.md)
* [Dynamic data sources](developers-guide/cookbook/dynamic-data-sources.md)
* [Factory parameterization](developers-guide/cookbook/factory-params.md)
* [Advanced parameters](developers-guide/cookbook/advanced-params.md)
* [Keys in stores](developers-guide/cookbook/keys-in-stores.md)
* [Aggregation windows](developers-guide/cookbook/aggregation-windows.md)
* [Subgraph entity changes](developers-guide/cookbook/entity-changes.md)

## Reference & Specs

* [Chains and endpoints](new/references/chains-and-endpoints.md)
* [Substreams CLI reference](new/references/command-line-interface.md)
* [Manifests Reference](new/references/manifests.md)
* [GUI Reference](new/references/gui.md)
* [Glossary](new/references/glossary.md)
* [Change log](new/references/change-log.md)
* [FAQ](new/references/faq.md)
* [Chains and endpoints](reference-and-specs/chains-and-endpoints.md)
* [Substreams CLI reference](reference-and-specs/command-line-interface.md)
* [Authentication](reference-and-specs/authentication.md)
* [Manifests](reference-and-specs/manifests.md)
* [Packages](reference-and-specs/packages.md)
* [Rust crates](reference-and-specs/rust-crates.md)
* [Examples](reference-and-specs/examples.md)
* [FAQ](reference-and-specs/faq.md)
Loading

0 comments on commit 9197246

Please sign in to comment.