Differential Testing Tool Between Contract Versions
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
Differential Testing Tool Between Contract Versions is a security-focused tool that compares function outputs between two versions of a contract to detect behavioral differences. It takes contract ABIs, old and new contract addresses, function names, and test parameters from the user, then executes the same function on both contracts using eth_call (read-only). The tool compares the return values and revert reasons from both executions, reporting whether they match or differ. Each test case can be added individually, and multiple test cases can be run in a batch. Results are displayed with clear status indicators: Match (✅), Diff (❌), or Error (⚠️). This enables developers and auditors to verify that contract upgrades or changes do not introduce unexpected behavioral changes in view/pure functions.
HOW TO USE
Connect your wallet to the target EVM chain. Paste the contract ABI (JSON format) into the "Contract ABI" text area. Enter the old and new contract addresses, the function name, and parameters as a JSON array. Click "Add test case" to add the test to the batch. Repeat for multiple test cases with different parameters. Click "Run differential tests" to execute all test cases. The tool will call the function on both contracts using eth_call, compare the results, and display a summary showing the number of matches, differences, and errors. Each test case displays its function name, parameters, results from both versions, and a status indicator.
TECHNICAL NOTE: ETH_CALL DIFFERENTIAL EXECUTION
The tool uses eth_call to execute view/pure functions on both contract versions without modifying state. For each test case, it constructs contract instances using the provided ABI and function definition, then calls the function with the specified parameters. The tool captures both successful return values and revert reasons from both calls. The comparison is performed by JSON-stringifying the return values; if the strings match, the test is marked as "Match." If one call succeeds and the other fails, or if the return values differ, the test is marked as "Diff." If both calls fail, the test is marked as "Error." The tool runs tests sequentially and displays progress during execution.
WHAT IT CANNOT SEE
The tool cannot test functions that modify state (non-view/non-pure functions). It is limited to read-only view and pure functions. It cannot handle cross-contract dependencies in tests, as the tool only calls the target contract directly. The tool is limited to the accuracy of the provided ABI; incorrect ABIs will produce incorrect results. It cannot test functions with complex return types (e.g., nested arrays, structs) efficiently without proper ABI support. It cannot test contracts on non-EVM chains. The tool is limited by RPC provider rate limits. It cannot guarantee that differences are actual bugs rather than expected changes in the new version.
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. Differential testing results indicate behavioral differences but do not confirm correctness. Users are responsible for verifying that differences are expected and do not introduce security vulnerabilities. The tool provides no warranty that the test results are complete or accurate; users should supplement with additional testing and manual review.