我已经安装了最新版本的安全帽。安装得很好。
在设置了“硬帽子”并安装了所有必需的软件包后,当我运行:
npx hardhat accounts它给出了一个错误:
Error HH303: Unrecognized task accounts看起来“帐户”任务在最新版本的“安全帽”中被删除了。我的问题是,现在如何得到名单的钱包帐户产生的白帽?
发布于 2022-08-16 11:42:42
2022-08-16我也有同样的情况。
为了获得可用的帐户,我使用npx hardhat node命令。
我执行的命令序列是:
$ 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
.
.
.发布于 2022-08-16 15:38:05
这是因为帐户任务没有包含在最新的版本中。在hardhat.config.js中添加以下内容
task("accounts", "Prints the list of accounts", async () => {
const accounts = await ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
发布于 2022-07-17 16:24:42
我不确定,但我成功地解决了这个问题:根据需要将华夫饼迁移到贝丝柴伊母版,从配置中迁移rm华夫饼,并在此之后添加chai母版,无法获得帐户els,如果它能够帮助启动节点时,它看起来就像在启动节点时显示帐户一样!
https://stackoverflow.com/questions/72943829
复制相似问题