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
10 changes: 10 additions & 0 deletions apps/ensapi/src/lib/resolution/forward-resolution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { replaceBigInts } from "@ponder/utils";
import {
type AccountId,
asInterpretedName,
ENS_ROOT_NAME,
type InterpretedName,
isNormalizedName,
type Node,
Expand Down Expand Up @@ -148,6 +149,15 @@ async function _resolveForward<SELECTION extends ResolverRecordsSelection>(
throw new Error(`'${name}' must be normalized to be resolvable.`);
}

// TODO: technically we could support resolving records for the root node, but because there
// are so many edge cases, this is something we should explicitly declare support for
// after we have test cases
if (name === ENS_ROOT_NAME) {
throw new Error(
`Resolving records for the ENS Root Node ('') is not currently supported.`,
);
}

const node: Node = namehashInterpretedName(name);
span.setAttribute("node", node);

Expand Down
3 changes: 1 addition & 2 deletions apps/ensapi/src/omnigraph-api/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import RelayPlugin from "@pothos/plugin-relay";
import TracingPlugin, { isRootField } from "@pothos/plugin-tracing";
import { AttributeNames, createOpenTelemetryWrapper } from "@pothos/tracing-opentelemetry";
import type {
Address,
ChainId,
CoinType,
DomainId,
Expand Down Expand Up @@ -59,7 +58,7 @@ const createSpan = createOpenTelemetryWrapper(tracer, {
export type BuilderScalars = {
ID: { Input: string; Output: string };
BigInt: { Input: bigint; Output: bigint };
Address: { Input: Address; Output: NormalizedAddress };
Address: { Input: NormalizedAddress; Output: NormalizedAddress };
Hex: { Input: Hex; Output: Hex };
ChainId: { Input: ChainId; Output: ChainId };
CoinType: { Input: CoinType; Output: CoinType };
Expand Down
Loading