accounts.ts 288 B

1234567891011121314
  1. import { task } from "hardhat/config"
  2. /**
  3. Example:
  4. npx hardhat accounts
  5. */
  6. task("accounts", "Prints the list of accounts", async (_taskArgs, env) => {
  7. const accounts = await env.ethers.getSigners()
  8. for (const account of accounts) {
  9. console.log(await account.getAddress())
  10. }
  11. })