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

Commit dd12e56

Browse files
committed
Update script
1 parent 8a605f9 commit dd12e56

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

tasks/chain-specific/base.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ task("market:base:rsr-ion-rewards", "Sets caps on a market").setAction(
1717
const comptroller = "0x05c9C6417F246600f8f5f49fcA9Ee991bfF73D13";
1818
const markets = `${ionbsdETH},${ioneUSD}`;
1919

20+
flywheelRewards = "LATEST_FLYWHEEL_REWARDS_CONTRACT"
21+
flywheel = "LATEST_FLYWHEEL_CONTRACT"
22+
23+
const rewardsContract = await viem.getContractAt("IonicFlywheelDynamicRewards_Borrow_ION", flywheelRewards);
24+
25+
const flywheelContract = await viem.getContractAt("IonicFlywheelBorrow", flywheel);
26+
const tx = await flywheelContract.write.setFlywheelRewards([rewardsContract.address as Address]);
27+
await publicClient.waitForTransactionReceipt({ hash: tx });
28+
/*
2029
// STEP 1: upgrade markets to the new implementation
2130
console.log(`Upgrading market: ${ionbsdETH} to CErc20RewardsDelegate`);
2231
await run("market:upgrade", {
@@ -34,7 +43,8 @@ task("market:base:rsr-ion-rewards", "Sets caps on a market").setAction(
3443
signer: deployer
3544
});
3645
console.log("Market upgraded");
37-
/*
46+
47+
// STEP 2: send reward tokens to strategies
3848
const ionToken = await viem.getContractAt("EIP20Interface", IONIC);
3949
const balance = await ionToken.read.balanceOf([ionbsdETH]);
4050
if (balance < parseEther("105263.157895")) {

tasks/flywheel/deploy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ task("flywheel:deploy-dynamic-rewards", "Deploy dynamic rewards flywheel for LM
213213
],
214214
waitConfirmations: 1
215215
});
216-
const flywheelContract = await viem.getContractAt("IonicFlywheel", flywheel);
216+
const flywheelContract = await viem.getContractAt("IonicFlywheelBorrow", flywheel);
217217
const tx = await flywheelContract.write.setFlywheelRewards([rewards.address as Address]);
218218
await publicClient.waitForTransactionReceipt({ hash: tx });
219219
return rewards;

0 commit comments

Comments
 (0)