SubQuery Learn
Practical guides for on-chain builders.
Work through real RPC, indexing, and debugging tasks with runnable examples and checks you can bring into your own stack.
Browse guidesExplore the guides
- Indexing4 min read
Replay EVM events without duplicate side effects
Build an idempotent EVM event consumer with a block-hash cursor, transactional outbox, and a replay drill for retries and chain reorganizations.
Read guide - RPC Operations3 min read
Verify an EVM contract deployment with RPC
Catch wrong-chain deployments in CI by checking the RPC chain ID, transaction receipt, canonical block hash, and runtime bytecode before publishing an address.
Read guide - Solana3 min read
Read Solana wallet token balances without stale snapshots
Sum token accounts by mint using exact integers, keep a slot watermark, and prevent a slower Solana RPC response from replacing a newer wallet balance.
Read guide - RPC Operations6 min read
Smart Contract Security Best Practices: Verify On-Chain State Before You Trust It
A practical guide to one smart contract security habit every dApp developer should build: reading contract state through an RPC endpoint and handling failures explicitly, instead of trusting a single unverified response.
Read guide - RPC Operations5 min read
How to Check Optimism RPC Reliability Before You Ship
A practical guide to measuring Optimism RPC reliability yourself with a small Node.js health-check script, plus how to separate RPC access from indexing and querying.
Read guide - RPC Operations5 min read
How to Compare Dedicated vs Shared Node Access for Solana RPC
A practical method for measuring whether dedicated or shared Solana RPC access fits your workload, using a runnable Node.js health-check script and honest measurement instead of vendor claims.
Read guide - RPC Operations5 min read
How to Health-Check a Solana RPC Endpoint Before You Commit
A practical Node.js 18+ script that verifies a Solana RPC endpoint's chain identity, slot freshness, and error behavior before you route production traffic to it, plus how to separate RPC access from indexing.
Read guide - RPC Operations6 min read
How to Compare Solana RPC Rate Limits and Usage Tiers Without Guessing
A practical method for measuring Solana RPC rate limits and usage tiers yourself, using a Node.js script that probes 429 responses, retry headers, and per-method behavior so you can pick a provider tier that fits your workload.
Read guide - RPC Operations4 min read
How to Verify a Solana RPC Provider's Enhanced APIs Before You Commit
A practical checklist and runnable Node.js script for confirming that a Solana RPC provider actually exposes the enhanced APIs your app depends on, and for separating RPC access from indexing.
Read guide - Indexing4 min read
Query Astar TVL Data: RPC Calls vs. Indexing
A practical guide to fetching Astar Network TVL-related on-chain data, showing when a direct RPC call is enough and when you need an indexer, with a runnable Node.js example and failure handling.
Read guide - RPC Operations6 min read
Connect to Astar zkEVM RPC and Verify Your Chain Before You Index
A practical guide to hitting the Astar zkEVM JSON-RPC endpoint from Node.js, confirming chain ID and block height, handling failures, and understanding why RPC access is not the same as indexing.
Read guide - RPC Operations5 min read
Monitor Moonbeam RPC Uptime and Health from a Node.js Script
Build a small Node.js 18+ health-check script that distinguishes Moonbeam RPC reachability from indexing/query latency, logs failures with context, and helps you measure uptime yourself instead of trusting a dashboard.
Read guide - RPC Operations4 min read
Make a Moonbeam RPC Call in Node.js, Then Know When You Need an Indexer
A hands-on guide to calling a Moonbeam RPC endpoint from Node.js 18+, reading the result correctly, handling failures, and recognizing the point where RPC calls stop being the right tool and indexing takes over.
Read guide - Indexing5 min read
Moonbeam API: Query Account Balances Without Scanning Every Block
Use a Moonbeam RPC endpoint to confirm connectivity, then query indexed balance data with SubQuery instead of walking blocks by hand. Includes a runnable Node.js 18+ example, expected output, and failure handling.
Read guide - RPC Operations4 min read
Connect to a Moonbeam RPC Endpoint and Read Contract State
A practical guide to calling a Moonbeam RPC endpoint from Node.js 18+ or curl, decoding a real eth_call response, handling JSON-RPC errors, and knowing when you need an indexer instead of raw RPC.
Read guide - RPC Operations5 min read
Connect to peaq over RPC and read an account balance
A hands-on guide to making your first peaq JSON-RPC calls: connect to a peaq endpoint, read a native balance, handle common failures, and understand where RPC stops and indexing begins.
Read guide - RPC Operations4 min read
Query peaq Network Balances and Chain State from Node.js over RPC
A hands-on guide to connecting a Node.js 18+ script to the peaq network blockchain over JSON-RPC, reading account balances and chain metadata, and handling the failure modes you will actually hit.
Read guide - RPC Operations4 min read
Check peaq Mainnet RPC Health Before You Ship: A Node.js Preflight
Build a small Node.js 18+ preflight script that verifies a peaq mainnet RPC endpoint is reachable, returns the expected chain ID, and reports the latest block, with explicit failure handling for timeouts, HTTP errors, and JSON-RPC errors.
Read guide - RPC Operations3 min read
Check a Robinhood network RPC endpoint with Node.js
Verify an EVM-compatible RPC endpoint's chain ID and latest block, with safe handling for common connection and JSON-RPC errors.
Read guide - RPC Operations2 min read
Verify a Robinhood Network RPC Endpoint with Node.js
Connect to a Robinhood Network JSON-RPC endpoint, check its chain ID, and retrieve its latest block number.
Read guide - RPC Operations2 min read
Read the peaq Network RPC Head with Node.js
Use the Ethereum JSON-RPC eth_blockNumber method to read the latest block height reported by a peaq RPC endpoint, with validation and failure handling.
Read guide - RPC Operations3 min read
Read the Latest peaq Network Block with JSON-RPC
Use a peaq-compatible EVM JSON-RPC endpoint from Node.js 18+ to request the current block number, validate the response, and distinguish RPC access from indexed data.
Read guide - RPC Operations3 min read
How to Verify the peaq Mainnet Launch Date and RPC in 2024–2025
Confirm the peaq mainnet launch date, validate that an RPC endpoint connects to peaq, and understand why RPC access is different from indexed blockchain data.
Read guide - RPC Operations3 min read
Verify a Bittensor WebSocket RPC Connection with Node.js
Connect to a Bittensor WebSocket RPC endpoint, identify the chain, and request the latest block header without assuming an endpoint or indexing service.
Read guide - RPC Operations3 min read
Read a Bittensor Subnet’s Tempo Through RPC
Use a Substrate-compatible RPC endpoint and the Polkadot.js API to read the current tempo for a Bittensor subnet.
Read guide - RPC Operations4 min read
Inspect Bittensor Metagraph Storage Through a Subtensor RPC
Use a Bittensor Subtensor RPC endpoint and runtime metadata to discover metagraph-related storage before writing a reader or indexer.
Read guide - RPC Operations3 min read
Bittensor tutorial: verify a Substrate RPC endpoint with Node.js
Use Node.js 18+ to confirm that a Bittensor RPC endpoint responds, identify the connected chain, and read its latest block header without confusing RPC access with indexed data.
Read guide - RPC Operations2 min read
Check RPC access before querying Bittensor subnet 123
Use Node.js to verify a Bittensor RPC endpoint and retrieve a finalized block hash before building a subnet 123 query.
Read guide - RPC Operations3 min read
Bittensor Subnet 123: Identify It from Live Chain State
Learn how to determine what Bittensor subnet 123 currently represents by querying its on-chain metadata with a Node.js RPC client.
Read guide - RPC Operations3 min read
Diagnose a Bittensor RPC timeout with a header request
Use a small Node.js probe to separate endpoint timeouts from JSON-RPC errors and indexing or query-layer problems.
Read guide - RPC Operations2 min read
Read the Latest Finalized Bittensor Block with JSON-RPC
Use Node.js to retrieve a finalized block hash and height from a Bittensor RPC endpoint, and handle common request failures.
Read guide - RPC Operations3 min read
Query the Latest Gnosis Block with Node.js
Use a provider-supplied Gnosis RPC endpoint to make a JSON-RPC request from Node.js, validate the response, and understand when an indexer is a better fit.
Read guide - RPC Operations2 min read
Verify a Gnosis RPC endpoint with Node.js
Check that an RPC endpoint identifies Gnosis Chain and returns a recent block number using standard JSON-RPC requests.
Read guide