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

Commit

Permalink
Cleanup query task (#237)
Browse files Browse the repository at this point in the history
* Add new task for queryting endowment details

* Fix logging for endow query

* Update tasks/manage/queryEndowments.ts

Co-authored-by: SovereignAndrey <[email protected]>

---------

Co-authored-by: SovereignAndrey <[email protected]>
  • Loading branch information
stevieraykatz and SovereignAndrey authored Jul 26, 2023
1 parent 7002e37 commit 36f9c0f
Showing 1 changed file with 3 additions and 8 deletions.
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

0 comments on commit 36f9c0f

Please sign in to comment.