// SPDX-License-Identifier: MIT pragma solidity 0.8.23; /** * Minimal, self-contained forge-std stand-in for the formal (halmos) suite. * * We deliberately DO NOT vendor the full forge-std / halmos-cheatcodes libraries * (they require `forge install` against a git repo; this tree is not a git repo). * Instead this shim declares only the cheatcodes the symbolic tests actually use, * at the exact HEVM cheatcode address halmos intercepts * (0x7109709ECfa91a80626fF3989D68f67F5b1DD12D). Symbolic inputs are supplied by * halmos automatically as the test functions' parameters, so no svm helper is * needed. Assertions use plain Solidity `assert`: halmos reports any reachable * assertion violation (a Panic(0x01)) as a counterexample. */ interface Vm { /// Constrain a symbolic value (halmos prunes paths where the condition is false). /// Declared `pure` (as in forge-std) so it is callable from view/pure test bodies. function assume(bool condition) external pure; /// Set msg.sender for the NEXT call only. function prank(address sender) external; /// Set msg.sender for all subsequent calls until stopPrank. function startPrank(address sender) external; function stopPrank() external; /// Install runtime bytecode at an address (used to stand up the precompile oracle). function etch(address target, bytes calldata newRuntimeBytecode) external; /// Write a storage slot (used to drive the oracle's symbolic return word). function store(address target, bytes32 slot, bytes32 value) external; /// Read a storage slot. function load(address target, bytes32 slot) external view returns (bytes32); } abstract contract Test { Vm internal constant vm = Vm(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); }