Skip to content

chore: upgrade to ENSv2 (Universal Resolver) - #1586

Open
Dhaiwat10 wants to merge 1 commit into
ant-design:mainfrom
ens-integrations:ensv2-upgrade
Open

chore: upgrade to ENSv2 (Universal Resolver)#1586
Dhaiwat10 wants to merge 1 commit into
ant-design:mainfrom
ens-integrations:ensv2-upgrade

Conversation

@Dhaiwat10

@Dhaiwat10 Dhaiwat10 commented May 4, 2026

Copy link
Copy Markdown

💡 Background and solution

Hey! I'm Dhaiwat from DevRel at ENS Labs, and I'm working with library maintainers across the ecosystem to get them ready for ENSv2.

This PR routes ENS resolution in @ant-design/web3-wagmi through the Universal Resolver (ENSv2) instead of the legacy ENS registry. The only ENS resolution call sites in this repo are useEnsName and useEnsAvatar in packages/wagmi/src/wagmi-provider/config-provider.tsx. Wagmi inherits its ENS support from its viem peer, and viem first shipped Universal Resolver support in 2.35.0, so the load-bearing change is making sure consumers of @ant-design/web3-wagmi cannot install a viem older than that.

  • The viem peer dependency in packages/wagmi/package.json is tightened from >=2.0.0 to >=2.35.0. Without this, a downstream consumer could install an older viem and silently fall back to legacy ENS resolution, bypassing the Universal Resolver and CCIP-Read.
  • The viem dev/runtime dependency is bumped from ^2.33.2 to ^2.35.0 in packages/wagmi, packages/eth-web3js, packages/ethers, packages/ethers-v5, and the workspace root, so CI and local development run against the ENSv2 path.
  • The pnpm lockfile resolves viem to 2.48.8.
  • No changes are needed for ethers: there are no .resolveName, .lookupAddress, or .getResolver call sites in the repo. The ethers adapters in packages/ethers and packages/ethers-v5 only construct providers and do not perform ENS lookups themselves.
  • No changes are needed for web3.js: there are no .eth.ens.* call sites. web3 is a peer of @ant-design/web3-eth-web3js, but ENS resolution in that adapter is delegated to the wagmi provider.

You can read more about ENSv2 readiness here: https://docs.ens.domains/web/ensv2-readiness

🔗 Related issue link

n/a — happy to open one if you want me to!

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented May 4, 2026

Copy link
Copy Markdown

@Dhaiwat10 is attempting to deploy a commit to the pro-components Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 4, 2026
@changeset-bot

changeset-bot Bot commented May 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 84388f8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

viem 依赖版本在根目录及四个子包的 package.json 中从 ^2.33.2 升级到 ^2.35.0。wagmi 包同时更新了 peerDependencies 中 viem 的最低版本要求从 >=2.0.0 升级至 >=2.35.0。

Changes

viem 依赖版本升级

层级 / 文件 说明
根包及子包版本更新
package.json, packages/eth-web3js/package.json, packages/ethers-v5/package.json, packages/ethers/package.json
在 dependencies 中,viem 从 ^2.33.2 更新至 ^2.35.0。
wagmi 包版本约束
packages/wagmi/package.json
devDependencies 中 viem 更新至 ^2.35.0;peerDependencies 中 viem 最低版本要求从 >=2.0.0 提升至 >=2.35.0。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 一纸依赖更新令,
viem 版本又升级,
五处齐声跟声和,
小小补丁,大智慧。
稳稳当当向前行~✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title mentions "ENSv2 (Universal Resolver)" upgrade, but the actual changes only show viem dependency version bumps with no direct ENS code modifications. Consider revising the title to more accurately reflect that this is a viem dependency upgrade (e.g., "chore: upgrade viem to 2.35.0 for ENSv2 support") or ensure the PR description clarifies that code changes enabling ENSv2 are in separate commits.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown

Prepare preview

@dosubot dosubot Bot added the dependencies Pull requests that update a dependency file label May 4, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the viem dependency to version ^2.35.0 across multiple packages in the repository. A review comment suggests changing the version range for viem in the peerDependencies of packages/wagmi/package.json from >=2.35.0 to ^2.35.0 to ensure consistency with other package configurations and to protect against potential breaking changes in future major versions.

"peerDependencies": {
"@tanstack/react-query": "^5.51.11",
"viem": ">=2.0.0",
"viem": ">=2.35.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The version range for viem in peerDependencies uses >=2.35.0, which is inconsistent with the ^2.35.0 range used in devDependencies (line 55) and other packages in this PR. To ensure consistency and protect against potential breaking changes in future major versions of viem, it is recommended to use ^2.35.0 here as well.

Suggested change
"viem": ">=2.35.0",
"viem": "^2.35.0",

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/wagmi/package.json (1)

60-60: viem 的 peer 依赖范围增加主版本上限

当前 Line 60 的 >=2.35.0 会接受 viem 的主版本升级。建议改为 >=2.35.0 <3 以防止未来主版本变更引入破坏性 API 更新。

建议修改
-    "viem": ">=2.35.0",
+    "viem": ">=2.35.0 <3",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/wagmi/package.json` at line 60, 更新 packages/wagmi/package.json 中对依赖
"viem" 的范围,当前写法 ">=2.35.0" 会允许主版本升级,改为限定主版本上限 ">=2.35.0 <3"(即将 "viem" 的 peer
依赖范围从 ">=2.35.0" 更改为 ">=2.35.0 <3")以避免未来 viem 的主版本引入破坏性变更。
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/wagmi/package.json`:
- Line 60: 更新 packages/wagmi/package.json 中对依赖 "viem" 的范围,当前写法 ">=2.35.0"
会允许主版本升级,改为限定主版本上限 ">=2.35.0 <3"(即将 "viem" 的 peer 依赖范围从 ">=2.35.0" 更改为 ">=2.35.0
<3")以避免未来 viem 的主版本引入破坏性变更。

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7fc952a8-f7f8-4acb-9827-61aba344fc4b

📥 Commits

Reviewing files that changed from the base of the PR and between dcb9474 and 84388f8.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • package.json
  • packages/eth-web3js/package.json
  • packages/ethers-v5/package.json
  • packages/ethers/package.json
  • packages/wagmi/package.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant