From ca05423b834ddc853aa3024140f6181c613f56d9 Mon Sep 17 00:00:00 2001 From: Sara Reynolds Date: Tue, 17 Dec 2024 14:09:15 -0500 Subject: [PATCH] move files, add descriptor --- snapshots/PosMGasTest.json | 1 + snapshots/PositionDescriptorTest.json | 1 + snapshots/PositionManagerTest.json | 3 --- test/PositionDescriptor.t.sol | 7 +++++++ test/position-managers/PositionManager.gas.t.sol | 7 +++++++ test/position-managers/PositionManager.t.sol | 7 ------- 6 files changed, 16 insertions(+), 10 deletions(-) delete mode 100644 snapshots/PositionManagerTest.json diff --git a/snapshots/PosMGasTest.json b/snapshots/PosMGasTest.json index 195b2104..fab212ff 100644 --- a/snapshots/PosMGasTest.json +++ b/snapshots/PosMGasTest.json @@ -38,5 +38,6 @@ "PositionManager_permit_twice": "44975", "PositionManager_subscribe": "87968", "PositionManager_unsubscribe": "62697", + "position manager initcode hash (without constructor params, as uint256)": "81827502601055975118808937107769364319765058198432540518516360048852193272922", "positionManager bytecode size": "23877" } \ No newline at end of file diff --git a/snapshots/PositionDescriptorTest.json b/snapshots/PositionDescriptorTest.json index 5be19f6a..df2ff3df 100644 --- a/snapshots/PositionDescriptorTest.json +++ b/snapshots/PositionDescriptorTest.json @@ -1,3 +1,4 @@ { + "position descriptor initcode hash (without constructor params, as uint256)": "88482580191959945449130293370700011665153263709859488839371600440410373093991", "positionDescriptor bytecode size": "24110" } \ No newline at end of file diff --git a/snapshots/PositionManagerTest.json b/snapshots/PositionManagerTest.json deleted file mode 100644 index 18fcc100..00000000 --- a/snapshots/PositionManagerTest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "position manager initcode hash (without constructor params, as uint256)": "81827502601055975118808937107769364319765058198432540518516360048852193272922" -} \ No newline at end of file diff --git a/test/PositionDescriptor.t.sol b/test/PositionDescriptor.t.sol index 57b1a641..7b924784 100644 --- a/test/PositionDescriptor.t.sol +++ b/test/PositionDescriptor.t.sol @@ -41,6 +41,13 @@ contract PositionDescriptorTest is Test, PosmTestSetup { deployAndApprovePosm(manager); } + function test_posm_initcodeHash() public { + vm.snapshotValue( + "position descriptor initcode hash (without constructor params, as uint256)", + uint256(keccak256(abi.encodePacked(vm.getCode("PositionDescriptor.sol:PositionDescriptor")))) + ); + } + function test_bytecodeSize_positionDescriptor() public { vm.snapshotValue("positionDescriptor bytecode size", address(positionDescriptor).code.length); } diff --git a/test/position-managers/PositionManager.gas.t.sol b/test/position-managers/PositionManager.gas.t.sol index c43d6805..3b0e8dd7 100644 --- a/test/position-managers/PositionManager.gas.t.sol +++ b/test/position-managers/PositionManager.gas.t.sol @@ -73,6 +73,13 @@ contract PosMGasTest is Test, PosmTestSetup { sub = new MockSubscriber(lpm); } + function test_posm_initcodeHash() public { + vm.snapshotValue( + "position manager initcode hash (without constructor params, as uint256)", + uint256(keccak256(abi.encodePacked(vm.getCode("PositionManager.sol:PositionManager")))) + ); + } + function test_bytecodeSize_positionManager() public { vm.snapshotValue("positionManager bytecode size", address(lpm).code.length); } diff --git a/test/position-managers/PositionManager.t.sol b/test/position-managers/PositionManager.t.sol index 89066316..a0dc970d 100644 --- a/test/position-managers/PositionManager.t.sol +++ b/test/position-managers/PositionManager.t.sol @@ -61,13 +61,6 @@ contract PositionManagerTest is Test, PosmTestSetup, LiquidityFuzzers { approvePosmFor(alice); } - function test_posm_initcodeHash() public { - vm.snapshotValue( - "position manager initcode hash (without constructor params, as uint256)", - uint256(keccak256(abi.encodePacked(vm.getCode("PositionManager.sol:PositionManager")))) - ); - } - function test_modifyLiquidities_reverts_deadlinePassed() public { PositionConfig memory config = PositionConfig({poolKey: key, tickLower: 0, tickUpper: 60}); bytes memory calls = getMintEncoded(config, 1e18, ActionConstants.MSG_SENDER, "");