io.github.SUNDRAM07/txwhy

TxWhy

Failed Solana transaction in, working transaction out. Exact cause, rebuilt tx, verifiable repair.

0.2.0
Version
remote
Transport
3
Tools

Security review

Review passed

Reviewed 1d ago.

  • tools: 3 tools scanned
  • metadata: scanned

No findings.

Tools (3)

  • repair_transaction

    Give it a Solana transaction that failed, or one you are about to send. It finds the cause and returns a rebuilt UNSIGNED transaction that has been simulated against live mainnet state to prove it passes. Fixes expired blockhashes, compute-unit limits, priority fees, loaded-data limits, slippage on plain Jupiter swaps (fresh quote, same tolerance), and slippage on direct Pump.fun, PumpSwap, Raydium AMM v4, Meteora DBC and Meteora DAMM v2 swaps (only the limit moves, never more than 25% against the user). Handles legacy, v0 and version 1 (SIMD-0385) transactions and durable nonces. When the failure cannot be fixed by rebuilding (not enough funds, a private program's own error), it says so and explains why instead of returning something that would fail again. Pass exactly one of `transaction` or `signature`. Sign the returned transaction with your own key and send it within about 60 seconds.

  • diagnose_transaction

    Explains why a transaction that landed on mainnet failed: the exact failing instruction in the call tree, the named error, its cause, and how to fix it. Read-only and fast. Use repair_transaction when you want a working transaction back.

  • explain_error

    Looks up what a custom program error code means for a given program, using 1,800+ named errors from major Solana programs plus the runtime's own errors. Use it when you only have a code such as 6001 or 0x1771 from a simulation or an RPC response.