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

Commit

Permalink
Update script with new version of ION flywheel
Browse files Browse the repository at this point in the history
  • Loading branch information
antisaa committed Aug 18, 2024
1 parent 7ac52c5 commit e648616
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tasks/chain-specific/base/rewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ task("market:base:add-rewards-to-existing-flywheel", "Adds rewards to existing f
// Approving token sepening for fwRewards contract
const flywheel = await viem.getContractAt(
"IonicFlywheel",
(await deployments.get("IonicFlywheel_ION")).address as Address
(await deployments.get("IonicFlywheel_ION_v2")).address as Address
);

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

let _flywheel = await deployments.getOrNull(`${contractName}_${name}`);
let _flywheel = await deployments.getOrNull(`${contractName}_${name}_v2`);
if (!_flywheel) {
_flywheel = await deployments.deploy(`${contractName}_${name}`, {
_flywheel = await deployments.deploy(`${contractName}_${name}_v2`, {
contract: contractName,
from: deployer,
log: true,
Expand All @@ -205,7 +205,7 @@ task("market:base:deploy-flywheel-and-add-rewards", "Sets caps on a market")
// Deploying flywheel rewards
const flywheel = await viem.getContractAt(
`${contractName}`,
(await deployments.get(`${contractName}_${name}`)).address as Address
(await deployments.get(`${contractName}_${name}_v2`)).address as Address
);

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

0 comments on commit e648616

Please sign in to comment.