This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Panic Code Explainer from Revert Data

Developer Tools · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — nothing to install.
CategoryDeveloper Tools
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

Panic Code Explainer from Revert Data takes the raw revert bytes from a failed Ethereum transaction and determines whether it is a standard Solidity panic error. If it is, the tool extracts the panic code (a uint256 value) and looks it up in a comprehensive database of known Solidity panic codes. For each code, it provides: the official panic name (e.g., "Arithmetic overflow"), a clear description of what caused the panic, and a practical suggestion for how to fix the issue in your contract. The output is presented in a clean card showing the panic code in hex and decimal, the error name, a full explanation, and actionable debugging advice — no more searching through Solidity documentation to remember what "0x12" means.

HOW TO USE

Paste a transaction hash into the transaction input field — the tool fetches the receipt, checks if it reverted, and extracts the revert reason automatically. If your RPC does not expose revert reasons, or if you already have the raw revert data from another source, paste it directly into the raw data input field (format: 0x followed by hex bytes). Click "Explain from tx" to fetch and analyze a transaction, or "Explain raw" to decode a hex string you provide. The results card shows whether the data is a panic, and if so, displays the code, name, description, and suggested fix. If the data is not a standard Solidity panic, the tool clearly states that and shows the selector it found instead.

THE REAL MECHANISM — why this beats grepping through compiler source

Solidity panics are encoded as the error "Panic(uint256)" with the selector 0x4e487b71, followed by a 32-byte uint256 representing the panic code. The tool first checks the first 4 bytes of the revert data against this known selector. If it matches, it slices the next 32 bytes (or as many as are available) and parses them as a uint256 using ethers.js's BigNumber. The resulting integer is then mapped to a curated database of panic codes derived from the official Solidity documentation and compiler source. Each entry includes the code's hex representation, the official name (e.g., "Arithmetic underflow" for 0x11), a plain-English description of what that panic means in the context of EVM execution, and a targeted debugging suggestion that points to the most common causes. The database covers all standard panic codes from 0x00 through 0x71, including assertion failures, array bounds errors, division by zero, and external call failures. The tool distinguishes between panic codes that are compiler-inserted (like overflow checks in Solidity 0.8+) and those that come from explicit assert() statements, giving you context about whether the panic was triggered by a user error or an invariant violation.

WHAT IT CANNOT SEE

- Cannot detect panic codes if the revert data is not formatted as a standard Solidity Panic(uint256) error — custom errors with the same selector are indistinguishable without an ABI.

- Cannot distinguish between a legitimate panic and a custom error that happens to use the same 4-byte selector (0x4e487b71) — the tool assumes it is a panic.

- Cannot explain panics that occur in assembly blocks or inline assembly where the Solidity compiler does not generate the standard panic encoding — those revert with custom data.

- Cannot determine the exact source line, function name, or contract that triggered the panic without debug symbols or source mappings — the tool only decodes the error itself.

- Cannot decode panics from non-Solidity contracts (Vyper, Huff, Yul, or handwritten EVM) because those languages do not use the same panic encoding.

- Cannot recover the panic code if the revert data is truncated or malformed — the tool will show a parsing error.

- Cannot explain panic codes that are not in the database — the tool will show "Unknown panic code" and suggest checking the Solidity documentation for newer codes.

PLEASE NOTE

This tool works exclusively on EVM-compatible chains (Ethereum, Goerli, Sepolia, Polygon, Arbitrum, Optimism, and any chain that supports standard eth_getTransactionReceipt). It does not support non-EVM chains. The tool is read-only — it never sends transactions. No data is stored remotely; all decoding happens in your browser. Panic codes are specific to Solidity 0.8.0 and later; older Solidity versions used the now-deprecated "invalid opcode" pattern for assertions. If your transaction reverted with no data, this tool will not help — that is a different kind of failure (e.g., out-of-gas or a plain revert() without a reason string).

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.