eth_getBlockReceipts
JSON-RPC method returns all transaction receipts for a given block. This method is highly efficient for retrieving receipt data for all transactions in a block with a single API call, making it ideal for block processing, event extraction, and comprehensive transaction analysis.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
The method takes one parameter:- Block number - The block for which to retrieve all transaction receipts
Parameter details
blockNumber
(string, required) — Block identifier:"latest"
,"earliest"
,"pending"
, or a specific block number in hexadecimal
Response
The method returns an array of transaction receipt objects for all transactions in the specified block.Response structure
Receipt array:- Array of transaction receipt objects, one for each transaction in the block
- Empty array if the block contains no transactions
null
if the block doesn’t exist
transactionHash
— Hash of the transactiontransactionIndex
— Index of the transaction in the block (0-based)blockHash
— Hash of the block containing the transactionblockNumber
— Number of the block containing the transactionfrom
— Address of the transaction senderto
— Address of the transaction receiver (null for contract creation)gasUsed
— Amount of gas used by this specific transactioncumulativeGasUsed
— Total gas used in the block up to and including this transactioncontractAddress
— Address of the created contract (null if not a contract creation)logs
— Array of log objects generated by the transactionstatus
— Transaction status (0x0
for failure,0x1
for success)effectiveGasPrice
— Actual gas price paid by the transactiontype
— Transaction type (0x0 for legacy, 0x1 for EIP-2930, 0x2 for EIP-1559)
Usage example
Basic implementation
Hyperliquid-specific considerations
System transactions
HyperCore transactions:- Block receipts include receipts for both regular and system transactions
- System transactions originate from HyperCore and may have different patterns
- All transactions (regular and system) are included in the receipt array
- System transactions contribute to block gas usage and event generation
Efficiency benefits
Batch processing:- Retrieve all receipts for a block in one request
- More efficient than individual
eth_getTransactionReceipt
calls - Reduces API call overhead and network latency
- Ideal for processing entire blocks atomically
Receipt data interpretation
Transaction status:0x1
— Transaction succeeded0x0
— Transaction failed (reverted)- Failed transactions still consume gas
- Check status before processing transaction effects
gasUsed
— Gas consumed by individual transactioncumulativeGasUsed
— Total gas used up to this transaction in the block- Use for calculating gas efficiency and block utilization
Example request
Shell
Use cases
Theeth_getBlockReceipts
method is essential for applications that need to:
- Block processing: Efficiently process all transactions in a block with a single API call
- Event indexing: Build comprehensive event indexes from receipt data
- Analytics platforms: Collect transaction and event data for analysis
- DeFi monitoring: Track protocol events and state changes
- Audit systems: Verify transaction outcomes and contract interactions
- Block explorers: Display comprehensive block transaction information
- Transaction monitoring: Track transaction success rates and patterns
- Gas analysis: Analyze gas usage patterns across block transactions
- Smart contract monitoring: Track contract interactions and events
- System transaction analysis: Analyze both regular and HyperCore system transaction receipts
- Data synchronization: Maintain synchronized blockchain data
- Integration services: Provide receipt data to external systems
This method returns receipts for all transactions in a block, including both regular transactions and system transactions from HyperCore. This can be a large amount of data for blocks with many transactions. Consider filtering strategies for high-volume blocks.
Body
application/json