diff --git a/.gas-snapshot b/.gas-snapshot new file mode 100644 index 000000000..5a2b5ba26 --- /dev/null +++ b/.gas-snapshot @@ -0,0 +1,311 @@ +FeesTest:testCollectFees() (gas: 643741) +FeesTest:testHookWithdrawFeeProtocolWithdrawFee(uint16,uint16) (runs: 256, μ: 538939, ~: 544488) +FeesTest:testInitializeAllFees(uint16,uint16,uint16,uint16) (runs: 256, μ: 165926, ~: 160978) +FeesTest:testInitializeBothHookFee(uint16,uint16) (runs: 256, μ: 86539, ~: 93146) +FeesTest:testInitializeFailsNoHook() (gas: 20283) +FeesTest:testInitializeHookProtocolSwapFee(uint16,uint16) (runs: 256, μ: 127352, ~: 133380) +FeesTest:testInitializeHookSwapFee(uint16) (runs: 256, μ: 67043, ~: 70590) +FeesTest:testInitializeHookWithdrawFee(uint16) (runs: 256, μ: 67083, ~: 70630) +FeesTest:testInitializeWithSwapProtocolFeeAndHookFeeDifferentDirections() (gas: 605267) +FeesTest:testNoHookProtocolFee(uint16,uint16) (runs: 256, μ: 835809, ~: 828082) +FeesTest:testProtocolFeeOnWithdrawalRemainsZeroIfNoHookWithdrawalFeeSet(uint16,uint16) (runs: 256, μ: 519009, ~: 520998) +FeesTest:testProtocolSwapFeeAndHookSwapFeeSameDirection() (gas: 625658) +FeesTest:testSwapWithProtocolFeeAllAndHookFeeAllButOnlySwapFlag() (gas: 707042) +FullMathTest:testResultOverflowsHelper() (gas: 3964) +FullMathTest:test_mulDivRounding(uint256,uint256,uint256) (runs: 256, μ: 4698, ~: 4445) +FullMathTest:test_mulDivRoundingUp_fuzz(uint256,uint256,uint256) (runs: 256, μ: 4669, ~: 4687) +FullMathTest:test_mulDivRoundingUp_revertsIfMulDivOverflows256BitsAfterRoundingUp() (gas: 3643) +FullMathTest:test_mulDivRoundingUp_revertsIfMulDivOverflows256BitsAfterRoundingUpCase2() (gas: 3718) +FullMathTest:test_mulDivRoundingUp_revertsWith0Denominator(uint256,uint256) (runs: 256, μ: 3289, ~: 3289) +FullMathTest:test_mulDivRoundingUp_validWithAllMaxInputs() (gas: 890) +FullMathTest:test_mulDivRoundingUp_validWithNoPhantomOverflow() (gas: 1090) +FullMathTest:test_mulDivRoundingUp_validWithPhantomOverflow() (gas: 1101) +FullMathTest:test_mulDivRoundingUp_validWithPhantomOverflowRepeatingDecimal() (gas: 1339) +FullMathTest:test_mulDiv_fuzz(uint256,uint256,uint256) (runs: 256, μ: 4347, ~: 4347) +FullMathTest:test_mulDiv_phantomOverflowRepeatingDecimal() (gas: 1167) +FullMathTest:test_mulDiv_recomputed(uint256,uint256,uint256) (runs: 256, μ: 4943, ~: 4681) +FullMathTest:test_mulDiv_revertsIfOutputOverflows() (gas: 3236) +FullMathTest:test_mulDiv_revertsOverflowWithAllMaxInputs() (gas: 3292) +FullMathTest:test_mulDiv_revertsWith0Denominator(uint256,uint256) (runs: 256, μ: 3264, ~: 3264) +FullMathTest:test_mulDiv_revertsWithOverflowingNumeratorAndZeroDenominator() (gas: 3191) +FullMathTest:test_mulDiv_validAllMaxInputs() (gas: 736) +FullMathTest:test_mulDiv_validWithPhantomOverflow() (gas: 1167) +FullMathTest:test_mulDiv_validWithoutPhantomOverflow() (gas: 853) +HooksTest:testAfterDonateInvalidReturn() (gas: 468135) +HooksTest:testAfterInitializeInvalidReturn() (gas: 1555551) +HooksTest:testAfterModifyPositionInvalidReturn() (gas: 317574) +HooksTest:testAfterSwapInvalidReturn() (gas: 174544) +HooksTest:testBeforeDonateInvalidReturn() (gas: 468177) +HooksTest:testBeforeInitializeInvalidReturn() (gas: 1513600) +HooksTest:testBeforeModifyPositionInvalidReturn() (gas: 144997) +HooksTest:testBeforeSwapInvalidReturn() (gas: 146099) +HooksTest:testDonateSucceedsWithHook() (gas: 772796) +HooksTest:testGas() (gas: 38358) +HooksTest:testInitializeSucceedsWithHook() (gas: 7586151) +HooksTest:testInvalidIfNoFlags() (gas: 1108) +HooksTest:testIsValidHookAddressAnyFlags() (gas: 2099) +HooksTest:testIsValidHookAddressZeroAddress() (gas: 443) +HooksTest:testIsValidIfDynamicFee() (gas: 935) +HooksTest:testModifyPositionSucceedsWithHook() (gas: 432467) +HooksTest:testSwapSucceedsWithHook() (gas: 328797) +HooksTest:testValidateHookAddressAfterDonate(uint152) (runs: 256, μ: 1854, ~: 1854) +HooksTest:testValidateHookAddressAfterInitialize(uint152) (runs: 256, μ: 1855, ~: 1855) +HooksTest:testValidateHookAddressAfterModify(uint152) (runs: 256, μ: 1835, ~: 1835) +HooksTest:testValidateHookAddressAfterSwap(uint152) (runs: 256, μ: 1855, ~: 1855) +HooksTest:testValidateHookAddressAllHooks(uint152) (runs: 256, μ: 1667, ~: 1667) +HooksTest:testValidateHookAddressBeforeAndAfterDonate(uint152) (runs: 256, μ: 1804, ~: 1804) +HooksTest:testValidateHookAddressBeforeAndAfterInitialize(uint152) (runs: 256, μ: 1828, ~: 1828) +HooksTest:testValidateHookAddressBeforeAndAfterModify(uint152) (runs: 256, μ: 1838, ~: 1838) +HooksTest:testValidateHookAddressBeforeAndAfterSwap(uint152) (runs: 256, μ: 1785, ~: 1785) +HooksTest:testValidateHookAddressBeforeDonate(uint152) (runs: 256, μ: 1856, ~: 1856) +HooksTest:testValidateHookAddressBeforeInitialize(uint152) (runs: 256, μ: 1837, ~: 1837) +HooksTest:testValidateHookAddressBeforeInitializeAfterModify(uint152) (runs: 256, μ: 1784, ~: 1784) +HooksTest:testValidateHookAddressBeforeModify(uint152) (runs: 256, μ: 1863, ~: 1863) +HooksTest:testValidateHookAddressBeforeSwap(uint152) (runs: 256, μ: 1856, ~: 1856) +HooksTest:testValidateHookAddressFailsAllHooks(uint152,uint8) (runs: 256, μ: 4784, ~: 4729) +HooksTest:testValidateHookAddressFailsNoHooks(uint152,uint8) (runs: 256, μ: 4784, ~: 4729) +HooksTest:testValidateHookAddressNoHooks(uint152) (runs: 256, μ: 1845, ~: 1845) +OwnedTest:testConstructor(address) (runs: 256, μ: 159611, ~: 159767) +OwnedTest:testSetOwnerFromNonOwner(address,address) (runs: 256, μ: 160847, ~: 160925) +OwnedTest:testSetOwnerFromOwner(address,address) (runs: 256, μ: 162996, ~: 162996) +PoolManagerReentrancyTest:testParallelLocker() (gas: 1967115) +PoolManagerReentrancyTest:testSimpleLinearLocker() (gas: 449066) +PoolManagerReentrancyTest:testTokenLocker() (gas: 609336) +PoolManagerReentrancyTest:testTokenRevert() (gas: 682365) +PoolManagerTest:testDonateFailsIfNoLiquidity(uint160) (runs: 256, μ: 108066, ~: 108226) +PoolManagerTest:testDonateFailsIfNotInitialized() (gas: 71665) +PoolManagerTest:testDonateFailsWithIncorrectSelectors() (gas: 1474317) +PoolManagerTest:testDonateSucceedsForNativeTokensWhenPoolHasLiquidity() (gas: 461781) +PoolManagerTest:testDonateSucceedsWhenPoolHasLiquidity() (gas: 518680) +PoolManagerTest:testDonateSucceedsWithCorrectSelectors() (gas: 1407044) +PoolManagerTest:testGasDonateOneToken() (gas: 473937) +PoolManagerTest:testGasMint() (gas: 327541) +PoolManagerTest:testGasMintWithHooks() (gas: 1224930) +PoolManagerTest:testGasMintWithNative() (gas: 308821) +PoolManagerTest:testGasPoolManagerInitialize() (gas: 73653) +PoolManagerTest:testGasSwap() (gas: 183438) +PoolManagerTest:testGasSwapAgainstLiq() (gas: 599778) +PoolManagerTest:testGasSwapAgainstLiqWithNative() (gas: 641159) +PoolManagerTest:testGasSwapWithHooks() (gas: 1058697) +PoolManagerTest:testGasSwapWithNative() (gas: 183436) +PoolManagerTest:testGetPosition() (gas: 389425) +PoolManagerTest:testLockEmitsCorrectId() (gas: 45782) +PoolManagerTest:testMintFailsIfNotInitialized() (gas: 73019) +PoolManagerTest:testMintFailsWithIncorrectSelectors() (gas: 1256164) +PoolManagerTest:testMintSucceedsForNativeTokensIfInitialized(uint160) (runs: 256, μ: 273526, ~: 290895) +PoolManagerTest:testMintSucceedsIfInitialized(uint160) (runs: 256, μ: 277378, ~: 279251) +PoolManagerTest:testMintSucceedsWithCorrectSelectors() (gas: 1226910) +PoolManagerTest:testMintSucceedsWithHooksIfInitialized(uint160) (runs: 256, μ: 8937393460517105276, ~: 8937393460517104991) +PoolManagerTest:testNoOpLockIsOk() (gas: 85249) +PoolManagerTest:testPoolManagerFeeControllerSet() (gas: 39508) +PoolManagerTest:testPoolManagerFetchFeeWhenController(uint160) (runs: 256, μ: 112338, ~: 112506) +PoolManagerTest:testPoolManagerInitialize((address,address,uint24,int24,address),uint160) (runs: 256, μ: 16333, ~: 13975) +PoolManagerTest:testPoolManagerInitializeFailsIfTickSpaceNeg(uint160) (runs: 256, μ: 15849, ~: 15849) +PoolManagerTest:testPoolManagerInitializeFailsIfTickSpaceTooLarge(uint160) (runs: 256, μ: 16775, ~: 16775) +PoolManagerTest:testPoolManagerInitializeFailsIfTickSpaceZero(uint160) (runs: 256, μ: 15850, ~: 15850) +PoolManagerTest:testPoolManagerInitializeFailsWithIncorrectSelectors() (gas: 976890) +PoolManagerTest:testPoolManagerInitializeForNativeTokens(uint160) (runs: 256, μ: 58844, ~: 59185) +PoolManagerTest:testPoolManagerInitializeRevertsWhenPoolAlreadyInitialized(uint160) (runs: 256, μ: 50145, ~: 50303) +PoolManagerTest:testPoolManagerInitializeRevertsWithSameTokenCombo(uint160) (runs: 256, μ: 49114, ~: 49272) +PoolManagerTest:testPoolManagerInitializeSucceedsWithCorrectSelectors() (gas: 973240) +PoolManagerTest:testPoolManagerInitializeSucceedsWithEmptyHooks(uint160) (runs: 256, μ: 938759, ~: 938934) +PoolManagerTest:testPoolManagerInitializeSucceedsWithHooks(uint160) (runs: 256, μ: 8937393460516837492, ~: 8937393460516837648) +PoolManagerTest:testPoolManagerInitializeSucceedsWithMaxTickSpacing(uint160) (runs: 256, μ: 50592, ~: 50770) +PoolManagerTest:testSwapFailsIfNotInitialized(uint160) (runs: 256, μ: 75205, ~: 75205) +PoolManagerTest:testSwapFailsWithIncorrectSelectors() (gas: 1333795) +PoolManagerTest:testSwapMintERC1155IfOutputNotTaken() (gas: 505581) +PoolManagerTest:testSwapSucceedsIfInitialized() (gas: 120468) +PoolManagerTest:testSwapSucceedsWithCorrectSelectors() (gas: 1264660) +PoolManagerTest:testSwapSucceedsWithHooksIfInitialized() (gas: 8937393460516948548) +PoolManagerTest:testSwapSucceedsWithNativeTokensIfInitialized() (gas: 118354) +PoolManagerTest:testSwapUse1155AsInput() (gas: 644468) +PoolTest:testModifyPosition(uint160,(address,int24,int24,int128,int24)) (runs: 256, μ: 20943, ~: 7530) +PoolTest:testPoolInitialize(uint160,uint16,uint16) (runs: 256, μ: 15408, ~: 6337) +PoolTest:testSwap(uint160,(uint24,int24,bool,int256,uint160)) (runs: 256, μ: 734278, ~: 7840) +SafeCastTest:testToInt128(int256) (runs: 256, μ: 1396, ~: 511) +SafeCastTest:testToInt128(uint256) (runs: 256, μ: 1410, ~: 390) +SafeCastTest:testToInt256(uint256) (runs: 256, μ: 972, ~: 450) +SafeCastTest:testToUint160(uint256) (runs: 256, μ: 1263, ~: 454) +SqrtPriceMathTestTest:test_getAmount0Delta_gasCostForAmount0WhereRoundUpIsFalse() (gas: 78524) +SqrtPriceMathTestTest:test_getAmount0Delta_gasCostForAmount0WhereRoundUpIsTrue() (gas: 78699) +SqrtPriceMathTestTest:test_getAmount0Delta_returns0IfLiquidityIs0() (gas: 916) +SqrtPriceMathTestTest:test_getAmount0Delta_returns0IfPricesAreEqual() (gas: 891) +SqrtPriceMathTestTest:test_getAmount0Delta_returns0_1Amount1ForPriceOf1To1_21() (gas: 1513) +SqrtPriceMathTestTest:test_getAmount0Delta_worksForPricesThatOverflow() (gas: 2048) +SqrtPriceMathTestTest:test_getAmount1Delta_gasCostForAmount1WhereRoundUpIsFalse() (gas: 78560) +SqrtPriceMathTestTest:test_getAmount1Delta_gasCostForAmount1WhereRoundUpIsTrue() (gas: 78668) +SqrtPriceMathTestTest:test_getAmount1Delta_returns0IfLiquidityIs0() (gas: 888) +SqrtPriceMathTestTest:test_getAmount1Delta_returns0IfPricesAreEqual() (gas: 862) +SqrtPriceMathTestTest:test_getAmount1Delta_returns0_1Amount1ForPriceOf1To1_21() (gas: 1563) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromInput_amountInGreaterThanType_uint96_maxAndZeroForOneEqualsTrue() (gas: 1055) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromInput_anyInputAmountCannotUnderflowThePrice() (gas: 1052) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromInput_canReturn1WithEnoughAmountInAndZeroForOneEqualsTrue() (gas: 963) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromInput_inputAmountOf0_1Currency0() (gas: 1079) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromInput_inputAmountOf0_1Currency1() (gas: 893) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromInput_returnsInputPriceIfAmountInIsZeroAndZeroForOneEqualsFalse() (gas: 880) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromInput_returnsInputPriceIfAmountInIsZeroAndZeroForOneEqualsTrue() (gas: 633) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromInput_returnsTheMinimumPriceForMaxInputs() (gas: 1233) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromInput_revertsIfInputAmountOverflowsThePrice() (gas: 3698) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromInput_revertsIfLiquidityIsZero() (gas: 3199) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromInput_revertsIfPriceIsZero() (gas: 3201) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromInput_zeroForOneEqualsFalseGas() (gas: 78625) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromInput_zeroForOneEqualsTrueGas() (gas: 78789) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromOutput_outputAmountOf0_1Currency0() (gas: 813) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromOutput_outputAmountOf0_1Currency1() (gas: 1156) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromOutput_puzzlingEchidnaTest() (gas: 3414) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromOutput_returnsInputPriceIfAmountInIsZeroAndZeroForOneEqualsFalse() (gas: 609) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromOutput_returnsInputPriceIfAmountInIsZeroAndZeroForOneEqualsTrue() (gas: 876) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromOutput_revertsIfAmountOutIsImpossibleInOneForZeroDirection() (gas: 3447) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromOutput_revertsIfAmountOutIsImpossibleInZeroForOneDirection() (gas: 3511) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromOutput_revertsIfLiquidityIsZero() (gas: 3221) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromOutput_revertsIfOutputAmountIsExactlyTheVirtualReservesOfCurrency0() (gas: 3414) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromOutput_revertsIfOutputAmountIsExactlyTheVirtualReservesOfCurrency1() (gas: 3478) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromOutput_revertsIfOutputAmountIsGreaterThanTheVirtualReservesOfCurrency0() (gas: 3465) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromOutput_revertsIfOutputAmountIsGreaterThanTheVirtualReservesOfCurrency1() (gas: 3478) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromOutput_revertsIfPriceIsZero() (gas: 3158) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromOutput_succeedsIfOutputAmountIsJustLessThanTheVirtualReservesOfCurrency1() (gas: 825) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromOutput_zeroForOneEqualsFalseGas() (gas: 78887) +SqrtPriceMathTestTest:test_getNextSqrtPriceFromOutput_zeroForOneEqualsTrueGas() (gas: 78570) +SqrtPriceMathTestTest:test_swapComputation_sqrtPTimessqrtQOverflows() (gas: 2375) +SwapMathTest:test_amountOut_isCappedAtTheDesiredAmountOut() (gas: 3414) +SwapMathTest:test_computeSwapStep_Invariants(uint160,uint160,uint128,int256,uint24) (runs: 256, μ: 8015, ~: 8004) +SwapMathTest:test_entireInputAmountTakenAsFee() (gas: 3490) +SwapMathTest:test_exactAmountIn_oneForZero_thatGetsCappedAtPriceTargetIn() (gas: 3451) +SwapMathTest:test_exactAmountIn_oneForZero_thatIsFullySpentIn() (gas: 4384) +SwapMathTest:test_exactAmountOut_oneForZero_thatGetsCappedAtPriceTargetIn() (gas: 3408) +SwapMathTest:test_exactAmountOut_oneForZero_thatIsFullyReceivedIn() (gas: 4919) +SwapMathTest:test_oneForZero_handlesIntermediateInsufficientLiquidityInExactOutputCase() (gas: 2760) +SwapMathTest:test_swapOneForZero_exactInCapped() (gas: 80113) +SwapMathTest:test_swapOneForZero_exactInPartial() (gas: 80963) +SwapMathTest:test_swapOneForZero_exactOutCapped() (gas: 79892) +SwapMathTest:test_swapOneForZero_exactOutPartial() (gas: 80943) +SwapMathTest:test_swapZeroForOne_exactInCapped() (gas: 80125) +SwapMathTest:test_swapZeroForOne_exactInPartial() (gas: 81157) +SwapMathTest:test_swapZeroForOne_exactOutCapped() (gas: 79860) +SwapMathTest:test_swapZeroForOne_exactOutPartial() (gas: 81161) +SwapMathTest:test_targetPriceOf1UsesPartialInputAmount() (gas: 2781) +SwapMathTest:test_zeroForOne_handlesIntermediateInsufficientLiquidityInExactOutputCase() (gas: 2749) +TestBalanceDelta:testAdd(int128,int128,int128,int128) (runs: 256, μ: 4750, ~: 4750) +TestBalanceDelta:testSub(int128,int128,int128,int128) (runs: 256, μ: 4724, ~: 4724) +TestBalanceDelta:testToBalanceDelta() (gas: 968) +TestBalanceDelta:testToBalanceDelta(int128,int128) (runs: 256, μ: 613, ~: 613) +TestBitMath:testLeastSignificantBit(uint256) (runs: 256, μ: 3845, ~: 3748) +TestBitMath:testLeastSignificantBitMaxUint256() (gas: 697) +TestBitMath:testLeastSignificantBitOne() (gas: 715) +TestBitMath:testLeastSignificantBitPowersOfTwo() (gas: 151449) +TestBitMath:testLeastSignificantBitTwo() (gas: 673) +TestBitMath:testLeastSignificantBitZero() (gas: 3086) +TestBitMath:testLsbGas() (gas: 115496) +TestBitMath:testMostSignificantBit(uint256) (runs: 256, μ: 15216, ~: 7913) +TestBitMath:testMostSignificantBitMaxUint256() (gas: 650) +TestBitMath:testMostSignificantBitOne() (gas: 538) +TestBitMath:testMostSignificantBitPowersOfTwo() (gas: 125789) +TestBitMath:testMostSignificantBitTwo() (gas: 523) +TestBitMath:testMostSignificantBitZero() (gas: 3087) +TestBitMath:testMsbGas() (gas: 115335) +TestCurrency:testCurrency_balanceOfSelf_native() (gas: 2470) +TestCurrency:testCurrency_balanceOfSelf_token() (gas: 7944) +TestCurrency:testCurrency_balanceOf_native() (gas: 2589) +TestCurrency:testCurrency_balanceOf_token() (gas: 7889) +TestCurrency:testCurrency_fromId_native_returns0() (gas: 2423) +TestCurrency:testCurrency_fromId_token_returnsAddressAsUint160() (gas: 2403) +TestCurrency:testCurrency_isNative_native_returnsTrue() (gas: 2382) +TestCurrency:testCurrency_isNative_token_returnsFalse() (gas: 2406) +TestCurrency:testCurrency_toId_native_returns0() (gas: 2389) +TestCurrency:testCurrency_toId_token_returnsAddressAsUint160() (gas: 2411) +TestCurrency:testCurrency_transfer_native_successfullyTransfersFunds() (gas: 12616) +TestCurrency:testCurrency_transfer_token_successfullyTransfersFunds() (gas: 20116) +TestDelegateCall:testCanCallIntoPrivateMethodWithModifier() (gas: 5426) +TestDelegateCall:testCannotDelegateCallPrivateMethodWithModifier() (gas: 10215) +TestDelegateCall:testDelegateCallNoModifier() (gas: 5734) +TestDelegateCall:testDelegateCallWithModifier() (gas: 10149) +TestDelegateCall:testGasOverhead() (gas: 13709) +TestDynamicFees:testSwapFailsWithTooLargeFee() (gas: 101996) +TestDynamicFees:testSwapWorks() (gas: 147057) +TickBitmapTest:test_flipTick_flipsOnlyTheSpecifiedTick() (gas: 16607) +TickBitmapTest:test_flipTick_gasCostOfFlippingATickThatResultsInDeletingAWord() (gas: 78619) +TickBitmapTest:test_flipTick_gasCostOfFlippingFirstTickInWordToInitialized() (gas: 100560) +TickBitmapTest:test_flipTick_gasCostOfFlippingSecondTickInWordToInitialized() (gas: 83548) +TickBitmapTest:test_flipTick_revertsOnlyItself() (gas: 55781) +TickBitmapTest:test_isInitialized_isFalseAtFirst() (gas: 2972) +TickBitmapTest:test_isInitialized_isFlippedBackByFlipTick() (gas: 4122) +TickBitmapTest:test_isInitialized_isFlippedByFlipTick() (gas: 6580) +TickBitmapTest:test_isInitialized_isNotChangedByAnotherFlipToADifferentTick() (gas: 6346) +TickBitmapTest:test_isInitialized_isNotChangedByAnotherFlipToADifferentTickOnAnotherWord() (gas: 26395) +TickBitmapTest:test_nextInitializedTickWithinOneWord_fuzz(int24,bool) (runs: 256, μ: 108471, ~: 92452) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteFalse_doesNotExceedBoundary() (gas: 2970) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteFalse_gasCostForEntireWord() (gas: 80629) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteFalse_gasCostJustBelowBoundary() (gas: 103061) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteFalse_gasCostOnBoundary() (gas: 80629) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteFalse_returnsTheNextInitializedTickFromTheNextWord() (gas: 23828) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteFalse_returnsTheNextWordsInitializedTickIfOnTheRightBoundary() (gas: 2950) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteFalse_returnsTheNextWordsInitializedTickIfOnTheRightBoundary2() (gas: 3394) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteFalse_returnsTheTickDirectlyToTheRight() (gas: 3329) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteFalse_returnsTheTickDirectlyToTheRight2() (gas: 3387) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteFalse_returnsTickToRightIfAtInitializedTick() (gas: 3394) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteFalse_returnsTickToRightIfAtInitializedTick2() (gas: 3412) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteFalse_skipsEntireWord() (gas: 2927) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteFalse_skipsHalfWord() (gas: 2949) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteTrue_atTheWordBoundary() (gas: 2926) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteTrue_boundaryIsInitialized() (gas: 23680) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteTrue_entireEmptyWord() (gas: 2947) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteTrue_gasCostForEntireWord() (gas: 80606) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteTrue_gasCostJustBelowBoundary() (gas: 103348) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteTrue_gasCostOnBoundary() (gas: 80606) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteTrue_halfwayThroughEmptyWord() (gas: 2970) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteTrue_returnsSameTickIfInitialized() (gas: 3256) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteTrue_returnsTickDirectlyToTheLeftOfInputTickIfNotInitialized() (gas: 3280) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteTrue_willNotExceedTheWordBoundary() (gas: 2949) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteTrue_wordBoundary() (gas: 3012) +TickBitmapTest:test_nextInitializedTickWithinOneWord_lteTrue_wordBoundaryLess1nextInitializedTickInNextWord() (gas: 3218) +TickMathTestTest:test_MAX_TICK_equalsNegativeMIN_TICK() (gas: 6686) +TickMathTestTest:test_MIN_TICK_equalsNegativeMAX_TICK() (gas: 6662) +TickMathTestTest:test_getSqrtRatioAtTick_isGreaterThanJSImplMaxTick() (gas: 6909) +TickMathTestTest:test_getSqrtRatioAtTick_isLessThanJSImplMinTick() (gas: 6718) +TickMathTestTest:test_getSqrtRatioAtTick_isValidMaxTick() (gas: 9795) +TickMathTestTest:test_getSqrtRatioAtTick_isValidMaxTickSubOne() (gas: 6967) +TickMathTestTest:test_getSqrtRatioAtTick_isValidMinTick() (gas: 9494) +TickMathTestTest:test_getSqrtRatioAtTick_isValidMinTickAddOne() (gas: 6819) +TickMathTestTest:test_getSqrtRatioAtTick_matchesJavaScriptImplByOneHundrethOfABip() (gas: 864508) +TickMathTestTest:test_getSqrtRatioAtTick_throwsForTooHigh() (gas: 8800) +TickMathTestTest:test_getSqrtRatioAtTick_throwsForTooLow() (gas: 8736) +TickMathTestTest:test_getTickAtSqrtRatio_isValidMaxSqrtRatioMinusOne() (gas: 8287) +TickMathTestTest:test_getTickAtSqrtRatio_isValidMinSqrtRatio() (gas: 8008) +TickMathTestTest:test_getTickAtSqrtRatio_isValidMinSqrtRatioPlusOne() (gas: 8173) +TickMathTestTest:test_getTickAtSqrtRatio_isValidRatioClosestToMaxTick() (gas: 8462) +TickMathTestTest:test_getTickAtSqrtRatio_matchesJavascriptImplWithin1() (gas: 374880) +TickMathTestTest:test_getTickAtSqrtRatio_throwsForTooHigh() (gas: 8681) +TickMathTestTest:test_getTickAtSqrtRatio_throwsForTooLow() (gas: 8692) +TickTest:testTick_clear_deletesAllTheDataInTheTick() (gas: 8080) +TickTest:testTick_cross_flipsTheGrowthVariables() (gas: 68414) +TickTest:testTick_cross_twoFlipsAreNoOp() (gas: 69074) +TickTest:testTick_getFeeGrowthInside_returns0ForTwoUninitializedTicksIfTickIsAbove() (gas: 75714) +TickTest:testTick_getFeeGrowthInside_returns0ForTwoUninitializedTicksIfTickIsBelow() (gas: 75677) +TickTest:testTick_getFeeGrowthInside_returnsAllForTwoUninitializedTicksIfTickIsInside() (gas: 56050) +TickTest:testTick_getFeeGrowthInside_subtractsLowerTickIfAbove() (gas: 98630) +TickTest:testTick_getFeeGrowthInside_subtractsUpperAndLowerTickIfInside() (gas: 141314) +TickTest:testTick_getFeeGrowthInside_subtractsUpperTickIfBelow() (gas: 98732) +TickTest:testTick_getFeeGrowthInside_worksCorrectlyWithOverflowOnInsideTick() (gas: 141531) +TickTest:testTick_tickSpacingToMaxLiquidityPerTick_gasCost60TickSpacing() (gas: 78180) +TickTest:testTick_tickSpacingToMaxLiquidityPerTick_gasCostMaxTickSpacing() (gas: 78238) +TickTest:testTick_tickSpacingToMaxLiquidityPerTick_gasCostMinTickSpacing() (gas: 78224) +TickTest:testTick_tickSpacingToMaxLiquidityPerTick_returnsTheCorrectValueFor1() (gas: 1634) +TickTest:testTick_tickSpacingToMaxLiquidityPerTick_returnsTheCorrectValueFor2302() (gas: 1657) +TickTest:testTick_tickSpacingToMaxLiquidityPerTick_returnsTheCorrectValueForEntireRange() (gas: 1750) +TickTest:testTick_tickSpacingToMaxLiquidityPerTick_returnsTheCorrectValueForHighFee() (gas: 1635) +TickTest:testTick_tickSpacingToMaxLiquidityPerTick_returnsTheCorrectValueForLowFee() (gas: 1614) +TickTest:testTick_tickSpacingToMaxLiquidityPerTick_returnsTheCorrectValueForMediumFee() (gas: 1612) +TickTest:testTick_tickSpacingToParametersInvariants_fuzz(int24) (runs: 256, μ: 5435, ~: 5435) +TickTest:testTick_update_assumesAllGrowthHappensBelowTicksLteCurrentTick() (gas: 134932) +TickTest:testTick_update_doesNotFlipFromNonzeroToGreaterNonzero() (gas: 36014) +TickTest:testTick_update_doesNotFlipFromNonzeroToLesserZero() (gas: 36068) +TickTest:testTick_update_doesNotSetAnyGrowthFieldsForTicksGtCurrentTick() (gas: 94471) +TickTest:testTick_update_doesNotSetAnyGrowthFieldsIfTickIsAlreadyInitialized() (gas: 136290) +TickTest:testTick_update_flipsFromNonzeroToZero() (gas: 24676) +TickTest:testTick_update_flipsFromZeroToNonzero() (gas: 34678) +TickTest:testTick_update_liquidityParsing_parsesMaxInt128StoredLiquidityGrossAfterUpdate() (gas: 95683) +TickTest:testTick_update_liquidityParsing_parsesMaxInt128StoredLiquidityGrossBeforeUpdate() (gas: 95639) +TickTest:testTick_update_liquidityParsing_parsesMaxUint128StoredLiquidityGrossAfterUpdate() (gas: 95679) +TickTest:testTick_update_liquidityParsing_parsesMaxUint128StoredLiquidityGrossBeforeUpdate() (gas: 95383) +TickTest:testTick_update_netsTheLiquidityBasedOnUpperFlag() (gas: 39534) +TickTest:testTick_update_revertsOnOverflowLiquidityGross() (gas: 38987) \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5b0a7d1bf..fe565e128 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -31,3 +31,6 @@ jobs: - name: Compile run: yarn prettier-check + + - name: Run forge snapshot + run: forge snapshot --check --tolerance 1