Skip to main content
Version: Next

eth_getTransactionReceipt

If a block of the canonical chain includes the transaction, the result is its receipt in that block. Otherwise, the result is null, also when the transaction pool holds the transaction. The result never names a block that is not canonical, such as a block dropped by a chain reorganization.

Returns the receipt of a transaction by transaction hash.

Parameters (by position)​

Transaction hash string required


Result​

Receipt information null or object


Show Option 1 Not Found (null) null

Not Found (null) fields​

Receipt information null

Not Found (null)


Show Option 2 Receipt information object

Receipt information fields​

Receipt information object

Receipt information


Show Receipt information object

Receipt information fields​

  • blobGasPrice string

    The actual value per gas deducted from the sender's account for blob gas. Only specified for blob transactions as defined by EIP-4844.

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • blobGasUsed string

    The amount of blob gas used for this specific transaction. Only specified for blob transactions as defined by EIP-4844.

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • blockHash string required

    block hash

    Match pattern: ^0x[0-9a-f]{64}$


  • blockNumber string required

    block number

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • contractAddress string or null

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


    Show Option 1 hex encoded address string

    hex encoded address fields​

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

    contractAddress string

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

    Match pattern: ^0x[0-9a-fA-F]{40}$


    Show Option 2 Null null

    Null fields​

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

    contractAddress null

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


  • cumulativeGasUsed string required

    The sum of gas used by this transaction and all preceding transactions in the same block.

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • effectiveGasPrice string required

    The actual value per gas deducted from the sender's account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas).

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • from string required

    from

    Match pattern: ^0x[0-9a-fA-F]{40}$


  • gasUsed string required

    The amount of gas used for this specific transaction alone.

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • logs array<object> required

    log


    Show logs object

    logs fields​

    • address string required

      address

      Match pattern: ^0x[0-9a-fA-F]{40}$


    • blockHash string

      block hash

      Match pattern: ^0x[0-9a-f]{64}$


    • blockNumber string

      block number

      Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


    • blockTimestamp string

      block timestamp

      Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


    • data string required

      data

      Match pattern: ^0x([0-9a-f]{2})*$


    • logIndex string

      log index

      Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


    • removed boolean

      removed


    • topics array<string> required

      32 hex encoded bytes

      Match pattern: ^0x[0-9a-f]{64}$


    • transactionHash string required

      transaction hash

      Match pattern: ^0x[0-9a-f]{64}$


    • transactionIndex string

      transaction index

      Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


    • additionalProperties false


  • logsBloom string required

    logs bloom

    Match pattern: ^0x[0-9a-f]{512}$


  • root string

    The post-transaction state root. Only specified for transactions included before the Byzantium upgrade.

    Match pattern: ^0x[0-9a-f]{64}$


  • status string

    Either 1 (success) or 0 (failure). Only specified for transactions included after the Byzantium upgrade.

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • to null or string

    Address of the receiver or null in a contract creation transaction.


    Show Option 1 Contract Creation (null) null

    Contract Creation (null) fields​

    Address of the receiver or null in a contract creation transaction.

    to null

    Address of the receiver or null in a contract creation transaction.


    Show Option 2 Recipient Address string

    Recipient Address fields​

    Address of the receiver or null in a contract creation transaction.

    to string

    Address of the receiver or null in a contract creation transaction.

    Match pattern: ^0x[0-9a-fA-F]{40}$


  • transactionHash string required

    transaction hash

    Match pattern: ^0x[0-9a-f]{64}$


  • transactionIndex string required

    transaction index

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • type string

    type

    Match pattern: ^0x[0-9a-f]{1,2}$


  • additionalProperties false


Errors​

Error code: 4444

  • code

    4444

  • message

    Pruned history unavailable

Examples​

eth_getTransactionReceipt example

Request​

{
"params": [
"0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
]
}

Response​

{
"blobGasPrice": "0x3",
"blobGasUsed": "0x20000",
"blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
"blockNumber": "0x50",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1",
"from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
"transactionHash": "0xc00e97af59c6f88de163306935f7682af1a34c67245e414537d02e422815efc3",
"transactionIndex": "0x0"
}