Links

getBlockReceipts

Get the receipts for all transactions in a block
The eth_getBlockReceipts method fetches transaction receipts from within a block. It seamlessly accepts either the block height or block hash as a parameter, providing flexibility in accessing the desired data.

How to use getBlockReceipts method ?

Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the getBlockReceipts Builder API method effectively using Blast.

Parameters

Below, you can find the query parameters accepted by the method.
Field
Type
Description
blockNumberOrHash
String
This parameter is essential and must be provided. Depending on the value you specify, whether it's the block height or block hash, it will initiate the retrieval of the receipt objects, ordered by transactionIndex.

Returns

Discover an insightful explanation of the returned parameters here, offering a deep understanding of their significance and implications.
Field
Type
Description
blockHash
string
The hash of the block
blockNumber
integer
The height of the block
blockTimestamp
string
The timestamp of the block
transactionCount
integer
The number of transactions for which receipts were returned
receipts
array
The array of Receipts objects
transactionHash
string
The hash of the transaction
transactionIndex
integer
The index of the transaction
from
string
The address of the sender
to
string
The address of the receiver. Null when it's a contract creation transaction
contractAddress
string
The contract address created, if the transaction was a contract creation, otherwise null
cumulativeGasUsed
string
The sum of gas used by this transaction and all preceding transactions in the same block
effectiveGasPrice
string
Price paid for each unit of gas used in this transaction, denoted in wei
gasUsed
string
The amount of gas used in this transaction
gasUsedForL1
string
Arbitrum The amount of gas used on L1 in units of L2 gas
l1BlockNumber
string
Arbitrum The L1 block number that would be used for block.number calls
l1Fee
string
Arbitrum, Base, Optimism Fee paid on L1 to post the transaction, denoted in wei
l1FeeScalar
string
Base, Optimism L1 fee scalar
l1GasPrice
string
Base, Optimism Price paid for each unit of L1 gas, denoted in wei
l1GasUsed
string
Base, Optimism The amount of gas used on L1
cumulativeGasUsed
string
The total amount of gas used when this transaction was executed in the block
effectiveGasPrice
string
The amount of gas used by this specific transaction alone
gasUsed
string
The amount of gas used by this specific transaction alone
logsBloom
string
Bloom filter for light clients to quickly retrieve related logs
logs
array
Array of Log objects
address
string
Contract address from which logs should originate
topics
array
Topic to describe the log event
data
string
Additional data of the log event
blockNumber
integer
The block height where the log event occurred
transactionHash
string
The hash of the transaction
transactionIndex
integer
The index of the transaction
blockHash
string
The hash of the block where the log event occurred
logIndex
integer
The index of the log
removed
boolean
true when the log was removed, due to a chain reorganization. false if it's a valid log
status
string
The status of the transaction
type
string
The type of the transaction

Example Request and Result for getBlockReceipts

In this section, we provide an illustrative example of a request made to retrieve the receipts for all transactions in a block contents using the getBlockReceipts Builder API method. Additionally, we present the resulting response containing information about the specified receipts. Developers can use this as a reference for crafting their own requests and parsing the returned data when working with the getBlockReceipts method.
The example in this section uses a non-existing project id.
Make sure you replace it with your Starknet endpoint when issuing the Builder API calls.
Don't have a project id? Here's a straightforward guide on how to obtain one!
get
https://eth-mainnet.blastapi.io/<project-id>/builder/getBlockReceipts?blockNumberOrHash=4865142
Returns the receipt objects, ordered by transactionIndex.
Parameters
Query
blockNumberOrHash*
String
4865142
Responses
200: OK
Succesfull Request
Last modified 1mo ago