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

Test Data Fixture Generator from Real Chain Data

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

Test Data Fixture Generator from Real Chain Data is a developer-focused tool that generates test fixture files from real contract state on EVM chains. It takes a contract address, storage slot definitions, optional ABI, and optional function call specifications from the user, then reads the current contract state via eth_getStorageAt and eth_call. The tool captures storage slot values, function call results, block number, chain ID, bytecode preview, and timestamp, then outputs the data as a structured fixture in both JSON and JavaScript formats. This enables developers to create realistic test fixtures for unit testing, integration testing, and contract verification based on actual on-chain data rather than manually constructed test data.

HOW TO USE

Connect your wallet to the target EVM chain. Enter the contract address. Define the storage slots to capture, one per line, in the format "slot_hex[:label]" (e.g., "0x0:balance" or "0x1:totalSupply"). Optionally paste the contract ABI (JSON format) to enable function calls. Enter function calls to execute, one per line, in the format "functionName(param1,param2)" (e.g., "balanceOf(0x123...)"). Click "Generate fixture" to capture the current state. The tool will display a summary including the contract address, block number, chain ID, bytecode preview, and the captured storage slots and function call results. The fixture is available in JSON and JavaScript formats for copying or downloading.

TECHNICAL NOTE: STATE CAPTURE AND FIXTURE GENERATION

The tool uses eth_getStorageAt to read each specified storage slot at the current block height. Each slot is padded to 32 bytes using ethers.utils.hexZeroPad for correct addressing. When an ABI is provided, the tool parses function calls from the user input, encodes them using ethers.js ABI encoding, and executes them via eth_call to capture return values. The tool also fetches the contract bytecode via eth_getCode to verify deployment and capture a preview. The captured data is structured into a fixture object containing the address, block number, chain ID, bytecode preview, slots (with decoded uint256 values where applicable), function call results, and a timestamp. The fixture is output in JSON and JavaScript module formats for easy integration with testing frameworks.

WHAT IT CANNOT SEE

The tool cannot generate fixtures for contracts with complex dynamic state (e.g., large mappings, nested structs) without user guidance on which slots to read. It is limited to the accuracy of the provided storage slot definitions; incorrect slots will produce incorrect data. It cannot automatically infer all state variables from the contract. The tool is limited by RPC provider rate limits; reading many slots may be slow or fail. It cannot generate fixtures for non-EVM chains. It cannot handle contracts with large state trees efficiently, as each slot requires a separate RPC call. It cannot generate fixtures for contracts that require specific block conditions (e.g., only valid at certain block numbers).

PLEASE NOTE

This tool is designed exclusively for EVM-compatible chains (Ethereum, Polygon, BNB Chain, Arbitrum, Optimism, Avalanche C-Chain, etc.). It does not support non-EVM blockchains. The tool is read-only and does not modify any state. Generated fixtures are snapshots of the contract state at the time of generation; they may become outdated if the contract state changes. The tool provides no warranty that the generated fixtures are complete or accurate; users are responsible for verifying slot definitions and fixture values.

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.