[英]Error in trying to compile my contract through the hardhat feature
Kindly explain why I'm getting this error message when I tried to compile my contract through the hardhat feature and also how I can solve it.请解释为什么当我尝试通过 hardhat 功能编译我的合约时收到此错误消息以及我如何解决它。
Below is the hardhat.config.js script下面是 hardhat.config.js 脚本
require("@nomiclabs/hardhat-waffle");
require('@nomiclabs/hardhat-ethers');
module.exports = {
solidity: '0.8.0',
network: {
ropsten: {
url: "https://eth-ropsten.alchemyapi.io/v2/Bn5tm9fX90ET1hKwb76lKJB0rzU3JBi2",
accounts: ["63b598044c3cce8d656a3db5c.........c64beb17eb1687aebbefc5cac8a"]
}
}
}
below is the error I keep getting whenever I try to compile it using the run下面是每当我尝试使用运行编译它时我不断遇到的错误
PS C:\Users\Temitope\Desktop\kredar\smart_contract> npx hardhat run scripts/deploy.js --network ropsten
Error HH100: Network ropsten doesn't exist
For more info go to https://hardhat.org/HH100 or run Hardhat with --show-stack-traces
PS C:\Users\Temitope\Desktop\kredar\smart_contract>
Thanks.谢谢。
By looking at your config i guess that network
should be networks
.通过查看您的配置,我猜
network
应该是networks
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.