Skip to main content
Use this guide to integrate Celo Names (subname registration) into your application: availability checks, pricing, registration/renewal, and record reads.
This page focuses on contract-level integration (building transactions with the Celo Names registrars and reading back records).

Deployment addresses

Use the correct Celo mainnet contract addresses when you build calls.

Indexer (GraphQL)

Query names/owners/records after you register or update a name.

Agent Skill

See how to wrap these flows into an agent skill.

wagmi/viem integration

A lighter example if you prefer wagmi patterns.

Overview

Celo Names is an ENS-based naming system that lets users register human-readable subnames under the celo.eth parent domain (e.g., alice.celo.eth). The system includes:
  • L2Registrar: handles registration and renewal with CELO or ERC20 tokens.
  • L2SelfRegistrar: lets self-verified users claim one name, free for the first year.
  • L2Registry: ERC721-based registry that stores names as NFTs with expiration.
  • Indexer: GraphQL API for querying name data.

Contract Addresses (Celo Mainnet)

Required ABIs

L2Registrar ABI (Minimal)

L2SelfRegistrar ABI (Minimal)

L2Registry ABI (Minimal)

ERC20 Permit ABI (Minimal)

Core Integration Functions

1. Check Name Availability

2. Get Registration Price

3. Encode Resolver Data

Resolver data sets the initial records at registration time (text records, address records, contenthash).

4. Register with Native Token (CELO)

5. Register with ERC20 Token (USDC/USDT/cUSD)

ERC20 registration needs a permit signature so the contract can pull tokens on the user’s behalf.

6. Claim with Self Verification (Free)

Claiming with Self is free for the first year, with one name per verified wallet. After that, extending the name costs 1¢ per year.

7. Renew a Name

Calls renew(label, durationInYears) and sends the native CELO rent amount.
Renew before the expiry date. There is no grace period: once a name expires, renew and renewERC20 revert with SubnameDoesNotExist, and anyone can register the label again. To get an expired name back, register it again. Re-registration clears the old records.

Dependencies

These samples assume you’re using viem and the ENS encoding helpers used to build resolver data.
Install the required packages:

Querying Name Data (Indexer)

The Celo Names indexer provides a GraphQL API for querying name data:

Key Constraints

  1. Label length: Minimum 3 characters
  2. Duration: 1 year and above
  3. Payment options:
    • CELO (native token)
    • USDC, USDT, cUSD (ERC20 with permit)
  4. Self claim: free for the first year, one name per verified wallet; extending costs 1¢ per year after that
  5. Renewal: only before expiry. There is no grace period; an expired name can be registered again by anyone

Events to Monitor

Use these event signatures to confirm transaction outcomes and to drive UI updates.

Error Handling

Convert these error keys (or revert messages) into clear UI states, and keep the transaction hash around for debugging.
Common errors to handle:

Self Verification Integration

To integrate Self verification for free name claiming:
  1. Install the Self QR code component (from @selfxyz/qrcode)
  2. Use the scope seed: "celo-names"
  3. After successful verification, call claimWithSelf()
  4. Check verification status via RegistrarStorage.isVerified(user)