Skip to content

Hardhat forking does not work with ethers.js ENS methods

Notifications You must be signed in to change notification settings

awkweb/hardhat-fork-with-ens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hardhat-fork-with-ens

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)

About

Hardhat forking does not work with ethers.js ENS methods

Resources

Stars

Watchers

Forks