Transaction Simulation Failure Explainer
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
Transaction Simulation Failure Explainer is a read-only tool that diagnoses why a transaction simulation failed, generating AI-powered plain-language explanations of the error and recommended fixes. It reads transaction simulation error messages, revert reason, gas limit, gas used in simulation, contract state at simulation, call trace, stack trace (if available), transaction calldata, target contract address, sender address, block number, timestamp, contract bytecode, ABI fragments, and failure history for similar transactions. The tool then presents this data alongside an AI-generated explanation of why the transaction simulation failed, interpreting the error message and call trace in plain English, identifying the root cause of the failure, and recommending corrective actions — helping you understand and fix transaction issues before retrying.
HOW TO USE
Connect your wallet using the BGWallet bridge and select your target network. Enter the transaction hash or calldata you want to diagnose and the target contract address. Click "Diagnose failure" to read simulation data. The tool displays the transaction identifier, contract address, revert reason, gas limit, and gas used in simulation. Detailed information includes error type, call trace, stack trace, block number, sender address, and failure history for similar transactions. A recommended action box provides specific steps to fix the issue. An AI explanation appears below the on-chain data, explaining why the transaction simulation failed, interpreting the error message and call trace in plain English, identifying the root cause of the failure, 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 data and simulate transactions. No hardcoded contract addresses are used — you are always in control of which contract you trust. When diagnosing simulation failures, the tool reads the transaction calldata from the user input, simulates the transaction via provider.call() or provider.estimateGas(), captures the error message and revert reason from the simulation, reads gas limit and gas used from the simulation result, reads contract state at simulation time by calling view functions, reads call trace by analyzing the simulation execution path, reads stack trace from the error data if available, reads the target contract address from the user input, reads the sender address from the wallet or transaction, reads block number and timestamp from the provider, reads contract bytecode via provider.getCode(contract), reads ABI fragments from the contract metadata, and checks failure history for similar transactions by scanning past failed 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 simulation failed, interpret the error message and call trace in plain English, identify the root cause, and recommend corrective actions — while stating plainly that it cannot simulate transactions that depend on off-chain state or future block conditions, cannot guarantee that a transaction that passes simulation will succeed on-chain, and cannot detect failures caused by cross-chain dependencies, oracle updates, or time-sensitive conditions. The AI response is capped at 1,024 tokens to ensure concise, focused failure diagnosis. All computed values are guarded against negative numbers — if a gas limit or gas used appears invalid, the tool flags it rather than displaying nonsensical values.
WHAT IT CANNOT SEE
This tool cannot simulate transactions that depend on off-chain state or future block conditions. It cannot guarantee that a transaction that passes simulation will succeed on-chain. It cannot detect failures caused by cross-chain dependencies, oracle updates, or time-sensitive conditions not present at simulation time. It cannot detect malicious intent behind failures beyond the error message. The AI explanation is generated from simulation data only and cannot detect off-chain state dependencies, oracle updates, or cross-chain conditions. It cannot predict whether a transaction will succeed on-chain even if it passes simulation. The tool does not continuously monitor simulation failures; each analysis is a snapshot at the time of the lookup. It cannot detect delayed failures, on-chain state changes, or off-chain factors. 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 transaction success or safety.
PLEASE NOTE
Transaction Simulation Failure 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. Simulation failures can occur for many reasons including insufficient balance, slippage, approvals, and gas issues. Use this tool as a guide only; always cross-check with independent sources and verify transaction details manually for critical decisions. This is experimental software; use at your own risk.