[Transaction] eth_getTransactionReceipt
Returns the receipt of a transaction by transaction hash.
NOTE: The receipt is not available for pending transactions.
Please check the Caution-TransactionReceipt before using this API.
JSONRPC: eth_getTransactionReceipt
Request
- application/json
Body
Hash of a transaction.
Responses
- 200
Object - A transaction receipt object, or null when no receipt was found
- application/json
- Schema
- Example (from schema)
Schema
error
object
A Number that indicates the error type that occurred. This MUST be an integer.
code | message | description |
---|---|---|
-32700 | Parse error | invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. |
-32602 | Invalid params | Invalid method parameter(s). |
A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.
A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.).
result
object
Hash of the block where this transaction was in.
The block number where this transaction was in.
The contract address created, if the transaction was a contract creation, otherwise null.
The total amount of gas used when this transaction was executed in the block.
The actual value per gas deducted from the senders account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas).
Address of the sender.
Array of log objects, which this transaction generated.
Bloom filter for light clients to quickly retrieve related logs.
Either 1 (success) or 0 (failure).
Address of the receiver. null when it is a contract creation transaction.
Hash of the transaction.
Integer of the transaction index position in the block.
An integer representing the type of the transaction.
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32700,
"message": "Parse error",
"data": "string"
},
"result": {
"blockHash": "0xd49c770e1c6fdf340e25aca6d2de0ddf3d10873582b62b7ad604ff5b291bdbe5",
"blockNumber": "0xd017a7",
"contractAddress": null,
"cumulativeGasUsed": "0x8dc5d",
"effectiveGasPrice": "0x315c2f4800",
"from": "0x46705dfff24256421a05d056c29e81bdc09723b8",
"gasUsed": "0xf6e9",
"logs": [
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0xd49c770e1c6fdf340e25aca6d2de0ddf3d10873582b62b7ad604ff5b291bdbe5",
"blockNumber": "0xd017a7",
"data": "0x000000000000000000000000000000000000000000000000000000000cd0a3c0",
"logIndex": "0x13",
"removed": false,
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000046705dfff24256421a05d056c29e81bdc09723b8",
"0x000000000000000000000000cad1d9c2ad1860d4d4fb53782720279c60ae4de8"
],
"transactionHash": "0x73af85890dd29691ff807b8d9e10c5a4d3349d28b6b143fa5e46db2c61b376e9",
"transactionIndex": "0x3"
}
],
"logsBloom": "0x00000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000400000000000000000008000000000000008000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000080000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000004000800000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"transactionHash": "0x73af85890dd29691ff807b8d9e10c5a4d3349d28b6b143fa5e46db2c61b376e9",
"transactionIndex": "0x3",
"type": "0x0"
}
}