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

Commit f6887c0

Browse files
committed
fix deploy
1 parent 8c66bde commit f6887c0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tasks/flywheel/deploy.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ task("flywheel:add-strategy-for-rewards", "Create pool if does not exist")
8080
.addParam("signer", "Named account to use fo tx", "deployer", types.string)
8181
.addParam("flywheel", "address of flywheel", undefined, types.string)
8282
.addParam("strategy", "address of strategy", undefined, types.string)
83+
.addParam("name", "flywheel contract name", undefined, types.string)
8384
.setAction(async (taskArgs, { viem }) => {
8485
const publicClient = await viem.getPublicClient();
8586
let flywheelAddress, strategyAddress;
@@ -96,7 +97,7 @@ task("flywheel:add-strategy-for-rewards", "Create pool if does not exist")
9697
throw `Invalid 'strategy': ${taskArgs.strategy}`;
9798
}
9899

99-
const flywheel = await viem.getContractAt("IonicFlywheel", flywheelAddress);
100+
const flywheel = await viem.getContractAt(`${name}`, flywheelAddress);
100101
const addTx = await flywheel.write.addStrategyForRewards([strategyAddress]);
101102
await publicClient.waitForTransactionReceipt({ hash: addTx });
102103
console.log(addTx);
@@ -177,7 +178,7 @@ task("flywheel:deploy-dynamic-rewards-fw", "Deploy dynamic rewards flywheel for
177178
const strategyAddresses = strategies.split(",");
178179
for (const strategy of strategyAddresses) {
179180
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}` });
181182
console.log(`Added strategy (${strategy}) to flywheel (${flywheel.address})`);
182183
}
183184
await run("flywheel:add-to-pool", { flywheel: flywheel.address, pool });

0 commit comments

Comments
 (0)