Skip to content

Commit

Permalink
โœจ Add info logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubilmax committed Jul 18, 2022
1 parent dacfa69 commit 6149c67
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 50 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- run: forge test --gas-report > gasreport.ansi

- name: Compare gas reports
uses: Rubilmax/foundry-gas-report@v2
uses: Rubilmax/foundry-gas-report@v2.1
with:
workflowId: foundry-gas-report.yml # must be the name of the workflow file
ignore: test/**/* # optionally filter out gas reports from specific paths
Expand Down
46 changes: 23 additions & 23 deletions __tests__/mocks/gas_report.1.ansi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
installing solc version "0.8.13"
Successfully installed solc 0.8.13
Compiling 87 files with 0.8.13
Solc 0.8.13 finished in 29.46s
Solc 0.8.13 finished in 37.23s
Compiler run successful

Running 8 tests for test-foundry/compound/TestBorrow.t.sol:TestBorrow
Expand All @@ -13,12 +13,12 @@ Running 8 tests for test-foundry/compound/TestBorrow.t.sol:TestBorrow
[PASS] testBorrow6() (gas: 9764653)
[PASS] testBorrowMultipleAssets() (gas: 1451008)
[PASS] testBorrowOnPoolThreshold() (gas: 1188466)
Test result: ok. 8 passed; 0 failed; finished in 52.32s
Test result: ok. 8 passed; 0 failed; finished in 54.71s

Running 11 tests for test-foundry/compound/TestEth.t.sol:TestEth
[PASS] testBorrowEthInP2P() (gas: 1673930)
[PASS] testBorrowEthOnPool() (gas: 1294931)
[PASS] testRepayEthInP2P() (gas: 2116767)
[PASS] testRepayEthInP2P() (gas: 2116767)a
[PASS] testRepayEthOnPool() (gas: 1467685)
[PASS] testShouldGetEthMarketConfiguration() (gas: 62730)
[PASS] testShouldLiquidateUserWithEthAsCollateral() (gas: 2685318)
Expand All @@ -27,7 +27,7 @@ Running 11 tests for test-foundry/compound/TestEth.t.sol:TestEth
[PASS] testSupplyEthOnPool() (gas: 545941)
[PASS] testWithdrawEthInP2P() (gas: 1953208)
[PASS] testWithdrawEthOnPool() (gas: 755950)
Test result: ok. 11 passed; 0 failed; finished in 8.22s
Test result: ok. 11 passed; 0 failed; finished in 9.97s

Running 12 tests for test-foundry/compound/TestFees.t.sol:TestFees
[PASS] testOnlyOwnerCanSetTreasuryVault() (gas: 27635)
Expand All @@ -42,7 +42,7 @@ Running 12 tests for test-foundry/compound/TestFees.t.sol:TestFees
[PASS] testShouldPayFee() (gas: 4617709)
[PASS] testShouldReduceTheFeeToRepay() (gas: 4652828)
[PASS] testShouldRevertWhenClaimingToZeroAddress() (gas: 3986060)
Test result: ok. 12 passed; 0 failed; finished in 3.58s
Test result: ok. 12 passed; 0 failed; finished in 3.82s

Running 16 tests for test-foundry/compound/TestGovernance.t.sol:TestGovernance
[PASS] testOnlyOwnerCanCreateMarkets() (gas: 537403)
Expand All @@ -61,7 +61,7 @@ Running 16 tests for test-foundry/compound/TestGovernance.t.sol:TestGovernance
[PASS] testShouldDeployContractWithTheRightValues() (gas: 30540)
[PASS] testShouldRevertWhenCreatingMarketWithAnImproperMarket() (gas: 60324)
[PASS] testShouldSetMaxGasWithRightValues() (gas: 52228)
Test result: ok. 16 passed; 0 failed; finished in 3.60s
Test result: ok. 16 passed; 0 failed; finished in 3.75s

Running 8 tests for test-foundry/compound/TestIncentivesVault.t.sol:TestIncentivesVault
[PASS] testFailWhenContractNotActive() (gas: 39113)
Expand All @@ -72,7 +72,7 @@ Running 8 tests for test-foundry/compound/TestIncentivesVault.t.sol:TestIncentiv
[PASS] testOnlyOwnerShouldSetPauseStatus() (gas: 30779)
[PASS] testOnlyOwnerShouldTransferTokensToDao() (gas: 57911)
[PASS] testShouldGiveTheRightAmountOfRewards() (gas: 272730)
Test result: ok. 8 passed; 0 failed; finished in 1.22s
Test result: ok. 8 passed; 0 failed; finished in 1.29s

Running 6 tests for test-foundry/compound/TestInterestRates.t.sol:TestInterestRates
[PASS] testIndexComputation() (gas: 23153)
Expand All @@ -81,7 +81,7 @@ Running 6 tests for test-foundry/compound/TestInterestRates.t.sol:TestInterestRa
[PASS] testIndexComputationWithDelta() (gas: 27428)
[PASS] testIndexComputationWithDeltaAndReserveFactor() (gas: 27471)
[PASS] testIndexComputationWithReserveFactor() (gas: 23197)
Test result: ok. 6 passed; 0 failed; finished in 8.89ms
Test result: ok. 6 passed; 0 failed; finished in 3.62ms

