From 7ada60b14f59374294f0f85238f6f27ec5f27271 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Tue, 28 May 2024 11:54:21 +0200 Subject: [PATCH] chore: styling --- test/invariants/fuzz/Greeter.t.sol | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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())); } }