Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

Commit 8cd07c2

Browse files
committed
fix: update script
1 parent 06949d3 commit 8cd07c2

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

tasks/chain-specific/base.ts

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,26 @@ task("market:base:rsr-ion-rewards", "Sets caps on a market").setAction(
1313
const ioneUSD = "0x9c2a4f9c5471fd36be3bbd8437a33935107215a1";
1414
const eUSD = "0xCfA3Ef56d303AE4fAabA0592388F19d7C3399FB4";
1515
const IONIC = "0x3eE5e23eEE121094f1cFc0Ccc79d6C809Ebd22e5";
16-
const RSR = "0xab36452dbac151be02b16ca17d8919826072f64a"
16+
const RSR = "0xab36452dbac151be02b16ca17d8919826072f64a";
1717
const pool = "0x05c9C6417F246600f8f5f49fcA9Ee991bfF73D13";
1818
const comptroller = "0x05c9C6417F246600f8f5f49fcA9Ee991bfF73D13";
1919
const markets = `${ionbsdETH},${ioneUSD}`;
2020

21-
2221
/*
2322
const comptrollerContract = await viem.getContractAt("IonicComptroller", comptroller as Address);
2423
const tx = await comptrollerContract.write.addNonAccruingFlywheel(["0x52f8074831f37e9698acaed2b27387d425f585a9"]);
2524
console.log("tx: ", tx);
2625
await publicClient.waitForTransactionReceipt({ hash: tx });
2726
*/
28-
/*
29-
const flywheelContract = await viem.getContractAt(
30-
"IonicFlywheelBorrow",
31-
(await deployments.get("IonicFlywheelBorrow_Borrow_ION")).address as Address
32-
);
33-
const rewardsContract = (await deployments.get("IonicFlywheelDynamicRewards_Borrow_ION")).address as Address;
27+
// const flywheelContract = await viem.getContractAt(
28+
// "IonicFlywheelBorrow",
29+
// (await deployments.get("IonicFlywheelBorrow_Borrow_ION")).address as Address
30+
// );
31+
// const rewardsContract = (await deployments.get("IonicFlywheelDynamicRewards_Borrow_ION")).address as Address;
32+
33+
// const tx = await flywheelContract.write.setFlywheelRewards([rewardsContract as Address]);
34+
// await publicClient.waitForTransactionReceipt({ hash: tx });
3435

35-
const tx = await flywheelContract.write.setFlywheelRewards([rewardsContract as Address]);
36-
await publicClient.waitForTransactionReceipt({ hash: tx });
37-
3836
// STEP 1: upgrade markets to the new implementation
3937
console.log(`Upgrading market: ${ionbsdETH} to CErc20RewardsDelegate`);
4038
await run("market:upgrade", {
@@ -52,8 +50,7 @@ task("market:base:rsr-ion-rewards", "Sets caps on a market").setAction(
5250
signer: deployer
5351
});
5452
console.log("Market upgraded");
55-
*/
56-
// STEP 2: send reward tokens to strategies
53+
// STEP 2: send reward tokens to strategies
5754
const rsrToken = await viem.getContractAt("EIP20Interface", RSR);
5855
const balance = await rsrToken.read.balanceOf([ionbsdETH]);
5956
if (balance < parseEther("170484.026388")) {
@@ -64,25 +61,24 @@ task("market:base:rsr-ion-rewards", "Sets caps on a market").setAction(
6461
await rsrToken.write.transfer([ioneUSD, parseEther("185308.724335")]);
6562
}
6663

67-
6864
// NOTE: change name and reward token
69-
await run("flywheel:deploy-dynamic-rewards-fw", {
65+
await run("flywheel:deploy-dynamic-rewards-fw", {
7066
name: "RSR",
7167
rewardToken: RSR,
7268
booster: "",
7369
strategies: markets,
74-
pool
70+
pool
7571
});
7672

7773
const flywheel = await viem.getContractAt(
7874
"IonicFlywheel",
7975
(await deployments.get("IonicFlywheel_RSR")).address as Address
8076
);
81-
await run("approve-market-flywheel", {
77+
await run("approve-market-flywheel", {
8278
fwAddress: flywheel.address,
83-
markets: markets
79+
markets: markets
8480
});
85-
81+
8682
const tx = await flywheel.write.updateFeeSettings([0n, deployer as Address]);
8783
await publicClient.waitForTransactionReceipt({ hash: tx });
8884

0 commit comments

Comments
 (0)