HardhatError: HH101: Hardhat was set to use chain id 11155111, but connected to a chain with id 1. #6360
Unanswered
bobbywilliamajor
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
`require("@nomicfoundation/hardhat-toolbox")
require("dotenv").config()
/** @type import('hardhat/config').HardhatUserConfig */
const SEPOLIA_RPC_URL = process.env.SEPOLIA_RPC_URL
const SEPOLIA_PRIVATE_KEY = process.env.SEPOLIA_PRIVATE_KEY
module.exports = {
defaultNetwork: "hardhat",
networks: {
sepolia: {
url: SEPOLIA_RPC_URL,
account: [SEPOLIA_PRIVATE_KEY],
chainId: 11155111,
},
},
solidity: "0.8.8",
}`
l am getting the following error
HardhatError: HH101: Hardhat was set to use chain id 11155111, but connected to a chain with id 1.
The code above used to work now it's refusing to connect to the sepolia network through alchemy in order to deploy my contract.
Beta Was this translation helpful? Give feedback.
All reactions