Skip to content

Commit

Permalink
add mock router snap
Browse files Browse the repository at this point in the history
  • Loading branch information
snreynolds committed Dec 18, 2024
1 parent d275f15 commit 27028c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion snapshots/V4RouterTest.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
"V4Router_ExactOut3Hops_nativeOut": "224943",
"V4Router_ExactOutputSingle": "133337",
"V4Router_ExactOutputSingle_nativeIn_sweepETH": "126419",
"V4Router_ExactOutputSingle_nativeOut": "119821"
"V4Router_ExactOutputSingle_nativeOut": "119821",
"position manager initcode hash (without constructor params, as uint256)": "27545762869727400677117557485685740862616789454191614676777323590122002226479"
}
7 changes: 7 additions & 0 deletions test/router/V4Router.gas.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ contract V4RouterTest is RoutingTestHelpers {
vm.snapshotValue("V4Router_Bytecode", address(router).code.length);
}

function test_router_initcodeHash() public {
vm.snapshotValue(
"position manager initcode hash (without constructor params, as uint256)",
uint256(keccak256(abi.encodePacked(vm.getCode("MockV4Router.sol:MockV4Router"))))
);
}

/*//////////////////////////////////////////////////////////////
ERC20 -> ERC20 EXACT INPUT
//////////////////////////////////////////////////////////////*/
Expand Down

0 comments on commit 27028c2

Please sign in to comment.