ens

Implements ENS name resolution, registration, and record management on Ethereum using viem.

1|1|Updated May 21, 2026
One-click install
npx skills add https://github.com/naruto11eth/cryptoskills --skill ens-naruto11eth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ens
Source: https://github.com/naruto11eth/cryptoskills/tree/main/skills/ens
Command: npx skills add https://github.com/naruto11eth/cryptoskills --skill ens-naruto11eth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires viem.

What problem does it solve? AI agents and developers frequently get ENS integration wrong: passing raw strings instead of namehashes, confusing the registry with resolvers and registrars, skipping the 60-second commit-reveal wait during registration, assuming every address has a reverse record, and using outdated or hallucinated contract addresses. This Skill provides verified contract addresses, correct commit-reveal registration flows, and production-ready viem patterns for every common ENS operation. ## Core Features & Use Cases - Name Resolution: Forward resolution (name to address), reverse resolution (address to primary name), avatar retrieval, text records, content hashes, and multi-chain addresses via SLIP-44 coin types, all using viem's built-in ENS actions. - Registration & Renewal: Complete commit-reveal registration flow with availability checks, price quoting with buffers, renewal, and atomic record-setting at registration time. - Subdomains & Offchain Resolution: Onchain subdomain creation via the registry, Name Wrapper subdomains with fuse permissions, and CCIP-Read (ERC-3668) offchain resolver patterns like cb.id and uni.eth. - Use Case: Build a wallet feature that displays a user's primary ENS name and avatar, lets them register a new .eth name with records set atomically, and issues gasless offchain subdomains to their community. ## Quick Start Ask the agent to resolve vitalik.eth to an address and fetch its avatar and text records using viem on Ethereum mainnet.

Frequently Asked Questions about ens

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I resolve an ENS name to an address with viem?

Use client.getEnsAddress({ name }) on a viem public client connected to Ethereum mainnet. It returns the address or null if no record is set, and handles namehash normalization and CCIP-Read automatically.

How does ENS name registration work with commit-reveal?

Registration requires two transactions: first call commit() with a commitment hash from makeCommitment(), wait at least 60 seconds, then call register() with the same parameters and payment. Waiting over 24 hours expires the commitment.

Why does getEnsName return null for an address that owns an ENS name?

Reverse resolution is opt-in. The address owner must explicitly call setName() on the Reverse Registrar contract to set a primary name. Owning a name does not automatically create a reverse record.

Can ENS store addresses for Bitcoin, Solana, or other chains?

Yes, ENS resolvers support multi-chain addresses via SLIP-44 coin types (EIP-2304). Pass the coinType parameter to getEnsAddress, for example 0 for Bitcoin or 501 for Solana. EVM chains use 0x80000000 OR chainId per ENSIP-11.

What is CCIP-Read and how do offchain ENS subdomains work?

CCIP-Read (ERC-3668) lets resolvers revert with an OffchainLookup error directing clients to a gateway that returns signed data verified onchain. This powers gasless subdomains like cb.id, and viem handles the flow transparently.

Why did my ENS registration transaction revert with CommitmentTooNew?

CommitmentTooNew means register() was called less than 60 seconds after commit(). Wait at least 60 seconds (65 is safer) between the two transactions, and keep the same secret across makeCommitment, commit, and register.