hardhat deployment on Sepolia

833 views Asked by At

I try many times to deploy my contract by running :

npx hardhat run scripts/deploy.js --network sepolia and all I get is an error message saying:

Error HH100: Network sepolia doesn't exist For more info go to https://hardhat.org/HH100 or run Hardhat with --show-stack-traces any help ?

I really don't know what is the issue? Any one can help please? png file is attached. All things seem to be good:

  • sepolia testnet balance is available for paying gas
  • url from Quicknode is doublechecked
  • .env file is added
  • compiled is done

enter image description here

2

There are 2 answers

0
Deepanshu Chauhan On

I have also faced the same error a few days back. This was how I resolved it:

  1. Take a backup of your project files.
  2. Initialize a new project using npm init or yarn init.
  3. Install hardhat dependency.
  4. Creat a new hardhat project with an empty configuration.
  5. Copy paste all the files again to new project and it will start work again
0
Elvis Van On

i think you're missing a crucial property, chainId, which sepolia testnet is 11155111 so you should modify hardhat.config.js as follow:

module.exports = {
  solidity: "0.8.19",
  networks: {
    sepolia: {
      chainId: 11155111,
      url: QUICKNODE_HTTP_URL,
      accounts: [PRIVATE_KEY],
    },
  },
};