TVM Retracer is a browser-based stack tracer for debugging TON smart contract transactions.
Live app: https://retracer.ton.org/
- Replays a transaction and shows TVM compute steps
- Shows stack state per step with previous/next navigation
- Displays execution metadata (fees, balances, exit code, VM steps)
- Parses C5 actions
- Shows executor logs
- Links to multiple explorers for the same transaction
- Includes opcode docs lookup (loaded from
ton-community/tvm-spec) - Supports both mainnet and testnet
- Node.js
20.19+(required by Vite 7) - Yarn
1.x(packageManageris pinned to Yarn classic)
yarn install
yarn devOpen the local URL printed by Vite (usually http://localhost:5173).
yarn build
yarn previewyarn lint- Paste a transaction reference into the input.
- Press
Enteror clickEmulate. - Inspect execution steps, stack changes, logs, and C5 actions.
Keyboard shortcuts:
ArrowLeft: previous compute stepArrowRight: next compute step
You can paste any of the following:
ton.cxtransaction linkstonviewer.comtransaction linkstonscan.orgtransaction linksexplorer.toncoin.orgtransaction linksdton.iotransaction linkslt:hash(with hex hash)- Bare hash:
- hex (64 chars)
- base64 (auto-detected when it ends with
=)
If a bare hash or lt:hash is provided without explicit network info, Retracer tries mainnet first, then testnet.
The app supports deep links through query params:
tx: pre-fills transaction inputtestnet=true: forces testnet mode
Examples:
https://retracer.ton.org/?testnet=truehttps://retracer.ton.org/?tx=4df182d84e9e1bbe76d9cfe35bd023c244c55b03cbd118457769868aa2e85bf4https://retracer.ton.org/?testnet=true&tx=22552863000001%3A9332cb256b820e4d7a980980bbb280419c1e0e5747f562a0a7a6f4ee16c3d879
To reconstruct and emulate transactions, the app queries:
- Toncenter API v3 (
/transactions,/blocks) - Toncenter API v2 (
getConfigAll, JSON-RPC) - Tonhub API v4 (
mainnet-v4.tonhubapi.com,sandbox-v4.tonhubapi.com) - dton GraphQL (
get_libfor library cells) - TVM opcode metadata from:
https://raw.githubusercontent.com/ton-community/tvm-spec/refs/heads/master/cp0.json
yarn deploypublishesdist/usinggh-pages.vite.config.tsuses a special base path (/tvm-viewer/) whenGH_PAGESis set.
For GitHub Pages builds, use:
GH_PAGES=true yarn build