Scroll
Scroll

eth_getTransactionByHash
The eth_getTransactionByHash method returns comprehensive information about a transaction identified by its unique hash. This is one of the most commonly used methods for retrieving transaction details directly.
Use Cases
- Transaction status confirmation
- Transaction validation
- Payment verification
- Smart contract interaction analysis
- Transaction monitoring
- Gas usage analysis
- Historical transaction data retrieval
- Transaction debugging
Method Details
This method retrieves detailed transaction data using the transaction's unique hash.
Response Example
Identifying Transaction Types
By examining the transaction data, you can identify common transaction patterns:
- Simple ETH Transfer:
tois a regular address (not a contract)inputis "0x" (empty data)valueis greater than 0
- ERC-20 Token Transfer:
tois a token contract addressinputstarts with "0xa9059cbb" (transfer method signature)valueis typically 0
- Contract Deployment:
tois nullinputcontains contract bytecode
- Contract Method Call:
tois a contract addressinputstarts with function signature (first 4 bytes of keccak256 hash of function name and parameters)- May include
valueif the function is payable
Parameters
The hash of the transaction