0

enter image description here

I am writing a hardhat program and here's my hardhat.config.js

require("dotenv").config()
require("@nomicfoundation/hardhat-toolbox")
require("@nomiclabs/hardhat-etherscan")
const RINKBEY_RPC_URL = process.env.RINKBEY_RPC_URL
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY
const PRIVATE_KEY = process.env.PRIVATE_KEY
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
    // defaultNetwork : 'hardhat' default with built in RPC URL.
    solidity: "0.8.9",
    networks: {
        rinkbey: {
            url: RINKBEY_RPC_URL,
            accounts: [PRIVATE_KEY],
            chainId: 4,
        },
    },
    etherscan: {
        apiKey: ETHERSCAN_API_KEY,
    },
}

when I run npx hardhat run scripts/deploy.js --network rinkeby I get Network rinkeby doesn't exists.

1 Answer 1

0

rinkeby is spelled wrong in your config file

1
  • happens to the best of us
    – thefett
    Aug 3 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.