From 7aa26c539281c4b256eae6a59b015dea7957b7a8 Mon Sep 17 00:00:00 2001 From: teddy Date: Fri, 26 Jul 2024 20:47:22 -0300 Subject: [PATCH] test: ensure fuzz_joinExitPool body is runnable --- test/invariants/fuzz/Protocol.t.sol | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/invariants/fuzz/Protocol.t.sol b/test/invariants/fuzz/Protocol.t.sol index 252d1234..715ce37d 100644 --- a/test/invariants/fuzz/Protocol.t.sol +++ b/test/invariants/fuzz/Protocol.t.sol @@ -36,15 +36,9 @@ contract FuzzProtocol is EchidnaTest { bmath = new BMath(); bnum = new BNumExposed(); - // max bound token is 8 - for (uint256 i; i < 4; i++) { - FuzzERC20 _token = new FuzzERC20(); - _token.initialize('', '', 18); - tokens.push(_token); - } - pool = BCoWPool(address(factory.newBPool())); + // first 4 tokens bound to the finalized pool for (uint256 i; i < 4; i++) { FuzzERC20 _token = new FuzzERC20(); _token.initialize('', '', 18); @@ -61,6 +55,13 @@ contract FuzzProtocol is EchidnaTest { } } + // 4 other tokens to bind to pools in poolsToFinalize, since max bound token is 8 + for (uint256 i; i < 4; i++) { + FuzzERC20 _token = new FuzzERC20(); + _token.initialize('', '', 18); + tokens.push(_token); + } + pool.finalize(); ghost_bptMinted = pool.INIT_POOL_SUPPLY(); }