From 480006aa827236582885f15295090b74f74ce7a7 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Mon, 21 Oct 2024 14:41:41 +0200 Subject: [PATCH 1/3] test(medusa): strategies tracking --- test/invariant/PROPERTIES.md | 17 ++-- test/invariant/fuzz/Setup.t.sol | 11 +-- .../invariant/fuzz/handlers/HandlerAllo.t.sol | 25 ++++-- .../fuzz/handlers/HandlerStrategy.t.sol | 4 +- test/invariant/fuzz/helpers/Pools.t.sol | 90 +++++++++++++++++++ .../fuzz/properties/PropertiesAllo.t.sol | 84 +++++++++-------- 6 files changed, 168 insertions(+), 63 deletions(-) create mode 100644 test/invariant/fuzz/helpers/Pools.t.sol diff --git a/test/invariant/PROPERTIES.md b/test/invariant/PROPERTIES.md index bc3a8da31..33ca9b58a 100644 --- a/test/invariant/PROPERTIES.md +++ b/test/invariant/PROPERTIES.md @@ -86,14 +86,15 @@ | Function Name | Sighash | Function Signature | Handler | | ------------------------- | -------- | ---------------------------------------------------------------- | ------- | | initialize | c4d66de8 | initialize(address) | NA | -| createProfile | 3a92f65f | createProfile(uint256,string,(uint256,string),address,address[]) | [] | -| updateProfileName | cf189ff2 | updateProfileName(bytes32,string) | [] | -| updateProfileMetadata | ac402839 | updateProfileMetadata(bytes32,(uint256,string)) | [] | -| updateProfilePendingOwner | 3b66dacd | updateProfilePendingOwner(bytes32,address) | [] | -| acceptProfileOwnership | 2497f3c6 | acceptProfileOwnership(bytes32) | [] | -| addMembers | 5063f361 | addMembers(bytes32,address[]) | [] | -| removeMembers | e0cf1e4c | removeMembers(bytes32,address[]) | [] | -| recoverFunds | 24ae6a27 | recoverFunds(address,address) | [] | +| createProfile | 3a92f65f | createProfile(uint256,string,(uint256,string),address,address[]) | [x] | +| updateProfileName | cf189ff2 | updateProfileName(bytes32,string) | [x] | +| updateProfileMetadata | ac402839 | updateProfileMetadata(bytes32,(uint256,string)) | [x] | +| updateProfilePendingOwner | 3b66dacd | updateProfilePendingOwner(bytes32,address) | [x] | +| acceptProfileOwnership | 2497f3c6 | acceptProfileOwnership(bytes32) | [x] | +| addMembers | 5063f361 | addMembers(bytes32,address[]) | [x] | +| removeMembers | e0cf1e4c | removeMembers(bytes32,address[]) | [x] | +| recoverFunds | 24ae6a27 | recoverFunds(address,address) | []* | +* via Allo.sol ## Base strategy | Function Name | Sighash | Function Signature | Handler | diff --git a/test/invariant/fuzz/Setup.t.sol b/test/invariant/fuzz/Setup.t.sol index 29765ed81..b38f71f8e 100644 --- a/test/invariant/fuzz/Setup.t.sol +++ b/test/invariant/fuzz/Setup.t.sol @@ -10,18 +10,17 @@ import {IRegistry} from "contracts/core/interfaces/IRegistry.sol"; import {DirectAllocationStrategy} from "contracts/strategies/examples/direct-allocation/DirectAllocation.sol"; import {Actors} from "./helpers/Actors.t.sol"; +import {Pools} from "./helpers/Pools.t.sol"; import {Utils} from "./helpers/Utils.t.sol"; import {FuzzERC20, ERC20} from "./helpers/FuzzERC20.sol"; -contract Setup is Actors { +contract Setup is Actors, Pools { uint256 percentFee; uint256 baseFee; Allo allo; Registry registry; - DirectAllocationStrategy strategy_directAllocation; - ERC20 token; address protocolDeployer = makeAddr("protocolDeployer"); @@ -58,8 +57,10 @@ contract Setup is Actors { forwarder ); - // Deploy base strategy - strategy_directAllocation = new DirectAllocationStrategy(address(allo)); + // Deploy strategies implementations + _initImplementations(address(allo)); + + // strategy_directAllocation = new DirectAllocationStrategy(address(allo)); // Deploy token token = ERC20(address(new FuzzERC20())); diff --git a/test/invariant/fuzz/handlers/HandlerAllo.t.sol b/test/invariant/fuzz/handlers/HandlerAllo.t.sol index 4c6158e37..f51d9b5cb 100644 --- a/test/invariant/fuzz/handlers/HandlerAllo.t.sol +++ b/test/invariant/fuzz/handlers/HandlerAllo.t.sol @@ -3,16 +3,24 @@ pragma solidity ^0.8.19; import {Setup} from "../Setup.t.sol"; import {IRegistry} from "contracts/core/Registry.sol"; -import {Allo, Metadata} from "contracts/core/Allo.sol"; +import {Allo, IAllo, Metadata} from "contracts/core/Allo.sol"; import {FuzzERC20} from "../helpers/FuzzERC20.sol"; contract HandlerAllo is Setup { - uint256[] ghost_poolIds; mapping(uint256 _poolId => address[] _managers) ghost_poolManagers; mapping(uint256 _poolId => address _poolAdmin) ghost_poolAdmins; mapping(uint256 _poolId => address[] _recipients) ghost_recipients; - function handler_createPool(uint256 _msgValue) public { + function handler_createPool( + uint256 _msgValue, + uint256 _seedPoolStrategy + ) public { + _seedPoolStrategy = bound( + _seedPoolStrategy, + uint256(type(PoolStrategies).min) + 1, // Avoid None elt + uint256(type(PoolStrategies).max) + ); + // Get the profile ID IRegistry.Profile memory profile = registry.getProfileByAnchor( _ghost_anchorOf[msg.sender] @@ -21,6 +29,10 @@ contract HandlerAllo is Setup { // Avoid EOA if (profile.anchor == address(0)) return; + // Avoid redeploying pool with a strategy already tested + if (_strategyHasImplementation(PoolStrategies(_seedPoolStrategy))) + return; + // Create a pool (bool succ, bytes memory ret) = targetCall( address(allo), @@ -29,7 +41,7 @@ contract HandlerAllo is Setup { allo.createPool, ( profile.id, - address(strategy_directAllocation), + _strategyImplementations[PoolStrategies(_seedPoolStrategy)], bytes(""), address(token), 0, @@ -41,9 +53,12 @@ contract HandlerAllo is Setup { if (succ) { uint256 _poolId = abi.decode(ret, (uint256)); - ghost_poolIds.push(_poolId); ghost_poolAdmins[_poolId] = msg.sender; + + _recordPool(_poolId, PoolStrategies(_seedPoolStrategy)); } + + assert(ghost_poolIds.length < 4); } function handler_updatePoolMetadata( diff --git a/test/invariant/fuzz/handlers/HandlerStrategy.t.sol b/test/invariant/fuzz/handlers/HandlerStrategy.t.sol index 87a7b9315..84f28439d 100644 --- a/test/invariant/fuzz/handlers/HandlerStrategy.t.sol +++ b/test/invariant/fuzz/handlers/HandlerStrategy.t.sol @@ -17,10 +17,10 @@ contract HandlerStrategy is HandlerAllo { // Withdraw (bool succ, ) = targetCall( - address(allo), + address(_pool.strategy), 0, abi.encodeCall( - strategy_directAllocation.withdraw, + BaseStrategy.withdraw, (_pool.token, _amount, _recipient) ) ); diff --git a/test/invariant/fuzz/helpers/Pools.t.sol b/test/invariant/fuzz/helpers/Pools.t.sol new file mode 100644 index 000000000..cae89262e --- /dev/null +++ b/test/invariant/fuzz/helpers/Pools.t.sol @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.19; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {Utils} from "./Utils.t.sol"; +import {Anchor} from "contracts/core/Anchor.sol"; +import {Allo, IAllo} from "contracts/core/Allo.sol"; + +import {DirectAllocationStrategy} from "contracts/strategies/examples/direct-allocation/DirectAllocation.sol"; +import {DonationVotingOnchain} from "contracts/strategies/examples/donation-voting/DonationVotingOnchain.sol"; +import {EasyRPGF} from "contracts/strategies/examples/easy-rpgf/EasyRPGF.sol"; +import {QVImpactStream} from "contracts/strategies/examples/impact-stream/QVImpactStream.sol"; +import {QVSimple} from "contracts/strategies/examples/quadratic-voting/QVSimple.sol"; +import {RFPSimple} from "contracts/strategies/examples/rfp/RFPSimple.sol"; +import {SQFSuperfluid} from "contracts/strategies/examples/sqf-superfluid/SQFSuperfluid.sol"; + +contract Pools is Utils { + Allo private allo; + + enum PoolStrategies { + None, + DirectAllocation, + DonationVoting, + EasyRPGF, + ImpactStream, + QuadraticVoting, + RFP, + SQFSuperfluid + } + + uint256[] internal ghost_poolIds; + // mapping(uint256 _poolId => PoolStrategies _strategy) internal _poolStrategy; + + mapping(PoolStrategies _strategy => address _implementation) + internal _strategyImplementations; + + function _initImplementations(address _allo) internal { + _strategyImplementations[PoolStrategies.DirectAllocation] = address( + new DirectAllocationStrategy(_allo) + ); + _strategyImplementations[PoolStrategies.DonationVoting] = address( + new DonationVotingOnchain(_allo, "MyFancyName") + ); + _strategyImplementations[PoolStrategies.EasyRPGF] = address( + new EasyRPGF(_allo) + ); + _strategyImplementations[PoolStrategies.ImpactStream] = address( + new QVImpactStream(_allo) + ); + _strategyImplementations[PoolStrategies.QuadraticVoting] = address( + new QVSimple(_allo, "MyFancyName") + ); + _strategyImplementations[PoolStrategies.RFP] = address( + new RFPSimple(_allo) + ); + _strategyImplementations[PoolStrategies.SQFSuperfluid] = address( + new SQFSuperfluid(_allo) + ); + + allo = Allo(_allo); + } + + function _recordPool(uint256 _poolId, PoolStrategies _strategy) internal { + // _poolStrategy[_poolId] = _strategy; + ghost_poolIds.push(_poolId); + } + + // reverse lookup pool id -> strategy type + function _poolStrategy(uint256 _poolId) internal returns (PoolStrategies) { + IAllo.Pool memory _pool = allo.getPool(ghost_poolIds[_poolId]); + + for (uint256 i; i < uint256(type(PoolStrategies).max); i++) + if ( + _strategyImplementations[PoolStrategies(i)] == + address(_pool.strategy) + ) return PoolStrategies(i); + + emit TestFailure("Wrong pool strategy implementation address"); + } + + function _strategyHasImplementation( + PoolStrategies _strategy + ) internal returns (bool) { + for (uint256 i; i < ghost_poolIds.length; i++) { + if (_poolStrategy(ghost_poolIds[i]) == _strategy) return true; + } + + return false; + } +} diff --git a/test/invariant/fuzz/properties/PropertiesAllo.t.sol b/test/invariant/fuzz/properties/PropertiesAllo.t.sol index 4e014ecac..b1d24a0e8 100644 --- a/test/invariant/fuzz/properties/PropertiesAllo.t.sol +++ b/test/invariant/fuzz/properties/PropertiesAllo.t.sol @@ -1,66 +1,64 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; -import {HandlersParent} from '../handlers/HandlersParent.t.sol'; +import {HandlersParent} from "../handlers/HandlersParent.t.sol"; contract PropertiesAllo is HandlersParent { + ///@custom:property-id 1 + ///@custom:proprty one should always be able to pull/push correct (based on strategy) allocation for recipient + function property_correctAllocation() public {} -///@custom:property-id 1 -///@custom:proprty one should always be able to pull/push correct (based on strategy) allocation for recipient + ///@custom:property-id 2 + ///@custom:proprty a token allocation never “disappears” (withdraw cannot impact an allocation) -///@custom:property-id 2 -///@custom:proprty a token allocation never “disappears” (withdraw cannot impact an allocation) + ///@custom:property-id 3 + ///@custom:proprty an address can only withdraw if has allocation -///@custom:property-id 3 -///@custom:proprty an address can only withdraw if has allocation + ///@custom:property-id 4 + ///@custom:proprty profile owner can always create a pool -///@custom:property-id 4 -///@custom:proprty profile owner can always create a pool + ///@custom:property-id 5 + ///@custom:proprty profile owner is the only one who can always add/remove/modify profile members (name ⇒ new anchor()) -///@custom:property-id 5 -///@custom:proprty profile owner is the only one who can always add/remove/modify profile members (name ⇒ new anchor()) + ///@custom:property-id 6 + ///@custom:proprty profile owner is the only one who can always initiate a change of profile owner (2 steps) -///@custom:property-id 6 -///@custom:proprty profile owner is the only one who can always initiate a change of profile owner (2 steps) + ///@custom:property-id 7 + ///@custom:proprty profile member can always create a pool -///@custom:property-id 7 -///@custom:proprty profile member can always create a pool + ///@custom:property-id 8 + ///@custom:proprty only profile owner or member can create a pool -///@custom:property-id 8 -///@custom:proprty only profile owner or member can create a pool + ///@custom:property-id 9 + ///@custom:proprty initial admin is always the creator of the pool -///@custom:property-id 9 -///@custom:proprty initial admin is always the creator of the pool + ///@custom:property-id 10 + ///@custom:proprty pool admin can always change admin (but not to address(0)) -///@custom:property-id 10 -///@custom:proprty pool admin can always change admin (but not to address(0)) + ///@custom:property-id 11 + ///@custom:proprty pool admin can always add/remove pool managers -///@custom:property-id 11 -///@custom:proprty pool admin can always add/remove pool managers + ///@custom:property-id 12 + ///@custom:proprty pool manager can always withdraw within strategy limits/logic -///@custom:property-id 12 -///@custom:proprty pool manager can always withdraw within strategy limits/logic + ///@custom:property-id 13 + ///@custom:proprty pool manager can always change metadata -///@custom:property-id 13 -///@custom:proprty pool manager can always change metadata + ///@custom:property-id 14 + ///@custom:proprty allo owner can always change base fee (flat) and percent flee (./. funding amt) to any arbitrary value (max 100%) -///@custom:property-id 14 -///@custom:proprty allo owner can always change base fee (flat) and percent flee (./. funding amt) to any arbitrary value (max 100%) + ///@custom:property-id 15 + ///@custom:proprty allo owner can always change the treasury address/trustred forwarded/etc -///@custom:property-id 15 -///@custom:proprty allo owner can always change the treasury address/trustred forwarded/etc + ///@custom:property-id 16 + ///@custom:proprty allo owner can always recover funds from allo contract ( (non-)native token ) -///@custom:property-id 16 -///@custom:proprty allo owner can always recover funds from allo contract ( (non-)native token ) + ///@custom:property-id 17 + ///@custom:proprty only funds not allocated can be withdrawn -///@custom:property-id 17 -///@custom:proprty only funds not allocated can be withdrawn + ///@custom:property-id 18 + ///@custom:proprty anyone can increase fund in a pool, if strategy (hook) logic allows so and if more than base fee -///@custom:property-id 18 -///@custom:proprty anyone can increase fund in a pool, if strategy (hook) logic allows so and if more than base fee - -///@custom:property-id 19 -///@custom:proprty every deposit/pool creation must take the correct fee on the amount deposited, forwarded to the treasury - - -} \ No newline at end of file + ///@custom:property-id 19 + ///@custom:proprty every deposit/pool creation must take the correct fee on the amount deposited, forwarded to the treasury +} From c2d0d395ff6333ddcb7f0b21d9af0ac946f4ead2 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Thu, 24 Oct 2024 00:02:10 +0200 Subject: [PATCH 2/3] test(medusa): add different strat --- test/invariant/fuzz/FuzzTest.t.sol | 5 +- test/invariant/fuzz/Setup.t.sol | 107 ++++++++++++++++++ .../invariant/fuzz/handlers/HandlerAllo.t.sol | 10 -- test/invariant/fuzz/helpers/Pools.t.sol | 5 +- 4 files changed, 112 insertions(+), 15 deletions(-) diff --git a/test/invariant/fuzz/FuzzTest.t.sol b/test/invariant/fuzz/FuzzTest.t.sol index 570d4776a..223d6a70a 100644 --- a/test/invariant/fuzz/FuzzTest.t.sol +++ b/test/invariant/fuzz/FuzzTest.t.sol @@ -5,7 +5,7 @@ import {PropertiesParent} from "./properties/PropertiesParent.t.sol"; contract FuzzTest is PropertiesParent { /// @custom:property-id 0 - /// @custom:property Check if + /// @custom:property Check sanity function property_sanityCheck() public { assertTrue(address(allo) != address(0), "sanity check"); assertTrue(address(registry) != address(0), "sanity check"); @@ -15,6 +15,5 @@ contract FuzzTest is PropertiesParent { assertTrue(allo.isTrustedForwarder(forwarder), "sanity check"); } - // This is a good place to include Forge test for debugging purposes - function test_forgeDebug() public {} + function test_debug() public {} } diff --git a/test/invariant/fuzz/Setup.t.sol b/test/invariant/fuzz/Setup.t.sol index b38f71f8e..ce4fb87c1 100644 --- a/test/invariant/fuzz/Setup.t.sol +++ b/test/invariant/fuzz/Setup.t.sol @@ -8,6 +8,10 @@ import {Allo, IAllo, Metadata} from "contracts/core/Allo.sol"; import {Registry, Anchor} from "contracts/core/Anchor.sol"; import {IRegistry} from "contracts/core/interfaces/IRegistry.sol"; import {DirectAllocationStrategy} from "contracts/strategies/examples/direct-allocation/DirectAllocation.sol"; +import {QVSimple} from "contracts/strategies/examples/quadratic-voting/QVSimple.sol"; +import {SQFSuperfluid} from "contracts/strategies/examples/sqf-superfluid/SQFSuperfluid.sol"; + +import {IRecipientsExtension} from "strategies/extensions/register/IRecipientsExtension.sol"; import {Actors} from "./helpers/Actors.t.sol"; import {Pools} from "./helpers/Pools.t.sol"; @@ -18,6 +22,13 @@ contract Setup is Actors, Pools { uint256 percentFee; uint256 baseFee; + uint64 defaultRegistrationStartTime; + uint64 defaultRegistrationEndTime; + uint256 defaultAllocationStartTime; + uint256 defaultAllocationEndTime; + uint256 defaultWithdrawalCooldown; + uint256 DEFAULT_MAX_BID; + Allo allo; Registry registry; @@ -80,5 +91,101 @@ contract Setup is Actors, Pools { registry.getProfileById(_id).anchor ); } + + // Create pools for each strategy + _initPools(); + } + + function _initPools() internal { + defaultRegistrationStartTime = uint64(block.timestamp); + defaultRegistrationEndTime = uint64(block.timestamp + 7 days); + defaultAllocationStartTime = uint64(block.timestamp + 7 days + 1); + defaultAllocationEndTime = uint64(block.timestamp + 10 days); + defaultWithdrawalCooldown = 1 days; + DEFAULT_MAX_BID = 1000; + + for (uint256 i = 1; i <= uint256(type(PoolStrategies).max); i++) { + address _deployer = _ghost_actors[i % 4]; + + IRegistry.Profile memory profile = registry.getProfileByAnchor( + _ghost_anchorOf[_deployer] + ); + + bytes memory _metadata; + + if (PoolStrategies(i) == PoolStrategies.DirectAllocation) { + _metadata = ""; + } else if (PoolStrategies(i) == PoolStrategies.DonationVoting) { + _metadata = abi.encode( + IRecipientsExtension.RecipientInitializeData({ + metadataRequired: false, + registrationStartTime: defaultRegistrationStartTime, + registrationEndTime: defaultRegistrationEndTime + }), + defaultAllocationStartTime, + defaultAllocationEndTime, + defaultWithdrawalCooldown, + token, + true + ); + } else if ( + PoolStrategies(i) == PoolStrategies.EasyRPGF + ) {} else if (PoolStrategies(i) == PoolStrategies.ImpactStream) { + _metadata = abi.encode( + IRecipientsExtension.RecipientInitializeData({ + metadataRequired: false, + registrationStartTime: uint64(block.timestamp), + registrationEndTime: uint64(block.timestamp + 7 days) + }), + QVSimple.QVSimpleInitializeData({ + allocationStartTime: uint64(block.timestamp), + allocationEndTime: uint64(block.timestamp + 7 days), + maxVoiceCreditsPerAllocator: 100, + isUsingAllocationMetadata: false + }) + ); + } else if (PoolStrategies(i) == PoolStrategies.QuadraticVoting) { + _metadata = abi.encode( + IRecipientsExtension.RecipientInitializeData({ + metadataRequired: false, + registrationStartTime: uint64(block.timestamp), + registrationEndTime: uint64(block.timestamp + 7 days) + }), + QVSimple.QVSimpleInitializeData({ + allocationStartTime: uint64(block.timestamp), + allocationEndTime: uint64(block.timestamp + 7 days), + maxVoiceCreditsPerAllocator: 100, + isUsingAllocationMetadata: false + }) + ); + } else if (PoolStrategies(i) == PoolStrategies.RFP) { + _metadata = abi.encode( + IRecipientsExtension.RecipientInitializeData({ + metadataRequired: false, + registrationStartTime: uint64(block.timestamp), + registrationEndTime: uint64(block.timestamp + 7 days) + }), + DEFAULT_MAX_BID + ); + } else if (PoolStrategies(i) == PoolStrategies.SQFSuperfluid) { + // Skip for now - mock? + return; + } + + vm.prank(_deployer); + uint256 _poolId = allo.createPool( + profile.id, + _strategyImplementations[PoolStrategies(i)], + _metadata, + address(token), + 0, + profile.metadata, + new address[](0) + ); + + ghost_poolAdmins[_poolId] = _deployer; + + _recordPool(_poolId, PoolStrategies(i)); + } } } diff --git a/test/invariant/fuzz/handlers/HandlerAllo.t.sol b/test/invariant/fuzz/handlers/HandlerAllo.t.sol index f51d9b5cb..113671e8c 100644 --- a/test/invariant/fuzz/handlers/HandlerAllo.t.sol +++ b/test/invariant/fuzz/handlers/HandlerAllo.t.sol @@ -8,7 +8,6 @@ import {FuzzERC20} from "../helpers/FuzzERC20.sol"; contract HandlerAllo is Setup { mapping(uint256 _poolId => address[] _managers) ghost_poolManagers; - mapping(uint256 _poolId => address _poolAdmin) ghost_poolAdmins; mapping(uint256 _poolId => address[] _recipients) ghost_recipients; function handler_createPool( @@ -50,15 +49,6 @@ contract HandlerAllo is Setup { ) ) ); - - if (succ) { - uint256 _poolId = abi.decode(ret, (uint256)); - ghost_poolAdmins[_poolId] = msg.sender; - - _recordPool(_poolId, PoolStrategies(_seedPoolStrategy)); - } - - assert(ghost_poolIds.length < 4); } function handler_updatePoolMetadata( diff --git a/test/invariant/fuzz/helpers/Pools.t.sol b/test/invariant/fuzz/helpers/Pools.t.sol index cae89262e..cf7b15ec2 100644 --- a/test/invariant/fuzz/helpers/Pools.t.sol +++ b/test/invariant/fuzz/helpers/Pools.t.sol @@ -29,6 +29,8 @@ contract Pools is Utils { } uint256[] internal ghost_poolIds; + mapping(uint256 _poolId => address _poolAdmin) ghost_poolAdmins; + // mapping(uint256 _poolId => PoolStrategies _strategy) internal _poolStrategy; mapping(PoolStrategies _strategy => address _implementation) @@ -67,8 +69,7 @@ contract Pools is Utils { // reverse lookup pool id -> strategy type function _poolStrategy(uint256 _poolId) internal returns (PoolStrategies) { - IAllo.Pool memory _pool = allo.getPool(ghost_poolIds[_poolId]); - + IAllo.Pool memory _pool = allo.getPool(_poolId); for (uint256 i; i < uint256(type(PoolStrategies).max); i++) if ( _strategyImplementations[PoolStrategies(i)] == From a914f7344c87c243fc06c31be145915fcfb842bd Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Tue, 29 Oct 2024 12:47:52 +0100 Subject: [PATCH 3/3] fix: pr review --- test/invariant/fuzz/Setup.t.sol | 2 -- test/invariant/fuzz/helpers/Pools.t.sol | 3 --- 2 files changed, 5 deletions(-) diff --git a/test/invariant/fuzz/Setup.t.sol b/test/invariant/fuzz/Setup.t.sol index ce4fb87c1..ec97f53b7 100644 --- a/test/invariant/fuzz/Setup.t.sol +++ b/test/invariant/fuzz/Setup.t.sol @@ -71,8 +71,6 @@ contract Setup is Actors, Pools { // Deploy strategies implementations _initImplementations(address(allo)); - // strategy_directAllocation = new DirectAllocationStrategy(address(allo)); - // Deploy token token = ERC20(address(new FuzzERC20())); diff --git a/test/invariant/fuzz/helpers/Pools.t.sol b/test/invariant/fuzz/helpers/Pools.t.sol index cf7b15ec2..ff1cac5bf 100644 --- a/test/invariant/fuzz/helpers/Pools.t.sol +++ b/test/invariant/fuzz/helpers/Pools.t.sol @@ -31,8 +31,6 @@ contract Pools is Utils { uint256[] internal ghost_poolIds; mapping(uint256 _poolId => address _poolAdmin) ghost_poolAdmins; - // mapping(uint256 _poolId => PoolStrategies _strategy) internal _poolStrategy; - mapping(PoolStrategies _strategy => address _implementation) internal _strategyImplementations; @@ -63,7 +61,6 @@ contract Pools is Utils { } function _recordPool(uint256 _poolId, PoolStrategies _strategy) internal { - // _poolStrategy[_poolId] = _strategy; ghost_poolIds.push(_poolId); }