💎 Ethereum
eth_getBlockReceipts

eth_getBlockReceipts RPC Method

The eth_getBlockReceipts returns the receipts of all transactions included in a block, as well as the block header.

️🚫

This method is currently only supported on Ethereum Mainnet.

Parameters

blockNumber/blockHash or Tag [required] - String Hexadecimal block number or block hash or "latest", "earliest", "pending", "safe" or "finalized"

"Safe" and "finalized" are only availible on Ethereum and Arbitrum One chains. Read block parameter description (opens in a new tab).

Returns

  • An array of objects
    • blockNumber - The number of the block where this receipt originates.

    • blockHash 32 Bytes - The hash of the block where this receipt originates. null when pending.

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

    • effectiveGasPrice - The final gas price of the transaction.

    • cumulativeGasUsed - The total amount of gas used during this transaction.

    • from - The address of the sender.

    • gasUsed - The amount of gas used by this transaction, not counting internal transactions, calls or delegate calls.

    • logs - Array - The logs that were generated during this transaction.

      • address - The address this log originated from.
      • data - All 32 Bytes hex encoded non-indexed arguments of the log.
      • topics - An array of zero to four hex encoded 32 Bytes DATA of indexed log parameters. 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.
      • blockNumber 20 Bytes - The block number where the transaction of this log was included. null when it’s a pending transaction.
      • transactionHash - The hash of the transaction this log originated from. null when it’s a pending transaction.
      • transactionIndex - The position of the transaction where this log originates from. null when it's a pending transaction.
      • blockHash - The block hash where the transaction of this log was included. null when it’s a pending transaction.
      • logIndex - The position of the log in the block. null when it’s a pending transaction.
      • removed - It is true if a chain re-org removed this log, false otherwise.
    • logsBloom - The bloom filter for all logs in this block.

    • status - 1 if the transaction succeeded, 0 if it failed.

    • to - The address of the receiver of the transaction. null for contract creation transactions.

    • transactionHash - The position of this transaction.

    • transactionIndex - An index of the transaction in the block.

    • type - The transaction type.

Request

POST https://<network>.chainnodes.org/YOUR-API-KEY

Example

💡

Confusing? Ask blockchain developers in Chainnodes Telegram Chat (opens in a new tab)

  • HTTPS POST Request with a JSON RPC call in the body
  • Replace YOUR-API-KEY with the API key from your Chainnodes.org Dashboard
  • You can use a different supported network by replacing mainnet
curl https://mainnet.chainnodes.org/YOUR-API-KEY\
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getBlockReceipts","params": ["0x1029C88",false],"id":1}'

Body

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {"jsonrpc":"2.0", "id":1,"result":[{"blockHash":"0xc529628a946ecf86acfaff0251aeae15ca2563c5aaf7b4872609b84f6f396c99",
  "blockNumber":"0x1029c88","contractAddress":null,
  "cumulativeGasUsed":"0x1fa5d",
  "effectiveGasPrice":"0x6f664d776","from":"0x431b5a84acc1297eda88259f300262f1bc3a74f3"
  ,"gasUsed":"0x1fa5d",
  "logs":[{"address":"0x5283d291dbcf85356a21ba090e6db59121208b44",
  "topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x00000000000000000000000092ab871abb9d567aa276b2ce58d0203d84e0181e","0x000000000000000000000000a69babef1ca67a37ffaf7a485dfff3382056e78c"],"data":"0x0000000000000000000000000000000000000000000001f3ea1efc75d471eef1","blockNumber":"0x1029c88","transactionHash":"0xb19f38ce6f75b23a0d4b25f1ebb876dffb5041ece000628366a66420f5d80c36","transactionIndex":"0x0","blockHash":"0xc529628a946ecf86acfaff0251aeae15ca2563c5aaf7b4872609b84f6f396c99","logIndex":"0x0","removed":false},{"address":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x000000000000000000000000a69babef1ca67a37ffaf7a485dfff3382056e78c","0x00000000000000000000000092ab871abb9d567aa276b2ce58d0203d84e0181e"],"data":"0x000000000000000000000000000000000000000000000000000000015bdbb831","blockNumber":"0x1029c88","transactionHash":"0xb19f38ce6f75b23a0d4b25f1ebb876dffb5041ece000628366a66420f5d80c36","transactionIndex":"0x0","blockHash":"0xc529628a946ecf86acf .....

Need RPC API keys?

Get 12.5M archival requests for free today.