简体   繁体   中英

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.

Below is the hardhat.config.js script

    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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM