这是indexloc提供的服务,不要输入任何密码
Skip to content

getEns doesn't pick up rpcUrl from chain configuration #2356

@shrpne

Description

@shrpne

Current Behavior

It seems getEns only uses default viem chains and doesn't respect rpcUrl of 'chains' option of Onborad InitOptions.

It leads to cloudflare-eth.com always being used for ENS resolution, but the problem is that cloudflare-eth.com has been down for several days already. So ENS resolution is not working and there are errors in the console.

Expected Behavior

chains[].rpcUrl should be passed to viem's chain or to viem's http transport so it will be used for ENS resolution

Steps To Reproduce

just init as in quick start https://onboard.blocknative.com/#quick-start

What package is effected by this issue?

@web3-onboard/core

Is this a build or a runtime issue?

Runtime

Package Version

2.28.2

Node Version

N/A

What browsers are you seeing the problem on?

Firefox, Chrome

Relevant log output

ContractFunctionExecutionError: The contract function "reverse" reverted with the following reason:
Internal error

Contract Call:
  address:   0xce01f8eee7E479C928F8919abD53E553a36CeF67
  function:  reverse(bytes reverseName)
  args:             (0x28386263663339303239366538333062363337643736633364656161663364343061323065346236370461646472077265766572736500)

Docs: https://viem.sh/docs/contract/readContract
Version: viem@2.12.0
    _BaseError base.ts:29
    ContractFunctionExecutionError contract.ts:147
    getContractError getContractError.ts:72
    readContract readContract.ts:128
    getAction getAction.ts:25
    getEnsName getEnsName.ts:117
    getEnsName public.ts:1821
    getEns chunk-R2ZEN5JV.js:13527
    updateAccountDetails chunk-R2ZEN5JV.js:19214
    4 chunk-R2ZEN5JV.js:19247
    RxJS 7
    setStep chunk-R2ZEN5JV.js:19254
    connectWallet chunk-R2ZEN5JV.js:19165
    4 chunk-R2ZEN5JV.js:19242
    RxJS 7
    setStep chunk-R2ZEN5JV.js:19254
    selectWallet chunk-R2ZEN5JV.js:19069
    setTimeout handler*selectWallet chunk-R2ZEN5JV.js:19069
    autoSelectWallet chunk-R2ZEN5JV.js:19086
    4 chunk-R2ZEN5JV.js:19231
    RxJS 14
    instance$4 chunk-R2ZEN5JV.js:19225
    init$1 chunk-R2ZEN5JV.js:12501
    Index$1 chunk-R2ZEN5JV.js:19317
    create_if_block_13 chunk-R2ZEN5JV.js:19827
    p chunk-R2ZEN5JV.js:21177
    update chunk-R2ZEN5JV.js:11995
    flush2 chunk-R2ZEN5JV.js:11961
    promise callback*schedule_update chunk-R2ZEN5JV.js:11939
    make_dirty chunk-R2ZEN5JV.js:12470
    ctx chunk-R2ZEN5JV.js:12507
    instance chunk-R2ZEN5JV.js:21359
    RxJS 3

Anything else?

Related sources:
getEns core/src/provider.ts#L324
getProvider core/src/provider.ts#L44
chain selection core/src/utils.ts#L139

This issue may be related:
#2324

Sanity Check

  • If this is a build issue, I have included my build config. If this is a runtime issue, I have included reproduction steps and/or a Minimal, Reproducible Example.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions