eth_getTransactionReceipt
Returns the receipt of a transaction by transaction hash. This can also be used to track the status of a transaction, since result will be null until the transaction is mined. However, unlike eth_getT

Parameters

DATA, 32 Bytes - hash of a transaction
1
params: [
2
'0x9ee9891518b06f4b5bf76a4bef4ba6d93e8d38a17b7aaad492f5555865da7dbb'
3
]
Copied!

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.
  • 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.
It also returns either:
  • root : DATA 32 bytes of post-transaction stateroot (pre Byzantium)
  • status: QUANTITY either 1 (success) or 0 (failure)

Example

​Alchemy Composer​

The Alchemy Composer allows you to make a no-code example request via your browser. Try it out above!

Request

Curl
Postman
1
curl https://polygon-mainnet.g.alchemyapi.io/v2/your-api-key \
2
-X POST \
3
-H "Content-Type: application/json" \
4
-d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x9ee9891518b06f4b5bf76a4bef4ba6d93e8d38a17b7aaad492f5555865da7dbb"],"id":0}
Copied!
1
URL: https://polygon-mainnet.g.alchemyapi.io/v2/your-api-key
2
RequestType: POST
3
Body:
4
{
5
"jsonrpc":"2.0",
6
"method":"eth_getTransactionReceipt",
7
"params":["0x9ee9891518b06f4b5bf76a4bef4ba6d93e8d38a17b7aaad492f5555865da7dbb"],
8
"id":0
9
}
Copied!

Result

1
{
2
"jsonrpc": "2.0",
3
"id": 0,
4
"result": {
5
"blockHash": "0x6357724a8ccd4dc6f175267395466c005be8ca70f1a67d2232774e8b0fb968ae",
6
"blockNumber": "0xf8ff26",
7
"contractAddress": null,
8
"cumulativeGasUsed": "0x24cf9c",
9
"from": "0x0e11795884b28b08f9978bb85938280967cda041",
10
"gasUsed": "0x303ab",
11
"logs": [
12
{
13
"address": "0x4d97dcd97ec945f40cf65f87097ace5ea0476045",
14
"topics": [
15
"0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb",
16
"0x000000000000000000000000cf5cea15e49b33b70a0bef2d42a46425c54c80a1",
17
"0x000000000000000000000000cf5cea15e49b33b70a0bef2d42a46425c54c80a1",
18
"0x0000000000000000000000000000000000000000000000000000000000000000"
19
],
20
"data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002cb4e96cda2b16481b25e3d2b2cab2bd5c74e15de2495d5f78aa3b3fab67f94b87815b4e593d58ca91f171be3dd89ee2005a61df0a00445b8411dda6564c36ed0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000067d109f00000000000000000000000000000000000000000000000000000000067d109f",
21
"blockNumber": "0xf8ff26",
22
"transactionHash": "0x9ee9891518b06f4b5bf76a4bef4ba6d93e8d38a17b7aaad492f5555865da7dbb",
23
"transactionIndex": "0xc",
24
"blockHash": "0x6357724a8ccd4dc6f175267395466c005be8ca70f1a67d2232774e8b0fb968ae",
25
"logIndex": "0x63",
26
"removed": false
27
}
28
],
29
"logsBloom": "0x04000000020000000000000000000000000000000000000000000000002040000000000000000000000000000000000010008000000000000000000100000040000000000000000000000008000600800000000000000000002100000002000000000000020000000000000000000800000000000800000180000112000000000001000002000000000080000000000000100000020010000000000000000000200000000400800000000000000001000000000000000000000000000000024000000042000000000001800000000000000404000400000000180000000020000800008000000000040000000000000000000020000000000000000002100002",
30
"status": "0x1",
31
"to": "0xd216153c06e857cd7f72665e0af1d7d82172f494",
32
"transactionHash": "0x9ee9891518b06f4b5bf76a4bef4ba6d93e8d38a17b7aaad492f5555865da7dbb",
33
"transactionIndex": "0xc",
34
"type": "0x0"
35
}
36
}
Copied!
Last modified 27d ago