I am trying to deploy a contract on Goerli, but I constantly get the error Error HH100: Network goerli doesn't exist
Here is my hardhat.config.ts
require("dotenv").config();
import { task } from 'hardhat/config';
import '@nomiclabs/hardhat-waffle';
import '@typechain/hardhat'
import '@nomiclabs/hardhat-ethers';
import { HardhatUserConfig } from "hardhat/config";
const PrivateKey = "b427...";
const config: HardhatUserConfig = {
solidity: {
version: '0.8.0',
},
networks: {
goerli: {
chainId: 5,
url: "https://goerli.infura.io/v3/309820d3955640ec9cda472d998479ef",
accounts: [PrivateKey],
},
},
};
// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task('accounts', 'Prints the list of accounts', async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
export default {
solidity: '0.8.0',
};
Thanks!
I don't know what I should add more, but please just ask and I will post more information.
defaultNetwork
togoerli
but hadn't updated the networks section to contain it (it was preset to ropsten). – Myiasis