eth_getTransactionReceipt-polygon

Returns the receipt of a transaction by transaction hash.

๐Ÿšง

The receipt is not available for pending transactions.

Parameters

  • DATA, 32 Bytes - hash of a transaction
curl https://polygon-mainnet-archive.allthatnode.com/8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj \
--request POST \
--header "Content-Type: application/json" \
--data '{
    "jsonrpc":"2.0",
    "id":1,
    "method":"eth_getTransactionReceipt",
    "params":[
        "0xf51da80447a90eefccf990f7382cef349d5f91fd896211c87338526eb6ebb359"
    ]
}'

Returns

  • Object - A transaction receipt object, or null when no receipt was found:
    • transactionHash : DATA, 32 Bytes - hash of the transaction.
    • transactionIndex: QUANTITY - integer of the transactions index position in the block.
    • blockHash: DATA, 32 Bytes - hash of the block where this transaction was in.
    • blockNumber: QUANTITY - block number where this transaction was in.
    • from: DATA, 20 Bytes - address of the sender.
    • to: DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction.
    • cumulativeGasUsed : QUANTITY - The total amount of gas used when this transaction was executed in the block.
    • effectiveGasPrice : QUANTITY - The sum of the base fee and tip paid per unit of gas.
    • gasUsed : QUANTITY - The amount of gas used by this specific transaction alone.
    • contractAddress : DATA, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null.
    • logs: Array - Array of log objects, which this transaction generated.
    • logsBloom: DATA, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs.
    • type: QUANTITY - integer of the transaction type, 0x0 for legacy transactions, 0x1 for access list types, 0x2 for dynamic fees.
  • It also returns either :
    • root : DATA 32 bytes of post-transaction stateroot (pre Byzantium)
    • status: QUANTITY either 1 (success) or 0 (failure)
{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "blockHash": "0xfad52748fecb201cfb2f0d1e64c60cddd8a5763dfd450334f526543161d71482",
    "blockNumber": "0x2f8e24a",
    "contractAddress": null,
    "cumulativeGasUsed": "0x77eb9f",
    "effectiveGasPrice": "0xf89c9b666",
    "from": "0x8aa78a2b3752a605af5d8a13cb99ffd0493c45aa",
    "gasUsed": "0x5208",
    "logs": [
      {
        "address": "0x0000000000000000000000000000000000001010",
        "topics": [
          "0xe6497e3ee548a3372136af2fcb0696db31fc6cf20260707645068bd3fe97f3c4",
          "0x0000000000000000000000000000000000000000000000000000000000001010",
          "0x0000000000000000000000008aa78a2b3752a605af5d8a13cb99ffd0493c45aa",
          "0x000000000000000000000000999dc5365347d15c147ebdae40c0169861ee5185"
        ],
        "data": "0x00000000000000000000000000000000000000000000000004db73254763000000000000000000000000000000000000000000000000000005ed577f22f2eba200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111e459db8feba200000000000000000000000000000000000000000000000004db732547630000",
        "blockNumber": "0x2f8e24a",
        "transactionHash": "0xf51da80447a90eefccf990f7382cef349d5f91fd896211c87338526eb6ebb359",
        "transactionIndex": "0x23",
        "blockHash": "0xfad52748fecb201cfb2f0d1e64c60cddd8a5763dfd450334f526543161d71482",
        "logIndex": "0x2d9",
        "removed": false
      },
      {
        "address": "0x0000000000000000000000000000000000001010",
        "topics": [
          "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
          "0x0000000000000000000000000000000000000000000000000000000000001010",
          "0x0000000000000000000000008aa78a2b3752a605af5d8a13cb99ffd0493c45aa",
          "0x000000000000000000000000127685d6dd6683085da4b6a041efcef1681e5c9c"
        ],
        "data": "0x00000000000000000000000000000000000000000000000000023cfb4e35600000000000000000000000000000000000000000000000000005f2521e0dad4ad20000000000000000000000000000000000000000000004f4e3823ca947fa953100000000000000000000000000000000000000000000000005f01522bf77ead20000000000000000000000000000000000000000000004f4e38479a4962ff531",
        "blockNumber": "0x2f8e24a",
        "transactionHash": "0xf51da80447a90eefccf990f7382cef349d5f91fd896211c87338526eb6ebb359",
        "transactionIndex": "0x23",
        "blockHash": "0xfad52748fecb201cfb2f0d1e64c60cddd8a5763dfd450334f526543161d71482",
        "logIndex": "0x2da",
        "removed": false
      }
    ],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000020000000100000000000008000000000000000000000200000000000000000000000000000000000800000000000000000000100004000000000000000000000000001000000000000000000000000000080000000000000000000400000000000000000000000000000000000000000000000000000000000200000040000000000000000000000000000000000000000000000000000004000000000000000000001000000000000080000000000800000108000000000000000000000000000000000000000000000000000000004000000000000100020",
    "status": "0x1",
    "to": "0x999dc5365347d15c147ebdae40c0169861ee5185",
    "transactionHash": "0xf51da80447a90eefccf990f7382cef349d5f91fd896211c87338526eb6ebb359",
    "transactionIndex": "0x23",
    "type": "0x2"
  }
}

Try Yourself

Language
Click Try It! to start a request and see the response here!