explain_tx
Decode and explain any confirmed blockchain transaction: top-level calls, token transfers, balance changes, fees, and flagged anomalies. Get a plain-English narrative for debugging, learning, or forensics across EVM, TRON, and Solana.
Instructions
Narrative analysis of a single confirmed transaction. AGENT BEHAVIOR: when the user pastes a tx hash (or an Etherscan / Arbiscan / Polygonscan / Basescan / Optimistic-Etherscan / Tronscan / Solscan URL containing one) and asks 'why did this fail / what does this do / what happened', call THIS tool — do NOT WebFetch the explorer or a Tenderly/Phalcon dashboard URL. Those pages are JS SPAs that render an empty shell when fetched server-side; this tool decodes the same data structurally and returns a verbatim-relayable narrative. Walks what actually happened: top-level method/instruction call, decoded ERC-20/TRC-20 Transfer + Approval events (or Solana SPL balance deltas), per-token balance changes for the wallet, fee paid, and a heuristics block flagging surprises (failed status, unlimited approval, dust outflow, transfer-to-zero burn, high-gas vs. moved value, unexpected no-state-change). Returns BOTH a structured envelope and a pre-rendered narrative string for verbatim relay (control via format). Distinct from get_transaction_status (just confirmation status) and the prepare→preview→send pipeline (forward-looking). Useful for debugging ("why did this swap return less than the quote?"), learning ("what does this contract call actually do?"), forensics ("what addresses did this tx touch?"), and address-poisoning triage. v1 covers EVM (Ethereum/Arbitrum/Polygon/Base/Optimism), TRON, and Solana — Bitcoin is deferred. v1 reads top-level execution only; internal calls / CPI / DeFi compositions surface via balance & event effects rather than as separate step rows. Pricing is current spot via DefiLlama (not historical at tx time). Optional wallet arg recomputes balance/approval changes from THAT wallet's perspective — defaults to tx sender. Read-only — no signing, no broadcast.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hash | Yes | Transaction identifier. EVM: 32-byte hex (with or without `0x`). TRON: 32-byte bare hex. Solana: 64-byte signature as base58 (86–88 chars). | |
| chain | Yes | Which chain the tx lives on. Required because EVM / TRON / Solana post-mortems use different RPC paths and payload shapes. | |
| wallet | No | Optional. When supplied, balance + approval changes are computed FROM THIS WALLET'S PERSPECTIVE — outflows are negative, inflows positive. When omitted, defaults to the tx sender (the canonical perspective). Pass an explicit wallet for recipient-side narratives. | |
| format | No | "structured" returns the JSON envelope only. "narrative" returns only the pre-rendered string. "both" (default) returns both — agents typically use the narrative for verbatim relay and the structured for follow-up questions. | both |