Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Cleanup query task #237

Merged
merged 4 commits into from
Jul 26, 2023
Merged
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
11 changes: 3 additions & 8 deletions tasks/manage/queryEndowments.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import {task, types} from "hardhat/config";
import {
AccountsCreateEndowment__factory,
AccountsQueryEndowments__factory,
CharityApplications__factory,
} from "typechain-types";
import {AccountMessages} from "typechain-types/contracts/multisigs/CharityApplications";
import {AccountsQueryEndowments__factory} from "typechain-types";
import {getAddresses, getSigners, logger, structToObject} from "utils";

type TaskArgs = {id: number};

task("manage:queryEndowments", "Will create a new endowment")
task("manage:queryEndowments", "Will query an Endowment's details")
.addParam("id", "the endowment id", 0, types.int)
.setAction(async (taskArgs: TaskArgs, hre) => {
try {
Expand All @@ -22,7 +17,7 @@ task("manage:queryEndowments", "Will create a new endowment")
apTeam1
);

logger.out(await queryEndowmentFacet.queryEndowmentDetails(taskArgs.id));
logger.out(structToObject(await queryEndowmentFacet.queryEndowmentDetails(taskArgs.id)));
} catch (error) {
logger.out(error, logger.Level.Error);
}
Expand Down