Docs
Arama⌘ K
  • Ana sayfa
  • Graph Hakkında
  • Desteklenen Ağlar
  • Protocol Contracts
  • Subgraph'ler
    • Substream'ler
      • Token API
        • Hypergraph
          • AI Suite
            • Endeksleme
              • Kaynaklar
                Substream'ler

                2 dakika

                Introduction to Substreams

                Substreams Logo

                To start coding right away, check out the Substreams Quick Start.

                Genel Bakış

                Substreams is a powerful parallel blockchain indexing technology designed to enhance performance and scalability within The Graph Network.

                Substreams Benefits

                • Accelerated Indexing: Boost Subgraph indexing time with a parallelized engine for quicker data retrieval and processing.
                • Multi-Chain Support: Expand indexing capabilities beyond EVM-based chains, supporting ecosystems like Solana, Injective, Starknet, and Vara.
                • Enhanced Data Model: Access comprehensive data, including the trace level data on EVM or account changes on Solana, while efficiently managing forks/disconnections.
                • Multi-Sink Support: For Subgraph, Postgres database, Clickhouse, and Mongo database.

                Substreams Nasıl Çalışır - 4 Adımda

                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).
                1fn get_my_block(blk: Block) -> Result<MyBlock, substreams::errors::Error> {2    let header = blk.header.as_ref().unwrap();34    Ok(MyBlock {5        number: blk.number,6        hash: Hex::encode(&blk.hash),7        parent_hash: Hex::encode(&header.parent_hash),8    })9}
                1. You wrap up your Rust program into a WASM module just by running a single CLI command.

                2. The WASM container is sent to a Substreams endpoint for execution. The Substreams provider feeds the WASM container with the blockchain data and the transformations are applied.

                3. You select a sink⁠, a place where you want to send the transformed data (such as a SQL database or a Subgraph).

                Ek Kaynaklar

                All Substreams developer documentation is maintained by the StreamingFast core development team on the Substreams registry⁠.

                ⁠GitHub'da Düzenle⁠

                Hızlı BaşlangıçDev Container
                Bu sayfada
                • Genel Bakış
                • Substreams Benefits
                • Substreams Nasıl Çalışır - 4 Adımda
                • Ek Kaynaklar
                The GraphStatusTestnetBrand AssetsForumSecurityPrivacy PolicyTerms of Service