Skip to content

Commit

Permalink
Merge branch 'main' into uikit-gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
bpierre committed Apr 24, 2024
2 parents 87b07ba + 54105e9 commit 10f1dd7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/contracts-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ defaults:

env:
FOUNDRY_PROFILE: ci
FOUNDRY_VERSION: nightly-f625d0fa7c51e65b4bf1e8f7931cd1c6e2e285e9
CI: true
FORCE_COLOR: true

Expand All @@ -38,7 +39,7 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
version: ${{ env.FOUNDRY_VERSION }}

- name: Run Forge build
run: |
Expand Down Expand Up @@ -94,7 +95,7 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
version: ${{ env.FOUNDRY_VERSION }}

- name: Test contracts
run: pnpm test
Expand All @@ -115,7 +116,7 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
version: ${{ env.FOUNDRY_VERSION }}

- name: Run Forge build
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/testnet-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
FOUNDRY_VERSION: nightly-f625d0fa7c51e65b4bf1e8f7931cd1c6e2e285e9

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -52,7 +53,7 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
version: ${{ env.FOUNDRY_VERSION }}

- name: Run deployment tool
working-directory: ./contracts
Expand Down
3 changes: 0 additions & 3 deletions contracts/src/BorrowerOperations.sol
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,11 @@ contract BorrowerOperations is LiquityBase, Ownable, CheckContract, IBorrowerOpe
uint256 _lowerHint
) external {
_requireValidAnnualInterestRate(_newAnnualInterestRate);
ITroveManager troveManagerCached = troveManager;
_requireTroveisActive(troveManagerCached, _troveId);
// TODO: Delegation functionality
_requireIsOwner(_troveId);

ContractsCacheTMAP memory contractsCache = ContractsCacheTMAP(troveManager, activePool);

_requireValidAnnualInterestRate(_newAnnualInterestRate);
_requireTroveisActive(contractsCache.troveManager, _troveId);

uint256 entireTroveDebt = _updateActivePoolTrackersNoDebtChange(
Expand Down
3 changes: 1 addition & 2 deletions contracts/src/Dependencies/LiquityBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ contract LiquityBase is BaseMath, ILiquityBase {
uint256 public constant MIN_NET_DEBT = 1800e18;
// uint constant public MIN_NET_DEBT = 0;

// TODO: decide on a maximum value, or remove the limit
uint256 public constant MAX_ANNUAL_INTEREST_RATE = type(uint256).max;
uint256 public constant MAX_ANNUAL_INTEREST_RATE = 1e18; // 100%

uint256 public constant PERCENT_DIVISOR = 200; // dividing by 200 yields 0.5%

Expand Down

0 comments on commit 10f1dd7

Please sign in to comment.