@@ -13,28 +13,26 @@ task("market:base:rsr-ion-rewards", "Sets caps on a market").setAction(
13
13
const ioneUSD = "0x9c2a4f9c5471fd36be3bbd8437a33935107215a1" ;
14
14
const eUSD = "0xCfA3Ef56d303AE4fAabA0592388F19d7C3399FB4" ;
15
15
const IONIC = "0x3eE5e23eEE121094f1cFc0Ccc79d6C809Ebd22e5" ;
16
- const RSR = "0xab36452dbac151be02b16ca17d8919826072f64a"
16
+ const RSR = "0xab36452dbac151be02b16ca17d8919826072f64a" ;
17
17
const pool = "0x05c9C6417F246600f8f5f49fcA9Ee991bfF73D13" ;
18
18
const comptroller = "0x05c9C6417F246600f8f5f49fcA9Ee991bfF73D13" ;
19
19
const markets = `${ ionbsdETH } ,${ ioneUSD } ` ;
20
20
21
-
22
21
/*
23
22
const comptrollerContract = await viem.getContractAt("IonicComptroller", comptroller as Address);
24
23
const tx = await comptrollerContract.write.addNonAccruingFlywheel(["0x52f8074831f37e9698acaed2b27387d425f585a9"]);
25
24
console.log("tx: ", tx);
26
25
await publicClient.waitForTransactionReceipt({ hash: tx });
27
26
*/
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 });
34
35
35
- const tx = await flywheelContract.write.setFlywheelRewards([rewardsContract as Address]);
36
- await publicClient.waitForTransactionReceipt({ hash: tx });
37
-
38
36
// STEP 1: upgrade markets to the new implementation
39
37
console . log ( `Upgrading market: ${ ionbsdETH } to CErc20RewardsDelegate` ) ;
40
38
await run ( "market:upgrade" , {
@@ -52,8 +50,7 @@ task("market:base:rsr-ion-rewards", "Sets caps on a market").setAction(
52
50
signer : deployer
53
51
} ) ;
54
52
console . log ( "Market upgraded" ) ;
55
- */
56
- // STEP 2: send reward tokens to strategies
53
+ // STEP 2: send reward tokens to strategies
57
54
const rsrToken = await viem . getContractAt ( "EIP20Interface" , RSR ) ;
58
55
const balance = await rsrToken . read . balanceOf ( [ ionbsdETH ] ) ;
59
56
if ( balance < parseEther ( "170484.026388" ) ) {
@@ -64,25 +61,24 @@ task("market:base:rsr-ion-rewards", "Sets caps on a market").setAction(
64
61
await rsrToken . write . transfer ( [ ioneUSD , parseEther ( "185308.724335" ) ] ) ;
65
62
}
66
63
67
-
68
64
// NOTE: change name and reward token
69
- await run ( "flywheel:deploy-dynamic-rewards-fw" , {
65
+ await run ( "flywheel:deploy-dynamic-rewards-fw" , {
70
66
name : "RSR" ,
71
67
rewardToken : RSR ,
72
68
booster : "" ,
73
69
strategies : markets ,
74
- pool
70
+ pool
75
71
} ) ;
76
72
77
73
const flywheel = await viem . getContractAt (
78
74
"IonicFlywheel" ,
79
75
( await deployments . get ( "IonicFlywheel_RSR" ) ) . address as Address
80
76
) ;
81
- await run ( "approve-market-flywheel" , {
77
+ await run ( "approve-market-flywheel" , {
82
78
fwAddress : flywheel . address ,
83
- markets : markets
79
+ markets : markets
84
80
} ) ;
85
-
81
+
86
82
const tx = await flywheel . write . updateFeeSettings ( [ 0n , deployer as Address ] ) ;
87
83
await publicClient . waitForTransactionReceipt ( { hash : tx } ) ;
88
84
0 commit comments