For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

Elysium: web3, net, eth (3/3)

API reference for Elysium. All methods ->

Part 3 of 3: 1 · 2 · 3

eth_getTransactionReceipt​

Returns the receipt of a transaction by transaction hash.

The receipt is not available for pending transactions.

Parameters​


  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array):

    1. <string> (data, 32 bytes): a hash of the transaction.

Returns​


  • object: a transaction receipt object, or null when no receipt was found:

    • transactionHash (string; data, 32 bytes): a hash of the transaction.

    • transactionIndex (string; quantity): the transactions index position in the block.

    • blockHash (string; data, 32 bytes): a hash of the block containing the transaction.

    • blockNumber (string; quantity): a number of the block containing the transaction.

    • from (string; data, 20 bytes): an address of the sender.

    • to (string; data, 20 bytes): an address of the receiver; null when it's a contract creation transaction.

    • cumulativeGasUsed (string; quantity): the total amount of gas used when this transaction was executed in the block.

    • effectiveGasPrice (string; quantity): the sum of the base fee and tip paid per unit of gas.

    • gasUsed (string; quantity): the amount of gas used by this specific transaction alone.

    • contractAddress (string; data, 20 bytes): the contract address created, if the transaction was a contract creation, otherwise null.

    • logs (array): an array of log objects, which this transaction generated.

    • logsBloom (string; data, 256 bytes): a bloom filter for light clients to quickly retrieve related logs.

    • type (string; data): the transaction type, 0x00 for legacy transactions, 0x01 for access list types, 0x02 for dynamic fees. It also returns either of the following:

      • root (string; data, 32 bytes): a post-transaction stateroot (pre Byzantium).
      • status (string; quantity): either 1 (success) or 0 (failure).

Request example​

curl -X POST https://rpc.ankr.com/elysium/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": [
"0x19d264a1a225a156fc7641b64d4c93b1a4c54218adf5b27b68132386e3d3db47"
],
"id": 1
}'

Response example​

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0xe44356bd746eb5fb5ae23acde9397bda8411964300acb65525e21a4d09fef28f",
"blockNumber": "0x3f0598",
"contractAddress": null,
"cumulativeGasUsed": "0xad9c",
"effectiveGasPrice": "0x1dd8d6b0",
"from": "0x57685cf5f4baac990e5a99754f03ed0c2b21c522",
"gasUsed": "0xad9c",
"gasUsedForL1": "0x0",
"l1BlockNumber": "0x308bfe5",
"logs": [
{
"address": "0xb47c4c8f73f009cc0c0d3f92b388d13e293f0b65",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000057685cf5f4baac990e5a99754f03ed0c2b21c522",
"0x000000000000000000000000b660aced9b205f53701af8d6d3b0795d24196fec"
],
"data": "0x000000000000000000000000000000000000000000000000000000000000c350",
"blockNumber": "0x3f0598",
"transactionHash": "0x19d264a1a225a156fc7641b64d4c93b1a4c54218adf5b27b68132386e3d3db47",
"transactionIndex": "0x1",
"blockHash": "0xe44356bd746eb5fb5ae23acde9397bda8411964300acb65525e21a4d09fef28f",
"blockTimestamp": "0x6af3436e",
"logIndex": "0x0",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000002000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000080000000000000000000000000000000800000000000020000002000000008000000000000000000000000000000000000000100000000000000000000000000100000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0xb47c4c8f73f009cc0c0d3f92b388d13e293f0b65",
"transactionHash": "0x19d264a1a225a156fc7641b64d4c93b1a4c54218adf5b27b68132386e3d3db47",
"transactionIndex": "0x1",
"type": "0x2"
}
}