Skip to main content

eth_getTransactionReceipt

Overview

The 'eth_getTransactionReceipt' method returns the receipt of a transaction given its transaction hash. Please note that the receipt is not available for pending transactions.

Request

curl --request POST \
--url https://coinapi.io/v1/ethereum \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header "X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY"
--data '
{
"id": 1,
"jsonrpc": "2.0",
"params": [
"0x8fc90a6c3ee3001cdcbbb685b4fbe67b1fa2bec575b15b0395fea5540d0901ae"
],
"method": "eth_getTransactionReceipt"
}'

Request Parameters

  • 'transaction hash': [Required] A string representing the hash (32 bytes) of a transaction.

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x8fc90a6c3ee3001cdcbbb685b4fbe67b1fa2bec575b15b0395fea5540d0901ae",
"blockHash": "0x58a945e1558810523df00490ff28cbe111b37851c44679ce5be1eeaebb4b4907",
"blockNumber": "0xeb8822",
"logs": [
{
"transactionHash": "0x8fc90a6c3ee3001cdcbbb685b4fbe67b1fa2bec575b15b0395fea5540d0901ae",
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"blockHash": "0x58a945e1558810523df00490ff28cbe111b37851c44679ce5be1eeaebb4b4907",
"blockNumber": "0xeb8822",
"data": "0x000000000000000000000000000000000000000000000000000000001debea42",
"logIndex": "0x6c",
"removed": false,
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000005067c042e35881843f2b31dfc2db1f4f272ef48c",
"0x0000000000000000000000003ee18b2214aff97000d974cf647e7c347e8fa585"
],
"transactionIndex": "0x4e"
},
{
"transactionHash": "0x8fc90a6c3ee3001cdcbbb685b4fbe67b1fa2bec575b15b0395fea5540d0901ae",
"address": "0x98f3c9e6e3face36baad05fe09d375ef1464288b",
"blockHash": "0x58a945e1558810523df00490ff28cbe111b37851c44679ce5be1eeaebb4b4907",
"blockNumber": "0xeb8822",
"data": "0x000000000000000000000000000000000000000000000000000000000001371e000000000000000000000000000000000000000000000000000000006eca00000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000008501000000000000000000000000000000000000000000000000000000001debea42000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000267c46aa713cfe47608dd1c16f8a0325208df084c3cbebf9f366ad0eafc2653e4000100000000000000000000000000000000000000000000000000000000001e8542000000000000000000000000000000000000000000000000000000",
"logIndex": "0x6d",
"removed": false,
"topics": [
"0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2",
"0x0000000000000000000000003ee18b2214aff97000d974cf647e7c347e8fa585"
],
"transactionIndex": "0x4e"
}
],
"contractAddress": null,
"effectiveGasPrice": "0x2d7003407",
"cumulativeGasUsed": "0x76c649",
"from": "0x5067c042e35881843f2b31dfc2db1f4f272ef48c",
"gasUsed": "0x1a14b",
"logsBloom": "0x00000000000100000000008000000000000000000000000000000000000000000010000000000000001000000000000000000000000000000000000000000000000000000000000008008008000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000010000000000000000000000000000000000000000000000000010002000000000000000400000000000400200001000000000000000000000000040000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000",
"status": "0x1",
"to": "0x3ee18b2214aff97000d974cf647e7c347e8fa585",
"transactionIndex": "0x4e",
"type": "0x0"
}
}

A transaction receipt object, or 'null' when no receipt was found. The transaction receipt object will contain the following keys and their values:

  • 'blockHash': 32 bytes. Hash of the block including this transaction.
  • 'blockNumber': Block number including this transaction.
  • 'contractAddress': 20 bytes. 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's account. Before EIP-1559, equal to the gas price.
  • 'from': 20 bytes. The address of the sender.
  • 'gasUsed': The amount of gas used by this specific transaction alone.
  • 'logs': (Array) An array of log objects generated by this transaction.
  • 'logsBloom': 256 bytes. Bloom filter for light clients to quickly retrieve related logs.
  • One of the following:
    • 'root': 32 bytes of post-transaction stateroot (pre-Byzantium)
    • 'status': Either 1 (success) or 0 (failure)
  • 'to': 20 bytes. The address of the receiver. null when the transaction is a contract creation transaction.
  • 'transactionHash': 32 bytes. The hash of the transaction.
  • 'transactionIndex': Hexadecimal of the transaction's index position in the block.
  • 'type': The transaction type.