I'm running through these docs on deploying an NFT and I keep getting the error:
Error HH100: Network ropsten doesn't exist
The command I'm using can be found at step 16:
npx hardhat --network ropsten run scripts/deploy.js
This is what my deploy.js
file looks like:
async function main() {
const MyNFT = await ethers.getContractFactory("MyNFT")
// Start deployment, returning a promise that resolves to a contract object
const myNFT = await MyNFT.deploy()
await myNFT.deployed()
console.log("Contract deployed to address:", myNFT.address)
}
And this is what my hardhat.config.js
file looks like:
/**
* @type import('hardhat/config').HardhatUserConfig
*/
require('dotenv').config();
require("@nomiclabs/hardhat-ethers");
const { API_URL, PRIVATE_KEY } = process.env;
module.exports = {
solidity: "0.8.1",
defaultNetwork: "rinkeby",
networks: {
hardhat: {},
rinkeby: {
url: API_URL,
accounts: [`0x${PRIVATE_KEY}`]
}
},
}
How do I fix this error?