Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"npx hardhat accounts" not available in Hardhat latest version 2.9.9

I have installed the latest version of hardhat. It installed fine.

After setting hardhat up and installing all the required packages, when I run:

npx hardhat accounts

It gives an error:

Error HH303: Unrecognized task accounts

It seems like 'account' task has been removed in the latest version of hardhat. My question is now to get the list of wallet accounts that hardhat generates?

like image 203
Umair Avatar asked Jan 21 '26 10:01

Umair


1 Answers

I have the same situation on 2022-08-16.

To get the available accounts, I use the npx hardhat node command.

The command sequence I performed was:

$ npx hardhat --version
2.10.1

$ npx hardhat accounts
Error HH303: Unrecognized task accounts
For more info go to https://hardhat.org/HH303 or run Hardhat with --show-stack-traces

$ npx hardhat node
Started HTTP and WebSocket JSON-RPC server at http://127.0.0.1:8545/

Accounts
========

WARNING: These accounts, and their private keys, are publicly known.
Any funds sent to them on Mainnet or any other live network WILL BE LOST.

Account #0: 0xf39Fd6e51a...ffFb92266 (10000 ETH)
Private Key: 0xac0974bec39a1...478cbed5efcae784d7bf4f2ff80

Account #1: 0x70997970C51812...b50e0d17dc79C8 (10000 ETH)
Private Key: 0x59c6995e998f97a5a...9dc9e86dae88c7a8412f4603b6b78690d
.
.
.
like image 142
tomkat-cr Avatar answered Jan 24 '26 16:01

tomkat-cr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!