Join AWS, Dust Labs & OrangeDAO at QuickPitch. Win $80k — Apply Today.

Contents

eth_getTransactionReceipt RPC Method

The API credit value for this method is 2 . To learn more about API credits and each method's value, visit the API Credits page.

Parameters:

  1. hash - string - The hash of a transaction
  2. Please note that transaction receipts are not available for pending transactions.

Returns:

  1. object - A transaction receipt object, or null when no receipt was found
  2. blockHash - The hash of the block where this transaction was in

    blockNumber - The block number where this transaction was added encoded as a hexadecimal

    contractAddress - The contract address created for contract creation, otherwise null

    cumulativeGasUsed - The total gas used when this transaction was executed in the block

    effectiveGasPrice - The total base charge plus tip paid for each unit of gas

    from - The address of the sender

    gasUsed - The amount of gas used by this specific transaction alone

    logs - An array of log objects that generated this transaction

    address - The address from which this log was generated

    topics - An array of zero to four 32 Bytes DATA of indexed log arguments. In Solidity, the first topic is the hash of the signature of the event (e.g. Deposit(address, bytes32, uint256)), except you declare the event with the anonymous specifier

    data - The 32 byte non-indexed argument of the log

    blockNumber - The block number where this log was in

    transactionHash - The hash of the transaction from which this log was created from. null if the log is pending

    transactionIndex - The transactions index position from which this log was created from. null if the log is pending

    blockHash - The hash of the block where this log was in

    logIndex - The integer of log index position in the block encoded as hexadecimal. null if the log is pending

    removed - It is true if log was removed, due to a chain reorganization and false if it's a valid log

    logsBloom - The bloom filter which is used to retrive related logs

    status - It is either 1 (success) or 0 (failure) encoded as a hexadecimal

    to - The address of the receiver. Null when its a contract creation transaction

    transactionHash - The hash of the transaction

    transactionIndex - The transactions index position in the block encoded as a hexadecimal

    type - The type of value

Code Examples:

curl http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_getTransactionReceipt","params":["0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5"],"id":1,"jsonrpc":"2.0"}'
Ready to get started? Create a free account