Skip to content

Commit

Permalink
move files, add descriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
snreynolds committed Dec 17, 2024
1 parent 9778afa commit ca05423
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
1 change: 1 addition & 0 deletions snapshots/PosMGasTest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
1 change: 1 addition & 0 deletions snapshots/PositionDescriptorTest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"position descriptor initcode hash (without constructor params, as uint256)": "88482580191959945449130293370700011665153263709859488839371600440410373093991",
"positionDescriptor bytecode size": "24110"
}
3 changes: 0 additions & 3 deletions snapshots/PositionManagerTest.json

This file was deleted.

7 changes: 7 additions & 0 deletions test/PositionDescriptor.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
7 changes: 7 additions & 0 deletions test/position-managers/PositionManager.gas.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
7 changes: 0 additions & 7 deletions test/position-managers/PositionManager.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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, "");
Expand Down

0 comments on commit ca05423

Please sign in to comment.