我正在Linux上安装Hardhat。 我首先使用以下命令设置了React应用程序
npx create-react-app react-dapp
cd react-dapp
然后我使用这个命令安装了一些hardhat的依赖项。
npm install ethers hardhat @nomiclabs/hardhat-waffle \
ethereum-waffle chai \
@nomiclabs/hardhat-ether
这都做得没问题。 然后我创建了硬帽配置并进行了设置。
npx hardhat
然后我编辑了 hardhat.config.js 文件。 我放置在这里。
module.exports = {
solidity: "0.8.4",
paths: {
artifacts: './src/artifacts',
},
networks: {
hardhat: {
chainId: 1337
}
在那之后,我创建了节点。
npx hardhat node
我遇到了这个错误:
Error HH604:运行JSON-RPC服务器时出错:error:0308010C:digital envelope routines::unsupported