Skip to content

Commit

Permalink
Merge pull request #65 from gnosis/fix_proposal_tasks
Browse files Browse the repository at this point in the history
Fix proposal tasks
  • Loading branch information
auryn-macmillan authored Jul 14, 2022
2 parents ec0cef0 + f1907a5 commit d226c7c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/tasks/proposals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ task("addProposal", "Adds a proposal question")
.addParam("proposalFile", "File with proposal information json", undefined, types.inputFile)
.setAction(async (taskArgs, hardhatRuntime) => {
const ethers = hardhatRuntime.ethers;
const Module = await ethers.getContractFactory("RealityModule");
const module = await Module.attach(taskArgs.module);
const module = await ethers.getContractAt("RealityModule", taskArgs.module);

const proposal = await getProposalDetails(module, taskArgs.proposalFile);

Expand All @@ -51,8 +50,7 @@ task("showProposal", "Shows proposal question details")
.addParam("proposalFile", "File with proposal information json", undefined, types.inputFile)
.setAction(async (taskArgs, hardhatRuntime) => {
const ethers = hardhatRuntime.ethers;
const Module = await ethers.getContractFactory("RealityModule");
const module = await Module.attach(taskArgs.module);
const module = await ethers.getContractAt("RealityModule", taskArgs.module);

const proposal = await getProposalDetails(module, taskArgs.proposalFile);

Expand All @@ -71,8 +69,7 @@ task("executeProposal", "Executes a proposal")
.addParam("proposalFile", "File with proposal information json", undefined, types.inputFile)
.setAction(async (taskArgs, hardhatRuntime) => {
const ethers = hardhatRuntime.ethers;
const Module = await ethers.getContractFactory("RealityModule");
const module = await Module.attach(taskArgs.module);
const module = await ethers.getContractAt("RealityModule", taskArgs.module);

const proposal = await getProposalDetails(module, taskArgs.proposalFile);

Expand Down

0 comments on commit d226c7c

Please sign in to comment.