eth_getBlockReceipts
Instead of calling numerous individual methods, this approach can be useful when you wish to get details about all the transactions in a block at once.
Parameters
blockNumber/tag
(string)
REQUIRED - The block number in hexadecimal format or in string format (latest, earliest, pending, safe, or finished). Please refer to the official Ethereum documentation for a description of the default block parameter.
Returns
result
An array of objectsblockHash
- The hash of the block. null when pendingblockNumber
- The block numbercontractAddress
- The contract address created if the transaction was a contract creation, otherwise nullcumulativeGasUsed
-The total amount of gas used when this transaction was executed in the blockeffectiveGasPrice
-The actual value per gas deducted from the sender accountfrom
-The address of the sendergasUsed
-The amount of gas used by this specific transaction alonelogs
- An array of log objects that generated this transactionaddress
-An address from which this log originatedtopics
- An array of zero to four 32 Bytes DATA of indexed log arguments. In Solidity, the first topic is the hash of the signature of the event (e.g. Deposit(address, bytes32, uint256)), except you declare the event with the anonymous specifierdata
- It contains one or more 32 Bytes non-indexed arguments of the logblockNumber
-The block number where this log was in. null when its a pending logtransactionHash
-The hash of the transactions this log was created from. null when its a pending logtransactionIndex
-The integer of the transaction's index position that the log was created from. null when it's a pending logblockHash
-The hash of the block where this log was in. null when its a pending loglogIndex
-The integer of the log index position in the block. null when its a pending logremoved
- It is true when the log was removed due to a chain reorganization, and false if it's a valid log
logsBloom
-The bloom filter for light clients to quickly retrieve related logsstatus
-It is either 1 (success) or 0 (failure) encoded as a hexadecimalto
-The address of the receiver. null when it's a contract creation transactiontransactionHash
-The hash of the transactiontransactionIndex
- An index of the transaction in the blocktype
-The value type
Example
Request
curl --location 'https://eth-mainnet.blastapi.io/<project_id>' \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_getBlockReceipts","params":["0xEDA8CE"],"id":1,"jsonrpc":"2.0"}'
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": [{
"blockHash": "0x75995c39d9540285df0b37e0969e17e5f9bd8b66efc8f30d747ac7b821c30f9d",
"blockNumber": "0xeda8ce",
"contractAddress": null,
"cumulativeGasUsed": "0xb485",
"effectiveGasPrice": "0xa3e9ab800",
"from": "0x3eafe75fac4c13e226027217abcd7f832bb330db",
"gasUsed": "0xb485",
"logs": [{
"address": "0x06325440d014e39736583c165c2963ba99faf14e",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x0000000000000000000000003eafe75fac4c13e226027217abcd7f832bb330db", "0x000000000000000000000000b26c3cf80fd86559e434adaf31195be4d7b252bb"],
"data": "0x00000000000000000000000000000000000000000000014d194d7a016c04a345",
"blockNumber": "0xeda8ce",
"transactionHash": "0x4462a53c8454e2d75f054d5782f3480259fe31e10210742f2fd5a5cb277be5c6",
"transactionIndex": "0x0",
"blockHash": "0x75995c39d9540285df0b37e0969e17e5f9bd8b66efc8f30d747ac7b821c30f9d",
"logIndex": "0x0",
"removed": false
}],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000002000000000000000000002000000020008000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000008002000000000040000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x06325440d014e39736583c165c2963ba99faf14e",
"transactionHash": "0x4462a53c8454e2d75f054d5782f3480259fe31e10210742f2fd5a5cb277be5c6",
"transactionIndex": "0x0",
"type": "0x0"
}, {
"blockHash": "0x75995c39d9540285df0b37e0969e17e5f9bd8b66efc8f30d747ac7b821c30f9d",
"blockNumber": "0xeda8ce",
"contractAddress": null,
"cumulativeGasUsed": "0x349b2",
"effectiveGasPrice": "0x7ea8ed400",
"from": "0xeee399b12eb291ebc43159b96fc5a627d93a8c7a",
"gasUsed": "0x2952d",
"logs": [{
"address": "0x92d6c1e31e14520e676a687f0a93788b716beff5",
"topics": ["0xa0a19463ee116110c9b282012d9b65cc5522dc38a9520340cbaf3142e550127f", "0x000000000000000000000000eee399b12eb291ebc43159b96fc5a627d93a8c7a"],
"data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockNumber": "0xeda8ce",
"transactionHash": "0xd353d33a2a7ae372a146c84f31837534e8f62c29978f4265b87eae6309e885c7",
"transactionIndex": "0x1",
"blockHash": "0x75995c39d9540285df0b37e0969e17e5f9bd8b66efc8f30d747ac7b821c30f9d",
"logIndex": "0x1",
"removed": false
}, {
"address": "0x92d6c1e31e14520e676a687f0a93788b716beff5",
"topics": ["0xa0a19463ee116110c9b282012d9b65cc5522dc38a9520340cbaf3142e550127f", "0x0000000000000000000000006cc5f688a315f3dc28a7781717a9a798a59fda7b"],
"data": "0x000000000000000000000000000000000000000000048f1698f7b37e0d1d2c1b0000000000000000000000000000000000000000000000000000000000000000",
"blockNumber": "0xeda8ce",
"transactionHash": "0xd353d33a2a7ae372a146c84f31837534e8f62c29978f4265b87eae6309e885c7",
"transactionIndex": "0x1",
"blockHash": "0x75995c39d9540285df0b37e0969e17e5f9bd8b66efc8f30d747ac7b821c30f9d",
"logIndex": "0x2",
"removed": false
}, {
"address": "0x92d6c1e31e14520e676a687f0a93788b716beff5",
"topics": ["0xa0a19463ee116110c9b282012d9b65cc5522dc38a9520340cbaf3142e550127f", "0x000000000000000000000000eee399b12eb291ebc43159b96fc5a627d93a8c7a"],
"data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
"blockNumber": "0xeda8ce",
"transactionHash": "0xd353d33a2a7ae372a146c84f31837534e8f62c29978f4265b87eae6309e885c7",
"transactionIndex": "0x1",
"blockHash": "0x75995c39d9540285df0b37e0969e17e5f9bd8b66efc8f30d747ac7b821c30f9d",
"logIndex": "0x3",
"removed": false
}, {
"address": "0x92d6c1e31e14520e676a687f0a93788b716beff5",
"topics": ["0xa0a19463ee116110c9b282012d9b65cc5522dc38a9520340cbaf3142e550127f", "0x0000000000000000000000006cc5f688a315f3dc28a7781717a9a798a59fda7b"],
"data": "0x000000000000000000000000000000000000000000048f1698f7b37e0d1d2c1b0000000000000000000000000000000000000000000000000000000000000001",
"blockNumber": "0xeda8ce",
"transactionHash": "0xd353d33a2a7ae372a146c84f31837534e8f62c29978f4265b87eae6309e885c7",
"transactionIndex": "0x1",
"blockHash": "0x75995c39d9540285df0b37e0969e17e5f9bd8b66efc8f30d747ac7b821c30f9d",
"logIndex": "0x4",
"removed": false
}, {
"address": "0x92d6c1e31e14520e676a687f0a93788b716beff5",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x000000000000000000000000eee399b12eb291ebc43159b96fc5a627d93a8c7a", "0x0000000000000000000000006cc5f688a315f3dc28a7781717a9a798a59fda7b"],
"data": "0x000000000000000000000000000000000000000000000016e06d2c25eed80000",
"blockNumber": "0xeda8ce",
"transactionHash": "0xd353d33a2a7ae372a146c84f31837534e8f62c29978f4265b87eae6309e885c7",
"transactionIndex": "0x1",
"blockHash": "0x75995c39d9540285df0b37e0969e17e5f9bd8b66efc8f30d747ac7b821c30f9d",
"logIndex": "0x5",
"removed": false
}],
"logsBloom": "0x00000000000000008000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000100008000000000400000000000000000000000000000000000000000000000000000000000100000000000400000000000010000000004000000000000000000000000000000000000000000000400000800000000000000000000000000000000000000000000000000000000000000000000000000000100002000000000000000000000000000000000000000810000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x92d6c1e31e14520e676a687f0a93788b716beff5",
"transactionHash": "0xd353d33a2a7ae372a146c84f31837534e8f62c29978f4265b87eae6309e885c7",
"transactionIndex": "0x1",
"type": "0x0"
}, {
"blockHash": "0x75995c39d9540285df0b37e0969e17e5f9bd8b66efc8f30d747ac7b821c30f9d",
"blockNumber": "0xeda8ce",
"contractAddress": null,
"cumulativeGasUsed": "0x4071e",
"effectiveGasPrice": "0x7ea8ed400",
"from": "0x3b25ac165051db527bdcaf685cbc103b039d3724",
"gasUsed": "0xbd6c",
"logs": [{
"address": "0xf17e65822b568b3903685a7c9f496cf7656cc6c2",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x0000000000000000000000003b25ac165051db527bdcaf685cbc103b039d3724", "0x0000000000000000000000006cc5f688a315f3dc28a7781717a9a798a59fda7b"],
"data": "0x0000000000000000000000000000000000000000000000d8298daf4e72a32000",
"blockNumber": "0xeda8ce",
"transactionHash": "0x7837453585c6a1985b38a7232040e43c4753345a2eeb94a719a5b9306deb3682",
"transactionIndex": "0x2",
"blockHash": "0x75995c39d9540285df0b37e0969e17e5f9bd8b66efc8f30d747ac7b821c30f9d",
"logIndex": "0x6",
"removed": false
}],
"logsBloom": "0x00000000000000000000000000000000000000100000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000010000000000000000008000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000400000000004000000080000000000000000000000000000000000000000000000000000000000000000100002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000",
"status": "0x1",
"to": "0xf17e65822b568b3903685a7c9f496cf7656cc6c2",
"transactionHash": "0x7837453585c6a1985b38a7232040e43c4753345a2eeb94a719a5b9306deb3682",
"transactionIndex": "0x2",
"type": "0x0"
},
....