Transaction Info
Query and intelligently decode TRON transactions — result status, confirmation, resource consumption, decoded method calls, internal transactions, event logs, and failure diagnosis.
MCP Server
Instructions
Step 1: Fetch Transaction Data
Run two complementary calls in parallel:
getTransactionById — Type, raw data, sender/receiver, contract parameters, signatures, timestamp, expiration
getTransactionInfoById — Result (SUCCESS/FAILED/REVERT), block number/timestamp, fee, energy/bandwidth usage, contract return value, internal txs, event logs
Step 2: Check Confirmation Status
getNowBlock — Get current block height
- Compare transaction's block number with latest block
solidityGetTransactionById — Check if confirmed by solidity node (irreversible)
Classification:
- Confirmed (Irreversible): Found on solidity node
- Confirmed (Not yet irreversible): In recent block, not solidified
- Pending: Use
getTransactionFromPending if needed
- Not Found: Invalid hash or expired
Step 3: Decode Transaction Type
| Contract Type |
Description |
Key Fields |
| TransferContract |
TRX transfer |
from, to, amount |
| TransferAssetContract |
TRC-10 transfer |
from, to, asset, amount |
| TriggerSmartContract |
Contract call |
contract, data (method + params) |
| FreezeBalanceV2Contract |
Stake 2.0 freeze |
owner, amount, resource |
| UnfreezeBalanceV2Contract |
Stake 2.0 unfreeze |
owner, amount, resource |
| DelegateResourceContract |
Resource delegation |
from, to, resource, amount |
| VoteWitnessContract |
SR voting |
owner, votes list |
| CreateSmartContract |
Contract deployment |
owner, bytecode, ABI |
Step 4: Decode Smart Contract Calls
For TriggerSmartContract:
- Extract method signature (first 4 bytes of data)
- Common signatures:
a9059cbb = transfer(address,uint256)
095ea7b3 = approve(address,uint256)
23b872dd = transferFrom(address,address,uint256)
- If ABI available (via
getContract), fully decode method name, parameters, and return value
- Decode event logs for what actually happened
Step 5: Analyze Resource Consumption
From receipt, break down:
- Energy: Used amount, from staking vs. burned TRX
- Bandwidth: Used amount, free vs. staked
- Fee: Total TRX paid (divide by 1,000,000 for TRX)
- Energy Penalty: Over-usage penalty if applicable
Step 6: Internal Transactions
Call getInternalTransactionsByTxId for:
- TRX transfers between contracts
- Contract-to-contract calls
- Token distributions in complex transactions
Step 7: Parse Event Logs
Decode to human-readable descriptions:
- Transfer → "[amount] [token] from [A] to [B]"
- Approval → "[A] approved [B] to spend [amount]"
- Swap → "[A] swapped [X] tokenA for [Y] tokenB"
Step 8: Compile Transaction Report
## Transaction: [txid]
### Status
- Result: [SUCCESS / FAILED / REVERT]
- Confirmation: [Irreversible / Confirmed / Pending]
- Block: #[number] ([timestamp])
### Participants
- From: [address]
- To: [address / contract]
- Value: [amount] TRX / [token]
### Decoded Action
[Human-readable description]
e.g., "Transferred 1,000 USDT from TXxx... to TYyy..."
e.g., "Staked 10,000 TRX for Energy (Stake 2.0)"
### Resource Costs
- Energy: [amount] (staked: [X], burned: [Y])
- Bandwidth: [amount]
- Total Fee: [amount] TRX
### Internal Transactions
| From | To | Value | Note |
|------|----|-------|------|
### Events
[Decoded event logs]
### Failure Analysis (if failed)
- Revert Reason: [decoded]
- Likely Cause: [analysis]
- Suggestion: [actionable fix]
Error Handling
| Error |
Cause |
Resolution |
| Transaction not found |
Invalid hash, too old, or not yet broadcast |
Verify hash format (64 hex chars); check pending pool with getTransactionFromPending |
| No receipt data |
Transaction still pending |
Note "Transaction pending, receipt not yet available" |
| Cannot decode method |
No ABI available for contract |
Show raw data hex, identify common method signatures manually |
| REVERT without reason |
Contract reverted without error message |
Check energy limit, parameter validity, and contract state |
Examples
- Check transfer status
- Decode a contract call
1---2name: trongrid-transaction-info3description: Query and decode TRON transactions including status, confirmation, sender/receiver, resource costs, internal transactions, event logs, and failure analysis. Use when a user asks about a transaction hash, wants to check if a transaction succeeded, understand what a transaction did, or debug a failed transaction.4---56# Transaction Info78Query and intelligently decode TRON transactions — result status, confirmation, resource consumption, decoded method calls, internal transactions, event logs, and failure diagnosis.910# MCP Server11- **Prerequisite**: [TronGrid MCP Guide](https://developers.tron.network/reference/mcp-api)1213## Instructions1415### Step 1: Fetch Transaction Data1617Run two complementary calls in parallel:18191. `getTransactionById` — Type, raw data, sender/receiver, contract parameters, signatures, timestamp, expiration202. `getTransactionInfoById` — Result (SUCCESS/FAILED/REVERT), block number/timestamp, fee, energy/bandwidth usage, contract return value, internal txs, event logs2122### Step 2: Check Confirmation Status23241. `getNowBlock` — Get current block height252. Compare transaction's block number with latest block263. `solidityGetTransactionById` — Check if confirmed by solidity node (irreversible)2728Classification:29- **Confirmed (Irreversible)**: Found on solidity node30- **Confirmed (Not yet irreversible)**: In recent block, not solidified31- **Pending**: Use `getTransactionFromPending` if needed32- **Not Found**: Invalid hash or expired3334### Step 3: Decode Transaction Type3536| Contract Type | Description | Key Fields |37|--------------|-------------|------------|38| TransferContract | TRX transfer | from, to, amount |39| TransferAssetContract | TRC-10 transfer | from, to, asset, amount |40| TriggerSmartContract | Contract call | contract, data (method + params) |41| FreezeBalanceV2Contract | Stake 2.0 freeze | owner, amount, resource |42| UnfreezeBalanceV2Contract | Stake 2.0 unfreeze | owner, amount, resource |43| DelegateResourceContract | Resource delegation | from, to, resource, amount |44| VoteWitnessContract | SR voting | owner, votes list |45| CreateSmartContract | Contract deployment | owner, bytecode, ABI |4647### Step 4: Decode Smart Contract Calls4849For `TriggerSmartContract`:50511. Extract method signature (first 4 bytes of data)522. Common signatures:53 - `a9059cbb` = `transfer(address,uint256)`54 - `095ea7b3` = `approve(address,uint256)`55 - `23b872dd` = `transferFrom(address,address,uint256)`563. If ABI available (via `getContract`), fully decode method name, parameters, and return value574. Decode event logs for what actually happened5859### Step 5: Analyze Resource Consumption6061From receipt, break down:62- **Energy**: Used amount, from staking vs. burned TRX63- **Bandwidth**: Used amount, free vs. staked64- **Fee**: Total TRX paid (divide by 1,000,000 for TRX)65- **Energy Penalty**: Over-usage penalty if applicable6667### Step 6: Internal Transactions6869Call `getInternalTransactionsByTxId` for:70- TRX transfers between contracts71- Contract-to-contract calls72- Token distributions in complex transactions7374### Step 7: Parse Event Logs7576Decode to human-readable descriptions:77- Transfer → "[amount] [token] from [A] to [B]"78- Approval → "[A] approved [B] to spend [amount]"79- Swap → "[A] swapped [X] tokenA for [Y] tokenB"8081### Step 8: Compile Transaction Report8283```84## Transaction: [txid]8586### Status87- Result: [SUCCESS / FAILED / REVERT]88- Confirmation: [Irreversible / Confirmed / Pending]89- Block: #[number] ([timestamp])9091### Participants92- From: [address]93- To: [address / contract]94- Value: [amount] TRX / [token]9596### Decoded Action97[Human-readable description]98e.g., "Transferred 1,000 USDT from TXxx... to TYyy..."99e.g., "Staked 10,000 TRX for Energy (Stake 2.0)"100101### Resource Costs102- Energy: [amount] (staked: [X], burned: [Y])103- Bandwidth: [amount]104- Total Fee: [amount] TRX105106### Internal Transactions107| From | To | Value | Note |108|------|----|-------|------|109110### Events111[Decoded event logs]112113### Failure Analysis (if failed)114- Revert Reason: [decoded]115- Likely Cause: [analysis]116- Suggestion: [actionable fix]117```118119## Error Handling120121| Error | Cause | Resolution |122|-------|-------|------------|123| Transaction not found | Invalid hash, too old, or not yet broadcast | Verify hash format (64 hex chars); check pending pool with `getTransactionFromPending` |124| No receipt data | Transaction still pending | Note "Transaction pending, receipt not yet available" |125| Cannot decode method | No ABI available for contract | Show raw data hex, identify common method signatures manually |126| REVERT without reason | Contract reverted without error message | Check energy limit, parameter validity, and contract state |127128## Examples129130- [Check transfer status](examples/check-transfer-status.md)131- [Decode a contract call](examples/decode-contract-call.md)