Skip to content
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

feat: v5.0.1 #3

Merged
merged 36 commits into from
Jun 6, 2023
Merged

feat: v5.0.1 #3

merged 36 commits into from
Jun 6, 2023

Conversation

JGcarv
Copy link
Contributor

@JGcarv JGcarv commented Jun 6, 2023

Description

deluca-mike and others added 30 commits June 6, 2023 17:51
…34) (#265)

* feat: add isCollateralMaintained check in makePayment()

* feat: Add test for collateralNotMaintained for makePayment

* feat: Update test based on JGs suggestion

- Expose collateral not maintained check when using drawable funds only

* fix: Update based on PR comments

* feat: Update test to include collateralAsset and calc for collateral requirement

* refactor: Move mint of collateral asset
* feat: set lender during initialization

* fix: update globals mock

* fix: update mocks and add missing tests

* fix: address all pr comments

* fix: update spacing

Co-authored-by: lucas-manuel <[email protected]>
* fix: update to not accrue interest into the next payment interval

when the loan is late on a refinance

* feat: Test to ensure late loan refi interest calculated correctly

* feat: Add literal assertions for interest amounts

* fix: Update based on PR comments

* fix: update params

Co-authored-by: Lucas Manuel <[email protected]>
* feat: enable borrower to perform upgrades

* fix: update error message

* fix: address PR comments

* fix: update failing upgrade pause test
* feat: rename lateInterest var

* fix: name
* fix: internal audit findings

* ci: update coverage threshold

---------

Co-authored-by: lucas-manuel <[email protected]>
* feat: update to use isInstanceOf in leiu of isFactory

* feat: update key

* feat: update key

* chore: update var name
* feat: add V5 migrator and tests

* fix: missing word on comment

* test: remove loan v4 mock

* fix: update rates in tests as well as use scaled precision in payments calc

* fix: tests after rate change

* test: added test for initializer

* fix: adjust PR comments

---------

Co-authored-by: lucas-manuel <[email protected]>
* feat: globals `isFunctionPaused` (sc-11842)

* feat: remove `isFactory`

* feat: add pause on migrate and setImplementation

* refactor: undo function reordering

---------

Co-authored-by: 0xfarhaan <[email protected]>
* fix: underscore syntax [3S #9] (SC-12033)

* refactor: cleanup

---------

Co-authored-by: Lucas Manuel <[email protected]>
* fix: make change and fix tests

* fix: account origination fees into assertions

---------

Co-authored-by: lucas-manuel <[email protected]>
* refactor: reorder

* refactor: interfaces cleanup

* fix: update formatting

---------

Co-authored-by: lucas-manuel <[email protected]>
* feat: only securityAdmin can upgrade loan

* style: remove extra _

* fix: update test name

Co-authored-by: Michael De Luca <[email protected]>

---------

Co-authored-by: Lucas Manuel <[email protected]>
Co-authored-by: Michael De Luca <[email protected]>
* fix: make hundred percent public

* test: add test for getter
* refactor: rename to lateInterestPremiumRate

* refactor: update var name in tests

* fix: pr review

---------

Co-authored-by: Michael De Luca <[email protected]>
Co-authored-by: Lucas Manuel <[email protected]>
… (#296)

* feat: clean up impairment removal (SC-12191) (SB #22)

* fix: update events

---------

Co-authored-by: JG Carvalho <[email protected]>
Co-authored-by: Lucas Manuel <[email protected]>
Co-authored-by: lucas-manuel <[email protected]>
* fix: delete refinance commitment on clear accounting

* fix: also clear refinance interest

* test: add assertion on clear loan
@JGcarv JGcarv self-assigned this Jun 6, 2023
@github-actions
Copy link

github-actions bot commented Jun 6, 2023

LCOV of commit a9ba1df during Forge Tests (PR) #5

Summary coverage rate:
  lines......: 70.1% (396 of 565 lines)
  functions..: 79.1% (155 of 196 functions)
  branches...: 89.5% (136 of 152 branches)

Files changed coverage rate:
                                        |Lines       |Functions  |Branches    
  Filename                              |Rate     Num|Rate    Num|Rate     Num
  ============================================================================
  contracts/MapleLoan.sol               |98.7%    236|94.5%    73|91.0%    100
  contracts/MapleLoanFeeManager.sol     |83.7%     49|72.2%    18| 100%      4
  contracts/MapleLoanInitializer.sol    | 100%     38|75.0%     4|93.8%     32
  contracts/MapleLoanV5Migrator.sol     | 100%      4| 100%     1|    -      0
  contracts/Refinancer.sol              | 100%     19| 100%    12| 100%      8
  tests/MapleLoanFeeManager.t.sol       | 0.0%     32| 0.0%     4|    -      0
  tests/Payments.t.sol                  | 0.0%     72| 0.0%     4|    -      0
  tests/Refinancer.t.sol                | 0.0%     31| 0.0%     3|    -      0
  tests/harnesses/MapleLoanHarnesses.sol|76.2%     42|82.9%    35| 0.0%      4
  tests/mocks/Mocks.sol                 |68.3%     41|65.9%    41|75.0%      4

@github-actions
Copy link

github-actions bot commented Jun 6, 2023

LCOV of commit bb9320e during Forge Tests (PR) #6

Summary coverage rate:
  lines......: 70.1% (396 of 565 lines)
  functions..: 79.1% (155 of 196 functions)
  branches...: 89.5% (136 of 152 branches)

Files changed coverage rate:
                                        |Lines       |Functions  |Branches    
  Filename                              |Rate     Num|Rate    Num|Rate     Num
  ============================================================================
  contracts/MapleLoan.sol               |98.7%    236|94.5%    73|91.0%    100
  contracts/MapleLoanFeeManager.sol     |83.7%     49|72.2%    18| 100%      4
  contracts/MapleLoanInitializer.sol    | 100%     38|75.0%     4|93.8%     32
  contracts/MapleLoanV5Migrator.sol     | 100%      4| 100%     1|    -      0
  contracts/Refinancer.sol              | 100%     19| 100%    12| 100%      8
  tests/MapleLoanFeeManager.t.sol       | 0.0%     32| 0.0%     4|    -      0
  tests/Payments.t.sol                  | 0.0%     72| 0.0%     4|    -      0
  tests/Refinancer.t.sol                | 0.0%     31| 0.0%     3|    -      0
  tests/harnesses/MapleLoanHarnesses.sol|76.2%     42|82.9%    35| 0.0%      4
  tests/mocks/Mocks.sol                 |68.3%     41|65.9%    41|75.0%      4

@github-actions
Copy link

github-actions bot commented Jun 6, 2023

LCOV of commit 989bfef during Forge Tests (PR) #7

Summary coverage rate:
  lines......: 70.1% (396 of 565 lines)
  functions..: 79.1% (155 of 196 functions)
  branches...: 89.5% (136 of 152 branches)

Files changed coverage rate:
                                        |Lines       |Functions  |Branches    
  Filename                              |Rate     Num|Rate    Num|Rate     Num
  ============================================================================
  contracts/MapleLoan.sol               |98.7%    236|94.5%    73|91.0%    100
  contracts/MapleLoanFeeManager.sol     |83.7%     49|72.2%    18| 100%      4
  contracts/MapleLoanInitializer.sol    | 100%     38|75.0%     4|93.8%     32
  contracts/MapleLoanV5Migrator.sol     | 100%      4| 100%     1|    -      0
  contracts/Refinancer.sol              | 100%     19| 100%    12| 100%      8
  tests/MapleLoanFeeManager.t.sol       | 0.0%     32| 0.0%     4|    -      0
  tests/Payments.t.sol                  | 0.0%     72| 0.0%     4|    -      0
  tests/Refinancer.t.sol                | 0.0%     31| 0.0%     3|    -      0
  tests/harnesses/MapleLoanHarnesses.sol|76.2%     42|82.9%    35| 0.0%      4
  tests/mocks/Mocks.sol                 |68.3%     41|65.9%    41|75.0%      4

@JGcarv JGcarv merged commit 44f48d0 into main Jun 6, 2023
@JGcarv JGcarv deleted the v5.0.1 branch June 6, 2023 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants