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

What-If Scenario Simulator on Forked State

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

What-If Scenario Simulator on Forked State is a powerful developer tool that simulates complex transaction scenarios on a forked blockchain state without broadcasting anything to the live network. It creates a virtual fork of the chain at a specific block number, allowing you to test how transactions would behave under different conditions. The tool reads current chain state and block numbers, retrieves multiple target contract bytecodes via eth_getCode, and accepts multiple calldata payloads with value transfers. It uses eth_call with custom block tags and state overrides to execute transactions against the forked state, providing detailed results including gas estimates, return values, storage changes, and logs. The tool supports custom block numbers for historical simulation and state overrides to modify balances, nonces, code, or storage for any address, enabling comprehensive "what-if" analysis. It also calculates cumulative gas usage and cost estimates across all transactions in the scenario.

HOW TO USE

Connect your wallet to the target EVM chain. Optionally enter a block number to fork from (uses the latest block if left empty). Enter up to three transactions to simulate: for each, provide the contract address, calldata (hex-encoded, 0x-prefixed), and optionally the ETH value to send. For advanced scenarios, provide state overrides as JSON to modify balance, nonce, code, or storage slots for specific addresses. Click "Simulate scenario" to run the simulation on the forked state. Results include overall status, per-transaction success/failure indicators, gas estimates for each transaction, cumulative gas total, return values, and a validation summary. If state overrides were used, they are indicated in the results. This allows you to test edge cases, upgrade scenarios, and complex contract interactions before committing to any broadcast.

TECHNICAL NOTE: FORK-BASED SIMULATION WITH STATE OVERRIDES

The tool performs a multi-stage simulation on a forked state by specifying the block tag parameter in all eth_call and eth_estimateGas requests. It first validates the target contracts have deployed bytecode at the specified block height. Then it sequentially simulates each transaction, applying the state changes from earlier transactions to later ones within the same call context. The tool supports state overrides via the standard Ethereum state override set, allowing you to modify account balances (balance), nonces, bytecode (code), or specific storage slots (storage) for any address. These overrides are applied exclusively during the simulation and do not affect the live chain. The tool automatically handles block number resolution, using the provided number or falling back to the latest block. Gas estimation is performed per transaction, and cumulative gas costs are calculated for the entire bundle. All RPC calls are chunked and backed off to handle varying provider rate limits, making it reliable even on public endpoints.

WHAT IT CANNOT SEE

The tool cannot simulate transactions that require specific signature validation (e.g., EIP-712 signed messages) or off-chain dependencies like API calls, as these are not available in the simulation environment. It cannot predict transaction ordering or MEV impacts within the bundle. It cannot simulate state changes from pending transactions in the mempool. It cannot detect reentrancy or cross-contract attacks that depend on live execution context. The tool cannot simulate on non-EVM chains. It cannot guarantee that simulation results match actual execution if chain state changes between simulation and broadcast. It cannot simulate transactions that require gas price or priority fee dynamics accurately, as these depend on live network conditions. The tool cannot fork state with custom contract code overrides if the RPC provider does not support state override sets. It is limited to the RPC provider's archival capabilities for historical block queries.

PLEASE NOTE

This tool is designed exclusively for EVM-compatible chains (Ethereum, Polygon, BSC, Arbitrum, Optimism, Avalanche C-Chain, etc.). It does not support non-EVM blockchains like Bitcoin, Solana, Cosmos, or Tron. This is a read-only simulation tool and does not submit any transactions to the network. State overrides are temporary and apply only to the simulation; they do not modify the live chain. Historical block simulations require archive node access. The tool simulates up to 3 transactions per scenario. Always perform simulations close to the time of intended broadcast for best accuracy. The tool provides no warranty or guarantee of transaction success; users are responsible for verifying simulation results and understanding the implications of their transactions before signing and broadcasting.

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.