feat: expand keyed nonces to 0 key specific getters for compatibility#899
Merged
DhairyaSethi merged 18 commits intomainfrom Oct 15, 2025
Merged
feat: expand keyed nonces to 0 key specific getters for compatibility#899DhairyaSethi merged 18 commits intomainfrom
DhairyaSethi merged 18 commits intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #899 +/- ##
===========================================
- Coverage 100.00% 99.14% -0.86%
===========================================
Files 20 20
Lines 1519 1529 +10
===========================================
- Hits 1519 1516 -3
- Misses 0 13 +13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Forge Build Sizes
🔕 Unchanged
|
🌈 Test ResultsNo files changed, compilation skipped
Ran 17 tests for tests/unit/AaveOracle.t.sol:AaveOracleTest
[PASS] test_constructor() (gas: 440456)
[PASS] test_decimals() (gas: 8387)
[PASS] test_deploy_revertsWith_InvalidAddress() (gas: 38089)
[PASS] test_description() (gas: 12094)
[PASS] test_fuzz_constructor(uint8) (runs: 5000, μ: 444411, ~: 444703)
[PASS] test_getReservePrice() (gas: 47409)
[PASS] test_getReservePrice_revertsWith_InvalidPrice() (gas: 46669)
[PASS] test_getReservePrice_revertsWith_InvalidSource() (gas: 10976)
[PASS] test_getReservePrices() (gas: 79551)
[PASS] test_getReservePrices_revertsWith_InvalidSource() (gas: 49352)
[PASS] test_getReserveSource() (gas: 47584)
[PASS] test_setReserveSource() (gas: 44466)
[PASS] test_setReserveSource_revertsWith_InvalidPrice() (gas: 97683)
[PASS] test_setReserveSource_revertsWith_InvalidSource() (gas: 15327)
[PASS] test_setReserveSource_revertsWith_InvalidSourceDecimals() (gas: 15149)
[PASS] test_setReserveSource_revertsWith_OnlySpoke() (gas: 11049)
[PASS] test_spoke() (gas: 10614)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 493.58ms (479.09ms CPU time)
Ran 23 tests for tests/unit/AssetInterestRateStrategy.t.sol:AssetInterestRateStrategyTest
[PASS] test_calculateInterestRate_AtKinkPoint() (gas: 24686)
Logs:
Bound result 2000
Bound result 778565440757296803935461404101
[PASS] test_calculateInterestRate_AtMaxUtilization() (gas: 24958)
Logs:
Bound result 10000
Bound result 778565440757296803935461404101
[PASS] test_calculateInterestRate_LeftToKinkPoint(uint256) (runs: 5000, μ: 24536, ~: 24690)
[PASS] test_calculateInterestRate_RightToKinkPoint(uint256) (runs: 5000, μ: 25654, ~: 25690)
[PASS] test_calculateInterestRate_ZeroDebtZeroLiquidity() (gas: 18944)
Logs:
Bound result 0
[PASS] test_calculateInterestRate_fuzz_ZeroDebt(uint256) (runs: 5000, μ: 19167, ~: 18950)
[PASS] test_calculateInterestRate_revertsWith_InterestRateDataNotSet() (gas: 11361)
[PASS] test_deploy_revertsWith_InvalidAddress() (gas: 36318)
[PASS] test_getBaseVariableBorrowRate() (gas: 14864)
[PASS] test_getInterestRateData() (gas: 19653)
[PASS] test_getMaxVariableBorrowRate() (gas: 15312)
[PASS] test_getOptimalUsageRatio() (gas: 14735)
[PASS] test_getVariableRateSlope1() (gas: 14810)
[PASS] test_getVariableRateSlope2() (gas: 14877)
[PASS] test_maxBorrowRate() (gas: 8431)
[PASS] test_maxOptimalRatio() (gas: 8431)
[PASS] test_minOptimalRatio() (gas: 8440)
[PASS] test_setInterestRateData() (gas: 69812)
[PASS] test_setInterestRateData_revertsWith_InvalidMaxRate() (gas: 42072)
[PASS] test_setInterestRateData_revertsWith_InvalidOptimalUsageRatio() (gas: 43120)
[PASS] test_setInterestRateData_revertsWith_InvalidRateData() (gas: 35395)
[PASS] test_setInterestRateData_revertsWith_OnlyHub() (gas: 23786)
[PASS] test_setInterestRateData_revertsWith_Slope2MustBeGteSlope1() (gas: 37980)
Suite result: ok. 23 passed; 0 failed; 0 skipped; finished in 987.98ms (981.44ms CPU time)
Ran 6 tests for tests/unit/Hub/Hub.Access.t.sol:HubAccessTest
[PASS] test_change_authority() (gas: 2314465)
[PASS] test_change_role_responsibility() (gas: 101979)
[PASS] test_hub_access_manager_exposure() (gas: 12706)
[PASS] test_hub_admin_access() (gas: 1134214)
[PASS] test_migrate_role_responsibility() (gas: 397250)
[PASS] test_setInterestRateData_access() (gas: 101156)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 20.90ms (3.89ms CPU time)
Ran 21 tests for tests/unit/Hub/Hub.Add.t.sol:HubAddTest
[PASS] test_add_AddCapReachedButNotExceeded_rounding() (gas: 646962)
[PASS] test_add_fuzz_AddCapReachedButNotExceeded(uint56) (runs: 5000, μ: 156719, ~: 156572)
[PASS] test_add_fuzz_multi_asset_multi_spoke(uint256,uint256,uint256) (runs: 5000, μ: 310065, ~: 310201)
[PASS] test_add_fuzz_revertsWith_AddCapExceeded(uint56) (runs: 5000, μ: 78627, ~: 78479)
[PASS] test_add_fuzz_revertsWith_AddCapExceeded_due_to_interest(uint56,uint256,uint256) (runs: 5000, μ: 283046, ~: 285500)
[PASS] test_add_fuzz_revertsWith_ERC20InsufficientAllowance(uint256) (runs: 5000, μ: 78893, ~: 78622)
[PASS] test_add_fuzz_revertsWith_InvalidShares_due_to_index(uint256,uint256,uint256) (runs: 5000, μ: 216895, ~: 217071)
[PASS] test_add_fuzz_single_asset(uint256,address,uint256) (runs: 5000, μ: 337076, ~: 336995)
[PASS] test_add_fuzz_single_spoke_multi_add(uint256,uint256) (runs: 5000, μ: 819620, ~: 821790)
[PASS] test_add_multi_add_minimal_shares() (gas: 344693)
[PASS] test_add_revertsWith_AmountDowncastOverflow() (gas: 206362)
[PASS] test_add_revertsWith_ERC20InsufficientAllowance() (gas: 75159)
[PASS] test_add_revertsWith_InvalidAddress() (gas: 15722)
[PASS] test_add_revertsWith_InvalidAmount() (gas: 15789)
[PASS] test_add_revertsWith_InvalidShares() (gas: 220762)
[PASS] test_add_revertsWith_SharesDowncastOverflow() (gas: 36540)
[PASS] test_add_revertsWith_SpokeNotActive() (gas: 58210)
[PASS] test_add_revertsWith_SpokePaused() (gas: 58355)
[PASS] test_add_single_asset() (gas: 325001)
Logs:
Bound result 2
Bound result 100000000000000000000
[PASS] test_add_with_increased_index() (gas: 324294)
[PASS] test_add_with_increased_index_with_premium() (gas: 670220)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 48.52s (48.51s 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, μ: 1053626, ~: 1053777)
[PASS] test_borrow_fuzz_rounding_effect_inflated_ex_rate(uint256,uint256,uint256) (runs: 5000, μ: 1438116, ~: 1438255)
[PASS] test_borrow_fuzz_rounding_effect_shares(uint256,uint256) (runs: 5000, μ: 1111341, ~: 1111111)
[PASS] test_borrow_rounding_effect_multiple_actions() (gas: 1160176)
[PASS] test_borrow_rounding_effect_shares() (gas: 1110326)
Logs:
Bound result 5000000000000000000
Bound result 94608000
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 67.97s (67.94s CPU time)
Ran 31 tests for tests/unit/Hub/Hub.Config.t.sol:HubConfigTest
[PASS] test_addAsset_fuzz(address,uint8,address) (runs: 5000, μ: 841730, ~: 841763)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_feeReceiver(address,uint8,address) (runs: 5000, μ: 46645, ~: 46948)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_irStrategy(address,uint8,address) (runs: 5000, μ: 46721, ~: 47024)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_underlying(uint8,address,address) (runs: 5000, μ: 37755, ~: 37755)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(address,uint8,address,address) (runs: 5000, μ: 47188, ~: 47004)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals_tooLow(address,uint8,address,address) (runs: 5000, μ: 47443, ~: 47681)
[PASS] test_addAsset_fuzz_reverts_InvalidIrData(address,uint8,address,address) (runs: 5000, μ: 39862, ~: 36252)
[PASS] test_addAsset_revertsWith_BlockTimestampDowncastOverflow() (gas: 81092)
[PASS] test_addAsset_revertsWith_DrawnRateDowncastOverflow() (gas: 78065)
[PASS] test_addSpoke_fuzz(uint256,(bool,bool,uint56,uint56)) (runs: 5000, μ: 123697, ~: 123767)
[PASS] test_addSpoke_fuzz_revertsWith_AssetNotListed(uint256,(bool,bool,uint56,uint56)) (runs: 5000, μ: 34534, ~: 34522)
[PASS] test_addSpoke_fuzz_revertsWith_InvalidAddress_spoke(uint256,(bool,bool,uint56,uint56)) (runs: 5000, μ: 33120, ~: 33178)
[PASS] test_addSpoke_revertsWith_SpokeAlreadyListed() (gas: 38659)
[PASS] test_hub_deploy_revertsWith_InvalidAddress() (gas: 47100)
[PASS] test_updateAssetConfig_UseExistingSpokeAndListedAsFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 60191)
[PASS] test_updateAssetConfig_fuzz(uint256,(address,uint16,address,address)) (runs: 5000, μ: 242558, ~: 242410)
[PASS] test_updateAssetConfig_fuzz_FromZeroLiquidityFee(uint256,uint16) (runs: 5000, μ: 756224, ~: 756145)
[PASS] test_updateAssetConfig_fuzz_LiquidityFee(uint256,uint16) (runs: 5000, μ: 654193, ~: 654115)
[PASS] test_updateAssetConfig_fuzz_NewFeeReceiver(uint256) (runs: 5000, μ: 724354, ~: 724410)
[PASS] test_updateAssetConfig_fuzz_NewInterestRateStrategy(uint256) (runs: 5000, μ: 1127793, ~: 1127896)
[PASS] test_updateAssetConfig_fuzz_ReuseFeeReceiver_revertsWith_SpokeAlreadyListed(uint256) (runs: 5000, μ: 764025, ~: 764080)
[PASS] test_updateAssetConfig_fuzz_Scenario(uint256) (runs: 5000, μ: 605895, ~: 605949)
[PASS] test_updateAssetConfig_fuzz_UseExistingSpokeAsFeeReceiver_revertsWith_SpokeAlreadyListed(uint256) (runs: 5000, μ: 59774, ~: 59774)
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidInterestRateStrategy(uint256) (runs: 5000, μ: 57832, ~: 57886)
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidLiquidityFee(uint256,(address,uint16,address,address)) (runs: 5000, μ: 41091, ~: 40943)
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidReinvestmentController() (gas: 495376)
[PASS] test_updateAssetConfig_fuzz_revertsWith_calculateInterestRateReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 191556, ~: 191409)
[PASS] test_updateAssetConfig_fuzz_revertsWith_setInterestRateDataReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 65205, ~: 65057)
[PASS] test_updateSpokeConfig_fuzz(uint256,(bool,bool,uint56,uint56)) (runs: 5000, μ: 56489, ~: 56559)
[PASS] test_updateSpokeConfig_fuzz_revertsWith_SpokeNotListed(uint256,address,(bool,bool,uint56,uint56)) (runs: 5000, μ: 40403, ~: 40469)
[PASS] test_updateSpokeConfig_revertsWith_AssetNotListed() (gas: 29297)
Suite result: ok. 31 passed; 0 failed; 0 skipped; finished in 99.88s (99.86s CPU time)
Ran 16 tests for tests/unit/Hub/Hub.Draw.t.sol:HubDrawTest
[PASS] test_draw_DifferentSpokes() (gas: 362695)
[PASS] test_draw_fuzz_IncreasedBorrowRate(uint256,uint256) (runs: 5000, μ: 681253, ~: 681328)
[PASS] test_draw_fuzz_amounts_same_block(uint256,uint256) (runs: 5000, μ: 285593, ~: 285456)
[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded(uint56) (runs: 5000, μ: 79865, ~: 79715)
[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded_due_to_interest(uint56,uint256,uint256) (runs: 5000, μ: 298753, ~: 299033)
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity(uint256,uint256) (runs: 5000, μ: 33920, ~: 33721)
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_draw(uint256) (runs: 5000, μ: 183021, ~: 182748)
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_remove(uint256) (runs: 5000, μ: 129547, ~: 129352)
[PASS] test_draw_fuzz_revertsWith_InvalidAddress(uint256) (runs: 5000, μ: 15782, ~: 15782)
[PASS] test_draw_revertsWith_DrawCapExceeded_due_to_deficit() (gas: 253903)
[PASS] test_draw_revertsWith_InsufficientLiquidity() (gas: 28022)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_draw() (gas: 179301)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_remove() (gas: 126662)
[PASS] test_draw_revertsWith_InvalidAmount() (gas: 15902)
[PASS] test_draw_revertsWith_SpokeNotActive() (gas: 58166)
[PASS] test_draw_revertsWith_SpokePaused() (gas: 58311)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 26.34s (26.32s CPU time)
Ran 6 tests for tests/unit/Hub/Hub.EliminateDeficit.t.sol:HubEliminateDeficitTest
[PASS] test_eliminateDeficit(uint256) (runs: 5000, μ: 501302, ~: 501302)
[PASS] test_eliminateDeficit_allowSpokePaused() (gas: 336850)
[PASS] test_eliminateDeficit_fuzz_revertsWith_InvalidAmount_Excess(uint256) (runs: 5000, μ: 250786, ~: 250786)
[PASS] test_eliminateDeficit_fuzz_revertsWith_callerSpokeNotActive(address) (runs: 5000, μ: 28893, ~: 28893)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_ZeroAmountNoDeficit() (gas: 20023)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_ZeroAmountWithDeficit() (gas: 251908)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 13.18s (13.16s CPU time)
Ran 7 tests for tests/gas/Hub.Operations.gas.t.sol:HubOperations_Gas_Tests
[PASS] test_add() (gas: 128872)
[PASS] test_deficit() (gas: 1046386)
[PASS] test_draw() (gas: 372111)
[PASS] test_payFee_transferShares() (gas: 922960)
[PASS] test_refreshPremium() (gas: 124914)
[PASS] test_remove() (gas: 278055)
[PASS] test_restore() (gas: 724573)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 27.78ms (4.77ms 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, μ: 895627, ~: 895693)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls(uint256,uint256) (runs: 5000, μ: 855742, ~: 856668)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 902133, ~: 899293)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts(uint256,uint256) (runs: 5000, μ: 1114158, ~: 1114281)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 1177070, ~: 1178615)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_with_interest(uint256,uint256) (runs: 5000, μ: 690784, ~: 691418)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold() (gas: 646772)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_collateral_price_drop_weth() (gas: 889776)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls() (gas: 850268)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai() (gas: 1104031)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth() (gas: 1104075)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest() (gas: 902629)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts() (gas: 1107339)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest() (gas: 1171413)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_with_interest() (gas: 686690)
[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai(uint256,uint256,uint256) (runs: 5000, μ: 1107698, ~: 1108809)
[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth(uint256,uint256,uint256) (runs: 5000, μ: 1108339, ~: 1108831)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 135.52s (135.51s CPU time)
Ran 6 tests for tests/unit/Hub/Hub.PayFee.t.sol:HubPayFeeTest
[PASS] test_payFee_fuzz(uint256,uint256) (runs: 5000, μ: 665243, ~: 665219)
[PASS] test_payFee_fuzz_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 665511, ~: 665666)
[PASS] test_payFee_revertsWith_AddedSharesExceeded() (gas: 132719)
[PASS] test_payFee_revertsWith_AddedSharesExceeded_with_interest() (gas: 631536)
[PASS] test_payFee_revertsWith_InvalidShares() (gas: 20168)
[PASS] test_payFee_revertsWith_SpokeNotActive() (gas: 58192)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 23.92s (23.90s CPU time)
Ran 10 tests for tests/unit/Hub/Hub.Reclaim.t.sol:HubReclaimTest
[PASS] test_reclaim() (gas: 678856)
Logs:
Bound result 1000000000000000000000
Bound result 500000000000000000000
Bound result 200000000000000000000
[PASS] test_reclaim_fullAmount() (gas: 659584)
[PASS] test_reclaim_fuzz(uint256,uint256,uint256) (runs: 5000, μ: 680314, ~: 679858)
[PASS] test_reclaim_multipleSweepsAndReclaims() (gas: 787580)
[PASS] test_reclaim_revertsWith_AssetNotListed() (gas: 12402)
[PASS] test_reclaim_revertsWith_InvalidAmount_exceedsSwept() (gas: 92247)
[PASS] test_reclaim_revertsWith_InvalidAmount_exceedsSwept_afterSweep() (gas: 466316)
[PASS] test_reclaim_revertsWith_InvalidAmount_zero() (gas: 90579)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 91557, ~: 91557)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController_init() (gas: 37982)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 14.82s (14.81s CPU time)
Ran 8 tests for tests/unit/Hub/Hub.RefreshPremium.t.sol:HubRefreshPremiumTest
[PASS] test_refreshPremium_emitsEvent() (gas: 169682)
[PASS] test_refreshPremium_fuzz_positiveDeltas(int256,int256,int256) (runs: 5000, μ: 58064, ~: 58316)
[PASS] test_refreshPremium_fuzz_withAccrual(uint256,uint256,uint256,uint256) (runs: 5000, μ: 561168, ~: 561349)
[PASS] test_refreshPremium_negativeDeltas(int256,int256) (runs: 5000, μ: 472628, ~: 473116)
[PASS] test_refreshPremium_negativeDeltas_withAccrual(uint256,uint256) (runs: 5000, μ: 543345, ~: 552189)
[PASS] test_refreshPremium_pausedSpokesAllowed() (gas: 107841)
[PASS] test_refreshPremium_revertsWith_SpokeNotActive() (gas: 56015)
[PASS] test_refreshPremium_spokePremiumUpdateIsContained() (gas: 737005)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 20.24s (20.22s CPU time)
Ran 13 tests for tests/unit/Hub/Hub.Remove.t.sol:HubRemoveTest
[PASS] test_remove() (gas: 199825)
Logs:
Bound result 2
Bound result 100000000000000000000
[PASS] test_remove_all_with_interest() (gas: 398317)
[PASS] test_remove_fuzz(uint256,uint256) (runs: 5000, μ: 198364, ~: 198171)
[PASS] test_remove_fuzz_all_liquidity_with_interest(uint256,uint256) (runs: 5000, μ: 436005, ~: 438634)
[PASS] test_remove_fuzz_multi_spoke(uint256,uint256) (runs: 5000, μ: 279943, ~: 280098)
[PASS] test_remove_fuzz_multi_spoke_with_interest(uint256,uint256,uint256,uint256) (runs: 5000, μ: 449803, ~: 452927)
[PASS] test_remove_revertsWith_AddedAmountExceeded() (gas: 142218)
[PASS] test_remove_revertsWith_AddedAmountExceeded_zero_added() (gas: 29990)
[PASS] test_remove_revertsWith_InsufficientLiquidity() (gas: 171562)
[PASS] test_remove_revertsWith_InvalidAddress() (gas: 15746)
[PASS] test_remove_revertsWith_InvalidAmount() (gas: 17825)
[PASS] test_remove_revertsWith_SpokeNotActive() (gas: 58225)
[PASS] test_remove_revertsWith_SpokePaused() (gas: 58359)
Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 31.48s (31.46s CPU time)
Ran 5 tests for tests/unit/Hub/Hub.ReportDeficit.t.sol:HubReportDeficitTest
[PASS] test_reportDeficit_fuzz_revertsWith_SurplusDeficitReported(uint256,uint256,uint256,uint256) (runs: 5000, μ: 160347, ~: 160368)
[PASS] test_reportDeficit_fuzz_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 333003, ~: 334922)
[PASS] test_reportDeficit_revertsWith_InvalidAmount() (gas: 18170)
[PASS] test_reportDeficit_revertsWith_SpokeNotActive(address) (runs: 5000, μ: 26412, ~: 26412)
[PASS] test_reportDeficit_with_premium() (gas: 333389)
Logs:
Bound result 10000000000
Bound result 31536000
Bound result 5000000000
Bound result 0
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 9.74s (9.72s CPU time)
Ran 20 tests for tests/unit/Hub/Hub.Restore.t.sol:HubRestoreTest
[PASS] test_restore_full_amount_with_interest() (gas: 356111)
Logs:
Bound result 1000000000000000000000
Bound result 500000000000000000000
Bound result 31536000
[PASS] test_restore_full_amount_with_interest_and_premium() (gas: 661576)
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, μ: 354806, ~: 357328)
[PASS] test_restore_fuzz_full_amount_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 644931, ~: 663002)
[PASS] test_restore_fuzz_revertsWith_SurplusAmountRestored_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 248978, ~: 253018)
[PASS] test_restore_fuzz_revertsWith_SurplusAmountRestored_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 630127, ~: 633855)
[PASS] test_restore_partial_drawn() (gas: 331621)
[PASS] test_restore_partial_same_block() (gas: 310391)
[PASS] test_restore_premiumDeltas_twoWeiIncrease_realizedDelta() (gas: 251394)
[PASS] test_restore_revertsWith_InvalidAmount_zero() (gas: 44804)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumIncrease() (gas: 193852)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumSharesIncrease() (gas: 193872)
[PASS] test_restore_revertsWith_SpokeNotActive_whenPaused() (gas: 155215)
[PASS] test_restore_revertsWith_SpokePaused() (gas: 85357)
[PASS] test_restore_revertsWith_SurplusAmountRestored() (gas: 338814)
[PASS] test_restore_revertsWith_SurplusAmountRestored_with_interest() (gas: 251692)
Logs:
Bound result 100000000000000000000
Bound result 50000000000000000000
Bound result 15768000
[PASS] test_restore_revertsWith_SurplusAmountRestored_with_interest_and_premium() (gas: 632515)
Logs:
Bound result 100000000000000000000
Bound result 50000000000000000000
Bound result 31536000
Bound result 1
[PASS] test_restore_revertsWith_underflow_offsetIncrease() (gas: 193861)
[PASS] test_restore_two_wei_shares_delta_increase() (gas: 246063)
[PASS] test_restore_when_asset_frozen() (gas: 412879)
Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 19.21s (19.19s CPU time)
Ran 1 test for tests/unit/Hub/Hub.Rounding.t.sol:HubRoundingTest
[PASS] test_sharePriceWithMultipleDonations() (gas: 699220769)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 3.65s (3.63s CPU time)
Ran 8 tests for tests/unit/Hub/Hub.Sweep.t.sol:HubSweepTest
[PASS] test_sweep() (gas: 484704)
Logs:
Bound result 1000000000000000000000
Bound result 1000000000000000000000
[PASS] test_sweep_does_not_impact_utilization(uint256,uint256) (runs: 5000, μ: 648257, ~: 649417)
[PASS] test_sweep_fuzz(uint256,uint256) (runs: 5000, μ: 485217, ~: 485228)
[PASS] test_sweep_revertsWith_AssetNotListed() (gas: 12317)
[PASS] test_sweep_revertsWith_InsufficientLiquidity() (gas: 234857)
[PASS] test_sweep_revertsWith_InvalidAmount() (gas: 101549)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 92083, ~: 92083)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController_init() (gas: 37943)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 18.07s (18.05s CPU time)
Ran 7 tests for tests/unit/Hub/Hub.TransferShares.t.sol:HubTransferSharesTest
[PASS] test_transferShares() (gas: 170871)
Logs:
Bound result 1000000000000000000000
Bound result 1000000000000000000000
[PASS] test_transferShares_fuzz(uint256,uint256) (runs: 5000, μ: 174304, ~: 174456)
[PASS] test_transferShares_fuzz_revertsWith_AddedSharesExceeded(uint256) (runs: 5000, μ: 140805, ~: 140532)
[PASS] test_transferShares_revertsWith_AddCapExceeded() (gas: 184283)
[PASS] test_transferShares_revertsWith_SpokeNotActive() (gas: 164956)
[PASS] test_transferShares_revertsWith_SpokePaused() (gas: 167327)
[PASS] test_transferShares_zeroShares_revertsWith_InvalidShares() (gas: 22530)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 6.70s (6.68s CPU time)
Ran 6 tests for tests/unit/Hub/HubAccrueInterest.t.sol:HubAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 41386)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint32) (runs: 5000, μ: 330493, ~: 330422)
[PASS] test_accrueInterest_NoInterest_OnlyAdd(uint32) (runs: 5000, μ: 187403, ~: 187332)
[PASS] test_accrueInterest_fuzz_BorrowAmountAndElapsed(uint256,uint32) (runs: 5000, μ: 262834, ~: 265179)
[PASS] test_accrueInterest_fuzz_BorrowAmountRateAndElapsed(uint256,uint256,uint32) (runs: 5000, μ: 363205, ~: 366765)
[PASS] test_accrueInterest_fuzz_BorrowAndWait(uint32) (runs: 5000, μ: 264206, ~: 264135)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 21.22s (21.21s CPU time)
Ran 57 tests for tests/unit/HubConfigurator.t.sol:HubConfiguratorTest
[PASS] test_addAsset_fuzz(bool,address,uint8,address,uint16,uint32,uint32,uint32) (runs: 5000, μ: 852256, ~: 852544)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(bool,address,uint8,address,address) (runs: 5000, μ: 56326, ~: 56767)
[PASS] test_addAsset_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 34798, ~: 34798)
[PASS] test_addAsset_revertsWith_InvalidAddress_irStrategy() (gas: 50445)
[PASS] test_addAsset_revertsWith_InvalidAddress_underlying() (gas: 50343)
[PASS] test_addAsset_reverts_invalidIrData() (gas: 44350)
[PASS] test_addSpoke() (gas: 124687)
[PASS] test_addSpokeToAssets() (gas: 219685)
[PASS] test_addSpokeToAssets_revertsWith_MismatchedConfigs() (gas: 24613)
[PASS] test_addSpokeToAssets_revertsWith_OwnableUnauthorizedAccount() (gas: 17213)
[PASS] test_addSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 16829)
[PASS] test_deactivateAsset() (gas: 155449)
[PASS] test_deactivateAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 18008)
[PASS] test_deactivateSpoke() (gas: 152305)
[PASS] test_deactivateSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 17950)
[PASS] test_freezeAsset() (gas: 158120)
[PASS] test_freezeAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 17941)
[PASS] test_freezeSpoke() (gas: 155030)
[PASS] test_freezeSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 18060)
[PASS] test_pauseAsset() (gas: 155446)
[PASS] test_pauseAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 17898)
[PASS] test_pauseSpoke() (gas: 152434)
[PASS] test_pauseSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 18017)
[PASS] test_updateFeeConfig_Scenario() (gas: 322726)
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, μ: 174466, ~: 174326)
[PASS] test_updateFeeConfig_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17683, ~: 17683)
[PASS] test_updateFeeConfig_revertsWith_InvalidAddress_spoke() (gas: 48138)
[PASS] test_updateFeeConfig_revertsWith_InvalidLiquidityFee() (gas: 50083)
[PASS] test_updateFeeReceiver_Scenario() (gas: 204758)
[PASS] test_updateFeeReceiver_WithdrawFromOldSpoke() (gas: 959476)
[PASS] test_updateFeeReceiver_correctAccruals() (gas: 987035)
[PASS] test_updateFeeReceiver_fuzz(address) (runs: 5000, μ: 170882, ~: 170901)
[PASS] test_updateFeeReceiver_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17269, ~: 17269)
[PASS] test_updateFeeReceiver_revertsWith_InvalidAddress_spoke() (gas: 52675)
[PASS] test_updateFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 74330)
[PASS] test_updateInterestRateData() (gas: 71575)
[PASS] test_updateInterestRateData_revertsWith_OwnableUnauthorizedAccount() (gas: 19152)
[PASS] test_updateInterestRateStrategy() (gas: 91080)
[PASS] test_updateInterestRateStrategy_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 28659, ~: 28659)
[PASS] test_updateInterestRateStrategy_revertsWith_InterestRateStrategyReverts() (gas: 74619)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidAddress_irStrategy() (gas: 64366)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidInterestRateStrategy() (gas: 64861)
[PASS] test_updateLiquidityFee_fuzz(uint256,uint16) (runs: 5000, μ: 84315, ~: 84169)
[PASS] test_updateLiquidityFee_revertsWith_InvalidLiquidityFee() (gas: 52600)
[PASS] test_updateLiquidityFee_revertsWith_OwnableUnauthorizedAccount() (gas: 16633)
[PASS] test_updateReinvestmentController() (gas: 99106)
[PASS] test_updateReinvestmentController_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17271, ~: 17271)
[PASS] test_updateSpokeActive() (gas: 81157)
[PASS] test_updateSpokeActive_revertsWith_OwnableUnauthorizedAccount() (gas: 20241)
[PASS] test_updateSpokeCaps() (gas: 62767)
[PASS] test_updateSpokeCaps_revertsWith_OwnableUnauthorizedAccount() (gas: 20172)
[PASS] test_updateSpokeDrawCap() (gas: 62574)
[PASS] test_updateSpokeDrawCap_revertsWith_OwnableUnauthorizedAccount() (gas: 20245)
[PASS] test_updateSpokePaused() (gas: 84139)
[PASS] test_updateSpokePaused_revertsWith_OwnableUnauthorizedAccount() (gas: 20352)
[PASS] test_updateSpokeSupplyCap() (gas: 62561)
[PASS] test_updateSpokeSupplyCap_revertsWith_OwnableUnauthorizedAccount() (gas: 20193)
Suite result: ok. 57 passed; 0 failed; 0 skipped; finished in 9.51s (9.49s CPU time)
Ran 2 tests for tests/invariant/HubInvariant.t.sol:HubInvariant
[SKIP] invariant_exchangeRateMonotonicallyIncreasing() (runs: 1, calls: 1, reverts: 1)
[SKIP] invariant_reserveTotalAssets() (runs: 1, calls: 1, reverts: 1)
Suite result: ok. 0 passed; 0 failed; 2 skipped; finished in 3.00ms (633.26µs CPU time)
Ran 6 tests for tests/unit/Spoke/Spoke.Borrow.Scenario.t.sol:SpokeBorrowScenarioTest
[PASS] test_borrow_fuzz_multi_spoke_multi_reserves(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 2195259, ~: 2205417)
[PASS] test_borrow_fuzz_single_spoke_multi_reserves(uint256,uint256,uint256,uint256) (runs: 5000, μ: 2360731, ~: 2369739)
[PASS] test_borrow_fuzz_single_spoke_multi_reserves_multi_user(uint256,uint256,uint256,uint256) (runs: 5000, μ: 2748143, ~: 2756467)
[PASS] test_borrow_fuzz_skip_borrow(uint256,uint256,uint256) (runs: 5000, μ: 1078085, ~: 1080378)
[PASS] test_borrow_skip_borrow() (gas: 1079563)
Logs:
Bound result 10000000000000000000
Bound result 20000000000000000000
Bound result 31536000
[PASS] test_userAccountData_does_not_include_zero_cf_collateral() (gas: 1158569)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 183.27s (183.25s CPU time)
Ran 14 tests for tests/unit/Spoke/Spoke.Borrow.Validation.t.sol:SpokeBorrowValidationTest
[PASS] test_borrow_fuzz_revertsWith_DrawCapExceeded(uint256,uint56) (runs: 5000, μ: 106368, ~: 106276)
[PASS] test_borrow_fuzz_revertsWith_DrawCapExceeded_due_to_interest(uint256) (runs: 5000, μ: 696899, ~: 697186)
[PASS] test_borrow_fuzz_revertsWith_InsufficientLiquidity(uint256,uint256,uint256) (runs: 5000, μ: 280627, ~: 280432)
[PASS] test_borrow_fuzz_revertsWith_InvalidAmount(uint256) (runs: 5000, μ: 32667, ~: 32725)
[PASS] test_borrow_fuzz_revertsWith_ReserveFrozen(uint256,uint256) (runs: 5000, μ: 69484, ~: 69282)
[PASS] test_borrow_fuzz_revertsWith_ReserveNotBorrowable(uint256,uint256) (runs: 5000, μ: 69719, ~: 69517)
[PASS] test_borrow_fuzz_revertsWith_ReserveNotListed(uint256,uint256) (runs: 5000, μ: 26068, ~: 25812)
[PASS] test_borrow_fuzz_revertsWith_ReservePaused(uint256,uint256) (runs: 5000, μ: 69341, ~: 69139)
[PASS] test_borrow_revertsWith_InsufficientLiquidity() (gas: 280346)
Logs:
Bound result 10000000000000000000
[PASS] test_borrow_revertsWith_InvalidAmount() (gas: 34336)
Logs:
Bound result 2
[PASS] test_borrow_revertsWith_ReserveFrozen() (gas: 70888)
Logs:
Bound result 2
Bound result 1
[PASS] test_borrow_revertsWith_ReserveNotBorrowable() (gas: 71077)
Logs:
Bound result 2
Bound result 1
[PASS] test_borrow_revertsWith_ReserveNotListed() (gas: 27096)
Logs:
Bound result 1
[PASS] test_borrow_revertsWith_ReservePaused() (gas: 70765)
Logs:
Bound result 2
Bound result 1
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 14.83s (14.81s CPU time)
Ran 2 tests for tests/unit/Spoke/Spoke.Borrow.t.sol:SpokeBorrowTest
[PASS] test_borrow() (gas: 1073521)
[PASS] test_borrow_fuzz_amounts(uint256,uint256) (runs: 5000, μ: 1065594, ~: 1065638)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 26.95s (26.93s CPU time)
Ran 24 tests for tests/unit/Spoke/Spoke.Config.t.sol:SpokeConfigTest
[PASS] test_addReserve() (gas: 390303)
[PASS] test_addReserve_fuzz_revertsWith_AssetNotListed() (gas: 245676)
[PASS] test_addReserve_revertsWith_InvalidAddress_hub() (gas: 5949325)
[PASS] test_addReserve_revertsWith_InvalidAddress_oracle() (gas: 5986450)
[PASS] test_addReserve_revertsWith_InvalidAssetId() (gas: 33193)
[PASS] test_addReserve_revertsWith_ReserveExists() (gas: 374834)
[PASS] test_spoke_deploy() (gas: 4883424)
[PASS] test_spoke_deploy_revertsWith_InvalidOracleDecimals() (gas: 46347)
[PASS] test_spoke_deploy_reverts_on_InvalidConstructorInput() (gas: 43748)
[PASS] test_updateLiquidationConfig_fuzz_liqBonusConfig((uint128,uint64,uint16)) (runs: 5000, μ: 52180, ~: 52165)
[PASS] test_updateLiquidationConfig_fuzz_revertsWith_InvalidLiquidationConfig_healthFactorForMaxBonus((uint128,uint64,uint16)) (runs: 5000, μ: 37834, ~: 37971)
[PASS] test_updateLiquidationConfig_fuzz_revertsWith_InvalidLiquidationConfig_liquidationBonusFactor((uint128,uint64,uint16)) (runs: 5000, μ: 37400, ~: 37181)
[PASS] test_updateLiquidationConfig_fuzz_targetHealthFactor(uint128) (runs: 5000, μ: 46883, ~: 47181)
[PASS] test_updateLiquidationConfig_liqBonusConfig() (gas: 51124)
Logs:
Bound result 900000000000000000
Bound result 1000
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_revertsWith_InvalidLiquidationConfig_healthFactorForMaxBonus() (gas: 36484)
Logs:
Bound result 1000000000000000000
Bound result 1000
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_revertsWith_InvalidLiquidationConfig_liquidationBonusFactor() (gas: 36278)
Logs:
Bound result 900000000000000000
Bound result 10001
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_targetHealthFactor() (gas: 46464)
Logs:
Bound result 1000000000000000001
[PASS] test_updateReserveConfig() (gas: 53904)
[PASS] test_updateReserveConfig_fuzz((bool,bool,bool,uint24)) (runs: 5000, μ: 55322, ~: 55149)
[PASS] test_updateReserveConfig_revertsWith_InvalidCollateralRisk() (gas: 39647)
[PASS] test_updateReserveConfig_revertsWith_ReserveNotListed() (gas: 36296)
[PASS] test_updateReservePriceSource() (gas: 240136)
[PASS] test_updateReservePriceSource_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 31125, ~: 31125)
[PASS] test_updateReservePriceSource_revertsWith_ReserveNotListed() (gas: 34321)
Suite result: ok. 24 passed; 0 failed; 0 skipped; finished in 3.86s (3.84s CPU time)
Ran 6 tests for tests/unit/KeyValueList.t.sol:KeyValueListTest
[PASS] test_fuzz_get(uint256[]) (runs: 5000, μ: 413993, ~: 412016)
[PASS] test_fuzz_get_uninitialized(uint256[]) (runs: 5000, μ: 263659, ~: 253236)
[PASS] test_fuzz_get_uninitialized_sorted(uint256[]) (runs: 5000, μ: 205023, ~: 185578)
[PASS] test_fuzz_sortByKey(uint256[]) (runs: 5000, μ: 464767, ~: 455219)
[PASS] test_fuzz_sortByKey_length(uint256) (runs: 5000, μ: 204212, ~: 209396)
[PASS] test_fuzz_sortByKey_with_collision(uint256[]) (runs: 5000, μ: 548888, ~: 539474)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 65.43s (65.43s 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, μ: 30556, ~: 30489)
[PASS] test_calculateDebtToLiquidate_fuzz_AmountAdjustedDueToDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 32295, ~: 32398)
[PASS] test_calculateDebtToLiquidate_fuzz_ImpossibleToAdjustForDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 34449, ~: 34418)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 3.40s (3.38s 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, μ: 22995, ~: 23049)
[PASS] test_calculateDebtToTargetHealthFactor_NoPrecisionLoss() (gas: 25367)
[PASS] test_calculateDebtToTargetHealthFactor_PrecisionLoss() (gas: 15341)
[PASS] test_calculateDebtToTargetHealthFactor_UnitPrice() (gas: 25300)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_NoRevert((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 20053, ~: 20107)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_revertsWith_DivisionByZero_ZeroAssetPrice((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22752, ~: 22806)
[PASS] test_calculateDebtToTargetHealthFactor_revertsWith_ArithmeticError_TargetHealthFactorLessThanHealthFactor((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22835, ~: 22889)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 2.81s (2.79s CPU time)
Ran 16 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.EvaluateDeficit.t.sol:LiquidationLogicEvaluateDeficitTest
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCM() (gas: 9003)
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCO() (gas: 8971)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCM() (gas: 8992)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCO() (gas: 8959)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCM() (gas: 8985)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCO() (gas: 9052)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCM() (gas: 9017)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCO() (gas: 9005)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCM() (gas: 9005)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCO() (gas: 8994)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCM() (gas: 8928)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCO() (gas: 8961)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCM() (gas: 8938)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCO() (gas: 8995)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCM() (gas: 8946)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCO() (gas: 9024)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 17.97ms (1.01ms CPU time)
Ran 3 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateCollateral.t.sol:LiquidationLogicLiquidateCollateralTest
[PASS] test_liquidateCollateral_fuzz(uint256,uint256) (runs: 5000, μ: 238468, ~: 238953)
[PASS] test_liquidateCollateral_fuzz_revertsWith_ArithmeticUnderflow(uint256,uint256) (runs: 5000, μ: 92447, ~: 92251)
[PASS] test_liquidateCollateral_fuzz_revertsWith_InvalidAmount(uint256) (runs: 5000, μ: 74798, ~: 74720)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 4.00s (3.98s CPU time)
Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateDebt.t.sol:LiquidationLogicLiquidateDebtTest
[PASS] test_liquidateDebt_fuzz(uint256) (runs: 5000, μ: 177750, ~: 177750)
[PASS] test_liquidateDebt_revertsWith_ArithmeticUnderflow() (gas: 142904)
[PASS] test_liquidateDebt_revertsWith_InsufficientAllowance() (gas: 146818)
[PASS] test_liquidateDebt_revertsWith_InsufficientBalance() (gas: 195598)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 2.33s (2.31s CPU time)
Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateUser.t.sol:LiquidationLogicLiquidateUserTest
[PASS] test_liquidateUser() (gas: 350226)
[PASS] test_liquidateUser_revertsWith_InvalidDebtToCover() (gas: 69084)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Collateral() (gas: 100615)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Debt() (gas: 109593)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 24.57ms (1.56ms CPU time)
Ran 10 tests for tests/unit/Spoke/Spoke.DynamicConfig.Triggers.t.sol:SpokeDynamicConfigTriggersTest
[PASS] test_borrow_triggers_dynamicConfigUpdate() (gas: 1326280)
[PASS] test_liquidate_does_not_trigger_dynamicConfigUpdate() (gas: 1617305)
[PASS] test_repay_does_not_trigger_dynamicConfigUpdate() (gas: 911265)
[PASS] test_supply_does_not_trigger_dynamicConfigUpdate() (gas: 1068817)
[PASS] test_updateUserDynamicConfig_doesHFCheck() (gas: 801617)
[PASS] test_updateUserDynamicConfig_reverts_when_not_authorized(address) (runs: 5000, μ: 1194099, ~: 1194099)
[PASS] test_updateUserDynamicConfig_triggers_dynamicConfigUpdate() (gas: 676582)
[PASS] test_updateUserDynamicConfig_updatesRP() (gas: 1297323)
[PASS] test_usingAsCollateral_triggers_dynamicConfigUpdate() (gas: 1342664)
[PASS] test_withdraw_triggers_dynamicConfigUpdate() (gas: 1363284)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 28.14s (28.12s CPU time)
Ran 8 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationAmounts.t.sol:LiquidationLogicLiquidationAmountsTest
[PASS] test_calculateLiquidationAmounts_EnoughCollateral() (gas: 15155)
[PASS] test_calculateLiquidationAmounts_InsufficientCollateral() (gas: 15402)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_CollateralDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 53890, ~: 53761)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoCollateralDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 52993, ~: 52999)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoDebtLeft((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 69659, ~: 69467)
[PASS] test_calculateLiquidationAmounts_fuzz_InsufficientCollateral((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 56973, ~: 56819)
[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Collateral((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 52812, ~: 52709)
[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Debt((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 65106, ~: 65107)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 18.39s (18.38s CPU time)
Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationBonus.t.sol:LiquidationLogicLiquidationBonusTest
[PASS] test_calculateLiquidationBonus_MinBonusDueToRounding() (gas: 9360)
[PASS] test_calculateLiquidationBonus_PartialBonus() (gas: 9381)
[PASS] test_calculateLiquidationBonus_fuzz_ConstantBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 17241, ~: 17178)
[PASS] test_calculateLiquidationBonus_fuzz_MaxBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 19579, ~: 19506)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 986.47ms (967.84ms CPU time)
Ran 12 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.ValidateLiquidationCall.t.sol:LiquidationLogicValidateLiquidationCallTest
[PASS] test_validateLiquidationCall() (gas: 28553)
[PASS] test_validateLiquidationCall_revertsWith_CollateralCannotBeLiquidated_NotUsingAsCollateral() (gas: 29608)
[PASS] test_validateLiquidationCall_revertsWith_CollateralCannotBeLiquidated_ZeroCollateralFactor() (gas: 29657)
[PASS] test_validateLiquidationCall_revertsWith_HealthFactorNotBelowThreshold() (gas: 34372)
[PASS] test_validateLiquidationCall_revertsWith_InvalidDebtToCover() (gas: 29343)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotBorrowed() (gas: 29742)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotListed_ZeroCollateralHub() (gas: 29440)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotListed_ZeroDebtHub() (gas: 29497)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotSupplied() (gas: 29644)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_CollateralPaused() (gas: 34376)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_DebtPaused() (gas: 34392)
[PASS] test_validateLiquidationCall_revertsWith_SelfLiquidation() (gas: 36299)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 18.25ms (1.03ms CPU time)
Ran 26 tests for tests/unit/MathUtils.t.sol:MathUtilsTest
[PASS] test_add_edge_cases() (gas: 4788)
[PASS] test_add_negative_operand(uint256,int256) (runs: 5000, μ: 9324, ~: 9561)
[PASS] test_add_positive_operand(uint256,int256) (runs: 5000, μ: 4013, ~: 4010)
[PASS] test_calculateLinearInterest() (gas: 4511)
[PASS] test_calculateLinearInterest_add_edge() (gas: 5087)
[PASS] test_calculateLinearInterest_edge_cases() (gas: 16870)
Logs:
Bound result 0
Bound result 1
Bound result 864000000
Bound result 864000000
[PASS] test_calculateLinearInterest_reverts_on_past_timestamp(uint32) (runs: 5000, μ: 7584, ~: 7508)
[PASS] test_constants() (gas: 3211)
[PASS] test_fuzz_calculateLinearInterest(uint96,uint32,uint256) (runs: 5000, μ: 8698, ~: 8997)
[PASS] test_fuzz_mulDivDown(uint256,uint256,uint256) (runs: 5000, μ: 3491, ~: 3545)
[PASS] test_fuzz_mulDivUp(uint256,uint256,uint256) (runs: 5000, μ: 3667, ~: 3781)
[PASS] test_min(uint256,uint256) (runs: 5000, μ: 3338, ~: 3339)
[PASS] test_mulDivDown_NoRemainder() (gas: 3324)
[PASS] test_mulDivDown_RevertOnDivByZero() (gas: 3191)
[PASS] test_mulDivDown_RevertOnOverflow() (gas: 3203)
[PASS] test_mulDivDown_WithRemainder() (gas: 3236)
[PASS] test_mulDivDown_ZeroAOrB() (gas: 3768)
[PASS] test_mulDivUp_NoRemainder() (gas: 3350)
[PASS] test_mulDivUp_RevertOnDivByZero() (gas: 3146)
[PASS] test_mulDivUp_RevertOnOverflow() (gas: 3204)
[PASS] test_mulDivUp_WithRemainder() (gas: 3349)
[PASS] test_mulDivUp_ZeroAOrB() (gas: 3818)
[PASS] test_signedSub(uint256,uint256) (runs: 5000, μ: 8639, ~: 8594)
[PASS] test_uncheckedAdd(uint256,uint256) (runs: 5000, μ: 3460, ~: 3452)
[PASS] test_uncheckedExp(uint256,uint256) (runs: 5000, μ: 11443, ~: 7295)
[PASS] test_uncheckedSub(uint256,uint256) (runs: 5000, μ: 3457, ~: 3540)
Suite result: ok. 26 passed; 0 failed; 0 skipped; finished in 1.48s (1.47s CPU time)
Ran 20 tests for tests/unit/Spoke/Spoke.DynamicConfig.t.sol:SpokeDynamicConfigTest
[PASS] test_addDynamicReserveConfig() (gas: 85033)
[PASS] test_addDynamicReserveConfig_fuzz_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_incompatible(uint16,uint32) (runs: 5000, μ: 47745, ~: 47912)
[PASS] test_addDynamicReserveConfig_once() (gas: 542097)
[PASS] test_addDynamicReserveConfig_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 52383, ~: 52383)
[PASS] test_addDynamicReserveConfig_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_collateralFactor() (gas: 59450)
[PASS] test_addDynamicReserveConfig_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_liquidationBonus() (gas: 41863)
[PASS] test_addDynamicReserveConfig_revertsWith_InvalidLiquidationFee() (gas: 42337)
[PASS] test_addDynamicReserveConfig_revertsWith_ReserveNotListed() (gas: 34306)
[PASS] test_fuzz_addDynamicReserveConfig_spaced_dup_updates(bytes32) (runs: 5000, μ: 154147, ~: 154147)
[PASS] test_fuzz_addDynamicReserveConfig_trailing_order(bytes32) (runs: 5000, μ: 150812, ~: 150812)
[PASS] test_offboardReserve_existing_borrows_remain_unaffected() (gas: 1157993)
[PASS] test_updateDynamicReserveConfig() (gas: 1716730)
[PASS] test_updateDynamicReserveConfig_fuzz_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus(uint16,uint32) (runs: 5000, μ: 63316, ~: 63483)
[PASS] test_updateDynamicReserveConfig_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 52362, ~: 52362)
[PASS] test_updateDynamicReserveConfig_revertsWith_ConfigKeyUninitialized() (gas: 54243)
[PASS] test_updateDynamicReserveConfig_revertsWith_InvalidCollateralFactor() (gas: 56433)
[PASS] test_updateDynamicReserveConfig_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_collateralFactor() (gas: 57219)
[PASS] test_updateDynamicReserveConfig_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_liquidationBonus() (gas: 57367)
[PASS] test_updateDynamicReserveConfig_revertsWith_InvalidLiquidationFee() (gas: 57905)
[PASS] test_updateDynamicReserveConfig_revertsWith_ReserveNotListed() (gas: 34614)
Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 10.22s (10.20s CPU time)
Ran 5 tests for tests/gas/Spoke.Getters.gas.t.sol:SpokeGetters_Gas_Tests
[PASS] test_getUserAccountData() (gas: 22798)
[PASS] test_getUserAccountData_oneSupplies() (gas: 274119)
[PASS] test_getUserAccountData_twoSupplies() (gas: 499805)
[PASS] test_getUserAccountData_twoSupplies_oneBorrows() (gas: 1029311)
[PASS] test_getUserAccountData_twoSupplies_twoBorrows() (gas: 1595313)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 28.45ms (4.75ms CPU time)
Ran 5 tests for tests/unit/Spoke/Spoke.Getters.t.sol:SpokeGettersTest
[PASS] test_getLiquidationBonus_configured() (gas: 89525)
Logs:
Bound result 2
Bound result 1000000000000000000
Bound result 4000
Bound result 900000000000000000
[PASS] test_getLiquidationBonus_fuzz_configured(uint256,uint256,uint16,uint64) (runs: 5000, μ: 88209, ~: 88636)
[PASS] test_getLiquidationBonus_fuzz_notConfigured(uint256,uint256) (runs: 5000, μ: 65848, ~: 65600)
[PASS] test_getLiquidationBonus_notConfigured() (gas: 67107)
Logs:
Bound result 2
Bound result 1000000000000000000
[PASS] test_protocol_getters() (gas: 278318)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 1.96s (1.94s CPU time)
Ran 4 tests for tests/unit/Spoke/Liquidations/Spoke.LiquidationCall.Dust.t.sol:SpokeLiquidationCallDustTest
[PASS] test_collateralDust_min_debtToTarget() (gas: 7383039)
[PASS] test_debtToCover_exceeds_collateralValue() (gas: 7376536)
[PASS] test_dustColl_allowed() (gas: 7224275)
[PASS] test_dustDebt_allowed() (gas: 7371446)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 45.98ms (22.21ms CPU time)
Ran 34 tests for tests/unit/NativeTokenGateway.t.sol:NativeTokenGatewayTest
[PASS] test_borrowNative() (gas: 622190)
Logs:
Bound result 5000000000000000000
[PASS] test_borrowNative_fuzz(uint256) (runs: 5000, μ: 622424, ~: 622219)
[PASS] test_borrowNative_fuzz_otherReceiver(uint256) (runs: 5000, μ: 648381, ~: 648176)
[PASS] test_borrowNative_otherReceiver() (gas: 648041)
Logs:
Bound result 5000000000000000000
[PASS] test_borrowNative_revertsWith_InvalidAddress() (gas: 30629)
[PASS] test_borrowNative_revertsWith_InvalidAmount() (gas: 30671)
[PASS] test_borrowNative_revertsWith_NotNativeWrappedAsset() (gas: 30754)
[PASS] test_constructor() (gas: 1035094)
[PASS] test_constructor_revertsWith_InvalidAddress() (gas: 129984)
[PASS] test_fallback_revertsWith_UnsupportedAction() (gas: 17453)
[PASS] test_receive_revertsWith_UnsupportedAction() (gas: 17216)
[PASS] test_renouncePositionManagerRole() (gas: 44812)
[PASS] test_renouncePositionManagerRole_revertsWith_OwnableUnauthorizedAccount() (gas: 50961)
[PASS] test_repayNative() (gas: 747068)
Logs:
Bound result 5000000000000000000
[PASS] test_repayNative_excessAmount() (gas: 638915)
[PASS] test_repayNative_fuzz(uint256) (runs: 5000, μ: 746673, ~: 747725)
[PASS] test_repayNative_fuzz_withInterest(uint256,uint256) (runs: 5000, μ: 649223, ~: 643599)
[PASS] test_repayNative_revertsWith_InvalidAmount() (gas: 30645)
[PASS] test_repayNative_revertsWith_NativeAmountMismatch() (gas: 54864)
[PASS] test_repayNative_revertsWith_NotNativeWrappedAsset() (gas: 37450)
[PASS] test_supplyNative() (gas: 234409)
Logs:
Bound result 100000000000000000000
[PASS] test_supplyNative_fuzz(uint256) (runs: 5000, μ: 234751, ~: 234481)
[PASS] test_supplyNative_revertsWith_InvalidAmount() (gas: 30647)
[PASS] test_supplyNative_revertsWith_NativeAmountMismatch() (gas: 54697)
[PASS] test_supplyNative_revertsWith_NotNativeWrappedAsset() (gas: 37363)
[PASS] test_withdrawNative() (gas: 280511)
Logs:
Bound result 100000000000000000000
[PASS] test_withdrawNative_fuzz(uint256) (runs: 5000, μ: 280488, ~: 280561)
[PASS] test_withdrawNative_fuzz_allBalance(uint256) (runs: 5000, μ: 234675, ~: 234482)
[PASS] test_withdrawNative_fuzz_allBalanceWithInterest(uint256,uint256) (runs: 5000, μ: 614548, ~: 615673)
[PASS] test_withdrawNative_fuzz_otherReceiver(uint256) (runs: 5000, μ: 264294, ~: 264101)
[PASS] test_withdrawNative_otherReceiver() (gas: 264108)
Logs:
Bound result 100000000000000000000
[PASS] test_withdrawNative_revertsWith_InvalidAddress() (gas: 30540)
[PASS] test_withdrawNative_revertsWith_InvalidAmount() (gas: 30591)
[PASS] test_withdrawNative_revertsWith_NotNativeWrappedAsset() (gas: 30623)
Suite result: ok. 34 passed; 0 failed; 0 skipped; finished in 74.65s (74.64s CPU time)
Ran 4 tests for tests/unit/NoncesKeyed.t.sol:NoncesKeyedTest
[PASS] test_useCheckedNonce_monotonic(bytes32) (runs: 5000, μ: 16229, ~: 16229)
[PASS] test_useCheckedNonce_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 107533, ~: 107533)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 17035, ~: 17035)
[PASS] test_useNonce_zeroKey_monotonic(bytes32) (runs: 5000, μ: 16983, ~: 16983)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 4.74s (4.73s CPU time)
Ran 10 tests for tests/unit/PercentageMath.t.sol:PercentageMathTests
[PASS] test_constants() (gas: 8664)
[PASS] test_fromBpsDown() (gas: 9678)
[PASS] test_percentDiv() (gas: 15222)
[PASS] test_percentDivUp_ge_value(uint256,uint256) (runs: 5000, μ: 15286, ~: 15509)
[PASS] test_percentDivUp_le_value(uint256,uint256) (runs: 5000, μ: 15669, ~: 15662)
[PASS] test_percentDiv_fuzz(uint256,uint256) (runs: 5000, μ: 12881, ~: 13012)
[PASS] test_percentMul() (gas: 15116)
[PASS] test_percentMulUp_ge_value(uint256,uint256) (runs: 5000, μ: 15652, ~: 15645)
[PASS] test_percentMulUp_le_value(uint256,uint256) (runs: 5000, μ: 15289, ~: 15512)
[PASS] test_percentMul_fuzz(uint256,uint256) (runs: 5000, μ: 11763, ~: 12247)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 1.46s (1.46s CPU time)
Ran 29 tests for tests/unit/libraries/PositionStatusMap.t.sol:PositionStatusMapTest
[PASS] test_bucketId() (gas: 8971)
[PASS] test_collateralCount() (gas: 110158)
[PASS] test_collateralCount(uint256) (runs: 5000, μ: 2080037, ~: 1886431)
[PASS] test_collateralCount_ignoresInvalidBits() (gas: 124482)
[PASS] test_constants() (gas: 44966)
[PASS] test_fls() (gas: 545261)
[PASS] test_fromBitId(uint256,uint256) (runs: 5000, μ: 14110, ~: 14336)
[PASS] test_fuzz_setBorrowing(uint256,bool) (runs: 5000, μ: 22353, ~: 32140)
[PASS] test_fuzz_setUseAsCollateral(uint256,bool) (runs: 5000, μ: 22449, ~: 32236)
[PASS] test_getBucketWord(uint256) (runs: 5000, μ: 14489, ~: 14489)
[PASS] test_isUsingAsCollateralOrBorrowing_slot0() (gas: 108801)
[PASS] test_isUsingAsCollateralOrBorrowing_slot1() (gas: 44065)
[PASS] test_isolateBorrowing(uint256) (runs: 5000, μ: 162282, ~: 162282)
[PASS] test_isolateBorrowingUntil(uint256,uint256) (runs: 5000, μ: 154859, ~: 154843)
[PASS] test_isolateCollateral(uint256) (runs: 5000, μ: 162044, ~: 162044)
[PASS] test_isolateCollateralUntil(uint256,uint256) (runs: 5000, μ: 154838, ~: 154822)
[PASS] test_isolateUntil(uint256,uint256) (runs: 5000, μ: 143623, ~: 143623)
[PASS] test_next(uint256) (runs: 5000, μ: 20427, ~: 20328)
[PASS] test_nextBorrowing(uint256) (runs: 5000, μ: 18226, ~: 18289)
[PASS] test_nextBorrowing_continuous() (gas: 63845326)
[PASS] test_nextCollateral(uint256) (runs: 5000, μ: 18118, ~: 17716)
[PASS] test_nextCollateral_continuous() (gas: 64381718)
[PASS] test_next_continuous() (gas: 91795620)
[PASS] test_popCount(bytes32) (runs: 5000, μ: 38133, ~: 38133)
[PASS] test_setBorrowing_slot0() (gas: 44129)
[PASS] test_setBorrowing_slot1() (gas: 44166)
[PASS] test_setUseAsCollateral_slot0() (gas: 44203)
[PASS] test_setUseAsCollateral_slot1() (gas: 44185)
[PASS] test_setters_use_correct_slot(uint256) (runs: 5000, μ: 22195, ~: 22195)
Suite result: ok. 29 passed; 0 failed; 0 skipped; finished in 103.06s (103.06s CPU time)
Ran 5 tests for tests/unit/Rescuable.t.sol:RescuableTest
[PASS] test_constructor() (gas: 12654)
[PASS] test_rescueNative_fuzz(uint256) (runs: 5000, μ: 33693, ~: 33370)
[PASS] test_rescueNative_revertsWith_OnlyRescueGuardian() (gas: 11400)
[PASS] test_rescueToken_fuzz(uint256) (runs: 5000, μ: 209619, ~: 209387)
[PASS] test_rescueToken_revertsWith_OnlyRescueGuardian() (gas: 183212)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 3.49s (3.48s CPU time)
Ran 10 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Constants.t.sol:SignatureGatewayConstantsTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 2025982)
[PASS] test_borrow_typeHash() (gas: 9902)
[PASS] test_constructor() (gas: 2173485)
[PASS] test_eip712Domain() (gas: 2031566)
[PASS] test_repay_typeHash() (gas: 9959)
[PASS] test_setUsingAsCollateral_typeHash() (gas: 9971)
[PASS] test_supply_typeHash() (gas: 9907)
[PASS] test_updateUserDynamicConfig_typeHash() (gas: 9941)
[PASS] test_updateUserRiskPremium_typeHash() (gas: 9904)
[PASS] test_withdraw_typeHash() (gas: 10037)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 19.55ms (2.11ms CPU time)
Ran 4 tests for tests/unit/misc/SignatureGateway/SignatureGateway.PermitReserve.t.sol:SignatureGatewayPermitReserveTest
[PASS] test_permitReserve() (gas: 102481)
[PASS] test_permitReserve_forwards_correct_call() (gas: 49584)
[PASS] test_permitReserve_ignores_permit_reverts() (gas: 38479)
[PASS] test_permitReserve_revertsWith_ReserveNotListed() (gas: 28403)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 19.49ms (2.01ms CPU time)
Ran 2 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.InsufficientAllowance.t.sol:SignatureGateway_InsufficientAllowance_Test
[PASS] test_repayWithSig_revertsWith_ERC20InsufficientAllowance() (gas: 467086)
[PASS] test_supplyWithSig_revertsWith_ERC20InsufficientAllowance() (gas: 84290)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 20.40ms (2.72ms CPU time)
Ran 21 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.InvalidSignature.t.sol:SignatureGatewayInvalidSignatureTest
[PASS] test_borrowWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 186150, ~: 186150)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 36133)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 34575)
[PASS] test_repayWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 186129, ~: 186129)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 36089)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 34664)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 229417, ~: 229417)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 36146)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 34742)
[PASS] test_supplyWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 186214, ~: 186214)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 36156)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 34651)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 64831, ~: 64831)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 23288)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 24720)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 64842, ~: 64842)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 23272)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 24787)
[PASS] test_withdrawWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 186082, ~: 186082)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 36132)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 34618)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 43.90s (43.88s 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: 77507)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 114039)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 69609)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 138491)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 79232)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 79152)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 99151)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 23.65ms (4.34ms 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: 75306)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 111838)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 67408)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 136290)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 77031)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 76951)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 96950)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 22.47ms (4.33ms CPU time)
Ran 11 tests for tests/unit/misc/SignatureGateway/SignatureGateway.t.sol:SignatureGatewayTest
[PASS] test_borrowWithSig() (gas: 815295)
[PASS] test_renouncePositionManagerRole() (gas: 26616)
[PASS] test_renouncePositionManagerRole_revertsWith_OnlyOwner() (gas: 16173)
[PASS] test_repayWithSig() (gas: 793603)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 309096)
[PASS] test_setUsingAsCollateralWithSig() (gas: 618070)
[PASS] test_supplyWithSig() (gas: 591396)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 321409)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 908736)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 16888, ~: 16888)
[PASS] test_withdrawWithSig() (gas: 600019)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 454.61ms (437.28ms CPU time)
Ran 3 tests for tests/unit/Spoke/Spoke.Access.t.sol:SpokeAccessTest
[PASS] testAccess_change_authority() (gas: 2612833)
[PASS] testAccess_hub_functions_callable_by_spokes() (gas: 603472)
[PASS] testAccess_spoke_admin_config_access() (gas: 490581)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 22.89ms (3.32ms 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),uint32) (runs: 0, μ: 0, ~: 0)
Suite result: ok. 0 passed; 0 failed; 1 skipped; finished in 22.06ms (4.42ms CPU time)
Ran 7 tests for tests/unit/Spoke/Spoke.AccrueInterest.t.sol:SpokeAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 138289)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint32) (runs: 5000, μ: 661658, ~: 661571)
[PASS] test_accrueInterest_NoInterest_OnlySupply(uint32) (runs: 5000, μ: 258104, ~: 258406)
[PASS] test_accrueInterest_TenPercentRp(uint256,uint32) (runs: 5000, μ: 596139, ~: 597162)
[PASS] test_accrueInterest_fuzz_BorrowAmountAndSkipTime(uint256,uint32) (runs: 5000, μ: 556430, ~: 557030)
[PASS] test_accrueInterest_fuzz_RPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint32) (runs: 5000, μ: 3939412, ~: 3954465)
[PASS] test_accrueInterest_fuzz_RatesRPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),(uint96,uint96,uint96,uint96),uint32) (runs: 5000, μ: 4000126, ~: 4012880)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 215.35s (215.33s 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, μ: 558696, ~: 558857)
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium_multiple_users(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 801538, ~: 801535)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_spoke() (gas: 585520559)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_user() (gas: 249146071)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_with_premium() (gas: 559176)
Logs:
Bound result 500000000000000000000
Bound result 5000
Bound result 34560000
Bound result 2
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 21.27s (21.25s CPU time)
Ran 7 tests for tests/unit/Spoke/Spoke.AccrueLiquidityFee.t.sol:SpokeAccrueLiquidityFeeTest
[PASS] test_accrueLiquidityFee() (gas: 849031)
[PASS] test_accrueLiquidityFee_NoActionTaken() (gas: 97951)
[PASS] test_accrueLiquidityFee_NoInterest_OnlySupply(uint32) (runs: 5000, μ: 235901, ~: 236059)
[PASS] test_accrueLiquidityFee_exact() (gas: 838059)
[PASS] test_accrueLiquidityFee_fuzz_BorrowAmountAndSkipTime(uint256,uint32) (runs: 5000, μ: 833109, ~: 862131)
[PASS] test_accrueLiquidityFee_maxLiquidityFee() (gas: 553816)
[PASS] test_accrueLiquidityFee_setUsingAsCollateral() (gas: 883680)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 19.33s (19.31s CPU time)
Ran 10 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_Gas_Tests
[PASS] test_borrow() (gas: 1165945)
[PASS] test_liquidation() (gas: 8320885)
[PASS] test_multicall_ops() (gas: 1600376)
[PASS] test_repay() (gas: 959509)
[PASS] test_setUserPositionManagerWithSig() (gas: 294022)
[PASS] test_supply() (gas: 948132)
[PASS] test_updateRiskPremium() (gas: 1432203)
[PASS] test_updateUserDynamicConfig() (gas: 513636)
[PASS] test_usingAsCollateral() (gas: 1612997)
[PASS] test_withdraw() (gas: 2100001)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 47.95ms (23.96ms CPU time)
Ran 10 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_ZeroRiskPremium_Gas_Tests
[PASS] test_borrow() (g...*[Comment body truncated]* |
♻️ Forge Gas Snapshots
🔕 Unchanged
|
Co-authored-by: miguelmtzinf <miguelmtz.mail@gmail.com>
a6f5128 to
65a8d6c
Compare
Kogaroshi
approved these changes
Oct 15, 2025
🔮 Coverage report
|
Kogaroshi
approved these changes
Oct 15, 2025
Kogaroshi
approved these changes
Oct 15, 2025
Kogaroshi
approved these changes
Oct 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
KeyedNonce(inherited bySpoke&SignatureGateway:useNonce(address)&useNonce()keynamespace.