Running 42 tests for test-foundry/compound/TestLens.t.sol:TestLens
[PASS] testComputeLiquidation() (gas: 1814249)
Expand Down Expand Up @@ -126,7 +126,7 @@ Running 42 tests for test-foundry/compound/TestLens.t.sol:TestLens
[PASS] testUserLiquidityDataForAssetWithSupply() (gas: 598077)
[PASS] testUserLiquidityDataForAssetWithSupplyAndBorrow() (gas: 1236591)
[PASS] testUserLiquidityDataForAssetWithSupplyAndBorrowWithMultipleAssets() (gas: 1366374)
Test result: ok. 42 passed; 0 failed; finished in 15.86s
Test result: ok. 42 passed; 0 failed; finished in 16.25s

Running 7 tests for test-foundry/compound/TestLiquidate.t.sol:TestLiquidate
[PASS] testCannotBorrowLiquidateInSameBlock() (gas: 1791689)
Expand All @@ -136,38 +136,38 @@ Running 7 tests for test-foundry/compound/TestLiquidate.t.sol:TestLiquidate
[PASS] testShouldLiquidateWhileInP2PAndPool() (gas: 3481373)
[PASS] testShouldNotBePossibleToLiquidateUserAboveWater() (gas: 1348944)
[PASS] testShouldPartiallyLiquidateWhileInP2PAndPool() (gas: 3488742)
Test result: ok. 7 passed; 0 failed; finished in 6.89s
Test result: ok. 7 passed; 0 failed; finished in 7.47s

Running 4 tests for test-foundry/compound/TestMarketMember.t.sol:TestMarketMember
[PASS] testShouldNotLiquidateUserNotOnMemberOfMarketAsBorrow() (gas: 1297949)
[PASS] testShouldNotLiquidateUserNotOnMemberOfMarketAsCollateral() (gas: 1298273)
[PASS] testShouldNotRepayWhenNotMarketMember() (gas: 70749)
[PASS] testShouldNotWithdrawWhenNotMarketMember() (gas: 42227)
Test result: ok. 4 passed; 0 failed; finished in 608.99ms
Test result: ok. 4 passed; 0 failed; finished in 607.83ms

Running 4 tests for test-foundry/compound/TestMarketStrategy.t.sol:TestMarketStrategy
[PASS] testShouldPutBorrowerOnPool() (gas: 1649052)
[PASS] testShouldPutBorrowersOnPool() (gas: 2974938)
[PASS] testShouldPutSupplierOnPool() (gas: 1649060)
[PASS] testShouldPutSuppliersOnPool() (gas: 2201505)
Test result: ok. 4 passed; 0 failed; finished in 877.39ms
Test result: ok. 4 passed; 0 failed; finished in 973.45ms

Running 5 tests for test-foundry/compound/TestMorphoGetters.t.sol:TestMorphoGetters
[PASS] testEnteredMarkets() (gas: 1203515)
[PASS] testFailUserLeftMarkets() (gas: 952855)
[PASS] testGetAllMarkets() (gas: 55384)
[PASS] testGetHead() (gas: 1762534)
[PASS] testGetNext() (gas: 38294486)
Test result: ok. 5 passed; 0 failed; finished in 104.99s
Test result: ok. 5 passed; 0 failed; finished in 110.43s

Running 1 test for test-foundry/compound/TestMorphoUtils.t.sol:TestMorphoUtils
[PASS] testUserShouldNotUpdateP2PIndexesOfMarketNotCreated() (gas: 21001)
Test result: ok. 1 passed; 0 failed; finished in 34.61ms
Test result: ok. 1 passed; 0 failed; finished in 49.30ms

Running 2 tests for test-foundry/compound/TestP2PDisable.t.sol:TestP2PDisable
[PASS] testShouldMatchBorrowDeltaWithP2PDisabled() (gas: 3722265)
[PASS] testShouldMatchSupplyDeltaWithP2PDisabled() (gas: 2776843)
Test result: ok. 2 passed; 0 failed; finished in 115.38ms
Test result: ok. 2 passed; 0 failed; finished in 131.27ms

Running 7 tests for test-foundry/compound/TestPausableMarket.t.sol:TestPausableMarket
[PASS] testOnlyOwnerShouldTriggerPartialPauseFunction() (gas: 49981)
Expand All @@ -177,7 +177,7 @@ Running 7 tests for test-foundry/compound/TestPausableMarket.t.sol:TestPausableM
[PASS] testShouldDisableMarketWhenPaused() (gas: 3507469)
[PASS] testShouldOnlyEnableRepayWithdrawLiquidateWhenPartiallyPaused() (gas: 4114195)
[PASS] testShouldTriggerFunctionsWhenNotPaused() (gas: 2751285)
Test result: ok. 7 passed; 0 failed; finished in 215.58ms
Test result: ok. 7 passed; 0 failed; finished in 240.84ms

