Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/ensapi-universal-resolver-proxy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ensapi": patch
---

Omnigraph API: Resolution now uses the ENSv2-ready stable UniversalResolver proxy address when not accelerated.
5 changes: 5 additions & 0 deletions .changeset/universal-resolver-proxy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ensnode/datasources": patch
---
Comment thread
shrugs marked this conversation as resolved.

Consolidate UniversalResolver onto the `IUniversalResolver` proxy. Each ENSRoot Datasource now exposes a single `UniversalResolver` contract pointing at the proxy address (`0xeeeeeeee14d718c2b47d9923deab1335e144eeee` on mainnet/sepolia), replacing the separate `UniversalResolver` (V1) and `UniversalResolverV2` contracts. The exported `UniversalResolverABI` is now `IUniversalResolver` merged with `IMulticallable`.
Comment thread
shrugs marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ const EXPECTED_DESCRIPTION = "example.eth";

const publicClient = di.context.rootChainPublicClient;

const UniversalResolverV2 = getDatasourceContract(
const UniversalResolver = getDatasourceContract(
ENSNamespaceIds.EnsTestEnv,
DatasourceNames.ENSRoot,
"UniversalResolverV2",
"UniversalResolver",
);

describe("executeOperations against UniversalResolver", () => {
Expand All @@ -58,7 +58,7 @@ describe("executeOperations against UniversalResolver", () => {
await expect(
executeOperations({
name: NAME,
resolverAddress: UniversalResolverV2.address,
resolverAddress: UniversalResolver.address,
useENSIP10Resolve: true,
operations: makeOperations(node, { texts: ["description"] }),
publicClient,
Expand All @@ -82,7 +82,7 @@ describe("executeOperations against UniversalResolver", () => {
await expect(
executeOperations({
name: NAME_WITH_ENCODED_LABELHASHES,
resolverAddress: UniversalResolverV2.address,
resolverAddress: UniversalResolver.address,
useENSIP10Resolve: true,
operations: makeOperations(node, { texts: ["description"] }),
publicClient,
Expand Down
13 changes: 2 additions & 11 deletions apps/ensapi/src/lib/resolution/forward-resolution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
type ForwardResolutionResult,
getDatasourceContract,
getENSv1RootRegistry,
maybeGetDatasourceContract,
type ResolverRecordsSelection,
TraceableENSProtocol,
toJson,
Expand Down Expand Up @@ -167,28 +166,20 @@ async function _resolveForward<SELECTION extends ResolverRecordsSelection>(
// plugin being configured — a namespace may be ENSv1-only even when the Unigraph plugin is
// defined, and forward resolution must follow the ENSv1 path in that case.
if (maybeGetDatasource(di.context.namespace, DatasourceNames.ENSv2Root)) {
const universalResolverV1 = getDatasourceContract(
const universalResolver = getDatasourceContract(
di.context.namespace,
DatasourceNames.ENSRoot,
"UniversalResolver",
);

const universalResolverV2 = maybeGetDatasourceContract(
di.context.namespace,
DatasourceNames.ENSRoot,
"UniversalResolverV2",
);

const UniversalResolverAddress =
universalResolverV2?.address ?? universalResolverV1.address;
operations = await withEnsProtocolStep(
TraceableENSProtocol.ForwardResolution,
ForwardResolutionProtocolStep.ExecuteResolveCalls,
{},
() =>
executeOperations({
name,
resolverAddress: UniversalResolverAddress,
resolverAddress: universalResolver.address,
operations,
publicClient,
useENSIP10Resolve: true,
Expand Down
Loading
Loading