Skip to content

EnsPlugin make no use of targetNetwork #5021

@PierreJeanjacquot

Description

@PierreJeanjacquot

Ethers Version

6.15.0

Search Terms

ENS

Describe the Problem

I'm currently figuring out how ENS resolution work in ethers when connected to Arbitrum.
The EnsPlugin attached to "arbitrum" networks has targetNetwork: 1, but don't use mainnet to actually resolve ENS.
Maybe I'm missing something?

Code Snippet

import { JsonRpcProvider } from "ethers";

const provider = new JsonRpcProvider("https://arbitrum.drpc.org");

const network = await provider.getNetwork();
console.log("🚀 ~ chainId:", network.chainId);
console.log("🚀 ~ name:", network.name);

const ensPlugin = network.getPlugin("org.ethers.plugins.network.Ens");
console.log("🚀 ~ ensPlugin:", ensPlugin);

const address = await provider.resolveName("vitalik.eth");
console.log("🚀 ~ address:", address);

Contract ABI

Errors

Error: missing revert data (action="call", data=null, reason=null, transaction={ "data": "0x0178b8bfee6c4522aab0003e8d14cd40a6af439055fd2577951148c14b6cea9a53475835", "to": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" }, invocation=null, revert=null, code=CALL_EXCEPTION, version=6.15.0)
    at makeError (file:///***/node_modules/ethers/lib.esm/utils/errors.js:132:21)
    at getBuiltinCallException (file:///***/node_modules/ethers/lib.esm/abi/abi-coder.js:102:12)
    at AbiCoder.getBuiltinCallException (file:///***/node_modules/ethers/lib.esm/abi/abi-coder.js:203:16)
    at JsonRpcProvider.getRpcError (file:///***/node_modules/ethers/lib.esm/providers/provider-jsonrpc.js:691:32)
    at file:///***/node_modules/ethers/lib.esm/providers/provider-jsonrpc.js:298:45
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'CALL_EXCEPTION',
  action: 'call',
  data: null,
  reason: null,
  transaction: {
    to: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
    data: '0x0178b8bfee6c4522aab0003e8d14cd40a6af439055fd2577951148c14b6cea9a53475835'
  },
  invocation: null,
  revert: null,
  shortMessage: 'missing revert data',
  info: {
    error: { message: 'execution reverted', code: -32000 },
    payload: {
      method: 'eth_call',
      params: [
        {
          to: '0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e',
          data: '0x0178b8bfee6c4522aab0003e8d14cd40a6af439055fd2577951148c14b6cea9a53475835'
        },
        'latest'
      ],
      id: 5,
      jsonrpc: '2.0'
    }
  }
}

Environment

No response

Environment (Other)

No response

Metadata

Metadata

Assignees

Labels

investigateUnder investigation and may be a bug.v6Issues regarding v6

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions