Skip to content

Commit

Permalink
🔨 foundry: add fuzz tests to snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
cruzdanilo committed May 15, 2024
1 parent ca65672 commit 106707e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ DebtManagerTest:testFloatingToFixedRollHigherThanAvailableLiquidityWithSlippage(
DebtManagerTest:testFloatingToFixedRollHigherThanAvailableLiquidityWithSlippageWithThreePools() (gas: 2787984)
DebtManagerTest:testFloatingToFixedRollWithAccurateSlippage() (gas: 1687218)
DebtManagerTest:testFloatingToFixedRollWithAccurateSlippageWithPreviousPosition() (gas: 1924341)
DebtManagerTest:testFuzzRolls(uint8[4],uint8[4],uint256[4],uint40[4],uint8[4]) (runs: 256, μ: 6594014, ~: 6689921)
DebtManagerTest:testLateFixedRoll() (gas: 1310831)
DebtManagerTest:testLateFixedRollWithThreeLoops() (gas: 1897545)
DebtManagerTest:testLateFixedToFloatingRoll() (gas: 1273784)
Expand Down Expand Up @@ -140,6 +141,11 @@ InterestRateModelTest:testFixedBorrowRate() (gas: 2063720)
InterestRateModelTest:testFixedRateRevertAlreadyMatured() (gas: 2057902)
InterestRateModelTest:testFixedRateRevertUtilizationExceeded() (gas: 2065065)
InterestRateModelTest:testFloatingBorrowRate() (gas: 2057206)
InterestRateModelTest:testFuzzFixedRateGrowth(uint256,uint256,uint256,uint256) (runs: 256, μ: 2078017, ~: 2075196)
InterestRateModelTest:testFuzzFixedRateTimeSensitivity(uint256,uint256,uint256) (runs: 256, μ: 2084780, ~: 2084876)
InterestRateModelTest:testFuzzReferenceLegacyRateFixed(uint32,uint256,uint256[2],uint256[2],uint256,uint256,uint256) (runs: 256, μ: 9968014, ~: 10106149)
InterestRateModelTest:testFuzzReferenceRateFixed(uint256,uint256,uint256,uint256,uint256,uint256,(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,int256,uint256,uint256)) (runs: 256, μ: 2349900, ~: 2352721)
InterestRateModelTest:testFuzzReferenceRateFloating(uint256,uint256,(uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 256, μ: 2287279, ~: 2288159)
InterestRateModelTest:testMinTimeToMaturity() (gas: 2075220)
InterestRateModelTest:testRevertMaxUtilizationLowerThanWad() (gas: 267545)
MarketTest:testAccountLiquidityAdjustedDebt() (gas: 499481)
Expand Down Expand Up @@ -272,6 +278,7 @@ PoolLibTest:testAtomicDepositBorrowRepayWithdraw() (gas: 46018)
PoolLibTest:testBackupBorrow() (gas: 33676)
PoolLibTest:testEarningsAccrual() (gas: 38999)
PoolLibTest:testEarningsDistribution() (gas: 32640)
PoolLibTest:testFuzzAddRemoveAll(uint8[12]) (runs: 256, μ: 53311, ~: 52973)
PoolLibTest:testMaturityRangeLimit() (gas: 7873)
PoolLibTest:testMaturityRangeTooWide() (gas: 6831)
PreviewerTest:testAccountsReturningAccurateAmounts() (gas: 1393695)
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"lint:es": "eslint --ext .ts,.js,.cjs,.mjs .",
"fix:sol": "prettier -w '{contracts,scripts,test}/**/*.sol'",
"compile": "hardhat compile",
"snapshot": "forge snapshot --force --no-match-test testFuzz",
"snapshot": "forge snapshot --force --no-match-contract Protocol",
"test": "concurrently 'npm:test:*' --kill-others-on-fail --group -c auto",
"test:foundry": "forge test",
"test:hardhat": "hardhat test --deploy-fixture",
"coverage": "concurrently 'npm:coverage:*' --kill-others-on-fail --group -c auto",
"coverage:foundry": "forge coverage --report lcov",
"coverage:hardhat": "hardhat coverage",
"coverage:snapshot": "forge snapshot --force --no-match-test testFuzz --check",
"coverage:fuzzer": "FOUNDRY_PROFILE=production forge test --match-test testFuzz --no-match-contract Protocol",
"coverage:snapshot": "forge snapshot --check --force --no-match-contract Protocol",
"coverage:fuzzer": "FOUNDRY_PROFILE=production forge test --no-match-contract Protocol",
"deploy:ethereum": "hardhat --network ethereum deploy",
"deploy:op-sepolia": "hardhat --network op-sepolia deploy",
"prepare": "concurrently 'npm:prepare:*' --group -c auto",
Expand Down

0 comments on commit 106707e

Please sign in to comment.