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

Failed Transaction Post-Mortem Explainer

Security · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategorySecurity
PlatformAll
Pricing $4.99/mo
Installs0
Free 7-day trial, no card. Or hold 25,000 BOT instead.
Get BotSurf — free
The browser these apps run in. Free on every platform, no account needed to try an app.

About this app

WHAT IT DOES

Failed Transaction Post-Mortem Explainer is a read-only tool that analyzes failed blockchain transactions, generating AI-powered plain-language explanations of why they failed and how to fix them. It reads transaction receipts, revert reasons, gas used, gas limit, transaction status, block number, transaction hash, sender address, target contract address, calldata, error logs, event logs, contract state at the time of failure, reverted opcode, stack trace (if available), gas price, nonce, and transaction history for the sender. The tool then presents this data alongside an AI-generated explanation of why the transaction failed, analyzing the revert reason and error logs in plain language, and recommending corrective actions before you retry the transaction.

HOW TO USE

Connect your wallet using the BGWallet bridge and select your target network. Enter the transaction hash of the failed transaction you want to analyze. Optionally enter the target contract address. Click "Analyze failed transaction" to read on-chain transaction data. The tool displays the transaction hash, sender address, target contract, status (Failed), and revert reason. Detailed information includes block number, gas used, gas limit, gas price, nonce, error logs, event logs, reverted opcode, and stack trace. A recommended action box provides specific steps to fix the issue. An AI explanation appears below the on-chain data, explaining why the transaction failed, analyzing the revert reason and error logs in plain language, and recommending corrective actions before you retry the transaction. The wallet's own signature step still protects you — this explanation is informational only and does not replace reviewing what you approve in your wallet.

TECHNICAL MECHANISM

The tool uses ethers.js v5.7.2 with the provider from the BGWallet bridge to read on-chain transaction data. No hardcoded contract addresses are used — you are always in control of which contract you trust. When analyzing failed transactions, the tool reads the transaction receipt via provider.getTransactionReceipt(txHash), reads the revert reason by decoding the receipt's status and revert data (via provider.call() or receipt decoding), reads the gas used from the receipt, reads the gas limit from the transaction, reads the transaction status (0 for failure, 1 for success) from the receipt, reads the block number from the receipt, reads the transaction hash from the user input, reads the sender address from the transaction, reads the target contract address from the transaction or user input, reads the calldata from the transaction, reads error logs from the receipt's logs (if available), reads event logs from the receipt's logs, reads the contract state at the time of failure by calling the contract's view functions at the block of failure, reads the reverted opcode from the revert data or receipt, reads the stack trace from the revert data if available, reads the gas price from the transaction, reads the nonce from the transaction, and reads the transaction history for the sender via provider.getTransactionCount(sender) and scanning previous transactions. The tool fetches event logs by walking backwards in chunks and halving chunk size on failure, ensuring logs are properly read despite varying RPC limitations. The data is formatted and passed to the AI bridge via BGAI.generate() with a structured prompt that includes all the on-chain data read. The AI is instructed to explain why the transaction failed, analyze the revert reason and error logs in plain language, and recommend corrective actions — while stating plainly that it cannot reconstruct the exact contract state before the failed transaction if not logged, cannot detect off-chain reasons for failure such as front-running or mempool reordering that are not reflected in the receipt, and cannot predict whether a retry will succeed without additional context. The AI response is capped at 1,024 tokens to ensure concise, focused post-mortem assessments. All computed values are guarded against negative numbers — if a gas value or nonce appears invalid, the tool flags it rather than displaying nonsensical values.

WHAT IT CANNOT SEE

This tool cannot reconstruct the exact contract state before the failed transaction if not logged. It cannot detect off-chain reasons for failure such as front-running or mempool reordering that are not reflected in the receipt. It cannot predict whether a retry will succeed without additional context. The AI explanation is generated from on-chain data only and cannot detect off-chain contract state, hidden revert conditions, or contract logic not exposed on-chain. It cannot predict whether a retry will succeed if the underlying condition that caused the failure has changed. The tool does not continuously monitor failed transactions; each analysis is a snapshot at the time of the lookup. It cannot detect delayed failures, contract state changes after failure, or off-chain conditions. The tool does not store any data persistently; all state is in-memory and resets on reload. The AI explanation is informational and does not constitute financial advice, legal advice, or a guarantee of retry success or transaction safety.

PLEASE NOTE

Failed Transaction Post-Mortem Explainer works exclusively with EVM-compatible chains. It requires a Web3 wallet (MetaMask or similar) and the BGWallet bridge. Explanations are AI-generated from data the app reads on-chain — always review what you are actually signing in your wallet before approving it. Failed transactions carry significant risk including gas fee loss, unexpected outcomes, and repeated failures. Use this tool as a guide only; always cross-check with independent sources and contract documentation before retrying. This is experimental software; use at your own risk.

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.