This repository was archived by the owner on Aug 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,15 @@ task("market:base:rsr-ion-rewards", "Sets caps on a market").setAction(
17
17
const comptroller = "0x05c9C6417F246600f8f5f49fcA9Ee991bfF73D13" ;
18
18
const markets = `${ ionbsdETH } ,${ ioneUSD } ` ;
19
19
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
+ /*
20
29
// STEP 1: upgrade markets to the new implementation
21
30
console.log(`Upgrading market: ${ionbsdETH} to CErc20RewardsDelegate`);
22
31
await run("market:upgrade", {
@@ -34,7 +43,8 @@ task("market:base:rsr-ion-rewards", "Sets caps on a market").setAction(
34
43
signer: deployer
35
44
});
36
45
console.log("Market upgraded");
37
- /*
46
+
47
+ // STEP 2: send reward tokens to strategies
38
48
const ionToken = await viem.getContractAt("EIP20Interface", IONIC);
39
49
const balance = await ionToken.read.balanceOf([ionbsdETH]);
40
50
if (balance < parseEther("105263.157895")) {
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ task("flywheel:deploy-dynamic-rewards", "Deploy dynamic rewards flywheel for LM
213
213
] ,
214
214
waitConfirmations : 1
215
215
} ) ;
216
- const flywheelContract = await viem . getContractAt ( "IonicFlywheel " , flywheel ) ;
216
+ const flywheelContract = await viem . getContractAt ( "IonicFlywheelBorrow " , flywheel ) ;
217
217
const tx = await flywheelContract . write . setFlywheelRewards ( [ rewards . address as Address ] ) ;
218
218
await publicClient . waitForTransactionReceipt ( { hash : tx } ) ;
219
219
return rewards ;
You can’t perform that action at this time.
0 commit comments