accounts.ts 268 Bytes
import { task } from 'hardhat/config'
import '@nomiclabs/hardhat-ethers'

task('accounts', 'Prints the list of accounts', async (_, hre) => {
  const accounts = await hre.ethers.getSigners()

  for (const account of accounts) {
    console.log(account.address)
  }
})