From af463bcc3da53089800fd3496a9d77c14837cb2c Mon Sep 17 00:00:00 2001 From: Alice <34962750+hensha256@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:02:48 +0000 Subject: [PATCH] Add code hash snap (#924) add code hash snap --- snapshots/PoolManagerTest.json | 1 + test/PoolManager.t.sol | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/snapshots/PoolManagerTest.json b/snapshots/PoolManagerTest.json index d43defca1..a8b221f3d 100644 --- a/snapshots/PoolManagerTest.json +++ b/snapshots/PoolManagerTest.json @@ -6,6 +6,7 @@ "erc20 collect protocol fees": "57500", "native collect protocol fees": "59643", "poolManager bytecode size": "24009", + "poolManager initcode hash (without constructor params, as uint256)": "19281018184167079101887460999643277467915809731640262058315305465805214934776", "removeLiquidity with empty hook": "130613", "removeLiquidity with native token": "112523", "simple addLiquidity": "161276", diff --git a/test/PoolManager.t.sol b/test/PoolManager.t.sol index e469b25be..de050bf60 100644 --- a/test/PoolManager.t.sol +++ b/test/PoolManager.t.sol @@ -83,6 +83,13 @@ contract PoolManagerTest is Test, Deployers { vm.snapshotValue("poolManager bytecode size", address(manager).code.length); } + function test_initcodeHash() public { + vm.snapshotValue( + "poolManager initcode hash (without constructor params, as uint256)", + uint256(keccak256(type(PoolManager).creationCode)) + ); + } + function test_addLiquidity_failsIfNotInitialized() public { vm.expectRevert(Pool.PoolNotInitialized.selector); modifyLiquidityRouter.modifyLiquidity(uninitializedKey, LIQUIDITY_PARAMS, ZERO_BYTES);