feat(datasources): consolidate UniversalResolver onto IUniversalResolver proxy#2267
Conversation
…ver proxy Each ENSRoot Datasource now exposes a single `UniversalResolver` contract pointing at the proxy address (0xeeee…eeee on mainnet/sepolia, the ENSv2 deployment on sepolia-v2, UpgradableUniversalResolverProxy on devnet), replacing the separate UniversalResolver (V1) and UniversalResolverV2 contracts. `UniversalResolverABI` is now `mergeAbis([IUniversalResolver, IMulticallable])`. ENSApi forward-resolution and the execute-operations integration test are updated to the single contract.
🦋 Changeset detectedLatest commit: 2066a1d The changes in this PR will be included in the next version bump. This PR includes changesets to release 24 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Ready to act? Review this PR in Change Stack to turn feedback into patch suggestions you can inspect and refine. Warning Review limit reached
More reviews will be available in 45 minutes and 4 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR consolidates the UniversalResolver contract handling by replacing separate V1 and V2 ABI definitions with a unified ChangesUniversalResolver ABI Consolidation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Greptile SummaryConsolidates all
Confidence Score: 5/5Safe to merge — the change is a straightforward consolidation with no logic regressions; all namespaces consistently point at the proxy and the ABI is well-formed. Every datasource now uses a single, correctly addressed UniversalResolver entry. The new IUniversalResolver ABI has no constructor entry and accurately reflects the proxy interface. The forward-resolution.ts simplification removes dead fallback logic without altering behavior, and the integration tests have been updated to match. No missing guards, no dropped fields, and the full test suite (1886 tests) passes. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[ENSApi Forward Resolution] --> B{ENSv2Root datasource present?}
B -- No --> C[ENSv1 path]
B -- Yes --> D[getDatasourceContract 'UniversalResolver']
D --> E[universalResolver.address - proxy address]
E --> F[executeOperations]
subgraph ABI Layer
J[IUniversalResolver] --> L[mergeAbis - UniversalResolverABI]
K[IMulticallable] --> L
end
subgraph Datasource Contracts
M[mainnet: 0xeeee...eeee block 23085558]
N[sepolia: 0xeeee...eeee block 8928790]
O[sepolia-v2: 0x651d...9ef block 10893223]
P[ens-test-env: UpgradableUniversalResolverProxy]
end
Reviews (4): Last reviewed commit: "docs: add ensapi changeset for Universal..." | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
This PR consolidates ENS UniversalResolver usage across the codebase onto a single IUniversalResolver proxy contract, removing the previous split between UniversalResolver (V1) and UniversalResolverV2 and updating datasource addresses/ABIs and ENSApi consumers accordingly.
Changes:
- Replaces V1/V2 UniversalResolver ABIs with a shared
UniversalResolverABI = mergeAbis([IUniversalResolver, IMulticallable]). - Updates mainnet/sepolia/sepolia-v2/ens-test-env datasources to expose a single
UniversalResolverentry pointing at the proxy address. - Simplifies ENSApi forward-resolution and integration tests to use the single
UniversalResolvercontract.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/integration-test-env/src/seed/resolver-records.ts | Seeds now query findResolver via UpgradableUniversalResolverProxy instead of UniversalResolverV2. |
| packages/datasources/src/mainnet.ts | Switches UniversalResolver to proxy address + shared UniversalResolverABI. |
| packages/datasources/src/sepolia.ts | Switches UniversalResolver to proxy address + shared UniversalResolverABI. |
| packages/datasources/src/sepolia-v2.ts | Removes separate V2 entry; points single UniversalResolver at proxy + updates start block. |
| packages/datasources/src/ens-test-env.ts | Removes V2 datasource entry; uses proxy address for UniversalResolver in devnet/test env. |
| packages/datasources/src/abis/shared/UniversalResolver.ts | Redefines UniversalResolverABI as IUniversalResolver merged with IMulticallable. |
| packages/datasources/src/abis/shared/IUniversalResolver.ts | Adds proxy interface ABI for UniversalResolver. |
| packages/datasources/src/abis/shared/IMulticallable.ts | Adds multicall(bytes[]) -> bytes[] ABI fragment for merging. |
| packages/datasources/src/abis/root/UniversalResolverV1.ts | Deletes the legacy V1 UniversalResolver ABI. |
| packages/datasources/src/abis/ensv2/UniversalResolverV2.ts | Deletes the ENSv2 UniversalResolver ABI. |
| apps/ensapi/src/lib/resolution/forward-resolution.ts | Collapses V1/V2 branching; always uses the single datasource UniversalResolver. |
| apps/ensapi/src/lib/resolution/execute-operations.integration.test.ts | Updates integration tests to use UniversalResolver instead of UniversalResolverV2. |
| .changeset/universal-resolver-proxy.md | Adds a Changeset documenting the consolidation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ticallable comment
|
@greptile review |
Summary
Consolidates UniversalResolver usage onto the single
IUniversalResolverproxy, replacing the two separateUniversalResolver(V1) andUniversalResolverV2contracts.ABI layer (
packages/datasources/src/abis/shared/)IUniversalResolver.ts(proxy interface) andIMulticallable.ts(multicall(bytes[]) → bytes[]).UniversalResolverABIis nowmergeAbis([IUniversalResolver, IMulticallable]).root/UniversalResolverV1.tsandensv2/UniversalResolverV2.ts.Datasources — one
UniversalResolverper ENSRoot, allUniversalResolverV2entries removed0xeeeeeeee14d718c2b47d9923deab1335e144eeee230855580xeeeeeeee14d718c2b47d9923deab1335e144eeee89287900x651d670ce0d0f1ed0893f39d51fd0dbd4546c9ef10893223contracts.UpgradableUniversalResolverProxy0integration-test-envseed switched toUpgradableUniversalResolverProxy.ENSApi consumers
forward-resolution.ts: collapsed the V1/V2 fork to the single contract.execute-operations.integration.test.ts:UniversalResolverV2→UniversalResolver.UniversalResolveris an RPC-reference contract only (not indexed by Ponder), so no reindex is required.Notes
UniversalResolver/UniversalResolverV2constants indevnet/constants.tsare left in place — now unused but mirror real deployed devnet contracts.Validation
pnpm typecheck(all workspaces) ✓pnpm test(1886 tests) ✓pnpm lintclean ✓