Ethereum
eth_getBlockReceipts
The eth_getBlockReceipts method returns all transaction receipts for a given block in a single call. This highly efficient method is significantly more performant than requesting individual receipts when you need data for multiple transactions in the same block, making it essential for blockchain indexers and analytics platforms.
Use Cases
- Gas usage analysis and optimization
- Transaction success/failure monitoring
- Bulk transaction verification and processing
- Log and event collection for indexing
- Smart contract execution analysis and debugging
- Block explorers and analytics platforms
- Token transfer tracking and wallet updates
- MEV (Maximal Extractable Value) analysis
- Historical data aggregation
- Batch event processing
Method Details
This method retrieves comprehensive transaction results including status, gas usage, logs, and events for all transactions in a specified block.
Response Example
Key Receipt Fields Explained
- status:
0x1for successful transactions,0x0for failed transactions - logs: Contains all emitted events (crucial for tracking token transfers and state changes)
- gasUsed: Actual gas consumed by this transaction (important for cost analysis)
- cumulativeGasUsed: Running total of gas used in the block up to this transaction
- effectiveGasPrice: Actual price paid per gas unit (particularly important for EIP-1559 transactions)
- contractAddress: Only populated for contract creation transactions
- type: Indicates the transaction type (legacy, access list, or EIP-1559)
Common Event Signatures
The most common event signatures you'll encounter in logs:
- ERC-20 Transfer:
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef - ERC-20 Approval:
0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925 - ERC-721 Transfer:
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef(same as ERC-20) - ERC-1155 TransferSingle:
0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62 - ERC-1155 TransferBatch:
0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb
Performance Advantages
This method offers significant performance benefits over individual receipt requests:
- Reduced Network Overhead: One request instead of many separate API calls
- Lower Latency: Minimized round-trip delays between client and node
- Decreased Resource Usage: Less processing required by both client and node
- Better Cache Utilization: Data can be returned from a single cache lookup
- Simplified Error Handling: Single request means simplified retry logic
Practical Example
See also
- eth_getTransactionReceipt - Returns the receipt of a single transaction
- eth_getBlockByNumber - Returns information about a block by block number
- eth_getLogs - Returns logs matching given filter criteria
- eth_getTransactionByHash - Returns information about a transaction by hash
Parameters
Block number in hex format or tags: latest, earliest, pending, safe, finalized