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

Commit 3630180

Browse files
committed
fix: abi
1 parent 4b75b20 commit 3630180

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tasks/flywheel/deploy.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,15 @@ task("flywheel:add-to-pool", "Create pool if does not exist")
123123
throw `Invalid 'pool': ${taskArgs.pool}`;
124124
}
125125

126-
const comptroller = await viem.getContractAt("Comptroller", poolAddress);
126+
const comptroller = await viem.getContractAt("IonicComptroller", poolAddress);
127127
const rewardsDistributors = (await comptroller.read.getRewardsDistributors()) as Address[];
128128
if (!rewardsDistributors.map((s) => s.toLowerCase()).includes(flywheelAddress.toLowerCase())) {
129129
const addTx = await comptroller.write._addRewardsDistributor([flywheelAddress]);
130+
await publicClient.waitForTransactionReceipt({ hash: addTx });
131+
console.log({ addTx });
132+
} else {
133+
console.log(`Flywheel ${flywheelAddress} already added to pool ${poolAddress}`);
130134
}
131-
await publicClient.waitForTransactionReceipt({ hash: addTx });
132-
console.log({ addTx });
133135
});
134136

135137
task("flywheel:deploy-dynamic-rewards-fw", "Deploy dynamic rewards flywheel for LM rewards")

0 commit comments

Comments
 (0)