This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from ionicprotocol/create-separate-scripts-for…
…-flywheel Update script with new version of ION flywheel
- Loading branch information
Showing
12 changed files
with
6,575 additions
and
17 deletions.
There are no files selected for viewing
289 changes: 289 additions & 0 deletions
289
deployments/base/IonicFlywheelDynamicRewards_ION_v3.json
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
1,126 changes: 1,126 additions & 0 deletions
1,126
deployments/base/IonicFlywheel_ION_v2_Implementation.json
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
1,126 changes: 1,126 additions & 0 deletions
1,126
deployments/base/IonicFlywheel_ION_v3_Implementation.json
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
1,364 changes: 1,364 additions & 0 deletions
1,364
deployments/base/solcInputs/3358b0e3b9146a940b243313bb7c29a1.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { task } from "hardhat/config"; | ||
import { Address, formatEther, parseEther } from "viem"; | ||
import { COMPTROLLER } from "."; | ||
|
||
task("market:base:disable-flywheel", "Deploys flywheel and adds rewards").setAction( | ||
async (_, { viem, run, deployments, getNamedAccounts }) => { | ||
const { deployer } = await getNamedAccounts(); | ||
const publicClient = await viem.getPublicClient(); | ||
|
||
const flywheel = await viem.getContractAt( | ||
"IonicFlywheel", | ||
(await deployments.get("IonicFlywheel_ION_v2")).address as Address | ||
); | ||
|
||
const comptroller = await viem.getContractAt("IonicComptroller", COMPTROLLER); | ||
const addTx = await comptroller.write.addNonAccruingFlywheel([flywheel.address]); | ||
await publicClient.waitForTransactionReceipt({ hash: addTx }); | ||
console.log({ addTx }); | ||
console.log("Remove IonicFlywheel_ION_v2 from comptroller"); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters