mirror of
https://github.com/AtHeartEngineering/bandada.git
synced 2026-01-09 16:58:29 -05:00
17 lines
518 B
TypeScript
17 lines
518 B
TypeScript
import { Signer } from "@ethersproject/abstract-signer"
|
|
import { task, types } from "hardhat/config"
|
|
|
|
task("accounts", "Prints the list of accounts")
|
|
.addOptionalParam<boolean>("logs", "Print the logs", true, types.boolean)
|
|
.setAction(async ({ logs }, { ethers }) => {
|
|
const accounts: Signer[] = await ethers.getSigners()
|
|
|
|
if (logs) {
|
|
for (const account of accounts) {
|
|
console.info(await account.getAddress())
|
|
}
|
|
}
|
|
|
|
return accounts
|
|
})
|