diff --git a/.gas-snapshot b/.gas-snapshot index 22f2a6e..646eca5 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -1,68 +1,70 @@ -QueryProcessorTest:testFindNearestSample_CanFindExactValue(uint32,uint256,uint256,uint256) (runs: 256, μ: 66759099, ~: 75010823) -QueryProcessorTest:testFindNearestSample_CanFindIntermediateValue(uint32,uint256,uint256,uint256) (runs: 256, μ: 66008847, ~: 75083165) +QueryProcessorTest:testFindNearestSample_CanFindExactValue(uint32,uint256,uint256,uint256) (runs: 256, μ: 67082003, ~: 75570862) +QueryProcessorTest:testFindNearestSample_CanFindIntermediateValue(uint32,uint256,uint256,uint256) (runs: 256, μ: 67588655, ~: 77540282) QueryProcessorTest:testFindNearestSample_NotInitialized() (gas: 1056945756) -QueryProcessorTest:testFindNearestSample_OneSample(uint256) (runs: 256, μ: 80327, ~: 80360) +QueryProcessorTest:testFindNearestSample_OneSample(uint256) (runs: 256, μ: 80329, ~: 80360) QueryProcessorTest:testGetInstantValue() (gas: 124248) QueryProcessorTest:testGetInstantValue_NotInitialized(uint256) (runs: 256, μ: 19397, ~: 19397) -QueryProcessorTest:testGetInstantValue_NotInitialized_BeyondBufferSize(uint8,uint16) (runs: 256, μ: 68389670, ~: 68389600) -QueryProcessorTest:testGetPastAccumulator_BufferEmpty(uint8) (runs: 256, μ: 27023, ~: 27087) -QueryProcessorTest:testGetPastAccumulator_ExactMatch(uint32,uint256,uint256,uint16) (runs: 256, μ: 71010550, ~: 79636764) -QueryProcessorTest:testGetPastAccumulator_ExactMatch_LatestAccumulator(uint32,uint256,uint256) (runs: 256, μ: 69665266, ~: 79403270) -QueryProcessorTest:testGetPastAccumulator_ExactMatch_OldestAccumulator(uint32,uint256,uint256) (runs: 256, μ: 69695230, ~: 79434870) -QueryProcessorTest:testGetPastAccumulator_ExtrapolatesBeyondLatest(uint32,uint256,uint256,uint256) (runs: 256, μ: 65982456, ~: 75054423) -QueryProcessorTest:testGetPastAccumulator_InterpolatesBetweenPastAccumulators(uint32,uint256,uint256,uint256) (runs: 256, μ: 66016563, ~: 75089173) -QueryProcessorTest:testGetPastAccumulator_InvalidAgo(uint32,uint256,uint256,uint256) (runs: 256, μ: 65974048, ~: 75046134) -QueryProcessorTest:testGetPastAccumulator_QueryTooOld(uint32,uint256,uint256,uint256) (runs: 256, μ: 65985579, ~: 75056017) -QueryProcessorTest:testGetTimeWeightedAverage(uint32,uint256,uint256,uint256,uint256) (runs: 256, μ: 106133347, ~: 115866805) +QueryProcessorTest:testGetInstantValue_NotInitialized_BeyondBufferSize(uint8,uint16) (runs: 256, μ: 68389673, ~: 68389600) +QueryProcessorTest:testGetPastAccumulator_BufferEmpty(uint8) (runs: 256, μ: 27020, ~: 27087) +QueryProcessorTest:testGetPastAccumulator_ExactMatch(uint32,uint256,uint256,uint16) (runs: 256, μ: 70774779, ~: 79026739) +QueryProcessorTest:testGetPastAccumulator_ExactMatch_LatestAccumulator(uint32,uint256,uint256) (runs: 256, μ: 66794318, ~: 77371310) +QueryProcessorTest:testGetPastAccumulator_ExactMatch_OldestAccumulator(uint32,uint256,uint256) (runs: 256, μ: 66824041, ~: 77402910) +QueryProcessorTest:testGetPastAccumulator_ExtrapolatesBeyondLatest(uint32,uint256,uint256,uint256) (runs: 256, μ: 67562190, ~: 77511143) +QueryProcessorTest:testGetPastAccumulator_InterpolatesBetweenPastAccumulators(uint32,uint256,uint256,uint256) (runs: 256, μ: 67596306, ~: 77546290) +QueryProcessorTest:testGetPastAccumulator_InvalidAgo(uint32,uint256,uint256,uint256) (runs: 256, μ: 67553784, ~: 77503540) +QueryProcessorTest:testGetPastAccumulator_QueryTooOld(uint32,uint256,uint256,uint256) (runs: 256, μ: 67565260, ~: 77513080) +QueryProcessorTest:testGetTimeWeightedAverage(uint32,uint256,uint256,uint256,uint256) (runs: 256, μ: 106780956, ~: 116354216) QueryProcessorTest:testGetTimeWeightedAverage_BadSecs() (gas: 10995) -ReservoirPriceOracleTest:testClearRoute() (gas: 50941) -ReservoirPriceOracleTest:testClearRoute_AllWordsCleared() (gas: 151792) -ReservoirPriceOracleTest:testDesignatePair() (gas: 29113) -ReservoirPriceOracleTest:testDesignatePair_IncorrectPair() (gas: 21111) -ReservoirPriceOracleTest:testDesignatePair_NotOwner() (gas: 17531) -ReservoirPriceOracleTest:testDesignatePair_TokenOrderReversed() (gas: 30729) -ReservoirPriceOracleTest:testGetQuote(uint256,uint256) (runs: 256, μ: 35191, ~: 35303) -ReservoirPriceOracleTest:testGetQuote_AmountInTooLarge() (gas: 12941) -ReservoirPriceOracleTest:testGetQuote_BaseIsVault(uint256) (runs: 256, μ: 417472, ~: 417233) -ReservoirPriceOracleTest:testGetQuote_ComplicatedDecimals() (gas: 10350769) -ReservoirPriceOracleTest:testGetQuote_Inverse(uint256,uint256) (runs: 256, μ: 37319, ~: 37435) -ReservoirPriceOracleTest:testGetQuote_MultipleHops() (gas: 113387) -ReservoirPriceOracleTest:testGetQuote_MultipleHops_Inverse() (gas: 113709) -ReservoirPriceOracleTest:testGetQuote_MultipleHops_PriceZero() (gas: 125327) -ReservoirPriceOracleTest:testGetQuote_NoFallbackOracle() (gas: 20831) -ReservoirPriceOracleTest:testGetQuote_PriceZero() (gas: 15946) -ReservoirPriceOracleTest:testGetQuote_RandomizeAllParam_1HopRoute(uint256,uint256,address,address,uint8,uint8) (runs: 256, μ: 5327411, ~: 5327435) -ReservoirPriceOracleTest:testGetQuote_RandomizeAllParam_2HopRoute(uint256,uint256,uint256,address,address,address,uint8,uint8,uint8) (runs: 256, μ: 10492968, ~: 10493010) -ReservoirPriceOracleTest:testGetQuote_SameBaseQuote(uint256,address) (runs: 256, μ: 8941, ~: 8941) -ReservoirPriceOracleTest:testGetQuote_UseFallback() (gas: 38312) -ReservoirPriceOracleTest:testGetQuote_ZeroIn() (gas: 38148) -ReservoirPriceOracleTest:testGetQuotes(uint256,uint256) (runs: 256, μ: 32724, ~: 32836) -ReservoirPriceOracleTest:testSetFallbackOracle_NotOwner() (gas: 11003) -ReservoirPriceOracleTest:testSetRoute() (gas: 58196) -ReservoirPriceOracleTest:testSetRoute_InvalidRoute() (gas: 17964) -ReservoirPriceOracleTest:testSetRoute_InvalidRouteLength() (gas: 17593) -ReservoirPriceOracleTest:testSetRoute_MultipleHops() (gas: 193280) -ReservoirPriceOracleTest:testSetRoute_NotSorted() (gas: 12081) -ReservoirPriceOracleTest:testSetRoute_OverwriteExisting() (gas: 160942) -ReservoirPriceOracleTest:testSetRoute_SameToken() (gas: 12072) -ReservoirPriceOracleTest:testUndesignatePair() (gas: 30279) +ReservoirPriceOracleTest:testClearRoute() (gas: 52419) +ReservoirPriceOracleTest:testClearRoute_AllWordsCleared() (gas: 160380) +ReservoirPriceOracleTest:testDesignatePair() (gas: 29068) +ReservoirPriceOracleTest:testDesignatePair_IncorrectPair() (gas: 21155) +ReservoirPriceOracleTest:testDesignatePair_NotOwner() (gas: 17487) +ReservoirPriceOracleTest:testDesignatePair_TokenOrderReversed() (gas: 30639) +ReservoirPriceOracleTest:testGetQuote(uint256,uint256) (runs: 256, μ: 34030, ~: 34140) +ReservoirPriceOracleTest:testGetQuote_AmountInTooLarge() (gas: 12985) +ReservoirPriceOracleTest:testGetQuote_BaseIsVault(uint256) (runs: 256, μ: 411298, ~: 411040) +ReservoirPriceOracleTest:testGetQuote_ComplicatedDecimals() (gas: 10354355) +ReservoirPriceOracleTest:testGetQuote_Inverse(uint256,uint256) (runs: 256, μ: 36170, ~: 36338) +ReservoirPriceOracleTest:testGetQuote_MultipleHops() (gas: 111841) +ReservoirPriceOracleTest:testGetQuote_MultipleHops_Inverse() (gas: 112117) +ReservoirPriceOracleTest:testGetQuote_MultipleHops_PriceZero() (gas: 122567) +ReservoirPriceOracleTest:testGetQuote_NoFallbackOracle() (gas: 20842) +ReservoirPriceOracleTest:testGetQuote_PriceZero() (gas: 15958) +ReservoirPriceOracleTest:testGetQuote_RandomizeAllParam_1HopRoute(uint256,uint256,address,address,uint8,uint8) (runs: 256, μ: 5329192, ~: 5329188) +ReservoirPriceOracleTest:testGetQuote_RandomizeAllParam_2HopRoute(uint256,uint256,uint256,address,address,address,uint8,uint8,uint8) (runs: 256, μ: 10496453, ~: 10496500) +ReservoirPriceOracleTest:testGetQuote_SameBaseQuote(uint256,address) (runs: 256, μ: 8963, ~: 8963) +ReservoirPriceOracleTest:testGetQuote_UseFallback() (gas: 38334) +ReservoirPriceOracleTest:testGetQuote_ZeroIn() (gas: 36975) +ReservoirPriceOracleTest:testGetQuotes(uint256,uint256) (runs: 256, μ: 26519, ~: 26629) +ReservoirPriceOracleTest:testPriceCache_Inverted() (gas: 22001) +ReservoirPriceOracleTest:testSetFallbackOracle_NotOwner() (gas: 10960) +ReservoirPriceOracleTest:testSetRoute() (gas: 61215) +ReservoirPriceOracleTest:testSetRoute_InvalidRoute() (gas: 20176) +ReservoirPriceOracleTest:testSetRoute_InvalidRouteLength() (gas: 19316) +ReservoirPriceOracleTest:testSetRoute_MultipleHops() (gas: 201832) +ReservoirPriceOracleTest:testSetRoute_NotSorted() (gas: 13028) +ReservoirPriceOracleTest:testSetRoute_OverwriteExisting() (gas: 170189) +ReservoirPriceOracleTest:testSetRoute_SameToken() (gas: 13063) +ReservoirPriceOracleTest:testUndesignatePair() (gas: 30256) ReservoirPriceOracleTest:testUndesignatePair_NotOwner() (gas: 15310) -ReservoirPriceOracleTest:testUpdatePriceDeviationThreshold(uint256) (runs: 256, μ: 21306, ~: 21063) -ReservoirPriceOracleTest:testUpdatePrice_BeyondThreshold() (gas: 213594) -ReservoirPriceOracleTest:testUpdatePrice_BeyondThreshold_InsufficientReward(uint256) (runs: 256, μ: 209575, ~: 209653) -ReservoirPriceOracleTest:testUpdatePrice_BeyondThreshold_ZeroRecipient() (gas: 195472) -ReservoirPriceOracleTest:testUpdatePrice_FirstUpdate() (gas: 203166) -ReservoirPriceOracleTest:testUpdatePrice_IntermediateRoutes() (gas: 15867838) -ReservoirPriceOracleTest:testUpdatePrice_PriceOutOfRange() (gas: 5350485) -ReservoirPriceOracleTest:testUpdatePrice_WithinThreshold() (gas: 204011) -ReservoirPriceOracleTest:testUpdateRewardGasAmount() (gas: 19011) -ReservoirPriceOracleTest:testUpdateRewardGasAmount_NotOwner() (gas: 10962) -ReservoirPriceOracleTest:testUpdateTwapPeriod(uint256) (runs: 256, μ: 21723, ~: 21806) -ReservoirPriceOracleTest:testUpdateTwapPeriod_InvalidTwapPeriod(uint256) (runs: 256, μ: 17861, ~: 18164) -ReservoirPriceOracleTest:testWritePriceCache(uint256) (runs: 256, μ: 30004, ~: 29765) +ReservoirPriceOracleTest:testUpdatePrice_AboveThresholdBelowMaxReward(uint256) (runs: 256, μ: 165410, ~: 165430) +ReservoirPriceOracleTest:testUpdatePrice_BelowThreshold(uint256) (runs: 256, μ: 150274, ~: 149937) +ReservoirPriceOracleTest:testUpdatePrice_BeyondMaxReward(uint256) (runs: 256, μ: 162912, ~: 162937) +ReservoirPriceOracleTest:testUpdatePrice_FirstUpdate() (gas: 153864) +ReservoirPriceOracleTest:testUpdatePrice_IntermediateRoutes() (gas: 15897882) +ReservoirPriceOracleTest:testUpdatePrice_PriceOutOfRange() (gas: 5353642) +ReservoirPriceOracleTest:testUpdatePrice_RewardEligible_ContractNoReceive() (gas: 153424) +ReservoirPriceOracleTest:testUpdatePrice_RewardEligible_InsufficientReward(uint256) (runs: 256, μ: 211617, ~: 211823) +ReservoirPriceOracleTest:testUpdatePrice_RewardEligible_ZeroRecipient() (gas: 144295) +ReservoirPriceOracleTest:testUpdateRewardGasAmount() (gas: 19039) +ReservoirPriceOracleTest:testUpdateRewardGasAmount_NotOwner() (gas: 10940) +ReservoirPriceOracleTest:testUpdateTwapPeriod(uint256) (runs: 256, μ: 21701, ~: 21800) +ReservoirPriceOracleTest:testUpdateTwapPeriod_InvalidTwapPeriod(uint256) (runs: 256, μ: 17846, ~: 18120) +ReservoirPriceOracleTest:testWritePriceCache(uint256) (runs: 256, μ: 30168, ~: 29910) RoutesLibTest:testGetDecimalDifference() (gas: 3974) RoutesLibTest:testIsCompositeRoute() (gas: 4341) -RoutesLibTest:testPackSimplePrice(int8,uint256) (runs: 256, μ: 7786, ~: 7555) +RoutesLibTest:testPackSimplePrice(int8,uint256) (runs: 256, μ: 8203, ~: 7962) SamplesTest:testAccumulator() (gas: 3959) SamplesTest:testAccumulator_BadVariableRequest() (gas: 3523) SamplesTest:testInstant() (gas: 3909)