diff --git a/test/invariant/fuzz/handlers/HandlerAllo.t.sol b/test/invariant/fuzz/handlers/HandlerAllo.t.sol index 352837c9..d81f5698 100644 --- a/test/invariant/fuzz/handlers/HandlerAllo.t.sol +++ b/test/invariant/fuzz/handlers/HandlerAllo.t.sol @@ -243,10 +243,10 @@ contract HandlerAllo is Setup { return _poolIds; } - function _isManager(address _sende, uint256 _poolId) internal returns (bool _isManager) { + function _isManager(address _sende, uint256 _poolId) internal returns (bool __isManager) { for (uint256 _i; _i < ghost_poolManagers[_poolId].length; _i++) { if (msg.sender == ghost_poolManagers[_poolId][_i]) { - _isManager = true; + __isManager = true; break; } } diff --git a/test/invariant/fuzz/properties/PropertiesAllo.t.sol b/test/invariant/fuzz/properties/PropertiesAllo.t.sol index 58ef2e6a..44c65096 100644 --- a/test/invariant/fuzz/properties/PropertiesAllo.t.sol +++ b/test/invariant/fuzz/properties/PropertiesAllo.t.sol @@ -119,7 +119,7 @@ contract PropertiesAllo is HandlersParent { (bool _success,) = targetCall(address(allo), 0, abi.encodeCall(allo.changeAdmin, (_poolId, _newAdmin))); - if (allo.isPoolAdmin(_poolId, msg.sender)) { + if (msg.sender == _admin) { if (_success) { if (_newAdmin != _admin) { assertTrue( @@ -128,8 +128,8 @@ contract PropertiesAllo is HandlersParent { ); } assertTrue(allo.hasRole(_poolAdminRole, _newAdmin), "property-id 10: changeAdmin failed role not set"); - ghost_poolAdmins[_poolId] = _newAdmin; assertTrue(allo.isPoolAdmin(_poolId, _newAdmin), "property-id 10: admin not set"); + ghost_poolAdmins[_poolId] = _newAdmin; } else { assertTrue(_newAdmin == address(0) || _usingAnchor, "property-id 10: changeAdmin failed"); } @@ -157,7 +157,7 @@ contract PropertiesAllo is HandlersParent { (bool _success,) = targetCall(address(allo), 0, abi.encodeCall(allo.addPoolManagers, (_poolId, _managers))); - if (allo.isPoolAdmin(_poolId, msg.sender)) { + if (msg.sender == _admin) { if (_success) { assertTrue( allo.hasRole(_poolManagerRole, _newManager), "property-id 11-a: addPoolManagers failed role not set" @@ -190,7 +190,7 @@ contract PropertiesAllo is HandlersParent { (bool _success,) = targetCall(address(allo), 0, abi.encodeCall(allo.removePoolManagers, (_poolId, _removeManagers))); - if (allo.isPoolAdmin(_poolId, msg.sender)) { + if (msg.sender == _admin) { if (_success) { assertTrue(!allo.hasRole(_poolManagerRole, _manager), "property-id 11-b: removePoolManagers failed"); delete ghost_poolManagers[_poolId]; @@ -218,10 +218,11 @@ contract PropertiesAllo is HandlersParent { function prop_poolManagerCanAlwaysChangeMetadata(uint256 _idSeed, Metadata calldata _metadata) public { _idSeed = bound(_idSeed, 0, ghost_poolIds.length - 1); uint256 _poolId = ghost_poolIds[_idSeed]; + address _admin = ghost_poolAdmins[_poolId]; (bool _success,) = targetCall(address(allo), 0, abi.encodeCall(allo.updatePoolMetadata, (_poolId, _metadata))); - if (_isManager(msg.sender, _poolId) || allo.isPoolAdmin(_poolId, msg.sender)) { + if (_isManager(msg.sender, _poolId) || msg.sender == _admin) { if (_success) { Allo.Pool memory _pool = allo.getPool(_poolId); assertEq(