0

This is the error

PS C:\pr0\token-exchange> npx hardhat run --network localhost .\scripts\2_seed-exchange.js
Using chainId: 31337
Dapp Token fetched:  0x5FbDB2315678afecb367f032d93F642f64180aa3

mETH Token fetched:  0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512

mDAI Token fetched:  0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0

Exchange fetched: 0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9

Error: network does not support ENS (operation="getResolver", network="unknown", code=UNSUPPORTED_OPERATION, version=providers/5.7.2)
    at Logger.makeError (C:\pr0\token-exchange\node_modules\@ethersproject\logger\src.ts\index.ts:269:28)
    at Logger.throwError (C:\pr0\token-exchange\node_modules\@ethersproject\logger\src.ts\index.ts:281:20)
    at EthersProviderWrapper.<anonymous> (C:\pr0\token-exchange\node_modules\@ethersproject\providers\src.ts\base-provider.ts:1989:20)
    at step (C:\pr0\token-exchange\node_modules\@ethersproject\providers\lib\base-provider.js:48:23)
    at Object.next (C:\pr0\token-exchange\node_modules\@ethersproject\providers\lib\base-provider.js:29:53)
    at fulfilled (C:\pr0\token-exchange\node_modules\@ethersproject\providers\lib\base-provider.js:20:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  reason: 'network does not support ENS',
  code: 'UNSUPPORTED_OPERATION',
  operation: 'getResolver',
  network: 'unknown'
}
2
  • 1
    Can you provide the source code of the project, and other details like blockchain used?
    – Ismael
    Apr 20, 2023 at 4:57
  • Probably it's some missing/invalid argument but It's hard to pinpoint the exact issue without further context or source code. I think this might be helpful for you. Error: network does not support ENS Apr 20, 2023 at 5:20

1 Answer 1

0

If you see this error, it almost always indicates you passed in a bad value to something that expected an address. If you are on a network that does not have ENS, you must pass in a normal Ethereum address. Check the value (with console.log) you pass into the kings that expect addresses, often the variable is null or the wrong type of object (not a string).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.