When using Mainnet Forking with Hardhat, ethers.js ENS-related methods fail (i.e. lookupAddress
).
Run the following to get see the error:
pnpm i
pnpm dev
Or npm:
npm i
npm dev
Check out src/index.ts
to switch between Hardhat ethers and plain Alchemy providers.
Using address 0xA0Cf…251e
Fetching balance…
BigNumber { value: "1403416862768458662" }
Fetching ENS name…
Error: network does not support ENS (operation="ENS", network="unknown", code=UNSUPPORTED_OPERATION, version=providers/5.5.3)