eth_getTransactionByHash

Returns the information about a transaction requested by transaction hash.

Parameters:

DATA, 32 Bytes - hash of a transaction

Returns:

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

  • 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.

  • gas: QUANTITY - gas provided by the sender.

  • gasPrice: QUANTITY - gas price provided by the sender in Wei.

  • hash: DATA, 32 Bytes - hash of the transaction.

  • input: DATA - the data send along with the transaction.

  • nonce: QUANTITY - the number of transactions made by the sender prior to this one.

  • to: DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction.

  • transactionIndex: QUANTITY - integer of the transactions index position in the block.

  • value: QUANTITY - value transferred in Wei.

  • v: QUANTITY - ECDSA recovery id

  • r: DATA, 32 Bytes - ECDSA signature r

  • s: DATA, 32 Bytes - ECDSA signature s

Example:

// Request
curl https://celo.blockpi.network/v1/rpc/your-rpc-key -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x590ea494ea5b17934ceba75a24cb0b11bf107a419d3864da9562c3190f4753af"],"id":1}'

// Result
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0xff63ea7998b11170179aeb65dad9b137a36dea2a99bd97999cc2eee4ccbf0efc",
        "blockNumber": "0x1aef73c",
        "from": "0x1fec2690c9d65e5eeb8c481bbb7c5780f2d251a4",
        "gas": "0x200bb9",
        "gasPrice": "0x143a75105e",
        "feeCurrency": null,
        "gatewayFeeRecipient": null,
        "gatewayFee": "0x0",
        "hash": "0x590ea494ea5b17934ceba75a24cb0b11bf107a419d3864da9562c3190f4753af",
        "input": "0xc6427474000000000000000000000000e04f2d98e265daa98bd674e4d340e3d0348617a20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000005e40862d12f00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000076d41c624948400000000000000000000000000000000000000000000000000076ea50b9cf20e00000000000000000000000000005b95c32d4861538de7cbc10d52f2cb30d3a1340300000000000000000000000000000000000000000000000000000000670cc9410000000000000000000000000000000000000000000000000000000000000007000000000000000000000000471ece3750da237f93b8e339c536989b8978a438000000000000000000000000ceba9300f2b948710d2653dd7b07f33a8b32118c000000000000000000000000765de816845861e75a25fca122bb6898b8b1282a000000000000000000000000471ece3750da237f93b8e339c536989b8978a43800000000000000000000000048065fbbe25f71c9282ddf5e1cd6d6a887483d5e000000000000000000000000d8763cba276a3738e6de85b4b3bf5fded6d6ca73000000000000000000000000471ece3750da237f93b8e339c536989b8978a438000000000000000000000000000000000000000000000000000000000000000600000000000000000000000017e9175797ecd03a7fbdcb1503fd777bf883db5300000000000000000000000090d2986ab3e2b08afe7d7a5e0e0302b7b2464aec00000000000000000000000090d2986ab3e2b08afe7d7a5e0e0302b7b2464aec00000000000000000000000017e9175797ecd03a7fbdcb1503fd777bf883db5300000000000000000000000017e9175797ecd03a7fbdcb1503fd777bf883db5300000000000000000000000090d2986ab3e2b08afe7d7a5e0e0302b7b2464aec000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000014a1777e082fa1746eb78dd9c1fbb515419cf6e5380000000000000000000000000000000000000000000000000000000000000000000000000000000000000048777a8255ca72412f0d706dc03c9d1987306b4cad22d9db95e6ae61c104a7b6f6c78d7993b94ec901acc988382b66ee5456086643dcfd9a5ca43dd8f428f6ef22503d8b8013bcffd70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000048777a8255ca72412f0d706dc03c9d1987306b4cad22d9db95e6ae61c104a7b6f6c78d7993b94ec9013135b662c38265d0655177091f1b647b4fef511103d06c016efdf18b46930d2c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000146cde5f5a192fbf3fd84df983aa6dc30dbd9f8fac0000000000000000000000000000000000000000000000000000000000000000000000000000000000000014628cb3a5a206956423d158009612813b64b19dab0000000000000000000000000000000000000000000000000000000000000000000000000000000000000048777a8255ca72412f0d706dc03c9d1987306b4cad22d9db95e6ae61c104a7b6f6c78d7993b94ec901b73ffc6b5123de3c8e460490543ab93a3be7d70824f1666343df49e219199b8c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "nonce": "0x8a553",
        "to": "0x5b95c32d4861538de7cbc10d52f2cb30d3a13403",
        "transactionIndex": "0x0",
        "value": "0x0",
        "type": "0x0",
        "v": "0x149fc",
        "r": "0xf0ba56e8f280e735627c38ebc99af0946bd9a40d06a2376035b051993542e9b9",
        "s": "0x4cc308cbb44c6f190ff30d59c43b24e096d41b323bd7083d37cd01e972383129",
        "ethCompatible": false
    }
}

Last updated