Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get error network does not support in chain Ancient8 ethers v6.13.4 (v5 is working good on this chain) #4886

Open
ducyb782001 opened this issue Nov 26, 2024 · 1 comment
Assignees
Labels
investigate Under investigation and may be a bug. v6 Issues regarding v6

Comments

@ducyb782001
Copy link

ducyb782001 commented Nov 26, 2024

Ethers Version

6.13.4

Search Terms

ancient8, network does not support

Describe the Problem

I get error
errors.js:137 Uncaught (in promise) Error: network does not support ENS (operation="getEnsAddress", info={ "network": { "chainId": "28122024", "name": "unknown" } }, code=UNSUPPORTED_OPERATION, version=6.13.4)
when trying to get balance of an ERC20 token using provider.getBalance

Code Snippet

`
    const provider = new ethers.JsonRpcProvider(
      "https://rpcv2-testnet.ancient8.gg"
    );
    const erc20ContractWithoutSigner = new ethers.Contract(
      "0xA64930C5c49e0082dEB9c0b2cad76fD286E1D9a60xA64930C5c49e0082dEB9c0b2cad76fD286E1D9a6",
      ERC20_ABI,
      provider
    );
     const erc20Balance = await erc20ContractWithoutSigner.balanceOf(
      Typed.address(walletAddress)
    );
`

Contract ABI

[
  { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "owner",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "spender",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "value",
        "type": "uint256"
      }
    ],
    "name": "Approval",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "previousOwner",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "OwnershipTransferred",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "from",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "to",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "value",
        "type": "uint256"
      }
    ],
    "name": "Transfer",
    "type": "event"
  },
  {
    "inputs": [
      { "internalType": "address", "name": "owner", "type": "address" },
      { "internalType": "address", "name": "spender", "type": "address" }
    ],
    "name": "allowance",
    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      { "internalType": "address", "name": "spender", "type": "address" },
      { "internalType": "uint256", "name": "amount", "type": "uint256" }
    ],
    "name": "approve",
    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      { "internalType": "address", "name": "account", "type": "address" }
    ],
    "name": "balanceOf",
    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
    "stateMutability": "view",
    "type": "function"
  },
]

Errors

Uncaught (in promise) Error: network does not support ENS (operation="getEnsAddress", info={ "network": { "chainId": "28122024", "name": "unknown" } }, code=UNSUPPORTED_OPERATION, version=6.13.4)

Environment

node.js (v12 or newer)

Environment (Other)

No response

@ducyb782001 ducyb782001 added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Nov 26, 2024
@ducyb782001 ducyb782001 changed the title Get error network does not support in ethers v6.13.4 (v5 is working good on this chain) Get error network does not support in chain Ancient8 ethers v6.13.4 (v5 is working good on this chain) Nov 26, 2024
@ducyb782001
Copy link
Author

I also call
provider.getNetwork()
and only get chainId, for example
{ "name": "unknown", "chainId": "28122024" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Under investigation and may be a bug. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

2 participants