Query and intelligently decode TRON transactions — result status, confirmation, resource consumption, decoded method calls, internal transactions, event logs, and failure diagnosis.
Run two complementary calls in parallel:
getTransactionById — Type, raw data, sender/receiver, contract parameters, signatures, timestamp, expirationgetTransactionInfoById — Result (SUCCESS/FAILED/REVERT), block number/timestamp, fee, energy/bandwidth usage, contract return value, internal txs, event logsgetBlock (no params) — Get current block heightsolidityGetTransactionById — Check if confirmed by solidity node (irreversible)Classification:
getTransactionFromPending if needed| 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 |
For TriggerSmartContract:
a9059cbb = transfer(address,uint256)095ea7b3 = approve(address,uint256)23b872dd = transferFrom(address,address,uint256)getContract), fully decode method name, parameters, and return valueFrom receipt, break down:
Call getInternalTransactionsByTxId for:
Decode to human-readable descriptions:
## 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 | 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 |
共 2 个版本