diff --git a/.forge-snapshots/BaseActionsRouter_mock10commands.snap b/.forge-snapshots/BaseActionsRouter_mock10commands.snap index 2b46e583b..7ee3d714b 100644 --- a/.forge-snapshots/BaseActionsRouter_mock10commands.snap +++ b/.forge-snapshots/BaseActionsRouter_mock10commands.snap @@ -1 +1 @@ -61749 \ No newline at end of file +59216 \ No newline at end of file diff --git a/.forge-snapshots/Payments_swap_settleFromCaller_takeAllToMsgSender.snap b/.forge-snapshots/Payments_swap_settleFromCaller_takeAllToMsgSender.snap index 8f5800369..ba3f7d59c 100644 --- a/.forge-snapshots/Payments_swap_settleFromCaller_takeAllToMsgSender.snap +++ b/.forge-snapshots/Payments_swap_settleFromCaller_takeAllToMsgSender.snap @@ -1 +1 @@ -133206 \ No newline at end of file +129459 \ No newline at end of file diff --git a/.forge-snapshots/Payments_swap_settleFromCaller_takeAllToSpecifiedAddress.snap b/.forge-snapshots/Payments_swap_settleFromCaller_takeAllToSpecifiedAddress.snap index 0356d3854..43b311f66 100644 --- a/.forge-snapshots/Payments_swap_settleFromCaller_takeAllToSpecifiedAddress.snap +++ b/.forge-snapshots/Payments_swap_settleFromCaller_takeAllToSpecifiedAddress.snap @@ -1 +1 @@ -135242 \ No newline at end of file +131377 \ No newline at end of file diff --git a/.forge-snapshots/Payments_swap_settleWithBalance_takeAllToMsgSender.snap b/.forge-snapshots/Payments_swap_settleWithBalance_takeAllToMsgSender.snap index 8f190ac59..44d51e62b 100644 --- a/.forge-snapshots/Payments_swap_settleWithBalance_takeAllToMsgSender.snap +++ b/.forge-snapshots/Payments_swap_settleWithBalance_takeAllToMsgSender.snap @@ -1 +1 @@ -127716 \ No newline at end of file +123612 \ No newline at end of file diff --git a/.forge-snapshots/Payments_swap_settleWithBalance_takeAllToSpecifiedAddress.snap b/.forge-snapshots/Payments_swap_settleWithBalance_takeAllToSpecifiedAddress.snap index f7b6cea9b..d7efb13ba 100644 --- a/.forge-snapshots/Payments_swap_settleWithBalance_takeAllToSpecifiedAddress.snap +++ b/.forge-snapshots/Payments_swap_settleWithBalance_takeAllToSpecifiedAddress.snap @@ -1 +1 @@ -127854 \ No newline at end of file +123754 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_burn_empty.snap b/.forge-snapshots/PositionManager_burn_empty.snap index 0505afc4b..6479cc20a 100644 --- a/.forge-snapshots/PositionManager_burn_empty.snap +++ b/.forge-snapshots/PositionManager_burn_empty.snap @@ -1 +1 @@ -47276 \ No newline at end of file +47152 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_burn_empty_native.snap b/.forge-snapshots/PositionManager_burn_empty_native.snap index edc2416be..074ac1bc5 100644 --- a/.forge-snapshots/PositionManager_burn_empty_native.snap +++ b/.forge-snapshots/PositionManager_burn_empty_native.snap @@ -1 +1 @@ -47094 \ No newline at end of file +46970 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_burn_nonEmpty_native_withClose.snap b/.forge-snapshots/PositionManager_burn_nonEmpty_native_withClose.snap index 2d76ace08..b6a4062a1 100644 --- a/.forge-snapshots/PositionManager_burn_nonEmpty_native_withClose.snap +++ b/.forge-snapshots/PositionManager_burn_nonEmpty_native_withClose.snap @@ -1 +1 @@ -123923 \ No newline at end of file +122397 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_burn_nonEmpty_native_withTakePair.snap b/.forge-snapshots/PositionManager_burn_nonEmpty_native_withTakePair.snap index 1263d1181..5eb3b7616 100644 --- a/.forge-snapshots/PositionManager_burn_nonEmpty_native_withTakePair.snap +++ b/.forge-snapshots/PositionManager_burn_nonEmpty_native_withTakePair.snap @@ -1 +1 @@ -123420 \ No newline at end of file +121968 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_burn_nonEmpty_withClose.snap b/.forge-snapshots/PositionManager_burn_nonEmpty_withClose.snap index 618bac703..3fbd663dd 100644 --- a/.forge-snapshots/PositionManager_burn_nonEmpty_withClose.snap +++ b/.forge-snapshots/PositionManager_burn_nonEmpty_withClose.snap @@ -1 +1 @@ -131001 \ No newline at end of file +129430 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_burn_nonEmpty_withTakePair.snap b/.forge-snapshots/PositionManager_burn_nonEmpty_withTakePair.snap index 5a059d8b3..d21b4ba5d 100644 --- a/.forge-snapshots/PositionManager_burn_nonEmpty_withTakePair.snap +++ b/.forge-snapshots/PositionManager_burn_nonEmpty_withTakePair.snap @@ -1 +1 @@ -130499 \ No newline at end of file +129000 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_collect_native.snap b/.forge-snapshots/PositionManager_collect_native.snap index 1536cdec7..2331f0e72 100644 --- a/.forge-snapshots/PositionManager_collect_native.snap +++ b/.forge-snapshots/PositionManager_collect_native.snap @@ -1 +1 @@ -142431 \ No newline at end of file +141457 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_collect_sameRange.snap b/.forge-snapshots/PositionManager_collect_sameRange.snap index de5d67d1a..f46b7a3c9 100644 --- a/.forge-snapshots/PositionManager_collect_sameRange.snap +++ b/.forge-snapshots/PositionManager_collect_sameRange.snap @@ -1 +1 @@ -151279 \ No newline at end of file +150248 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_collect_withClose.snap b/.forge-snapshots/PositionManager_collect_withClose.snap index de5d67d1a..f46b7a3c9 100644 --- a/.forge-snapshots/PositionManager_collect_withClose.snap +++ b/.forge-snapshots/PositionManager_collect_withClose.snap @@ -1 +1 @@ -151279 \ No newline at end of file +150248 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_collect_withTakePair.snap b/.forge-snapshots/PositionManager_collect_withTakePair.snap index 4b2083fda..0986a117d 100644 --- a/.forge-snapshots/PositionManager_collect_withTakePair.snap +++ b/.forge-snapshots/PositionManager_collect_withTakePair.snap @@ -1 +1 @@ -150639 \ No newline at end of file +149699 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_decreaseLiquidity_native.snap b/.forge-snapshots/PositionManager_decreaseLiquidity_native.snap index ede22497d..8e6d46423 100644 --- a/.forge-snapshots/PositionManager_decreaseLiquidity_native.snap +++ b/.forge-snapshots/PositionManager_decreaseLiquidity_native.snap @@ -1 +1 @@ -109420 \ No newline at end of file +108111 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_decreaseLiquidity_withClose.snap b/.forge-snapshots/PositionManager_decreaseLiquidity_withClose.snap index 9f32a7996..72ccfd2ec 100644 --- a/.forge-snapshots/PositionManager_decreaseLiquidity_withClose.snap +++ b/.forge-snapshots/PositionManager_decreaseLiquidity_withClose.snap @@ -1 +1 @@ -116822 \ No newline at end of file +115144 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_decreaseLiquidity_withTakePair.snap b/.forge-snapshots/PositionManager_decreaseLiquidity_withTakePair.snap index ac2386537..69bb06d35 100644 --- a/.forge-snapshots/PositionManager_decreaseLiquidity_withTakePair.snap +++ b/.forge-snapshots/PositionManager_decreaseLiquidity_withTakePair.snap @@ -1 +1 @@ -116182 \ No newline at end of file +114704 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_decrease_burnEmpty.snap b/.forge-snapshots/PositionManager_decrease_burnEmpty.snap index dc105d6a6..70af78d66 100644 --- a/.forge-snapshots/PositionManager_decrease_burnEmpty.snap +++ b/.forge-snapshots/PositionManager_decrease_burnEmpty.snap @@ -1 +1 @@ -135076 \ No newline at end of file +133217 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_decrease_burnEmpty_native.snap b/.forge-snapshots/PositionManager_decrease_burnEmpty_native.snap index 784739a55..36c2096e0 100644 --- a/.forge-snapshots/PositionManager_decrease_burnEmpty_native.snap +++ b/.forge-snapshots/PositionManager_decrease_burnEmpty_native.snap @@ -1 +1 @@ -127816 \ No newline at end of file +126002 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_decrease_sameRange_allLiquidity.snap b/.forge-snapshots/PositionManager_decrease_sameRange_allLiquidity.snap index 3ff1bbec5..784739a55 100644 --- a/.forge-snapshots/PositionManager_decrease_sameRange_allLiquidity.snap +++ b/.forge-snapshots/PositionManager_decrease_sameRange_allLiquidity.snap @@ -1 +1 @@ -129538 \ No newline at end of file +127816 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_decrease_take_take.snap b/.forge-snapshots/PositionManager_decrease_take_take.snap index 9099ea8e3..d0ada0254 100644 --- a/.forge-snapshots/PositionManager_decrease_take_take.snap +++ b/.forge-snapshots/PositionManager_decrease_take_take.snap @@ -1 +1 @@ -117355 \ No newline at end of file +115704 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_increaseLiquidity_erc20_withClose.snap b/.forge-snapshots/PositionManager_increaseLiquidity_erc20_withClose.snap index 4a9005d49..8c25e4df0 100644 --- a/.forge-snapshots/PositionManager_increaseLiquidity_erc20_withClose.snap +++ b/.forge-snapshots/PositionManager_increaseLiquidity_erc20_withClose.snap @@ -1 +1 @@ -155504 \ No newline at end of file +154735 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_increaseLiquidity_erc20_withSettlePair.snap b/.forge-snapshots/PositionManager_increaseLiquidity_erc20_withSettlePair.snap index 7a94efabc..df690dc6c 100644 --- a/.forge-snapshots/PositionManager_increaseLiquidity_erc20_withSettlePair.snap +++ b/.forge-snapshots/PositionManager_increaseLiquidity_erc20_withSettlePair.snap @@ -1 +1 @@ -154506 \ No newline at end of file +153793 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_increaseLiquidity_native.snap b/.forge-snapshots/PositionManager_increaseLiquidity_native.snap index 30541c563..ba0d5e3d9 100644 --- a/.forge-snapshots/PositionManager_increaseLiquidity_native.snap +++ b/.forge-snapshots/PositionManager_increaseLiquidity_native.snap @@ -1 +1 @@ -137304 \ No newline at end of file +136186 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_increase_autocompoundExactUnclaimedFees.snap b/.forge-snapshots/PositionManager_increase_autocompoundExactUnclaimedFees.snap index e35f36c43..bf6e5cb8b 100644 --- a/.forge-snapshots/PositionManager_increase_autocompoundExactUnclaimedFees.snap +++ b/.forge-snapshots/PositionManager_increase_autocompoundExactUnclaimedFees.snap @@ -1 +1 @@ -133649 \ No newline at end of file +132042 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_increase_autocompoundExcessFeesCredit.snap b/.forge-snapshots/PositionManager_increase_autocompoundExcessFeesCredit.snap index 1f1f4be2c..b99863b5f 100644 --- a/.forge-snapshots/PositionManager_increase_autocompoundExcessFeesCredit.snap +++ b/.forge-snapshots/PositionManager_increase_autocompoundExcessFeesCredit.snap @@ -1 +1 @@ -174565 \ No newline at end of file +172746 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_increase_autocompound_clearExcess.snap b/.forge-snapshots/PositionManager_increase_autocompound_clearExcess.snap index ff2c4bd93..39dc1aa1d 100644 --- a/.forge-snapshots/PositionManager_increase_autocompound_clearExcess.snap +++ b/.forge-snapshots/PositionManager_increase_autocompound_clearExcess.snap @@ -1 +1 @@ -144521 \ No newline at end of file +143428 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_native.snap b/.forge-snapshots/PositionManager_mint_native.snap index c4b5a8375..7c7772a22 100644 --- a/.forge-snapshots/PositionManager_mint_native.snap +++ b/.forge-snapshots/PositionManager_mint_native.snap @@ -1 +1 @@ -341026 \ No newline at end of file +339884 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_nativeWithSweep_withClose.snap b/.forge-snapshots/PositionManager_mint_nativeWithSweep_withClose.snap index 3aa688240..2da2e23d0 100644 --- a/.forge-snapshots/PositionManager_mint_nativeWithSweep_withClose.snap +++ b/.forge-snapshots/PositionManager_mint_nativeWithSweep_withClose.snap @@ -1 +1 @@ -349518 \ No newline at end of file +348264 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_nativeWithSweep_withSettlePair.snap b/.forge-snapshots/PositionManager_mint_nativeWithSweep_withSettlePair.snap index 5af5865cc..4d75eb0ab 100644 --- a/.forge-snapshots/PositionManager_mint_nativeWithSweep_withSettlePair.snap +++ b/.forge-snapshots/PositionManager_mint_nativeWithSweep_withSettlePair.snap @@ -1 +1 @@ -348820 \ No newline at end of file +347630 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_onSameTickLower.snap b/.forge-snapshots/PositionManager_mint_onSameTickLower.snap index 26b30309b..8f20c651a 100644 --- a/.forge-snapshots/PositionManager_mint_onSameTickLower.snap +++ b/.forge-snapshots/PositionManager_mint_onSameTickLower.snap @@ -1 +1 @@ -319008 \ No newline at end of file +318202 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_onSameTickUpper.snap b/.forge-snapshots/PositionManager_mint_onSameTickUpper.snap index a45fcbb16..1f2c23b21 100644 --- a/.forge-snapshots/PositionManager_mint_onSameTickUpper.snap +++ b/.forge-snapshots/PositionManager_mint_onSameTickUpper.snap @@ -1 +1 @@ -319650 \ No newline at end of file +318872 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_sameRange.snap b/.forge-snapshots/PositionManager_mint_sameRange.snap index 3eb2b8387..63e9e4f7c 100644 --- a/.forge-snapshots/PositionManager_mint_sameRange.snap +++ b/.forge-snapshots/PositionManager_mint_sameRange.snap @@ -1 +1 @@ -245232 \ No newline at end of file +244441 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_settleWithBalance_sweep.snap b/.forge-snapshots/PositionManager_mint_settleWithBalance_sweep.snap index 8da3d5725..146d75ef0 100644 --- a/.forge-snapshots/PositionManager_mint_settleWithBalance_sweep.snap +++ b/.forge-snapshots/PositionManager_mint_settleWithBalance_sweep.snap @@ -1 +1 @@ -375050 \ No newline at end of file +374127 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_warmedPool_differentRange.snap b/.forge-snapshots/PositionManager_mint_warmedPool_differentRange.snap index 782f7f591..84705d03b 100644 --- a/.forge-snapshots/PositionManager_mint_warmedPool_differentRange.snap +++ b/.forge-snapshots/PositionManager_mint_warmedPool_differentRange.snap @@ -1 +1 @@ -325026 \ No newline at end of file +324233 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_withClose.snap b/.forge-snapshots/PositionManager_mint_withClose.snap index c3ad29224..67d67633c 100644 --- a/.forge-snapshots/PositionManager_mint_withClose.snap +++ b/.forge-snapshots/PositionManager_mint_withClose.snap @@ -1 +1 @@ -376326 \ No newline at end of file +375533 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_withSettlePair.snap b/.forge-snapshots/PositionManager_mint_withSettlePair.snap index 22235296f..0868257bf 100644 --- a/.forge-snapshots/PositionManager_mint_withSettlePair.snap +++ b/.forge-snapshots/PositionManager_mint_withSettlePair.snap @@ -1 +1 @@ -375466 \ No newline at end of file +374733 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_multicall_initialize_mint.snap b/.forge-snapshots/PositionManager_multicall_initialize_mint.snap index f073e2670..102942b78 100644 --- a/.forge-snapshots/PositionManager_multicall_initialize_mint.snap +++ b/.forge-snapshots/PositionManager_multicall_initialize_mint.snap @@ -1 +1 @@ -420753 \ No newline at end of file +419680 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_permit.snap b/.forge-snapshots/PositionManager_permit.snap index d71fc9167..227e327e4 100644 --- a/.forge-snapshots/PositionManager_permit.snap +++ b/.forge-snapshots/PositionManager_permit.snap @@ -1 +1 @@ -79470 \ No newline at end of file +79076 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_permit_secondPosition.snap b/.forge-snapshots/PositionManager_permit_secondPosition.snap index bf069bcae..31ad61876 100644 --- a/.forge-snapshots/PositionManager_permit_secondPosition.snap +++ b/.forge-snapshots/PositionManager_permit_secondPosition.snap @@ -1 +1 @@ -62358 \ No newline at end of file +61976 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_permit_twice.snap b/.forge-snapshots/PositionManager_permit_twice.snap index 912820cbe..d650ccbd7 100644 --- a/.forge-snapshots/PositionManager_permit_twice.snap +++ b/.forge-snapshots/PositionManager_permit_twice.snap @@ -1 +1 @@ -45246 \ No newline at end of file +44876 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_subscribe.snap b/.forge-snapshots/PositionManager_subscribe.snap index dec6506f4..7172622fe 100644 --- a/.forge-snapshots/PositionManager_subscribe.snap +++ b/.forge-snapshots/PositionManager_subscribe.snap @@ -1 +1 @@ -88474 \ No newline at end of file +88052 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_unsubscribe.snap b/.forge-snapshots/PositionManager_unsubscribe.snap index 4efc0fb76..722233d86 100644 --- a/.forge-snapshots/PositionManager_unsubscribe.snap +++ b/.forge-snapshots/PositionManager_unsubscribe.snap @@ -1 +1 @@ -62639 \ No newline at end of file +62411 \ No newline at end of file diff --git a/.forge-snapshots/StateView_extsload_getFeeGrowthGlobals.snap b/.forge-snapshots/StateView_extsload_getFeeGrowthGlobals.snap index d659d28b1..920727d2e 100644 --- a/.forge-snapshots/StateView_extsload_getFeeGrowthGlobals.snap +++ b/.forge-snapshots/StateView_extsload_getFeeGrowthGlobals.snap @@ -1 +1 @@ -2376 \ No newline at end of file +2256 \ No newline at end of file diff --git a/.forge-snapshots/StateView_extsload_getFeeGrowthInside.snap b/.forge-snapshots/StateView_extsload_getFeeGrowthInside.snap index 37017731e..6df672447 100644 --- a/.forge-snapshots/StateView_extsload_getFeeGrowthInside.snap +++ b/.forge-snapshots/StateView_extsload_getFeeGrowthInside.snap @@ -1 +1 @@ -8455 \ No newline at end of file +7994 \ No newline at end of file diff --git a/.forge-snapshots/StateView_extsload_getLiquidity.snap b/.forge-snapshots/StateView_extsload_getLiquidity.snap index 5ca63cd4c..a900d0b24 100644 --- a/.forge-snapshots/StateView_extsload_getLiquidity.snap +++ b/.forge-snapshots/StateView_extsload_getLiquidity.snap @@ -1 +1 @@ -1487 \ No newline at end of file +1399 \ No newline at end of file diff --git a/.forge-snapshots/StateView_extsload_getPositionInfo.snap b/.forge-snapshots/StateView_extsload_getPositionInfo.snap index 6f9954563..c173e591f 100644 --- a/.forge-snapshots/StateView_extsload_getPositionInfo.snap +++ b/.forge-snapshots/StateView_extsload_getPositionInfo.snap @@ -1 +1 @@ -2905 \ No newline at end of file +2826 \ No newline at end of file diff --git a/.forge-snapshots/StateView_extsload_getPositionLiquidity.snap b/.forge-snapshots/StateView_extsload_getPositionLiquidity.snap index 2dd447630..7f3589da4 100644 --- a/.forge-snapshots/StateView_extsload_getPositionLiquidity.snap +++ b/.forge-snapshots/StateView_extsload_getPositionLiquidity.snap @@ -1 +1 @@ -1724 \ No newline at end of file +1651 \ No newline at end of file diff --git a/.forge-snapshots/StateView_extsload_getSlot0.snap b/.forge-snapshots/StateView_extsload_getSlot0.snap index a35ae7300..585cf67a0 100644 --- a/.forge-snapshots/StateView_extsload_getSlot0.snap +++ b/.forge-snapshots/StateView_extsload_getSlot0.snap @@ -1 +1 @@ -1584 \ No newline at end of file +1446 \ No newline at end of file diff --git a/.forge-snapshots/StateView_extsload_getTickBitmap.snap b/.forge-snapshots/StateView_extsload_getTickBitmap.snap index 7f29ad284..05fd8282c 100644 --- a/.forge-snapshots/StateView_extsload_getTickBitmap.snap +++ b/.forge-snapshots/StateView_extsload_getTickBitmap.snap @@ -1 +1 @@ -1682 \ No newline at end of file +1392 \ No newline at end of file diff --git a/.forge-snapshots/StateView_extsload_getTickFeeGrowthOutside.snap b/.forge-snapshots/StateView_extsload_getTickFeeGrowthOutside.snap index 00c1535ae..7a03b74c0 100644 --- a/.forge-snapshots/StateView_extsload_getTickFeeGrowthOutside.snap +++ b/.forge-snapshots/StateView_extsload_getTickFeeGrowthOutside.snap @@ -1 +1 @@ -2734 \ No newline at end of file +2543 \ No newline at end of file diff --git a/.forge-snapshots/StateView_extsload_getTickInfo.snap b/.forge-snapshots/StateView_extsload_getTickInfo.snap index a6fea8d18..f538595cb 100644 --- a/.forge-snapshots/StateView_extsload_getTickInfo.snap +++ b/.forge-snapshots/StateView_extsload_getTickInfo.snap @@ -1 +1 @@ -3068 \ No newline at end of file +2758 \ No newline at end of file diff --git a/.forge-snapshots/StateView_extsload_getTickLiquidity.snap b/.forge-snapshots/StateView_extsload_getTickLiquidity.snap index fdef1d023..44e788259 100644 --- a/.forge-snapshots/StateView_extsload_getTickLiquidity.snap +++ b/.forge-snapshots/StateView_extsload_getTickLiquidity.snap @@ -1 +1 @@ -1879 \ No newline at end of file +1646 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_Bytecode.snap b/.forge-snapshots/V4Router_Bytecode.snap index c20233be6..86d32156a 100644 --- a/.forge-snapshots/V4Router_Bytecode.snap +++ b/.forge-snapshots/V4Router_Bytecode.snap @@ -1 +1 @@ -8711 \ No newline at end of file +7107 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactIn1Hop_nativeIn.snap b/.forge-snapshots/V4Router_ExactIn1Hop_nativeIn.snap index ce9be6341..80e10d4b3 100644 --- a/.forge-snapshots/V4Router_ExactIn1Hop_nativeIn.snap +++ b/.forge-snapshots/V4Router_ExactIn1Hop_nativeIn.snap @@ -1 +1 @@ -119501 \ No newline at end of file +115155 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactIn1Hop_nativeOut.snap b/.forge-snapshots/V4Router_ExactIn1Hop_nativeOut.snap index 726ce00a0..2502517ce 100644 --- a/.forge-snapshots/V4Router_ExactIn1Hop_nativeOut.snap +++ b/.forge-snapshots/V4Router_ExactIn1Hop_nativeOut.snap @@ -1 +1 @@ -118696 \ No newline at end of file +115632 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactIn1Hop_oneForZero.snap b/.forge-snapshots/V4Router_ExactIn1Hop_oneForZero.snap index 4cda0de8d..1be9e4d60 100644 --- a/.forge-snapshots/V4Router_ExactIn1Hop_oneForZero.snap +++ b/.forge-snapshots/V4Router_ExactIn1Hop_oneForZero.snap @@ -1 +1 @@ -127568 \ No newline at end of file +124447 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactIn1Hop_zeroForOne.snap b/.forge-snapshots/V4Router_ExactIn1Hop_zeroForOne.snap index 988f465e4..6b6c725c9 100644 --- a/.forge-snapshots/V4Router_ExactIn1Hop_zeroForOne.snap +++ b/.forge-snapshots/V4Router_ExactIn1Hop_zeroForOne.snap @@ -1 +1 @@ -134398 \ No newline at end of file +130165 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactIn2Hops.snap b/.forge-snapshots/V4Router_ExactIn2Hops.snap index 0ec74b474..57ddea8c9 100644 --- a/.forge-snapshots/V4Router_ExactIn2Hops.snap +++ b/.forge-snapshots/V4Router_ExactIn2Hops.snap @@ -1 +1 @@ -185939 \ No newline at end of file +179173 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactIn2Hops_nativeIn.snap b/.forge-snapshots/V4Router_ExactIn2Hops_nativeIn.snap index 1ce5a1797..84c59c382 100644 --- a/.forge-snapshots/V4Router_ExactIn2Hops_nativeIn.snap +++ b/.forge-snapshots/V4Router_ExactIn2Hops_nativeIn.snap @@ -1 +1 @@ -177874 \ No newline at end of file +169873 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactIn3Hops.snap b/.forge-snapshots/V4Router_ExactIn3Hops.snap index 96e4b6a49..af40da311 100644 --- a/.forge-snapshots/V4Router_ExactIn3Hops.snap +++ b/.forge-snapshots/V4Router_ExactIn3Hops.snap @@ -1 +1 @@ -237461 \ No newline at end of file +228160 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactIn3Hops_nativeIn.snap b/.forge-snapshots/V4Router_ExactIn3Hops_nativeIn.snap index 456844ad2..240b6821a 100644 --- a/.forge-snapshots/V4Router_ExactIn3Hops_nativeIn.snap +++ b/.forge-snapshots/V4Router_ExactIn3Hops_nativeIn.snap @@ -1 +1 @@ -229420 \ No newline at end of file +218884 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactInputSingle.snap b/.forge-snapshots/V4Router_ExactInputSingle.snap index 8f5800369..ba3f7d59c 100644 --- a/.forge-snapshots/V4Router_ExactInputSingle.snap +++ b/.forge-snapshots/V4Router_ExactInputSingle.snap @@ -1 +1 @@ -133206 \ No newline at end of file +129459 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactInputSingle_nativeIn.snap b/.forge-snapshots/V4Router_ExactInputSingle_nativeIn.snap index e8ecc585d..022ef14ad 100644 --- a/.forge-snapshots/V4Router_ExactInputSingle_nativeIn.snap +++ b/.forge-snapshots/V4Router_ExactInputSingle_nativeIn.snap @@ -1 +1 @@ -118309 \ No newline at end of file +114449 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactInputSingle_nativeOut.snap b/.forge-snapshots/V4Router_ExactInputSingle_nativeOut.snap index 06d583087..2c8cd3903 100644 --- a/.forge-snapshots/V4Router_ExactInputSingle_nativeOut.snap +++ b/.forge-snapshots/V4Router_ExactInputSingle_nativeOut.snap @@ -1 +1 @@ -117482 \ No newline at end of file +114895 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactOut1Hop_nativeIn_sweepETH.snap b/.forge-snapshots/V4Router_ExactOut1Hop_nativeIn_sweepETH.snap index 281bebfff..82844d35c 100644 --- a/.forge-snapshots/V4Router_ExactOut1Hop_nativeIn_sweepETH.snap +++ b/.forge-snapshots/V4Router_ExactOut1Hop_nativeIn_sweepETH.snap @@ -1 +1 @@ -125253 \ No newline at end of file +121387 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactOut1Hop_nativeOut.snap b/.forge-snapshots/V4Router_ExactOut1Hop_nativeOut.snap index a175ada7e..32c9c3a37 100644 --- a/.forge-snapshots/V4Router_ExactOut1Hop_nativeOut.snap +++ b/.forge-snapshots/V4Router_ExactOut1Hop_nativeOut.snap @@ -1 +1 @@ -119531 \ No newline at end of file +116688 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactOut1Hop_oneForZero.snap b/.forge-snapshots/V4Router_ExactOut1Hop_oneForZero.snap index 3a7e6f951..040303411 100644 --- a/.forge-snapshots/V4Router_ExactOut1Hop_oneForZero.snap +++ b/.forge-snapshots/V4Router_ExactOut1Hop_oneForZero.snap @@ -1 +1 @@ -128403 \ No newline at end of file +125503 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactOut1Hop_zeroForOne.snap b/.forge-snapshots/V4Router_ExactOut1Hop_zeroForOne.snap index 756c39036..226a0ed5b 100644 --- a/.forge-snapshots/V4Router_ExactOut1Hop_zeroForOne.snap +++ b/.forge-snapshots/V4Router_ExactOut1Hop_zeroForOne.snap @@ -1 +1 @@ -133204 \ No newline at end of file +129420 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactOut2Hops.snap b/.forge-snapshots/V4Router_ExactOut2Hops.snap index 952c1f61b..d159c6cc5 100644 --- a/.forge-snapshots/V4Router_ExactOut2Hops.snap +++ b/.forge-snapshots/V4Router_ExactOut2Hops.snap @@ -1 +1 @@ -185348 \ No newline at end of file +179252 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactOut2Hops_nativeIn.snap b/.forge-snapshots/V4Router_ExactOut2Hops_nativeIn.snap index 2dcf95860..3a5782e52 100644 --- a/.forge-snapshots/V4Router_ExactOut2Hops_nativeIn.snap +++ b/.forge-snapshots/V4Router_ExactOut2Hops_nativeIn.snap @@ -1 +1 @@ -182198 \ No newline at end of file +175136 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactOut3Hops.snap b/.forge-snapshots/V4Router_ExactOut3Hops.snap index a12f60b46..f4e089998 100644 --- a/.forge-snapshots/V4Router_ExactOut3Hops.snap +++ b/.forge-snapshots/V4Router_ExactOut3Hops.snap @@ -1 +1 @@ -237488 \ No newline at end of file +229091 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactOut3Hops_nativeIn.snap b/.forge-snapshots/V4Router_ExactOut3Hops_nativeIn.snap index 8cdfe824d..c3ec97aba 100644 --- a/.forge-snapshots/V4Router_ExactOut3Hops_nativeIn.snap +++ b/.forge-snapshots/V4Router_ExactOut3Hops_nativeIn.snap @@ -1 +1 @@ -234362 \ No newline at end of file +224999 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactOut3Hops_nativeOut.snap b/.forge-snapshots/V4Router_ExactOut3Hops_nativeOut.snap index 9e7b3ae50..82b547c5c 100644 --- a/.forge-snapshots/V4Router_ExactOut3Hops_nativeOut.snap +++ b/.forge-snapshots/V4Router_ExactOut3Hops_nativeOut.snap @@ -1 +1 @@ -228640 \ No newline at end of file +220300 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactOutputSingle.snap b/.forge-snapshots/V4Router_ExactOutputSingle.snap index f82d69d89..7ff1a5b2c 100644 --- a/.forge-snapshots/V4Router_ExactOutputSingle.snap +++ b/.forge-snapshots/V4Router_ExactOutputSingle.snap @@ -1 +1 @@ -132016 \ No newline at end of file +128698 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactOutputSingle_nativeIn_sweepETH.snap b/.forge-snapshots/V4Router_ExactOutputSingle_nativeIn_sweepETH.snap index 2a0ddd847..62d248457 100644 --- a/.forge-snapshots/V4Router_ExactOutputSingle_nativeIn_sweepETH.snap +++ b/.forge-snapshots/V4Router_ExactOutputSingle_nativeIn_sweepETH.snap @@ -1 +1 @@ -124065 \ No newline at end of file +120665 \ No newline at end of file diff --git a/.forge-snapshots/V4Router_ExactOutputSingle_nativeOut.snap b/.forge-snapshots/V4Router_ExactOutputSingle_nativeOut.snap index 444ed22ac..6667f50ed 100644 --- a/.forge-snapshots/V4Router_ExactOutputSingle_nativeOut.snap +++ b/.forge-snapshots/V4Router_ExactOutputSingle_nativeOut.snap @@ -1 +1 @@ -118356 \ No newline at end of file +116041 \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index 002bc8be1..739edc6b6 100644 --- a/foundry.toml +++ b/foundry.toml @@ -2,6 +2,7 @@ out = 'foundry-out' solc_version = '0.8.26' optimizer_runs = 1_000_000 +via_ir = true ffi = true fs_permissions = [{ access = "read-write", path = ".forge-snapshots/"}] evm_version = "cancun" diff --git a/lib/v4-core b/lib/v4-core index 3609d8196..5a7990b12 160000 --- a/lib/v4-core +++ b/lib/v4-core @@ -1 +1 @@ -Subproject commit 3609d8196a87c8107a55da8f40ecaf88d7323b05 +Subproject commit 5a7990b127314af61998f37b6689a74f9c2db453 diff --git a/script/01_PoolManager.s.sol b/script/01_PoolManager.s.sol index c6e53e4e1..e412add9e 100644 --- a/script/01_PoolManager.s.sol +++ b/script/01_PoolManager.s.sol @@ -10,10 +10,10 @@ import "forge-std/console2.sol"; contract DeployPoolManager is Script { function setUp() public {} - function run(uint256 controllerGasLimit) public returns (IPoolManager manager) { + function run() public returns (IPoolManager manager) { vm.startBroadcast(); - manager = new PoolManager(controllerGasLimit); + manager = new PoolManager(); console2.log("PoolManager", address(manager)); vm.stopBroadcast(); diff --git a/src/V4Router.sol b/src/V4Router.sol index e2a5ea297..cbdf464f0 100644 --- a/src/V4Router.sol +++ b/src/V4Router.sol @@ -7,15 +7,14 @@ import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol"; import {Currency} from "@uniswap/v4-core/src/types/Currency.sol"; import {TickMath} from "@uniswap/v4-core/src/libraries/TickMath.sol"; import {SafeCast} from "@uniswap/v4-core/src/libraries/SafeCast.sol"; +import {BipsLibrary} from "@uniswap/v4-core/src/libraries/BipsLibrary.sol"; import {PathKey, PathKeyLibrary} from "./libraries/PathKey.sol"; import {CalldataDecoder} from "./libraries/CalldataDecoder.sol"; -import {BipsLibrary} from "./libraries/BipsLibrary.sol"; import {IV4Router} from "./interfaces/IV4Router.sol"; import {BaseActionsRouter} from "./base/BaseActionsRouter.sol"; import {DeltaResolver} from "./base/DeltaResolver.sol"; import {Actions} from "./libraries/Actions.sol"; -import {SafeCastTemp} from "./libraries/SafeCast.sol"; import {ActionConstants} from "./libraries/ActionConstants.sol"; /// @title UniswapV4Router @@ -23,7 +22,6 @@ import {ActionConstants} from "./libraries/ActionConstants.sol"; /// @dev the entry point to executing actions in this contract is calling `BaseActionsRouter._executeActions` /// An inheriting contract should call _executeActions at the point that they wish actions to be executed abstract contract V4Router is IV4Router, BaseActionsRouter, DeltaResolver { - using SafeCastTemp for *; using SafeCast for *; using PathKeyLibrary for PathKey; using CalldataDecoder for bytes; diff --git a/src/base/DeltaResolver.sol b/src/base/DeltaResolver.sol index a31bf1392..d80bfdc4d 100644 --- a/src/base/DeltaResolver.sol +++ b/src/base/DeltaResolver.sol @@ -31,7 +31,7 @@ abstract contract DeltaResolver is ImmutableState { /// @param payer Address of the payer /// @param amount Amount to send function _settle(Currency currency, address payer, uint256 amount) internal { - if (currency.isNative()) { + if (currency.isAddressZero()) { poolManager.settle{value: amount}(); } else { poolManager.sync(currency); diff --git a/src/base/Permit2Forwarder.sol b/src/base/Permit2Forwarder.sol index b7c678683..c90b406a3 100644 --- a/src/base/Permit2Forwarder.sol +++ b/src/base/Permit2Forwarder.sol @@ -9,8 +9,6 @@ contract Permit2Forwarder { /// @notice the Permit2 contract to forward approvals IAllowanceTransfer public immutable permit2; - error Wrap__Permit2Reverted(address _permit2, bytes reason); - constructor(IAllowanceTransfer _permit2) { permit2 = _permit2; } @@ -28,7 +26,7 @@ contract Permit2Forwarder { // use try/catch in case an actor front-runs the permit, which would DOS multicalls try permit2.permit(owner, permitSingle, signature) {} catch (bytes memory reason) { - err = abi.encodeWithSelector(Wrap__Permit2Reverted.selector, address(permit2), reason); + err = reason; } } @@ -45,7 +43,7 @@ contract Permit2Forwarder { // use try/catch in case an actor front-runs the permit, which would DOS multicalls try permit2.permit(owner, _permitBatch, signature) {} catch (bytes memory reason) { - err = abi.encodeWithSelector(Wrap__Permit2Reverted.selector, address(permit2), reason); + err = reason; } } } diff --git a/src/base/hooks/BaseHook.sol b/src/base/hooks/BaseHook.sol index 331d513c6..ca2eb9858 100644 --- a/src/base/hooks/BaseHook.sol +++ b/src/base/hooks/BaseHook.sol @@ -94,6 +94,7 @@ abstract contract BaseHook is IHooks, SafeCallback { PoolKey calldata, IPoolManager.ModifyLiquidityParams calldata, BalanceDelta, + BalanceDelta, bytes calldata ) external virtual returns (bytes4, BalanceDelta) { revert HookNotImplemented(); @@ -105,6 +106,7 @@ abstract contract BaseHook is IHooks, SafeCallback { PoolKey calldata, IPoolManager.ModifyLiquidityParams calldata, BalanceDelta, + BalanceDelta, bytes calldata ) external virtual returns (bytes4, BalanceDelta) { revert HookNotImplemented(); diff --git a/src/libraries/BipsLibrary.sol b/src/libraries/BipsLibrary.sol deleted file mode 100644 index f5a842fa3..000000000 --- a/src/libraries/BipsLibrary.sol +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -pragma solidity ^0.8.0; - -/// @title For calculating a percentage of an amount, using bips -// TODO: Post-audit move to core, as v4-core will use something similar. -library BipsLibrary { - uint256 internal constant BPS_DENOMINATOR = 10_000; - - /// @notice emitted when an invalid percentage is provided - error InvalidBips(); - - /// @param amount The total amount to calculate a percentage of - /// @param bips The percentage to calculate, in bips - function calculatePortion(uint256 amount, uint256 bips) internal pure returns (uint256) { - if (bips > BPS_DENOMINATOR) revert InvalidBips(); - return (amount * bips) / BPS_DENOMINATOR; - } -} diff --git a/src/libraries/SafeCast.sol b/src/libraries/SafeCast.sol deleted file mode 100644 index ae16b2d18..000000000 --- a/src/libraries/SafeCast.sol +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -pragma solidity ^0.8.0; - -import {CustomRevert} from "@uniswap/v4-core/src/libraries/CustomRevert.sol"; - -/// @title Safe casting methods -/// @notice Contains methods for safely casting between types -/// TODO after audits move this function to core's SafeCast.sol! -library SafeCastTemp { - using CustomRevert for bytes4; - - error SafeCastOverflow(); - - /// @notice Cast a int128 to a uint128, revert on overflow or underflow - /// @param x The int128 to be casted - /// @return y The casted integer, now type uint128 - function toUint128(int128 x) internal pure returns (uint128 y) { - if (x < 0) SafeCastOverflow.selector.revertWith(); - y = uint128(x); - } -} diff --git a/src/libraries/SlippageCheck.sol b/src/libraries/SlippageCheck.sol index 860dea374..e837b17ed 100644 --- a/src/libraries/SlippageCheck.sol +++ b/src/libraries/SlippageCheck.sol @@ -2,12 +2,12 @@ pragma solidity ^0.8.0; import {BalanceDelta} from "@uniswap/v4-core/src/types/BalanceDelta.sol"; -import {SafeCastTemp} from "./SafeCast.sol"; +import {SafeCast} from "@uniswap/v4-core/src/libraries/SafeCast.sol"; /// @title Slippage Check Library /// @notice a library for checking if a delta exceeds a maximum ceiling or fails to meet a minimum floor library SlippageCheck { - using SafeCastTemp for int128; + using SafeCast for int128; error MaximumAmountExceeded(uint128 maximumAmount, uint128 amountRequested); error MinimumAmountInsufficient(uint128 minimumAmount, uint128 amountReceived); diff --git a/test/DeltaResolver.t.sol b/test/DeltaResolver.t.sol index 0e791e73b..61c032038 100644 --- a/test/DeltaResolver.t.sol +++ b/test/DeltaResolver.t.sol @@ -23,7 +23,7 @@ contract DeltaResolverTest is Test, Deployers, GasSnapshot { function test_settle_native_succeeds(uint256 amount) public { amount = bound(amount, 1, address(manager).balance); - resolver.executeTest(CurrencyLibrary.NATIVE, amount); + resolver.executeTest(CurrencyLibrary.ADDRESS_ZERO, amount); // check `pay` was not called assertEq(resolver.payCallCount(), 0); diff --git a/test/erc721Permit/ERC721Permit.permit.t.sol b/test/erc721Permit/ERC721Permit.permit.t.sol index e567d08f6..0a741381e 100644 --- a/test/erc721Permit/ERC721Permit.permit.t.sol +++ b/test/erc721Permit/ERC721Permit.permit.t.sol @@ -234,7 +234,7 @@ contract ERC721PermitTest is Test { uint256 tokenId = erc721Permit.mint(); uint256 nonce = 1; - uint256 deadline = block.timestamp; + uint256 deadline = vm.getBlockTimestamp(); bytes32 digest = _getPermitDigest(spender, tokenId, nonce, deadline); (uint8 v, bytes32 r, bytes32 s) = vm.sign(alicePK, digest); bytes memory signature = abi.encodePacked(r, s, v); diff --git a/test/erc721Permit/ERC721Permit.permitForAll.t.sol b/test/erc721Permit/ERC721Permit.permitForAll.t.sol index 63e99ad31..c8150895f 100644 --- a/test/erc721Permit/ERC721Permit.permitForAll.t.sol +++ b/test/erc721Permit/ERC721Permit.permitForAll.t.sol @@ -174,7 +174,7 @@ contract ERC721PermitForAllTest is Test { function test_fuzz_erc721permitForAll_SignatureDeadlineExpired(address operator) public { uint256 nonce = 1; - uint256 deadline = block.timestamp; + uint256 deadline = vm.getBlockTimestamp(); bytes32 digest = _getPermitForAllDigest(operator, true, nonce, deadline); (uint8 v, bytes32 r, bytes32 s) = vm.sign(alicePK, digest); bytes memory signature = abi.encodePacked(r, s, v); diff --git a/test/libraries/BipsLibrary.t.sol b/test/libraries/BipsLibrary.t.sol deleted file mode 100644 index f895cf4d5..000000000 --- a/test/libraries/BipsLibrary.t.sol +++ /dev/null @@ -1,44 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import "forge-std/Test.sol"; -import "forge-std/StdError.sol"; -import {BipsLibrary} from "../../src/libraries/BipsLibrary.sol"; - -contract PositionConfigTest is Test { - using BipsLibrary for uint256; - - function test_fuzz_calculatePortion(uint256 amount, uint256 bips) public { - amount = bound(amount, 0, uint256(type(uint128).max)); - if (bips > BipsLibrary.BPS_DENOMINATOR) { - vm.expectRevert(BipsLibrary.InvalidBips.selector); - amount.calculatePortion(bips); - } else { - assertEq(amount.calculatePortion(bips), amount * bips / BipsLibrary.BPS_DENOMINATOR); - } - } - - function test_fuzz_gasLimitt(uint256 bips) public { - if (bips > BipsLibrary.BPS_DENOMINATOR) { - vm.expectRevert(BipsLibrary.InvalidBips.selector); - block.gaslimit.calculatePortion(bips); - } else { - assertEq(block.gaslimit.calculatePortion(bips), block.gaslimit * bips / BipsLibrary.BPS_DENOMINATOR); - } - } - - function test_gasLimit_100_percent() public view { - assertEq(block.gaslimit, block.gaslimit.calculatePortion(10_000)); - } - - function test_gasLimit_1_percent() public view { - /// 100 bps = 1% - // 1% of 3_000_000_000 is 30_000_000 - assertEq(30_000_000, block.gaslimit.calculatePortion(100)); - } - - function test_gasLimit_1BP() public view { - /// 1bp is 0.01% - assertEq(300_000, block.gaslimit.calculatePortion(1)); - } -} diff --git a/test/mocks/MockDeltaResolver.sol b/test/mocks/MockDeltaResolver.sol index 4a3941e4a..327f5e1c9 100644 --- a/test/mocks/MockDeltaResolver.sol +++ b/test/mocks/MockDeltaResolver.sol @@ -22,7 +22,7 @@ contract MockDeltaResolver is Test, DeltaResolver, IUnlockCallback { function unlockCallback(bytes calldata data) external returns (bytes memory) { (Currency currency, address caller, uint256 amount) = abi.decode(data, (Currency, address, uint256)); - address recipient = (currency.isNative()) ? address(this) : caller; + address recipient = (currency.isAddressZero()) ? address(this) : caller; uint256 balanceBefore = currency.balanceOf(recipient); _take(currency, recipient, amount); diff --git a/test/position-managers/NativeToken.t.sol b/test/position-managers/NativeToken.t.sol index 662ddda15..475965d56 100644 --- a/test/position-managers/NativeToken.t.sol +++ b/test/position-managers/NativeToken.t.sol @@ -54,7 +54,7 @@ contract PositionManagerTest is Test, PosmTestSetup, LiquidityFuzzers { // This is needed to receive return deltas from modifyLiquidity calls. deployPosmHookSavesDelta(); - currency0 = CurrencyLibrary.NATIVE; + currency0 = CurrencyLibrary.ADDRESS_ZERO; (nativeKey, poolId) = initPool(currency0, currency1, IHooks(hook), 3000, SQRT_PRICE_1_1, ZERO_BYTES); deployPosm(manager); @@ -781,7 +781,7 @@ contract PositionManagerTest is Test, PosmTestSetup, LiquidityFuzzers { ); plan.add(Actions.CLOSE_CURRENCY, abi.encode(config.poolKey.currency0)); plan.add(Actions.CLOSE_CURRENCY, abi.encode(config.poolKey.currency1)); - plan.add(Actions.SWEEP, abi.encode(CurrencyLibrary.NATIVE, address(this))); + plan.add(Actions.SWEEP, abi.encode(CurrencyLibrary.ADDRESS_ZERO, address(this))); bytes memory actions = plan.encode(); bytes[] memory calls = new bytes[](2); diff --git a/test/position-managers/PositionManager.gas.t.sol b/test/position-managers/PositionManager.gas.t.sol index 2463b7102..2d4aff130 100644 --- a/test/position-managers/PositionManager.gas.t.sol +++ b/test/position-managers/PositionManager.gas.t.sol @@ -54,7 +54,7 @@ contract PosMGasTest is Test, PosmTestSetup, GasSnapshot { deployMintAndApprove2Currencies(); (key, poolId) = initPool(currency0, currency1, IHooks(address(0)), 3000, SQRT_PRICE_1_1, ZERO_BYTES); - (nativeKey,) = initPool(CurrencyLibrary.NATIVE, currency1, IHooks(hook), 3000, SQRT_PRICE_1_1, ZERO_BYTES); + (nativeKey,) = initPool(CurrencyLibrary.ADDRESS_ZERO, currency1, IHooks(hook), 3000, SQRT_PRICE_1_1, ZERO_BYTES); FEE_WAD = uint256(key.fee).mulDivDown(FixedPointMathLib.WAD, 1_000_000); // Requires currency0 and currency1 to be set in base Deployers contract. @@ -594,7 +594,7 @@ contract PosMGasTest is Test, PosmTestSetup, GasSnapshot { ); planner.add(Actions.CLOSE_CURRENCY, abi.encode(nativeKey.currency0)); planner.add(Actions.CLOSE_CURRENCY, abi.encode(nativeKey.currency1)); - planner.add(Actions.SWEEP, abi.encode(CurrencyLibrary.NATIVE, ActionConstants.MSG_SENDER)); + planner.add(Actions.SWEEP, abi.encode(CurrencyLibrary.ADDRESS_ZERO, ActionConstants.MSG_SENDER)); bytes memory calls = planner.encode(); (uint256 amount0,) = LiquidityAmounts.getAmountsForLiquidity( @@ -619,7 +619,7 @@ contract PosMGasTest is Test, PosmTestSetup, GasSnapshot { ) ); planner.add(Actions.SETTLE_PAIR, abi.encode(nativeKey.currency0, nativeKey.currency1)); - planner.add(Actions.SWEEP, abi.encode(CurrencyLibrary.NATIVE, address(this))); + planner.add(Actions.SWEEP, abi.encode(CurrencyLibrary.ADDRESS_ZERO, address(this))); bytes memory calls = planner.encode(); (uint256 amount0,) = LiquidityAmounts.getAmountsForLiquidity( diff --git a/test/position-managers/PositionManager.multicall.t.sol b/test/position-managers/PositionManager.multicall.t.sol index 9264c28e6..767c10be5 100644 --- a/test/position-managers/PositionManager.multicall.t.sol +++ b/test/position-managers/PositionManager.multicall.t.sol @@ -128,7 +128,7 @@ contract PositionManagerMulticallTest is Test, Permit2SignatureHelpers, PosmTest function test_multicall_initializePool_mint_native() public { key = PoolKey({ - currency0: CurrencyLibrary.NATIVE, + currency0: CurrencyLibrary.ADDRESS_ZERO, currency1: currency1, fee: 0, tickSpacing: 10, @@ -422,26 +422,8 @@ contract PositionManagerMulticallTest is Test, Permit2SignatureHelpers, PosmTest lpm.ownerOf(tokenId); // token does not exist bytes[] memory results = lpm.multicall(calls); - assertEq( - results[0], - abi.encode( - abi.encodeWithSelector( - Permit2Forwarder.Wrap__Permit2Reverted.selector, - address(permit2), - abi.encodeWithSelector(InvalidNonce.selector) - ) - ) - ); - assertEq( - results[1], - abi.encode( - abi.encodeWithSelector( - Permit2Forwarder.Wrap__Permit2Reverted.selector, - address(permit2), - abi.encodeWithSelector(InvalidNonce.selector) - ) - ) - ); + assertEq(results[0], abi.encode(abi.encodeWithSelector(InvalidNonce.selector))); + assertEq(results[1], abi.encode(abi.encodeWithSelector(InvalidNonce.selector))); assertEq(lpm.ownerOf(tokenId), charlie); } @@ -491,16 +473,7 @@ contract PositionManagerMulticallTest is Test, Permit2SignatureHelpers, PosmTest lpm.ownerOf(tokenId); // token does not exist bytes[] memory results = lpm.multicall(calls); - assertEq( - results[0], - abi.encode( - abi.encodeWithSelector( - Permit2Forwarder.Wrap__Permit2Reverted.selector, - address(permit2), - abi.encodeWithSelector(InvalidNonce.selector) - ) - ) - ); + assertEq(results[0], abi.encode(abi.encodeWithSelector(InvalidNonce.selector))); assertEq(lpm.ownerOf(tokenId), charlie); } diff --git a/test/router/Payments.t.sol b/test/router/Payments.t.sol index 3b1b2c328..8f96a4085 100644 --- a/test/router/Payments.t.sol +++ b/test/router/Payments.t.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.19; import {GasSnapshot} from "forge-gas-snapshot/GasSnapshot.sol"; import {Currency, CurrencyLibrary} from "@uniswap/v4-core/src/types/Currency.sol"; +import {BipsLibrary} from "@uniswap/v4-core/src/libraries/BipsLibrary.sol"; import {IV4Router} from "../../src/interfaces/IV4Router.sol"; import {RoutingTestHelpers} from "../shared/RoutingTestHelpers.sol"; import {Plan, Planner} from "../shared/Planner.sol"; import {Actions} from "../../src/libraries/Actions.sol"; import {ActionConstants} from "../../src/libraries/ActionConstants.sol"; -import {BipsLibrary} from "../../src/libraries/BipsLibrary.sol"; contract PaymentsTests is RoutingTestHelpers, GasSnapshot { using CurrencyLibrary for Currency; diff --git a/test/router/V4Router.gas.t.sol b/test/router/V4Router.gas.t.sol index 1a63d9fa4..8d3eac922 100644 --- a/test/router/V4Router.gas.t.sol +++ b/test/router/V4Router.gas.t.sol @@ -132,12 +132,12 @@ contract V4RouterTest is RoutingTestHelpers, GasSnapshot { function test_gas_nativeIn_swapExactIn_1Hop() public { uint256 amountIn = 1 ether; - tokenPath.push(CurrencyLibrary.NATIVE); + tokenPath.push(CurrencyLibrary.ADDRESS_ZERO); tokenPath.push(currency0); IV4Router.ExactInputParams memory params = _getExactInputParams(tokenPath, amountIn); plan = plan.add(Actions.SWAP_EXACT_IN, abi.encode(params)); - bytes memory data = plan.finalizeSwap(CurrencyLibrary.NATIVE, currency0, ActionConstants.MSG_SENDER); + bytes memory data = plan.finalizeSwap(CurrencyLibrary.ADDRESS_ZERO, currency0, ActionConstants.MSG_SENDER); router.executeActions{value: amountIn}(data); snapLastCall("V4Router_ExactIn1Hop_nativeIn"); @@ -147,11 +147,11 @@ contract V4RouterTest is RoutingTestHelpers, GasSnapshot { uint256 amountIn = 1 ether; tokenPath.push(currency0); - tokenPath.push(CurrencyLibrary.NATIVE); + tokenPath.push(CurrencyLibrary.ADDRESS_ZERO); IV4Router.ExactInputParams memory params = _getExactInputParams(tokenPath, amountIn); plan = plan.add(Actions.SWAP_EXACT_IN, abi.encode(params)); - bytes memory data = plan.finalizeSwap(currency0, CurrencyLibrary.NATIVE, ActionConstants.MSG_SENDER); + bytes memory data = plan.finalizeSwap(currency0, CurrencyLibrary.ADDRESS_ZERO, ActionConstants.MSG_SENDER); router.executeActions(data); snapLastCall("V4Router_ExactIn1Hop_nativeOut"); @@ -160,13 +160,13 @@ contract V4RouterTest is RoutingTestHelpers, GasSnapshot { function test_gas_nativeIn_swapExactIn_2Hops() public { uint256 amountIn = 1 ether; - tokenPath.push(CurrencyLibrary.NATIVE); + tokenPath.push(CurrencyLibrary.ADDRESS_ZERO); tokenPath.push(currency0); tokenPath.push(currency1); IV4Router.ExactInputParams memory params = _getExactInputParams(tokenPath, amountIn); plan = plan.add(Actions.SWAP_EXACT_IN, abi.encode(params)); - bytes memory data = plan.finalizeSwap(CurrencyLibrary.NATIVE, currency1, ActionConstants.MSG_SENDER); + bytes memory data = plan.finalizeSwap(CurrencyLibrary.ADDRESS_ZERO, currency1, ActionConstants.MSG_SENDER); router.executeActions{value: amountIn}(data); snapLastCall("V4Router_ExactIn2Hops_nativeIn"); @@ -175,14 +175,14 @@ contract V4RouterTest is RoutingTestHelpers, GasSnapshot { function test_gas_nativeIn_swapExactIn_3Hops() public { uint256 amountIn = 1 ether; - tokenPath.push(CurrencyLibrary.NATIVE); + tokenPath.push(CurrencyLibrary.ADDRESS_ZERO); tokenPath.push(currency0); tokenPath.push(currency1); tokenPath.push(currency2); IV4Router.ExactInputParams memory params = _getExactInputParams(tokenPath, amountIn); plan = plan.add(Actions.SWAP_EXACT_IN, abi.encode(params)); - bytes memory data = plan.finalizeSwap(CurrencyLibrary.NATIVE, currency2, ActionConstants.MSG_SENDER); + bytes memory data = plan.finalizeSwap(CurrencyLibrary.ADDRESS_ZERO, currency2, ActionConstants.MSG_SENDER); router.executeActions{value: amountIn}(data); snapLastCall("V4Router_ExactIn3Hops_nativeIn"); @@ -297,12 +297,12 @@ contract V4RouterTest is RoutingTestHelpers, GasSnapshot { function test_gas_nativeIn_swapExactOut_1Hop_sweepExcessETH() public { uint256 amountOut = 1 ether; - tokenPath.push(CurrencyLibrary.NATIVE); + tokenPath.push(CurrencyLibrary.ADDRESS_ZERO); tokenPath.push(currency0); IV4Router.ExactOutputParams memory params = _getExactOutputParams(tokenPath, amountOut); plan = plan.add(Actions.SWAP_EXACT_OUT, abi.encode(params)); - bytes memory data = plan.finalizeSwap(CurrencyLibrary.NATIVE, currency0, ActionConstants.MSG_SENDER); + bytes memory data = plan.finalizeSwap(CurrencyLibrary.ADDRESS_ZERO, currency0, ActionConstants.MSG_SENDER); router.executeActionsAndSweepExcessETH{value: 2 ether}(data); snapLastCall("V4Router_ExactOut1Hop_nativeIn_sweepETH"); @@ -312,11 +312,11 @@ contract V4RouterTest is RoutingTestHelpers, GasSnapshot { uint256 amountOut = 1 ether; tokenPath.push(currency0); - tokenPath.push(CurrencyLibrary.NATIVE); + tokenPath.push(CurrencyLibrary.ADDRESS_ZERO); IV4Router.ExactOutputParams memory params = _getExactOutputParams(tokenPath, amountOut); plan = plan.add(Actions.SWAP_EXACT_OUT, abi.encode(params)); - bytes memory data = plan.finalizeSwap(currency0, CurrencyLibrary.NATIVE, ActionConstants.MSG_SENDER); + bytes memory data = plan.finalizeSwap(currency0, CurrencyLibrary.ADDRESS_ZERO, ActionConstants.MSG_SENDER); router.executeActions(data); snapLastCall("V4Router_ExactOut1Hop_nativeOut"); @@ -325,13 +325,13 @@ contract V4RouterTest is RoutingTestHelpers, GasSnapshot { function test_gas_nativeIn_swapExactOut_2Hops_sweepExcessETH() public { uint256 amountOut = 1 ether; - tokenPath.push(CurrencyLibrary.NATIVE); + tokenPath.push(CurrencyLibrary.ADDRESS_ZERO); tokenPath.push(currency0); tokenPath.push(currency1); IV4Router.ExactOutputParams memory params = _getExactOutputParams(tokenPath, amountOut); plan = plan.add(Actions.SWAP_EXACT_OUT, abi.encode(params)); - bytes memory data = plan.finalizeSwap(CurrencyLibrary.NATIVE, currency1, ActionConstants.MSG_SENDER); + bytes memory data = plan.finalizeSwap(CurrencyLibrary.ADDRESS_ZERO, currency1, ActionConstants.MSG_SENDER); router.executeActionsAndSweepExcessETH{value: 2 ether}(data); snapLastCall("V4Router_ExactOut2Hops_nativeIn"); @@ -340,14 +340,14 @@ contract V4RouterTest is RoutingTestHelpers, GasSnapshot { function test_gas_nativeIn_swapExactOut_3Hops_sweepExcessETH() public { uint256 amountOut = 1 ether; - tokenPath.push(CurrencyLibrary.NATIVE); + tokenPath.push(CurrencyLibrary.ADDRESS_ZERO); tokenPath.push(currency0); tokenPath.push(currency1); tokenPath.push(currency2); IV4Router.ExactOutputParams memory params = _getExactOutputParams(tokenPath, amountOut); plan = plan.add(Actions.SWAP_EXACT_OUT, abi.encode(params)); - bytes memory data = plan.finalizeSwap(CurrencyLibrary.NATIVE, currency2, ActionConstants.MSG_SENDER); + bytes memory data = plan.finalizeSwap(CurrencyLibrary.ADDRESS_ZERO, currency2, ActionConstants.MSG_SENDER); router.executeActionsAndSweepExcessETH{value: 2 ether}(data); snapLastCall("V4Router_ExactOut3Hops_nativeIn"); @@ -359,12 +359,12 @@ contract V4RouterTest is RoutingTestHelpers, GasSnapshot { tokenPath.push(currency2); tokenPath.push(currency1); tokenPath.push(currency0); - tokenPath.push(CurrencyLibrary.NATIVE); + tokenPath.push(CurrencyLibrary.ADDRESS_ZERO); IV4Router.ExactOutputParams memory params = _getExactOutputParams(tokenPath, amountOut); plan = plan.add(Actions.SWAP_EXACT_OUT, abi.encode(params)); - bytes memory data = plan.finalizeSwap(currency2, CurrencyLibrary.NATIVE, ActionConstants.MSG_SENDER); + bytes memory data = plan.finalizeSwap(currency2, CurrencyLibrary.ADDRESS_ZERO, ActionConstants.MSG_SENDER); router.executeActions(data); snapLastCall("V4Router_ExactOut3Hops_nativeOut"); diff --git a/test/router/V4Router.t.sol b/test/router/V4Router.t.sol index 6ef7a8724..e32da0529 100644 --- a/test/router/V4Router.t.sol +++ b/test/router/V4Router.t.sol @@ -352,13 +352,13 @@ contract V4RouterTest is RoutingTestHelpers { uint256 amountIn = 1 ether; uint256 expectedAmountOut = 992054607780215625; - tokenPath.push(CurrencyLibrary.NATIVE); + tokenPath.push(CurrencyLibrary.ADDRESS_ZERO); tokenPath.push(nativeKey.currency1); IV4Router.ExactInputParams memory params = _getExactInputParams(tokenPath, amountIn); plan = plan.add(Actions.SWAP_EXACT_IN, abi.encode(params)); (uint256 inputBalanceBefore, uint256 outputBalanceBefore, uint256 inputBalanceAfter, uint256 outputBalanceAfter) - = _finalizeAndExecuteSwap(CurrencyLibrary.NATIVE, nativeKey.currency1, amountIn); + = _finalizeAndExecuteSwap(CurrencyLibrary.ADDRESS_ZERO, nativeKey.currency1, amountIn); assertEq(nativeKey.currency0.balanceOf(address(router)), 0); assertEq(nativeKey.currency1.balanceOf(address(router)), 0); @@ -372,13 +372,13 @@ contract V4RouterTest is RoutingTestHelpers { uint256 expectedAmountOut = 992054607780215625; tokenPath.push(nativeKey.currency1); - tokenPath.push(CurrencyLibrary.NATIVE); + tokenPath.push(CurrencyLibrary.ADDRESS_ZERO); IV4Router.ExactInputParams memory params = _getExactInputParams(tokenPath, amountIn); plan = plan.add(Actions.SWAP_EXACT_IN, abi.encode(params)); (uint256 inputBalanceBefore, uint256 outputBalanceBefore, uint256 inputBalanceAfter, uint256 outputBalanceAfter) - = _finalizeAndExecuteSwap(nativeKey.currency1, CurrencyLibrary.NATIVE, amountIn); + = _finalizeAndExecuteSwap(nativeKey.currency1, CurrencyLibrary.ADDRESS_ZERO, amountIn); assertEq(nativeKey.currency0.balanceOf(address(router)), 0); assertEq(nativeKey.currency1.balanceOf(address(router)), 0); @@ -392,7 +392,7 @@ contract V4RouterTest is RoutingTestHelpers { uint256 expectedAmountOut = 984211133872795298; // the initialized nativeKey is (native, currency0) - tokenPath.push(CurrencyLibrary.NATIVE); + tokenPath.push(CurrencyLibrary.ADDRESS_ZERO); tokenPath.push(currency0); tokenPath.push(currency1); IV4Router.ExactInputParams memory params = _getExactInputParams(tokenPath, amountIn); @@ -402,7 +402,7 @@ contract V4RouterTest is RoutingTestHelpers { uint256 intermediateBalanceBefore = currency0.balanceOfSelf(); (uint256 inputBalanceBefore, uint256 outputBalanceBefore, uint256 inputBalanceAfter, uint256 outputBalanceAfter) - = _finalizeAndExecuteSwap(CurrencyLibrary.NATIVE, currency1, amountIn); + = _finalizeAndExecuteSwap(CurrencyLibrary.ADDRESS_ZERO, currency1, amountIn); // check intermediate token balances assertEq(intermediateBalanceBefore, currency0.balanceOfSelf()); @@ -422,7 +422,7 @@ contract V4RouterTest is RoutingTestHelpers { // the initialized nativeKey is (native, currency0) tokenPath.push(currency1); tokenPath.push(currency0); - tokenPath.push(CurrencyLibrary.NATIVE); + tokenPath.push(CurrencyLibrary.ADDRESS_ZERO); IV4Router.ExactInputParams memory params = _getExactInputParams(tokenPath, amountIn); plan = plan.add(Actions.SWAP_EXACT_IN, abi.encode(params)); @@ -430,7 +430,7 @@ contract V4RouterTest is RoutingTestHelpers { uint256 intermediateBalanceBefore = currency0.balanceOfSelf(); (uint256 inputBalanceBefore, uint256 outputBalanceBefore, uint256 inputBalanceAfter, uint256 outputBalanceAfter) - = _finalizeAndExecuteSwap(currency1, CurrencyLibrary.NATIVE, amountIn); + = _finalizeAndExecuteSwap(currency1, CurrencyLibrary.ADDRESS_ZERO, amountIn); // check intermediate token balances assertEq(intermediateBalanceBefore, currency0.balanceOfSelf()); @@ -748,14 +748,16 @@ contract V4RouterTest is RoutingTestHelpers { uint256 amountOut = 1 ether; uint256 expectedAmountIn = 1008049273448486163; - tokenPath.push(CurrencyLibrary.NATIVE); + tokenPath.push(CurrencyLibrary.ADDRESS_ZERO); tokenPath.push(nativeKey.currency1); IV4Router.ExactOutputParams memory params = _getExactOutputParams(tokenPath, amountOut); plan = plan.add(Actions.SWAP_EXACT_OUT, abi.encode(params)); (uint256 inputBalanceBefore, uint256 outputBalanceBefore, uint256 inputBalanceAfter, uint256 outputBalanceAfter) - = _finalizeAndExecuteNativeInputExactOutputSwap(CurrencyLibrary.NATIVE, nativeKey.currency1, expectedAmountIn); + = _finalizeAndExecuteNativeInputExactOutputSwap( + CurrencyLibrary.ADDRESS_ZERO, nativeKey.currency1, expectedAmountIn + ); assertEq(nativeKey.currency0.balanceOf(address(router)), 0); assertEq(nativeKey.currency1.balanceOf(address(router)), 0); @@ -769,13 +771,13 @@ contract V4RouterTest is RoutingTestHelpers { uint256 expectedAmountIn = 1008049273448486163; tokenPath.push(nativeKey.currency1); - tokenPath.push(CurrencyLibrary.NATIVE); + tokenPath.push(CurrencyLibrary.ADDRESS_ZERO); IV4Router.ExactOutputParams memory params = _getExactOutputParams(tokenPath, amountOut); plan = plan.add(Actions.SWAP_EXACT_OUT, abi.encode(params)); (uint256 inputBalanceBefore, uint256 outputBalanceBefore, uint256 inputBalanceAfter, uint256 outputBalanceAfter) - = _finalizeAndExecuteSwap(nativeKey.currency1, CurrencyLibrary.NATIVE, expectedAmountIn); + = _finalizeAndExecuteSwap(nativeKey.currency1, CurrencyLibrary.ADDRESS_ZERO, expectedAmountIn); assertEq(nativeKey.currency0.balanceOf(address(router)), 0); assertEq(nativeKey.currency1.balanceOf(address(router)), 0); @@ -789,7 +791,7 @@ contract V4RouterTest is RoutingTestHelpers { uint256 expectedAmountIn = 1016204441757464409; // the initialized nativeKey is (native, currency0) - tokenPath.push(CurrencyLibrary.NATIVE); + tokenPath.push(CurrencyLibrary.ADDRESS_ZERO); tokenPath.push(currency0); tokenPath.push(currency1); IV4Router.ExactOutputParams memory params = _getExactOutputParams(tokenPath, amountOut); @@ -799,12 +801,12 @@ contract V4RouterTest is RoutingTestHelpers { plan = plan.add(Actions.SWAP_EXACT_OUT, abi.encode(params)); (uint256 inputBalanceBefore, uint256 outputBalanceBefore, uint256 inputBalanceAfter, uint256 outputBalanceAfter) - = _finalizeAndExecuteNativeInputExactOutputSwap(CurrencyLibrary.NATIVE, currency1, expectedAmountIn); + = _finalizeAndExecuteNativeInputExactOutputSwap(CurrencyLibrary.ADDRESS_ZERO, currency1, expectedAmountIn); assertEq(intermediateBalanceBefore, currency0.balanceOfSelf()); assertEq(currency1.balanceOf(address(router)), 0); assertEq(currency0.balanceOf(address(router)), 0); - assertEq(CurrencyLibrary.NATIVE.balanceOf(address(router)), 0); + assertEq(CurrencyLibrary.ADDRESS_ZERO.balanceOf(address(router)), 0); assertEq(inputBalanceBefore - inputBalanceAfter, expectedAmountIn); assertEq(outputBalanceAfter - outputBalanceBefore, amountOut); diff --git a/test/script/DeployPoolManager.t.sol b/test/script/DeployPoolManager.t.sol index 39e9e6ab5..fbb7df439 100644 --- a/test/script/DeployPoolManager.t.sol +++ b/test/script/DeployPoolManager.t.sol @@ -13,7 +13,7 @@ contract DeployPoolManagerTest is Test { } function test_run_poolManager() public { - IPoolManager manager = deployer.run(100); + IPoolManager manager = deployer.run(); // Foundry sets a default sender in scripts. address defaultSender = 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38; // Deployer is the owner. diff --git a/test/script/DeployPoolMofifyLiquidityTest.t.sol b/test/script/DeployPoolMofifyLiquidityTest.t.sol index 8f8c193e1..e4c677108 100644 --- a/test/script/DeployPoolMofifyLiquidityTest.t.sol +++ b/test/script/DeployPoolMofifyLiquidityTest.t.sol @@ -14,7 +14,7 @@ contract DeployPoolModifyLiquidityTestTest is Test { IPoolManager manager; function setUp() public { - manager = new PoolManager(200_000); + manager = new PoolManager(); deployer = new DeployPoolModifyLiquidityTest(); } diff --git a/test/script/DeployPoolSwapTest.t.sol b/test/script/DeployPoolSwapTest.t.sol index 4d6a3a5cf..2feb0aaad 100644 --- a/test/script/DeployPoolSwapTest.t.sol +++ b/test/script/DeployPoolSwapTest.t.sol @@ -14,7 +14,7 @@ contract DeployPoolSwapTestTest is Test { IPoolManager manager; function setUp() public { - manager = new PoolManager(200_000); + manager = new PoolManager(); deployer = new DeployPoolSwapTest(); } diff --git a/test/shared/HookSavesDelta.sol b/test/shared/HookSavesDelta.sol index 8ff86ac1f..fa11a90b9 100644 --- a/test/shared/HookSavesDelta.sol +++ b/test/shared/HookSavesDelta.sol @@ -16,6 +16,7 @@ contract HookSavesDelta is BaseTestHooks { PoolKey calldata, /* key **/ IPoolManager.ModifyLiquidityParams calldata, /* params **/ BalanceDelta delta, + BalanceDelta, /* feesAccrued **/ bytes calldata /* hookData **/ ) external override returns (bytes4, BalanceDelta) { _storeDelta(delta); @@ -27,6 +28,7 @@ contract HookSavesDelta is BaseTestHooks { PoolKey calldata, /* key **/ IPoolManager.ModifyLiquidityParams calldata, /* params **/ BalanceDelta delta, + BalanceDelta, /* feesAccrued */ bytes calldata /* hookData **/ ) external override returns (bytes4, BalanceDelta) { _storeDelta(delta); diff --git a/test/shared/RoutingTestHelpers.sol b/test/shared/RoutingTestHelpers.sol index e06cc3cc5..3bde34caa 100644 --- a/test/shared/RoutingTestHelpers.sol +++ b/test/shared/RoutingTestHelpers.sol @@ -86,7 +86,7 @@ contract RoutingTestHelpers is Test, Deployers { internal returns (PoolKey memory _key) { - _key = PoolKey(CurrencyLibrary.NATIVE, currency, 3000, 60, IHooks(hookAddr)); + _key = PoolKey(CurrencyLibrary.ADDRESS_ZERO, currency, 3000, 60, IHooks(hookAddr)); manager.initialize(_key, SQRT_PRICE_1_1, ZERO_BYTES); MockERC20(Currency.unwrap(currency)).approve(address(positionManager), type(uint256).max); @@ -146,7 +146,7 @@ contract RoutingTestHelpers is Test, Deployers { bytes memory data = plan.finalizeSwap(inputCurrency, outputCurrency, takeRecipient); - uint256 value = (inputCurrency.isNative()) ? amountIn : 0; + uint256 value = (inputCurrency.isAddressZero()) ? amountIn : 0; // otherwise just execute as normal router.executeActions{value: value}(data);