eth_getTransactionReceipt -Polygon
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_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 tx.
Note: the receipt is not available for pending transactions.
Parameters
DATA, 32 Bytes - hash of a transaction
params: [
'0x1bdff6b39cd8a3de4c4b61435da83014696d788f6e52672333471aa4d329bb19'
]
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:
  • status: QUANTITY either 1 (success) or 0 (failure)
Request example
Curl
Postman
curl https://polygon.api.watchdata.io/node/jsonrpc?api_key=your_api_key
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x1bdff6b39cd8a3de4c4b61435da83014696d788f6e52672333471aa4d329bb19"],"id":0}
URL: https://polygon.api.watchdata.io/node/jsonrpc?api_key=your_api_key
RequestType: POST
Body:
{
"jsonrpc":"2.0",
"method":"eth_getTransactionReceipt",
"params":["0x1bdff6b39cd8a3de4c4b61435da83014696d788f6e52672333471aa4d329bb19"],
"id":0
}
Result
{
"jsonrpc": "2.0",
"id": 0,
"result": [
{
"blockHash": "0xacc1dbcf67e80f1898c55a7093cf12f6425c29d9bf6481044587443166e6b923",
"blockNumber": "0x1d765ac",
"contractAddress": null,
"cumulativeGasUsed": "0x1249a5e",
"from": "0xaa26d58df560fad003738596a3a2bf9c910bfb2b",
"gasUsed": "0x24f0c",
"status": "0x1",
"logsBloom": "0x00000000000000000000000000000000000000000000000004000000000000000020000800000000000008000000000000008000000000000000000000000000000000000000000000000008000000800000000000000000000100000000000000000000020000000000000000000800000000000000000080000010000000000000000000000000000040002000000000000000000000000000000000000000200000000000800000000000000000000000000000000000000000000000004000000002000000000001800000000000000000200000000000100000000020000000002000000000000000000000000010000000000000000000000000100002",
"to": "0x4e8966f70fb15f2dfd636610aaa8414dc573a61a",
"transactionHash": "0x1bdff6b39cd8a3de4c4b61435da83014696d788f6e52672333471aa4d329bb19",
"transactionIndex": "0x78",
"logs": [
{
"address": "0x4e8966f70fb15f2dfd636610aaa8414dc573a61a",
"blockHash": "0xacc1dbcf67e80f1898c55a7093cf12f6425c29d9bf6481044587443166e6b923",
"blockNumber": "0x1d765ac",
"data": "0x",
"logIndex": "0x220",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000aa26d58df560fad003738596a3a2bf9c910bfb2b",
"0x000000000000000000000000000000000000000000000000000000000000c7be"
],
"transactionHash": "0x1bdff6b39cd8a3de4c4b61435da83014696d788f6e52672333471aa4d329bb19",
"transactionIndex": "0x78"
},
{
"address": "0x0000000000000000000000000000000000001010",
"blockHash": "0xacc1dbcf67e80f1898c55a7093cf12f6425c29d9bf6481044587443166e6b923",
"blockNumber": "0x1d765ac",
"data": "0x00000000000000000000000000000000000000000000000000125a7343361fcc000000000000000000000000000000000000000000000018f1e4319fed5e03ec000000000000000000000000000000000000000000000fdf081cae93df867638000000000000000000000000000000000000000000000018f1d1d72caa27e420000000000000000000000000000000000000000000000fdf082f090722bc9604",
"logIndex": "0x221",
"topics": [
"0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
"0x0000000000000000000000000000000000000000000000000000000000001010",
"0x000000000000000000000000aa26d58df560fad003738596a3a2bf9c910bfb2b",
"0x00000000000000000000000046a3a41bd932244dd08186e4c19f1a7e48cbcdf4"
],
"transactionHash": "0x1bdff6b39cd8a3de4c4b61435da83014696d788f6e52672333471aa4d329bb19",
"transactionIndex": "0x78"
}
]
}
]
}
Copy link