accounts.ts 373 B

123456789101112
  1. import { Signer } from "@ethersproject/abstract-signer";
  2. import { task } from "hardhat/config";
  3. import { TASK_ACCOUNTS } from "./task-names";
  4. task(TASK_ACCOUNTS, "Prints the list of accounts", async (_taskArgs, hre) => {
  5. const accounts: Signer[] = await hre.ethers.getSigners();
  6. for (const account of accounts) {
  7. console.log(await account.getAddress());
  8. }
  9. });