The problem
An explorer has to show every block, transaction, receipt and log since genesis.
How archive RPC helps
- eth_getBlockByNumber with full transactions and eth_getBlockReceipts per block.
- eth_getCode and eth_getStorageAt for contract pages.
- A steady RPS cap that matches a continuous crawler.
Methods you will call
- eth_getBlockByNumberReturns a block by number.
- eth_getBlockReceiptsReturns the receipts of every transaction in a block in one call.
- eth_getCodeReturns the bytecode deployed at an address at a given block.
- eth_getTransactionByHashReturns a transaction by hash.
Example
Crawl one block with its receipts
const [block, receipts] = await Promise.all([
client.getBlock({ blockNumber: n, includeTransactions: true }),
client.request({ method: "eth_getBlockReceipts", params: [toHex(n)] }),
]);Which plan
Growth or Scale, sized to how fast you need to catch up. See pricing or how it compares.