Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
snreynolds committed Dec 3, 2024
2 parents ae07b9e + 24ae83f commit 4ae5e93
Show file tree
Hide file tree
Showing 97 changed files with 1,131 additions and 715 deletions.
1 change: 0 additions & 1 deletion .forge-snapshots/V4Router_Bytecode.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/positionDescriptor bytecode size.snap

This file was deleted.

1 change: 1 addition & 0 deletions .forge-snapshots/positionManager bytecode size.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
19060
340 changes: 4 additions & 336 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[profile.default]
out = 'foundry-out'
solc_version = '0.8.26'
optimizer_runs = 44444444
optimizer_runs = 1
via_ir = true
ffi = true
fs_permissions = [{ access = "read-write", path = ".forge-snapshots/"}]
Expand Down
2 changes: 1 addition & 1 deletion lib/v4-core
2 changes: 1 addition & 1 deletion script/01_PoolManager.s.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: UNLICENSED
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "forge-std/Script.sol";
Expand Down
2 changes: 1 addition & 1 deletion script/02_PoolModifyLiquidityTest.s.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: UNLICENSED
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;

import {Script} from "forge-std/Script.sol";
Expand Down
2 changes: 1 addition & 1 deletion script/03_PoolSwapTest.s.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: UNLICENSED
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;

