From c7866a1cebf4c3990d2387e99767d49cb70d7246 Mon Sep 17 00:00:00 2001 From: dianakocsis Date: Mon, 25 Nov 2024 14:54:16 -0500 Subject: [PATCH] bytecode size test --- .forge-snapshots/positionManager bytecode size.snap | 1 + foundry.toml | 2 +- test/position-managers/PositionManager.gas.t.sol | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .forge-snapshots/positionManager bytecode size.snap diff --git a/.forge-snapshots/positionManager bytecode size.snap b/.forge-snapshots/positionManager bytecode size.snap new file mode 100644 index 00000000..ec585573 --- /dev/null +++ b/.forge-snapshots/positionManager bytecode size.snap @@ -0,0 +1 @@ +26931 \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index c685a490..30dff3ef 100644 --- a/foundry.toml +++ b/foundry.toml @@ -1,7 +1,7 @@ [profile.default] out = 'foundry-out' solc_version = '0.8.26' -optimizer_runs = 44444444 +optimizer_runs = 1 via_ir = true ffi = true fs_permissions = [{ access = "read-write", path = ".forge-snapshots/"}] diff --git a/test/position-managers/PositionManager.gas.t.sol b/test/position-managers/PositionManager.gas.t.sol index cf077748..bf27604f 100644 --- a/test/position-managers/PositionManager.gas.t.sol +++ b/test/position-managers/PositionManager.gas.t.sol @@ -75,6 +75,10 @@ contract PosMGasTest is Test, PosmTestSetup, GasSnapshot { sub = new MockSubscriber(lpm); } + function test_bytecodeSize_positionManager() public { + snapSize("positionManager bytecode size", address(lpm)); + } + function test_gas_mint_withClose() public { Plan memory planner = Planner.init().add( Actions.MINT_POSITION,