I am trying to connect to my local hardhat node (which is mainnet fork) from my locally running web app. However, because I have the ethersjs provider set to http://localhost:8545
, so it knows to talk locally, I get an error from Metamask:
MetaMask - RPC Error: Expected an array with at least one valid string HTTPS url 'rpcUrls'
Curious what the workaround is?
I am sure there is probably a way to run a local hardhat node locally over tls (?) but I feel like there is a better solution.
Thanks for your help.
Please note, I have (of course) setup MM with the local network and I and my provider code definition looks like:
provider = new ethers.providers.Web3Provider(web3ProviderFrom(config.defaultProvider), config.chainId);