eth_getBlockReceipts - Optimism RPC Method
Return every transaction receipt in a block on Optimism. Useful for indexers, analytics pipelines, and event backfills across cross-chain DeFi, Superchain-interoperable dApps, and public goods funding recipients.
Returns all transaction receipts for a block on Optimism. This is more efficient than calling eth_getTransactionReceipt once per transaction when you already know the target block.
Why Optimism? Build on the heart of the Superchain powering 60%+ of Ethereum L2 transactions with $6B+ TVL with OP Stack modularity, Superchain interoperability, 17M+ daily transactions across 33 chains, and 20% of tokens for public goods.
When to Use This Method
eth_getBlockReceipts is useful for L2 builders, DeFi developers, and teams launching Superchain-compatible apps:
- Indexer Backfills — Pull every receipt in a block with one request instead of looping over transaction hashes
- Event Collection — Scan all logs emitted by a block when building analytics or data pipelines
- Settlement Auditing — Verify every transaction outcome in a target block for cross-chain DeFi, Superchain-interoperable dApps, and public goods funding recipients
- Operational Debugging — Compare receipt-level gas usage, status, and logs across multiple transactions at once
Request Parameters
Block number, block tag such as latest, or 32-byte block hash
Response Body
Array of receipt objects for the block, or null if the block is not found
Transaction hash
0x1 on success, 0x0 on failure
Gas used by this transaction
Total gas used in the block up to this transaction
Logs emitted by the transaction
Created contract address for deployment transactions
Effective gas price paid by the sender
Code Examples
curl -X POST https://api-optimism-mainnet-archive.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockReceipts",
"params": ["0x76cde4f6f885fe27962356115e0ff0539058a03e8b9e15dac3fb40a9caa0bc47"],
"id": 1
}'Error Handling
| Error Code | Message | Description |
|---|---|---|
| -32602 | Invalid params | The block identifier is malformed |
| -32000 | Header not found | The referenced block does not exist on the node |
Related Methods
eth_getTransactionReceipt- Retrieve a single transaction receipteth_getBlockByHash- Retrieve the block object itselfeth_getBlockByNumber- Retrieve a block by number or tag
eth_getBlockByHash
Retrieve complete block data by block hash on Optimism. Essential for L2 builders, DeFi developers, and teams launching Superchain-compatible apps building on the heart of the Superchain powering 60%+ of Ethereum L2 transactions with $6B+ TVL.
eth_getBalance
Query account balance on Optimism. Essential for wallet applications and cross-chain DeFi, Superchain-interoperable dApps, and public goods funding recipients on the heart of the Superchain powering 60%+ of Ethereum L2 transactions with $6B+ TVL.