eth_getTransactionByHash
The eth_getTransactionByHash method returns information about a transaction by its hash on the Tron network. This is one of the most frequently used methods for tracking transactions, allowing you to retrieve complete transaction details including sender, receiver, value, gas parameters, and input data.
It's essential for transaction tracking, confirmation checking, and building transaction history features in wallets and explorers. Developers use this to display transaction details to users, verify transaction parameters before processing, track transaction status, and analyze transaction data. The method returns the transaction data as it was submitted to the network, including signature components, making it useful for transaction verification and analysis. Note that this returns the transaction data itself, not the execution result - use eth_getTransactionReceipt for execution outcomes.
Parameters
parameter | type | description |
|---|---|---|
transactionHash | string (required) | Hash of the transaction (32-byte hex string with 0x prefix) |
Return Object
The method returns a transaction object, or null if the transaction is not found:
field | type | description |
|---|---|---|
blockHash | string | Hash of the block where this transaction was included (32 bytes), null for pending transactions |
blockNumber | string | Number of the block where this transaction was included (hex), null for pending transactions |
from | string | Address of the sender (20 bytes) |
to | string | Address of the receiver (20 bytes), null for contract creation transactions |
gas | string | Gas provided by the sender (hex) |
gasPrice | string | Gas price provided by the sender in sun (hex), for legacy transactions |
maxFeePerGas | string | Maximum total fee per gas the sender is willing to pay (hex), for EIP-1559 transactions |
maxPriorityFeePerGas | string | Maximum priority fee per gas the sender is willing to pay (hex), for EIP-1559 transactions |
hash | string | Hash of the transaction (32 bytes) |
input | string | The data sent along with the transaction (encoded contract method call or contract creation code) |
nonce | string | The number of transactions made by the sender prior to this one (hex) |
transactionIndex | string | Integer of the transaction's index position in the block (hex), null for pending transactions |
value | string | Value transferred in sun (hex) |
type | string | The transaction type: 0 for legacy, 1 for access list, 2 for dynamic fee (EIP-1559) |
chainId | string | The chain ID of the transaction (hex), if available |
v | string | ECDSA recovery id |
r | string | ECDSA signature r |
s | string | ECDSA signature s |
Request Example
Response Example