Error HH100: Network rinkeby doesn't exist #444
-
Hi while deploying the contract to rinkeby got this error: `shahbaz@DESKTOP-EC4TGRO:~/shahbazweb3repo/hardhat-simple-storage$ yarn hardhat run scripts/deploy.js --network rinkeby For more info go to https://hardhat.org/HH100 or run Hardhat with --show-stack-traces This is my config file require("@nomiclabs/hardhat-waffle"); const RINKEYBY_RPC_URL = process.env.RINKEYBY_RPC_URL; |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@shahbaz41290 You are exporting the module twice, and the second one overrides the first one, where no network is defined. you should change it like this module.exports = {
defaultNetwork: "hardhat",
networks: {
rinkeby: {
url: RINKEYBY_RPC_URL,
accunts: [PRIVATE_KEY],
chainId: 4,
},
},
solidity: "0.8.4",
etherscan: {
apiKey: ETHERSCAN_API_KEY,
},
}; |
Beta Was this translation helpful? Give feedback.
@shahbaz41290 You are exporting the module twice, and the second one overrides the first one, where no network is defined.
you should change it like this