API Reference

eth_getTransactionReceipt - DogeOS

Returns the receipt of a transaction by transaction hash.

Returns the receipt of a transaction by transaction hash. This can also be used to track the status of a transaction, since the result will be null until the transaction is mined. However, unlike eth_getTransactionByHash, which returns null for unknown transactions, and a non-null response with 3 null fields for a pending transaction, eth_getTransactionReceipt returns null for both pending and unknown transactions.

This call is also commonly used to get the contract address for a contract creation transaction.

Note: The receipt is not available for pending transactions.

PARAMETERS

Transaction Hash - (required) A 32-byte hash of a transaction.

REQUEST

{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x493650c1985b3bd12dccb9a70edaa6cd70366d0acdb13af5343c1a31f1272aa9"
  ],
  "id": 0
}

RESPONSE

Result - A transaction receipt object, or null when no receipt was found:

  • transactionHash - Hash of the transaction.
  • transactionIndex - An integer of the transaction's index position in the block.
  • blockHash - Hash of the block where this transaction was in.
  • blockNumber - Block number where this transaction was in.
  • from - Address of the sender.
  • to - Address of the receiver. null when it's a contract creation transaction.
  • cumulativeGasUsed - The total amount of gas used when this transaction was executed in the block.
  • gasUsed - The amount of gas used by this specific transaction alone.
  • contractAddress - The contract address created, if the transaction was a contract creation, otherwise null.
  • logs - An array of log objects, which this transaction generated.
  • logsBloom - A bloom filter for light clients to quickly retrieve related logs.
  • root - 32 bytes of post-transaction stateroot (pre-Byzantium).
  • status - 1 (success) or 0 (failure).
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": {
    "blockHash": "0xc3826b13f837595ca9141a32a2f1472d2bcf6e6db76b9df6956d5e1af7da5ed2",
    "blockNumber": "0x2fa00",
    "contractAddress": null,
    "cumulativeGasUsed": "0xa21b",
    "effectiveGasPrice": "0xef426c",
    "from": "0x871f1181aa63c988325539cf4b502e092595b50e",
    "gasUsed": "0xa21b",
    "l1Fee": "0xee",
    "logs": [
      {
        "address": "0x5300000000000000000000000000000000000002",
        "topics": [
          "0x351fb23757bb5ea0546c85b7996ddd7155f96b939ebaa5ff7bc49c75f27f2c44"
        ],
        "data": "0x000000000000000000000000000000000000000000000000000000000016e360",
        "blockNumber": "0x2fa00",
        "transactionHash": "0x493650c1985b3bd12dccb9a70edaa6cd70366d0acdb13af5343c1a31f1272aa9",
        "transactionIndex": "0x0",
        "blockHash": "0xc3826b13f837595ca9141a32a2f1472d2bcf6e6db76b9df6956d5e1af7da5ed2",
        "logIndex": "0x0",
        "removed": false
      },
      {
        "address": "0x5300000000000000000000000000000000000002",
        "topics": [
          "0x9a14bfb5d18c4c3cf14cae19c23d7cf1bcede357ea40ca1f75cd49542c71c214"
        ],
        "data": "0x0000000000000000000000000000000000000000000000000000000004679ef9",
        "blockNumber": "0x2fa00",
        "transactionHash": "0x493650c1985b3bd12dccb9a70edaa6cd70366d0acdb13af5343c1a31f1272aa9",
        "transactionIndex": "0x0",
        "blockHash": "0xc3826b13f837595ca9141a32a2f1472d2bcf6e6db76b9df6956d5e1af7da5ed2",
        "logIndex": "0x1",
        "removed": false
      }
    ],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000900000000000000000000000000000000000000000000000000000000000000000000000001000000008000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000020000000000000000000",
    "status": "0x1",
    "to": "0x5300000000000000000000000000000000000002",
    "transactionHash": "0x493650c1985b3bd12dccb9a70edaa6cd70366d0acdb13af5343c1a31f1272aa9",
    "transactionIndex": "0x0",
    "type": "0x2"
  }
}
Language
Click Try It! to start a request and see the response here!