Skip to content

Commit bad374a

Browse files
committed
wip
1 parent ac0339f commit bad374a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/LayerCredit.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ contract LayerCredit is EVCUtil {
9999
vault.setHookConfig(address(this), OP_CONVERT_FEES | OP_BORROW | OP_REPAY | OP_REPAY_WITH_SHARES | OP_DEPOSIT | OP_MINT | OP_SKIM | OP_WITHDRAW | OP_REDEEM);
100100
vault.setMaxLiquidationDiscount(0.15e4);
101101
vault.setLiquidationCoolOffTime(1);
102+
vault.setCaps(2, 0); // supplyCap is 0, borrowCap is unlimited
102103

103104
router.govSetResolvedVault(address(vault), true);
104105
router.govSetConfig(p.asset, p.unitOfAccount, p.oracle);

src/LayerCreditLens.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,18 @@ contract LayerCreditLens {
5858

5959
if (ltvs.length >= 1) {
6060
if (isEscrow(layerCredit, ltvs[0])) collateralFlags |= 4;
61-
w2 |= uint160(ltvs[0]) << (8*8);
61+
w2 |= uint256(uint160(ltvs[0])) << (8*8);
6262
}
6363

6464
if (ltvs.length >= 2) {
6565
if (isEscrow(layerCredit, ltvs[1])) collateralFlags |= 2;
66-
w2 |= uint160(ltvs[1]) >> (12*8);
67-
w3 |= uint160(ltvs[1]) << (20*8);
66+
w2 |= uint256(uint160(ltvs[1])) >> (12*8);
67+
w3 |= uint256(uint160(ltvs[1])) << (20*8);
6868
}
6969

7070
if (ltvs.length >= 2) {
7171
if (isEscrow(layerCredit, ltvs[2])) collateralFlags |= 1;
72-
w3 |= uint160(ltvs[2]);
72+
w3 |= uint256(uint160(ltvs[2]));
7373
}
7474

7575
w2 |= collateralFlags << (28*8);

0 commit comments

Comments
 (0)