@@ -80,6 +80,7 @@ task("flywheel:add-strategy-for-rewards", "Create pool if does not exist")
80
80
. addParam ( "signer" , "Named account to use fo tx" , "deployer" , types . string )
81
81
. addParam ( "flywheel" , "address of flywheel" , undefined , types . string )
82
82
. addParam ( "strategy" , "address of strategy" , undefined , types . string )
83
+ . addParam ( "name" , "flywheel contract name" , undefined , types . string )
83
84
. setAction ( async ( taskArgs , { viem } ) => {
84
85
const publicClient = await viem . getPublicClient ( ) ;
85
86
let flywheelAddress , strategyAddress ;
@@ -96,7 +97,7 @@ task("flywheel:add-strategy-for-rewards", "Create pool if does not exist")
96
97
throw `Invalid 'strategy': ${ taskArgs . strategy } ` ;
97
98
}
98
99
99
- const flywheel = await viem . getContractAt ( "IonicFlywheel" , flywheelAddress ) ;
100
+ const flywheel = await viem . getContractAt ( ` ${ name } ` , flywheelAddress ) ;
100
101
const addTx = await flywheel . write . addStrategyForRewards ( [ strategyAddress ] ) ;
101
102
await publicClient . waitForTransactionReceipt ( { hash : addTx } ) ;
102
103
console . log ( addTx ) ;
@@ -177,7 +178,7 @@ task("flywheel:deploy-dynamic-rewards-fw", "Deploy dynamic rewards flywheel for
177
178
const strategyAddresses = strategies . split ( "," ) ;
178
179
for ( const strategy of strategyAddresses ) {
179
180
console . log ( `Adding strategy ${ strategy } to flywheel ${ flywheel . address } ` ) ;
180
- await run ( "flywheel:add-strategy-for-rewards" , { flywheel : flywheel . address , strategy } ) ;
181
+ await run ( "flywheel:add-strategy-for-rewards" , { flywheel : flywheel . address , strategy, name : ` ${ contractName } _ ${ name } ` } ) ;
181
182
console . log ( `Added strategy (${ strategy } ) to flywheel (${ flywheel . address } )` ) ;
182
183
}
183
184
await run ( "flywheel:add-to-pool" , { flywheel : flywheel . address , pool } ) ;
0 commit comments