accounts.ts 323 B

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