-
Notifications
You must be signed in to change notification settings - Fork 34
feat: deployment engine #1047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: deployment engine #1047
Conversation
🌈 Test ResultsNo files changed, compilation skipped
Ran 2 tests for tests/deployments/procedures/deploy/AaveV4AccessManagerEnumerableDeployProcedure.t.sol:AaveV4AccessManagerEnumerableDeployProcedureTest
[PASS] test_deployAccessManagerEnumerable() (gas: 2609022)
[PASS] test_deployAccessManagerEnumerable_reverts() (gas: 10748)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 3.33ms (397.20µs CPU time)
Ran 2 tests for tests/deployments/procedures/deploy/roles/AaveV4AccessManagerRolesProcedure.t.sol:AaveV4AccessManagerRolesProcedureTest
[PASS] test_grantRootAdminRole() (gas: 143729)
[PASS] test_grantRootAdminRole_reverts() (gas: 15858)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 3.03ms (442.51µs CPU time)
Ran 10 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Constants.t.sol:SignatureGatewayConstantsTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 2053361)
[PASS] test_borrow_typeHash() (gas: 10008)
[PASS] test_constructor() (gas: 53238)
[PASS] test_eip712Domain() (gas: 2059041)
[PASS] test_repay_typeHash() (gas: 9954)
[PASS] test_setUsingAsCollateral_typeHash() (gas: 9943)
[PASS] test_supply_typeHash() (gas: 9945)
[PASS] test_updateUserDynamicConfig_typeHash() (gas: 10023)
[PASS] test_updateUserRiskPremium_typeHash() (gas: 10008)
[PASS] test_withdraw_typeHash() (gas: 10053)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 30.50ms (1.92ms CPU time)
Ran 5 tests for tests/unit/misc/SignatureGateway/SignatureGateway.PermitReserve.t.sol:SignatureGatewayPermitReserveTest
[PASS] test_permitReserve() (gas: 103906)
[PASS] test_permitReserve_forwards_correct_call() (gas: 51083)
[PASS] test_permitReserve_ignores_permit_reverts() (gas: 40029)
[PASS] test_permitReserve_revertsWith_ReserveNotListed() (gas: 30981)
[PASS] test_permitReserve_revertsWith_SpokeNotRegistered() (gas: 29518)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 28.23ms (1.68ms CPU time)
Ran 9 tests for tests/gas/Hub.Operations.gas.t.sol:HubOperations_Gas_Tests
[PASS] test_add() (gas: 273621)
[PASS] test_deficit() (gas: 1181315)
[PASS] test_draw() (gas: 424000)
[PASS] test_mintFeeShares() (gas: 506200)
[PASS] test_payFee_transferShares() (gas: 975230)
[PASS] test_refreshPremium() (gas: 636239)
[PASS] test_remove() (gas: 315061)
[PASS] test_restore() (gas: 891768)
[PASS] test_restore_with_transfer() (gas: 892489)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 59.99ms (7.63ms CPU time)
Ran 2 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.InsufficientAllowance.t.sol:SignatureGateway_InsufficientAllowance_Test
[PASS] test_repayWithSig_revertsWith_ERC20InsufficientAllowance() (gas: 455753)
[PASS] test_supplyWithSig_revertsWith_ERC20InsufficientAllowance() (gas: 84007)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 30.05ms (3.35ms CPU time)
Ran 6 tests for tests/unit/Hub/Hub.PayFee.t.sol:HubPayFeeTest
[PASS] test_payFee_fuzz(uint256,uint256) (runs: 5000, μ: 708817, ~: 708949)
[PASS] test_payFee_fuzz_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 709279, ~: 709548)
[PASS] test_payFee_revertsWith_InvalidShares() (gas: 20137)
[PASS] test_payFee_revertsWith_SpokeNotActive() (gas: 59823)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded() (gas: 139245)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded_with_interest() (gas: 653669)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 27.65s (41.88s CPU time)
Ran 10 tests for tests/unit/Hub/Hub.Reclaim.t.sol:HubReclaimTest
[PASS] test_reclaim() (gas: 681165)
Logs:
Bound result 1000000000000000000000
Bound result 500000000000000000000
Bound result 200000000000000000000
[PASS] test_reclaim_fullAmount() (gas: 661860)
[PASS] test_reclaim_fuzz(uint256,uint256,uint256) (runs: 5000, μ: 682933, ~: 682109)
[PASS] test_reclaim_multipleSweepsAndReclaims() (gas: 790190)
[PASS] test_reclaim_revertsWith_AssetNotListed() (gas: 12417)
[PASS] test_reclaim_revertsWith_InvalidAmount_zero() (gas: 93094)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 94008, ~: 94008)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController_init() (gas: 40065)
[PASS] test_reclaim_revertsWith_underflow_exceedsSwept() (gas: 98615)
[PASS] test_reclaim_revertsWith_underflow_exceedsSwept_afterSweep() (gas: 461900)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 15.77s (17.47s CPU time)
Ran 21 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.InvalidSignature.t.sol:SignatureGatewayInvalidSignatureTest
[PASS] test_borrowWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 212306, ~: 212306)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38383)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 36935)
[PASS] test_repayWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 212240, ~: 212240)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38426)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37001)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 135665, ~: 135665)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38426)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 36955)
[PASS] test_supplyWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 212303, ~: 212303)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38427)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37033)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 83933, ~: 83933)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 25553)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 26963)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 83976, ~: 83976)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 25558)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 27051)
[PASS] test_withdrawWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 212237, ~: 212237)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38491)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 36999)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 46.92s (76.46s CPU time)
Ran 7 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.SpokeNotRegistered.t.sol:SignatureGateway_SpokeNotRegistered_Test
[PASS] test_borrowWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13882, ~: 13882)
[PASS] test_repayWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13882, ~: 13882)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_SpokeNotRegistered((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 13857, ~: 13857)
[PASS] test_supplyWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13925, ~: 13925)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_SpokeNotRegistered((address,address,uint256,uint256)) (runs: 5000, μ: 14098, ~: 14098)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_SpokeNotRegistered((address,address,uint256,uint256)) (runs: 5000, μ: 14098, ~: 14098)
[PASS] test_withdrawWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13925, ~: 13925)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 8.89s (13.47s CPU time)
Ran 7 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.Unauthorized.t.sol:SignatureGateway_Unauthorized_PositionManagerActive_Test
[PASS] test_borrowWithSig_revertsWith_Unauthorized() (gas: 79812)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 113075)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 72951)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 140662)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 82358)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 82409)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 79823)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 32.30ms (4.31ms CPU time)
Ran 7 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.Unauthorized.t.sol:SignatureGateway_Unauthorized_PositionManagerNotActive_Test
[PASS] test_borrowWithSig_revertsWith_Unauthorized() (gas: 77611)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 110874)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 70750)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 138461)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 80157)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 80208)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 77622)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 34.03ms (4.23ms CPU time)
Ran 5 tests for tests/unit/Spoke/Spoke.AccrueLiquidityFee.EdgeCases.t.sol:SpokeAccrueLiquidityFeeEdgeCasesTest
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 540311, ~: 540385)
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium_multiple_users(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 791697, ~: 791733)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_spoke() (gas: 281455450)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_user() (gas: 194947189)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_with_premium() (gas: 540581)
Logs:
Bound result 500000000000000000000
Bound result 5000
Bound result 34560000
Bound result 2
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 19.05s (19.02s CPU time)
Ran 6 tests for tests/unit/Hub/Hub.ReportDeficit.t.sol:HubReportDeficitTest
[PASS] test_reportDeficit_fuzz_revertsWith_SurplusDrawnDeficitReported(uint256) (runs: 5000, μ: 221549, ~: 221284)
[PASS] test_reportDeficit_fuzz_revertsWith_SurplusPremiumRayDeficitReported(uint256) (runs: 5000, μ: 223248, ~: 222983)
[PASS] test_reportDeficit_fuzz_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 676665, ~: 677621)
[PASS] test_reportDeficit_revertsWith_InvalidAmount() (gas: 24301)
[PASS] test_reportDeficit_revertsWith_SpokeNotActive(address) (runs: 5000, μ: 32474, ~: 32474)
[PASS] test_reportDeficit_with_premium() (gas: 676174)
Logs:
Bound result 10000000000
Bound result 31536000
Bound result 5000000000
Bound result 0
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 18.90s (18.87s CPU time)
Ran 7 tests for tests/unit/Spoke/Spoke.AccrueLiquidityFee.t.sol:SpokeAccrueLiquidityFeeTest
[PASS] test_accrueLiquidityFee() (gas: 881451)
[PASS] test_accrueLiquidityFee_NoActionTaken() (gas: 120058)
[PASS] test_accrueLiquidityFee_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 247480, ~: 247462)
[PASS] test_accrueLiquidityFee_exact() (gas: 888038)
[PASS] test_accrueLiquidityFee_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 958086, ~: 980513)
[PASS] test_accrueLiquidityFee_maxLiquidityFee() (gas: 546562)
[PASS] test_accrueLiquidityFee_setUsingAsCollateral() (gas: 900416)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 21.91s (21.88s CPU time)
Ran 3 tests for tests/unit/Hub/Hub.Rescue.t.sol:HubRescueTest
[PASS] test_cannot_rescue_liquidity_fee_reverts_with_InsufficientTransferred() (gas: 281121)
[PASS] test_rescue_fuzz_with_interest(uint256,uint256) (runs: 5000, μ: 527418, ~: 527409)
[PASS] test_rescue_scenario_fuzz(uint256) (runs: 5000, μ: 464200, ~: 463999)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 19.84s (19.82s CPU time)
Ran 12 tests for tests/unit/Hub/Hub.RefreshPremium.t.sol:HubRefreshPremiumTest
[PASS] test_refreshPremium_emitsEvent() (gas: 259925)
[PASS] test_refreshPremium_fuzz_positiveDeltas(uint256,int256,int256) (runs: 5000, μ: 468257, ~: 472687)
[PASS] test_refreshPremium_fuzz_withAccrual(uint256,uint256,uint256,uint256) (runs: 5000, μ: 536054, ~: 542839)
[PASS] test_refreshPremium_maxRiskPremiumThreshold() (gas: 896930)
[PASS] test_refreshPremium_negativeDeltas(uint256) (runs: 5000, μ: 461658, ~: 461681)
[PASS] test_refreshPremium_negativeDeltas_withAccrual(uint256) (runs: 5000, μ: 534326, ~: 533991)
[PASS] test_refreshPremium_pausedSpokesAllowed() (gas: 120568)
[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_NonZeroRestoredPremiumRay() (gas: 856975)
[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_RiskPremiumThresholdExceeded_DecreasingPremium() (gas: 874884)
[PASS] test_refreshPremium_revertsWith_SpokeNotActive() (gas: 57839)
[PASS] test_refreshPremium_riskPremiumThreshold() (gas: 922297)
[PASS] test_refreshPremium_spokePremiumUpdateIsContained() (gas: 710324)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 62.51s (74.33s CPU time)
Ran 15 tests for tests/unit/Hub/Hub.Remove.t.sol:HubRemoveTest
[PASS] test_remove() (gas: 210711)
Logs:
Bound result 2
Bound result 100000000000000000000
[PASS] test_remove_all_with_interest() (gas: 377916)
[PASS] test_remove_fuzz(uint256,uint256) (runs: 5000, μ: 209237, ~: 209058)
[PASS] test_remove_fuzz_all_liquidity_with_interest(uint256,uint256) (runs: 5000, μ: 429897, ~: 430223)
[PASS] test_remove_fuzz_multi_spoke(uint256,uint256) (runs: 5000, μ: 293890, ~: 294039)
[PASS] test_remove_fuzz_multi_spoke_with_interest(uint256,uint256,uint256,uint256) (runs: 5000, μ: 433388, ~: 433972)
[PASS] test_remove_revertsWith_InsufficientLiquidity() (gas: 160498)
[PASS] test_remove_revertsWith_InsufficientLiquidity_exceeding_added_amount() (gas: 148158)
[PASS] test_remove_revertsWith_InsufficientLiquidity_zero_added() (gas: 20687)
[PASS] test_remove_revertsWith_InvalidAddress() (gas: 15724)
[PASS] test_remove_revertsWith_InvalidAmount() (gas: 17828)
[PASS] test_remove_revertsWith_SpokeNotActive() (gas: 59887)
[PASS] test_remove_revertsWith_SpokePaused() (gas: 59993)
[PASS] test_remove_revertsWith_underflow_exceeding_added_amount() (gas: 188138)
[PASS] test_remove_revertsWtih_underflow_one_extra_wei() (gas: 372884)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 33.44s (58.90s CPU time)
Ran 5 tests for tests/unit/Spoke/Spoke.Borrow.EdgeCases.t.sol:SpokeBorrowEdgeCasesTest
[PASS] test_borrow_fuzz_rounding_effect(uint256,uint256) (runs: 5000, μ: 1049907, ~: 1050063)
[PASS] test_borrow_fuzz_rounding_effect_inflated_ex_rate(uint256,uint256,uint256) (runs: 5000, μ: 1417861, ~: 1417970)
[PASS] test_borrow_fuzz_rounding_effect_shares(uint256,uint256) (runs: 5000, μ: 1083624, ~: 1083395)
[PASS] test_borrow_rounding_effect_multiple_actions() (gas: 1146335)
[PASS] test_borrow_rounding_effect_shares() (gas: 1082599)
Logs:
Bound result 5000000000000000000
Bound result 94608000
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 63.11s (63.08s CPU time)
Ran 4 tests for tests/unit/Hub/Hub.Skim.t.sol:HubSkimTest
[PASS] test_skimAdd_fuzz_donationAfterAdd(uint256,uint256,uint256) (runs: 5000, μ: 229014, ~: 229010)
[PASS] test_skimAdd_fuzz_donationBeforeAdd(uint256,uint256,uint256) (runs: 5000, μ: 229090, ~: 229086)
[PASS] test_skimAdd_fuzz_wrongSpokeTransfer(uint256,uint256,uint256) (runs: 5000, μ: 217901, ~: 217846)
[PASS] test_skimRestore_fuzz_liquidityDonation(uint256,uint256,uint256) (runs: 5000, μ: 277234, ~: 278838)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 28.68s (28.65s CPU time)
Ran 8 tests for tests/unit/Hub/Hub.Sweep.t.sol:HubSweepTest
[PASS] test_sweep() (gas: 486752)
Logs:
Bound result 1000000000000000000000
Bound result 1000000000000000000000
[PASS] test_sweep_does_not_impact_utilization(uint256,uint256) (runs: 5000, μ: 635945, ~: 637331)
[PASS] test_sweep_fuzz(uint256,uint256) (runs: 5000, μ: 487261, ~: 487272)
[PASS] test_sweep_revertsWith_AssetNotListed() (gas: 12384)
[PASS] test_sweep_revertsWith_InsufficientLiquidity() (gas: 222436)
[PASS] test_sweep_revertsWith_InvalidAmount() (gas: 104244)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 94725, ~: 94725)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController_init() (gas: 40077)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 19.80s (19.78s CPU time)
Ran 7 tests for tests/unit/Hub/Hub.TransferShares.t.sol:HubTransferSharesTest
[PASS] test_transferShares() (gas: 189518)
Logs:
Bound result 1000000000000000000000
Bound result 1000000000000000000000
[PASS] test_transferShares_fuzz(uint256,uint256) (runs: 5000, μ: 192871, ~: 193103)
[PASS] test_transferShares_fuzz_revertsWith_underflow_spoke_added_shares_exceeded(uint256) (runs: 5000, μ: 151989, ~: 151708)
[PASS] test_transferShares_revertsWith_AddCapExceeded() (gas: 195482)
[PASS] test_transferShares_revertsWith_SpokeNotActive() (gas: 177046)
[PASS] test_transferShares_revertsWith_SpokePaused() (gas: 179338)
[PASS] test_transferShares_zeroShares_revertsWith_InvalidShares() (gas: 22436)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 7.80s (7.78s CPU time)
Ran 11 tests for tests/unit/Spoke/Liquidations/Spoke.LiquidationCall.t.sol:SpokeLiquidationCallTest_SmallLiquidationBonus_SmallPosition
[PASS] test_liquidationCall_fuzz_ManyCollaterals_ManyDebts_UserInsolvent(uint256,uint256,address,uint256,bool) (runs: 1000, μ: 13207646, ~: 13136047)
[PASS] test_liquidationCall_fuzz_ManyCollaterals_ManyDebts_UserSolvent(uint256,uint256,address,uint256,bool) (runs: 1000, μ: 13068419, ~: 13086795)
[PASS] test_liquidationCall_fuzz_ManyCollaterals_OneDebt_UserInsolvent(uint256,uint256,address,uint256,bool) (runs: 1000, μ: 11119935, ~: 11111484)
[PASS] test_liquidationCall_fuzz_ManyCollaterals_OneDebt_UserSolvent(uint256,uint256,address,uint256,bool) (runs: 1000, μ: 10983924, ~: 10950944)
[PASS] test_liquidationCall_fuzz_OneCollateral_ManyDebts_UserInsolvent(uint256,uint256,address,uint256,bool) (runs: 1000, μ: 13532920, ~: 13482218)
[PASS] test_liquidationCall_fuzz_OneCollateral_ManyDebts_UserSolvent(uint256,uint256,address,uint256,bool) (runs: 1000, μ: 13688326, ~: 13623208)
[PASS] test_liquidationCall_fuzz_OneCollateral_OneDebt_UserInsolvent(uint256,uint256,address,uint256,bool) (runs: 1000, μ: 9115955, ~: 9102132)
[PASS] test_liquidationCall_fuzz_OneCollateral_OneDebt_UserSolvent(uint256,uint256,address,uint256,bool) (runs: 1000, μ: 8866082, ~: 8891967)
[PASS] test_validateLiquidationCall_revertsWith_CannotReceiveShares(uint256,uint256,address,uint256) (runs: 1000, μ: 7444428, ~: 7458652)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotListed_CollateralReserve(uint256,uint256) (runs: 1000, μ: 23000, ~: 23000)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotListed_DebtReserve(uint256,uint256) (runs: 1000, μ: 25267, ~: 25267)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 241.36s (375.63s CPU time)
Ran 6 tests for tests/unit/Hub/HubAccrueInterest.t.sol:HubAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 43822)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 404945, ~: 404858)
[PASS] test_accrueInterest_NoInterest_OnlyAdd(uint40) (runs: 5000, μ: 211890, ~: 211838)
[PASS] test_accrueInterest_fuzz_BorrowAmountAndElapsed(uint256,uint40) (runs: 5000, μ: 277872, ~: 277524)
[PASS] test_accrueInterest_fuzz_BorrowAmountRateAndElapsed(uint256,uint256,uint40) (runs: 5000, μ: 404977, ~: 404767)
[PASS] test_accrueInterest_fuzz_BorrowAndWait(uint40) (runs: 5000, μ: 276650, ~: 276563)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 28.34s (28.31s CPU time)
Ran 60 tests for tests/unit/HubConfigurator.t.sol:HubConfiguratorTest
[PASS] test_addAsset_fuzz(bool,address,uint8,address,uint256,uint16,uint32,uint32,uint32) (runs: 5000, μ: 968876, ~: 969530)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(bool,address,uint8,address,uint256,address) (runs: 5000, μ: 57748, ~: 57666)
[PASS] test_addAsset_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 31178, ~: 31178)
[PASS] test_addAsset_revertsWith_InvalidAddress_irStrategy() (gas: 50897)
[PASS] test_addAsset_revertsWith_InvalidAddress_underlying() (gas: 50818)
[PASS] test_addAsset_revertsWith_InvalidLiquidityFee() (gas: 872531)
[PASS] test_addAsset_reverts_invalidIrData() (gas: 46924)
[PASS] test_addSpoke() (gas: 126273)
[PASS] test_addSpokeToAssets() (gas: 222950)
[PASS] test_addSpokeToAssets_revertsWith_MismatchedConfigs() (gas: 24885)
[PASS] test_addSpokeToAssets_revertsWith_OwnableUnauthorizedAccount() (gas: 17143)
[PASS] test_addSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 16919)
[PASS] test_deactivateAsset() (gas: 159321)
[PASS] test_deactivateAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 17972)
[PASS] test_deactivateSpoke() (gas: 156826)
[PASS] test_deactivateSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 18041)
[PASS] test_freezeAsset() (gas: 233954)
[PASS] test_freezeAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 18035)
[PASS] test_freezeSpoke() (gas: 250152)
[PASS] test_freezeSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 18019)
[PASS] test_pauseAsset() (gas: 159309)
[PASS] test_pauseAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 17992)
[PASS] test_pauseSpoke() (gas: 156904)
[PASS] test_pauseSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 18040)
[PASS] test_updateFeeConfig_Scenario() (gas: 336120)
Logs:
Bound result 0
Bound result 1800
Bound result 0
Bound result 400
Bound result 0
Bound result 0
[PASS] test_updateFeeConfig_fuzz(uint256,uint16,address) (runs: 5000, μ: 185990, ~: 186306)
[PASS] test_updateFeeConfig_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17677, ~: 17677)
[PASS] test_updateFeeConfig_revertsWith_InvalidAddress_spoke() (gas: 50138)
[PASS] test_updateFeeConfig_revertsWith_InvalidLiquidityFee() (gas: 52281)
[PASS] test_updateFeeReceiver_Scenario() (gas: 214655)
[PASS] test_updateFeeReceiver_WithdrawFromOldSpoke() (gas: 1041520)
[PASS] test_updateFeeReceiver_correctAccruals() (gas: 1076840)
[PASS] test_updateFeeReceiver_fuzz(address) (runs: 5000, μ: 179961, ~: 179961)
[PASS] test_updateFeeReceiver_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17286, ~: 17286)
[PASS] test_updateFeeReceiver_revertsWith_InvalidAddress_spoke() (gas: 54751)
[PASS] test_updateFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 86333)
[PASS] test_updateInterestRateData() (gas: 74064)
[PASS] test_updateInterestRateData_revertsWith_OwnableUnauthorizedAccount() (gas: 19235)
[PASS] test_updateInterestRateStrategy() (gas: 93842)
[PASS] test_updateInterestRateStrategy_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 28671, ~: 28671)
[PASS] test_updateInterestRateStrategy_revertsWith_InterestRateStrategyReverts() (gas: 76736)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidAddress_irStrategy() (gas: 66394)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidInterestRateStrategy() (gas: 66884)
[PASS] test_updateLiquidityFee_fuzz(uint256,uint16) (runs: 5000, μ: 90566, ~: 92247)
[PASS] test_updateLiquidityFee_revertsWith_InvalidLiquidityFee() (gas: 54801)
[PASS] test_updateLiquidityFee_revertsWith_OwnableUnauthorizedAccount() (gas: 16605)
[PASS] test_updateReinvestmentController() (gas: 101755)
[PASS] test_updateReinvestmentController_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17199, ~: 17199)
[PASS] test_updateSpokeActive() (gas: 84543)
[PASS] test_updateSpokeActive_revertsWith_OwnableUnauthorizedAccount() (gas: 20250)
[PASS] test_updateSpokeCaps() (gas: 64616)
[PASS] test_updateSpokeCaps_revertsWith_OwnableUnauthorizedAccount() (gas: 20225)
[PASS] test_updateSpokeDrawCap() (gas: 64345)
[PASS] test_updateSpokeDrawCap_revertsWith_OwnableUnauthorizedAccount() (gas: 20201)
[PASS] test_updateSpokePaused() (gas: 87545)
[PASS] test_updateSpokePaused_revertsWith_OwnableUnauthorizedAccount() (gas: 20339)
[PASS] test_updateSpokeRiskPremiumThreshold() (gas: 64398)
[PASS] test_updateSpokeRiskPremiumThreshold_revertsWith_OwnableUnauthorizedAccount() (gas: 20268)
[PASS] test_updateSpokeSupplyCap() (gas: 64402)
[PASS] test_updateSpokeSupplyCap_revertsWith_OwnableUnauthorizedAccount() (gas: 20235)
Suite result: ok. 60 passed; 0 failed; 0 skipped; finished in 10.82s (10.80s CPU time)
Ran 15 tests for tests/deployments/AaveV4BatchDeployment.t.sol:AaveV4BatchDeploymentTest
[PASS] testAaveV4BatchDeployment() (gas: 51073962)
Logs:
...Deploying AccessBatch...
AccessManager: 0xb98747556230eC1b505a27a7fCe3E97340a37a81
...Deploying ConfiguratorBatch...
HubConfigurator: 0x60955C7B4D220939E905a46f2f46836eBeb7738d
SpokeConfigurator: 0x44aB6B00f253e8520B7E2442a5a12e2e792E616F
...Deploying HubBatch...
hub1
Hub: 0x6Af530E3E82D3850eb0f21d0944284E84cB307FB
InterestRateStrategy: 0x198C5394E1aF87e8f56760e41643d28fb0F3EF8C
TreasurySpoke: 0x3c7A8c6bDAE3a195Fdb99257ECF7dC8ca02714Ab
...Setting Hub roles...
...Deploying HubBatch...
hub2
Hub: 0xf61dAb9dF084D9896EAEf874117a827020f8680a
InterestRateStrategy: 0x572930033B11D78845651E8e191501e1582F3D75
TreasurySpoke: 0xd3Fe3BaA3758b9963d0593f798c6CECf3cCBF2Af
...Setting Hub roles...
...Deploying HubBatch...
hub3
Hub: 0xeD14f273D6F8434aB737976992B59A82EA2E533f
InterestRateStrategy: 0xd62Ec09BA1142b9E69d432c35b8e4E689C1A008C
TreasurySpoke: 0x09bF5E23cB2a54c8040F2a48580Bbd2f713451bc
...Setting Hub roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke1
SpokeInstance Proxy: 0x926b3cD2EDC2723ABeCa83054EDC267A2D496A18
SpokeInstance Implementation: 0xec3e2A175b3E084e93c506BCB257aEb071D5DF3b
AaveOracle: 0xF98EA47C7980e60Dc9Ad3b59e2E90BA7aaD18cb0
...Setting Spoke roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke2
SpokeInstance Proxy: 0x1e85c49B293011D83B6e985cF6653aE7087FCcD2
SpokeInstance Implementation: 0x0eC109df06848645315E79C2379AaF6F4DD18021
AaveOracle: 0x7bbF82d926eeB5089eeFABb513Fd48B8caDAa985
...Setting Spoke roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke3
SpokeInstance Proxy: 0xF66EFE4fCa8fF165536EF84eA366d9452370CD5b
SpokeInstance Implementation: 0x0E9620C017AaF9d1b71DACF27E958F7A29523D16
AaveOracle: 0xB4D4F32E88C66DEA074BB09aE52899D642b7E249
...Setting Spoke roles...
...Deploying GatewayBatch...
NativeTokenGateway: 0x6a99D499Bb97041223d414305f97ec33A2d7b4d1
SignatureGateway: 0xB53357492Fb8d8A15f32349f3C9572Abf9080Db3
...Granting Hub Admin role...
...Granting Hub Configurator roles...
...Granting Spoke Admin role...
...Granting Spoke Configurator roles...
...Granting AccessManager Root Admin role...
[PASS] testAaveV4BatchDeployment_fuzz_sanitizedInputs((address,address,address,address,address,address,address,address,address,bool,string[],string[],bytes32)) (runs: 5000, μ: 51221068, ~: 51220183)
[PASS] testAaveV4BatchDeployment_fuzz_withRoles((address,address,address,address,address,address,address,address,address,bool,string[],string[],bytes32),address,bool,bool,bool) (runs: 5000, μ: 30707463, ~: 29618726)
[PASS] testAaveV4BatchDeployment_fuzz_withZeroSpokeProxyAdminOwner(bool,bool) (runs: 5000, μ: 27584925, ~: 28995117)
[PASS] testAaveV4BatchDeployment_fuzz_withZeroTreasurySpokeOwner(bool,bool) (runs: 5000, μ: 21925430, ~: 31557708)
[PASS] testAaveV4BatchDeployment_fuzz_withoutRoles((address,address,address,address,address,address,address,address,address,bool,string[],string[],bytes32),address,bool,bool,bool) (runs: 5000, μ: 28785565, ~: 28586711)
[PASS] testAaveV4BatchDeployment_withZeroAccessManagerAdmin_withRoles_reverts() (gas: 50377800)
Logs:
...Deploying AccessBatch...
AccessManager: 0xb98747556230eC1b505a27a7fCe3E97340a37a81
...Deploying ConfiguratorBatch...
HubConfigurator: 0x60955C7B4D220939E905a46f2f46836eBeb7738d
SpokeConfigurator: 0x44aB6B00f253e8520B7E2442a5a12e2e792E616F
...Deploying HubBatch...
hub1
Hub: 0x6Af530E3E82D3850eb0f21d0944284E84cB307FB
InterestRateStrategy: 0x198C5394E1aF87e8f56760e41643d28fb0F3EF8C
TreasurySpoke: 0x3c7A8c6bDAE3a195Fdb99257ECF7dC8ca02714Ab
...Setting Hub roles...
...Deploying HubBatch...
hub2
Hub: 0xf61dAb9dF084D9896EAEf874117a827020f8680a
InterestRateStrategy: 0x572930033B11D78845651E8e191501e1582F3D75
TreasurySpoke: 0xd3Fe3BaA3758b9963d0593f798c6CECf3cCBF2Af
...Setting Hub roles...
...Deploying HubBatch...
hub3
Hub: 0xeD14f273D6F8434aB737976992B59A82EA2E533f
InterestRateStrategy: 0xd62Ec09BA1142b9E69d432c35b8e4E689C1A008C
TreasurySpoke: 0x09bF5E23cB2a54c8040F2a48580Bbd2f713451bc
...Setting Hub roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke1
SpokeInstance Proxy: 0x926b3cD2EDC2723ABeCa83054EDC267A2D496A18
SpokeInstance Implementation: 0xec3e2A175b3E084e93c506BCB257aEb071D5DF3b
AaveOracle: 0xF98EA47C7980e60Dc9Ad3b59e2E90BA7aaD18cb0
...Setting Spoke roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke2
SpokeInstance Proxy: 0x1e85c49B293011D83B6e985cF6653aE7087FCcD2
SpokeInstance Implementation: 0x0eC109df06848645315E79C2379AaF6F4DD18021
AaveOracle: 0x7bbF82d926eeB5089eeFABb513Fd48B8caDAa985
...Setting Spoke roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke3
SpokeInstance Proxy: 0xF66EFE4fCa8fF165536EF84eA366d9452370CD5b
SpokeInstance Implementation: 0x0E9620C017AaF9d1b71DACF27E958F7A29523D16
AaveOracle: 0xB4D4F32E88C66DEA074BB09aE52899D642b7E249
...Setting Spoke roles...
...Deploying GatewayBatch...
NativeTokenGateway: 0x6a99D499Bb97041223d414305f97ec33A2d7b4d1
SignatureGateway: 0xB53357492Fb8d8A15f32349f3C9572Abf9080Db3
...Granting Hub Admin role...
...Granting Hub Configurator roles...
...Granting Spoke Admin role...
...Granting Spoke Configurator roles...
...Granting AccessManager Root Admin role...
[PASS] testAaveV4BatchDeployment_withZeroAccessManagerAdmin_withoutRoles() (gas: 50491096)
Logs:
...Deploying AccessBatch...
AccessManager: 0xb98747556230eC1b505a27a7fCe3E97340a37a81
...Deploying ConfiguratorBatch...
HubConfigurator: 0x60955C7B4D220939E905a46f2f46836eBeb7738d
SpokeConfigurator: 0x44aB6B00f253e8520B7E2442a5a12e2e792E616F
...Deploying HubBatch...
hub1
Hub: 0x6Af530E3E82D3850eb0f21d0944284E84cB307FB
InterestRateStrategy: 0x198C5394E1aF87e8f56760e41643d28fb0F3EF8C
TreasurySpoke: 0x3c7A8c6bDAE3a195Fdb99257ECF7dC8ca02714Ab
...Setting Hub roles...
...Deploying HubBatch...
hub2
Hub: 0xf61dAb9dF084D9896EAEf874117a827020f8680a
InterestRateStrategy: 0x572930033B11D78845651E8e191501e1582F3D75
TreasurySpoke: 0xd3Fe3BaA3758b9963d0593f798c6CECf3cCBF2Af
...Setting Hub roles...
...Deploying HubBatch...
hub3
Hub: 0xeD14f273D6F8434aB737976992B59A82EA2E533f
InterestRateStrategy: 0xd62Ec09BA1142b9E69d432c35b8e4E689C1A008C
TreasurySpoke: 0x09bF5E23cB2a54c8040F2a48580Bbd2f713451bc
...Setting Hub roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke1
SpokeInstance Proxy: 0x926b3cD2EDC2723ABeCa83054EDC267A2D496A18
SpokeInstance Implementation: 0xec3e2A175b3E084e93c506BCB257aEb071D5DF3b
AaveOracle: 0xF98EA47C7980e60Dc9Ad3b59e2E90BA7aaD18cb0
...Setting Spoke roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke2
SpokeInstance Proxy: 0x1e85c49B293011D83B6e985cF6653aE7087FCcD2
SpokeInstance Implementation: 0x0eC109df06848645315E79C2379AaF6F4DD18021
AaveOracle: 0x7bbF82d926eeB5089eeFABb513Fd48B8caDAa985
...Setting Spoke roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke3
SpokeInstance Proxy: 0xF66EFE4fCa8fF165536EF84eA366d9452370CD5b
SpokeInstance Implementation: 0x0E9620C017AaF9d1b71DACF27E958F7A29523D16
AaveOracle: 0xB4D4F32E88C66DEA074BB09aE52899D642b7E249
...Setting Spoke roles...
...Deploying GatewayBatch...
NativeTokenGateway: 0x6a99D499Bb97041223d414305f97ec33A2d7b4d1
SignatureGateway: 0xB53357492Fb8d8A15f32349f3C9572Abf9080Db3
[PASS] testAaveV4BatchDeployment_withZeroHubConfiguratorOwner_reverts() (gas: 2790323)
Logs:
...Deploying AccessBatch...
AccessManager: 0xb98747556230eC1b505a27a7fCe3E97340a37a81
...Deploying ConfiguratorBatch...
[PASS] testAaveV4BatchDeployment_withZeroSpokeConfiguratorOwner_reverts() (gas: 4873386)
Logs:
...Deploying AccessBatch...
AccessManager: 0xb98747556230eC1b505a27a7fCe3E97340a37a81
...Deploying ConfiguratorBatch...
[PASS] testAaveV4BatchDeployment_withZeroSpokeConfiguratorOwner_withoutRoles_reverts() (gas: 4872888)
Logs:
...Deploying AccessBatch...
AccessManager: 0xb98747556230eC1b505a27a7fCe3E97340a37a81
...Deploying ConfiguratorBatch...
[PASS] testAaveV4BatchDeployment_withoutHubs() (gas: 31860019)
Logs:
...Deploying AccessBatch...
AccessManager: 0xb98747556230eC1b505a27a7fCe3E97340a37a81
...Deploying ConfiguratorBatch...
HubConfigurator: 0x60955C7B4D220939E905a46f2f46836eBeb7738d
SpokeConfigurator: 0x44aB6B00f253e8520B7E2442a5a12e2e792E616F
...Deploying AaveV4SpokeInstanceBatch...
spoke1
SpokeInstance Proxy: 0xedC3915eE3393b2833a5fF7bA22b1341d5A66aF4
SpokeInstance Implementation: 0xc60eEae4031048Dd8FB529a7899eD92f0a6A9bA3
AaveOracle: 0xcF9F374922476C09607b9dcFF1fCA397BABE0b0C
...Setting Spoke roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke2
SpokeInstance Proxy: 0xb3049FbEDcf4ac0D301F88F4E6AEbeCBB0490fE9
SpokeInstance Implementation: 0xF865BBCD862Ba979283a427e670bf6A1950E1d0d
AaveOracle: 0xe7bcb2C7Cf0B4FDdB62FB3dd7c55fb04c74aEA42
...Setting Spoke roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke3
SpokeInstance Proxy: 0x1Fc61761d36Ce88F73D9043f7378656C7e7c7F49
SpokeInstance Implementation: 0x6b468C9C0c7170eE0B1331824e7495D540931E16
AaveOracle: 0xE44B53594DBC1BCE775a0b0D6B1004edB24Ad93c
...Setting Spoke roles...
...Deploying GatewayBatch...
NativeTokenGateway: 0x6a99D499Bb97041223d414305f97ec33A2d7b4d1
SignatureGateway: 0xB53357492Fb8d8A15f32349f3C9572Abf9080Db3
...Granting Spoke Admin role...
...Granting Spoke Configurator roles...
...Granting AccessManager Root Admin role...
[PASS] testAaveV4BatchDeployment_withoutNativeGateway() (gas: 47820760)
Logs:
...Deploying AccessBatch...
AccessManager: 0xb98747556230eC1b505a27a7fCe3E97340a37a81
...Deploying ConfiguratorBatch...
HubConfigurator: 0x60955C7B4D220939E905a46f2f46836eBeb7738d
SpokeConfigurator: 0x44aB6B00f253e8520B7E2442a5a12e2e792E616F
...Deploying HubBatch...
hub1
Hub: 0x6Af530E3E82D3850eb0f21d0944284E84cB307FB
InterestRateStrategy: 0x198C5394E1aF87e8f56760e41643d28fb0F3EF8C
TreasurySpoke: 0x3c7A8c6bDAE3a195Fdb99257ECF7dC8ca02714Ab
...Setting Hub roles...
...Deploying HubBatch...
hub2
Hub: 0xf61dAb9dF084D9896EAEf874117a827020f8680a
InterestRateStrategy: 0x572930033B11D78845651E8e191501e1582F3D75
TreasurySpoke: 0xd3Fe3BaA3758b9963d0593f798c6CECf3cCBF2Af
...Setting Hub roles...
...Deploying HubBatch...
hub3
Hub: 0xeD14f273D6F8434aB737976992B59A82EA2E533f
InterestRateStrategy: 0xd62Ec09BA1142b9E69d432c35b8e4E689C1A008C
TreasurySpoke: 0x09bF5E23cB2a54c8040F2a48580Bbd2f713451bc
...Setting Hub roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke1
SpokeInstance Proxy: 0x926b3cD2EDC2723ABeCa83054EDC267A2D496A18
SpokeInstance Implementation: 0xec3e2A175b3E084e93c506BCB257aEb071D5DF3b
AaveOracle: 0xF98EA47C7980e60Dc9Ad3b59e2E90BA7aaD18cb0
...Setting Spoke roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke2
SpokeInstance Proxy: 0x1e85c49B293011D83B6e985cF6653aE7087FCcD2
SpokeInstance Implementation: 0x0eC109df06848645315E79C2379AaF6F4DD18021
AaveOracle: 0x7bbF82d926eeB5089eeFABb513Fd48B8caDAa985
...Setting Spoke roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke3
SpokeInstance Proxy: 0xF66EFE4fCa8fF165536EF84eA366d9452370CD5b
SpokeInstance Implementation: 0x0E9620C017AaF9d1b71DACF27E958F7A29523D16
AaveOracle: 0xB4D4F32E88C66DEA074BB09aE52899D642b7E249
...Setting Spoke roles...
...Granting Hub Admin role...
...Granting Hub Configurator roles...
...Granting Spoke Admin role...
...Granting Spoke Configurator roles...
...Granting AccessManager Root Admin role...
[PASS] testAaveV4BatchDeployment_withoutRoles() (gas: 50492887)
Logs:
...Deploying AccessBatch...
AccessManager: 0xb98747556230eC1b505a27a7fCe3E97340a37a81
...Deploying ConfiguratorBatch...
HubConfigurator: 0x60955C7B4D220939E905a46f2f46836eBeb7738d
SpokeConfigurator: 0x44aB6B00f253e8520B7E2442a5a12e2e792E616F
...Deploying HubBatch...
hub1
Hub: 0x6Af530E3E82D3850eb0f21d0944284E84cB307FB
InterestRateStrategy: 0x198C5394E1aF87e8f56760e41643d28fb0F3EF8C
TreasurySpoke: 0x3c7A8c6bDAE3a195Fdb99257ECF7dC8ca02714Ab
...Setting Hub roles...
...Deploying HubBatch...
hub2
Hub: 0xf61dAb9dF084D9896EAEf874117a827020f8680a
InterestRateStrategy: 0x572930033B11D78845651E8e191501e1582F3D75
TreasurySpoke: 0xd3Fe3BaA3758b9963d0593f798c6CECf3cCBF2Af
...Setting Hub roles...
...Deploying HubBatch...
hub3
Hub: 0xeD14f273D6F8434aB737976992B59A82EA2E533f
InterestRateStrategy: 0xd62Ec09BA1142b9E69d432c35b8e4E689C1A008C
TreasurySpoke: 0x09bF5E23cB2a54c8040F2a48580Bbd2f713451bc
...Setting Hub roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke1
SpokeInstance Proxy: 0x926b3cD2EDC2723ABeCa83054EDC267A2D496A18
SpokeInstance Implementation: 0xec3e2A175b3E084e93c506BCB257aEb071D5DF3b
AaveOracle: 0xF98EA47C7980e60Dc9Ad3b59e2E90BA7aaD18cb0
...Setting Spoke roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke2
SpokeInstance Proxy: 0x1e85c49B293011D83B6e985cF6653aE7087FCcD2
SpokeInstance Implementation: 0x0eC109df06848645315E79C2379AaF6F4DD18021
AaveOracle: 0x7bbF82d926eeB5089eeFABb513Fd48B8caDAa985
...Setting Spoke roles...
...Deploying AaveV4SpokeInstanceBatch...
spoke3
SpokeInstance Proxy: 0xF66EFE4fCa8fF165536EF84eA366d9452370CD5b
SpokeInstance Implementation: 0x0E9620C017AaF9d1b71DACF27E958F7A29523D16
AaveOracle: 0xB4D4F32E88C66DEA074BB09aE52899D642b7E249
...Setting Spoke roles...
...Deploying GatewayBatch...
NativeTokenGateway: 0x6a99D499Bb97041223d414305f97ec33A2d7b4d1
SignatureGateway: 0xB53357492Fb8d8A15f32349f3C9572Abf9080Db3
[PASS] testAaveV4BatchDeployment_withoutSpokes() (gas: 29295769)
Logs:
...Deploying AccessBatch...
AccessManager: 0xb98747556230eC1b505a27a7fCe3E97340a37a81
...Deploying ConfiguratorBatch...
HubConfigurator: 0x60955C7B4D220939E905a46f2f46836eBeb7738d
SpokeConfigurator: 0x44aB6B00f253e8520B7E2442a5a12e2e792E616F
...Deploying HubBatch...
hub1
Hub: 0x6Af530E3E82D3850eb0f21d0944284E84cB307FB
InterestRateStrategy: 0x198C5394E1aF87e8f56760e41643d28fb0F3EF8C
TreasurySpoke: 0x3c7A8c6bDAE3a195Fdb99257ECF7dC8ca02714Ab
...Setting Hub roles...
...Deploying HubBatch...
hub2
Hub: 0xf61dAb9dF084D9896EAEf874117a827020f8680a
InterestRateStrategy: 0x572930033B11D78845651E8e191501e1582F3D75
TreasurySpoke: 0xd3Fe3BaA3758b9963d0593f798c6CECf3cCBF2Af
...Setting Hub roles...
...Deploying HubBatch...
hub3
Hub: 0xeD14f273D6F8434aB737976992B59A82EA2E533f
InterestRateStrategy: 0xd62Ec09BA1142b9E69d432c35b8e4E689C1A008C
TreasurySpoke: 0x09bF5E23cB2a54c8040F2a48580Bbd2f713451bc
...Setting Hub roles...
...Deploying GatewayBatch...
NativeTokenGateway: 0x6a99D499Bb97041223d414305f97ec33A2d7b4d1
SignatureGateway: 0xB53357492Fb8d8A15f32349f3C9572Abf9080Db3
...Granting Hub Admin role...
...Granting Hub Configurator roles...
...Granting AccessManager Root Admin role...
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 266.71s (266.71s CPU time)
Ran 10 tests for tests/scripts/AaveV4DeployBatchBaseScript.t.sol:AaveV4DeployBatchBaseScriptTest
[PASS] test_loadWarningsAndSanitizeInputs() (gas: 145645)
Logs:
WARNING: Roles are being set
[PASS] test_loadWarningsAndSanitizeInputs_withZeroAccessManagerAdmin_fuzz(bool) (runs: 5000, μ: 164683, ~: 94985)
[PASS] test_loadWarningsAndSanitizeInputs_withZeroGatewayOwner_fuzz(bool) (runs: 5000, μ: 202666, ~: 191590)
[PASS] test_loadWarningsAndSanitizeInputs_withZeroHubAdmin_fuzz(bool) (runs: 5000, μ: 153761, ~: 95013)
[PASS] test_loadWarningsAndSanitizeInputs_withZeroHubConfiguratorOwner_fuzz(bool) (runs: 5000, μ: 164694, ~: 94990)
[PASS] test_loadWarningsAndSanitizeInputs_withZeroNativeWrapper_fuzz(bool) (runs: 5000, μ: 247593, ~: 232769)
[PASS] test_loadWarningsAndSanitizeInputs_withZeroSpokeAdmin_fuzz(bool) (runs: 5000, μ: 153763, ~: 95013)
[PASS] test_loadWarningsAndSanitizeInputs_withZeroSpokeConfiguratorOwner_fuzz(bool) (runs: 5000, μ: 164671, ~: 94970)
[PASS] test_loadWarningsAndSanitizeInputs_withZeroSpokeProxyAdminOwner_fuzz(bool) (runs: 5000, μ: 164626, ~: 94925)
[PASS] test_loadWarningsAndSanitizeInputs_withZeroTreasurySpokeOwner_fuzz(bool) (runs: 5000, μ: 164695, ~: 94991)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 15.12s (15.11s CPU time)
Ran 17 tests for tests/unit/AaveOracle.t.sol:AaveOracleTest
[PASS] testDECIMALS() (gas: 8379)
[PASS] test_constructor() (gas: 440600)
[PASS] test_deploy_revertsWith_InvalidAddress() (gas: 38213)
[PASS] test_description() (gas: 12222)
[PASS] test_fuzz_constructor(uint8) (runs: 5000, μ: 444506, ~: 444825)
[PASS] test_getReservePrice() (gas: 47420)
[PASS] test_getReservePrice_revertsWith_InvalidPrice() (gas: 46717)
[PASS] test_getReservePrice_revertsWith_InvalidSource() (gas: 11002)
[PASS] test_getReservePrices() (gas: 79534)
[PASS] test_getReservePrices_revertsWith_InvalidSource() (gas: 49383)
[PASS] test_getReserveSource() (gas: 47616)
[PASS] test_setReserveSource() (gas: 44421)
[PASS] test_setReserveSource_revertsWith_InvalidPrice() (gas: 97717)
[PASS] test_setReserveSource_revertsWith_InvalidSource() (gas: 15375)
[PASS] test_setReserveSource_revertsWith_InvalidSourceDecimals() (gas: 15175)
[PASS] test_setReserveSource_revertsWith_OnlySpoke() (gas: 10984)
[PASS] test_spoke() (gas: 10575)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 282.37s (282.36s CPU time)
Ran 2 tests for tests/deployments/procedures/deploy/spoke/AaveV4AaveOracleDeployProcedure.t.sol:AaveV4AaveOracleDeployProcedureTest
[PASS] test_deployAaveOracle() (gas: 447562)
[PASS] test_deployAaveOracle_reverts() (gas: 24395)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 3.06ms (177.84µs CPU time)
Ran 1 test for tests/deployments/batches/AaveV4AccessBatch.t.sol:AaveV4AccessBatchTest
[PASS] test_getReport() (gas: 20300)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 2.22ms (53.22µs CPU time)
Ran 2 tests for tests/deployments/procedures/deploy/hub/AaveV4HubConfiguratorDeployProcedure.t.sol:AaveV4HubConfiguratorDeployProcedureTest
[PASS] test_deployHubConfigurator() (gas: 2099431)
[PASS] test_deployHubConfigurator_reverts() (gas: 10705)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 3.24ms (320.72µs CPU time)
Ran 2 tests for tests/deployments/procedures/deploy/hub/AaveV4HubDeployProcedure.t.sol:AaveV4HubDeployProcedureTest
[PASS] test_deployHub() (gas: 4459652)
[PASS] test_deployHub_reverts() (gas: 10726)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 3.70ms (561.60µs CPU time)
Ran 8 tests for tests/deployments/procedures/deploy/roles/AaveV4HubRolesProcedure.t.sol:AaveV4HubRolesProcedureTest
[PASS] test_getHubConfiguratorRoleSelectors() (gas: 13441)
[PASS] test_getHubFeeMinterRoleSelectors() (gas: 9886)
[PASS] test_grantHubAdminRole_reverts() (gas: 14693)
[PASS] test_grantHubConfiguratorRole_reverts() (gas: 14631)
[PASS] test_grantHubFeeMinterRole_reverts() (gas: 14762)
[PASS] test_setupHubConfiguratorRole_reverts() (gas: 14728)
[PASS] test_setupHubFeeMinterRole_reverts() (gas: 14709)
[PASS] test_setupHubRoles_reverts() (gas: 14859)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 3.08ms (302.33µs CPU time)
Ran 2 tests for tests/deployments/procedures/deploy/hub/AaveV4InterestRateStrategyDeployProcedure.t.sol:AaveV4InterestRateStrategyDeployProcedureTest
[PASS] test_deployInterestRateStrategy() (gas: 528257)
[PASS] test_deployInterestRateStrategy_reverts() (gas: 10748)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 2.93ms (143.41µs CPU time)
Ran 2 tests for tests/deployments/procedures/deploy/position-manager/AaveV4NativeTokenGatewayDeployProcedure.t.sol:AaveV4NativeTokenGatewayDeployProcedureTest
[PASS] test_deployHubConfigurator() (gas: 1071009)
[PASS] test_deployNativeTokenGateway_reverts() (gas: 17687)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 3.07ms (225.38µs CPU time)
Ran 2 tests for tests/deployments/procedures/deploy/position-manager/AaveV4SignatureGatewayDeployProcedure.t.sol:AaveV4SignatureGatewayDeployProcedureTest
[PASS] test_deploySignatureGateway() (gas: 2086810)
[PASS] test_deploySignatureGateway_reverts() (gas: 10772)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 3.23ms (314.60µs CPU time)
Ran 2 tests for tests/deployments/procedures/deploy/spoke/AaveV4SpokeConfiguratorDeployProcedure.t.sol:AaveV4SpokeConfiguratorDeployProcedureTest
[PASS] test_deploySpokeConfigurator() (gas: 1831466)
[PASS] test_deploySpokeConfigurator_reverts() (gas: 10727)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 3.17ms (273.85µs CPU time)
Ran 2 tests for tests/deployments/procedures/deploy/spoke/AaveV4SpokeDeployProcedure.t.sol:AaveV4SpokeDeployProcedureTest
[PASS] test_deployUpgradableSpokeInstance() (gas: 5701165)
[PASS] test_deployUpgradableSpokeInstance_reverts() (gas: 23968)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 4.24ms (972.53µs CPU time)
Ran 8 tests for tests/deployments/procedures/deploy/roles/AaveV4SpokeRolesProcedure.t.sol:AaveV4SpokeRolesProcedureTest
[PASS] test_getSpokeConfiguratorRoleSelectors() (gas: 15194)
[PASS] test_getSpokePositionUpdaterRoleSelectors() (gas: 10827)
[PASS] test_grantSpokeAdminRole_reverts() (gas: 14707)
[PASS] test_grantSpokeConfiguratorRole_reverts() (gas: 14753)
[PASS] test_grantSpokePositionUpdaterRole_reverts() (gas: 14753)
[PASS] test_setupSpokeConfiguratorRole_reverts() (gas: 14631)
[PASS] test_setupSpokePositionUpdaterRole_reverts() (gas: 14630)
[PASS] test_setupSpokeRoles_reverts() (gas: 14671)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 3.16ms (310.52µs CPU time)
Ran 2 tests for tests/deployments/procedures/deploy/spoke/AaveV4TreasurySpokeDeployProcedure.t.sol:AaveV4TreasurySpokeDeployProcedureTest
[PASS] test_deployTreasurySpoke() (gas: 642632)
[PASS] test_deployTreasurySpoke_reverts() (gas: 17741)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 2.98ms (206.31µs CPU time)
Ran 23 tests for tests/unit/AssetInterestRateStrategy.t.sol:AssetInterestRateStrategyTest
[PASS] test_calculateInterestRate_AtKinkPoint() (gas: 24603)
Logs:
Bound result 2000
Bound result 452221174671990369444601363699
[PASS] test_calculateInterestRate_AtMaxUtilization() (gas: 25053)
Logs:
Bound result 10000
Bound result 452221174671990369444601363699
[PASS] test_calculateInterestRate_LeftToKinkPoint(uint256) (runs: 5000, μ: 24568, ~: 24718)
[PASS] test_calculateInterestRate_RightToKinkPoint(uint256) (runs: 5000, μ: 25688, ~: 25740)
[PASS] test_calculateInterestRate_ZeroDebtZeroLiquidity() (gas: 18966)
Logs:
Bound result 0
[PASS] test_calculateInterestRate_fuzz_ZeroDebt(uint256) (runs: 5000, μ: 19188, ~: 18950)
[PASS] test_calculateInterestRate_revertsWith_InterestRateDataNotSet() (gas: 11365)
[PASS] test_deploy_revertsWith_InvalidAddress() (gas: 36230)
[PASS] test_getBaseVariableBorrowRate() (gas: 14908)
[PASS] test_getInterestRateData() (gas: 19665)
[PASS] test_getMaxVariableBorrowRate() (gas: 15312)
[PASS] test_getOptimalUsageRatio() (gas: 14735)
[PASS] test_getVariableRateSlope1() (gas: 14832)
[PASS] test_getVariableRateSlope2() (gas: 14899)
[PASS] test_maxBorrowRate() (gas: 8453)
[PASS] test_maxOptimalRatio() (gas: 8453)
[PASS] test_minOptimalRatio() (gas: 8462)
[PASS] test_setInterestRateData() (gas: 69841)
[PASS] test_setInterestRateData_revertsWith_InvalidMaxRate() (gas: 42108)
[PASS] test_setInterestRateData_revertsWith_InvalidOptimalUsageRatio() (gas: 43081)
[PASS] test_setInterestRateData_revertsWith_InvalidRateData() (gas: 35409)
[PASS] test_setInterestRateData_revertsWith_OnlyHub() (gas: 23853)
[PASS] test_setInterestRateData_revertsWith_Slope2MustBeGteSlope1() (gas: 38016)
Suite result: ok. 23 passed; 0 failed; 0 skipped; finished in 1.05s (1.03s CPU time)
Ran 13 tests for tests/deployments/utils/libraries/Create2Utils.t.sol:Create2UtilsTest
[PASS] testAddressFromLast20Bytes_fuzz(bytes32) (runs: 5000, μ: 8950, ~: 8950)
[PASS] testComputeCreate2Address_fuzz(bytes32,bytes) (runs: 5000, μ: 12583, ~: 12559)
[PASS] testComputeCreate2Address_fuzz(bytes32,bytes32) (runs: 5000, μ: 10942, ~: 10942)
[PASS] testComputeCreateAddress_fuzz(address,uint8) (runs: 5000, μ: 10521, ~: 10523)
[PASS] testComputeCreateAddress_revertsWith_nonceNotSupported(address,uint8) (runs: 5000, μ: 9704, ~: 9704)
[PASS] testCreate2Deploy_fuzz(bytes32) (runs: 5000, μ: 52089, ~: 52089)
[PASS] testCreate2Deploy_revertsWith_contractAlreadyDeployed(bytes32) (runs: 5000, μ: 53081, ~: 53081)
[PASS] testCreate2Deploy_revertsWith_create2AddressDerivationFailure(bytes32) (runs: 5000, μ: 14357, ~: 14357)
[PASS] testCreate2Deploy_revertsWith_failedCreate2FactoryCall(bytes32) (runs: 5000, μ: 1048773113243, ~: 1048773113165)
[PASS] testCreate2Deploy_revertsWith_missingCreate2Factory() (gas: 11859)
[PASS] testIsContractDeployed() (gas: 45100)
[PASS] testIsContractDeployed_fuzz(address) (runs: 5000, μ: 14078, ~: 14078)
[PASS] testProxify_fuzz(bytes32,address) (runs: 5000, μ: 609666, ~: 609666)
Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 3.50s (3.50s CPU time)
Ran 17 tests for tests/unit/Spoke/Spoke.Borrow.HealthFactor.t.sol:SpokeBorrowHealthFactorTest
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_collateral_price_drop(uint256,uint256) (runs: 5000, μ: 936821, ~: 936830)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls(uint256,uint256) (runs: 5000, μ: 856537, ~: 857897)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 894053, ~: 895186)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts(uint256,uint256) (runs: 5000, μ: 1095233, ~: 1095356)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 1136132, ~: 1136002)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_with_interest(uint256,uint256) (runs: 5000, μ: 673823, ~: 674132)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold() (gas: 640728)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_collateral_price_drop_weth() (gas: 930934)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls() (gas: 851495)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai() (gas: 1152031)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth() (gas: 1152075)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest() (gas: 890399)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts() (gas: 1088422)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest() (gas: 1128797)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_with_interest() (gas: 668742)
[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai(uint256,uint256,uint256) (runs: 5000, μ: 1155295, ~: 1156834)
[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth(uint256,uint256,uint256) (runs: 5000, μ: 1156131, ~: 1156767)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 135.76s (135.73s CPU time)
Ran 11 tests for tests/unit/misc/SignatureGateway/SignatureGateway.t.sol:SignatureGatewayTest
[PASS] test_borrowWithSig() (gas: 818829)
[PASS] test_renouncePositionManagerRole() (gas: 26829)
[PASS] test_renouncePositionManagerRole_revertsWith_OnlyOwner() (gas: 18330)
[PASS] test_repayWithSig() (gas: 820186)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 298373)
[PASS] test_setUsingAsCollateralWithSig() (gas: 512172)
[PASS] test_supplyWithSig() (gas: 610604)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 327416)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 897378)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 13922, ~: 13922)
[PASS] test_withdrawWithSig() (gas: 611183)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 240.26s (240.24s CPU time)
Ran 3 tests for tests/unit/Spoke/Spoke.Access.t.sol:SpokeAccessTest
[PASS] testAccess_change_authority() (gas: 2665409)
[PASS] testAccess_hub_functions_callable_by_spokes() (gas: 579274)
[PASS] testAccess_spoke_admin_config_access() (gas: 542961)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 29.77ms (3.15ms CPU time)
Ran 1 test for tests/unit/Spoke/Spoke.AccrueInterest.Scenario.t.sol:SpokeAccrueInterestScenarioTest
[SKIP: pending rft] test_accrueInterest_fuzz_RPBorrowAndSkipTime_twoActions((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint40) (runs: 0, μ: 0, ~: 0)
Suite result: ok. 0 passed; 0 failed; 1 skipped; finished in 32.73ms (5.80ms CPU time)
Ran 8 tests for tests/unit/misc/EIP712Hash.t.sol:EIP712HashTest
[PASS] test_constants() (gas: 5450)
[PASS] test_hash_borrow_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 4659, ~: 4659)
[PASS] test_hash_repay_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 4615, ~: 4615)
[PASS] test_hash_setUsingAsCollateral_fuzz((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 4902, ~: 4902)
[PASS] test_hash_supply_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 4703, ~: 4703)
[PASS] test_hash_updateUserDynamicConfig_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 4441, ~: 4441)
[PASS] test_hash_updateUserRiskPremium_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 4462, ~: 4462)
[PASS] test_hash_withdraw_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 4681, ~: 4681)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 986.58ms (985.04ms CPU time)
Ran 8 tests for tests/unit/misc/GatewayBase.t.sol:GatewayBaseTest
[PASS] test_constructor() (gas: 17568)
[PASS] test_registerSpoke_fuzz(address) (runs: 5000, μ: 42023, ~: 42023)
[PASS] test_registerSpoke_revertsWith_InvalidAddress() (gas: 13301)
[PASS] test_registerSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 14059)
[PASS] test_registerSpoke_unregister() (gas: 36640)
[PASS] test_renouncePositionManagerRole() (gas: 65200)
[PASS] test_renouncePositionManagerRole_revertsWith_InvalidAddress() (gas: 76594)
[PASS] test_renouncePositionManagerRole_revertsWith_OwnableUnauthorizedAccount() (gas: 76787)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 366.26ms (339.28ms CPU time)
Ran 8 tests for tests/unit/AccessManagerEnumerable.t.sol:AccessManagerEnumerableTest
[PASS] test_getRoleMembers_fuzz(uint256,uint256) (runs: 5000, μ: 1921274, ~: 1920052)
[PASS] test_getRoleTargetFunctions_fuzz(uint256,uint256) (runs: 5000, μ: 1118531, ~: 1117552)
[PASS] test_grantRole() (gas: 239205)
[PASS] test_grantRole_fuzz(uint64,uint256) (runs: 5000, μ: 863390, ~: 851108)
[PASS] test_revokeRole() (gas: 259646)
[PASS] test_setTargetFunctionRole() (gas: 274815)
[PASS] test_setTargetFunctionRole_skipAddToAdminRole() (gas: 29820)
[PASS] test_setTargetFunctionRole_withReplace() (gas: 336391)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 17.68s (20.56s CPU time)
Ran 5 tests for tests/gas/Gateways.Operations.gas.t.sol:NativeTokenGateway_Gas_Tests
[PASS] test_borrowNative() (gas: 921573)
[PASS] test_repayNative() (gas: 996090)
[PASS] test_supplyAndCollateralNative() (gas: 306570)
[PASS] test_supplyNative() (gas: 288361)
[PASS] test_withdrawNative() (gas: 511036)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 42.47ms (4.59ms CPU time)
Ran 8 tests for tests/gas/Gateways.Operations.gas.t.sol:SignatureGateway_Gas_Tests
[PASS] test_borrowWithSig() (gas: 754973)
[PASS] test_repayWithSig() (gas: 991749)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 208917)
[PASS] test_setUsingAsCollateralWithSig() (gas: 296256)
[PASS] test_supplyWithSig() (gas: 468575)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 145419)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 143024)
[PASS] test_withdrawWithSig() (gas: 418511)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 46.96ms (8.27ms CPU time)
Ran 6 tests for tests/unit/Hub/Hub.Access.t.sol:HubAccessTest
[PASS] test_change_authority() (gas: 2312488)
[PASS] test_change_role_responsibility() (gas: 111660)
[PASS] test_hub_access_manager_exposure() (gas: 12698)
[PASS] test_hub_admin_access() (gas: 1205198)
[PASS] test_migrate_role_responsibility() (gas: 878066)
[PASS] test_setInterestRateData_access() (gas: 103743)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 30.62ms (4.17ms CPU time)
Ran 9 tests for tests/unit/libraries/KeyValueList.t.sol:KeyValueListTest
[PASS] test_add_unique() (gas: 325391)
[PASS] test_fuzz_add(uint256,uint256) (runs: 5000, μ: 200301, ~: 201361)
[PASS] test_fuzz_add_unique(uint256,uint256) (runs: 5000, μ: 265898, ~: 271836)
[PASS] test_fuzz_get(uint256[]) (runs: 5000, μ: 413030, ~: 411058)
[PASS] test_fuzz_get_uninitialized(uint256[]) (runs: 5000, μ: 263153, ~: 252829)
[PASS] test_fuzz_get_uninitialized_sorted(uint256[]) (runs: 5000, μ: 204903, ~: 185394)
[PASS] test_fuzz_sortByKey(uint256[]) (runs: 5000, μ: 464344, ~: 453986)
[PASS] test_fuzz_sortByKey_length(uint256) (runs: 5000, μ: 229627, ~: 232681)
[PASS] test_fuzz_sortByKey_with_collision(uint256[]) (runs: 5000, μ: 547993, ~: 539040)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 73.98s (73.98s CPU time)
Ran 23 tests for tests/unit/Hub/Hub.Restore.t.sol:HubRestoreTest
[PASS] test_restore_full_amount_with_interest() (gas: 366798)
Logs:
Bound result 1000000000000000000000
Bound result 500000000000000000000
Bound result 31536000
[PASS] test_restore_full_amount_with_interest_and_premium() (gas: 677168)
Logs:
Bound result 100000000000000000000
Bound result 50000000000000000000
Bound result 31536000
Bound result 1
[PASS] test_restore_fuzz_full_amount_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 368085, ~: 368197)
[PASS] test_restore_fuzz_full_amount_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 667227, ~: 679119)
[PASS] test_restore_fuzz_revertsWith_SurplusDrawnRestored_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 247879, ~: 249172)
[PASS] test_restore_fuzz_revertsWith_SurplusDrawnRestored_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 639415, ~: 639629)
[PASS] test_restore_one_share_delta_increase_revertsWith_InvalidPremiumChange() (gas: 214404)
[PASS] test_restore_partial_drawn() (gas: 330335)
[PASS] test_restore_partial_same_block() (gas: 326243)
[PASS] test_restore_premiumDeltas_twoWeiIncrease_realizedDelta() (gas: 236137)
[PASS] test_restore_revertsWith_InsufficientTransferred() (gas: 258352)
[PASS] test_restore_revertsWith_InvalidAmount_zero() (gas: 53250)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumIncrease() (gas: 221578)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumSharesIncrease() (gas: 221622)
[PASS] test_restore_revertsWith_SpokeNotActive_whenPaused() (gas: 165875)
[PASS] test_restore_revertsWith_SpokePaused() (gas: 93310)
[PASS] test_restore_revertsWith_SurplusDrawnRestored() (gas: 364680)
[PASS] test_restore_revertsWith_SurplusDrawnRestored_with_interest() (gas: 247770)
Logs:
Bound result 100000000000000000000
Bound result 50000000000000000000
Bound result 15768000
[PASS] test_restore_revertsWith_SurplusDrawnRestored_with_interest_and_premium() (gas: 637701)
Logs:
Bound result 100000000000000000000
Bound result 50000000000000000000
Bound result 31536000
Bound result 1
[PASS] test_restore_revertsWith_SurplusPremiumRayRestored() (gas: 534248)
[PASS] test_restore_revertsWith_underflow_offsetIncrease() (gas: 232774)
[PASS] test_restore_tooMuchDrawn_revertsWith_SurplusDrawnRestored() (gas: 221914)
[PASS] test_restore_when_asset_frozen() (gas: 428092)
Suite result: ok. 23 passed; 0 failed; 0 skipped; finished in 189.96s (195.30s CPU time)
Ran 1 test for tests/unit/Hub/Hub.Rounding.t.sol:HubRoundingTest
[PASS] test_sharePriceWithMultipleDonations() (gas: 679091126)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 3.41s (3.38s CPU time)
Ran 3 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.DebtToLiquidate.t.sol:LiquidationLogicDebtToLiquidateTest
[PASS] test_calculateDebtToLiquidate_fuzz((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 30658, ~: 30663)
[PASS] test_calculateDebtToLiquidate_fuzz_AmountAdjustedDueToDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 32364, ~: 32394)
[PASS] test_calculateDebtToLiquidate_fuzz_ImpossibleToAdjustForDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 34507, ~: 34426)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 3.39s (5.68s CPU time)
Ran 7 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.DebtToTargetHealthFactor.t.sol:LiquidationLogicDebtToTargetHealthFactorTest
[PASS] test_calculateDebtToTargetHealthFactor_HealthFactorEqualsTargetHealthFactor((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 23100, ~: 23065)
[PASS] test_calculateDebtToTargetHealthFactor_NoPrecisionLoss() (gas: 25208)
[PASS] test_calculateDebtToTargetHealthFactor_PrecisionLoss() (gas: 15209)
[PASS] test_calculateDebtToTargetHealthFactor_UnitPrice() (gas: 25186)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_NoRevert((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 20116, ~: 20081)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_revertsWith_DivisionByZero_ZeroAssetPrice((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22860, ~: 22825)
[PASS] test_calculateDebtToTargetHealthFactor_revertsWith_ArithmeticError_TargetHealthFactorLessThanHealthFactor((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22880, ~: 22845)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 2.82s (4.88s CPU time)
Ran 16 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.EvaluateDeficit.t.sol:LiquidationLogicEvaluateDeficitTest
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCM() (gas: 9073)
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCO() (gas: 9019)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCM() (gas: 9062)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCO() (gas: 9029)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCM() (gas: 9077)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCO() (gas: 9122)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCM() (gas: 9065)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCO() (gas: 9053)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCM() (gas: 9075)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCO() (gas: 9042)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCM() (gas: 8976)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCO() (gas: 9009)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCM() (gas: 8986)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCO() (gas: 9043)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCM() (gas: 9016)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCO() (gas: 9005)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 27.93ms (1.19ms CPU time)
Ran 19 tests for tests/unit/Hub/Hub.Add.t.sol:HubAddTest
[PASS] test_add_AddCapReachedButNotExceeded_rounding() (gas: 675289)
[PASS] test_add_fuzz_AddCapReachedButNotExceeded(uint40) (runs: 5000, μ: 160198, ~: 160165)
[PASS] test_add_fuzz_multi_asset_multi_spoke(uint256,uint256,uint256) (runs: 5000, μ: 330495, ~: 330724)
[PASS] test_add_fuzz_revertsWith_AddCapExceeded(uint40) (runs: 5000, μ: 113036, ~: 113003)
[PASS] test_add_fuzz_revertsWith_AddCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5000, μ: 274575, ~: 274463)
[PASS] test_add_fuzz_revertsWith_InvalidShares_due_to_index(uint256,uint256,uint256) (runs: 5000, μ: 230049, ~: 230260)
[PASS] test_add_fuzz_single_asset(uint256,address,uint256) (runs: 5000, μ: 345759, ~: 345649)
[PASS] test_add_fuzz_single_spoke_multi_add(uint256,uint256) (runs: 5000, μ: 822928, ~: 822992)
[PASS] test_add_multi_add_minimal_shares() (gas: 328775)
[PASS] test_add_revertsWith_AmountDowncastOverflow() (gas: 368...*[Comment body truncated]* |
♻️ Forge Gas Snapshots
🔕 Unchanged
|
Forge Build Sizes🔕 Unchanged
|
| string memory inputPath | ||
| ) public view returns (FullDeployInputs memory inputs) { | ||
| string memory json = vm.readFile(inputPath); | ||
| inputs.accessManagerAdmin = json.readAddress('.accessManagerAdmin'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cannot we do the same as below?
bytes memory data = vm.parseJson(json);
SpokeDeployInputs memory inputs = abi.decode(data, (SpokeDeployInputs));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
direct decoding is scary, the deserialisation in bytes happens with sorted keys and doing this can silently put wrong data different keys for the same type if keys not kept sorted in the definition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah alphabetical requirement: https://getfoundry.sh/reference/cheatcodes/parse-json/#decoding-json-objects-into-solidity-structs, so tried to be explicit here
| contract Logger { | ||
| using stdJson for string; | ||
|
|
||
| Vm private constant vm = Vm(address(bytes20(uint160(uint256(keccak256('hevm cheat code')))))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reorder layour pls, fns too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the functions I understand (ie pure at the end, etc), but wdym for general layout re-order specific to this line - it goes as expected here, no?
- constants
- structs
- internal vars
tests/Base.t.sol
Outdated
| import {PercentageMath} from 'src/libraries/math/PercentageMath.sol'; | ||
| import {EIP712Types} from 'src/libraries/types/EIP712Types.sol'; | ||
| import {Roles} from 'src/libraries/types/Roles.sol'; | ||
| import {Roles} from 'src/deployments/procedures/roles/Roles.sol'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move down to // Orchestration.
btw, would it be possible to override roles configuration? i think worth exploring... not only for changing the test env, but also to facilitate other deployment setups
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be possible to override roles configuration
you mean like being able to deploy with a new custom role that can access a custom new set of target func selectors right (and NOT only spokeAdmin, spokeConfigurator roles) right?
this should be doable, but would prefer to leave for a separate PR. What level of granularity do you prefer? should an array of func selectors + role ID be passed in?
| if (inputs.grantRoles) { | ||
| logger.log('WARNING: Roles are being set'); | ||
| warnings = string.concat(warnings, 'WARNING: Roles are being set\n'); | ||
| warnings = _logAndAppend(logger, warnings, 'WARNING: Roles are being set'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of doing the warnings here i would collect them when actually setting the vars
also WARNING: {x} is zero; using default value could be a string template used by this method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the template how to replace {x} with each specific field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string.concat('WARNING: ', x, ' is zero using default etc')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok thought there was a react-type way to inject into {x} directly :( , see latest
| sanitizedInputs.accessManagerAdmin = deployInputs.accessManagerAdmin != address(0) | ||
| ? deployInputs.accessManagerAdmin | ||
| : deployer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THIS is where we should collect warnings for clarity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wanted to separate these concerns but can integrate more, see latest
| string memory warnings, | ||
| string memory warning | ||
| ) internal virtual returns (string memory) { | ||
| logger.log(warning); | ||
| return string.concat(warnings, warning, '\n'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can avoid return & overwrite pattern, you're passing mem pointer and updating memory there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see latest, is that what you were thinking
| constructor(address admin_) { | ||
| address accessManagerAddress = _deployAccessManagerEnumerable(admin_); | ||
| _report = BatchReports.AccessBatchReport({accessManagerAddress: accessManagerAddress}); | ||
| assert(admin_ != address(0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets add error string also? also why not require?
| assert(admin_ != address(0)); | |
| require(admin_ != address(0), InvalidParam()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/aave/aave-v4/pull/1047/files/25a3ae4a6ebe749f43bb0fc49939067b2f8501d6#r2602519757
i think I'd prefer require to get an error msg in there but also, this state is never meant to be reached. Also moved these validations to the procedures instead. cc @avniculae thoughts?
I'll move back to require for now, see latest
Uh oh!
There was an error while loading. Please reload this page.