Returns the receipt of a transaction by transaction hash.
Request Format
{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": [
"0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
],
"id": 1
}
Response Format
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
"blockNumber": "0x50",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
"gasUsed": "0x5208",
"blobGasUsed": "0x20000",
"effectiveGasPrice": "0x1",
"blobGasPrice": "0x3",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0xf17f52151ebef6c7334fad080c5704d77216b732"
}
}
Parameters
- Transaction Hash (
hash32
): The unique identifier of the transaction.
Return Value
- Receipt Information (
ReceiptInfo
ornotFound
): If the transaction exists, returns an object containing:blockHash
(hash32
): Hash of the block containing this transaction.blockNumber
(uint
): Block number where this transaction was included.contractAddress
(address
ornull
): Address of the contract created, if applicable.cumulativeGasUsed
(uint
): Total gas used when this transaction was executed in the block.from
(address
): Sender’s Ethereum address.gasUsed
(uint
): Gas used by this specific transaction.blobGasUsed
(uint
): Amount of blob gas used (if applicable).effectiveGasPrice
(uint
): The effective gas price paid for the transaction.blobGasPrice
(uint
): The blob gas price (if applicable).logs
(array
): Array of log objects generated by this transaction.logsBloom
(bytes
): Bloom filter for logs.status
(uint
): Transaction execution status (0x1
for success,0x0
for failure).to
(address
ornull
): Recipient’s Ethereum address.- Returns
null
if the transaction is not found.
Example
Request
{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": [
"0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
],
"id": 1
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
"blockNumber": "0x50",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
"gasUsed": "0x5208",
"blobGasUsed": "0x20000",
"effectiveGasPrice": "0x1",
"blobGasPrice": "0x3",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0xf17f52151ebef6c7334fad080c5704d77216b732"
}
}
Notes
- If the transaction is pending, some fields like
blockHash
andblockNumber
may benull
. - Useful for retrieving details about a transaction's execution result, including gas usage and status.