From 294412478fbad3e332c9ec2ed1428171023d486b Mon Sep 17 00:00:00 2001 From: "A.L" Date: Wed, 14 Jun 2023 00:07:14 +0200 Subject: [PATCH] fix: use ipfs for bytecode hash * deploy: use ipfs instead for bytecode hash * ci: update hashes * ci: rm ci env * forge config * try verbosity 4 * update remappings * fix: undo verbosity change * test: update gas snapshot --- .gas-snapshot | 148 +++++++++++++++---------------- .github/workflows/ci.yml | 3 - foundry.toml | 7 +- script/optimized-deployer-meta | 8 +- script/unoptimized-deployer-meta | 8 +- src/ReservoirDeployer.sol | 8 +- 6 files changed, 91 insertions(+), 91 deletions(-) diff --git a/.gas-snapshot b/.gas-snapshot index baa81f1f..88936284 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -1,23 +1,23 @@ -AssetManagedPairTest:testAdjustManagement(uint256,uint256) (runs: 256, μ: 315164, ~: 315430) -AssetManagedPairTest:testAdjustManagement_AdjustAfterLoss(uint256) (runs: 256, μ: 475846, ~: 475687) -AssetManagedPairTest:testAdjustManagement_DecreaseManagement(uint256,uint256) (runs: 256, μ: 499690, ~: 502703) +AssetManagedPairTest:testAdjustManagement(uint256,uint256) (runs: 256, μ: 315228, ~: 315994) +AssetManagedPairTest:testAdjustManagement_AdjustAfterLoss(uint256) (runs: 256, μ: 475841, ~: 475687) +AssetManagedPairTest:testAdjustManagement_DecreaseManagement(uint256,uint256) (runs: 256, μ: 499701, ~: 502703) AssetManagedPairTest:testAdjustManagement_GreaterThanUint104() (gas: 121414) AssetManagedPairTest:testAdjustManagement_Int256Min() (gas: 121804) -AssetManagedPairTest:testAdjustManagement_KStillHolds(uint256) (runs: 256, μ: 629568, ~: 629052) +AssetManagedPairTest:testAdjustManagement_KStillHolds(uint256) (runs: 256, μ: 629560, ~: 629052) AssetManagedPairTest:testAdjustManagement_Uint104() (gas: 662114) AssetManagedPairTest:testBurn_AfterAlmostTotalLoss() (gas: 629453) -AssetManagedPairTest:testBurn_AfterLoss(uint256,uint256) (runs: 256, μ: 699190, ~: 704696) -AssetManagedPairTest:testMint_AfterLoss(uint256,uint256) (runs: 256, μ: 599841, ~: 601598) +AssetManagedPairTest:testBurn_AfterLoss(uint256,uint256) (runs: 256, μ: 698446, ~: 704696) +AssetManagedPairTest:testMint_AfterLoss(uint256,uint256) (runs: 256, μ: 599702, ~: 601598) AssetManagedPairTest:testSetManager() (gas: 126218) -AssetManagedPairTest:testSetManager_CannotMigrateWithManaged(uint256,uint256) (runs: 256, μ: 410407, ~: 410673) +AssetManagedPairTest:testSetManager_CannotMigrateWithManaged(uint256,uint256) (runs: 256, μ: 410471, ~: 411237) AssetManagedPairTest:testSkimExcessManaged() (gas: 398288) AssetManagedPairTest:testSkimExcessManaged_InvalidToken() (gas: 67707) AssetManagedPairTest:testSkimExcessManaged_NoExcess() (gas: 304105) -AssetManagedPairTest:testSwap_AfterLoss(uint256) (runs: 256, μ: 718135, ~: 713936) -AssetManagedPairTest:testSync(uint256,uint256,uint256,uint256) (runs: 256, μ: 463869, ~: 464060) -AssetManagedPairTest:testSyncManaged_ConstantProduct(uint256,uint256) (runs: 256, μ: 326127, ~: 326167) -AssetManagedPairTest:testSyncManaged_Stable(uint256,uint256) (runs: 256, μ: 383744, ~: 385807) -ConstantProductMathTest:testCalcLogPrice_ReturnsOneWeiWhenPriceDiffGreaterThan1e18(uint256,uint256) (runs: 256, μ: 9352, ~: 9147) +AssetManagedPairTest:testSwap_AfterLoss(uint256) (runs: 256, μ: 718019, ~: 713936) +AssetManagedPairTest:testSync(uint256,uint256,uint256,uint256) (runs: 256, μ: 463921, ~: 464086) +AssetManagedPairTest:testSyncManaged_ConstantProduct(uint256,uint256) (runs: 256, μ: 326145, ~: 326167) +AssetManagedPairTest:testSyncManaged_Stable(uint256,uint256) (runs: 256, μ: 383619, ~: 385807) +ConstantProductMathTest:testCalcLogPrice_ReturnsOneWeiWhenPriceDiffGreaterThan1e18(uint256,uint256) (runs: 256, μ: 9370, ~: 9147) ConstantProductMathTest:testConstantProductOracleMath() (gas: 28248) ConstantProductPairGas:testGasBurn() (gas: 87483) ConstantProductPairGas:testGasMint() (gas: 94823) @@ -29,74 +29,74 @@ ConstantProductPairTest:testBurn() (gas: 129776) ConstantProductPairTest:testBurn_Zero() (gas: 67714) ConstantProductPairTest:testMint() (gas: 97969) ConstantProductPairTest:testMint_InitialMint() (gas: 29333) -ConstantProductPairTest:testMint_JustAboveMinimumLiquidity() (gas: 4853294) -ConstantProductPairTest:testMint_MinimumLiquidity() (gas: 4806707) -ConstantProductPairTest:testMint_UnderMinimumLiquidity() (gas: 4752233) +ConstantProductPairTest:testMint_JustAboveMinimumLiquidity() (gas: 4861518) +ConstantProductPairTest:testMint_MinimumLiquidity() (gas: 4814931) +ConstantProductPairTest:testMint_UnderMinimumLiquidity() (gas: 4760457) ConstantProductPairTest:testOracle_ClampedPrice_AtLimit() (gas: 182355) ConstantProductPairTest:testOracle_ClampedPrice_NoDiffWithinLimit() (gas: 182346) ConstantProductPairTest:testOracle_ClampedPrice_OverLimit() (gas: 182818) -ConstantProductPairTest:testOracle_CorrectLiquidity(uint32) (runs: 256, μ: 5072829, ~: 5072831) -ConstantProductPairTest:testOracle_CorrectPrice(uint32) (runs: 256, μ: 5072762, ~: 5072763) -ConstantProductPairTest:testOracle_CorrectPriceDiffDecimals(uint32) (runs: 256, μ: 4966102, ~: 4966103) +ConstantProductPairTest:testOracle_CorrectLiquidity(uint32) (runs: 256, μ: 5081053, ~: 5081055) +ConstantProductPairTest:testOracle_CorrectPrice(uint32) (runs: 256, μ: 5080986, ~: 5080987) +ConstantProductPairTest:testOracle_CorrectPriceDiffDecimals(uint32) (runs: 256, μ: 4974326, ~: 4974327) ConstantProductPairTest:testOracle_LiquidityAtMaximum() (gas: 208069) ConstantProductPairTest:testOracle_NoWriteInSameTimestamp() (gas: 187228) ConstantProductPairTest:testOracle_OverflowAccLiquidity(uint32) (runs: 256, μ: 109144, ~: 109144) ConstantProductPairTest:testOracle_OverflowAccPrice(uint32) (runs: 256, μ: 190871, ~: 192974) -ConstantProductPairTest:testOracle_SimplePrices(uint32) (runs: 256, μ: 5032783, ~: 5032784) +ConstantProductPairTest:testOracle_SimplePrices(uint32) (runs: 256, μ: 5041007, ~: 5041008) ConstantProductPairTest:testOracle_WrapsAroundAfterFull() (gas: 3107236657) ConstantProductPairTest:testPlatformFee_Disable() (gas: 392915) ConstantProductPairTest:testPlatformFee_DisableReenable() (gas: 548466) ConstantProductPairTest:testSwap() (gas: 82991) -ConstantProductPairTest:testSwap_ExactOut(uint256) (runs: 256, μ: 92956, ~: 92798) +ConstantProductPairTest:testSwap_ExactOut(uint256) (runs: 256, μ: 92945, ~: 92658) ConstantProductPairTest:testSwap_ExactOutExceedReserves() (gas: 37513) ConstantProductPairTest:testSwap_ExactOut_NewReservesExceedUint104() (gas: 81455) -ConstantProductPairTest:testSwap_ExtremeAmounts() (gas: 4894651) +ConstantProductPairTest:testSwap_ExtremeAmounts() (gas: 4902875) ConstantProductPairTest:testSwap_MinInt256() (gas: 17197) ConstantProductPairTest:testSwap_Reenter() (gas: 80039) ConstantProductPairTest:testWriteObservations() (gas: 209079) -FixedPointMathLibTest:testFullMulDiv(uint256,uint256,uint256) (runs: 256, μ: 7423, ~: 6912) -FixedPointMathLibTest:testMulDiv(uint256,uint256,uint256) (runs: 256, μ: 7644, ~: 6790) -FlashSwapTest:testSwap_FlashSwap_ExactIn(uint256) (runs: 256, μ: 221922, ~: 224752) -FlashSwapTest:testSwap_FlashSwap_ExactOut(uint256) (runs: 256, μ: 227054, ~: 227177) -FlashSwapTest:testSwap_FlashSwap_NoPay(uint256) (runs: 256, μ: 181540, ~: 185409) -GenericFactoryGasTest:testCreateConstantProductPair() (gas: 4668872) -GenericFactoryGasTest:testCreateFactory() (gas: 5927189) -GenericFactoryGasTest:testCreateStablePair() (gas: 5028557) +FixedPointMathLibTest:testFullMulDiv(uint256,uint256,uint256) (runs: 256, μ: 7378, ~: 6912) +FixedPointMathLibTest:testMulDiv(uint256,uint256,uint256) (runs: 256, μ: 7635, ~: 6790) +FlashSwapTest:testSwap_FlashSwap_ExactIn(uint256) (runs: 256, μ: 221939, ~: 225813) +FlashSwapTest:testSwap_FlashSwap_ExactOut(uint256) (runs: 256, μ: 227057, ~: 227177) +FlashSwapTest:testSwap_FlashSwap_NoPay(uint256) (runs: 256, μ: 181527, ~: 186108) +GenericFactoryGasTest:testCreateConstantProductPair() (gas: 4677096) +GenericFactoryGasTest:testCreateFactory() (gas: 5943636) +GenericFactoryGasTest:testCreateStablePair() (gas: 5036789) GenericFactoryTest:testAddCurve() (gas: 115441) GenericFactoryTest:testAddCurve_OnlyOwner() (gas: 13607) -GenericFactoryTest:testAllPairs() (gas: 9682493) -GenericFactoryTest:testCreatePair_AllCurves(uint256) (runs: 256, μ: 4854777, ~: 4854600) +GenericFactoryTest:testAllPairs() (gas: 9698949) +GenericFactoryTest:testCreatePair_AllCurves(uint256) (runs: 256, μ: 4863005, ~: 4862828) GenericFactoryTest:testCreatePair_CurveDoesNotExist(uint256) (runs: 256, μ: 22071, ~: 22048) -GenericFactoryTest:testCreatePair_IdenticalAddress(uint256) (runs: 256, μ: 15456, ~: 15456) -GenericFactoryTest:testCreatePair_MoreThan18Decimals(uint256) (runs: 256, μ: 199726, ~: 199293) -GenericFactoryTest:testCreatePair_PairAlreadyExists(uint256) (runs: 256, μ: 19953, ~: 19953) -GenericFactoryTest:testCreatePair_ZeroAddress(uint256) (runs: 256, μ: 15478, ~: 15478) +GenericFactoryTest:testCreatePair_IdenticalAddress(uint256) (runs: 256, μ: 15458, ~: 15456) +GenericFactoryTest:testCreatePair_MoreThan18Decimals(uint256) (runs: 256, μ: 199727, ~: 199308) +GenericFactoryTest:testCreatePair_PairAlreadyExists(uint256) (runs: 256, μ: 19955, ~: 19953) +GenericFactoryTest:testCreatePair_ZeroAddress(uint256) (runs: 256, μ: 15480, ~: 15478) GenericFactoryTest:testGetPair() (gas: 18226) -OracleCallerTest:testObservation_NotWhitelisted(uint256) (runs: 256, μ: 86927, ~: 87374) +OracleCallerTest:testObservation_NotWhitelisted(uint256) (runs: 256, μ: 86904, ~: 87374) OracleCallerTest:testWhitelistAddress() (gas: 146540) OracleCallerTest:testWhitelistAddress_NotOwner() (gas: 15193) OracleWriterTest:testMaxChangeRate_Default() (gas: 66204) -OracleWriterTest:testObservation_NotOracleCaller(uint256) (runs: 256, μ: 77119, ~: 77546) -OracleWriterTest:testOracle_CompareLiquidityTwoCurves_Balanced(uint32) (runs: 256, μ: 9745816, ~: 9745818) -OracleWriterTest:testOracle_SamePriceDiffLiq(uint32) (runs: 256, μ: 10255590, ~: 10255592) -OracleWriterTest:testOracle_SamePriceSameLiq(uint32) (runs: 256, μ: 10252413, ~: 10252415) -OracleWriterTest:testOracle_SameReservesDiffPrice(uint32) (runs: 256, μ: 10252230, ~: 10252232) +OracleWriterTest:testObservation_NotOracleCaller(uint256) (runs: 256, μ: 77081, ~: 77546) +OracleWriterTest:testOracle_CompareLiquidityTwoCurves_Balanced(uint32) (runs: 256, μ: 9762272, ~: 9762274) +OracleWriterTest:testOracle_SamePriceDiffLiq(uint32) (runs: 256, μ: 10272046, ~: 10272048) +OracleWriterTest:testOracle_SamePriceSameLiq(uint32) (runs: 256, μ: 10268869, ~: 10268871) +OracleWriterTest:testOracle_SameReservesDiffPrice(uint32) (runs: 256, μ: 10268686, ~: 10268688) OracleWriterTest:testSetMaxChangeRate_OnlyFactory() (gas: 87592) -OracleWriterTest:testSetMaxChangeRate_TooHigh(uint256) (runs: 256, μ: 76629, ~: 76592) +OracleWriterTest:testSetMaxChangeRate_TooHigh(uint256) (runs: 256, μ: 76599, ~: 76592) OracleWriterTest:testSetMaxChangeRate_TooLow() (gas: 68058) OracleWriterTest:testUpdateOracleCaller() (gas: 113355) OracleWriterTest:testUpdateOracleCaller_NoChange() (gas: 81514) OracleWriterTest:testUpdateOracle_WriteOldReservesNotNew() (gas: 277922) PairTest:testCustomPlatformFee_OffByDefault() (gas: 71886) PairTest:testCustomSwapFee_OffByDefault() (gas: 66117) -PairTest:testEmitEventOnCreation() (gas: 9679384) +PairTest:testEmitEventOnCreation() (gas: 9695840) PairTest:testNonPayable() (gas: 79366) PairTest:testRecoverToken() (gas: 198154) PairTest:testSetPlatformFeeForPair() (gas: 109354) -PairTest:testSetPlatformFeeForPair_BreachMaximum(uint256) (runs: 256, μ: 108858, ~: 108806) +PairTest:testSetPlatformFeeForPair_BreachMaximum(uint256) (runs: 256, μ: 108799, ~: 108806) PairTest:testSetPlatformFeeForPair_Reset() (gas: 117582) PairTest:testSetSwapFeeForPair() (gas: 109445) -PairTest:testSetSwapFeeForPair_BreachMaximum(uint256) (runs: 256, μ: 108756, ~: 108228) +PairTest:testSetSwapFeeForPair_BreachMaximum(uint256) (runs: 256, μ: 108777, ~: 108790) PairTest:testSetSwapFeeForPair_Reset() (gas: 123581) PairTest:testSwapFee_UseDefault() (gas: 15048) PairTest:testUpdateDefaultFees() (gas: 161714) @@ -119,13 +119,13 @@ ReservoirPairTest:testSkim(uint256,uint256) (runs: 256, μ: 260259, ~: 259872) ReservoirPairTest:testSync() (gas: 169522) ReservoirTimelockTest:testRampA(uint32) (runs: 256, μ: 36123, ~: 36123) ReservoirTimelockTest:testRampA_NotAdmin() (gas: 17559) -ReservoirTimelockTest:testSetCustomPlatformFee(uint256) (runs: 256, μ: 133686, ~: 135210) +ReservoirTimelockTest:testSetCustomPlatformFee(uint256) (runs: 256, μ: 133707, ~: 135210) ReservoirTimelockTest:testSetCustomPlatformFee_NotAdmin() (gas: 80871) -ReservoirTimelockTest:testSetCustomSwapFee(uint256) (runs: 256, μ: 133791, ~: 135256) +ReservoirTimelockTest:testSetCustomSwapFee(uint256) (runs: 256, μ: 133795, ~: 135256) ReservoirTimelockTest:testSetCustomSwapFee_NotAdmin() (gas: 80847) -StableMathTest:testComputeLiquidityFromAdjustedBalances_ConvergeEvenWithVeryUnbalancedValues(uint256,uint256,uint256) (runs: 256, μ: 20322, ~: 15337) -StableMathTest:testGetAmountIn(uint256,uint256,uint256) (runs: 256, μ: 26159, ~: 25606) -StableMathTest:testGetAmountOut(uint256,uint256,uint256) (runs: 256, μ: 28807, ~: 27964) +StableMathTest:testComputeLiquidityFromAdjustedBalances_ConvergeEvenWithVeryUnbalancedValues(uint256,uint256,uint256) (runs: 256, μ: 20391, ~: 15337) +StableMathTest:testGetAmountIn(uint256,uint256,uint256) (runs: 256, μ: 26233, ~: 25652) +StableMathTest:testGetAmountOut(uint256,uint256,uint256) (runs: 256, μ: 28883, ~: 28134) StableMathTest:testMinALessThanMaxA() (gas: 267) StablePairGas:testGasBurn() (gas: 104409) StablePairGas:testGasMint() (gas: 123685) @@ -136,36 +136,36 @@ StablePairGas:testGasSwap_UpdateOracleClamped() (gas: 109413) StablePairTest:testAttackWhileRampingDown_LongInterval() (gas: 204460) StablePairTest:testAttackWhileRampingDown_ShortInterval() (gas: 203865) StablePairTest:testBurn() (gas: 144781) -StablePairTest:testBurn_DiffDecimalPlaces(uint256) (runs: 256, μ: 5305685, ~: 5305189) +StablePairTest:testBurn_DiffDecimalPlaces(uint256) (runs: 256, μ: 5313905, ~: 5313421) StablePairTest:testBurn_LastInvariantUseReserveInsteadOfBalance() (gas: 244234) StablePairTest:testBurn_Reenter() (gas: 54451) StablePairTest:testBurn_SucceedEvenIfMintFeeReverts() (gas: 148228) -StablePairTest:testBurn_WhenRampingA(uint256,uint32) (runs: 256, μ: 403416, ~: 403571) +StablePairTest:testBurn_WhenRampingA(uint256,uint32) (runs: 256, μ: 403415, ~: 403571) StablePairTest:testBurn_Zero() (gas: 81715) -StablePairTest:testFactoryAmpTooHigh() (gas: 339476) -StablePairTest:testFactoryAmpTooLow() (gas: 334433) +StablePairTest:testFactoryAmpTooHigh() (gas: 339491) +StablePairTest:testFactoryAmpTooLow() (gas: 334448) StablePairTest:testGetCurrentA() (gas: 32235) StablePairTest:testMint() (gas: 114452) StablePairTest:testMintFee_CallableBySelf() (gas: 21187) -StablePairTest:testMintFee_DiffPlatformFees(uint256) (runs: 256, μ: 6562810, ~: 6566792) +StablePairTest:testMintFee_DiffPlatformFees(uint256) (runs: 256, μ: 6571071, ~: 6575024) StablePairTest:testMintFee_NotCallableByOthers() (gas: 11708) -StablePairTest:testMintFee_WhenRampingA_PoolBalanced(uint256) (runs: 256, μ: 6723922, ~: 6724092) -StablePairTest:testMintFee_WhenRampingA_PoolUnbalanced(uint256) (runs: 256, μ: 6168192, ~: 6167704) -StablePairTest:testMint_CalculationOverflowInStableMath() (gas: 5137895) +StablePairTest:testMintFee_WhenRampingA_PoolBalanced(uint256) (runs: 256, μ: 6732169, ~: 6732324) +StablePairTest:testMintFee_WhenRampingA_PoolUnbalanced(uint256) (runs: 256, μ: 6176365, ~: 6175936) +StablePairTest:testMint_CalculationOverflowInStableMath() (gas: 5146127) StablePairTest:testMint_NonOptimalProportion() (gas: 147817) StablePairTest:testMint_NonOptimalProportion_ThenBurn() (gas: 308021) -StablePairTest:testMint_OnlyTransferOneToken() (gas: 5075808) +StablePairTest:testMint_OnlyTransferOneToken() (gas: 5084040) StablePairTest:testMint_PlatformFeeOff() (gas: 119011) StablePairTest:testMint_Reenter() (gas: 54285) -StablePairTest:testMint_WhenRampingA(uint256,uint32) (runs: 256, μ: 421064, ~: 421243) +StablePairTest:testMint_WhenRampingA(uint256,uint32) (runs: 256, μ: 421082, ~: 421243) StablePairTest:testOracle_ClampedPrice_NoDiffWithinLimit() (gas: 203232) -StablePairTest:testOracle_CorrectLiquidity(uint32) (runs: 256, μ: 5461344, ~: 5461345) -StablePairTest:testOracle_CorrectPrice(uint32) (runs: 256, μ: 5488927, ~: 5488928) +StablePairTest:testOracle_CorrectLiquidity(uint32) (runs: 256, μ: 5469575, ~: 5469577) +StablePairTest:testOracle_CorrectPrice(uint32) (runs: 256, μ: 5497158, ~: 5497160) StablePairTest:testOracle_LiquidityAtMaximum() (gas: 232903) StablePairTest:testOracle_NoWriteInSameTimestamp() (gas: 219935) StablePairTest:testOracle_OverflowAccLiquidity(uint32) (runs: 256, μ: 114820, ~: 114820) StablePairTest:testOracle_OverflowAccPrice(uint32) (runs: 256, μ: 210612, ~: 213106) -StablePairTest:testOracle_SimplePrices(uint32) (runs: 256, μ: 5492968, ~: 5492969) +StablePairTest:testOracle_SimplePrices(uint32) (runs: 256, μ: 5501200, ~: 5501201) StablePairTest:testOracle_WrapsAroundAfterFull() (gas: 4219163944) StablePairTest:testPlatformFee_Disable() (gas: 336129) StablePairTest:testPlatformFee_DisableReenable() (gas: 546096) @@ -179,25 +179,25 @@ StablePairTest:testRampA_MaxSpeed_Halve() (gas: 26317) StablePairTest:testRampA_OnlyFactory() (gas: 8756) StablePairTest:testRampA_SetAtMaximum() (gas: 25006) StablePairTest:testRampA_SetAtMinimum() (gas: 24984) -StablePairTest:testRampA_SwappingDuringRampingDown(uint256,uint256,uint256,uint256) (runs: 256, μ: 508361, ~: 512087) -StablePairTest:testRampA_SwappingDuringRampingUp(uint256,uint256,uint256,uint256) (runs: 256, μ: 508480, ~: 512122) +StablePairTest:testRampA_SwappingDuringRampingDown(uint256,uint256,uint256,uint256) (runs: 256, μ: 508053, ~: 512088) +StablePairTest:testRampA_SwappingDuringRampingUp(uint256,uint256,uint256,uint256) (runs: 256, μ: 508707, ~: 512122) StablePairTest:testStopRampA() (gas: 33691) -StablePairTest:testStopRampA_Early(uint256,uint32) (runs: 256, μ: 42548, ~: 42721) -StablePairTest:testStopRampA_Late(uint256) (runs: 256, μ: 41087, ~: 41304) +StablePairTest:testStopRampA_Early(uint256,uint32) (runs: 256, μ: 42548, ~: 42659) +StablePairTest:testStopRampA_Late(uint256) (runs: 256, μ: 41061, ~: 41180) StablePairTest:testStopRampA_OnlyFactory() (gas: 8449) StablePairTest:testSwap() (gas: 87312) StablePairTest:testSwap_BetterPerformanceThanConstantProduct() (gas: 128475) -StablePairTest:testSwap_DiffAs(uint256,uint256,uint256) (runs: 256, μ: 5320737, ~: 5321296) -StablePairTest:testSwap_DiffSwapFees(uint256) (runs: 256, μ: 5321356, ~: 5323724) +StablePairTest:testSwap_DiffAs(uint256,uint256,uint256) (runs: 256, μ: 5328935, ~: 5329685) +StablePairTest:testSwap_DiffSwapFees(uint256) (runs: 256, μ: 5329593, ~: 5331956) StablePairTest:testSwap_ExactInExceedUint104() (gas: 79233) StablePairTest:testSwap_ExactOutExceedReserves() (gas: 37622) -StablePairTest:testSwap_IncreasingSwapFees(uint256,uint256,uint256) (runs: 256, μ: 304695, ~: 304679) +StablePairTest:testSwap_IncreasingSwapFees(uint256,uint256,uint256) (runs: 256, μ: 304747, ~: 304679) StablePairTest:testSwap_MinInt256() (gas: 21226) StablePairTest:testSwap_Reenter() (gas: 90208) -StablePairTest:testSwap_Token0ExactOut(uint256) (runs: 256, μ: 122154, ~: 110085) -StablePairTest:testSwap_Token1ExactOut(uint256) (runs: 256, μ: 121811, ~: 110100) -StablePairTest:testSwap_VeryLargeLiquidity(uint256) (runs: 256, μ: 5290877, ~: 5290160) -StablePairTest:testSwap_VerySmallLiquidity(uint256,uint256,uint256) (runs: 256, μ: 5289364, ~: 5288718) +StablePairTest:testSwap_Token0ExactOut(uint256) (runs: 256, μ: 122098, ~: 110085) +StablePairTest:testSwap_Token1ExactOut(uint256) (runs: 256, μ: 122836, ~: 131606) +StablePairTest:testSwap_VeryLargeLiquidity(uint256) (runs: 256, μ: 5299261, ~: 5298392) +StablePairTest:testSwap_VerySmallLiquidity(uint256,uint256,uint256) (runs: 256, μ: 5297653, ~: 5296965) StablePairTest:testSwap_ZeroInput() (gas: 14398) StablePairTest:testWriteObservations() (gas: 243145) StdMathTest:testPercentDelta() (gas: 578) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4e6461b..2f18c4f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,9 +6,6 @@ concurrency: group: ${{github.workflow}}-${{github.ref}} cancel-in-progress: true -env: - FOUNDRY_PROFILE: ci - jobs: build: runs-on: ubuntu-latest diff --git a/foundry.toml b/foundry.toml index ccd4f3d8..a099e1cc 100644 --- a/foundry.toml +++ b/foundry.toml @@ -1,10 +1,13 @@ [profile.default] solc = "0.8.19" #via_ir = true -bytecode_hash = "none" +bytecode_hash = "ipfs" optimizer_runs = 1_000_000 libs = ['lib'] -remappings = ["@openzeppelin/=lib/openzeppelin-contracts/contracts/"] +remappings = [ + "@openzeppelin/=lib/openzeppelin-contracts/contracts/", + "ds-test/=lib/forge-std/lib/ds-test/src/" +] match_path = "test/unit/*.sol" verbosity = 3 fs_permissions = [ diff --git a/script/optimized-deployer-meta b/script/optimized-deployer-meta index 773feed9..28ebdb7b 100644 --- a/script/optimized-deployer-meta +++ b/script/optimized-deployer-meta @@ -1,6 +1,6 @@ { - "constant_product_hash": "0x3fa69a48a7793180bff09630d213ae34a94a8905e82f5aec805db563708a24be", - "factory_hash": "0xb1e9855b7ea822b90a18fbde849307d18e938887df9a89c601da9d3d3877b34b", - "oracle_caller_hash": "0x262458524d9c8928fe7fd7661236b93f6d6a9535182f48fd582a75f18bfbf85f", - "stable_hash": "0x97a4ebb0edd314c12e5535c2b9d5d253037eb8d49710293b5895f2cc3e1e47fb" + "constant_product_hash": "0xde6d8452b97c785350ce9f82090dfb5962933aa5467827310798925c8725013b", + "factory_hash": "0xda6f297f6ce8cf60c5dcf260b6c4178f82c853ae2f16446c064cf6f4e2e4b1ca", + "oracle_caller_hash": "0x1dcb29ca6399be1a5f8a4b3f168a83ff20697718c3d5434ddeeb4a8050fdc615", + "stable_hash": "0x1289a8879d4d1992d308d2a4d8457a5ca8d57e07effe092f2a1f21b0b9b10619" } \ No newline at end of file diff --git a/script/unoptimized-deployer-meta b/script/unoptimized-deployer-meta index 26fb74eb..4346a776 100644 --- a/script/unoptimized-deployer-meta +++ b/script/unoptimized-deployer-meta @@ -1,6 +1,6 @@ { - "constant_product_hash": "0xfac99b82939294308121e7ce750f500b7acaf18d62bc22ca3e54a8999b882fcf", - "factory_hash": "0x418a7308b5a6782877977d1c3000dfda4fa560994a9fca01c4c820d6f889598e", - "oracle_caller_hash": "0x62fc6a5b4ecef14f3dbc069a342221c05473817912414ef348074314902a145a", - "stable_hash": "0x0a1ea51d35c32a55381808acbc3fa304080423ed028a771b7e522d90b370a230" + "constant_product_hash": "0x71f0d385cb55f83e9dd571b118cb5ee391542d27ff471998ea316d3693b21308", + "factory_hash": "0x055e072b9986c94cc4b0f84188217c205895b41faec500b7aed5300e20b29605", + "oracle_caller_hash": "0x6e5b6d511ec5f70fdae7be4b74be5a313df4168f1b50dee9fc571e4414697354", + "stable_hash": "0xa17d9c01054e0d89b5da9d84936c6960c6f82f7981951978cc2aff275d943f5a" } \ No newline at end of file diff --git a/src/ReservoirDeployer.sol b/src/ReservoirDeployer.sol index 46e9262d..e6b54121 100644 --- a/src/ReservoirDeployer.sol +++ b/src/ReservoirDeployer.sol @@ -17,12 +17,12 @@ contract ReservoirDeployer { uint256 public step = 0; // Bytecode hashes. - bytes32 public constant FACTORY_HASH = bytes32(0xb1e9855b7ea822b90a18fbde849307d18e938887df9a89c601da9d3d3877b34b); + bytes32 public constant FACTORY_HASH = bytes32(0xda6f297f6ce8cf60c5dcf260b6c4178f82c853ae2f16446c064cf6f4e2e4b1ca); bytes32 public constant CONSTANT_PRODUCT_HASH = - bytes32(0x3fa69a48a7793180bff09630d213ae34a94a8905e82f5aec805db563708a24be); - bytes32 public constant STABLE_HASH = bytes32(0x97a4ebb0edd314c12e5535c2b9d5d253037eb8d49710293b5895f2cc3e1e47fb); + bytes32(0xde6d8452b97c785350ce9f82090dfb5962933aa5467827310798925c8725013b); + bytes32 public constant STABLE_HASH = bytes32(0x1289a8879d4d1992d308d2a4d8457a5ca8d57e07effe092f2a1f21b0b9b10619); bytes32 public constant ORACLE_CALLER_HASH = - bytes32(0x262458524d9c8928fe7fd7661236b93f6d6a9535182f48fd582a75f18bfbf85f); + bytes32(0x1dcb29ca6399be1a5f8a4b3f168a83ff20697718c3d5434ddeeb4a8050fdc615); // Deployment addresses. GenericFactory public factory;