Ethereum
eth_getBlockReceipts
eth_getBlockReceipts returns the receipt for every transaction in one Ethereum block in a single call. Each receipt carries the execution outcome — status (0x1 success, 0x0 failure), gasUsed and cumulativeGasUsed, the effectiveGasPrice that settled under EIP-1559, any contractAddress created, and the full logs array. Instead of one round-trip per transaction, you ask once by block tag and get the whole set, which is exactly what an indexer wants when ingesting a block on Ethereum mainnet. Point it at https://ethereum.therpc.io/YOUR_API_KEY (chain ID 1, native coin ETH) with a height or named tag.
Use cases
- Single-call block ingestion. Pull every event in a block at once to feed an indexer or subgraph, instead of fanning out one receipt request per transaction.
- Block-level fee accounting. Sum
gasUsedacross receipts and multiply by eacheffectiveGasPriceto compute total fees paid in the block, in ETH. - Token balance updates. Scan the
logsfor ERC-20Transferevents (topic00xddf252ad...) to advance token balances without a separate log query. - Failure triage. Filter receipts where
statusis0x0to find reverted transactions in the block and investigate why they failed.
Parameters
| # | Name | Type | Required | Description |
|---|---|---|---|---|
| 1 | blockTag | string | Yes | The block whose receipts to fetch. |
Response
| Type | Description |
|---|---|
| array of object | Array of receipt objects. Each receipt contains: transactionHash, transactionIndex, blockHash, blockNumber, from, to, contractAddress, gasUsed, cumulativeGasUsed, effectiveGasPrice, status ("0x1" success / "0x0" failure), logs, logsBloom, type. |
Example request
Try it live in the Ethereum playground.
Errors & troubleshooting
| Code | Message | Cause |
|---|---|---|
-32602 | Invalid params | Block tag is unrecognised or malformed. |
-32000 | Block not found | The requested block does not exist or has been pruned. |
Common pitfalls
- For whole-block ingestion this beats looping
eth_getTransactionReceipt— one request versus hundreds, with far less latency and fewer compute units billed. - A dense mainnet block with verbose DeFi logs produces a large array. Budget for multi-megabyte responses and chunk your processing rather than holding everything in memory at once.
- The method is a newer addition; not every node exposes it. TheRPC serves it on Ethereum mainnet, but if you fan out to other backends, confirm support and keep a per-transaction fallback path.
Supported networks
- Mainnet — Chain ID: 1
- Sepolia — Chain ID: 11155111
See also
Parameters
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"