github.com/ethereum-optimism/optimism@v1.7.2/packages/contracts-bedrock/test/kontrol/proofs/utils/KontrolUtils.sol (about) 1 // SPDX-License-Identifier: MIT 2 3 // This file exists to provide the `internal constant vm` on top of `KontrolCheats`. 4 // The reason for explicitly defining `vm` here instead of inheriting Forge's `Test` 5 // contract is the K summary of the `copy_memory_to_memory` function. 6 // This summary dependent on the bytecode of the test contract, which means that if `Test` 7 // was inherited, updating the version of `Test` could potentially imply having to adjust 8 // said summary for the latest version, introducing a flakiness source. 9 // Note that starting with version 0.8.24, the opcode `MCOPY` is introduced, removing the 10 // need for the `copy_memory_to_memory` function and its summary, and thus this workaround. 11 // For more information refer to the `copy_memory_to_memory` summary section of `pausability-lemmas.md`. 12 13 pragma solidity 0.8.15; 14 15 import { Vm } from "forge-std/Vm.sol"; 16 import { KontrolCheats } from "kontrol-cheatcodes/KontrolCheats.sol"; 17 18 /// @notice Tests inheriting this contract cannot be run with forge 19 abstract contract KontrolUtils is KontrolCheats { 20 Vm internal constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); 21 }