Layer 2 State Validator
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
This tool provides on-chain state validation for Layer 2 networks and EVM-compatible chains. It allows developers, auditors, and users to verify contract code and storage, account balances and nonces, block headers with state roots, and transaction receipts with logs. Unlike relying on block explorers or third-party APIs, this tool connects directly to the blockchain via your wallet's RPC provider, giving you unfiltered access to the raw state data. You can inspect storage slots, validate state roots, check transaction execution status, and verify that the L2 state is consistent with what you expect. It's designed for cross-chain developers, security researchers, and anyone who needs to independently verify L2 state without trusting a centralized indexer.
HOW TO USE
Connect your wallet using the BGWallet bridge and select your target L2 network (Optimism, Arbitrum, Base, zkSync, Linea, or others). Choose the validation type: Contract state & code, Account balance & nonce, Block header & state root, or Transaction receipt & logs. Enter the corresponding identifier — an address, block number, or transaction hash. For contract state validation, optionally enter storage slot numbers to read specific contract storage values. Click "Validate state" to execute the query. Results appear in the results panel with formatted JSON output. The tool reads contract code, balance, nonce, storage slots, block headers with state roots, and transaction receipts with execution status and logs.
TECHNICAL MECHANISM
The tool uses ethers.js v5.7.2 to interact with the blockchain via BGWallet's provider. For contract validation, it retrieves code using getCode(), balance using getBalance(), nonce using getTransactionCount(), and storage slots using getStorageAt(). It computes the code hash via keccak256 for integrity verification. For account validation, it combines balance, nonce, and contract detection. For block validation, it retrieves full block headers including stateRoot, transactionsRoot, and receiptsRoot, providing the foundational data for state verification. For transaction validation, it fetches both the transaction and its receipt, checking execution status, gas used, and logs. The tool attempts to detect L2 contract types (Arbitrum-style, Optimism-style, zkSync-style) by analyzing code patterns, helping identify which L2 stack a contract belongs to. All BigNumber values are converted to strings for human-readable output.
WHAT IT CANNOT SEE
This tool cannot verify the security or correctness of the L2 sequencer or validator set. It cannot prove that the L2 state root matches the L1 commitment without access to L1 data (it only reads the L2 RPC). It cannot detect off-chain fraud, censorship, or malicious activity that doesn't appear on-chain. It cannot verify the validity of zk proofs or fraud proofs programmatically — that requires specialized proof verification libraries. It cannot determine if the L2 is operating correctly or if the sequencer is withholding transactions. It cannot verify that the contract code it reads is the actual code being executed by the L2 (if the L2 uses a different VM). It does not validate that the chain configuration (chain ID, gas parameters, etc.) matches what you expect.
PLEASE NOTE
EVM chains only. Supports Optimism, Arbitrum, Base, zkSync, Linea, Ethereum, Polygon, and other EVM-compatible networks with standard JSON-RPC support. Does not support Solana, Tron, Starknet (non-EVM), SUI, TON, Aptos, Bitcoin, Cosmos, or XRP. Requires a wallet connected via BGWallet to provide the RPC provider. The tool is read-only and does not sign any transactions. Always verify the contract address, block number, or transaction hash independently before validating.