Home > OS >  Error in trying to compile my contract through the hardhat feature
Error in trying to compile my contract through the hardhat feature

Time:05-01

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.

CodePudding user response:

By looking at your config i guess that network should be networks.

  • Related