ERCs

ERC-137 — Ethereum Name Service (registry)

eips.ethereum.org/EIPS/eip-137

The base ENS registry. Maps node hashes (the namehash of a domain) to owners and resolvers. The registry is the root of the resolution tree; per-name resolvers handle the actual record lookups.

import { resolver, owner, namehash } from "@ethernauta/erc/137";

const node = namehash("vitalik.eth");

const resolver_address = await resolver({ node })(
  contract({
    chain_id: eip155_1.chain_id,
    contract: ens_registry_address,
  }),
);

Core methods

MethodShapePurpose
owner({ node })Callable<Address>Owner of a name.
resolver({ node })Callable<Address>Resolver contract for a name.
ttl({ node })Callable<Uint64>Cache TTL.
set_resolver({ node, resolver })Signable<Hash32>Change resolver.
set_owner({ node, owner })Signable<Hash32>Transfer ownership.
set_subnode_owner({ node, label, owner })Signable<Hash32>Subdomain ownership.

Utilities

ExportPurpose
namehashCompute the canonical 32-byte node hash for a domain.
normalizeENSIP-15 normalization (re-exported from @ethernauta/ens).
registryRegistry-address resolution per chain.

Resolver extension

The resolver extension subpath (@ethernauta/erc/137/resolver) carries the standard resolver interface methods (addr, text, contenthash, …). These methods are called against the resolver contract found via ERC-137.resolver(node), not the registry itself.

In practice you don’t call ENS contracts directly — use @ethernauta/ens for the multi-call orchestration:

import { get_ens_address } from "@ethernauta/ens";

const address = await get_ens_address({ name: "vitalik.eth" })(
  reader({ chain_id: eip155_1.chain_id }),
);

See also