eth_getTransactionReceipt

Returns the receipt of a transaction by transaction hash.

🚧

NOTE: eth_getTransactionReceipt is not available for pending transactions.

Parameters

Object NameRequiredTypeDetail
TRANSACTION HASHβœ…StringHash of a transaction.
"params": [
    "0x6b5b86c5333ccbb0c3056d687a12dd8c9f80fd638e8411ce4891492fff50bf98"
]

Result

A transaction receipt object, or null when no receipt was found.

KeyTypeDetail
blockHashStringHash of the block where this transaction was in.
blockNumberStringA hex code of an integer that represents the block number where this transaction was in.
contractAddressStringAddress where the contract was created, if the transaction was a contract creation. null otherwise.
cumulativeGasUsedStringA hex code of an integer that represents the total amount of gas used when this transaction was executed in the block.
fromStringAddress the transaction is sent from.
gasUsedStringA hex code of an integer that represents the amount of gas used by this specific transaction alone.
logsArrayArray of log objects, which this transaction generated.
logsBloomStringBloom filter for light clients to quickly retrieve related logs.
rootStringPost-transaction stateroot (pre Byzantium). If root is showed, then status will not showed.
statusIntegerEither 1 (success) or 0 (failure). If status is showed, then root will not showed.
toStringAddress the transaction is directed to. null if the transaction is a contract creation.
transactionHashStringHash of the transaction.
transactionIndexStringA hex code of an integer that represents the index position of the transaction in the block.

Example

Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0x6b5b86c5333ccbb0c3056d687a12dd8c9f80fd638e8411ce4891492fff50bf98"],"id":1}'

Return

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0xf079b77f13742758a0c4f32048fcfb0af461e7a17720f20fd3a78c52572af6e1",
        "blockNumber": "0x128858c",
        "transactionHash": "0x6b5b86c5333ccbb0c3056d687a12dd8c9f80fd638e8411ce4891492fff50bf98",
        "transactionIndex": "0x1",
        "contractAddress": "0x787221455a73051334b91b1c26db8131e11f0c4e",
        "from": "0x7130b23be232318088752f345bb0fc4956dd88b1",
        "to": "0x787221455a73051334b91b1c26db8131e11f0c4e",
        "gasUsed": "0x363dd",
        "cumulativeGasUsed": "0x363dd",
        "logs": [
            {
                "address": "0x787221455a73051334b91b1c26db8131e11f0c4e",
                "blockHash": "0xf079b77f13742758a0c4f32048fcfb0af461e7a17720f20fd3a78c52572af6e1",
                "blockNumber": "0x128858c",
                "logIndex": "0x0",
                "topics": [
                    "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                    "0x0000000000000000000000000000000000000000000000000000000000000000",
                    "0x000000000000000000000000517f4ae5d47513f342792d0d3d6b9d929bcb21fa",
                    "0x0000000000000000000000000000000000000000000000000000000000000065"
                ],
                "transactionHash": "0x6b5b86c5333ccbb0c3056d687a12dd8c9f80fd638e8411ce4891492fff50bf98",
                "transactionIndex": "0x1",
                "data": "0x",
                "type": "mined"
            }
        ],
        "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "status": "0x1"
    }
}
Language
Click Try It! to start a request and see the response here!