Skip to content

Lesson 6: Trying to deploy "yarn hardhat run scripts/deploy.js --network sepolia " but keep getting an error #5484

Answered by Nlferu
TheyAskWho asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @TheyAskWho

Please change your hardhat.config.js into below:

require("@nomicfoundation/hardhat-toolbox");
require("dotenv").config()
require("@nomiclabs/hardhat-etherscan")

/** @type import('hardhat/config').HardhatUserConfig */
 
const SEPOLIA_RPC_URL = process.env.SEPOLIA_RPC_URL
const PRIVATE_KEY = process.env.PRIVATE_KEY
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY

module.exports = {
  solidity: "0.8.8",
  defaultNetwork: "hardhat",
  networks: {
    hardhat: {},
// Just rename it from Sepolia into sepolia
    sepolia:{
      url: SEPOLIA_RPC_URL,
      accounts: [PRIVATE_KEY],
      chainId: 11155111,

    },
  },
  solidity: "0.8.8",
  etherscan: {
    apiKey: ETH…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TheyAskWho
Comment options

Answer selected by TheyAskWho
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants