Skip to content

Commit

Permalink
Merge pull request #202 from ionicprotocol/fix/redeploy-lens
Browse files Browse the repository at this point in the history
Redeployed the lens contract
rhlsthrm authored Feb 19, 2024
2 parents 2308a83 + d9ee6cc commit 05ad0a6
Showing 3 changed files with 31 additions and 8 deletions.
17 changes: 10 additions & 7 deletions packages/chains/deployments/mode.json
Original file line number Diff line number Diff line change
@@ -33,13 +33,13 @@
"address": "0x6352b5231de62be60c7ADB8250b08CA9CCF7a9A5"
},
"CTokenFirstExtension": {
"address": "0x36a84B42fa436DBcB3854e2E46ba26546C651530"
"address": "0xe419c13f22e4318F87973082675c1cE650EA87EC"
},
"Comptroller": {
"address": "0x8b2B6a9dC8Cd73309Cef8d64920831d4C73F43a7"
},
"ComptrollerFirstExtension": {
"address": "0xCa41Aa7472C8f85C84a8Cb03deaF064ab6498Dd7"
"address": "0x3eE5e23eEE121094f1cFc0Ccc79d6C809Ebd22e5"
},
"DefaultProxyAdmin": {
"address": "0x985a323A1CccA8Cd5fb8935590EE33FbcFE849d0"
@@ -59,8 +59,8 @@
"IonicFlywheelLensRouter": {
"address": "0xa6BA5F1164dc66F9C5bDCE33A6d2fC70bE8Da108"
},
"IonicLiquidator_Implementation": {
"address": "0x48bf6bd4B3d8b4E75863B5340b977E888BacE19a"
"IonicLiquidator": {
"address": "0x5782c512c07F217A8DE9611E7CE8c98f13193a46"
},
"IonicUniV3Liquidator": {
"address": "0xa12c1E460c06B1745EFcbfC9A1f666a8749B0e3A"
@@ -74,6 +74,9 @@
"JumpRateModel": {
"address": "0x21a455cEd9C79BC523D4E340c2B97521F4217817"
},
"KimUniV2Liquidator": {
"address": "0x6aC17D406a820fa464fFdc0940FCa7E60b3b36B7"
},
"LeveredPositionFactory": {
"address": "0x9B506A03bBFf2a842866b10BC6732da72640cd45"
},
@@ -96,7 +99,7 @@
"address": "0xc71B968C6C23e2723Bae32957D815C9bE3ca1b34"
},
"LiquidatorsRegistryExtension": {
"address": "0xB08FAfc6E8280ce351CF22d2Db8ABd241E8A5E47"
"address": "0xac409691b385Fdbb66752Ff2D97e50BC23fF2295"
},
"LiquidatorsRegistrySecondExtension": {
"address": "0x45A4a3eBb986083597Ac3B34ee2d7dcC3Be8c5C1"
@@ -132,7 +135,7 @@
"address": "0x39C353Cf9041CcF467A04d0e78B63d961E81458a"
},
"PoolLens": {
"address": "0x431C87E08e2636733a945D742d25Ba77577ED480"
"address": "0x611a68618412c2e15A36e3e59C0b979746d87AB8"
},
"PoolLensSecondary": {
"address": "0x7Ea7BB80F3bBEE9b52e6Ed3775bA06C9C80D4154"
@@ -156,4 +159,4 @@
"address": "0x5f0369AA93f36cA6a8B5ed7aAc47bf9e76086D03"
}
}
}
}
20 changes: 20 additions & 0 deletions packages/sdk/tasks/market/risk/borrow-caps.ts
Original file line number Diff line number Diff line change
@@ -61,3 +61,23 @@ task("market:set-borrow-cap-whitelist", "Pauses borrowing on a market")
console.log(`Whitelist status for ${account} set: ${await pool.callStatic.supplyCapWhitelist(market, account)}`);
}
});

task("market:set-borrow-cap-guardian", "Set borrow cap guardian on market")
.addParam("poolAddress", "The address of the pool", undefined, types.string)
.addParam("borrowGuardian", "The address of the borrow cap guardian", undefined, types.string)
.setAction(async ({ poolAddress, borrowGuardian }, { ethers, getNamedAccounts }) => {
const { deployer } = await getNamedAccounts();
console.log("signer: ", deployer);

const signer = await ethers.getSigner(deployer);

const ionicSdkModule = await import("../../ionicSdk");
const sdk = await ionicSdkModule.getOrCreateIonic(signer);

const pool = sdk.createComptroller(poolAddress, signer);

const tx: providers.TransactionResponse = await pool._setBorrowCapGuardian(borrowGuardian);
await tx.wait();

console.log(`Configured the borrow cap guardian to : ${borrowGuardian}`);
});

0 comments on commit 05ad0a6

Please sign in to comment.