Skip to content

Commit

Permalink
add snapshot to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
snreynolds committed Sep 12, 2023
1 parent bc94eb0 commit cdcc6a6
Show file tree
Hide file tree
Showing 2 changed files with 214 additions and 0 deletions.
211 changes: 211 additions & 0 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
FeesTest:testCollectFees() (gas: 637665)
FeesTest:testHookWithdrawFeeProtocolWithdrawFee(uint8,uint8) (runs: 256, μ: 547952, ~: 555500)
FeesTest:testInitializeAllFees(uint8,uint8,uint8,uint8) (runs: 256, μ: 170885, ~: 180641)
FeesTest:testInitializeBothHookFee(uint8,uint8) (runs: 256, μ: 88738, ~: 92991)
FeesTest:testInitializeFailsNoHook() (gas: 18455)
FeesTest:testInitializeHookProtocolSwapFee(uint8,uint8) (runs: 256, μ: 126588, ~: 131251)
FeesTest:testInitializeHookSwapFee(uint8) (runs: 256, μ: 63564, ~: 65959)
FeesTest:testInitializeHookWithdrawFee(uint8) (runs: 256, μ: 63383, ~: 65866)
FeesTest:testInitializeWithSwapProtocolFeeAndHookFeeDifferentDirections() (gas: 599424)
FeesTest:testNoHookProtocolFee(uint8,uint8) (runs: 256, μ: 837448, ~: 837448)
FeesTest:testProtocolFeeOnWithdrawalRemainsZeroIfNoHookWithdrawalFeeSet(uint8,uint8) (runs: 256, μ: 513957, ~: 515512)
FeesTest:testProtocolSwapFeeAndHookSwapFeeSameDirection() (gas: 619825)
FeesTest:testSwapWithProtocolFeeAllAndHookFeeAllButOnlySwapFlag() (gas: 702272)
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: 454360)
HooksTest:testAfterInitializeInvalidReturn() (gas: 1542754)
HooksTest:testAfterModifyPositionInvalidReturn() (gas: 309239)
HooksTest:testAfterSwapInvalidReturn() (gas: 166272)
HooksTest:testBeforeDonateInvalidReturn() (gas: 454402)
HooksTest:testBeforeInitializeInvalidReturn() (gas: 1510631)
HooksTest:testBeforeModifyPositionInvalidReturn() (gas: 139684)
HooksTest:testBeforeSwapInvalidReturn() (gas: 140712)
HooksTest:testDonateSucceedsWithHook() (gas: 495240)
HooksTest:testGas() (gas: 38327)
HooksTest:testInitializeSucceedsWithHook() (gas: 7434371)
HooksTest:testInvalidIfNoFlags() (gas: 1108)
HooksTest:testIsValidHookAddressAnyFlags() (gas: 2099)
HooksTest:testIsValidHookAddressZeroAddress() (gas: 443)
HooksTest:testIsValidIfDynamicFee() (gas: 935)
HooksTest:testModifyPositionSucceedsWithHook() (gas: 301045)
HooksTest:testSwapSucceedsWithHook() (gas: 126272)
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, μ: 4814, ~: 4758)
HooksTest:testValidateHookAddressFailsNoHooks(uint152,uint8) (runs: 256, μ: 4811, ~: 4758)
HooksTest:testValidateHookAddressNoHooks(uint152) (runs: 256, μ: 1845, ~: 1845)
OwnedTest:testConstructor(address) (runs: 256, μ: 159689, ~: 159767)
OwnedTest:testSetOwnerFromNonOwner(address,address) (runs: 256, μ: 160847, ~: 160925)
OwnedTest:testSetOwnerFromOwner(address,address) (runs: 256, μ: 162996, ~: 162996)
PoolManagerReentrancyTest:testParallelLocker() (gas: 1966960)
PoolManagerReentrancyTest:testSimpleLinearLocker() (gas: 448880)
PoolManagerReentrancyTest:testTokenLocker() (gas: 609283)
PoolManagerReentrancyTest:testTokenRevert() (gas: 682312)
PoolManagerTest:testDonateFailsIfNoLiquidity(uint160) (runs: 256, μ: 105531, ~: 105695)
PoolManagerTest:testDonateFailsIfNotInitialized() (gas: 69411)
PoolManagerTest:testDonateFailsWithIncorrectSelectors() (gas: 1203994)
PoolManagerTest:testDonateSucceedsForNativeTokensWhenPoolHasLiquidity() (gas: 457290)
PoolManagerTest:testDonateSucceedsWhenPoolHasLiquidity() (gas: 515073)
PoolManagerTest:testDonateSucceedsWithCorrectSelectors() (gas: 1142569)
PoolManagerTest:testGasDonateOneToken() (gas: 468971)
PoolManagerTest:testGasMint() (gas: 325028)
PoolManagerTest:testGasMintWithHooks() (gas: 957948)
PoolManagerTest:testGasMintWithNative() (gas: 306286)
PoolManagerTest:testGasPoolManagerInitialize() (gas: 73382)
PoolManagerTest:testGasSwap() (gas: 179457)
PoolManagerTest:testGasSwapAgainstLiq() (gas: 594076)
PoolManagerTest:testGasSwapAgainstLiqWithNative() (gas: 635464)
PoolManagerTest:testGasSwapWithHooks() (gas: 795426)
PoolManagerTest:testGasSwapWithNative() (gas: 179509)
PoolManagerTest:testGetPosition() (gas: 386896)
PoolManagerTest:testLockEmitsCorrectId() (gas: 45740)
PoolManagerTest:testMintFailsIfNotInitialized() (gas: 70799)
PoolManagerTest:testMintFailsWithIncorrectSelectors() (gas: 988184)
PoolManagerTest:testMintSucceedsForNativeTokensIfInitialized(uint160) (runs: 256, μ: 270559, ~: 288384)
PoolManagerTest:testMintSucceedsIfInitialized(uint160) (runs: 256, μ: 274798, ~: 276718)
PoolManagerTest:testMintSucceedsWithCorrectSelectors() (gas: 964701)
PoolManagerTest:testMintSucceedsWithHooksIfInitialized(uint160) (runs: 256, μ: 825979, ~: 827834)
PoolManagerTest:testNoOpLockIsOk() (gas: 85207)
PoolManagerTest:testPoolManagerFeeControllerSet() (gas: 35319)
PoolManagerTest:testPoolManagerFetchFeeWhenController(uint160) (runs: 256, μ: 112583, ~: 112749)
PoolManagerTest:testPoolManagerInitialize((address,address,uint24,int24,address),uint160) (runs: 256, μ: 15823, ~: 13440)
PoolManagerTest:testPoolManagerInitializeFailsIfTickSpaceNeg(uint160) (runs: 256, μ: 15347, ~: 15347)
PoolManagerTest:testPoolManagerInitializeFailsIfTickSpaceTooLarge(uint160) (runs: 256, μ: 16295, ~: 16295)
PoolManagerTest:testPoolManagerInitializeFailsIfTickSpaceZero(uint160) (runs: 256, μ: 15348, ~: 15348)
PoolManagerTest:testPoolManagerInitializeFailsWithIncorrectSelectors() (gas: 714479)
PoolManagerTest:testPoolManagerInitializeForNativeTokens(uint160) (runs: 256, μ: 59030, ~: 59325)
PoolManagerTest:testPoolManagerInitializeRevertsWithSameTokenCombo(uint160) (runs: 256, μ: 48343, ~: 48529)
PoolManagerTest:testPoolManagerInitializeSucceedsWithCorrectSelectors() (gas: 714424)
PoolManagerTest:testPoolManagerInitializeSucceedsWithEmptyHooks(uint160) (runs: 256, μ: 680514, ~: 680680)
PoolManagerTest:testPoolManagerInitializeSucceedsWithHooks(uint160) (runs: 256, μ: 609373, ~: 609539)
PoolManagerTest:testPoolManagerInitializeSucceedsWithMaxTickSpacing(uint160) (runs: 256, μ: 50288, ~: 50463)
PoolManagerTest:testSwapFailsIfNotInitialized(uint160) (runs: 256, μ: 73053, ~: 73053)
PoolManagerTest:testSwapFailsWithIncorrectSelectors() (gas: 1063519)
PoolManagerTest:testSwapMintERC1155IfOutputNotTaken() (gas: 500790)
PoolManagerTest:testSwapSucceedsIfInitialized() (gas: 117818)
PoolManagerTest:testSwapSucceedsWithCorrectSelectors() (gas: 1000249)
PoolManagerTest:testSwapSucceedsWithHooksIfInitialized() (gas: 668020)
PoolManagerTest:testSwapSucceedsWithNativeTokensIfInitialized() (gas: 115705)
PoolManagerTest:testSwapUse1155AsInput() (gas: 638778)
PoolTest:testModifyPosition(uint160,(address,int24,int24,int128,int24)) (runs: 256, μ: 20427, ~: 6970)
PoolTest:testPoolInitialize(uint160,uint8,uint8) (runs: 256, μ: 12021, ~: 5734)
PoolTest:testSwap(uint160,(uint24,int24,bool,int256,uint160)) (runs: 256, μ: 733826, ~: 7280)
SafeCastTest:testToInt128(int256) (runs: 256, μ: 1406, ~: 511)
SafeCastTest:testToInt128(uint256) (runs: 256, μ: 1377, ~: 390)
SafeCastTest:testToInt256(uint256) (runs: 256, μ: 1015, ~: 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)
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, μ: 3852, ~: 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, μ: 15109, ~: 9993)
TestBitMath:testMostSignificantBitMaxUint256() (gas: 650)
TestBitMath:testMostSignificantBitOne() (gas: 538)
TestBitMath:testMostSignificantBitPowersOfTwo() (gas: 125789)
TestBitMath:testMostSignificantBitTwo() (gas: 523)
TestBitMath:testMostSignificantBitZero() (gas: 3087)
TestBitMath:testMsbGas() (gas: 115335)
TestDelegateCall:testCanCallIntoPrivateMethodWithModifier() (gas: 5426)
TestDelegateCall:testCannotDelegateCallPrivateMethodWithModifier() (gas: 8738)
TestDelegateCall:testDelegateCallNoModifier() (gas: 5734)
TestDelegateCall:testDelegateCallWithModifier() (gas: 8672)
TestDelegateCall:testGasOverhead() (gas: 13709)
TestDynamicFees:testSwapFailsWithTooLargeFee() (gas: 99014)
TestDynamicFees:testSwapWorks() (gas: 113646)
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)
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ jobs:

- name: Compile
run: yarn prettier-check

- name: Run forge snapshots
run: forge snapshot --check

0 comments on commit cdcc6a6

Please sign in to comment.