Lesson 6 Yarn hardhat #5837
Answered
by
roychaadit
roychaadit
asked this question in
Q&A
-
The following is my code for hardhat.config.js. I keep getting an error when I run the terminal commands as shown in the tutorial. 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 = {
defaultNetwork: "hardhat", // No need to be explicit as hardhat implicitly runs itslef in the background
networks: {
sepolia: {
url: SEPOLIA_RPC_URL,
accounts: [PRIVATE_KEY],
chainId: 11155111,
},
},
solidity: "0.8.18",
etherscan: {
apiKey: ETHERSCAN_API_KEY,
},
} The following is the error:
Any idea why this may be happening? |
Beta Was this translation helpful? Give feedback.
Answered by
roychaadit
Jul 11, 2023
Replies: 1 comment 2 replies
-
Fixed the issue. Replaced require("@nomicfoundation/hardhat-toolbox")
require("dotenv").config()
require("@nomiclabs/hardhat-etherscan") with require("@nomicfoundation/hardhat-toolbox")
require("dotenv").config() |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
roychaadit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fixed the issue. Replaced
with