The Graph 백서

The Graph

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 18쪽 중 17쪽

om data modules. 5 min Substreams Pricing Compare providers and pricing to consume Substreams data. ## /docs/en/supported-networks/litecoin Litecoin Mainnet Substreams (Non-EVM) Pinax Network ⁠ Type mainnet Identifier litecoin Chain ID bip122:12a765e31ffd4059bada1e25190f6e98 Native Currency LTC Chain Docs https://litecoin.info/docs ⁠ Indexing Data on Litecoin Litecoin is a long-running proof-of-work blockchain and one of the earliest peer-to-peer digital currencies, securing the LTC asset. The Graph can stream that onchain activity — blocks and transactions, inputs and outputs, and address activity — as real-time data with Substreams. Litecoin is supported by The Graph with Substreams — a parallelized, real-time streaming engine for high-throughput use cases — via Pinax Network ⁠ . Indexing Litecoin with Substreams Substreams is a parallelized, real-time streaming engine for extracting and transforming blockchain data. Where a Subgraph indexes into a hosted GraphQL API, Substreams lets you consume high-throughput data directly or via 10+ supported sinks . Substreams streams Litecoin’s blocks, transactions, and their inputs and outputs. Modules are written in Rust and composed into reusable packages. Find an Existing Module on Substreams.dev Before writing any code, check the Substreams Registry ⁠ for a package that already does what you need. The registry hosts community- and team-built modules covering common onchain data that you can run as-is or compose into your own pipeline. Search for the protocol or data you want on Litecoin; if a module fits, you can consume its output directly or import it as a dependency in your own project. Develop Your Own Substreams Module If no existing module fits, you can build one. The Substreams Quick Start is the full walkthrough. In short: Install the Substreams CLI and get an API key from Pinax Network ⁠ . substreams init does not have a template for Litecoin yet, so set up the project by hand: write a substreams.yaml manifest ⁠ with network: litecoin and a Rust map module that takes sf.bitcoin.type.v1.Block as its input (the protobuf definitions are published on Buf ⁠ ). Write your extraction and transformation logic in Rust, then run substreams build . Stream the output with substreams gui (or substreams run ) to iterate, then publish your package to the Substreams Registry ⁠ to reuse or share it. Guides 15 min Substreams quick start Stream high-speed data for real-time indexing. 10 min Substreams.dev Access tutorials, templates, and documentation to build custom data modules. 8 min Custom Substreams Sinks Leverage existing Substreams sinks to access data. 5 min Substreams starter Leverage this boilerplate to create your first Substreams module. 7 min Substreams GitHub repository Study, contribute to, or customize the core Substreams framework. ## /docs/en/supported-networks/near-mainnet Near Mainnet Subgraphs Subgraph Studio ⁠ Substreams (Non-EVM) The Graph Market ⁠ Type mainnet Protocol near Identifier near-mainnet Chain ID near:mainnet Native Currency NEAR Chain Docs https://docs.near.org ⁠ Indexing Data on NEAR NEAR is a high-performance, sharded Layer 1 blockchain with a human-readable account model and Nightshade consensus, designed for scalable consumer and AI applications, with NEAR as its native token. The Graph can stream that onchain activity — blocks, transactions, and receipts; token transfers and balances; and smart-contract activity — as real-time data with Substreams. NEAR is supported by The Graph with Substreams — a parallelized, real-time streaming engine for high-throughput use cases — via The Graph Market ⁠ . Indexing NEAR with Substreams Substreams is a parallelized, real-time streaming engine for extracting and transforming blockchain data. Where a Subgraph indexes into a hosted GraphQL API, Substreams lets you consume high-throughput data directly or via 10+ supported sinks . Substreams streams NEAR’s blocks, transactions, and receipts. Modules are written in Rust and composed into reusable packages. Find an Existing Module on Substreams.dev Before writing any code, check the Substreams Registry ⁠ for a package that already does what you need. The registry hosts community- and team-built modules covering common onchain data that you can run as-is or compose into your own pipeline. Search for the protocol or data you want on NEAR; if a module fits, you can consume its output directly or import it as a dependency in your own project. Develop Your Own Substreams Module If no existing module fits, you can build one. The Substreams Quick Start is the full walkthrough. In short: Install the Substreams CLI and get a key at thegraph.market ⁠ (no personal information required). Scaffold a project with substreams init and follow the prompts for NEAR. Write your extraction and transformation logic in Rust, then run substreams build . Stream the output with substreams gui (or substreams run ) to iterate, then publish your package to the Substreams Registry ⁠ to reuse or share it. Guides 15 min Substreams quick start Stream high-speed data for real-time indexing. 10 min Substreams.dev Access tutorials, templates, and documentation to build custom data modules. 8 min Custom Substreams Sinks Leverage existing Substreams sinks to access data. 5 min Substreams starter Leverage this boilerplate to create your first Substreams module. 7 min Substreams GitHub repository Study, contribute to, or customize the core Substreams framework. ## /docs/en/supported-networks/neox Neo X Mainnet Subgraphs Subgraph Studio ⁠ Type mainnet Protocol ethereum Identifier neox Chain ID eip155:47763 Native Currency GAS Chain Docs https://xdocs.ngd.network ⁠ Indexing Data on Neo X Neo X is an EVM-compatible sidechain of the Neo blockchain secured by a dBFT consensus, extending Neo’s Smart Economy to EVM developers, with GAS as its native token. The Graph can index that onchain activity — DEX swaps, pools, and liquidity; lending and borrowing positions; token transfers and holder balances; and contract events — and serve it over GraphQL with Subgraphs. Neo X is supported by The Graph with Subgraphs — develop, test, and publish them in Subgraph Studio . Publishing is enabled, though guaranteed indexing via The Graph Network is not yet available for Neo X. Indexing Neo X with Subgraphs Getting smart contract data is hard. You write your own indexer, run your own database, and handle chain reorganizations yourself. The Graph removes that work, giving you an open API, called a Subgraph , that you query with GraphQL. Neo X is EVM-compatible, so the Subgraph workflow is the same as on most EVM chains. You develop and test your Subgraph in Subgraph Studio , then query it through the development endpoint. Subgraph publishing is enabled for Neo X , but no guaranteed indexing is available via The Graph Network at this time. You can develop, test, and publish your Subgraph in Subgraph Studio , but Indexers on the decentralized network are not guaranteed to index and serve it yet. Quick Start: Build Your Own Subgraph Building a Subgraph for Neo X takes four steps: Create your Subgraph in Subgraph Studio. Initialize a Subgraph project from your Neo X contract. Deploy it to Subgraph Studio and test it in the playground. Query it over GraphQL with the development endpoint. See the Subgraph pricing page for current query rates and free-tier limits. Step 1: Create your Subgraph in Subgraph Studio Open Subgraph Studio and connect your wallet (MetaMask, Coinbase Wallet, WalletConnect, or Safe). Create a Subgraph, then copy its slug and your deploy key from the Subgraph details page — you use both from the CLI. For a full walkthrough, see Using Subgraph Studio . Step 2: Initialize your Subgraph project Install the Graph CLI with the package manager you prefer: 1 # npm 2 npm install -g @graphprotocol/graph-cli@latest 3 4 # or yarn 5 yarn global add @graphprotocol/graph-cli Initialize from your Neo X contract: 1 graph init The CLI walks you through a set of prompts: Protocol : choose ethereum . Neo X is EVM-compatible. Subgraph slug : use the slug of the Subgraph you created in Subgraph Studio, for example my-neox-subgraph . Directory : where the project is scaffolded. Ethereum network : select neox from the list of supported networks. Contract address : the address of the contract you want to index. Find it on xexplorer.neo.org . ABI : if the CLI cannot fetch the ABI, export it from your build artifacts or the Neo X Explorer contract page. Supply it as a JSON file. Start block : the block your contract was deployed at. Set this so indexing does not scan from genesis. The explorer shows the deployment block. Contract name : the name of your contract. Index contract events as entities : set this to true . The CLI then scaffolds entities and mappings for every emitted event. Point the manifest at Neo X : 1 dataSources: 2 - kind: ethereum 3 name: MyContract 4 network: neox 5 source: 6 address: '0xYourNeoxContractAddress' 7 abi: MyContract 8 startBlock: 123456 # your contract's deployment block For a full walkthrough of schema and mapping authoring, see Creating a Subgraph . Then generate types and build: 1 graph codegen && graph build Step 3: Deploy to Subgraph Studio Authenticate the CLI with the deploy key from your Subgraph details page: 1 graph auth <DEPLOY_KEY> Then deploy your Subgraph to Subgraph Studio (the CLI asks for a version label such as 0.0.1 ): 1 graph deploy <SUBGRAPH_SLUG> Deploying pushes your Subgraph to Subgraph Studio, where you can test it in the playground and check indexing logs. It does not publish it to the decentralized network — see Using Subgraph Studio for details. Step 4: Query your Subgraph Once your Subgraph is syncing in Studio, test your queries against the development query URL shown on the Subgraph details page. Create an API key from the API Keys dashboard at thegraph.com/studio . Send GraphQL queries to the development query URL with your API key. The development endpoint is rate-limited (currently 3,000 queries per day). You can publish your Subgraph to The Graph Network at any time, but Indexers are not guaranteed to serve Neo X Subgraphs yet, so the Subgraph Studio development endpoint is the reliable way to query today. See Querying The Graph for the full query API. Guides 10 min Subgraph quick start Kickstart your journey into subgraph development. 12 min Graph Explorer Find and query existing blockchain data. 5 min Billing Optimize costs and manage billing efficiently. 5 min Timeseries & Aggregations Learn to track metrics like daily volumes or user growth. 7 min Advanced subgraph features Leverage features like custom data sources, event handlers, and topic filters. ## /docs/en/supported-networks/peaq Peaq Network Subgraphs Subgraph Studio ⁠ Type mainnet Protocol ethereum Identifier peaq Chain ID eip155:3338 Native Currency PEAQ Chain Docs https://docs.peaq.network ⁠ Indexing Data on peaq peaq is an EVM-compatible Layer 1 built for DePIN — decentralized physical infrastructure networks and machine economies — with PEAQ as its native token. The Graph can index that onchain activity — DEX swaps, pools, and liquidity; lending and borrowing positions; token transfers and holder balances; and contract events — and serve it over GraphQL with Subgraphs. peaq is supported by The Graph with Subgraphs — develop, test, and publish them in Subgraph Studio . Publishing is enabled, though guaranteed indexing via The Graph Network is not yet available for peaq. Indexing peaq with Subgraphs Getting smart contract data is hard. You write your own indexer, run your own database, and handle chain reorganizations yourself. The Graph removes that work, giving you an open API, called a Subgraph , that you query with GraphQL. peaq is EVM-compatible, so the Subgraph workflow is the same as on most EVM chains. You develop and test your Subgraph in Subgraph Studio , then query it through the development endpoint. Subgraph publishing is enabled for peaq , but no guaranteed indexing is available via The Graph Network at this time. You can develop, test, and publish your Subgraph in Subgraph Studio , but Indexers on the decentralized network are not guaranteed to index and serve it yet. Quick Start: Build Your Own Subgraph Building a Subgraph for peaq takes four steps: Create your Subgraph in Subgraph Studio. Initialize a Subgraph project from your peaq contract. Deploy it to Subgraph Studio and test it in the playground. Query it over GraphQL with the development endpoint. See the Subgraph pricing page for current query rates and free-tier limits. Step 1: Create your Subgraph in Subgraph Studio Open Subgraph Studio and connect your wallet (MetaMask, Coinbase Wallet, WalletConnect, or Safe). Create a Subgraph, then copy its slug and your deploy key from the Subgraph details page — you use both from the CLI. For a full walkthrough, see Using Subgraph Studio . Step 2: Initialize your Subgraph project Install the Graph CLI with the package manager you prefer: 1 # npm 2 npm install -g @graphprotocol/graph-cli@latest 3 4 # or yarn 5 yarn global add @graphprotocol/graph-cli Initialize from your peaq contract: 1 graph init The CLI walks you through a set of prompts: Protocol : choose ethereum . peaq is EVM-compatible. Subgraph slug : use the slug of the Subgraph you created in Subgraph Studio, for example my-peaq-subgraph . Directory : where the project is scaffolded. Ethereum network : select peaq from the list of supported networks. Contract address : the address of the contract you want to index. Find it on peaq.subscan.io . ABI : if the CLI cannot fetch the ABI, export it from your build artifacts or the Subscan contract page. Supply it as a JSON file. Start block : the block your contract was deployed at. Set this so indexing does not scan from genesis. The explorer shows the deployment block. Contract name : the name of your contract. Index contract events as entities : set this to true . The CLI then scaffolds entities and mappings for every emitted event. Point the manifest at peaq : 1 dataSources: 2 - kind: ethereum 3 name: MyContract 4 network: peaq 5 source: 6 address: '0xYourPeaqContractAddress' 7 abi: MyContract 8 startBlock: 123456 # your contract's deployment block For a full walkthrough of schema and mapping authoring, see Creating a Subgraph . Then generate types and build: 1 graph codegen && graph build Step 3: Deploy to Subgraph Studio Authenticate the CLI with the deploy key from your Subgraph details page: 1 graph auth <DEPLOY_KEY> Then deploy your Subgraph to Subgraph Studio (the CLI asks for a version label such as 0.0.1 ): 1 graph deploy <SUBGRAPH_SLUG> Deploying pushes your Subgraph to Subgraph Studio, where you can test it in the playground and check indexing logs. It does not publish it to the decentralized network — see Using Subgraph Studio for details. Step 4: Query your Subgraph Once your Subgraph is syncing in Studio, test your queries against the development query URL shown on the Subgraph details page. Create an API key from the API Keys dashboard at thegraph.com/studio . Send GraphQL queries to the development query URL with your API key. The development endpoint is rate-limited (currently 3,000 queries per day). You can publish your Subgraph to The Graph Network at any time, but Indexers are not guaranteed to serve peaq Subgraphs yet, so the Subgraph Studio development endpoint is the reliable way to query today. See Querying The Graph for the full query API. Guides 10 min Subgraph quick start Kickstart your journey into subgraph development. 12 min Graph Explorer Find and query existing blockchain data. 5 min Billing Optimize costs and manage billing efficiently. 5 min Timeseries & Aggregations Learn to track metrics like daily volumes or user growth. 7 min Advanced subgraph features Leverage features like custom data sources, event handlers, and topic filters. ## /docs/en/supported-networks/robinhood Robinhood Chain Mainnet Substreams (Extended EVM) The Graph Market ⁠ • Pinax Network ⁠ • Data Nexus ⁠ Type mainnet Protocol ethereum Identifier robinhood Chain ID eip155:4663 Native Currency ETH Chain Docs https://docs.robinhood.com/chain ⁠ Indexing Data on Robinhood Chain Robinhood Chain is an Ethereum Layer 2 built on Arbitrum technology, created by Robinhood to bring tokenized real-world assets — including tokenized stocks — onchain. The Graph can stream that onchain activity — DEX swaps, pools, and liquidity; lending and borrowing positions; token transfers and holder balances; and contract events — as real-time data with Substreams. Robinhood Chain is supported by The Graph with Substreams — a parallelized, real-time streaming engine for high-throughput use cases — via The Graph Market ⁠ , Pinax Network ⁠ , and Data Nexus ⁠ . Indexing Robinhood Chain with Substreams Substreams is a parallelized, real-time streaming engine for extracting and transforming blockchain data. Where a Subgraph indexes into a hosted GraphQL API, Substreams lets you consume high-throughput data directly or via 10+ supported sinks . Robinhood Chain is served with the extended EVM block model, so Substreams modules have access to full transaction, call, and event data. Modules are written in Rust and composed into reusable packages. Find an Existing Module on Substreams.dev Before writing any code, check the Substreams Registry ⁠ for a package that already does what you need. The registry hosts community- and team-built modules — DEX trades, token transfers, contract events, and more — that you can run as-is or compose into your own pipeline. Search for the protocol or data you want on Robinhood Chain ; if a module fits, you can consume its output directly or import it as a dependency in your own project. Develop Your Own Substreams Module If no existing module fits, you can build one. The Substreams Quick Start is the full walkthrough. In short: Install the Substreams CLI and get a key at [thegraph.market](https://thegraph.market/) (no personal information required) . Scaffold a project with substreams init and choose the EVM path, pointing it at your Robinhood Chain contract. Write your extraction and transformation logic in Rust, then run substreams build . Stream the output with substreams gui (or substreams run ) to iterate, then publish your package to the Substreams Registry ⁠ to reuse or share it. Guides 15 min Substreams quick start Stream high-speed data for real-time indexing. 10 min Substreams.dev Access tutorials, templates, and documentation to build custom data modules. 8 min Custom Substreams Sinks Leverage existing Substreams sinks to access data. 5 min Substreams starter Leverage this boilerplate to create your first Substreams module. 7 min Substreams GitHub repository Study, contribute to, or customize the core Substreams framework. ## /docs/en/supported-networks/rootstock Rootstock Mainnet Subgraphs Subgraph Studio (API Keys) ⁠ • Community Indexing • Network Rewards ⁠ Type mainnet Protocol ethereum Identifier rootstock Chain ID eip155:30 Native Currency RBTC Chain Docs https://dev.rootstock.io ⁠ Indexing Data on Rootstock Rootstock (RSK) is a Bitcoin sidechain that brings EVM-compatible smart contracts to Bitcoin, secured by merge-mining with the Bitcoin network and using RBTC, a Bitcoin-pegged token, for gas. The Graph can index that onchain activity — DEX swaps, pools, and liquidity; lending and borrowing positions; token transfers and holder balances; and contract events — and serve it over GraphQL with Subgraphs. Rootstock is supported by The Graph with Subgraphs — open APIs you publish to The Graph Network, where Indexers sync and s
프로젝트로 돌아가기