Nhảy tới nội dung

[Transaction] eth_getTransactionReceipt

Returns the receipt of a transaction by transaction hash.

NOTE: The receipt is not available for pending transactions.

Please check the Caution-TransactionReceipt before using this API.

JSONRPC: eth_getTransactionReceipt

Request

Body

    params hex[]

    Hash of a transaction.

Responses

Object - A transaction receipt object, or null when no receipt was found

Schema

    error

    object

    code int64required

    A Number that indicates the error type that occurred. This MUST be an integer.

    codemessagedescription
    -32700Parse errorinvalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
    -32602Invalid paramsInvalid method parameter(s).
    message string

    A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.

    data string

    A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.).

    result

    object

    blockHash 32-byte DATArequired

    Hash of the block where this transaction was in.

    blockNumber hexrequired

    The block number where this transaction was in.

    contractAddress DATArequired

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

    cumulativeGasUsed hexrequired

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

    effectiveGasPrice hexrequired

    The actual value per gas deducted from the senders account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas).

    from 20-byte DATArequired

    Address of the sender.

    logs object[]required

    Array of log objects, which this transaction generated.

    logsBloom 256-byte DATArequired

    Bloom filter for light clients to quickly retrieve related logs.

    status hexrequired

    Either 1 (success) or 0 (failure).

    to 20-byte DATArequired

    Address of the receiver. null when it is a contract creation transaction.

    transactionHash 32-byte DATArequired

    Hash of the transaction.

    transactionIndex hexrequired

    Integer of the transaction index position in the block.

    type hexrequired

    An integer representing the type of the transaction.

Loading...