Skip to navigation

eth_getTransactionByHash

Returns the transaction object for the given transaction hash. Returns null if the transaction is unknown. For pending transactions (in the mempool but not yet mined), blockHash, blockNumber, and transactionIndex are null.

⚡ Compute Units: 15 CU

Request

This endpoint expects an object.
transactionHashstringRequiredformat: "^0x[0-9a-fA-F]{64}$"

32-byte hash of a transaction

Response

Transaction object, or null if the transaction doesn't exist
hashstringformat: "^0x[0-9a-fA-F]{64}$"

32-byte hash of the transaction

fromstringformat: "^0x[0-9a-fA-F]{40}$"

20-byte address of the sender

tostring or nullformat: "^0x[0-9a-fA-F]{40}$"

20-byte address of the receiver, or null for contract-creation transactions.

valuestringformat: "^0x(0|[1-9a-fA-F][0-9a-fA-F]*)$"
Value transferred in wei
gasPricestringformat: "^0x(0|[1-9a-fA-F][0-9a-fA-F]*)$"
Gas price provided by the sender in wei
gasstringformat: "^0x(0|[1-9a-fA-F][0-9a-fA-F]*)$"
Gas provided by the sender
inputstringformat: "^0x[0-9a-fA-F]*$"
Data sent along with the transaction
noncestringOptionalformat: "^0x(0|[1-9a-fA-F][0-9a-fA-F]*)$"
Number of transactions made by the sender prior to this one
blockHashstring or nullOptionalformat: "^0x[0-9a-fA-F]{64}$"

32-byte hash of the block where this transaction was included. Null for pending transactions (mempool, not yet mined).

blockNumberstring or nullOptionalformat: "^0x(0|[1-9a-fA-F][0-9a-fA-F]*)$"
Block number where this transaction was included. Null for pending transactions.
transactionIndexstring or nullOptionalformat: "^0x(0|[1-9a-fA-F][0-9a-fA-F]*)$"
Integer of the transaction's index position in the block. Null for pending transactions.
typestringOptionalformat: "^0x[0-9a-fA-F]{1,2}$"

Transaction type as hex-encoded byte. Standard EIP values: 0x0 legacy, 0x1 EIP-2930 access list, 0x2 EIP-1559, 0x3 EIP-4844 blob, 0x4 EIP-7702 authorization. Some rollup stacks define additional types (e.g. 0x7E OP-Stack deposit transactions); these values are stack-specific.

chainIdstringOptionalformat: "^0x(0|[1-9a-fA-F][0-9a-fA-F]*)$"
Chain ID the transaction was signed for
accessListlist of objectsOptional

EIP-2930 access list (present on type 0x1 and 0x2+)

maxFeePerGasstringOptionalformat: "^0x(0|[1-9a-fA-F][0-9a-fA-F]*)$"

EIP-1559 max total fee per gas (present on type 0x2+)

maxPriorityFeePerGasstringOptionalformat: "^0x(0|[1-9a-fA-F][0-9a-fA-F]*)$"

EIP-1559 max miner tip per gas (present on type 0x2+)

maxFeePerBlobGasstringOptionalformat: "^0x(0|[1-9a-fA-F][0-9a-fA-F]*)$"

EIP-4844 max fee per blob gas (present on type 0x3)

blobVersionedHasheslist of stringsOptional

EIP-4844 versioned hashes of blob commitments (present on type 0x3)

yParitystringOptionalformat: "^0x(0|[1-9a-fA-F][0-9a-fA-F]*)$"

Signature y-parity (present on type 0x1+ instead of v)

vstringOptionalformat: "^0x(0|[1-9a-fA-F][0-9a-fA-F]*)$"

Signature recovery byte (legacy and EIP-155 transactions)

rstringOptionalformat: "^0x[0-9a-fA-F]{64}$"
Signature r component
sstringOptionalformat: "^0x[0-9a-fA-F]{64}$"
Signature s component