diff --git a/test/invariants/fuzz/Greeter.t.sol b/test/invariants/fuzz/Greeter.t.sol index 302a984f..25bc86d3 100644 --- a/test/invariants/fuzz/Greeter.t.sol +++ b/test/invariants/fuzz/Greeter.t.sol @@ -9,30 +9,30 @@ interface IHevm { contract InvariantGreeter { // See https://github.com/a16z/halmos-cheatcodes?tab=readme-ov-file - IHevm public hevm = IHevm(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); + IHevm internal _hevm = IHevm(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); - Greeter public targetContract; + Greeter internal _targetContract; constructor() { - targetContract = new Greeter('a', IERC20(address(1))); + _targetContract = new Greeter('a', IERC20(address(1))); } function checkGreeterNeverEmpty(string memory newGreeting) public { // Execution - (bool success,) = address(targetContract).call(abi.encodeCall(Greeter.setGreeting, newGreeting)); + (bool success,) = address(_targetContract).call(abi.encodeCall(Greeter.setGreeting, newGreeting)); // Check output condition - assert((success && keccak256(bytes(targetContract.greeting())) != keccak256(bytes(''))) || !success); + assert((success && keccak256(bytes(_targetContract.greeting())) != keccak256(bytes(''))) || !success); } function checkOnlyOwnerSetsGreeting(address caller) public { // Input conditions - hevm.prank(caller); + _hevm.prank(caller); // Execution (bool success,) = address(this).call(abi.encodeCall(Greeter.setGreeting, 'hello')); // Check output condition - assert((success && msg.sender == targetContract.OWNER()) || (!success && msg.sender != targetContract.OWNER())); + assert((success && msg.sender == _targetContract.OWNER()) || (!success && msg.sender != _targetContract.OWNER())); } }