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

Contract State Diff Tool Between Blocks

Analytics · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — nothing to install.
CategoryAnalytics
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

Contract State Diff Tool Between Blocks is an analytics-focused tool that compares contract storage state between two different block heights. It takes a contract address, two block numbers (earlier and later), and a list of storage slot definitions from the user. The tool reads the value of each specified slot at both block heights using eth_getStorageAt, then compares the values to identify changes. It also fetches the contract bytecode via eth_getCode at both blocks to verify deployment and detect any code changes. The output includes a diff report showing each slot's label, slot address, values at both blocks, decoded uint256 values where applicable, and a clear status indicator (CHANGED, UNCHANGED, or ERROR). Block timestamps and headers are displayed for context. This enables developers, auditors, and analysts to detect state changes between blocks, investigate contract behavior, and perform forensic analysis.

HOW TO USE

Connect your wallet to the target EVM chain. Enter the contract address, the earlier block number (Block A), and the later block number (Block B). Define the storage slots to diff, one per line, in the format "slot_hex[:label]" (e.g., "0x0:balance" or "0x1:totalSupply"). Click "Diff state" to compare the state at both blocks. The tool will display a summary including block numbers, timestamps, bytecode previews, and a count of changed, unchanged, and error results. Each slot entry shows its label, slot, values at both blocks, decoded uint256 values, and a status indicator. The results can be exported as a JSON file for further analysis.

TECHNICAL NOTE: ARCHIVAL STATE READING AND DIFF COMPUTATION

The tool uses eth_getStorageAt with block tag parameters to read storage slot values at two different block heights. This requires an archival RPC node that maintains historical state. Each slot is padded to 32 bytes using ethers.utils.hexZeroPad for correct addressing. The tool also fetches bytecode at both blocks using eth_getCode to verify the contract was deployed at both heights and to detect any code changes. Block timestamps and headers are fetched via eth_getBlock to provide temporal context. The diff comparison is performed by checking the hex strings of the slot values; when different, the tool displays both values with old and new labels and decodes them as uint256 where possible. Results are presented with color-coded status indicators.

WHAT IT CANNOT SEE

The tool cannot diff contracts that were not deployed at both block heights; if the contract was created or self-destructed between blocks, the diff will fail. It is limited to the accuracy of the provided storage slot definitions; incorrect slots will produce incorrect comparisons. It cannot detect changes in private or internal state without the user providing the correct slot numbers. The tool is limited by the RPC provider's archival capabilities; historical state may not be available on all nodes. It cannot diff contracts on non-EVM chains. It cannot handle large numbers of storage slots efficiently, as each slot requires two RPC calls. It cannot detect state changes that occur within the same block, as the tool compares snapshots at discrete block heights.

PLEASE NOTE

This tool is designed exclusively for EVM-compatible chains (Ethereum, Polygon, BNB Chain, Arbitrum, Optimism, Avalanche C-Chain, etc.) with archival node support. It does not support non-EVM blockchains. The tool is read-only and does not modify any state. Archival node access is required for historical block queries; free RPC endpoints may not support this. The tool provides no warranty that the diff results are complete or accurate; users are responsible for verifying slot definitions and block heights.

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.