From 2130e5cbe03348edea869fefad577b9b3ff7033c Mon Sep 17 00:00:00 2001 From: Alice Henshaw Date: Fri, 2 Aug 2024 22:37:04 +0100 Subject: [PATCH] linting --- test/position-managers/Execute.t.sol | 8 ++++-- test/position-managers/NativeToken.t.sol | 4 ++- .../PositionManager.gas.t.sol | 27 ++++++++++++++----- test/position-managers/PositionManager.t.sol | 6 +++-- 4 files changed, 34 insertions(+), 11 deletions(-) diff --git a/test/position-managers/Execute.t.sol b/test/position-managers/Execute.t.sol index e6b33b91..6ff19dce 100644 --- a/test/position-managers/Execute.t.sol +++ b/test/position-managers/Execute.t.sol @@ -122,7 +122,9 @@ contract ExecuteTest is Test, PosmTestSetup, LiquidityFuzzers { planner.add( Actions.MINT_POSITION, - abi.encode(config, initialLiquidity, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES) + abi.encode( + config, initialLiquidity, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES + ) ); planner.add( Actions.INCREASE_LIQUIDITY, @@ -172,7 +174,9 @@ contract ExecuteTest is Test, PosmTestSetup, LiquidityFuzzers { ); planner.add( Actions.MINT_POSITION, - abi.encode(newConfig, newLiquidity, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES) + abi.encode( + newConfig, newLiquidity, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES + ) ); bytes memory calls = planner.finalizeModifyLiquidity(config.poolKey); diff --git a/test/position-managers/NativeToken.t.sol b/test/position-managers/NativeToken.t.sol index e25b135a..d98258c4 100644 --- a/test/position-managers/NativeToken.t.sol +++ b/test/position-managers/NativeToken.t.sol @@ -113,7 +113,9 @@ contract PositionManagerTest is Test, PosmTestSetup, LiquidityFuzzers { Plan memory planner = Planner.init(); planner.add( Actions.MINT_POSITION, - abi.encode(config, liquidityToAdd, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES) + abi.encode( + config, liquidityToAdd, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES + ) ); planner.add(Actions.CLOSE_CURRENCY, abi.encode(nativeKey.currency0)); planner.add(Actions.CLOSE_CURRENCY, abi.encode(nativeKey.currency1)); diff --git a/test/position-managers/PositionManager.gas.t.sol b/test/position-managers/PositionManager.gas.t.sol index 31632b46..9b63023d 100644 --- a/test/position-managers/PositionManager.gas.t.sol +++ b/test/position-managers/PositionManager.gas.t.sol @@ -73,7 +73,9 @@ contract PosMGasTest is Test, PosmTestSetup, GasSnapshot { function test_gas_mint() public { Plan memory planner = Planner.init().add( Actions.MINT_POSITION, - abi.encode(config, 10_000 ether, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES) + abi.encode( + config, 10_000 ether, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES + ) ); bytes memory calls = planner.finalizeModifyLiquidity(config.poolKey); lpm.modifyLiquidities(calls, _deadline); @@ -89,7 +91,9 @@ contract PosMGasTest is Test, PosmTestSetup, GasSnapshot { // Mint to a diff config, diff user. Plan memory planner = Planner.init().add( Actions.MINT_POSITION, - abi.encode(config, 10_000 ether, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES) + abi.encode( + config, 10_000 ether, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES + ) ); bytes memory calls = planner.finalizeModifyLiquidity(config.poolKey); vm.prank(alice); @@ -106,7 +110,9 @@ contract PosMGasTest is Test, PosmTestSetup, GasSnapshot { // Mint to a diff config, diff user. Plan memory planner = Planner.init().add( Actions.MINT_POSITION, - abi.encode(config, 10_000 ether, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES) + abi.encode( + config, 10_000 ether, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES + ) ); bytes memory calls = planner.finalizeModifyLiquidity(config.poolKey); vm.prank(alice); @@ -123,7 +129,9 @@ contract PosMGasTest is Test, PosmTestSetup, GasSnapshot { // Mint to a diff config, diff user. Plan memory planner = Planner.init().add( Actions.MINT_POSITION, - abi.encode(config, 10_000 ether, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES) + abi.encode( + config, 10_000 ether, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES + ) ); bytes memory calls = planner.finalizeModifyLiquidity(config.poolKey); vm.prank(alice); @@ -350,7 +358,9 @@ contract PosMGasTest is Test, PosmTestSetup, GasSnapshot { Plan memory planner = Planner.init().add( Actions.MINT_POSITION, - abi.encode(config, 10_001 ether, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES) + abi.encode( + config, 10_001 ether, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES + ) ); bytes memory calls = planner.finalizeModifyLiquidity(config.poolKey); vm.prank(alice); @@ -473,7 +483,12 @@ contract PosMGasTest is Test, PosmTestSetup, GasSnapshot { planner.add( Actions.MINT_POSITION, abi.encode( - configNative, liquidityToAdd, MAX_SLIPPAGE_INCREASE, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES + configNative, + liquidityToAdd, + MAX_SLIPPAGE_INCREASE, + MAX_SLIPPAGE_INCREASE, + Constants.MSG_SENDER, + ZERO_BYTES ) ); planner.add(Actions.CLOSE_CURRENCY, abi.encode(nativeKey.currency0)); diff --git a/test/position-managers/PositionManager.t.sol b/test/position-managers/PositionManager.t.sol index 5326e0a4..adb81fe0 100644 --- a/test/position-managers/PositionManager.t.sol +++ b/test/position-managers/PositionManager.t.sol @@ -243,7 +243,8 @@ contract PositionManagerTest is Test, PosmTestSetup, LiquidityFuzzers { function test_mint_slippage_revertAmount0() public { PositionConfig memory config = PositionConfig({poolKey: key, tickLower: -120, tickUpper: 120}); - bytes memory calls = getMintEncoded(config, 1e18, 1 wei, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES); + bytes memory calls = + getMintEncoded(config, 1e18, 1 wei, MAX_SLIPPAGE_INCREASE, Constants.MSG_SENDER, ZERO_BYTES); vm.expectRevert(SlippageCheckLibrary.MaximumAmountExceeded.selector); lpm.modifyLiquidities(calls, _deadline); } @@ -251,7 +252,8 @@ contract PositionManagerTest is Test, PosmTestSetup, LiquidityFuzzers { function test_mint_slippage_revertAmount1() public { PositionConfig memory config = PositionConfig({poolKey: key, tickLower: -120, tickUpper: 120}); - bytes memory calls = getMintEncoded(config, 1e18, MAX_SLIPPAGE_INCREASE, 1 wei, Constants.MSG_SENDER, ZERO_BYTES); + bytes memory calls = + getMintEncoded(config, 1e18, MAX_SLIPPAGE_INCREASE, 1 wei, Constants.MSG_SENDER, ZERO_BYTES); vm.expectRevert(SlippageCheckLibrary.MaximumAmountExceeded.selector); lpm.modifyLiquidities(calls, _deadline); }