Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions tasks/voter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,21 @@ export default task("voter:factory", "increase the max gas fees to speed up a tx
throw new Error(`invalid action ${action}`);
}
});

// npx hardhat gf:create-market-gauge --action 0 --gauge 0x000 --network chapel
task("voter:create-market-gauge", "create market gauge")
.addParam("signer", "The address of the current deployer", "deployer", types.string)
.addParam("flywheel", "The address of the flywheel deployed to the market", undefined, types.string)
.addParam("target", "The address of the market", undefined, types.string)
.setAction(async ({ signer, flywheel, market }, { ethers }) => {
const deployer = await ethers.getNamedSigner(signer);
const voter = (await ethers.getContract("Voter", deployer)) as Voter;

const tx = await voter.createMarketGauge(
market, // Target address
flywheel // Flywheel Address
);

await tx.wait();
console.log(`creating market gauge tx: ${tx.hash}`);
});