Local Chain State Reset Tool
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
Local Chain State Reset Tool is a read-only developer tool that simulates state resets for EVM local chain nodes by comparing current and historical state for any contract address. It reads the current chain state (balance and bytecode) and fetches historical state from a target block, identifies differences, and generates a detailed reset simulation report. The tool helps developers plan node state recovery, test revert scenarios, and understand the impact of rolling back chain state before performing manual node resets or restores. It is essential for debugging local node issues, testing state rollback procedures, and verifying that a reset would achieve the desired outcome.
HOW TO USE
Connect your EVM-compatible wallet via the BGWallet bridge and select the network where your local node is connected. Enter the contract address to reset and a target block number (the state you want to revert to). Click "Simulate State Reset" to fetch current state and historical state at the target block. Results include a detailed comparison showing current vs. historical balances, code differences, contract status, and a summary of whether any state changes would occur. The tool also provides manual reset instructions for local nodes (Geth, Nethermind, etc.). All analysis is read-only—no signatures or transactions are submitted.
TECHNICAL MECHANISM
The tool uses ethers.js v5.7.2 to fetch current chain state via the provider and historical state using block-number-specific RPC calls. It retrieves the current block number via provider.getBlockNumber() and validates that the target block is not in the future. For the target block, the tool fetches the block header using provider.getBlock(targetBlock) to verify existence and extract metadata. State reads are performed using provider.getBalance(address, blockNumber) and provider.getCode(address, blockNumber) for both current and historical states. The balance is returned as a BigNumber (converted to string for display) and the code as a hex string (truncated for readability). The tool compares balances using BigNumber comparison (currentBalance.eq(historicalBalance)) and compares code strings directly (currentCode === historicalCode). The simulation also identifies whether the address is a contract or EOA at both states. The results are presented in a structured dashboard with color-coded diff indicators and a summary of whether a reset would change state. The tool does not perform any write operations or interact with node configuration—it only reads state data.
WHAT IT CANNOT SEE
This tool has fundamental limitations that users must understand. It cannot actually reset or modify chain state—the tool is a simulation only and does not interact with node configuration, chaindata directories, or any storage infrastructure. It cannot guarantee that a state reset will be successful without manual node intervention—the actual reset process depends on node-specific commands, backup availability, and chain configuration. It cannot trigger chain reorgs or revert blocks—the tool cannot influence the consensus layer or transaction history. It cannot reset state on remote nodes or public RPC endpoints—the tool only reads from these endpoints and cannot modify them. It cannot automatically backup state before reset—the tool does not have access to node storage. It cannot handle state resets that require consensus changes or hard forks. It cannot determine if the target block is actually available for reset (e.g., archival node required). It cannot account for storage slot changes beyond balance and code. It cannot restore snapshots or apply state diffs. The tool's instructions are generic and may vary by node client. Always test reset procedures in a development environment before applying to production nodes.
PLEASE NOTE
This tool only supports EVM-compatible blockchains (Ethereum, Polygon, BSC, Avalanche C-Chain, Optimism, Arbitrum, and their testnets). Solana, Tron, Starknet, SUI, TON, Aptos, Bitcoin, Cosmos, and XRP are not supported. The tool is free, open-source, requires no API keys, and uses the wallet's native provider for all read operations. Node state resets are advanced operations—always consult your node client's documentation and backup your chaindata before attempting any reset.