Revert Reason Decoder from Raw Bytes
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Revert Reason Decoder from Raw Bytes is a read-only developer tool that decodes revert reasons from raw bytes returned by failed Ethereum transactions. It reads the raw revert bytes (user-provided), an optional transaction receipt (to confirm status), custom error signatures (user-provided), error ABI (user-provided), and previous decode records. The tool then decodes the raw bytes using standard revert formats (Error(string) and Panic(uint256)) and custom error ABIs, displaying a human-readable revert reason that explains why a transaction failed.
HOW TO USE
Connect your wallet via the built-in connector. The tool does not require a specific network but uses the provider for context. Enter the raw revert bytes as a hex string (starting with 0x). Optionally, provide a custom error ABI as a JSON array to decode custom errors. You can also enter a transaction hash to fetch the receipt and confirm the transaction status. The tool will parse the raw bytes and attempt to decode the revert reason. The results display: raw bytes, decoded reason (with a visual indicator for errors), error type (e.g., Error(string), Panic(uint256), custom error), transaction hash (if provided), transaction status (if receipt is fetched), and previous decode records. No transaction is signed or sent—this is a read-only decode.
TECHNICAL MECHANISM
The tool uses ethers.js v5.7.2's `AbiCoder` to decode revert bytes. It first checks for standard revert formats:
- `0x08c379a0`: Error(string) - decodes the string reason.
- `0x4e487b71`: Panic(uint256) - decodes the panic code and maps it to a human-readable message.
If a custom error ABI is provided, the tool uses `ethers.utils.Interface` to parse the error and decode the custom error name and arguments. The tool also attempts to identify custom errors by their signature (first 4 bytes) even without a full ABI. If none of these match, it displays the raw bytes and indicates an unknown error. Optionally, if a transaction hash is provided, the tool fetches the receipt using `provider.getTransactionReceipt(txHash)` to confirm the transaction status. All decoding is performed locally in the browser—no data is sent to any server.
WHAT IT CANNOT SEE
This tool cannot verify that the decoded revert reason is accurate—it relies on the raw bytes provided. It cannot detect if the raw bytes are complete. It cannot guarantee that the custom error signatures are correct. It cannot ensure that the ABI matches the actual error. It cannot validate that the revert reason is meaningful. It cannot detect if the revert was from a different contract. It cannot verify that the decode is reproducible. It cannot predict if the revert reason will be available in the future.
PLEASE NOTE
This tool is EVM-only and works across all supported chains. The decoding is performed locally—no data is transmitted. The tool provides a visual representation of the revert reason but does not execute any tests. For accurate decoding, ensure the raw bytes are complete and the ABI matches the contract. Always verify the decoded reason against the contract's source code if possible.