I'm running some tests on Hardhat network with the following config:
const config = {
networks: {
hardhat: {
chainId: 1337,
forking: {
enabled: true,
url: `https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_KEY}`,
blockNumber: 11873448,
},
},
},
}
export default config;
I need to deploy a SimplePriceFeed contract, but when I have mainnet forking enabled I get this error:
Error: network does not support ENS (operation="ENS", network="unknown", code=UNSUPPORTED_OPERATION, version=providers/5.3.0)
This is the script I'm running to attempt deploying SimplePriceFeed:
const contract = await ethers.getContractFactory("SimplePriceFeed")
const SimplePriceFeed = await contract.deploy("WBTC / USD");
I tried the following script as well, but I encountered the same exact error:
const signer = (await ethers.getSigners())[0];
const artifact = await hre.artifacts.readArtifact("SimplePriceFeed");
const SimplePriceFeed = await deployContract(signer, artifact, ["WBTC / USD"])
Both scripts work just fine when mainnet forking is disabled, but I really need mainnet forking for my tests.