The eth_getTransactionReceipt
method returns the receipt of a transaction, which contains critical information about transaction execution results, including success or failure, gas used, generated events (logs), and deployed contract addresses. The receipt is only available for transactions that have been included in a block.
This method returns the transaction receipt object using the transaction's unique hash.
The hash of the transaction
The transaction receipt object, or null if the transaction is pending/not found
Hash of the block containing this transaction
Block number containing this transaction (hex)
Contract address created (if contract creation), otherwise null
Total gas used in the block up to and including this transaction (hex)
The actual gas price paid per unit of gas (hex)
Address of the sender
Gas used by this specific transaction (hex)
Array of log objects generated by this transaction
Bloom filter for light clients to quickly retrieve related logs
Transaction status: 1 (success) or 0 (failure)
Address of the receiver, null for contract creation transactions
Hash of the transaction
Transaction's index position in the block
Transaction type (0=legacy, 1=EIP2930, 2=EIP1559)
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x5f35e7deaad2ff7a25c46b7df81a5d834f6c2725e49e868402f6958e979aaa5a",
"blockNumber": "0x1197fa5",
"contractAddress": null,
"cumulativeGasUsed": "0x2eac11",
"effectiveGasPrice": "0xb4c7a080",
"from": "0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5",
"gasUsed": "0x860a",
"logs": [
{
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000095222290dd7278aa3ddd389cc1e1d165cc4bafe5",
"0x00000000000000000000000088e6a0c2ddd26feeb64f039a2c41296fcb3f5640"
],
"data": "0x00000000000000000000000000000000000000000000000000000000007a1200",
"blockNumber": "0x1197fa5",
"transactionHash": "0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0",
"transactionIndex": "0xdb",
"blockHash": "0x5f35e7deaad2ff7a25c46b7df81a5d834f6c2725e49e868402f6958e979aaa5a",
"logIndex": "0x133",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"transactionHash": "0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0",
"transactionIndex": "0xdb",
"type": "0x2"
}
}
0x1
: Transaction succeeded0x0
: Transaction failed (reverted)0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
(same as ERC20)