eth_getBlockReceipts

Returns all transactions receipts for a given block displaying the transaction details.

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

  1. 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 objects

    • blockHash - The hash of the block. null when pending

    • blockNumber - The block number

    • contractAddress- The contract address created if the transaction was a contract creation, otherwise null

    • cumulativeGasUsed-The total amount of gas used when this transaction was executed in the block

    • effectiveGasPrice-The actual value per gas deducted from the sender account

    • from-The address of the sender

    • gasUsed-The amount of gas used by this specific transaction alone

    • logs- An array of log objects that generated this transaction

      • address-An address from which this log originated

      • topics- 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 specifier

      • data- It contains one or more 32 Bytes non-indexed arguments of the log

      • blockNumber -The block number where this log was in. null when its a pending log

      • transactionHash -The hash of the transactions this log was created from. null when its a pending log

      • transactionIndex -The integer of the transaction's index position that the log was created from. null when it's a pending log

      • blockHash -The hash of the block where this log was in. null when its a pending log

      • logIndex -The integer of the log index position in the block. null when its a pending log

      • removed - 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 logs

    • status -It is either 1 (success) or 0 (failure) encoded as a hexadecimal

    • to -The address of the receiver. null when it's a contract creation transaction

    • transactionHash -The hash of the transaction

    • transactionIndex - An index of the transaction in the block

    • type -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"
    }, 
    ....

Last updated