Skip to content

Commit

Permalink
test: fix too many input rejected for CLFees (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChefMist authored Apr 9, 2024
1 parent f760085 commit b615117
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/pool-cl/CLFees.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ contract CLFeesTest is Test, Deployers, TokenFixture, GasSnapshot {
}

function testNoProtocolFee(uint16 protocolSwapFee) public {
vm.assume(protocolSwapFee < 2 ** 16);
vm.assume(protocolSwapFee >> 8 >= 4);
vm.assume(protocolSwapFee % 256 >= 4);
// Early return instead of vm.assume (too many input rejected)
if (protocolSwapFee >= 2 ** 16) return;
if (protocolSwapFee >> 8 < 4) return;
if (protocolSwapFee % 256 < 4) return;

protocolFeeController.setSwapFeeForPool(key.toId(), protocolSwapFee);
manager.setProtocolFeeController(IProtocolFeeController(protocolFeeController));
Expand Down

0 comments on commit b615117

Please sign in to comment.