Running 39 tests for test-foundry/compound/TestRatesLens.t.sol:TestRatesLens
[PASS] testAverageBorrowRateShouldEqual0WhenNoBorrow() (gas: 139351)
Expand Down Expand Up @@ -219,7 +219,7 @@ Running 39 tests for test-foundry/compound/TestRatesLens.t.sol:TestRatesLens
[PASS] testUserRatesShouldEqualP2PRatesWhenFullyMatched() (gas: 2294065)
[PASS] testUserSupplyRateShouldEqualMidrateWhenHalfMatched() (gas: 2051945)
[PASS] testUserSupplyRateShouldEqualPoolRateWhenNotMatched() (gas: 606862)
Test result: ok. 39 passed; 0 failed; finished in 2.37s
Test result: ok. 39 passed; 0 failed; finished in 2.69s

Running 11 tests for test-foundry/compound/TestSupply.t.sol:TestSupply
[PASS] testFailSupplyZero() (gas: 27213)
Expand All @@ -233,7 +233,7 @@ Running 11 tests for test-foundry/compound/TestSupply.t.sol:TestSupply
[PASS] testSupplyOnPoolThreshold() (gas: 422567)
[PASS] testSupplyRepayOnBehalf() (gas: 1722779)
[PASS] testSupplyUpdateIndexesSameAsCompound() (gas: 1634879)
Test result: ok. 11 passed; 0 failed; finished in 53.36s
Test result: ok. 11 passed; 0 failed; finished in 57.36s

Running 12 tests for test-foundry/compound/TestUpgradeable.t.sol:TestUpgradeable
[PASS] testLensImplementationsShouldBeInitialized() (gas: 15162)
Expand All @@ -248,7 +248,7 @@ Running 12 tests for test-foundry/compound/TestUpgradeable.t.sol:TestUpgradeable
[PASS] testUpgradeLens() (gas: 4907058)
[PASS] testUpgradeMorpho() (gas: 3733583)
[PASS] testUpgradeRewardsManager() (gas: 1037240)
Test result: ok. 12 passed; 0 failed; finished in 73.69ms
Test result: ok. 12 passed; 0 failed; finished in 88.07ms

Running 15 tests for test-foundry/compound/TestWithdraw.t.sol:TestWithdraw
[PASS] testDeltaWithdraw() (gas: 109649792)
Expand All @@ -266,7 +266,7 @@ Running 15 tests for test-foundry/compound/TestWithdraw.t.sol:TestWithdraw
[PASS] testWithdrawAll() (gas: 796039)
[PASS] testWithdrawWhileAttackerSendsCToken() (gas: 2292227)
[PASS] testWithdrawnOnPoolThreshold() (gas: 601135)
Test result: ok. 15 passed; 0 failed; finished in 10.25s
Test result: ok. 15 passed; 0 failed; finished in 11.09s

Running 15 tests for test-foundry/compound/TestRepay.t.sol:TestRepay
[PASS] testCannotBorrowRepayInSameBlock() (gas: 1309315)
Expand All @@ -284,13 +284,13 @@ Running 15 tests for test-foundry/compound/TestRepay.t.sol:TestRepay
[PASS] testRepayOnPoolThreshold() (gas: 1435211)
[PASS] testRepayRepayOnBehalf() (gas: 1463431)
[PASS] testRepayUpdateIndexesSameAsCompound() (gas: 3355141)
Test result: ok. 15 passed; 0 failed; finished in 82.77s
Test result: ok. 15 passed; 0 failed; finished in 88.20s

Running 3 tests for test-foundry/compound/TestRoundings.t.sol:TestRounding
[PASS] testRoundingError1() (gas: 531881)
[PASS] testRoundingError2() (gas: 417481)
[PASS] testRoundingError3() (gas: 595622)
Test result: ok. 3 passed; 0 failed; finished in 1.32s
Test result: ok. 3 passed; 0 failed; finished in 1.41s

Running 19 tests for test-foundry/compound/TestRewards.t.sol:TestRewards
[PASS] testFailShouldNotClaimRewardsWhenRewardsManagerIsAddressZero() (gas: 3585442)
Expand All @@ -312,7 +312,7 @@ Running 19 tests for test-foundry/compound/TestRewards.t.sol:TestRewards
[PASS] testShouldUpdateCorrectSupplyIndex() (gas: 1457380)
[PASS] testShouldUpdateCorrectSupplyIndexWhenSpeedIs0() (gas: 1276761)
[PASS] testUsersShouldClaimRewardsIndependently() (gas: 4667193)
Test result: ok. 19 passed; 0 failed; finished in 9.42s
Test result: ok. 19 passed; 0 failed; finished in 9.86s
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ contracts/compound/IncentivesVault.sol:IncentivesVault contract โ”† โ”† โ”† โ”† โ”† โ”‚
โ•žโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ชโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ชโ•โ•โ•โ•โ•โ•โ•โ•ชโ•โ•โ•โ•โ•โ•โ•โ•โ•ชโ•โ•โ•โ•โ•โ•โ•โ•ชโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ก
Expand Down
Loading

0 comments on commit 6149c67

Please sign in to comment.