From d318da472a45f0110545312cb733ad245253008f Mon Sep 17 00:00:00 2001 From: Mike Date: Wed, 27 Apr 2022 15:06:18 +0700 Subject: [PATCH] fix: name task --- tasks/utils/index.ts | 1 + tasks/utils/mnemonic.ts | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tasks/utils/index.ts b/tasks/utils/index.ts index b0de427..df17024 100644 --- a/tasks/utils/index.ts +++ b/tasks/utils/index.ts @@ -1 +1,2 @@ import "./accounts" +import "./mnemonic" diff --git a/tasks/utils/mnemonic.ts b/tasks/utils/mnemonic.ts index f572411..cef2dbd 100644 --- a/tasks/utils/mnemonic.ts +++ b/tasks/utils/mnemonic.ts @@ -1,9 +1,6 @@ import { task } from "hardhat/config" -task("accounts", "Prints the list of accounts", async (taskArgs, hre) => { - const accounts = await hre.ethers.getSigners() - - for (const account of accounts) { - console.log(account.address) - } +task("mnemonic", "Generate new mnemonic", async (taskArgs, hre) => { + const wallet = hre.ethers.Wallet.createRandom() + console.log(`Mnemonic: ${wallet.mnemonic.phrase}`) })