💎 Ethereum
eth_getTransactionReceipt

eth_getTransactionReceipt RPC Method

The eth_getTransactionReceipt Returns the receipt of a transaction if a transaction hash given.

️⚠️

Transaction receipts are not available for pending transactions.

Parameters

transaction hash - The hash of a transaction

Returns

  • Transaction receipt object
    • blockNumber - The block number that contains the transaction.

    • blockHash - The hash of the block that contains the transaction.

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

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

    • 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_getTransactionReceipt","params": ["0x75acaa52f8e75da036709f60e02b29906a59bb292839c2c11f774f70e810e656"],"id":1}'

Body

{
   "jsonrpc": "2.0",
   "id": 1,
   "result": {
      "blockHash": "0xd8b8105a94eb5bb41e66e8ddc19c748588320fdf53c1f475ede959688f403b48",
      "blockNumber": "0x102d4d8",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1230686",
      "effectiveGasPrice": "0x4bb711a75",
      "from": "0x5f927395213ee6b95de97bddcb1b2b1c0f16844f",
      "gasUsed": "0x5208",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xe688b84b23f322a994a53dbf8e15fa82cdb71127",
      "transactionHash": "0x75acaa52f8e75da036709f60e02b29906a59bb292839c2c11f774f70e810e656",
      "transactionIndex": "0x98",
      "type": "0x0"
   }
}

Need RPC API keys?

Get 12.5M archival requests for free today.