eth_getTransactionReceipt

Returns the receipt of a transaction by transaction hash.

Note: That the receipt is not available for pending transactions.

Request

curl 'https://rpc.web3api.io?x-api-key=YOUR-API-KEY' \
    -X POST \
    -H 'x-amberdata-blockchain-id: ethereum-mainnet' \
    -d '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionReceipt","params":["0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"]}'

index

Description

0 - transactionHash

The hash of a transaction.

Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
        "blockNumber": "0x5bad55",
        "contractAddress": null,
        "cumulativeGasUsed": "0xb90b0",
        "from": "0x398137383b3d25c92898c656696e41950e47316b",
        "gasUsed": "0x1383f",
        "logs": [
            {
                "address": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
                "topics": [
                    "0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"
                ],
                "data": "0x000000000...",
                "blockNumber": "0x5bad55",
                "transactionHash": "0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0",
                "transactionIndex": "0x11",
                "blockHash": "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
                "logIndex": "0x6",
                "removed": false
            }
        ],
        "logsBloom": "0x00000000...",
        "status": "0x1",
        "to": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
        "transactionHash": "0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0",
        "transactionIndex": "0x11"
    }
}

Field

Description

result

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

blockHash

The hash of the block where this transaction was in.

blockNumber

The block number where this transaction was in.

contractAddress

The contract address created, if the transaction was a contract creation, otherwise null.

cumulativeGasUsed

The total amount of gas used when this transaction was executed in the block.

from

The address of the sender.

gasUsed

The amount of gas used by this specific transaction alone.

logs

Array of log objects, which this transaction generated as returned by eth_getLogs.

logsBloom

The gas provided by the sender.

status

Either 1 (success) or 0 (failure).

transactionHash

The hash of the transaction.

to

The address of the receiver. null when its a contract creation transaction.

transactionIndex

The integer of the transaction's index position in the block.

root

The 32 bytes of post-transaction stateroot (pre Byzantium)