full-blockchain-solidity-course-js
full-blockchain-solidity-course-js copied to clipboard
HardHat HH209
Lesson
Lesson 6
Could you please leave a link to the timestamp in the video where this error occurs? (You can right click a video and "copy video URL at current time")
No response
Operating System
Linux
Describe the bug
I am getting error in hardhat tutorial and Error is HH209 This is my Hardhat.config.js
require("@nomicfoundation/hardhat-toolbox");
require("dotenv").config();
require("@nomiclabs/hardhat-etherscan");
const RINKEBY_RPC_URL= process.env.RINKEBY_RPC_URL
const PRIVATE_KEY=process.env.PRIVATE_KEY
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
defaultNetwork: "Hardhat",
networks: {
rinkeby:{
url:RINKEBY_RPC_URL,
accounts: [PRIVATE_KEY],
chainId:4
},
},
solidity: "0.8.9",
etherscan: {
apiKey: ETHERSCAN_API_KEY,
},
};
This is my .env file
RINKEBY_RPC_URL=https://eth-rinkeby.alchemyapi.io/v2/ZwBZyl2lX3wmu
PRIVATE_KEY=0x6343fb77ce3dfe
ETHERSCAN_API_KEY=2J682SP9RW1J38XBNTIWQNW
This is my Deploy.js file
const {ethers} = require("hardhat");
async function main() {
const SimpleStorageFactory = await ethers.getContractFactory("SimpleStorage")
console.log("Deploying");
const simpleStorage = await SimpleStorageFactory.deploy();
await simpleStorage.deployed();
console.log(`Deploying Contract to: ${simpleStorage.address}`);
}
async function verify(contractAddress , args){}
main()
.then(()=>process.exit(0))
.catch((error) => {
console.error(error);
process.exitCode = 1;
});
This is Error log
Had similar issue.
This worked for me:
yarn remove ethereum-waffle
Is this solved? If so, please close the issue.