Skip to content

Repository files navigation

Transaction Decoder

Paste an Ethereum, BNB Smart Chain or Solana transaction and read what it actually did — in plain English, written for people who do not already speak blockchain.

Block explorers show everything and explain nothing. This does the opposite: one sentence first, then a step-by-step story, then the balance changes, and only then the hex.

The interface is built as a financial statement rather than a dashboard: warm paper, hairline rules, tabular figures, IBM Plex throughout, and no decorative iconography.

How it works

There is no backend. The browser talks straight to public RPC endpoints, so the whole thing is a static site you can host anywhere.

paste hash → detect network → fetch tx + receipt → decode → explain
  • Ethereum / BNBeth_getTransactionByHash + eth_getTransactionReceipt. Logs are matched against a bundled table of event signatures (ERC-20/721/1155 transfers, approvals, wrap/unwrap, DEX swaps); anything unrecognised is looked up in the open openchain.xyz signature database. Token names and decimals come from batched eth_calls to the token contracts themselves.

  • SolanagetTransaction with jsonParsed, so the node does the instruction parsing. Token accounts are mapped back to the wallets that own them, and balance changes are computed from the transaction's own pre/post state.

  • PricesDefiLlama's coins API supplies USD values at the transaction's own timestamp, keyed by contract address, for all three chains in one batched request. Keyless and CORS-open. It also names tokens the bundled directory does not.

The balance-change view is the source of truth: it is measured from chain state, so the summary stays correct even for contracts and programs nothing in the directory recognises.

Running locally

npm install
npm run dev

Deploying to Vercel

Push the repo and import it — Vercel detects Vite and vercel.json pins the rest. Or:

npx vercel --prod

No environment variables, no API keys, no serverless functions.

Structure

src/lib/
  chains.ts      network config, public RPC lists, input sniffing
  rpc.ts         JSON-RPC client with endpoint failover and batching
  decode.ts      entry point: detect the chain, dispatch, report failures
  explain.ts     turns decoded facts into the headline and the step list
  glossary.ts    beginner definitions behind every underlined term
  prices.ts      historical USD values, added after decoding
  evm/           receipt log parsing, signature lookup, token metadata
  solana/        instruction parsing, token-account ownership, program directory
src/components/  UI, ordered simple → detailed → raw

Adding a network

Add an entry to CHAINS in src/lib/chains.ts. Any EVM chain works immediately — give it public RPC URLs and an explorer, then optionally add address labels in src/lib/evm/known.ts.

Limits worth knowing

  • Public RPCs are rate-limited and occasionally flaky; the client fails over between endpoints.
  • Internal (contract-to-contract) native-coin transfers need debug_traceTransaction, which public endpoints do not expose, so plain ETH/BNB movements inside a contract call are not itemised. They still show up in the balance-change view.
  • Dollar figures are market reference prices at the transaction's timestamp, not the rate you actually traded at, and low-confidence prices are dropped rather than shown. Pricing is a bonus layer: if DefiLlama is unreachable the transaction still decodes in full.
  • Address and token labels are a bundled directory, not a verification service. Anything unlabelled is unverified — the UI says so, and links out to the explorer.

Releases

Packages

Contributors

Languages