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