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

Commit e648616

Browse files
committed
Update script with new version of ION flywheel
1 parent 7ac52c5 commit e648616

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tasks/chain-specific/base/rewards.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ task("market:base:add-rewards-to-existing-flywheel", "Adds rewards to existing f
7272
// Approving token sepening for fwRewards contract
7373
const flywheel = await viem.getContractAt(
7474
"IonicFlywheel",
75-
(await deployments.get("IonicFlywheel_ION")).address as Address
75+
(await deployments.get("IonicFlywheel_ION_v2")).address as Address
7676
);
7777

7878
const _market = await viem.getContractAt("CErc20RewardsDelegate", market);
@@ -179,9 +179,9 @@ task("market:base:deploy-flywheel-and-add-rewards", "Sets caps on a market")
179179
flywheelBoosterAddress = (await deployments.get(booster)).address as Address;
180180
} else flywheelBoosterAddress = zeroAddress;
181181

182-
let _flywheel = await deployments.getOrNull(`${contractName}_${name}`);
182+
let _flywheel = await deployments.getOrNull(`${contractName}_${name}_v2`);
183183
if (!_flywheel) {
184-
_flywheel = await deployments.deploy(`${contractName}_${name}`, {
184+
_flywheel = await deployments.deploy(`${contractName}_${name}_v2`, {
185185
contract: contractName,
186186
from: deployer,
187187
log: true,
@@ -205,7 +205,7 @@ task("market:base:deploy-flywheel-and-add-rewards", "Sets caps on a market")
205205
// Deploying flywheel rewards
206206
const flywheel = await viem.getContractAt(
207207
`${contractName}`,
208-
(await deployments.get(`${contractName}_${name}`)).address as Address
208+
(await deployments.get(`${contractName}_${name}_v2`)).address as Address
209209
);
210210

211211
let flywheelRewards = await deployments.getOrNull(`IonicFlywheelDynamicRewards_${name}`);
@@ -264,7 +264,7 @@ task("market:base:deploy-flywheel-and-add-rewards", "Sets caps on a market")
264264
task("market:base:add-flywheel-ION-rewards-to-ionbsdETH", "Adds rewards to existing flywheel").setAction(
265265
async (_, { viem, run, deployments, getNamedAccounts }) => {
266266
const market = "0x3d9669de9e3e98db41a1cbf6dc23446109945e3c"; // ionbsdETH
267-
const rewardAmount = "1666"; // epoch will start 2 days so 25000 / 30 * 2
267+
const rewardAmount = "23334"; // epoch will start 2 days so 25000 / 30 * 2
268268
const ion = "0x3eE5e23eEE121094f1cFc0Ccc79d6C809Ebd22e5";
269269
await run("market:base:add-rewards-to-existing-flywheel", {
270270
market,
@@ -277,7 +277,7 @@ task("market:base:add-flywheel-ION-rewards-to-ionbsdETH", "Adds rewards to exist
277277
task("market:base:deploy-flywheel-and-add-ION-rewards-to-ionhyUSD", "Deploys flywheel and adds rewards").setAction(
278278
async (_, { viem, run, deployments, getNamedAccounts }) => {
279279
const market = "0x751911bDa88eFcF412326ABE649B7A3b28c4dEDe"; // ionhyUSD
280-
const rewardAmount = "1000"; // epoch will start 2 days so 15000 / 30 * 2
280+
const rewardAmount = "14000"; // epoch will start 2 days so 15000 / 30 * 2
281281
const ion = "0x3eE5e23eEE121094f1cFc0Ccc79d6C809Ebd22e5";
282282
const name = "ION"; // For borrow flywheel use Borrow_ION for supply flywheel just ION
283283
// NOTE: Make sure that epoch duration for supply and borrow are not the same

0 commit comments

Comments
 (0)