eth_getTransactionReceipt

Returns the receipt of a transaction by transaction hash.

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

Parameters

  • TRANSACTION-HASH [required] a string representing the hash (32 bytes) of a transaction.

Request

curl https://eth-mainnet.solarpath.io/v1/YOUR-API-KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionReceipt", "params": ["0xbfd5ac780d84990912e5b64a94de421fb3c64db15576eff80860251c43dacd0f"]}'

Response

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    // block hash
    "blockHash": "0xe429155011f1e8bcd46802dd261c6855e5fe3ed4d1622d047920e40dcb0e0da8",
    // block number
    "blockNumber": "0x658a13",
    // the total amount of gas used when this transaction was executed in the block.
    "cumulativeGasUsed": "0x5208",
    // the actual value per gas deducted from the sender's account. Before EIP-1559, equal to the gas price.
    "effectiveGasPrice": "0x3b9aca00",
    // the amount of gas used by this specific transaction alone.
    "gasUsed": "0x5208",
    // address of the sender.
    "from": "0xea674fdde714fd979de3edf0f56aa9716b898ec8",
    // address of the receiver.
    "to": "0x1fb8a3f0a7fee2e7424c1a5ea3b0ad3b7cce33d4",
    // Array of log objects, which this transaction generated.
    "logs": [],
    // Bloom filter for light clients to quickly retrieve related logs.
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    // either 1 (success) or 0 (failure)
    "status": "0x1",
    // hash of the transaction.
    "transactionHash": "0xbfd5ac780d84990912e5b64a94de421fb3c64db15576eff80860251c43dacd0f",
    // hexadecimal of the transaction's index position in the block.
    "transactionIndex": "0x0",
    // transaction type
    "type": "0x0"
  }
}

transaction type see the: Transaction Type

Last updated