Links

eth_getTransactionReceiptsByBlockNumber

Get all transaction receipts for a given block.

Parameters

Params - a string array containing (required):
  • QUANTITY(hex string|string, required) - integer block number in hex string format.

Returns

Array - Array of objects, or null when no block was found:
  • blockHash(hex string). DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending.
  • blockNumber(hex string). QUANTITY - block number where this transaction was in. null when its pending.
  • from(hex string). DATA, 20 Bytes - address of the sender.
  • to(hex string). DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction.
  • transactionHash(hex string) . DATA, 32 Bytes - hash of the transaction.
  • transactionIndex(hex string). QUANTITY - integer of the transactions index position in the block. null when its pending.
  • cumulativeGasUsed(hex string) . QUANTITY - the total amount of gas used when this transaction was executed in the block.
  • gasUsed(hex string) . QUANTITY - the amount of gas used by this specific transaction alone.
  • contractAddress(hex string) . DATA, 20 Bytes - the contract address created, if the transaction was a contract creation, otherwise null.
  • logs(array of logs objects). Array - array of log objects, which this transaction generated.
  • logsBloom(hex string). DATA, 256 Bytes - bloom filter for light clients to quickly retrieve related logs.
  • status(integer number). QUANTITY - either 1 (success) or 0 (failure).

Example

Request

curl
TypeScript
curl https://api.blockvision.org/v1/<api key> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceiptsByBlockNumber",
"params": [
"0x1675e2e"
],
"id": 1
}'
import { BlockVisionProvider, BvNetwork } from 'blockvision.js'
// Optional parameters, but default to eth-mainnet and default api-key.
const bv = new BlockVisionProvider(BvNetwork.BNB_MAINNET)
// Access BlockVision Enhanced API requests
bv.getTransactionReceiptsByBlockNumber('0x1675e2e').then(console.log)

Result

{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0xf88e6556da34d3cbecb9a212ff1d2ac208efc13fb85fd8f84fa4f26e6e4511b9",
"blockNumber": "0x1675e2e",
"contractAddress": null,
"cumulativeGasUsed": "0xad8e",
"from": "0x34f0431bec239c0828fbcf96c32092e5c926df21",
"gasUsed": "0xad8e",
"logs": [
{
"address": "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82",
"topics": [
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
"0x00000000000000000000000034f0431bec239c0828fbcf96c32092e5c926df21",
"0x00000000000000000000000010ed43c718714eb63d5aa57b78b54704e256024e"
],
"data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"blockNumber": "0x1675e2e",
"transactionHash": "0xf1849018838bdb271a5a476545856c86ec3b84040fa38feece550f7d9e3e3759",
"transactionIndex": "0x0",
"blockHash": "0xf88e6556da34d3cbecb9a212ff1d2ac208efc13fb85fd8f84fa4f26e6e4511b9",
"logIndex": "0x0",
"removed": false
}
],
"logsBloom": "0x00000200000000000000000000000000000000000000000000000000000000000008000000000000000000040000000000000000000000000000000000200000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000002000000000000000020000000000000000000001020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000008000000000000000000000000",
"status": "0x1",
"to": "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82",
"transactionHash": "0xf1849018838bdb271a5a476545856c86ec3b84040fa38feece550f7d9e3e3759",
"transactionIndex": "0x0"
},
{
...
}
]
}