import {Script} from "forge-std/Script.sol";
Expand Down
2 changes: 1 addition & 1 deletion script/DeployPosm.s.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: UNLICENSED
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "forge-std/console2.sol";
Expand Down
2 changes: 1 addition & 1 deletion script/DeployStateView.s.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: UNLICENSED
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "forge-std/console2.sol";
Expand Down
2 changes: 1 addition & 1 deletion script/DeployV4Quoter.s.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: UNLICENSED
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "forge-std/console2.sol";
Expand Down
2 changes: 1 addition & 1 deletion snapshots/BaseActionsRouterTest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"BaseActionsRouter_mock10commands": "60674"
"BaseActionsRouter_mock10commands": "61332"
}
8 changes: 4 additions & 4 deletions snapshots/PaymentsTests.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Payments_swap_settleFromCaller_takeAllToMsgSender": "129438",
"Payments_swap_settleFromCaller_takeAllToSpecifiedAddress": "131502",
"Payments_swap_settleWithBalance_takeAllToMsgSender": "123707",
"Payments_swap_settleWithBalance_takeAllToSpecifiedAddress": "123849"
"Payments_swap_settleFromCaller_takeAllToMsgSender": "132997",
"Payments_swap_settleFromCaller_takeAllToSpecifiedAddress": "134973",
"Payments_swap_settleWithBalance_takeAllToMsgSender": "127102",
"Payments_swap_settleWithBalance_takeAllToSpecifiedAddress": "127212"
}
78 changes: 39 additions & 39 deletions snapshots/PosMGasTest.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
{
"PositionManager_burn_empty": "50479",
"PositionManager_burn_empty_native": "50479",
"PositionManager_burn_nonEmpty_native_withClose": "125652",
"PositionManager_burn_nonEmpty_native_withTakePair": "125134",
"PositionManager_burn_nonEmpty_withClose": "132512",
"PositionManager_burn_nonEmpty_withTakePair": "131994",
"PositionManager_collect_native": "146379",
"PositionManager_collect_sameRange": "154954",
"PositionManager_collect_withClose": "154954",
"PositionManager_collect_withTakePair": "154319",
"PositionManager_decreaseLiquidity_native": "112048",
"PositionManager_decreaseLiquidity_withClose": "119835",
"PositionManager_decreaseLiquidity_withTakePair": "119200",
"PositionManager_decrease_burnEmpty": "135308",
"PositionManager_decrease_burnEmpty_native": "128448",
"PositionManager_decrease_sameRange_allLiquidity": "132522",
"PositionManager_decrease_take_take": "120455",
"PositionManager_increaseLiquidity_erc20_withClose": "158871",
"PositionManager_increaseLiquidity_erc20_withSettlePair": "157823",
"PositionManager_increaseLiquidity_native": "140808",
"PositionManager_increase_autocompoundExactUnclaimedFees": "136396",
"PositionManager_increase_autocompoundExcessFeesCredit": "177446",
"PositionManager_increase_autocompound_clearExcess": "148160",
"PositionManager_mint_native": "364681",
"PositionManager_mint_nativeWithSweep_withClose": "373199",
"PositionManager_mint_nativeWithSweep_withSettlePair": "372435",
"PositionManager_mint_onSameTickLower": "317431",
"PositionManager_mint_onSameTickUpper": "318101",
"PositionManager_mint_sameRange": "243670",
"PositionManager_mint_settleWithBalance_sweep": "418878",
"PositionManager_mint_warmedPool_differentRange": "323462",
"PositionManager_mint_withClose": "419984",
"PositionManager_mint_withSettlePair": "419054",
"PositionManager_multicall_initialize_mint": "455828",
"PositionManager_permit": "79076",
"PositionManager_permit_secondPosition": "61976",
"PositionManager_permit_twice": "44852",
"PositionManager_subscribe": "88168",
"PositionManager_unsubscribe": "63080"
"PositionManager_burn_empty": "51576",
"PositionManager_burn_empty_native": "51576",
"PositionManager_burn_nonEmpty_native_withClose": "128316",
"PositionManager_burn_nonEmpty_native_withTakePair": "127696",
"PositionManager_burn_nonEmpty_withClose": "135236",
"PositionManager_burn_nonEmpty_withTakePair": "134615",
"PositionManager_collect_native": "148571",
"PositionManager_collect_sameRange": "157220",
"PositionManager_collect_withClose": "157220",
"PositionManager_collect_withTakePair": "156456",
"PositionManager_decreaseLiquidity_native": "114165",
"PositionManager_decreaseLiquidity_withClose": "122555",
"PositionManager_decreaseLiquidity_withTakePair": "121791",
"PositionManager_decrease_burnEmpty": "138177",
"PositionManager_decrease_burnEmpty_native": "131258",
"PositionManager_decrease_sameRange_allLiquidity": "135218",
"PositionManager_decrease_take_take": "123169",
"PositionManager_increaseLiquidity_erc20_withClose": "162419",
"PositionManager_increaseLiquidity_erc20_withSettlePair": "161283",
"PositionManager_increaseLiquidity_native": "145296",
"PositionManager_increase_autocompoundExactUnclaimedFees": "138010",
"PositionManager_increase_autocompoundExcessFeesCredit": "180194",
"PositionManager_increase_autocompound_clearExcess": "150782",
"PositionManager_mint_native": "369623",
"PositionManager_mint_nativeWithSweep_withClose": "378280",
"PositionManager_mint_nativeWithSweep_withSettlePair": "377364",
"PositionManager_mint_onSameTickLower": "321205",
"PositionManager_mint_onSameTickUpper": "321875",
"PositionManager_mint_sameRange": "247444",
"PositionManager_mint_settleWithBalance_sweep": "423280",
"PositionManager_mint_warmedPool_differentRange": "327236",
"PositionManager_mint_withClose": "423986",
"PositionManager_mint_withSettlePair": "422936",
"PositionManager_multicall_initialize_mint": "460558",
"PositionManager_permit": "79259",
"PositionManager_permit_secondPosition": "62159",
"PositionManager_permit_twice": "45035",
"PositionManager_subscribe": "88475",
"PositionManager_unsubscribe": "63253"
}
2 changes: 1 addition & 1 deletion snapshots/PositionDescriptorTest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"positionDescriptor bytecode size": "31728"
"positionDescriptor bytecode size": "24179"
}
26 changes: 13 additions & 13 deletions snapshots/QuoterTest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"Quoter_exactInputSingle_oneForZero_multiplePositions": "144020",
"Quoter_exactInputSingle_zeroForOne_multiplePositions": "149287",
"Quoter_exactOutputSingle_oneForZero": "78196",
"Quoter_exactOutputSingle_zeroForOne": "82546",
"Quoter_quoteExactInput_oneHop_1TickLoaded": "120406",
"Quoter_quoteExactInput_oneHop_initializedAfter": "145504",
"Quoter_quoteExactInput_oneHop_startingInitialized": "79438",
"Quoter_quoteExactInput_twoHops": "201071",
"Quoter_quoteExactOutput_oneHop_1TickLoaded": "119672",
"Quoter_quoteExactOutput_oneHop_2TicksLoaded": "149779",
"Quoter_quoteExactOutput_oneHop_initializedAfter": "119740",
"Quoter_quoteExactOutput_oneHop_startingInitialized": "96472",
"Quoter_quoteExactOutput_twoHops": "200486"
"Quoter_exactInputSingle_oneForZero_multiplePositions": "146317",
"Quoter_exactInputSingle_zeroForOne_multiplePositions": "151973",
"Quoter_exactOutputSingle_oneForZero": "80048",
"Quoter_exactOutputSingle_zeroForOne": "84626",
"Quoter_quoteExactInput_oneHop_1TickLoaded": "122994",
"Quoter_quoteExactInput_oneHop_initializedAfter": "147949",
"Quoter_quoteExactInput_oneHop_startingInitialized": "81420",
"Quoter_quoteExactInput_twoHops": "205421",
"Quoter_quoteExactOutput_oneHop_1TickLoaded": "122296",
"Quoter_quoteExactOutput_oneHop_2TicksLoaded": "152648",
"Quoter_quoteExactOutput_oneHop_initializedAfter": "122364",
"Quoter_quoteExactOutput_oneHop_startingInitialized": "98875",
"Quoter_quoteExactOutput_twoHops": "204897"
}
20 changes: 10 additions & 10 deletions snapshots/StateViewTest.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"StateView_extsload_getFeeGrowthGlobals": "2256",
"StateView_extsload_getFeeGrowthInside": "7994",
"StateView_extsload_getLiquidity": "1399",
"StateView_extsload_getPositionInfo": "2826",
"StateView_extsload_getPositionLiquidity": "1651",
"StateView_extsload_getSlot0": "1446",
"StateView_extsload_getTickBitmap": "1392",
"StateView_extsload_getTickFeeGrowthOutside": "2543",
"StateView_extsload_getTickInfo": "2758",
"StateView_extsload_getTickLiquidity": "1646"
"StateView_extsload_getFeeGrowthGlobals": "2367",
"StateView_extsload_getFeeGrowthInside": "8444",
"StateView_extsload_getLiquidity": "1480",
"StateView_extsload_getPositionInfo": "2973",
"StateView_extsload_getPositionLiquidity": "1750",
"StateView_extsload_getSlot0": "1548",
"StateView_extsload_getTickBitmap": "1476",
"StateView_extsload_getTickFeeGrowthOutside": "2672",
"StateView_extsload_getTickInfo": "2896",
"StateView_extsload_getTickLiquidity": "1748"
}
48 changes: 24 additions & 24 deletions snapshots/V4RouterTest.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"V4Router_Bytecode": "7158",
"V4Router_ExactIn1Hop_nativeIn": "115672",
"V4Router_ExactIn1Hop_nativeOut": "115929",
"V4Router_ExactIn1Hop_oneForZero": "124744",
"V4Router_ExactIn1Hop_zeroForOne": "130408",
"V4Router_ExactIn2Hops": "185177",
"V4Router_ExactIn2Hops_nativeIn": "170441",
"V4Router_ExactIn3Hops": "239949",
"V4Router_ExactIn3Hops_nativeIn": "225213",
"V4Router_ExactInputSingle": "129438",
"V4Router_ExactInputSingle_nativeIn": "114702",
"V4Router_ExactInputSingle_nativeOut": "114927",
"V4Router_ExactOut1Hop_nativeIn_sweepETH": "121930",
"V4Router_ExactOut1Hop_nativeOut": "117002",
"V4Router_ExactOut1Hop_oneForZero": "125817",
"V4Router_ExactOut1Hop_zeroForOne": "129689",
"V4Router_ExactOut2Hops": "183515",
"V4Router_ExactOut2Hops_nativeIn": "175756",
"V4Router_ExactOut3Hops": "237372",
"V4Router_ExactOut3Hops_nativeIn": "229613",
"V4Router_ExactOut3Hops_nativeOut": "216949",
"V4Router_ExactOutputSingle": "128716",
"V4Router_ExactOutputSingle_nativeIn_sweepETH": "120957",
"V4Router_ExactOutputSingle_nativeOut": "116103"
"V4Router_Bytecode": "5137",
"V4Router_ExactIn1Hop_nativeIn": "121819",
"V4Router_ExactIn1Hop_nativeOut": "120826",
"V4Router_ExactIn1Hop_oneForZero": "129715",
"V4Router_ExactIn1Hop_zeroForOne": "135623",
"V4Router_ExactIn2Hops": "191979",
"V4Router_ExactIn2Hops_nativeIn": "178175",
"V4Router_ExactIn3Hops": "248385",
"V4Router_ExactIn3Hops_nativeIn": "234581",
"V4Router_ExactInputSingle": "134546",
"V4Router_ExactInputSingle_nativeIn": "120742",
"V4Router_ExactInputSingle_nativeOut": "119714",
"V4Router_ExactOut1Hop_nativeIn_sweepETH": "128078",
"V4Router_ExactOut1Hop_nativeOut": "121895",
"V4Router_ExactOut1Hop_oneForZero": "130784",
"V4Router_ExactOut1Hop_zeroForOne": "134905",
"V4Router_ExactOut2Hops": "190319",
"V4Router_ExactOut2Hops_nativeIn": "183492",
"V4Router_ExactOut3Hops": "245811",
"V4Router_ExactOut3Hops_nativeIn": "238984",
"V4Router_ExactOut3Hops_nativeOut": "224567",
"V4Router_ExactOutputSingle": "133809",
"V4Router_ExactOutputSingle_nativeIn_sweepETH": "126982",
"V4Router_ExactOutputSingle_nativeOut": "120876"
}
4 changes: 1 addition & 3 deletions src/PositionDescriptor.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: UNLICENSED
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;

import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol";
Expand Down Expand Up @@ -118,8 +118,6 @@ contract PositionDescriptor is IPositionDescriptor {
return CurrencyRatioSortOrder.DENOMINATOR_MORE;
} else if (currency == WBTC) {
return CurrencyRatioSortOrder.DENOMINATOR_MOST;
} else {
return 0;
}
}
return 0;
Expand Down
Loading

0 comments on commit 4ae5e93

Please sign in to comment.