eth_getTransactionReceipt

Returns the receipt for a transaction by hash.

Important

The transaction receipt is only available for mined transactions.

Parameters

Name
Type
Description

TransactionHash

HexString<Hash>

Hash of the selected transaction.

Return Type

TransactionReceipt | null - Transaction receipt object or null if not found.

TransactionReceipt

type TransactionReceipt = {
  status: HexString<Number>; // 1 Success or 0 Failure
  from: Address; // Address of the sender.
  to: Address | null; // Address of the receiver or null for contract creations.

  blockHash: HexString<Hash> | null; // Block hash of transaction or null if transaction is pending.
  blockNumber: HexString<Number> | null; // Block number of transaction or null if transaction is pending.

  contractAddress: Address | null; // Contract address created or null if no contract was created.

  gasUsed: HexString<Number>; // Amount of gas units used by this transaction alone.
  cumulativeGasUsed: HexString<Number>; // Amount of gas units used by this transaction in the block.
  effectiveGasPrice: HexString<Number>; // Actual value per gas unit deducted from the sender's account.

  transactionHash: HexString<Hash>; // Hash of the transaction.
  transactionIndex: HexString<Number> | null; // Transaction index in block or null if transaction is pending.
  type: HexString<Number>; // Transaction type

  logs: Log[]; // Array of log objects generated from this transaction.
  logsBloom: HexString<FilterBloom> | null; // Bloom filter of the logs generated from this transaction.
};

Log

Example

Last updated

Was this helpful?