diff --git a/.changeset/silent-chefs-marry.md b/.changeset/silent-chefs-marry.md new file mode 100644 index 000000000..35fd482ff --- /dev/null +++ b/.changeset/silent-chefs-marry.md @@ -0,0 +1,5 @@ +--- +"@exactly/protocol": patch +--- + +✨ exa: add crosschain mint and burn support diff --git a/.changeset/slick-feet-jump.md b/.changeset/slick-feet-jump.md new file mode 100644 index 000000000..b90f51eb6 --- /dev/null +++ b/.changeset/slick-feet-jump.md @@ -0,0 +1,5 @@ +--- +"@exactly/protocol": patch +--- + +🔒 exa: restrict initialize to proxy admin or construction diff --git a/.gas-snapshot b/.gas-snapshot index b06e25dba..c6f05500f 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -11,69 +11,69 @@ AuditorTest:testBorrowMPValidation() (gas: 250433) AuditorTest:testBorrowMPValidationRevert() (gas: 297339) AuditorTest:testDynamicCloseFactor() (gas: 1721221) AuditorTest:testEnableEnterExitMultipleMarkets() (gas: 1877618) -AuditorTest:testEnableMarket() (gas: 181405) +AuditorTest:testEnableMarket() (gas: 183905) AuditorTest:testEnableMarketAlreadyListed() (gas: 184325) AuditorTest:testEnableMarketAuditorMismatch() (gas: 67401) AuditorTest:testEnableMarketShouldRevertWithInvalidPriceFeed() (gas: 224028) -AuditorTest:testEnterExitMarket() (gas: 350313) +AuditorTest:testEnterExitMarket() (gas: 352813) AuditorTest:testExitMarketOwning() (gas: 280661) -DebtManagerTest:testAllowanceSurplus() (gas: 1014865) +DebtManagerTest:testAllowanceSurplus() (gas: 1022365) DebtManagerTest:testApproveMaliciousMarket() (gas: 50443) DebtManagerTest:testApproveMarket() (gas: 87838) DebtManagerTest:testBalancerFlashloanCallFromDifferentOrigin() (gas: 102422) -DebtManagerTest:testCallReceiveFlashLoanFromAnyAddress() (gas: 88078) -DebtManagerTest:testDeleverage() (gas: 1083400) -DebtManagerTest:testDeleverageHalfPosition() (gas: 1191369) -DebtManagerTest:testDeleverageIncremental() (gas: 1972646) -DebtManagerTest:testDeleverageWithMoreThanBalancerAvailableLiquidity() (gas: 1258035) -DebtManagerTest:testDeleverageWithPartialWithdraw() (gas: 1135921) -DebtManagerTest:testDeleverageWithWithdraw() (gas: 1126376) +DebtManagerTest:testCallReceiveFlashLoanFromAnyAddress() (gas: 90578) +DebtManagerTest:testDeleverage() (gas: 1088400) +DebtManagerTest:testDeleverageHalfPosition() (gas: 1203869) +DebtManagerTest:testDeleverageIncremental() (gas: 1992646) +DebtManagerTest:testDeleverageWithMoreThanBalancerAvailableLiquidity() (gas: 1263035) +DebtManagerTest:testDeleverageWithPartialWithdraw() (gas: 1140921) +DebtManagerTest:testDeleverageWithWithdraw() (gas: 1131376) DebtManagerTest:testFakeMarketDeleverage() (gas: 1271920) DebtManagerTest:testFakeMarketLeverage() (gas: 1310259) DebtManagerTest:testFakeMarketRollFixed() (gas: 2000450) -DebtManagerTest:testFixedRoll() (gas: 1240926) -DebtManagerTest:testFixedRollSameMaturityWithThreeLoops() (gas: 1016421) -DebtManagerTest:testFixedRollWithAccurateBorrowSlippage() (gas: 1764536) -DebtManagerTest:testFixedRollWithAccurateBorrowSlippageWithThreeLoops() (gas: 2805497) -DebtManagerTest:testFixedRollWithAccurateRepaySlippage() (gas: 1764475) -DebtManagerTest:testFixedRollWithAccurateRepaySlippageWithThreeLoops() (gas: 2765051) -DebtManagerTest:testFixedToFloatingRoll() (gas: 1245924) -DebtManagerTest:testFixedToFloatingRollHigherThanAvailableLiquidity() (gas: 1326325) -DebtManagerTest:testFixedToFloatingRollHigherThanAvailableLiquidityWithSlippage() (gas: 2007662) -DebtManagerTest:testFixedToFloatingRollHigherThanAvailableLiquidityWithSlippageWithThreeLoops() (gas: 2694957) -DebtManagerTest:testFixedToFloatingRollWithAccurateSlippage() (gas: 1681065) +DebtManagerTest:testFixedRoll() (gas: 1243426) +DebtManagerTest:testFixedRollSameMaturityWithThreeLoops() (gas: 1018921) +DebtManagerTest:testFixedRollWithAccurateBorrowSlippage() (gas: 1767036) +DebtManagerTest:testFixedRollWithAccurateBorrowSlippageWithThreeLoops() (gas: 2807997) +DebtManagerTest:testFixedRollWithAccurateRepaySlippage() (gas: 1766975) +DebtManagerTest:testFixedRollWithAccurateRepaySlippageWithThreeLoops() (gas: 2767551) +DebtManagerTest:testFixedToFloatingRoll() (gas: 1255924) +DebtManagerTest:testFixedToFloatingRollHigherThanAvailableLiquidity() (gas: 1331325) +DebtManagerTest:testFixedToFloatingRollHigherThanAvailableLiquidityWithSlippage() (gas: 2012662) +DebtManagerTest:testFixedToFloatingRollHigherThanAvailableLiquidityWithSlippageWithThreeLoops() (gas: 2699957) +DebtManagerTest:testFixedToFloatingRollWithAccurateSlippage() (gas: 1683565) DebtManagerTest:testFlashloanFeeGreaterThanZero() (gas: 782096) DebtManagerTest:testFloatingToFixedRoll() (gas: 1165678) -DebtManagerTest:testFloatingToFixedRollHigherThanAvailableLiquidity() (gas: 1349955) -DebtManagerTest:testFloatingToFixedRollHigherThanAvailableLiquidityWithSlippage() (gas: 2121358) -DebtManagerTest:testFloatingToFixedRollHigherThanAvailableLiquidityWithSlippageWithThreePools() (gas: 2815926) +DebtManagerTest:testFloatingToFixedRollHigherThanAvailableLiquidity() (gas: 1352455) +DebtManagerTest:testFloatingToFixedRollHigherThanAvailableLiquidityWithSlippage() (gas: 2128858) +DebtManagerTest:testFloatingToFixedRollHigherThanAvailableLiquidityWithSlippageWithThreePools() (gas: 2818426) DebtManagerTest:testFloatingToFixedRollWithAccurateSlippage() (gas: 1732739) -DebtManagerTest:testFloatingToFixedRollWithAccurateSlippageWithPreviousPosition() (gas: 1952439) -DebtManagerTest:testFuzzRolls(uint8[4],uint8[4],uint256[4],uint40[4],uint8[4]) (runs: 256, μ: 7557791, ~: 7576092) -DebtManagerTest:testLateFixedRoll() (gas: 1442270) -DebtManagerTest:testLateFixedRollWithThreeLoops() (gas: 2031436) -DebtManagerTest:testLateFixedToFloatingRoll() (gas: 1434634) -DebtManagerTest:testLateFixedToFloatingRollWithThreeLoops() (gas: 1997715) -DebtManagerTest:testLeverage() (gas: 744989) -DebtManagerTest:testLeverageIncremental() (gas: 1645713) -DebtManagerTest:testLeverageShouldFailWhenHealthFactorNearOne() (gas: 1453607) -DebtManagerTest:testLeverageWithAlreadyDepositedAmount() (gas: 934471) +DebtManagerTest:testFloatingToFixedRollWithAccurateSlippageWithPreviousPosition() (gas: 1954939) +DebtManagerTest:testFuzzRolls(uint8[4],uint8[4],uint256[4],uint40[4],uint8[4]) (runs: 256, μ: 7911792, ~: 7969725) +DebtManagerTest:testLateFixedRoll() (gas: 1454770) +DebtManagerTest:testLateFixedRollWithThreeLoops() (gas: 2043936) +DebtManagerTest:testLateFixedToFloatingRoll() (gas: 1449634) +DebtManagerTest:testLateFixedToFloatingRollWithThreeLoops() (gas: 2012715) +DebtManagerTest:testLeverage() (gas: 749989) +DebtManagerTest:testLeverageIncremental() (gas: 1665713) +DebtManagerTest:testLeverageShouldFailWhenHealthFactorNearOne() (gas: 1458607) +DebtManagerTest:testLeverageWithAlreadyDepositedAmount() (gas: 941971) DebtManagerTest:testLeverageWithInvalidBalancerVault() (gas: 4042887) -DebtManagerTest:testLeverageWithMoreThanBalancerAvailableLiquidity() (gas: 1120430) +DebtManagerTest:testLeverageWithMoreThanBalancerAvailableLiquidity() (gas: 1125430) DebtManagerTest:testLeverageWithNegativePrincipal() (gas: 1337277) DebtManagerTest:testLeverageWithPartialNegativePrincipal() (gas: 1506311) -DebtManagerTest:testMockBalancerVault() (gas: 6412198) -DebtManagerTest:testPartialDeleverageWithWithdrawAndNewRatio() (gas: 1151222) -DebtManagerTest:testPartialDeleverageWithWithdrawKeepingRatio() (gas: 1151227) -DebtManagerTest:testPartialFixedRoll() (gas: 1261164) -DebtManagerTest:testPartialFixedToFloatingRoll() (gas: 1217310) -DebtManagerTest:testPartialLateFixedRoll() (gas: 1467724) -DebtManagerTest:testPartialLateFixedToFloatingRoll() (gas: 1466888) -DebtManagerTest:testPermit2AndLeverage() (gas: 873115) -DebtManagerTest:testPermitAndDeleverage() (gas: 1226263) -DebtManagerTest:testPermitAndLeverage() (gas: 974537) -DebtManagerTest:testPermitAndRollFloatingToFixed() (gas: 1338662) -DebtManagerTest:testPermitAndTransferLeverage() (gas: 904899) +DebtManagerTest:testMockBalancerVault() (gas: 6414698) +DebtManagerTest:testPartialDeleverageWithWithdrawAndNewRatio() (gas: 1156222) +DebtManagerTest:testPartialDeleverageWithWithdrawKeepingRatio() (gas: 1156227) +DebtManagerTest:testPartialFixedRoll() (gas: 1263664) +DebtManagerTest:testPartialFixedToFloatingRoll() (gas: 1219810) +DebtManagerTest:testPartialLateFixedRoll() (gas: 1480224) +DebtManagerTest:testPartialLateFixedToFloatingRoll() (gas: 1481888) +DebtManagerTest:testPermit2AndLeverage() (gas: 885615) +DebtManagerTest:testPermitAndDeleverage() (gas: 1231263) +DebtManagerTest:testPermitAndLeverage() (gas: 992037) +DebtManagerTest:testPermitAndRollFloatingToFixed() (gas: 1348662) +DebtManagerTest:testPermitAndTransferLeverage() (gas: 914899) DebtPreviewerTest:testDeleverageRatesSameAsset() (gas: 1045747) DebtPreviewerTest:testLeverageRatesCrossAsset() (gas: 778919) DebtPreviewerTest:testLeverageRatesSameAsset() (gas: 488430) @@ -81,69 +81,92 @@ DebtPreviewerTest:testLeverageRatesWithNativeBorrow() (gas: 415439) DebtPreviewerTest:testLeverageRatesWithNegativeNativeResult() (gas: 415524) DebtPreviewerTest:testLeverageRatesZeroPrincipalCrossAsset() (gas: 710976) DebtPreviewerTest:testLeverageRatesZeroPrincipalSameAsset() (gas: 418324) -DebtPreviewerTest:testPreviewDeleverageSameAsset() (gas: 2708003) -DebtPreviewerTest:testPreviewEmptyLeverage() (gas: 344138) -DebtPreviewerTest:testPreviewLeverage() (gas: 998209) +DebtPreviewerTest:testPreviewDeleverageSameAsset() (gas: 2713003) +DebtPreviewerTest:testPreviewEmptyLeverage() (gas: 346638) +DebtPreviewerTest:testPreviewLeverage() (gas: 1000709) DebtPreviewerTest:testPreviewLeverageBalancerAvailableLiquidity() (gas: 351622) -DebtPreviewerTest:testPreviewLeverageSameAsset() (gas: 1404996) -DebtPreviewerTest:testPreviewLeverageSameAssetNegativePrincipal() (gas: 2371347) -DebtPreviewerTest:testPreviewLeverageSameAssetPartialNegativePrincipal() (gas: 2020640) +DebtPreviewerTest:testPreviewLeverageSameAsset() (gas: 1407496) +DebtPreviewerTest:testPreviewLeverageSameAssetNegativePrincipal() (gas: 2383847) +DebtPreviewerTest:testPreviewLeverageSameAssetPartialNegativePrincipal() (gas: 2028140) DebtPreviewerTest:testPreviewLeverageSameUSDCAssetMaxRatioMultipleCollateralAndDebt() (gas: 2862639) DebtPreviewerTest:testPreviewLeverageSameUSDCAssetWithDeposit() (gas: 2798718) DebtPreviewerTest:testPreviewLeverageSameWETHAssetMaxRatioMultipleCollateralAndDebt() (gas: 2933847) DebtPreviewerTest:testPreviewLeverageSameWETHAssetMultipleCollateralAndDebtWithMinHealthFactor() (gas: 2933875) -DebtPreviewerTest:testPreviewMaxRatioWithdrawWithSameAssetLeverage() (gas: 1187320) +DebtPreviewerTest:testPreviewMaxRatioWithdrawWithSameAssetLeverage() (gas: 1189820) DebtPreviewerTest:testPreviewSameAssetInvalidLeverageShouldCapRatio() (gas: 1229662) DebtRollerTest:test_receiveFlashLoan_reverts_whenUnauthorizedFlashLoaner() (gas: 39801) DebtRollerTest:test_rollFixed_reverts_whenInvalidOperation() (gas: 51027) DebtRollerTest:test_rollFixed_reverts_whenNotMarket() (gas: 49047) -DebtRollerTest:test_rollFixed_rolls() (gas: 1093354) -DebtRollerTest:test_rollFixed_rolls_partial() (gas: 1132551) -EscrowedEXATest:testCancelExternalStreams() (gas: 381074) -EscrowedEXATest:testCancelExternalStreamsWithesEXACancel() (gas: 1134924) -EscrowedEXATest:testCancelShouldDeleteReserves() (gas: 767352) -EscrowedEXATest:testCancelShouldGiveReservesBack() (gas: 1168305) -EscrowedEXATest:testCancelTwiceShouldRevert() (gas: 723599) -EscrowedEXATest:testCancelWithInvalidAccount() (gas: 545011) -EscrowedEXATest:testFakeTokenWithesEXARecipient() (gas: 1201005) +DebtRollerTest:test_rollFixed_rolls() (gas: 1100854) +DebtRollerTest:test_rollFixed_rolls_partial() (gas: 1140051) +EXATest:test_burn_burnsAndEmitsCrosschainBurn() (gas: 149890) +EXATest:test_burn_reverts_whenCallerLacksBridgeRole() (gas: 69255) +EXATest:test_crosschainBurn_burnsAndEmitsCrosschainBurn() (gas: 149888) +EXATest:test_crosschainBurn_reverts_whenCallerLacksBridgeRole() (gas: 69268) +EXATest:test_crosschainMint_mintsAndEmitsCrosschainMint() (gas: 103300) +EXATest:test_crosschainMint_reverts_whenCallerLacksBridgeRole() (gas: 69277) +EXATest:test_initialize2_grantsAdminRole() (gas: 30379) +EXATest:test_initialize2_reverts_whenAdminIsZeroAddress() (gas: 5661254) +EXATest:test_initialize2_reverts_whenCalledBeforeInitialize() (gas: 3313044) +EXATest:test_initialize2_reverts_whenCalledByNotProxyAdmin() (gas: 3406504) +EXATest:test_initialize2_reverts_whenCalledTwice() (gas: 2304030) +EXATest:test_initialize_reverts_whenCalledByNotProxyAdmin() (gas: 3297925) +EXATest:test_initialize_reverts_whenCalledOnImplementation() (gas: 2274821) +EXATest:test_initialize_reverts_whenCalledTwice() (gas: 38964) +EXATest:test_initialize_setsNameSymbolAndSupply() (gas: 55624) +EXATest:test_initialize_succeeds_whenProxyAlreadyDeployedAndUpgradedWithCall() (gas: 5682459) +EXATest:test_initialize_totalSupplyIsZero_whenNotOptimism() (gas: 3410455) +EXATest:test_mint_mintsAndEmitsCrosschainMint() (gas: 103345) +EXATest:test_mint_reverts_whenCallerLacksBridgeRole() (gas: 69342) +EXATest:test_supportsInterface_returnsFalse_forInvalidInterface() (gas: 15791) +EXATest:test_supportsInterface_returnsTrue_forIAccessControl() (gas: 15793) +EXATest:test_supportsInterface_returnsTrue_forIERC165() (gas: 15793) +EXATest:test_supportsInterface_returnsTrue_forIERC7802() (gas: 15661) +EscrowedEXATest:testCancelExternalStreams() (gas: 398267) +EscrowedEXATest:testCancelExternalStreamsWithesEXACancel() (gas: 1137424) +EscrowedEXATest:testCancelShouldDeleteReserves() (gas: 801977) +EscrowedEXATest:testCancelShouldGiveReservesBack() (gas: 1229121) +EscrowedEXATest:testCancelTwiceShouldRevert() (gas: 748504) +EscrowedEXATest:testCancelWithInvalidAccount() (gas: 573278) +EscrowedEXATest:testFakeTokenWithesEXARecipient() (gas: 1203505) EscrowedEXATest:testGrantTransferrerRoleAsAdmin() (gas: 74807) -EscrowedEXATest:testMint() (gas: 187548) -EscrowedEXATest:testMintMoreThanBalance() (gas: 41491) -EscrowedEXATest:testMintToAnother() (gas: 189756) +EscrowedEXATest:testMint() (gas: 192860) +EscrowedEXATest:testMintMoreThanBalance() (gas: 46423) +EscrowedEXATest:testMintToAnother() (gas: 195068) EscrowedEXATest:testMintZero() (gas: 35366) -EscrowedEXATest:testRedeemAsNotRedeemer() (gas: 329073) -EscrowedEXATest:testRedeemAsRedeemer() (gas: 256283) -EscrowedEXATest:testRedeemAsRedeemerToAnother() (gas: 269058) +EscrowedEXATest:testRedeemAsNotRedeemer() (gas: 344155) +EscrowedEXATest:testRedeemAsRedeemer() (gas: 271700) +EscrowedEXATest:testRedeemAsRedeemerToAnother() (gas: 291835) EscrowedEXATest:testSetReserveRatioAsAdmin() (gas: 54918) EscrowedEXATest:testSetReserveRatioAsNotAdmin() (gas: 67189) EscrowedEXATest:testSetReserveRatioAsZero() (gas: 37264) EscrowedEXATest:testSetVestingPeriodAsAdmin() (gas: 55030) EscrowedEXATest:testSetVestingPeriodAsNotAdmin() (gas: 67179) -EscrowedEXATest:testTransferToNotTransferrer() (gas: 213681) -EscrowedEXATest:testTransferToTransferrer() (gas: 302944) -EscrowedEXATest:testVest() (gas: 512279) -EscrowedEXATest:testVestDisagreement() (gas: 295084) -EscrowedEXATest:testVestToAnother() (gas: 647280) -EscrowedEXATest:testVestToAnotherAndCancel() (gas: 742429) -EscrowedEXATest:testVestWithPermitReserve() (gas: 728759) -EscrowedEXATest:testVestZero() (gas: 55469) -EscrowedEXATest:testWithdrawFromStreamAndGetReserveBack() (gas: 638887) +EscrowedEXATest:testTransferToNotTransferrer() (gas: 218993) +EscrowedEXATest:testTransferToTransferrer() (gas: 308256) +EscrowedEXATest:testVest() (gas: 545406) +EscrowedEXATest:testVestDisagreement() (gas: 305396) +EscrowedEXATest:testVestToAnother() (gas: 692635) +EscrowedEXATest:testVestToAnotherAndCancel() (gas: 772194) +EscrowedEXATest:testVestWithPermitReserve() (gas: 789988) +EscrowedEXATest:testVestZero() (gas: 60469) +EscrowedEXATest:testWithdrawFromStreamAndGetReserveBack() (gas: 684250) EscrowedEXATest:testWithdrawFromUnknownStream() (gas: 1111375) -EscrowedEXATest:testWithdrawMaxFromMultipleStreams() (gas: 1708565) -EscrowedEXATest:testWithdrawMaxShouldGiveReserveBackWhenDepleted() (gas: 579958) -EscrowedEXATest:testWithdrawMaxWithInvalidSender() (gas: 512048) +EscrowedEXATest:testWithdrawMaxFromMultipleStreams() (gas: 1781140) +EscrowedEXATest:testWithdrawMaxShouldGiveReserveBackWhenDepleted() (gas: 613461) +EscrowedEXATest:testWithdrawMaxWithInvalidSender() (gas: 528095) FirewallTest:test_allow_allows_whenAllower() (gas: 69731) -FirewallTest:test_allow_allows_whenDisallowedAndNotOriginalAllower() (gas: 224684) -FirewallTest:test_allow_disallows_whenAllower() (gas: 110010) +FirewallTest:test_allow_allows_whenDisallowedAndNotOriginalAllower() (gas: 227184) +FirewallTest:test_allow_disallows_whenAllower() (gas: 112510) FirewallTest:test_allow_emitsAllowed() (gas: 63695) FirewallTest:test_allow_reverts_whenAlreadyAllowed() (gas: 94165) -FirewallTest:test_allow_reverts_whenNotAllower() (gas: 61301) -FirewallTest:test_allow_reverts_whenNotOriginalAllower() (gas: 169161) -FirewallTest:test_disallow_disallows_whenAllowedAndOriginalAllower() (gas: 114406) -FirewallTest:test_disallow_disallows_whenAllowedAndOriginalAllowerRoleIsRevoked() (gas: 212133) -FirewallTest:test_disallow_reverts_whenAllowedAndNotOriginalAllower() (gas: 169138) +FirewallTest:test_allow_reverts_whenNotAllower() (gas: 63801) +FirewallTest:test_allow_reverts_whenNotOriginalAllower() (gas: 171661) +FirewallTest:test_disallow_disallows_whenAllowedAndOriginalAllower() (gas: 116906) +FirewallTest:test_disallow_disallows_whenAllowedAndOriginalAllowerRoleIsRevoked() (gas: 217133) +FirewallTest:test_disallow_reverts_whenAllowedAndNotOriginalAllower() (gas: 171638) FlashLoanAdapterTest:test_consumeAdapter() (gas: 2334825) -FlashLoanAdapterTest:test_consumeAdapter_withWToken() (gas: 8852715) +FlashLoanAdapterTest:test_consumeAdapter_withWToken() (gas: 8860215) FlashLoanAdapterTest:test_flashLoan_reverts_whenAmountsLengthNotOne() (gas: 32678) FlashLoanAdapterTest:test_flashLoan_reverts_whenTokensLengthNotOne() (gas: 32591) FlashLoanAdapterTest:test_setWToken_emitsWTokenSet() (gas: 80696) @@ -151,47 +174,47 @@ FlashLoanAdapterTest:test_setWToken_reverts_whenNotAdmin() (gas: 66649) FlashLoanAdapterTest:test_setWToken_sets_whenAdmin() (gas: 82048) InstallmentsRouterTest:testAmountsLength() (gas: 36806) InstallmentsRouterTest:testBorrowETHToAnotherReceiver() (gas: 801220) -InstallmentsRouterTest:testBorrowETHWithPermit() (gas: 1231679) -InstallmentsRouterTest:testBorrowRouter() (gas: 688777) -InstallmentsRouterTest:testBorrowToAnotherReceiver() (gas: 712659) +InstallmentsRouterTest:testBorrowETHWithPermit() (gas: 1239179) +InstallmentsRouterTest:testBorrowRouter() (gas: 691277) +InstallmentsRouterTest:testBorrowToAnotherReceiver() (gas: 715159) InstallmentsRouterTest:testBorrowUnwrappedETH() (gas: 768423) -InstallmentsRouterTest:testBorrowWithPermit() (gas: 1365087) +InstallmentsRouterTest:testBorrowWithPermit() (gas: 1375087) InstallmentsRouterTest:testFakeMarket() (gas: 47946) InstallmentsRouterTest:testInsufficientMaxRepay() (gas: 676442) InstallmentsRouterTest:testMaxRepay() (gas: 676436) InstallmentsRouterTest:testMissingMarketWETH() (gas: 818663) InstallmentsRouterTest:testMoreBorrowsThanMaxPools() (gas: 680308) -IntegrationPreviewerTest:test_borrowLimit() (gas: 2063942) -IntegrationPreviewerTest:test_fixedRepayAssets_afterMaturity() (gas: 667580) -IntegrationPreviewerTest:test_fixedRepayAssets_beforeMaturity() (gas: 575057) -IntegrationPreviewerTest:test_fixedRepayAssets_maxUintAfterMaturity() (gas: 652302) -IntegrationPreviewerTest:test_fixedRepayAssets_maxUintBeforeMaturity() (gas: 559802) -IntegrationPreviewerTest:test_fixedRepayPosition_afterMaturity() (gas: 668131) -IntegrationPreviewerTest:test_fixedRepayPosition_beforeMaturity() (gas: 574991) -IntegrationPreviewerTest:test_fixedRepayPosition_maxUint() (gas: 76968) +IntegrationPreviewerTest:test_borrowLimit() (gas: 2066442) +IntegrationPreviewerTest:test_fixedRepayAssets_afterMaturity() (gas: 672580) +IntegrationPreviewerTest:test_fixedRepayAssets_beforeMaturity() (gas: 580057) +IntegrationPreviewerTest:test_fixedRepayAssets_maxUintAfterMaturity() (gas: 657302) +IntegrationPreviewerTest:test_fixedRepayAssets_maxUintBeforeMaturity() (gas: 564802) +IntegrationPreviewerTest:test_fixedRepayPosition_afterMaturity() (gas: 673131) +IntegrationPreviewerTest:test_fixedRepayPosition_beforeMaturity() (gas: 579991) +IntegrationPreviewerTest:test_fixedRepayPosition_maxUint() (gas: 79468) IntegrationPreviewerTest:test_fixedRepayPosition_saturatedFallback() (gas: 63069) -IntegrationPreviewerTest:test_healthFactor() (gas: 461379) -IntegrationPreviewerTest:test_previewDeposit_(uint256) (runs: 256, μ: 1586173, ~: 1588725) -IntegrationPreviewerTest:test_previewHealthFactor() (gas: 5780369) -IntegrationPreviewerTest:test_previewWithdraw_(uint256) (runs: 256, μ: 1648122, ~: 1650407) +IntegrationPreviewerTest:test_healthFactor() (gas: 463879) +IntegrationPreviewerTest:test_previewDeposit_(uint256) (runs: 256, μ: 1590152, ~: 1594077) +IntegrationPreviewerTest:test_previewHealthFactor() (gas: 5805369) +IntegrationPreviewerTest:test_previewWithdraw_(uint256) (runs: 256, μ: 1649487, ~: 1653259) InterestRateModelTest:testFixedBorrowRate() (gas: 2088868) InterestRateModelTest:testFixedRateRevertAlreadyMatured() (gas: 2083135) -InterestRateModelTest:testFixedRateRevertUtilizationExceeded() (gas: 2094703) +InterestRateModelTest:testFixedRateRevertUtilizationExceeded() (gas: 2097203) InterestRateModelTest:testFloatingBorrowRate() (gas: 2082456) -InterestRateModelTest:testFuzzFixedRateGrowth(uint256,uint256,uint256,uint256) (runs: 256, μ: 2105060, ~: 2102577) -InterestRateModelTest:testFuzzFixedRateTimeSensitivity(uint256,uint256,uint256) (runs: 256, μ: 2114613, ~: 2114661) -InterestRateModelTest:testFuzzReferenceLegacyRateFixed(uint32,uint256,uint256[2],uint256[2],uint256,uint256,uint256) (runs: 256, μ: 12931149, ~: 13128025) -InterestRateModelTest:testFuzzReferenceRateFixed(uint256,uint256,uint256,uint256,uint256,uint256,(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,int256,uint256,uint256)) (runs: 256, μ: 2381679, ~: 2383626) -InterestRateModelTest:testFuzzReferenceRateFloating(uint256,uint256,(uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 256, μ: 2319008, ~: 2319892) -InterestRateModelTest:testMinTimeToMaturity() (gas: 2104732) +InterestRateModelTest:testFuzzFixedRateGrowth(uint256,uint256,uint256,uint256) (runs: 256, μ: 2109043, ~: 2105195) +InterestRateModelTest:testFuzzFixedRateTimeSensitivity(uint256,uint256,uint256) (runs: 256, μ: 2116971, ~: 2117161) +InterestRateModelTest:testFuzzReferenceLegacyRateFixed(uint32,uint256,uint256[2],uint256[2],uint256,uint256,uint256) (runs: 256, μ: 12879393, ~: 13130335) +InterestRateModelTest:testFuzzReferenceRateFixed(uint256,uint256,uint256,uint256,uint256,uint256,(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,int256,uint256,uint256)) (runs: 256, μ: 2384148, ~: 2386756) +InterestRateModelTest:testFuzzReferenceRateFloating(uint256,uint256,(uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 256, μ: 2324223, ~: 2324917) +InterestRateModelTest:testMinTimeToMaturity() (gas: 2107232) InterestRateModelTest:testRevertMaxUtilizationLowerThanWad() (gas: 268402) -MarketTest:testAccountLiquidityAdjustedDebt() (gas: 651835) -MarketTest:testAccountsFixedConsolidated() (gas: 2057338) -MarketTest:testAccountsFixedConsolidatedWhenClearBadDebt() (gas: 2139815) +MarketTest:testAccountLiquidityAdjustedDebt() (gas: 654335) +MarketTest:testAccountsFixedConsolidated() (gas: 2084838) +MarketTest:testAccountsFixedConsolidatedWhenClearBadDebt() (gas: 2147315) MarketTest:testAccountsFixedConsolidatedWhenSenderNotOwner() (gas: 973482) -MarketTest:testAccountsFixedConsolidatedWithPartialRepayAndWithdraw() (gas: 1458629) -MarketTest:testAccrueEarningsBeforeLiquidation() (gas: 1565167) -MarketTest:testAnotherUserRedeemWhenOwnerHasShortfall() (gas: 906513) +MarketTest:testAccountsFixedConsolidatedWithPartialRepayAndWithdraw() (gas: 1478629) +MarketTest:testAccrueEarningsBeforeLiquidation() (gas: 1572667) +MarketTest:testAnotherUserRedeemWhenOwnerHasShortfall() (gas: 909013) MarketTest:testAnotherUserWithdrawWhenOwnerHasShortfall() (gas: 855191) MarketTest:testBorrowAfterFreezing() (gas: 493283) MarketTest:testBorrowAtMaturity() (gas: 545852) @@ -204,22 +227,22 @@ MarketTest:testBorrowFromFreeLunchShouldNotRevertWithFloatingFullUtilization() ( MarketTest:testBorrowWhenFrozen() (gas: 92956) MarketTest:testBorrowWithZeroAssets() (gas: 39654) MarketTest:testCappedLiquidation() (gas: 1354623) -MarketTest:testChargeTreasuryToEarlyWithdraws() (gas: 1438763) -MarketTest:testChargeTreasuryToFixedBorrows() (gas: 1794144) -MarketTest:testClearBadDebtAvoidingFixedBorrowsIfAccumulatorLower() (gas: 2446569) +MarketTest:testChargeTreasuryToEarlyWithdraws() (gas: 1453763) +MarketTest:testChargeTreasuryToFixedBorrows() (gas: 1814144) +MarketTest:testClearBadDebtAvoidingFixedBorrowsIfAccumulatorLower() (gas: 2456569) MarketTest:testClearBadDebtBeforeMaturity() (gas: 2497898) MarketTest:testClearBadDebtCalledByAccount() (gas: 34965) -MarketTest:testClearBadDebtEmptiesUnassignedEarnings() (gas: 2801016) -MarketTest:testClearBadDebtExactlyRepaysFixedBorrowWithAccumulatorAmount() (gas: 2187484) -MarketTest:testClearBadDebtPartiallyRepaysEachFixedBorrow() (gas: 2145267) -MarketTest:testClearBadDebtPartiallyRepaysFloatingDebt() (gas: 2513328) -MarketTest:testClearBadDebtShouldAccrueAccumulatedEarningsBeforeSpreadingLosses() (gas: 2318248) -MarketTest:testClearBadDebtWithEmptyAccumulatorShouldNotRevert() (gas: 1119049) -MarketTest:testClearMaturity() (gas: 1845999) -MarketTest:testCollectTreasuryFreeLunchToEarlyWithdraws() (gas: 2058572) -MarketTest:testCollectTreasuryFreeLunchToEarlyWithdrawsWithZeroFees() (gas: 642571) -MarketTest:testCollectTreasuryFreeLunchToFixedBorrows() (gas: 2065002) -MarketTest:testCollectTreasuryFreeLunchToFixedBorrowsWithZeroFees() (gas: 856810) +MarketTest:testClearBadDebtEmptiesUnassignedEarnings() (gas: 2808516) +MarketTest:testClearBadDebtExactlyRepaysFixedBorrowWithAccumulatorAmount() (gas: 2197484) +MarketTest:testClearBadDebtPartiallyRepaysEachFixedBorrow() (gas: 2150267) +MarketTest:testClearBadDebtPartiallyRepaysFloatingDebt() (gas: 2523328) +MarketTest:testClearBadDebtShouldAccrueAccumulatedEarningsBeforeSpreadingLosses() (gas: 2335748) +MarketTest:testClearBadDebtWithEmptyAccumulatorShouldNotRevert() (gas: 1129049) +MarketTest:testClearMaturity() (gas: 1853499) +MarketTest:testCollectTreasuryFreeLunchToEarlyWithdraws() (gas: 2081072) +MarketTest:testCollectTreasuryFreeLunchToEarlyWithdrawsWithZeroFees() (gas: 650071) +MarketTest:testCollectTreasuryFreeLunchToFixedBorrows() (gas: 2087502) +MarketTest:testCollectTreasuryFreeLunchToFixedBorrowsWithZeroFees() (gas: 864310) MarketTest:testCrossMaturityLiquidation() (gas: 2877810) MarketTest:testDepositAfterFreezing() (gas: 258096) MarketTest:testDepositAtMaturity() (gas: 238025) @@ -227,43 +250,43 @@ MarketTest:testDepositAtMaturityAfterFreezing() (gas: 311812) MarketTest:testDepositAtMaturityWhenFrozen() (gas: 92960) MarketTest:testDepositAtMaturityWithZeroAssets() (gas: 39804) MarketTest:testDepositDisagreement() (gas: 73930) -MarketTest:testDepositShouldUpdateFlexibleBorrowVariables() (gas: 786881) +MarketTest:testDepositShouldUpdateFlexibleBorrowVariables() (gas: 799381) MarketTest:testDepositToSmartPool() (gas: 183924) MarketTest:testDepositWhenFrozen() (gas: 176182) -MarketTest:testDistributeMultipleAccumulatedEarnings() (gas: 1706997) -MarketTest:testDistributionOfLossesShouldReduceFromFloatingBackupBorrowedAccordingly() (gas: 6797467) -MarketTest:testEarlyRepayLiquidationUnassignedEarnings() (gas: 2575541) -MarketTest:testEarlyRepaymentWithExcessiveAmountOfFees() (gas: 3546865) +MarketTest:testDistributeMultipleAccumulatedEarnings() (gas: 1736997) +MarketTest:testDistributionOfLossesShouldReduceFromFloatingBackupBorrowedAccordingly() (gas: 6804967) +MarketTest:testEarlyRepayLiquidationUnassignedEarnings() (gas: 2588041) +MarketTest:testEarlyRepaymentWithExcessiveAmountOfFees() (gas: 3549365) MarketTest:testEarlyWithdrawFromFreeLunchShouldNotRevertWithFloatingFullUtilization() (gas: 1092307) -MarketTest:testEmergencyAdminRole() (gas: 360784) +MarketTest:testEmergencyAdminRole() (gas: 373284) MarketTest:testEmitFrozen() (gas: 90632) MarketTest:testFixedBorrowFailingWhenFlexibleBorrowAccruesDebt() (gas: 1585458) MarketTest:testFixedBorrowRateToMaturity() (gas: 608954) -MarketTest:testFixedOperationsUpdateFloatingDebt() (gas: 986670) +MarketTest:testFixedOperationsUpdateFloatingDebt() (gas: 994170) MarketTest:testFlexibleBorrow() (gas: 461018) -MarketTest:testFlexibleBorrowAccountingDebt() (gas: 735069) -MarketTest:testFlexibleBorrowChargingDebtToTreasury() (gas: 842949) +MarketTest:testFlexibleBorrowAccountingDebt() (gas: 755069) +MarketTest:testFlexibleBorrowChargingDebtToTreasury() (gas: 847949) MarketTest:testFlexibleBorrowExceedingReserve() (gas: 882480) MarketTest:testFlexibleBorrowExceedingReserveIncludingFixedBorrow() (gas: 1315881) MarketTest:testFlexibleBorrowExceedingReserveWithNewDebt() (gas: 1005367) MarketTest:testFlexibleBorrowFromAnotherUserSubtractsAllowance() (gas: 480194) MarketTest:testFlexibleBorrowFromAnotherUserWithAllowance() (gas: 460773) MarketTest:testFlexibleBorrowFromAnotherUserWithoutAllowance() (gas: 254455) -MarketTest:testFrontRunSmartPoolEarningsDistributionWithBigPenaltyRepayment() (gas: 1656344) +MarketTest:testFrontRunSmartPoolEarningsDistributionWithBigPenaltyRepayment() (gas: 1681344) MarketTest:testFullPause() (gas: 6091640) MarketTest:testInitiallyUnfrozen() (gas: 15498) MarketTest:testInsufficientProtocolLiquidity() (gas: 1990764) MarketTest:testLiquidateAndChargeIncentiveForLenders() (gas: 2554518) -MarketTest:testLiquidateAndDistributeLosses() (gas: 3509701) +MarketTest:testLiquidateAndDistributeLosses() (gas: 3522201) MarketTest:testLiquidateAndSeizeExactAmountWithDustAsCollateral() (gas: 3077406) MarketTest:testLiquidateAndSeizeFromEmptyCollateral() (gas: 1092010) -MarketTest:testLiquidateAndSubtractLossesFromAccumulator() (gas: 4237950) -MarketTest:testLiquidateFlexibleAndFixedBorrowPositionsInSingleCall() (gas: 2777836) -MarketTest:testLiquidateFlexibleBorrow() (gas: 2769325) +MarketTest:testLiquidateAndSubtractLossesFromAccumulator() (gas: 4260450) +MarketTest:testLiquidateFlexibleAndFixedBorrowPositionsInSingleCall() (gas: 2792836) +MarketTest:testLiquidateFlexibleBorrow() (gas: 2771825) MarketTest:testLiquidateFlexibleBorrowChargeLendersAssetsToLiquidator() (gas: 1201683) -MarketTest:testLiquidateFlexibleBorrowConsideringDebtOverTime() (gas: 1267456) +MarketTest:testLiquidateFlexibleBorrowConsideringDebtOverTime() (gas: 1277456) MarketTest:testLiquidateLeavingDustAsCollateral() (gas: 4001162) -MarketTest:testLiquidateTransferRepayAssetsBeforeSeize() (gas: 1212226) +MarketTest:testLiquidateTransferRepayAssetsBeforeSeize() (gas: 1222226) MarketTest:testLiquidateUpdateFloatingDebt() (gas: 1981194) MarketTest:testLiquidateWhenFrozen() (gas: 1236974) MarketTest:testLiquidateWithTwoUnitsAsMaxAssets() (gas: 1810095) @@ -273,59 +296,59 @@ MarketTest:testLiquidationResultingInZeroCollateralAndZeroDebt() (gas: 2193917) MarketTest:testMaturityInsufficientProtocolLiquidity() (gas: 1569501) MarketTest:testMultipleBorrowsForMultipleAssets() (gas: 2483954631) MarketTest:testMultipleDepositsToSmartPool() (gas: 930641) -MarketTest:testMultipleFixedBorrowsRepays() (gas: 1466453) +MarketTest:testMultipleFixedBorrowsRepays() (gas: 1468953) MarketTest:testMultipleLiquidationSameUser() (gas: 3597935) MarketTest:testNotEnteredMarketShouldNotBeSeized() (gas: 11372318) -MarketTest:testOnlyAdminCanFreezeUnfreeze() (gas: 225742) -MarketTest:testOperationsShouldUpdateFloatingAssetsAverage() (gas: 1631589) +MarketTest:testOnlyAdminCanFreezeUnfreeze() (gas: 228242) +MarketTest:testOperationsShouldUpdateFloatingAssetsAverage() (gas: 1649089) MarketTest:testOperationsWithBtcWbtcRate() (gas: 11075335) MarketTest:testOperationsWithStEthAsset() (gas: 10964717) -MarketTest:testPausable() (gas: 178062) -MarketTest:testPauserRole() (gas: 85844) -MarketTest:testPreviewOperationsWithSmartPoolCorrectlyAccountingEarnings() (gas: 2250165) +MarketTest:testPausable() (gas: 183062) +MarketTest:testPauserRole() (gas: 88344) +MarketTest:testPreviewOperationsWithSmartPoolCorrectlyAccountingEarnings() (gas: 2265165) MarketTest:testRepayAtMaturity() (gas: 639073) MarketTest:testRepayDisagreement() (gas: 640423) -MarketTest:testRepayFlexibleBorrow() (gas: 1236214) +MarketTest:testRepayFlexibleBorrow() (gas: 1251214) MarketTest:testRepayWhenFrozen() (gas: 537282) MarketTest:testRoundingDownAssetsToValidateShortfallWhenTransferring() (gas: 9587078) MarketTest:testRoundingDownAssetsToValidateShortfallWhenTransferringFrom() (gas: 9642490) -MarketTest:testRoundingDownAssetsWhenTransferingFromAnAccountWithoutShortfall() (gas: 1093612) -MarketTest:testRoundingDownAssetsWhenTransferingWithAnAccountWithoutShortfall() (gas: 1035655) +MarketTest:testRoundingDownAssetsWhenTransferingFromAnAccountWithoutShortfall() (gas: 1096112) +MarketTest:testRoundingDownAssetsWhenTransferingWithAnAccountWithoutShortfall() (gas: 1038155) MarketTest:testRoundingUpAllowanceWhenBorrowingAtMaturity() (gas: 902063) MarketTest:testRoundingUpAllowanceWhenWithdrawingAtMaturity() (gas: 885105) -MarketTest:testSetDampSpeedFactorShouldUpdateFloatingAssetsAverage() (gas: 408461) -MarketTest:testSetEarningsAccumulatorSmoothFactorShouldDistributeEarnings() (gas: 900654) -MarketTest:testSetInterestRateModelShouldUpdateFloatingDebt() (gas: 2851171) -MarketTest:testSetInterestRateModelWithAddressZeroShouldNotUpdateFloatingDebt() (gas: 2637682) -MarketTest:testShareValueNotDecreasingAfterDeposit() (gas: 794559) -MarketTest:testShareValueNotDecreasingWhenMintingToTreasury() (gas: 843742) +MarketTest:testSetDampSpeedFactorShouldUpdateFloatingAssetsAverage() (gas: 410961) +MarketTest:testSetEarningsAccumulatorSmoothFactorShouldDistributeEarnings() (gas: 905654) +MarketTest:testSetInterestRateModelShouldUpdateFloatingDebt() (gas: 2853671) +MarketTest:testSetInterestRateModelWithAddressZeroShouldNotUpdateFloatingDebt() (gas: 2642682) +MarketTest:testShareValueNotDecreasingAfterDeposit() (gas: 797059) +MarketTest:testShareValueNotDecreasingWhenMintingToTreasury() (gas: 846242) MarketTest:testSingleFloatingBorrow() (gas: 419475) MarketTest:testSingleFloatingRepay() (gas: 486680) -MarketTest:testSmartPoolEarningsDistribution() (gas: 1227663) -MarketTest:testSmartPoolSharesDoNotAccountUnassignedEarningsFromMoreThanOneIntervalPastMaturities() (gas: 672825) -MarketTest:testSumDebtPlusEffectsShouldntRoundUpWhenWithdrawing() (gas: 1066446) +MarketTest:testSmartPoolEarningsDistribution() (gas: 1235163) +MarketTest:testSmartPoolSharesDoNotAccountUnassignedEarningsFromMoreThanOneIntervalPastMaturities() (gas: 680325) +MarketTest:testSumDebtPlusEffectsShouldntRoundUpWhenWithdrawing() (gas: 1068946) MarketTest:testTotalAssetsProjectingBackupEarningsCorrectly() (gas: 594214) -MarketTest:testTotalAssetsProjectingFloatingDebtCorrectly() (gas: 834359) -MarketTest:testUpdateAccumulatedEarningsFactorToZero() (gas: 1767042) -MarketTest:testUpdateFloatingAssetsAverageWhenDepositingAndBorrowingContinuously() (gas: 414407) -MarketTest:testUpdateFloatingAssetsAverageWhenDepositingRightBeforeBorrow() (gas: 738760) -MarketTest:testUpdateFloatingAssetsAverageWhenDepositingRightBeforeEarlyWithdraw() (gas: 692745) -MarketTest:testUpdateFloatingAssetsAverageWhenDepositingSomeSecondsBeforeBorrow() (gas: 1044342) -MarketTest:testUpdateFloatingAssetsAverageWhenWithdrawingRightBeforeBorrow() (gas: 755485) -MarketTest:testUpdateFloatingAssetsAverageWhenWithdrawingRightBeforeEarlyWithdraw() (gas: 709448) -MarketTest:testUpdateFloatingAssetsAverageWhenWithdrawingSomeSecondsBeforeBorrow() (gas: 514311) -MarketTest:testUpdateFloatingAssetsAverageWithDampSpeedDown() (gas: 431794) -MarketTest:testUpdateFloatingAssetsAverageWithDampSpeedUp() (gas: 300894) +MarketTest:testTotalAssetsProjectingFloatingDebtCorrectly() (gas: 844359) +MarketTest:testUpdateAccumulatedEarningsFactorToZero() (gas: 1789542) +MarketTest:testUpdateFloatingAssetsAverageWhenDepositingAndBorrowingContinuously() (gas: 421907) +MarketTest:testUpdateFloatingAssetsAverageWhenDepositingRightBeforeBorrow() (gas: 741260) +MarketTest:testUpdateFloatingAssetsAverageWhenDepositingRightBeforeEarlyWithdraw() (gas: 695245) +MarketTest:testUpdateFloatingAssetsAverageWhenDepositingSomeSecondsBeforeBorrow() (gas: 1059342) +MarketTest:testUpdateFloatingAssetsAverageWhenWithdrawingRightBeforeBorrow() (gas: 757985) +MarketTest:testUpdateFloatingAssetsAverageWhenWithdrawingRightBeforeEarlyWithdraw() (gas: 711948) +MarketTest:testUpdateFloatingAssetsAverageWhenWithdrawingSomeSecondsBeforeBorrow() (gas: 539311) +MarketTest:testUpdateFloatingAssetsAverageWithDampSpeedDown() (gas: 444294) +MarketTest:testUpdateFloatingAssetsAverageWithDampSpeedUp() (gas: 318394) MarketTest:testUpdateFloatingDebtBeforeSettingTreasury() (gas: 115197) MarketTest:testWithdrawAtMaturity() (gas: 342219) -MarketTest:testWithdrawFromSmartPool() (gas: 287496) -MarketTest:testWithdrawShouldUpdateFlexibleBorrowVariables() (gas: 929365) +MarketTest:testWithdrawFromSmartPool() (gas: 289996) +MarketTest:testWithdrawShouldUpdateFlexibleBorrowVariables() (gas: 941865) MarketTest:testWithdrawWhenFrozen() (gas: 327797) MarketTest:test_deposit_deposits_whenTotalSupplyLowerThanMaxSupply() (gas: 224770) MarketTest:test_deposit_reverts_whenTotalSupplyHigherThanMaxSupply() (gas: 160870) MarketTest:test_setMaxSupply_emits_maxSupplySet() (gas: 44325) MarketTest:test_setMaxSupply_reverts_whenNotAdmin() (gas: 65179) -MarketTest:test_setMaxSupply_sets_whenAdmin() (gas: 63879) +MarketTest:test_setMaxSupply_sets_whenAdmin() (gas: 66379) PauserTest:testPauseProtocolFromRando() (gas: 32819) PauserTest:testPauseProtocolWhenMarketsArePaused() (gas: 186975) PauserTest:testPauseProtocolWhenMarketsAreUnpaused() (gas: 147173) @@ -337,43 +360,43 @@ PoolLibTest:testAtomicDepositBorrowRepayWithdraw() (gas: 45922) PoolLibTest:testBackupBorrow() (gas: 33624) PoolLibTest:testEarningsAccrual() (gas: 38952) PoolLibTest:testEarningsDistribution() (gas: 32679) -PoolLibTest:testFuzzAddRemoveAll(uint8[12]) (runs: 256, μ: 79824, ~: 79933) +PoolLibTest:testFuzzAddRemoveAll(uint8[12]) (runs: 256, μ: 105431, ~: 107158) PoolLibTest:testMaturityRangeLimit() (gas: 7866) -PoolLibTest:testMaturityRangeTooWide() (gas: 9156) -PreviewerTest:testAccountsReturningAccurateAmounts() (gas: 1676539) -PreviewerTest:testAccountsReturningUtilizationForDifferentMaturities() (gas: 5196017) -PreviewerTest:testAccountsWithAccountOnlyDeposit() (gas: 1042598) -PreviewerTest:testAccountsWithAccountThatHasBalances() (gas: 2728470) -PreviewerTest:testAccountsWithEmptyAccount() (gas: 708126) -PreviewerTest:testAccountsWithIntermediateOperationsReturningAccurateAmounts() (gas: 22736171) -PreviewerTest:testActualTimeBeforeStartDistributionRewards() (gas: 8690691) +PoolLibTest:testMaturityRangeTooWide() (gas: 11656) +PreviewerTest:testAccountsReturningAccurateAmounts() (gas: 1686539) +PreviewerTest:testAccountsReturningUtilizationForDifferentMaturities() (gas: 5278517) +PreviewerTest:testAccountsWithAccountOnlyDeposit() (gas: 1045098) +PreviewerTest:testAccountsWithAccountThatHasBalances() (gas: 2755970) +PreviewerTest:testAccountsWithEmptyAccount() (gas: 713126) +PreviewerTest:testAccountsWithIntermediateOperationsReturningAccurateAmounts() (gas: 22751171) +PreviewerTest:testActualTimeBeforeStartDistributionRewards() (gas: 8693191) PreviewerTest:testEmptyExactly() (gas: 6258134) -PreviewerTest:testExactlyReturningInterestRateModelData() (gas: 717924) -PreviewerTest:testFixedAvailableLiquidityProjectingNewFloatingDebt() (gas: 16811086) -PreviewerTest:testFixedPoolsA() (gas: 24417398) -PreviewerTest:testFixedPoolsChangingMaturityInTime() (gas: 1996786) -PreviewerTest:testFixedPoolsRatesAndUtilizations() (gas: 18743921) -PreviewerTest:testFixedPoolsWithFloatingAssetsAverage() (gas: 21883596) -PreviewerTest:testFlexibleAvailableLiquidity() (gas: 21926951) -PreviewerTest:testFlexibleBorrowSharesAndAssets() (gas: 5149249) -PreviewerTest:testFloatingAvailableLiquidityProjectingNewFloatingDebt() (gas: 15993480) +PreviewerTest:testExactlyReturningInterestRateModelData() (gas: 737924) +PreviewerTest:testFixedAvailableLiquidityProjectingNewFloatingDebt() (gas: 16818586) +PreviewerTest:testFixedPoolsA() (gas: 24434898) +PreviewerTest:testFixedPoolsChangingMaturityInTime() (gas: 2001786) +PreviewerTest:testFixedPoolsRatesAndUtilizations() (gas: 18753921) +PreviewerTest:testFixedPoolsWithFloatingAssetsAverage() (gas: 22413596) +PreviewerTest:testFlexibleAvailableLiquidity() (gas: 21941951) +PreviewerTest:testFlexibleBorrowSharesAndAssets() (gas: 5159249) +PreviewerTest:testFloatingAvailableLiquidityProjectingNewFloatingDebt() (gas: 15998480) PreviewerTest:testFloatingRateAndUtilization() (gas: 1236195) PreviewerTest:testJustUpdatedRewardRatesShouldStillReturnRate() (gas: 7784292) -PreviewerTest:testMaxBorrowAssetsCapacity() (gas: 2887924) -PreviewerTest:testMaxBorrowAssetsCapacityForAccountWithShortfall() (gas: 14262427) -PreviewerTest:testMaxBorrowAssetsCapacityPerMarket() (gas: 16613812) -PreviewerTest:testOraclePriceReturningAccurateValues() (gas: 13039861) -PreviewerTest:testPreviewBorrowAtAllMaturitiesReturningAccurateAmount() (gas: 4744854) +PreviewerTest:testMaxBorrowAssetsCapacity() (gas: 2892924) +PreviewerTest:testMaxBorrowAssetsCapacityForAccountWithShortfall() (gas: 14264927) +PreviewerTest:testMaxBorrowAssetsCapacityPerMarket() (gas: 16618812) +PreviewerTest:testOraclePriceReturningAccurateValues() (gas: 13042361) +PreviewerTest:testPreviewBorrowAtAllMaturitiesReturningAccurateAmount() (gas: 4752354) PreviewerTest:testPreviewBorrowAtMaturityReturningAccurateAmount() (gas: 705049) -PreviewerTest:testPreviewBorrowAtMaturityReturningAccurateAmountWithIntermediateOperations() (gas: 2247716) -PreviewerTest:testPreviewBorrowAtMaturityReturningAccurateUtilization() (gas: 694587) +PreviewerTest:testPreviewBorrowAtMaturityReturningAccurateAmountWithIntermediateOperations() (gas: 2250216) +PreviewerTest:testPreviewBorrowAtMaturityReturningAccurateUtilization() (gas: 717087) PreviewerTest:testPreviewBorrowAtMaturityWithFiveUnits() (gas: 456782) PreviewerTest:testPreviewBorrowAtMaturityWithInvalidMaturity() (gas: 262341) PreviewerTest:testPreviewBorrowAtMaturityWithMaturedMaturity() (gas: 49802) PreviewerTest:testPreviewBorrowAtMaturityWithOneUnit() (gas: 456804) PreviewerTest:testPreviewBorrowAtMaturityWithSameTimestamp() (gas: 49742) PreviewerTest:testPreviewBorrowAtMaturityWithZeroAmount() (gas: 251595) -PreviewerTest:testPreviewDepositAtAllMaturitiesReturningAccurateAmounts() (gas: 2803179) +PreviewerTest:testPreviewDepositAtAllMaturitiesReturningAccurateAmounts() (gas: 2805679) PreviewerTest:testPreviewDepositAtMaturityReturningAccurateAmount() (gas: 925086) PreviewerTest:testPreviewDepositAtMaturityReturningAccurateAmountWithIntermediateOperations() (gas: 1745698) PreviewerTest:testPreviewDepositAtMaturityWithEmptyMaturity() (gas: 48556) @@ -384,8 +407,8 @@ PreviewerTest:testPreviewDepositAtMaturityWithOneUnit() (gas: 660704) PreviewerTest:testPreviewDepositAtMaturityWithSameTimestamp() (gas: 51101) PreviewerTest:testPreviewDepositAtMaturityWithZeroAmount() (gas: 660729) PreviewerTest:testPreviewRepayAtMaturityLastAccrualIsMaturity() (gas: 1557059) -PreviewerTest:testPreviewRepayAtMaturityReturningAccurateAmount() (gas: 1377277) -PreviewerTest:testPreviewRepayAtMaturityReturningAccurateAmountWithIntermediateOperations() (gas: 1825670) +PreviewerTest:testPreviewRepayAtMaturityReturningAccurateAmount() (gas: 1379777) +PreviewerTest:testPreviewRepayAtMaturityReturningAccurateAmountWithIntermediateOperations() (gas: 1833170) PreviewerTest:testPreviewRepayAtMaturityWithEmptyMaturity() (gas: 35162) PreviewerTest:testPreviewRepayAtMaturityWithEmptyMaturityAndZeroAmount() (gas: 35170) PreviewerTest:testPreviewRepayAtMaturityWithInvalidMaturity() (gas: 35215) @@ -393,9 +416,9 @@ PreviewerTest:testPreviewRepayAtMaturityWithMaturedMaturity() (gas: 674465) PreviewerTest:testPreviewRepayAtMaturityWithOneUnit() (gas: 667162) PreviewerTest:testPreviewRepayAtMaturityWithSameTimestamp() (gas: 664285) PreviewerTest:testPreviewRepayAtMaturityWithZeroAmount() (gas: 667165) -PreviewerTest:testPreviewValueInFixedOperations() (gas: 2864799) -PreviewerTest:testPreviewWithdrawAtMaturityReturningAccurateAmount() (gas: 455363) -PreviewerTest:testPreviewWithdrawAtMaturityReturningAccurateAmountWithIntermediateOperations() (gas: 1710210) +PreviewerTest:testPreviewValueInFixedOperations() (gas: 2882299) +PreviewerTest:testPreviewWithdrawAtMaturityReturningAccurateAmount() (gas: 457863) +PreviewerTest:testPreviewWithdrawAtMaturityReturningAccurateAmountWithIntermediateOperations() (gas: 1717710) PreviewerTest:testPreviewWithdrawAtMaturityWithEmptyMaturity() (gas: 35184) PreviewerTest:testPreviewWithdrawAtMaturityWithEmptyMaturityAndZeroAmount() (gas: 35182) PreviewerTest:testPreviewWithdrawAtMaturityWithFiveUnits() (gas: 329675) @@ -405,18 +428,18 @@ PreviewerTest:testPreviewWithdrawAtMaturityWithOneUnit() (gas: 329686) PreviewerTest:testPreviewWithdrawAtMaturityWithSameTimestamp() (gas: 303363) PreviewerTest:testPreviewWithdrawAtMaturityWithZeroAmount() (gas: 329691) PreviewerTest:testReserveFactor() (gas: 716070) -PreviewerTest:testReturnRewardAssetUsdPrice() (gas: 7456178) +PreviewerTest:testReturnRewardAssetUsdPrice() (gas: 7458678) PreviewerTest:testRewardRatesMaturities() (gas: 7582626) PreviewerTest:testRewardsRateAfterDistributionEnd() (gas: 8075397) -PreviewerTest:testRewardsRateOnlyWithFixedBorrows() (gas: 7511438) -PreviewerTest:testRewardsRateWithDifferentRewardLengths() (gas: 22763061) -PreviewerTest:testRewardsRateWithMarketWithDifferentDecimals() (gas: 22467840) -PreviewerTest:testRewardsRateX() (gas: 9162734) +PreviewerTest:testRewardsRateOnlyWithFixedBorrows() (gas: 7513938) +PreviewerTest:testRewardsRateWithDifferentRewardLengths() (gas: 22765561) +PreviewerTest:testRewardsRateWithMarketWithDifferentDecimals() (gas: 22477840) +PreviewerTest:testRewardsRateX() (gas: 9180234) PriceFeedDoubleTest:testPriceFeedDoubleReturningAccurateDecimals() (gas: 617669) -PriceFeedDoubleTest:testPriceFeedDoubleReturningPrice() (gas: 71193) +PriceFeedDoubleTest:testPriceFeedDoubleReturningPrice() (gas: 76193) PriceFeedDoubleTest:testPriceFeedDoubleWithActualOnChainValues() (gas: 85326) -PriceFeedDoubleTest:testPriceFeedDoubleWithNegativePriceShouldRevert() (gas: 207681) -PriceFeedDoubleTest:testPriceFeedDoubleWithUsdPriceFeed() (gas: 496175) +PriceFeedDoubleTest:testPriceFeedDoubleWithNegativePriceShouldRevert() (gas: 212681) +PriceFeedDoubleTest:testPriceFeedDoubleWithUsdPriceFeed() (gas: 498675) PriceFeedPoolTest:testPriceFeedPoolReturningPrice() (gas: 40917) PriceFeedPoolTest:testPriceFeedPoolReturningPriceWithToken0False() (gas: 2181230) PriceFeedPoolTest:testPriceFeedPoolWithAllDifferentDecimals() (gas: 2159319) @@ -424,89 +447,89 @@ PriceFeedPoolTest:testPriceFeedPoolWithAllDifferentDecimalsWithToken0False() (ga PriceFeedPoolTest:testPriceFeedPoolWithDifferentDecimals() (gas: 2159343) PriceFeedPoolTest:testPriceFeedPoolWithDifferentDecimalsWithToken0False() (gas: 2164427) PriceFeedWrapperTest:testPriceFeedWrapperReturningPrice() (gas: 19161) -PriceFeedWrapperTest:testPriceFeedWrapperReturningPriceAfterRebase() (gas: 53427) +PriceFeedWrapperTest:testPriceFeedWrapperReturningPriceAfterRebase() (gas: 55927) PriceFeedWrapperTest:testPriceFeedWrapperWithActualOnChainValues() (gas: 84176) -PriceFeedWrapperTest:testPriceFeedWrapperWithNegativePriceShouldRevert() (gas: 206122) +PriceFeedWrapperTest:testPriceFeedWrapperWithNegativePriceShouldRevert() (gas: 211122) PriceFeedWrapperTest:testPriceFeedWrapperWithUsdPriceFeed() (gas: 1291515) RatePreviewerTest:testPreviewRate() (gas: 1215583) RatePreviewerTest:testPreviewRateAfterFloatingDepositAndBorrow() (gas: 1411833) RatePreviewerTest:testSnapshot() (gas: 1654022) -RatePreviewerTest:testSnapshotWithSignificantElapsedTime() (gas: 1709086) -RewardsControllerTest:testAccountKeeperClaimOnBehalfOf() (gas: 1438201) -RewardsControllerTest:testAccrueRewardsForWholeDistributionPeriod() (gas: 1148462) -RewardsControllerTest:testAccrueRewardsWithBadDebtClearingOfFixedBorrow() (gas: 3592188) -RewardsControllerTest:testAccrueRewardsWithFixedWithdraw() (gas: 1365945) +RatePreviewerTest:testSnapshotWithSignificantElapsedTime() (gas: 1724086) +RewardsControllerTest:testAccountKeeperClaimOnBehalfOf() (gas: 1443201) +RewardsControllerTest:testAccrueRewardsForWholeDistributionPeriod() (gas: 1150962) +RewardsControllerTest:testAccrueRewardsWithBadDebtClearingOfFixedBorrow() (gas: 3594688) +RewardsControllerTest:testAccrueRewardsWithFixedWithdraw() (gas: 1368445) RewardsControllerTest:testAccrueRewardsWithRepayOfBorrowBalance() (gas: 1608611) RewardsControllerTest:testAccrueRewardsWithRepayOfFixedBorrowBalance() (gas: 1877865) RewardsControllerTest:testAccrueRewardsWithSeizeOfAllDepositShares() (gas: 2045516) -RewardsControllerTest:testAfterDistributionPeriodEnd() (gas: 1564487) -RewardsControllerTest:testAllClaimableOnlyWithUSDCOps() (gas: 1014309) -RewardsControllerTest:testAllClaimableUSDCWithAnotherAccountInPool() (gas: 4617731) -RewardsControllerTest:testAllClaimableUSDCWithDeposit() (gas: 4100081) -RewardsControllerTest:testAllClaimableUSDCWithFixedDeposit() (gas: 3165631) -RewardsControllerTest:testAllClaimableUSDCWithFloatingBorrow() (gas: 3170735) -RewardsControllerTest:testAllClaimableUSDCWithFloatingRefund() (gas: 2620762) -RewardsControllerTest:testAllClaimableUSDCWithFloatingRepay() (gas: 2653401) -RewardsControllerTest:testAllClaimableUSDCWithMint() (gas: 2899302) -RewardsControllerTest:testAllClaimableUSDCWithRedeem() (gas: 2622469) -RewardsControllerTest:testAllClaimableUSDCWithTransfer() (gas: 4460259) -RewardsControllerTest:testAllClaimableUSDCWithTransferFrom() (gas: 4115544) -RewardsControllerTest:testAllClaimableUSDCWithWithdraw() (gas: 2664536) -RewardsControllerTest:testAllClaimableWETH() (gas: 2805188) -RewardsControllerTest:testAllClaimableWithMaturedFixedPool() (gas: 1716347) -RewardsControllerTest:testAllClaimableWithMultipleMarketOps() (gas: 2655090) -RewardsControllerTest:testAllClaimableWithTimeElapsedZero() (gas: 1865747) +RewardsControllerTest:testAfterDistributionPeriodEnd() (gas: 1574487) +RewardsControllerTest:testAllClaimableOnlyWithUSDCOps() (gas: 1019309) +RewardsControllerTest:testAllClaimableUSDCWithAnotherAccountInPool() (gas: 4805231) +RewardsControllerTest:testAllClaimableUSDCWithDeposit() (gas: 4352581) +RewardsControllerTest:testAllClaimableUSDCWithFixedDeposit() (gas: 3333131) +RewardsControllerTest:testAllClaimableUSDCWithFloatingBorrow() (gas: 3338235) +RewardsControllerTest:testAllClaimableUSDCWithFloatingRefund() (gas: 2708262) +RewardsControllerTest:testAllClaimableUSDCWithFloatingRepay() (gas: 2740901) +RewardsControllerTest:testAllClaimableUSDCWithMint() (gas: 3066802) +RewardsControllerTest:testAllClaimableUSDCWithRedeem() (gas: 2709969) +RewardsControllerTest:testAllClaimableUSDCWithTransfer() (gas: 4697759) +RewardsControllerTest:testAllClaimableUSDCWithTransferFrom() (gas: 4348044) +RewardsControllerTest:testAllClaimableUSDCWithWithdraw() (gas: 2754536) +RewardsControllerTest:testAllClaimableWETH() (gas: 2937688) +RewardsControllerTest:testAllClaimableWithMaturedFixedPool() (gas: 1726347) +RewardsControllerTest:testAllClaimableWithMultipleMarketOps() (gas: 2660090) +RewardsControllerTest:testAllClaimableWithTimeElapsedZero() (gas: 1878247) RewardsControllerTest:testAllRewards() (gas: 229783) -RewardsControllerTest:testClaim() (gas: 1363112) -RewardsControllerTest:testClaimAll() (gas: 2834389) -RewardsControllerTest:testClaimFixedDepositRewards() (gas: 1499541) +RewardsControllerTest:testClaim() (gas: 1365612) +RewardsControllerTest:testClaimAll() (gas: 2839389) +RewardsControllerTest:testClaimFixedDepositRewards() (gas: 1502041) RewardsControllerTest:testClaimMarketWithoutRewards() (gas: 1386822) -RewardsControllerTest:testClaimWithAllClaimableArgs() (gas: 3083538) -RewardsControllerTest:testClaimWithNotEnabledRewardAsset() (gas: 1518576) -RewardsControllerTest:testConfigSettingNewStartWithOnGoingDistributionShouldNotUpdate() (gas: 448446) +RewardsControllerTest:testClaimWithAllClaimableArgs() (gas: 3086038) +RewardsControllerTest:testClaimWithNotEnabledRewardAsset() (gas: 1521076) +RewardsControllerTest:testConfigSettingNewStartWithOnGoingDistributionShouldNotUpdate() (gas: 450946) RewardsControllerTest:testConfigWithDistributionNotYetStartedShouldNotFail() (gas: 599108) -RewardsControllerTest:testConfigWithTransitionFactorHigherOrEqThanCap() (gas: 108658) -RewardsControllerTest:testConfigWithZeroDepositAllocationWeightFactorShouldRevert() (gas: 73166) -RewardsControllerTest:testDifferentDistributionTimeForDifferentRewards() (gas: 2399258) -RewardsControllerTest:testEmitAccrue() (gas: 1425878) -RewardsControllerTest:testEmitClaimRewards() (gas: 1131735) +RewardsControllerTest:testConfigWithTransitionFactorHigherOrEqThanCap() (gas: 111158) +RewardsControllerTest:testConfigWithZeroDepositAllocationWeightFactorShouldRevert() (gas: 75666) +RewardsControllerTest:testDifferentDistributionTimeForDifferentRewards() (gas: 2404258) +RewardsControllerTest:testEmitAccrue() (gas: 1428378) +RewardsControllerTest:testEmitClaimRewards() (gas: 1134235) RewardsControllerTest:testEmitConfigUpdate() (gas: 439022) -RewardsControllerTest:testEmitIndexUpdate() (gas: 1508001) -RewardsControllerTest:testLastUndistributed() (gas: 2015324) -RewardsControllerTest:testLastUpdateAfterDistributionPeriodEnd() (gas: 1596151) +RewardsControllerTest:testEmitIndexUpdate() (gas: 1513001) +RewardsControllerTest:testLastUndistributed() (gas: 2017824) +RewardsControllerTest:testLastUpdateAfterDistributionPeriodEnd() (gas: 1608651) RewardsControllerTest:testNotKeeperClaimOnBehalfOf() (gas: 184609) RewardsControllerTest:testOperationAfterDistributionEnded() (gas: 722627) -RewardsControllerTest:testOperationsBeforeDistributionStart() (gas: 1694057) -RewardsControllerTest:testPermitClaim() (gas: 1395720) -RewardsControllerTest:testSetDistributionConfigWithDifferentDecimals() (gas: 14888698) +RewardsControllerTest:testOperationsBeforeDistributionStart() (gas: 1696557) +RewardsControllerTest:testPermitClaim() (gas: 1403220) +RewardsControllerTest:testSetDistributionConfigWithDifferentDecimals() (gas: 14898698) RewardsControllerTest:testSetDistributionOperationShouldUpdateIndex() (gas: 144923) -RewardsControllerTest:testSetDistributionWithOnGoingMarketOperations() (gas: 1372950) -RewardsControllerTest:testSetHigherTotalDistribution() (gas: 1629959) +RewardsControllerTest:testSetDistributionWithOnGoingMarketOperations() (gas: 1377950) +RewardsControllerTest:testSetHigherTotalDistribution() (gas: 1637459) RewardsControllerTest:testSetKeeperOnlyAdminRole() (gas: 117586) -RewardsControllerTest:testSetLowerAndEqualDistributionPeriodThanCurrentTimestampShouldRevert() (gas: 1238003) -RewardsControllerTest:testSetLowerAndEqualTotalDistributionThanReleasedShouldRevert() (gas: 1231071) -RewardsControllerTest:testSetLowerDistributionPeriod() (gas: 1980770) -RewardsControllerTest:testSetLowerDistributionPeriodAndLowerTotalDistribution() (gas: 1983583) -RewardsControllerTest:testSetLowerTotalDistribution() (gas: 1629982) -RewardsControllerTest:testSetNewDistributionPeriod() (gas: 2330682) -RewardsControllerTest:testSetNewDistributionPeriodAfterDistributionEnds() (gas: 1317186) -RewardsControllerTest:testSetNewTargetDebt() (gas: 1502548) -RewardsControllerTest:testSetNewTargetDebtAfterDistributionEnds() (gas: 1541019) -RewardsControllerTest:testSetNewTargetDebtWithClaimOnlyAtEnd() (gas: 1285576) -RewardsControllerTest:testSetNewTreasuryFeeShouldImpactAllocation() (gas: 773599) -RewardsControllerTest:testSetTargetDebtMultipleTimes() (gas: 2280955) -RewardsControllerTest:testSetTargetDebtMultipleTimesAfterEnd() (gas: 2239709) -RewardsControllerTest:testSetTotalDistributionMultipleTimes() (gas: 1746965) -RewardsControllerTest:testTriggerHandleBorrowHookBeforeUpdatingFloatingDebt() (gas: 2167959) -RewardsControllerTest:testUpdateConfig() (gas: 1437377) +RewardsControllerTest:testSetLowerAndEqualDistributionPeriodThanCurrentTimestampShouldRevert() (gas: 1240503) +RewardsControllerTest:testSetLowerAndEqualTotalDistributionThanReleasedShouldRevert() (gas: 1233571) +RewardsControllerTest:testSetLowerDistributionPeriod() (gas: 1990770) +RewardsControllerTest:testSetLowerDistributionPeriodAndLowerTotalDistribution() (gas: 1993583) +RewardsControllerTest:testSetLowerTotalDistribution() (gas: 1637482) +RewardsControllerTest:testSetNewDistributionPeriod() (gas: 2343182) +RewardsControllerTest:testSetNewDistributionPeriodAfterDistributionEnds() (gas: 1327186) +RewardsControllerTest:testSetNewTargetDebt() (gas: 1507548) +RewardsControllerTest:testSetNewTargetDebtAfterDistributionEnds() (gas: 1546019) +RewardsControllerTest:testSetNewTargetDebtWithClaimOnlyAtEnd() (gas: 1290576) +RewardsControllerTest:testSetNewTreasuryFeeShouldImpactAllocation() (gas: 776099) +RewardsControllerTest:testSetTargetDebtMultipleTimes() (gas: 2290955) +RewardsControllerTest:testSetTargetDebtMultipleTimesAfterEnd() (gas: 2249709) +RewardsControllerTest:testSetTotalDistributionMultipleTimes() (gas: 1756965) +RewardsControllerTest:testTriggerHandleBorrowHookBeforeUpdatingFloatingDebt() (gas: 2170459) +RewardsControllerTest:testUpdateConfig() (gas: 1449877) RewardsControllerTest:testUpdateIndexesWithUtilizationEqualToOne() (gas: 1206579) RewardsControllerTest:testUpdateIndexesWithUtilizationHigherThanOne() (gas: 1301162) -RewardsControllerTest:testUpdateWithTotalDebtZeroShouldUpdateLastUndistributed() (gas: 740638) -RewardsControllerTest:testUtilizationEqualZero() (gas: 920592) +RewardsControllerTest:testUpdateWithTotalDebtZeroShouldUpdateLastUndistributed() (gas: 753138) +RewardsControllerTest:testUtilizationEqualZero() (gas: 923092) RewardsControllerTest:testWithTwelveFixedPools() (gas: 6259440) -RewardsControllerTest:testWithdrawAllRewardBalance() (gas: 86314) +RewardsControllerTest:testWithdrawAllRewardBalance() (gas: 91314) RewardsControllerTest:testWithdrawOnlyAdminRole() (gas: 121375) -RewardsControllerTest:testWithdrawUndistributed() (gas: 1701700) +RewardsControllerTest:testWithdrawUndistributed() (gas: 1704200) RewardsControllerTest:testWithdrawUndistributedOnlyAdminRole() (gas: 180933) RewardsControllerTest:testWithdrawUndistributedOnlyEndedDistribution() (gas: 155130) StakedEXATest:invariantAvgIndexUpOnly() (runs: 10, calls: 5000, reverts: 0) @@ -516,121 +539,121 @@ StakedEXATest:invariantNoDuplicatedReward() (runs: 10, calls: 5000, reverts: 0) StakedEXATest:invariantRewardsUpOnly() (runs: 10, calls: 5000, reverts: 0) StakedEXATest:invariantShareValueIsOne() (runs: 10, calls: 5000, reverts: 0) StakedEXATest:testAlreadyListedError() (gas: 43677) -StakedEXATest:testAvgIndex(uint256[3],uint256[2]) (runs: 256, μ: 1261001, ~: 1308868) -StakedEXATest:testAvgStartTime(uint256[3],uint256[2]) (runs: 256, μ: 1196579, ~: 1244446) -StakedEXATest:testBalanceOfDeposit(uint80) (runs: 256, μ: 332499, ~: 337769) -StakedEXATest:testBalanceOfWithdraw(uint256) (runs: 256, μ: 77126, ~: 77129) -StakedEXATest:testCanChangeRewardsDurationWhenDisabled() (gas: 176954) -StakedEXATest:testClaimAfterHarvest() (gas: 923317) -StakedEXATest:testClaimAndUnstake() (gas: 1613368) -StakedEXATest:testClaimAndWithdrawAfterRefTime() (gas: 1034613) -StakedEXATest:testClaimBeforeFirstHarvest() (gas: 523052) -StakedEXATest:testDepositClaimsRewardsToReceiver() (gas: 1119263) -StakedEXATest:testDepositEvent(uint256) (runs: 256, μ: 333057, ~: 332792) -StakedEXATest:testDepositShouldClaim(uint256[2],uint32) (runs: 256, μ: 825672, ~: 750679) -StakedEXATest:testDepositToAnotherWithAllowance() (gas: 375746) -StakedEXATest:testDepositToAnotherWithoutAllowanceShouldFail() (gas: 122441) -StakedEXATest:testDepositWithdrawAvgStartTimeAndIndex(uint256[3],uint256,uint256[5]) (runs: 256, μ: 1826910, ~: 1889709) -StakedEXATest:testEarnedWithTime(uint256) (runs: 256, μ: 76067, ~: 76314) -StakedEXATest:testEmergencyAdminCanPauseNotUnpause() (gas: 170029) -StakedEXATest:testFinishDistributionEmitEvent() (gas: 241372) -StakedEXATest:testFinishDistributionLetsClaimUnclaimed() (gas: 1766366) -StakedEXATest:testFinishDistributionStopsEmission() (gas: 1659347) -StakedEXATest:testFinishDistributionThatAlreadyFinished() (gas: 452920) -StakedEXATest:testFinishDistributionTransfersRemainingToSavings() (gas: 144195) -StakedEXATest:testGrantRevokeEmergencyAdmin() (gas: 115324) -StakedEXATest:testGrantRevokePauser() (gas: 115336) -StakedEXATest:testHandlerClaim(uint8) (runs: 256, μ: 465308, ~: 465308) -StakedEXATest:testHandlerDeposit(uint80) (runs: 256, μ: 1177424, ~: 1194001) -StakedEXATest:testHandlerHarvest(uint64) (runs: 256, μ: 401631, ~: 406280) -StakedEXATest:testHandlerNotifyRewardAmount(uint64) (runs: 256, μ: 139595, ~: 131627) -StakedEXATest:testHandlerSetDuration(uint32) (runs: 256, μ: 190887, ~: 214334) -StakedEXATest:testHandlerSetMarket() (gas: 139553) -StakedEXATest:testHandlerWithdraw(uint256) (runs: 256, μ: 94949, ~: 94952) -StakedEXATest:testHarvestAmountWithReducedAllowance() (gas: 184589) -StakedEXATest:testHarvestEffectOnRewardData() (gas: 167660) -StakedEXATest:testHarvestEmitsRewardAmountNotified() (gas: 152144) -StakedEXATest:testHarvestFailDoesntDoSDeposits() (gas: 353008) -StakedEXATest:testHarvestWhenFinished() (gas: 319452) -StakedEXATest:testHarvestX() (gas: 173449) -StakedEXATest:testHarvestZero() (gas: 245433) -StakedEXATest:testInitialValues() (gas: 173983) -StakedEXATest:testInsufficientBalanceError(uint256) (runs: 256, μ: 63998, ~: 64147) -StakedEXATest:testMaxRewardsGasConsumption() (gas: 144827992) -StakedEXATest:testMultipleClaimsVsOne() (gas: 21669178) -StakedEXATest:testMultipleHarvests() (gas: 281577) -StakedEXATest:testNoRewardsAfterPeriod(uint256) (runs: 256, μ: 1782239, ~: 1776439) +StakedEXATest:testAvgIndex(uint256[3],uint256[2]) (runs: 256, μ: 1294619, ~: 1319773) +StakedEXATest:testAvgStartTime(uint256[3],uint256[2]) (runs: 256, μ: 1222685, ~: 1247839) +StakedEXATest:testBalanceOfDeposit(uint80) (runs: 256, μ: 331886, ~: 339807) +StakedEXATest:testBalanceOfWithdraw(uint256) (runs: 256, μ: 82393, ~: 82407) +StakedEXATest:testCanChangeRewardsDurationWhenDisabled() (gas: 176331) +StakedEXATest:testClaimAfterHarvest() (gas: 937756) +StakedEXATest:testClaimAndUnstake() (gas: 1622618) +StakedEXATest:testClaimAndWithdrawAfterRefTime() (gas: 1029325) +StakedEXATest:testClaimBeforeFirstHarvest() (gas: 527334) +StakedEXATest:testDepositClaimsRewardsToReceiver() (gas: 1121108) +StakedEXATest:testDepositEvent(uint256) (runs: 256, μ: 335220, ~: 334966) +StakedEXATest:testDepositShouldClaim(uint256[2],uint32) (runs: 256, μ: 815531, ~: 754868) +StakedEXATest:testDepositToAnotherWithAllowance() (gas: 375284) +StakedEXATest:testDepositToAnotherWithoutAllowanceShouldFail() (gas: 121959) +StakedEXATest:testDepositWithdrawAvgStartTimeAndIndex(uint256[3],uint256,uint256[5]) (runs: 256, μ: 1858235, ~: 1902168) +StakedEXATest:testEarnedWithTime(uint256) (runs: 256, μ: 86053, ~: 86314) +StakedEXATest:testEmergencyAdminCanPauseNotUnpause() (gas: 175029) +StakedEXATest:testFinishDistributionEmitEvent() (gas: 240752) +StakedEXATest:testFinishDistributionLetsClaimUnclaimed() (gas: 1784865) +StakedEXATest:testFinishDistributionStopsEmission() (gas: 1667791) +StakedEXATest:testFinishDistributionThatAlreadyFinished() (gas: 454992) +StakedEXATest:testFinishDistributionTransfersRemainingToSavings() (gas: 146072) +StakedEXATest:testGrantRevokeEmergencyAdmin() (gas: 117824) +StakedEXATest:testGrantRevokePauser() (gas: 117836) +StakedEXATest:testHandlerClaim(uint8) (runs: 256, μ: 485340, ~: 485340) +StakedEXATest:testHandlerDeposit(uint80) (runs: 256, μ: 1231152, ~: 1263054) +StakedEXATest:testHandlerHarvest(uint64) (runs: 256, μ: 401537, ~: 411143) +StakedEXATest:testHandlerNotifyRewardAmount(uint64) (runs: 256, μ: 144811, ~: 136620) +StakedEXATest:testHandlerSetDuration(uint32) (runs: 256, μ: 189476, ~: 218699) +StakedEXATest:testHandlerSetMarket() (gas: 144553) +StakedEXATest:testHandlerWithdraw(uint256) (runs: 256, μ: 102852, ~: 102866) +StakedEXATest:testHarvestAmountWithReducedAllowance() (gas: 184605) +StakedEXATest:testHarvestEffectOnRewardData() (gas: 167799) +StakedEXATest:testHarvestEmitsRewardAmountNotified() (gas: 152147) +StakedEXATest:testHarvestFailDoesntDoSDeposits() (gas: 352693) +StakedEXATest:testHarvestWhenFinished() (gas: 326352) +StakedEXATest:testHarvestX() (gas: 180952) +StakedEXATest:testHarvestZero() (gas: 255436) +StakedEXATest:testInitialValues() (gas: 196483) +StakedEXATest:testInsufficientBalanceError(uint256) (runs: 256, μ: 63990, ~: 64151) +StakedEXATest:testMaxRewardsGasConsumption() (gas: 144674963) +StakedEXATest:testMultipleClaimsVsOne() (gas: 21936440) +StakedEXATest:testMultipleHarvests() (gas: 284083) +StakedEXATest:testNoRewardsAfterPeriod(uint256) (runs: 256, μ: 1810466, ~: 1816281) StakedEXATest:testNotPausingRoleError() (gas: 39124) -StakedEXATest:testNotifyRewardAmount(uint256,uint256) (runs: 256, μ: 153148, ~: 153071) -StakedEXATest:testNotifyRewardWithUnderlyingAsset() (gas: 461065) -StakedEXATest:testOnlyAdminEnableReward() (gas: 1292098) -StakedEXATest:testOnlyAdminFinishDistribution() (gas: 211763) -StakedEXATest:testOnlyAdminNotifyRewardAmount() (gas: 221917) -StakedEXATest:testOnlyAdminSetProvider() (gas: 156242) -StakedEXATest:testOnlyAdminSetProviderRatio() (gas: 155914) -StakedEXATest:testOnlyAdminSetRewardsDuration() (gas: 167735) -StakedEXATest:testOnlyAdminSetSavings() (gas: 153532) -StakedEXATest:testPausable() (gas: 1145348) -StakedEXATest:testPausableClaim() (gas: 603848) -StakedEXATest:testPausableHarvest() (gas: 304500) -StakedEXATest:testPauserCanPauseUnpause() (gas: 178774) +StakedEXATest:testNotifyRewardAmount(uint256,uint256) (runs: 256, μ: 155628, ~: 155564) +StakedEXATest:testNotifyRewardWithUnderlyingAsset() (gas: 460608) +StakedEXATest:testOnlyAdminEnableReward() (gas: 1297302) +StakedEXATest:testOnlyAdminFinishDistribution() (gas: 213640) +StakedEXATest:testOnlyAdminNotifyRewardAmount() (gas: 224410) +StakedEXATest:testOnlyAdminSetProvider() (gas: 158742) +StakedEXATest:testOnlyAdminSetProviderRatio() (gas: 158414) +StakedEXATest:testOnlyAdminSetRewardsDuration() (gas: 170235) +StakedEXATest:testOnlyAdminSetSavings() (gas: 156032) +StakedEXATest:testPausable() (gas: 1148731) +StakedEXATest:testPausableClaim() (gas: 603386) +StakedEXATest:testPausableHarvest() (gas: 304503) +StakedEXATest:testPauserCanPauseUnpause() (gas: 183774) StakedEXATest:testPenaltyGrowthRange() (gas: 66809) StakedEXATest:testPenaltyThresholdRange() (gas: 36989) -StakedEXATest:testPermitAndDeposit() (gas: 450105) -StakedEXATest:testPermitFailKeepsFlow() (gas: 484939) -StakedEXATest:testRemoveDepositAllowance() (gas: 467857) -StakedEXATest:testResetDepositAfterRefTime(uint256) (runs: 256, μ: 1031275, ~: 1031034) -StakedEXATest:testRewardAmountNotifiedEvent(uint256) (runs: 256, μ: 105544, ~: 105276) -StakedEXATest:testRewardNotListedError() (gas: 1176980) -StakedEXATest:testRewardPaidEvent(uint256,uint256) (runs: 256, μ: 796743, ~: 854769) -StakedEXATest:testRewardsAmounts(uint256) (runs: 256, μ: 1692196, ~: 1691991) -StakedEXATest:testRewardsDurationSetEvent(uint40) (runs: 256, μ: 52166, ~: 52149) -StakedEXATest:testSetDuration(uint256,uint40) (runs: 256, μ: 65769, ~: 64429) +StakedEXATest:testPermitAndDeposit() (gas: 452146) +StakedEXATest:testPermitFailKeepsFlow() (gas: 484480) +StakedEXATest:testRemoveDepositAllowance() (gas: 466913) +StakedEXATest:testResetDepositAfterRefTime(uint256) (runs: 256, μ: 1033225, ~: 1032994) +StakedEXATest:testRewardAmountNotifiedEvent(uint256) (runs: 256, μ: 105537, ~: 105269) +StakedEXATest:testRewardNotListedError() (gas: 1177184) +StakedEXATest:testRewardPaidEvent(uint256,uint256) (runs: 256, μ: 802090, ~: 854267) +StakedEXATest:testRewardsAmounts(uint256) (runs: 256, μ: 1707472, ~: 1707275) +StakedEXATest:testRewardsDurationSetEvent(uint40) (runs: 256, μ: 52170, ~: 52149) +StakedEXATest:testSetDuration(uint256,uint40) (runs: 256, μ: 65763, ~: 64441) StakedEXATest:testSetMarketAddressZero() (gas: 36979) -StakedEXATest:testSetMarketOnlyAdmin() (gas: 1415677) -StakedEXATest:testSetMaxRewardsTokensExceeded() (gas: 111926535) +StakedEXATest:testSetMarketOnlyAdmin() (gas: 1345554) +StakedEXATest:testSetMaxRewardsTokensExceeded() (gas: 111958823) StakedEXATest:testSetMinTime() (gas: 86084) StakedEXATest:testSetPenaltyGrowth() (gas: 86248) StakedEXATest:testSetPenaltyThreshold() (gas: 86205) StakedEXATest:testSetProviderRatioOverOneError() (gas: 36977) StakedEXATest:testSetSavingsZeroAddressError() (gas: 37006) -StakedEXATest:testTotalSupplyDeposit(uint80) (runs: 256, μ: 331885, ~: 337155) -StakedEXATest:testTotalSupplyWithdraw(uint256) (runs: 256, μ: 76486, ~: 76489) -StakedEXATest:testUntransferable(uint80) (runs: 256, μ: 343097, ~: 349134) -StakedEXATest:testWithdrawEvent(uint256) (runs: 256, μ: 484111, ~: 483858) -StakedEXATest:testWithdrawRewardUnderlyingAsset() (gas: 455203) -StakedEXATest:testWithdrawRewardsOnlyAdmin() (gas: 240324) -StakedEXATest:testWithdrawRewardsOnlyReward() (gas: 1176970) -StakedEXATest:testWithdrawSameAmountRewardsShouldEqual(uint256,uint256) (runs: 256, μ: 1053348, ~: 1110902) -StakedEXATest:testWithdrawWithRewards(uint256) (runs: 256, μ: 891127, ~: 890874) -StakedEXATest:testZeroRateError() (gas: 58257) -StakingPreviewerTest:testAllClaimable() (gas: 749465) -StakingPreviewerTest:testAllClaimed() (gas: 808626) -StakingPreviewerTest:testAllEarned() (gas: 487242) -StakingPreviewerTest:testAllRewards() (gas: 948711) -StakingPreviewerTest:testStaking() (gas: 988789) +StakedEXATest:testTotalSupplyDeposit(uint80) (runs: 256, μ: 331272, ~: 339193) +StakedEXATest:testTotalSupplyWithdraw(uint256) (runs: 256, μ: 81753, ~: 81767) +StakedEXATest:testUntransferable(uint80) (runs: 256, μ: 339593, ~: 348672) +StakedEXATest:testWithdrawEvent(uint256) (runs: 256, μ: 483383, ~: 483140) +StakedEXATest:testWithdrawRewardUnderlyingAsset() (gas: 456617) +StakedEXATest:testWithdrawRewardsOnlyAdmin() (gas: 242200) +StakedEXATest:testWithdrawRewardsOnlyReward() (gas: 1177174) +StakedEXATest:testWithdrawSameAmountRewardsShouldEqual(uint256,uint256) (runs: 256, μ: 1057664, ~: 1107782) +StakedEXATest:testWithdrawWithRewards(uint256) (runs: 256, μ: 895601, ~: 895358) +StakedEXATest:testZeroRateError() (gas: 58274) +StakingPreviewerTest:testAllClaimable() (gas: 769205) +StakingPreviewerTest:testAllClaimed() (gas: 818952) +StakingPreviewerTest:testAllEarned() (gas: 506846) +StakingPreviewerTest:testAllRewards() (gas: 998509) +StakingPreviewerTest:testStaking() (gas: 1053587) SwapperTest:testSwapBasic() (gas: 232131) -SwapperTest:testSwapWithAllowance() (gas: 503293) -SwapperTest:testSwapWithInaccurateSlippageSendsETHToAccount() (gas: 322141) +SwapperTest:testSwapWithAllowance() (gas: 505793) +SwapperTest:testSwapWithInaccurateSlippageSendsETHToAccount() (gas: 324641) SwapperTest:testSwapWithKeepAmount() (gas: 239161) SwapperTest:testSwapWithKeepEqualToValue() (gas: 74368) SwapperTest:testSwapWithKeepHigherThanValue() (gas: 74397) -SwapperTest:testSwapWithPermit() (gas: 511429) +SwapperTest:testSwapWithPermit() (gas: 517429) SwapperTest:testSwapWithPermit2() (gas: 522021) VerifiedAuditorTest:test_lock_reverts_whenTargetIsAllowed() (gas: 49063) VerifiedAuditorTest:test_lock_reverts_withNotAllowed_whenSenderNotAllowed() (gas: 50315) -VerifiedAuditorTest:test_setFirewall_emitsFirewallSet() (gas: 749100) -VerifiedAuditorTest:test_setFirewall_reverts_whenNotAdmin() (gas: 769675) +VerifiedAuditorTest:test_setFirewall_emitsFirewallSet() (gas: 750850) +VerifiedAuditorTest:test_setFirewall_reverts_whenNotAdmin() (gas: 771425) VerifiedAuditorTest:test_setFirewall_sets_whenAdmin() (gas: 50939) VerifiedAuditorTest:test_unlock_reverts_withInvalidOperation_whenAccountIsNotAllowed() (gas: 100837) VerifiedAuditorTest:test_unlock_reverts_withNotAllowed_whenSenderIsNotAllowed() (gas: 181052) -VerifiedMarketTest:testAccountLiquidityAdjustedDebt() (gas: 687322) -VerifiedMarketTest:testAccountsFixedConsolidated() (gas: 2256015) -VerifiedMarketTest:testAccountsFixedConsolidatedWhenClearBadDebt() (gas: 2109365) +VerifiedMarketTest:testAccountLiquidityAdjustedDebt() (gas: 689822) +VerifiedMarketTest:testAccountsFixedConsolidated() (gas: 2283515) +VerifiedMarketTest:testAccountsFixedConsolidatedWhenClearBadDebt() (gas: 2116865) VerifiedMarketTest:testAccountsFixedConsolidatedWhenSenderNotOwner() (gas: 1059236) -VerifiedMarketTest:testAccountsFixedConsolidatedWithPartialRepayAndWithdraw() (gas: 1596682) -VerifiedMarketTest:testAccrueEarningsBeforeLiquidation() (gas: 1640257) -VerifiedMarketTest:testAnotherUserRedeemWhenOwnerHasShortfall() (gas: 977706) +VerifiedMarketTest:testAccountsFixedConsolidatedWithPartialRepayAndWithdraw() (gas: 1616682) +VerifiedMarketTest:testAccrueEarningsBeforeLiquidation() (gas: 1647757) +VerifiedMarketTest:testAnotherUserRedeemWhenOwnerHasShortfall() (gas: 980206) VerifiedMarketTest:testAnotherUserWithdrawWhenOwnerHasShortfall() (gas: 926360) VerifiedMarketTest:testBorrowAfterFreezing() (gas: 528908) VerifiedMarketTest:testBorrowAtMaturity() (gas: 581405) @@ -643,22 +666,22 @@ VerifiedMarketTest:testBorrowFromFreeLunchShouldNotRevertWithFloatingFullUtiliza VerifiedMarketTest:testBorrowWhenFrozen() (gas: 93021) VerifiedMarketTest:testBorrowWithZeroAssets() (gas: 39763) VerifiedMarketTest:testCappedLiquidation() (gas: 1348356) -VerifiedMarketTest:testChargeTreasuryToEarlyWithdraws() (gas: 1552894) -VerifiedMarketTest:testChargeTreasuryToFixedBorrows() (gas: 1879244) -VerifiedMarketTest:testClearBadDebtAvoidingFixedBorrowsIfAccumulatorLower() (gas: 2387952) +VerifiedMarketTest:testChargeTreasuryToEarlyWithdraws() (gas: 1567894) +VerifiedMarketTest:testChargeTreasuryToFixedBorrows() (gas: 1899244) +VerifiedMarketTest:testClearBadDebtAvoidingFixedBorrowsIfAccumulatorLower() (gas: 2397952) VerifiedMarketTest:testClearBadDebtBeforeMaturity() (gas: 2490804) VerifiedMarketTest:testClearBadDebtCalledByAccount() (gas: 34934) -VerifiedMarketTest:testClearBadDebtEmptiesUnassignedEarnings() (gas: 2722049) -VerifiedMarketTest:testClearBadDebtExactlyRepaysFixedBorrowWithAccumulatorAmount() (gas: 2178286) -VerifiedMarketTest:testClearBadDebtPartiallyRepaysEachFixedBorrow() (gas: 2114835) -VerifiedMarketTest:testClearBadDebtPartiallyRepaysFloatingDebt() (gas: 2454588) -VerifiedMarketTest:testClearBadDebtShouldAccrueAccumulatedEarningsBeforeSpreadingLosses() (gas: 2432261) -VerifiedMarketTest:testClearBadDebtWithEmptyAccumulatorShouldNotRevert() (gas: 1105148) -VerifiedMarketTest:testClearMaturity() (gas: 1961421) -VerifiedMarketTest:testCollectTreasuryFreeLunchToEarlyWithdraws() (gas: 2212298) -VerifiedMarketTest:testCollectTreasuryFreeLunchToEarlyWithdrawsWithZeroFees() (gas: 707337) -VerifiedMarketTest:testCollectTreasuryFreeLunchToFixedBorrows() (gas: 2194017) -VerifiedMarketTest:testCollectTreasuryFreeLunchToFixedBorrowsWithZeroFees() (gas: 915454) +VerifiedMarketTest:testClearBadDebtEmptiesUnassignedEarnings() (gas: 2729549) +VerifiedMarketTest:testClearBadDebtExactlyRepaysFixedBorrowWithAccumulatorAmount() (gas: 2188286) +VerifiedMarketTest:testClearBadDebtPartiallyRepaysEachFixedBorrow() (gas: 2119835) +VerifiedMarketTest:testClearBadDebtPartiallyRepaysFloatingDebt() (gas: 2464588) +VerifiedMarketTest:testClearBadDebtShouldAccrueAccumulatedEarningsBeforeSpreadingLosses() (gas: 2449761) +VerifiedMarketTest:testClearBadDebtWithEmptyAccumulatorShouldNotRevert() (gas: 1115148) +VerifiedMarketTest:testClearMaturity() (gas: 1968921) +VerifiedMarketTest:testCollectTreasuryFreeLunchToEarlyWithdraws() (gas: 2234798) +VerifiedMarketTest:testCollectTreasuryFreeLunchToEarlyWithdrawsWithZeroFees() (gas: 714837) +VerifiedMarketTest:testCollectTreasuryFreeLunchToFixedBorrows() (gas: 2216517) +VerifiedMarketTest:testCollectTreasuryFreeLunchToFixedBorrowsWithZeroFees() (gas: 922954) VerifiedMarketTest:testCrossMaturityLiquidation() (gas: 2800041) VerifiedMarketTest:testDepositAfterFreezing() (gas: 281253) VerifiedMarketTest:testDepositAtMaturity() (gas: 261116) @@ -666,43 +689,43 @@ VerifiedMarketTest:testDepositAtMaturityAfterFreezing() (gas: 335013) VerifiedMarketTest:testDepositAtMaturityWhenFrozen() (gas: 116189) VerifiedMarketTest:testDepositAtMaturityWithZeroAssets() (gas: 63077) VerifiedMarketTest:testDepositDisagreement() (gas: 97017) -VerifiedMarketTest:testDepositShouldUpdateFlexibleBorrowVariables() (gas: 868733) +VerifiedMarketTest:testDepositShouldUpdateFlexibleBorrowVariables() (gas: 881233) VerifiedMarketTest:testDepositToSmartPool() (gas: 207037) VerifiedMarketTest:testDepositWhenFrozen() (gas: 199362) -VerifiedMarketTest:testDistributeMultipleAccumulatedEarnings() (gas: 1829951) -VerifiedMarketTest:testDistributionOfLossesShouldReduceFromFloatingBackupBorrowedAccordingly() (gas: 6775042) -VerifiedMarketTest:testEarlyRepayLiquidationUnassignedEarnings() (gas: 2698456) -VerifiedMarketTest:testEarlyRepaymentWithExcessiveAmountOfFees() (gas: 3557227) +VerifiedMarketTest:testDistributeMultipleAccumulatedEarnings() (gas: 1859951) +VerifiedMarketTest:testDistributionOfLossesShouldReduceFromFloatingBackupBorrowedAccordingly() (gas: 6782542) +VerifiedMarketTest:testEarlyRepayLiquidationUnassignedEarnings() (gas: 2710956) +VerifiedMarketTest:testEarlyRepaymentWithExcessiveAmountOfFees() (gas: 3559727) VerifiedMarketTest:testEarlyWithdrawFromFreeLunchShouldNotRevertWithFloatingFullUtilization() (gas: 1153986) -VerifiedMarketTest:testEmergencyAdminRole() (gas: 360892) +VerifiedMarketTest:testEmergencyAdminRole() (gas: 373392) VerifiedMarketTest:testEmitFrozen() (gas: 90717) VerifiedMarketTest:testFixedBorrowFailingWhenFlexibleBorrowAccruesDebt() (gas: 1717825) VerifiedMarketTest:testFixedBorrowRateToMaturity() (gas: 641973) -VerifiedMarketTest:testFixedOperationsUpdateFloatingDebt() (gas: 1081276) +VerifiedMarketTest:testFixedOperationsUpdateFloatingDebt() (gas: 1088776) VerifiedMarketTest:testFlexibleBorrow() (gas: 496515) -VerifiedMarketTest:testFlexibleBorrowAccountingDebt() (gas: 812836) -VerifiedMarketTest:testFlexibleBorrowChargingDebtToTreasury() (gas: 890675) +VerifiedMarketTest:testFlexibleBorrowAccountingDebt() (gas: 832836) +VerifiedMarketTest:testFlexibleBorrowChargingDebtToTreasury() (gas: 895675) VerifiedMarketTest:testFlexibleBorrowExceedingReserve() (gas: 926020) VerifiedMarketTest:testFlexibleBorrowExceedingReserveIncludingFixedBorrow() (gas: 1335668) VerifiedMarketTest:testFlexibleBorrowExceedingReserveWithNewDebt() (gas: 1004280) VerifiedMarketTest:testFlexibleBorrowFromAnotherUserSubtractsAllowance() (gas: 515757) VerifiedMarketTest:testFlexibleBorrowFromAnotherUserWithAllowance() (gas: 496334) VerifiedMarketTest:testFlexibleBorrowFromAnotherUserWithoutAllowance() (gas: 277656) -VerifiedMarketTest:testFrontRunSmartPoolEarningsDistributionWithBigPenaltyRepayment() (gas: 1780643) +VerifiedMarketTest:testFrontRunSmartPoolEarningsDistributionWithBigPenaltyRepayment() (gas: 1805643) VerifiedMarketTest:testFullPause() (gas: 6350249) VerifiedMarketTest:testInitiallyUnfrozen() (gas: 15542) VerifiedMarketTest:testInsufficientProtocolLiquidity() (gas: 1935372) VerifiedMarketTest:testLiquidateAndChargeIncentiveForLenders() (gas: 2476482) -VerifiedMarketTest:testLiquidateAndDistributeLosses() (gas: 3446538) +VerifiedMarketTest:testLiquidateAndDistributeLosses() (gas: 3459038) VerifiedMarketTest:testLiquidateAndSeizeExactAmountWithDustAsCollateral() (gas: 2946877) VerifiedMarketTest:testLiquidateAndSeizeFromEmptyCollateral() (gas: 1097626) -VerifiedMarketTest:testLiquidateAndSubtractLossesFromAccumulator() (gas: 4208450) -VerifiedMarketTest:testLiquidateFlexibleAndFixedBorrowPositionsInSingleCall() (gas: 2648336) -VerifiedMarketTest:testLiquidateFlexibleBorrow() (gas: 2688412) +VerifiedMarketTest:testLiquidateAndSubtractLossesFromAccumulator() (gas: 4230950) +VerifiedMarketTest:testLiquidateFlexibleAndFixedBorrowPositionsInSingleCall() (gas: 2663336) +VerifiedMarketTest:testLiquidateFlexibleBorrow() (gas: 2690912) VerifiedMarketTest:testLiquidateFlexibleBorrowChargeLendersAssetsToLiquidator() (gas: 1190799) -VerifiedMarketTest:testLiquidateFlexibleBorrowConsideringDebtOverTime() (gas: 1256647) +VerifiedMarketTest:testLiquidateFlexibleBorrowConsideringDebtOverTime() (gas: 1266647) VerifiedMarketTest:testLiquidateLeavingDustAsCollateral() (gas: 3787372) -VerifiedMarketTest:testLiquidateTransferRepayAssetsBeforeSeize() (gas: 1264336) +VerifiedMarketTest:testLiquidateTransferRepayAssetsBeforeSeize() (gas: 1274336) VerifiedMarketTest:testLiquidateUpdateFloatingDebt() (gas: 1922869) VerifiedMarketTest:testLiquidateWhenFrozen() (gas: 1223623) VerifiedMarketTest:testLiquidateWithTwoUnitsAsMaxAssets() (gas: 1739367) @@ -712,88 +735,88 @@ VerifiedMarketTest:testLiquidationResultingInZeroCollateralAndZeroDebt() (gas: 2 VerifiedMarketTest:testMaturityInsufficientProtocolLiquidity() (gas: 1656401) VerifiedMarketTest:testMultipleBorrowsForMultipleAssets() (gas: 2495120536) VerifiedMarketTest:testMultipleDepositsToSmartPool() (gas: 1092608) -VerifiedMarketTest:testMultipleFixedBorrowsRepays() (gas: 1581834) +VerifiedMarketTest:testMultipleFixedBorrowsRepays() (gas: 1584334) VerifiedMarketTest:testMultipleLiquidationSameUser() (gas: 3456681) VerifiedMarketTest:testNotEnteredMarketShouldNotBeSeized() (gas: 11344963) -VerifiedMarketTest:testOnlyAdminCanFreezeUnfreeze() (gas: 225919) -VerifiedMarketTest:testOperationsShouldUpdateFloatingAssetsAverage() (gas: 1775479) +VerifiedMarketTest:testOnlyAdminCanFreezeUnfreeze() (gas: 228419) +VerifiedMarketTest:testOperationsShouldUpdateFloatingAssetsAverage() (gas: 1792979) VerifiedMarketTest:testOperationsWithBtcWbtcRate() (gas: 11100428) VerifiedMarketTest:testOperationsWithStEthAsset() (gas: 10989745) -VerifiedMarketTest:testPausable() (gas: 178149) -VerifiedMarketTest:testPauserRole() (gas: 85866) -VerifiedMarketTest:testPreviewOperationsWithSmartPoolCorrectlyAccountingEarnings() (gas: 2432451) +VerifiedMarketTest:testPausable() (gas: 183149) +VerifiedMarketTest:testPauserRole() (gas: 88366) +VerifiedMarketTest:testPreviewOperationsWithSmartPoolCorrectlyAccountingEarnings() (gas: 2447451) VerifiedMarketTest:testRepayAtMaturity() (gas: 687286) VerifiedMarketTest:testRepayDisagreement() (gas: 697050) -VerifiedMarketTest:testRepayFlexibleBorrow() (gas: 1374695) +VerifiedMarketTest:testRepayFlexibleBorrow() (gas: 1389695) VerifiedMarketTest:testRepayWhenFrozen() (gas: 594004) VerifiedMarketTest:testRoundingDownAssetsToValidateShortfallWhenTransferring() (gas: 9612071) VerifiedMarketTest:testRoundingDownAssetsToValidateShortfallWhenTransferringFrom() (gas: 9667549) -VerifiedMarketTest:testRoundingDownAssetsWhenTransferingFromAnAccountWithoutShortfall() (gas: 1194103) -VerifiedMarketTest:testRoundingDownAssetsWhenTransferingWithAnAccountWithoutShortfall() (gas: 1136109) +VerifiedMarketTest:testRoundingDownAssetsWhenTransferingFromAnAccountWithoutShortfall() (gas: 1196603) +VerifiedMarketTest:testRoundingDownAssetsWhenTransferingWithAnAccountWithoutShortfall() (gas: 1138609) VerifiedMarketTest:testRoundingUpAllowanceWhenBorrowingAtMaturity() (gas: 949799) VerifiedMarketTest:testRoundingUpAllowanceWhenWithdrawingAtMaturity() (gas: 962216) -VerifiedMarketTest:testSetDampSpeedFactorShouldUpdateFloatingAssetsAverage() (gas: 454643) -VerifiedMarketTest:testSetEarningsAccumulatorSmoothFactorShouldDistributeEarnings() (gas: 959294) -VerifiedMarketTest:testSetInterestRateModelShouldUpdateFloatingDebt() (gas: 2886664) -VerifiedMarketTest:testSetInterestRateModelWithAddressZeroShouldNotUpdateFloatingDebt() (gas: 2673041) -VerifiedMarketTest:testShareValueNotDecreasingAfterDeposit() (gas: 852970) -VerifiedMarketTest:testShareValueNotDecreasingWhenMintingToTreasury() (gas: 891489) +VerifiedMarketTest:testSetDampSpeedFactorShouldUpdateFloatingAssetsAverage() (gas: 457143) +VerifiedMarketTest:testSetEarningsAccumulatorSmoothFactorShouldDistributeEarnings() (gas: 964294) +VerifiedMarketTest:testSetInterestRateModelShouldUpdateFloatingDebt() (gas: 2889164) +VerifiedMarketTest:testSetInterestRateModelWithAddressZeroShouldNotUpdateFloatingDebt() (gas: 2678041) +VerifiedMarketTest:testShareValueNotDecreasingAfterDeposit() (gas: 855470) +VerifiedMarketTest:testShareValueNotDecreasingWhenMintingToTreasury() (gas: 893989) VerifiedMarketTest:testSingleFloatingBorrow() (gas: 455037) VerifiedMarketTest:testSingleFloatingRepay() (gas: 543324) -VerifiedMarketTest:testSmartPoolEarningsDistribution() (gas: 1309484) -VerifiedMarketTest:testSmartPoolSharesDoNotAccountUnassignedEarningsFromMoreThanOneIntervalPastMaturities() (gas: 708512) -VerifiedMarketTest:testSumDebtPlusEffectsShouldntRoundUpWhenWithdrawing() (gas: 1166924) +VerifiedMarketTest:testSmartPoolEarningsDistribution() (gas: 1316984) +VerifiedMarketTest:testSmartPoolSharesDoNotAccountUnassignedEarningsFromMoreThanOneIntervalPastMaturities() (gas: 716012) +VerifiedMarketTest:testSumDebtPlusEffectsShouldntRoundUpWhenWithdrawing() (gas: 1169424) VerifiedMarketTest:testTotalAssetsProjectingBackupEarningsCorrectly() (gas: 629722) -VerifiedMarketTest:testTotalAssetsProjectingFloatingDebtCorrectly() (gas: 892744) -VerifiedMarketTest:testUpdateAccumulatedEarningsFactorToZero() (gas: 1895198) -VerifiedMarketTest:testUpdateFloatingAssetsAverageWhenDepositingAndBorrowingContinuously() (gas: 460677) -VerifiedMarketTest:testUpdateFloatingAssetsAverageWhenDepositingRightBeforeBorrow() (gas: 797458) -VerifiedMarketTest:testUpdateFloatingAssetsAverageWhenDepositingRightBeforeEarlyWithdraw() (gas: 780657) -VerifiedMarketTest:testUpdateFloatingAssetsAverageWhenDepositingSomeSecondsBeforeBorrow() (gas: 1115404) -VerifiedMarketTest:testUpdateFloatingAssetsAverageWhenWithdrawingRightBeforeBorrow() (gas: 801400) -VerifiedMarketTest:testUpdateFloatingAssetsAverageWhenWithdrawingRightBeforeEarlyWithdraw() (gas: 784640) -VerifiedMarketTest:testUpdateFloatingAssetsAverageWhenWithdrawingSomeSecondsBeforeBorrow() (gas: 547841) -VerifiedMarketTest:testUpdateFloatingAssetsAverageWithDampSpeedDown() (gas: 465335) -VerifiedMarketTest:testUpdateFloatingAssetsAverageWithDampSpeedUp() (gas: 324183) +VerifiedMarketTest:testTotalAssetsProjectingFloatingDebtCorrectly() (gas: 902744) +VerifiedMarketTest:testUpdateAccumulatedEarningsFactorToZero() (gas: 1917698) +VerifiedMarketTest:testUpdateFloatingAssetsAverageWhenDepositingAndBorrowingContinuously() (gas: 468177) +VerifiedMarketTest:testUpdateFloatingAssetsAverageWhenDepositingRightBeforeBorrow() (gas: 799958) +VerifiedMarketTest:testUpdateFloatingAssetsAverageWhenDepositingRightBeforeEarlyWithdraw() (gas: 783157) +VerifiedMarketTest:testUpdateFloatingAssetsAverageWhenDepositingSomeSecondsBeforeBorrow() (gas: 1130404) +VerifiedMarketTest:testUpdateFloatingAssetsAverageWhenWithdrawingRightBeforeBorrow() (gas: 803900) +VerifiedMarketTest:testUpdateFloatingAssetsAverageWhenWithdrawingRightBeforeEarlyWithdraw() (gas: 787140) +VerifiedMarketTest:testUpdateFloatingAssetsAverageWhenWithdrawingSomeSecondsBeforeBorrow() (gas: 572841) +VerifiedMarketTest:testUpdateFloatingAssetsAverageWithDampSpeedDown() (gas: 477835) +VerifiedMarketTest:testUpdateFloatingAssetsAverageWithDampSpeedUp() (gas: 341683) VerifiedMarketTest:testUpdateFloatingDebtBeforeSettingTreasury() (gas: 115196) VerifiedMarketTest:testWithdrawAtMaturity() (gas: 383828) -VerifiedMarketTest:testWithdrawFromSmartPool() (gas: 320983) -VerifiedMarketTest:testWithdrawShouldUpdateFlexibleBorrowVariables() (gas: 985570) +VerifiedMarketTest:testWithdrawFromSmartPool() (gas: 323483) +VerifiedMarketTest:testWithdrawShouldUpdateFlexibleBorrowVariables() (gas: 998070) VerifiedMarketTest:testWithdrawWhenFrozen() (gas: 361305) VerifiedMarketTest:test_borrowAtMaturity_borrows_whenBorrowerIsAllowed() (gas: 563292) VerifiedMarketTest:test_borrowAtMaturity_reverts_withNotAllowed_whenBorrowerIsNotAllowed() (gas: 519694) VerifiedMarketTest:test_borrow_borrows_whenBorrowerIsAllowed() (gas: 437186) VerifiedMarketTest:test_borrow_reverts_withNotAllowed_whenBorrowerIsNotAllowed() (gas: 387716) -VerifiedMarketTest:test_depositAtMaturity_deposits_whenSenderAndReceiverAreAllowed() (gas: 485177) +VerifiedMarketTest:test_depositAtMaturity_deposits_whenSenderAndReceiverAreAllowed() (gas: 487677) VerifiedMarketTest:test_depositAtMaturity_reverts_withNotAllowed_whenReceiverIsNotAllowed() (gas: 92609) VerifiedMarketTest:test_depositAtMaturity_reverts_withNotAllowed_whenSenderIsNotAllowed() (gas: 88627) -VerifiedMarketTest:test_deposit_deposits_whenSenderAndReceiverAreAllowed() (gas: 469060) +VerifiedMarketTest:test_deposit_deposits_whenSenderAndReceiverAreAllowed() (gas: 471560) VerifiedMarketTest:test_deposit_deposits_whenTotalSupplyLowerThanMaxSupply() (gas: 247886) VerifiedMarketTest:test_deposit_revert_withNotAllowed_whenBothSenderAndReceiverAreNotAllowed() (gas: 173676) VerifiedMarketTest:test_deposit_reverts_whenTotalSupplyHigherThanMaxSupply() (gas: 183919) VerifiedMarketTest:test_deposit_reverts_withNotAllowed_whenReceiverIsNotAllowed() (gas: 92258) VerifiedMarketTest:test_deposit_reverts_withNotAllowed_whenSenderIsNotAllowed() (gas: 173895) -VerifiedMarketTest:test_liquidateAllowedAccount_liquidates_withIncentives() (gas: 1442451) -VerifiedMarketTest:test_liquidateNotAllowedAccount_liquidates_withoutIncentives() (gas: 1398783) -VerifiedMarketTest:test_liquidateNotAllowedAccount_underwater_liquidates_withoutIncentives() (gas: 1398769) +VerifiedMarketTest:test_liquidateAllowedAccount_liquidates_withIncentives() (gas: 1444951) +VerifiedMarketTest:test_liquidateNotAllowedAccount_liquidates_withoutIncentives() (gas: 1401321) +VerifiedMarketTest:test_liquidateNotAllowedAccount_underwater_liquidates_withoutIncentives() (gas: 1401307) VerifiedMarketTest:test_liquidate_reverts_withNotAllowed_whenLiquidatorIsNotAllowed() (gas: 1060909) VerifiedMarketTest:test_lock_emits_locked() (gas: 433990) VerifiedMarketTest:test_lock_emits_seize() (gas: 434515) -VerifiedMarketTest:test_lock_locks_whenAccountHasFixedDeposits() (gas: 568244) -VerifiedMarketTest:test_lock_locks_whenAccountHasNoDebt() (gas: 549052) +VerifiedMarketTest:test_lock_locks_whenAccountHasFixedDeposits() (gas: 575744) +VerifiedMarketTest:test_lock_locks_whenAccountHasNoDebt() (gas: 556552) VerifiedMarketTest:test_lock_reverts_withNotAuditor_whenNotCalledByAuditor() (gas: 35027) VerifiedMarketTest:test_lock_reverts_withRemainingDebt_whenAccountHasDebt() (gas: 596637) -VerifiedMarketTest:test_mint_mints_whenSenderAndReceiverAreAllowed() (gas: 392838) +VerifiedMarketTest:test_mint_mints_whenSenderAndReceiverAreAllowed() (gas: 395338) VerifiedMarketTest:test_mint_revert_withNotAllowed_whenBothSenderAndReceiverAreNotAllowed() (gas: 173698) VerifiedMarketTest:test_mint_reverts_withNotAllowed_whenReceiverIsNotAllowed() (gas: 92236) VerifiedMarketTest:test_mint_reverts_withNotAllowed_whenSenderIsNotAllowed() (gas: 173828) VerifiedMarketTest:test_redeem_redeems_whenSenderIsAllowed() (gas: 361134) VerifiedMarketTest:test_redeem_reverts_withNotAllowed_whenSenderIsNotAllowed() (gas: 323005) -VerifiedMarketTest:test_refund_refunds_whenBorrowerAndRefunderAreAllowed() (gas: 597675) +VerifiedMarketTest:test_refund_refunds_whenBorrowerAndRefunderAreAllowed() (gas: 600175) VerifiedMarketTest:test_refund_reverts_withNotAllowed_whenBorrowerIsNotAllowed() (gas: 537846) VerifiedMarketTest:test_refund_reverts_withNotAllowed_whenBothBorrowerAndRefunderAreNotAllowed() (gas: 560590) VerifiedMarketTest:test_refund_reverts_withNotAllowed_whenRefunderIsNotAllowed() (gas: 533408) -VerifiedMarketTest:test_repayAtMaturity_repays_whenBorrowerAndRepayerAreAllowed() (gas: 767140) +VerifiedMarketTest:test_repayAtMaturity_repays_whenBorrowerAndRepayerAreAllowed() (gas: 769640) VerifiedMarketTest:test_repayAtMaturity_reverts_withNotAllowed_whenBorrowerIsNotAllowed() (gas: 664926) VerifiedMarketTest:test_repayAtMaturity_reverts_withNotAllowed_whenBothBorrowerAndRepayerAreNotAllowed() (gas: 728529) VerifiedMarketTest:test_repayAtMaturity_reverts_withNotAllowed_whenRepayerIsNotAllowed() (gas: 701162) @@ -803,7 +826,7 @@ VerifiedMarketTest:test_repay_reverts_withNotAllowed_whenBothBorrowerAndRepayerA VerifiedMarketTest:test_repay_reverts_withNotAllowed_whenRepayerIsNotAllowed() (gas: 574078) VerifiedMarketTest:test_setMaxSupply_emits_maxSupplySet() (gas: 44327) VerifiedMarketTest:test_setMaxSupply_reverts_whenNotAdmin() (gas: 65094) -VerifiedMarketTest:test_setMaxSupply_sets_whenAdmin() (gas: 63793) +VerifiedMarketTest:test_setMaxSupply_sets_whenAdmin() (gas: 66293) VerifiedMarketTest:test_transferFrom_reverts_withNotAllowed_whenBothSenderAndReceiverAreNotAllowed() (gas: 310121) VerifiedMarketTest:test_transferFrom_reverts_withNotAllowed_whenReceiverIsNotAllowed() (gas: 282733) VerifiedMarketTest:test_transferFrom_reverts_withNotAllowed_whenSenderIsNotAllowed() (gas: 333377) @@ -812,13 +835,13 @@ VerifiedMarketTest:test_transfer_reverts_withNotAllowed_whenBothSenderAndReceive VerifiedMarketTest:test_transfer_reverts_withNotAllowed_whenReceiverIsNotAllowed() (gas: 282235) VerifiedMarketTest:test_transfer_reverts_withNotAllowed_whenSenderIsNotAllowed() (gas: 332984) VerifiedMarketTest:test_transfer_transfers_whenSenderAndReceiverAreAllowed() (gas: 396447) -VerifiedMarketTest:test_unlock_afterOperating_unlocks() (gas: 1919837) +VerifiedMarketTest:test_unlock_afterOperating_unlocks() (gas: 1964888) VerifiedMarketTest:test_unlock_emits_unlocked() (gas: 662791) VerifiedMarketTest:test_unlock_reverts_withNotAuditor_whenNotCalledByAuditor() (gas: 35009) -VerifiedMarketTest:test_unlock_unlocks_whenAccountIsAllowedBack() (gas: 846679) -VerifiedMarketTest:test_unlock_updatesFloatingAssets() (gas: 691370) +VerifiedMarketTest:test_unlock_unlocks_whenAccountIsAllowedBack() (gas: 859179) +VerifiedMarketTest:test_unlock_updatesFloatingAssets() (gas: 693870) VerifiedMarketTest:test_withdrawAtMaturity_reverts_withNotAllowed_whenOwnerIsNotAllowed() (gas: 364077) VerifiedMarketTest:test_withdrawAtMaturity_withdraws_whenOwnerIsAllowed() (gas: 407904) VerifiedMarketTest:test_withdraw_reverts_withNotAllowed_whenSenderIsNotAllowed() (gas: 284983) -VerifiedMarketTest:test_withdraw_withdraws_whenSenderIsAllowed() (gas: 365138) -VotePreviewerTest:testExternalVotes() (gas: 423373) \ No newline at end of file +VerifiedMarketTest:test_withdraw_withdraws_whenSenderIsAllowed() (gas: 367638) +VotePreviewerTest:testExternalVotes() (gas: 428373) \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9f9b8e2da..5057065ce 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,11 +19,11 @@ jobs: run_install: false - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: pnpm - uses: foundry-rs/foundry-toolchain@v1 with: - version: v1.3.6 + version: v1.5.1 - run: pnpm install --frozen-lockfile - uses: changesets/action@v1 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 32262490b..75bda878a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,11 +20,11 @@ jobs: run_install: false - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: pnpm - uses: foundry-rs/foundry-toolchain@v1 with: - version: v1.3.6 + version: v1.5.1 - run: pnpm install --frozen-lockfile - run: pnpm run lint - run: rm -rf cache/fuzz cache/invariant diff --git a/.gitignore b/.gitignore index 3ef57b052..3aedbdd27 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ /lcov.info /types/ +.claude/settings.local.json .openzeppelin/unknown-* .vscode/ cache/ diff --git a/contracts/periphery/EXA.sol b/contracts/periphery/EXA.sol index 1224bb529..6b25e6862 100644 --- a/contracts/periphery/EXA.sol +++ b/contracts/periphery/EXA.sol @@ -1,16 +1,61 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.17; +import { AccessControlUpgradeable } from "@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol"; import { ERC20VotesUpgradeable } from "@openzeppelin/contracts-upgradeable-v4/token/ERC20/extensions/ERC20VotesUpgradeable.sol"; +import { StorageSlotUpgradeable } from "@openzeppelin/contracts-upgradeable-v4/utils/StorageSlotUpgradeable.sol"; +import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import { IERC7802 } from "@openzeppelin/contracts/interfaces/draft-IERC7802.sol"; + +contract EXA is ERC20VotesUpgradeable, AccessControlUpgradeable, IERC7802 { + bytes32 public constant BRIDGE_ROLE = keccak256("BRIDGE_ROLE"); + bytes32 internal constant ADMIN_SLOT = bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1); + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } -contract EXA is ERC20VotesUpgradeable { function initialize() external initializer { + if (address(this).code.length > 0 && msg.sender != StorageSlotUpgradeable.getAddressSlot(ADMIN_SLOT).value) { + revert NotProxyAdmin(); + } + __ERC20_init("exactly", "EXA"); __ERC20Permit_init("exactly"); __ERC20Votes_init(); - _mint(msg.sender, 10_000_000e18); + if (block.chainid == 10) _mint(msg.sender, 10_000_000e18); + } + + function initialize2(address admin_) external reinitializer(2) { + if (msg.sender != StorageSlotUpgradeable.getAddressSlot(ADMIN_SLOT).value) revert NotProxyAdmin(); + if (admin_ == address(0)) revert ZeroAddress(); + if (bytes(symbol()).length == 0) revert NotInitialized(); + + __AccessControl_init(); + _grantRole(DEFAULT_ADMIN_ROLE, admin_); + } + + /// @inheritdoc IERC7802 + function crosschainMint(address to, uint256 amount) public onlyRole(BRIDGE_ROLE) { + _mint(to, amount); + emit CrosschainMint(to, amount, msg.sender); + } + + /// @inheritdoc IERC7802 + function crosschainBurn(address from, uint256 amount) public onlyRole(BRIDGE_ROLE) { + _burn(from, amount); + emit CrosschainBurn(from, amount, msg.sender); + } + + function mint(address to, uint256 amount) external { + crosschainMint(to, amount); + } + + function burn(address from, uint256 amount) external { + crosschainBurn(from, amount); } function clock() public view override returns (uint48) { @@ -21,4 +66,14 @@ contract EXA is ERC20VotesUpgradeable { function CLOCK_MODE() public pure override returns (string memory) { return "mode=timestamp"; } + + function supportsInterface( + bytes4 interfaceId + ) public view override(AccessControlUpgradeable, IERC165) returns (bool) { + return interfaceId == type(IERC7802).interfaceId || super.supportsInterface(interfaceId); + } } + +error NotInitialized(); +error NotProxyAdmin(); +error ZeroAddress(); diff --git a/deploy/Markets.ts b/deploy/Markets.ts index bb3065581..383de6e43 100644 --- a/deploy/Markets.ts +++ b/deploy/Markets.ts @@ -62,7 +62,7 @@ const func: DeployFunction = async ({ contract: verified ? "VerifiedMarket" : "Market", args: [asset.target, auditor.target], envKey: "MARKETS", - unsafeAllow: ["constructor", "state-variable-immutable"], + unsafeAllow: ["constructor", "delegatecall", "state-variable-immutable"], }, async (name, opts) => deploy(name, { diff --git a/foundry.toml b/foundry.toml index 32b98f0e8..37718dc99 100644 --- a/foundry.toml +++ b/foundry.toml @@ -5,7 +5,6 @@ optimizer = true optimizer_runs = 1111 revert_strings = "strip" isolate = true -deny_warnings = true ignored_error_codes = ["unused-param", "code-size", "init-code-size"] ffi = true @@ -15,7 +14,7 @@ script = "scripts" cache_path = "cache/foundry" fs_permissions = [{ access = "read", path = "./deployments" }] verbosity = 3 -gas_limit = 2_500_000_000 +gas_limit = 3_000_000_000 [invariant] fail_on_revert = true diff --git a/package.json b/package.json index 73ce55198..4cd2efe1d 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "test:hardhat": "hardhat test --deploy-fixture", "coverage": "pnpm coverage:snapshot && pnpm coverage:foundry && pnpm coverage:hardhat && pnpm coverage:fuzzer", "coverage:foundry": "forge coverage --report lcov --no-match-contract Protocol", - "coverage:hardhat": "hardhat coverage", + "coverage:hardhat": "SOLIDITY_COVERAGE=true hardhat coverage", "coverage:snapshot": "FOUNDRY_PROFILE=snapshot forge snapshot --check --no-match-contract Protocol", "coverage:fuzzer": "FOUNDRY_PROFILE=production forge test --no-match-contract Protocol", "deploy:ethereum": "hardhat --network ethereum deploy", @@ -36,8 +36,8 @@ "node": ">=18" }, "dependencies": { - "@openzeppelin/contracts": "^5.0.2", - "@openzeppelin/contracts-upgradeable": "^5.0.2", + "@openzeppelin/contracts": "^5.4.0", + "@openzeppelin/contracts-upgradeable": "^5.4.0", "@openzeppelin/contracts-upgradeable-v4": "npm:@openzeppelin/contracts-upgradeable@^4.9.6", "@openzeppelin/contracts-v4": "npm:@openzeppelin/contracts@^4.9.6", "solady": "^0.1.26", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e8a0ed45c..7ba31b407 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,11 +9,11 @@ importers: .: dependencies: '@openzeppelin/contracts': - specifier: ^5.0.2 - version: 5.0.2 + specifier: ^5.4.0 + version: 5.4.0 '@openzeppelin/contracts-upgradeable': - specifier: ^5.0.2 - version: 5.0.2(@openzeppelin/contracts@5.0.2) + specifier: ^5.4.0 + version: 5.4.0(@openzeppelin/contracts@5.4.0) '@openzeppelin/contracts-upgradeable-v4': specifier: npm:@openzeppelin/contracts-upgradeable@^4.9.6 version: '@openzeppelin/contracts-upgradeable@4.9.6' @@ -670,16 +670,16 @@ packages: '@openzeppelin/contracts-upgradeable@4.9.6': resolution: {integrity: sha512-m4iHazOsOCv1DgM7eD7GupTJ+NFVujRZt1wzddDPSVGpWdKq1SKkla5htKG7+IS4d2XOCtzkUNwRZ7Vq5aEUMA==} - '@openzeppelin/contracts-upgradeable@5.0.2': - resolution: {integrity: sha512-0MmkHSHiW2NRFiT9/r5Lu4eJq5UJ4/tzlOgYXNAIj/ONkQTVnz22pLxDvp4C4uZ9he7ZFvGn3Driptn1/iU7tQ==} + '@openzeppelin/contracts-upgradeable@5.4.0': + resolution: {integrity: sha512-STJKyDzUcYuB35Zub1JpWW58JxvrFFVgQ+Ykdr8A9PGXgtq/obF5uoh07k2XmFyPxfnZdPdBdhkJ/n2YxJ87HQ==} peerDependencies: - '@openzeppelin/contracts': 5.0.2 + '@openzeppelin/contracts': 5.4.0 '@openzeppelin/contracts@4.9.6': resolution: {integrity: sha512-xSmezSupL+y9VkHZJGDoCBpmnB2ogM13ccaYDWqJTfS3dbuHkgjuwDFUmaFauBCboQMGB/S5UqUl2y54X99BmA==} - '@openzeppelin/contracts@5.0.2': - resolution: {integrity: sha512-ytPc6eLGcHHnapAZ9S+5qsdomhjo6QBHTDRRBFfTxXIpsicMhVPouPgmUPebZZZGX7vt9USA+Z+0M0dSVtSUEA==} + '@openzeppelin/contracts@5.4.0': + resolution: {integrity: sha512-eCYgWnLg6WO+X52I16TZt8uEjbtdkgLC0SUX/xnAksjjrQI4Xfn4iBRoI5j55dmlOhDv1Y7BoR3cU7e3WWhC6A==} '@openzeppelin/defender-sdk-base-client@1.14.4': resolution: {integrity: sha512-tOePVQLKpqfGQ1GMzHvSBNd2psPYd86LDNpvdl5gjD0Y2kW/zNh5qBXy29RraGtk/qc8zs9hzS5pAOh0vhGkGQ==} @@ -4651,13 +4651,13 @@ snapshots: '@openzeppelin/contracts-upgradeable@4.9.6': {} - '@openzeppelin/contracts-upgradeable@5.0.2(@openzeppelin/contracts@5.0.2)': + '@openzeppelin/contracts-upgradeable@5.4.0(@openzeppelin/contracts@5.4.0)': dependencies: - '@openzeppelin/contracts': 5.0.2 + '@openzeppelin/contracts': 5.4.0 '@openzeppelin/contracts@4.9.6': {} - '@openzeppelin/contracts@5.0.2': {} + '@openzeppelin/contracts@5.4.0': {} '@openzeppelin/defender-sdk-base-client@1.14.4(encoding@0.1.13)': dependencies: diff --git a/test/EXA.t.sol b/test/EXA.t.sol new file mode 100644 index 000000000..8661d0c1d --- /dev/null +++ b/test/EXA.t.sol @@ -0,0 +1,225 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.17; + +import { Test } from "forge-std/Test.sol"; +import { ProxyAdmin } from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; +import { + ITransparentUpgradeableProxy, + TransparentUpgradeableProxy +} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; +import { IAccessControl } from "@openzeppelin/contracts/access/IAccessControl.sol"; +import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import { IERC7802 } from "@openzeppelin/contracts/interfaces/draft-IERC7802.sol"; + +import { EXA, NotInitialized, NotProxyAdmin, ZeroAddress } from "../contracts/periphery/EXA.sol"; + +contract EXATest is Test { + EXA internal exa; + ProxyAdmin internal proxyAdmin; + ITransparentUpgradeableProxy internal proxy; + address internal admin; + address internal bob; + address internal bridge; + + function setUp() external { + admin = makeAddr("admin"); + bob = makeAddr("bob"); + bridge = makeAddr("bridge"); + + uint256 chainId = block.chainid; + vm.chainId(10); + proxyAdmin = new ProxyAdmin(); + exa = EXA( + address( + new TransparentUpgradeableProxy(address(new EXA()), address(proxyAdmin), abi.encodeCall(EXA.initialize, ())) + ) + ); + proxy = ITransparentUpgradeableProxy(payable(address(exa))); + proxyAdmin.upgradeAndCall(proxy, address(new EXA()), abi.encodeCall(EXA.initialize2, (admin))); + vm.chainId(chainId); + vm.startPrank(admin); + exa.grantRole(exa.BRIDGE_ROLE(), bridge); + vm.stopPrank(); + } + + function test_initialize_setsNameSymbolAndSupply() external view { + assertEq(exa.name(), "exactly"); + assertEq(exa.symbol(), "EXA"); + assertEq(exa.totalSupply(), 10_000_000e18); + } + + function test_initialize_totalSupplyIsZero_whenNotOptimism() external { + EXA exa_ = EXA( + address( + new TransparentUpgradeableProxy( + address(new EXA()), + address(new ProxyAdmin()), + abi.encodeCall(EXA.initialize, ()) + ) + ) + ); + assertEq(exa_.name(), "exactly"); + assertEq(exa_.symbol(), "EXA"); + assertEq(exa_.totalSupply(), 0); + } + + function test_initialize_reverts_whenCalledByNotProxyAdmin() external { + EXA exa_ = EXA(address(new TransparentUpgradeableProxy(address(new EXA()), address(new ProxyAdmin()), ""))); + + vm.expectRevert(NotProxyAdmin.selector); + exa_.initialize(); + } + + function test_initialize_succeeds_whenProxyAlreadyDeployedAndUpgradedWithCall() external { + ProxyAdmin proxyAdmin_ = new ProxyAdmin(); + ITransparentUpgradeableProxy proxy_ = ITransparentUpgradeableProxy( + payable(address(new TransparentUpgradeableProxy(address(new EXA()), address(proxyAdmin_), ""))) + ); + + proxyAdmin_.upgradeAndCall(proxy_, address(new EXA()), abi.encodeCall(EXA.initialize, ())); + + EXA exa_ = EXA(address(proxy_)); + assertEq(exa_.name(), "exactly"); + assertEq(exa_.symbol(), "EXA"); + } + + function test_initialize_reverts_whenCalledOnImplementation() external { + EXA implementation = new EXA(); + + vm.expectRevert(); + implementation.initialize(); + } + + function test_initialize_reverts_whenCalledTwice() external { + vm.expectRevert(); + exa.initialize(); + } + + function test_initialize2_reverts_whenCalledByNotProxyAdmin() external { + ProxyAdmin proxyAdmin_ = new ProxyAdmin(); + EXA exa_ = EXA( + address( + new TransparentUpgradeableProxy(address(new EXA()), address(proxyAdmin_), abi.encodeCall(EXA.initialize, ())) + ) + ); + + vm.prank(bob); + vm.expectRevert(NotProxyAdmin.selector); + exa_.initialize2(admin); + } + + function test_initialize2_reverts_whenAdminIsZeroAddress() external { + ProxyAdmin proxyAdmin_ = new ProxyAdmin(); + ITransparentUpgradeableProxy proxy_ = ITransparentUpgradeableProxy( + payable( + address( + new TransparentUpgradeableProxy(address(new EXA()), address(proxyAdmin_), abi.encodeCall(EXA.initialize, ())) + ) + ) + ); + EXA implementation = new EXA(); + + vm.expectRevert(ZeroAddress.selector); + proxyAdmin_.upgradeAndCall(proxy_, address(implementation), abi.encodeCall(EXA.initialize2, (address(0)))); + } + + function test_initialize2_grantsAdminRole() external view { + assertTrue(exa.hasRole(exa.DEFAULT_ADMIN_ROLE(), admin)); + } + + function test_initialize2_reverts_whenCalledBeforeInitialize() external { + ProxyAdmin proxyAdmin_ = new ProxyAdmin(); + address implementation = address(new EXA()); + ITransparentUpgradeableProxy proxy_ = ITransparentUpgradeableProxy( + payable(address(new TransparentUpgradeableProxy(implementation, address(proxyAdmin_), ""))) + ); + + vm.expectRevert(NotInitialized.selector); + proxyAdmin_.upgradeAndCall(proxy_, implementation, abi.encodeCall(EXA.initialize2, (admin))); + } + + function test_initialize2_reverts_whenCalledTwice() external { + EXA implementation = new EXA(); + + vm.expectRevert(); + proxyAdmin.upgradeAndCall(proxy, address(implementation), abi.encodeCall(EXA.initialize2, (admin))); + } + + function test_mint_mintsAndEmitsCrosschainMint() external { + vm.expectEmit(true, true, true, true, address(exa)); + emit IERC7802.CrosschainMint(bob, 100e18, bridge); + + vm.prank(bridge); + exa.mint(bob, 100e18); + + assertEq(exa.balanceOf(bob), 100e18); + } + + function test_mint_reverts_whenCallerLacksBridgeRole() external { + vm.expectRevert(); + exa.mint(bob, 100e18); + } + + function test_burn_burnsAndEmitsCrosschainBurn() external { + exa.transfer(bob, 100e18); + + vm.expectEmit(true, true, true, true, address(exa)); + emit IERC7802.CrosschainBurn(bob, 40e18, bridge); + vm.prank(bridge); + exa.burn(bob, 40e18); + + assertEq(exa.balanceOf(bob), 60e18); + } + + function test_burn_reverts_whenCallerLacksBridgeRole() external { + vm.expectRevert(); + exa.burn(bob, 100e18); + } + + function test_crosschainMint_mintsAndEmitsCrosschainMint() external { + vm.expectEmit(true, true, true, true, address(exa)); + emit IERC7802.CrosschainMint(bob, 100e18, bridge); + + vm.prank(bridge); + exa.crosschainMint(bob, 100e18); + + assertEq(exa.balanceOf(bob), 100e18); + } + + function test_crosschainMint_reverts_whenCallerLacksBridgeRole() external { + vm.expectRevert(); + exa.crosschainMint(bob, 100e18); + } + + function test_crosschainBurn_burnsAndEmitsCrosschainBurn() external { + exa.transfer(bob, 100e18); + + vm.expectEmit(true, true, true, true, address(exa)); + emit IERC7802.CrosschainBurn(bob, 40e18, bridge); + vm.prank(bridge); + exa.crosschainBurn(bob, 40e18); + + assertEq(exa.balanceOf(bob), 60e18); + } + + function test_crosschainBurn_reverts_whenCallerLacksBridgeRole() external { + vm.expectRevert(); + exa.crosschainBurn(bob, 100e18); + } + + function test_supportsInterface_returnsTrue_forIERC7802() external view { + assertTrue(exa.supportsInterface(type(IERC7802).interfaceId)); + } + + function test_supportsInterface_returnsTrue_forIERC165() external view { + assertTrue(exa.supportsInterface(type(IERC165).interfaceId)); + } + + function test_supportsInterface_returnsTrue_forIAccessControl() external view { + assertTrue(exa.supportsInterface(type(IAccessControl).interfaceId)); + } + + function test_supportsInterface_returnsFalse_forInvalidInterface() external view { + assertFalse(exa.supportsInterface(bytes4(0))); + } +} diff --git a/test/EscrowedEXA.t.sol b/test/EscrowedEXA.t.sol index 40e4d7a29..a2418c0a5 100644 --- a/test/EscrowedEXA.t.sol +++ b/test/EscrowedEXA.t.sol @@ -31,8 +31,10 @@ contract EscrowedEXATest is ForkTest { function setUp() external { vm.createSelectFork(vm.envString("OP_SEPOLIA_NODE"), 8_893_980); - exa = new EXA(); - exa.initialize(); + uint256 chainId = block.chainid; + vm.chainId(10); + exa = EXA(address(new ERC1967Proxy(address(new EXA()), abi.encodeCall(EXA.initialize, ())))); + vm.chainId(chainId); sablier = ISablierV2LockupLinear(deployment("SablierV2LockupLinear")); esEXA = EscrowedEXA( address(