eth_getTransactionByHash - TRON RPC Method
Retrieve transaction details by hash on TRON. Essential for TRON developers building payment rails, exchanges, and consumer crypto applications tracking transactions on the TVM-compatible Layer 1 for TRC-20 payments, wallet APIs, and low-cost smart contract execution.
Returns the information about a transaction by transaction hash on TRON.
Why TRON? Build on the TVM-compatible Layer 1 for TRC-20 payments, wallet APIs, and low-cost smart contract execution with TVM compatibility paired with native TRON wallet APIs, DPoS block production, and low-cost transaction flows.
Use Cases
The eth_getTransactionByHash method is essential for:
- Transaction tracking - Get details of pending or confirmed transactions
- Payment verification - Verify transaction parameters
- Debugging - Analyze transaction data for TRC-20 transfers, wallet operations, and EVM-compatible smart contract integrations
- Block explorers - Display transaction information
Sample Freshness
Use a recent transaction hash when you test this method in your own environment. If the transaction is no longer available on the node you are querying, TRON can return null, so replace placeholders with a fresh transaction hash whenever you re-run the examples.
Request Parameters
32-byte transaction hash
Response Body
Transaction hash
Sender address
Recipient address
Value in wei
Gas provided
Gas price in wei
Transaction input data
Sender's nonce
Block hash (null if pending)
Block number (null if pending)
Code Examples
curl -X POST https://api-tron-mainnet.n.dwellir.com/YOUR_API_KEY/jsonrpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": ["0xdcfaa73d566d819ff95b8a9ae944e34c011fb16dd55bce7830a80016c54acf71"],
"id": 1
}'Error Handling
| Error Code | Message | Description |
|---|---|---|
| -32602 | Invalid params | Invalid transaction hash format |
Related Methods
eth_getTransactionReceipt- Get transaction receipteth_sendRawTransaction- Send transaction
eth_sendRawTransaction
Submit signed transactions to TRON. Essential for broadcasting transactions for TRC-20 transfers, wallet operations, and EVM-compatible smart contract integrations.
eth_getTransactionReceipt
Get transaction receipt with status and logs on TRON. Essential for verifying transaction execution for TRC-20 transfers, wallet operations, and EVM-compatible smart contract integrations.