Use this guide to integrate Celo Names (subname registration) into your application: availability checks, pricing, registration/renewal, and record reads.Documentation Index
Fetch the complete documentation index at: https://celonames.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
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 thecelo.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 free name.
- 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)
6. Claim with Self Verification (Free)
Self-verified users can claim one free name:7. Renew a Name
- Renew with CELO
- Renew with ERC20
Calls
renew(label, durationInYears) and sends the native CELO rent amount.Dependencies
These samples assume you’re using
viem and the ENS encoding helpers used to build resolver data.Querying Name Data (Indexer)
The Celo Names indexer provides a GraphQL API for querying name data:Key Constraints
- Label length: Minimum 3 characters
- Duration: 1 year and above
- Payment options:
- CELO (native token)
- USDC, USDT, cUSD (ERC20 with permit)
- Self claim: one free name per verified user; expires after 1 year
- Renewal: can be done before or after expiration (grace period considerations)
Events to Monitor
Use these event signatures to confirm transaction outcomes and to drive UI updates.
Event signatures
Event signatures
Error Handling
Common errors to handle:Contract error keys
Contract error keys
Self Verification Integration
To integrate Self verification for free name claiming:- Install the Self QR code component (from
@selfxyz/qrcode) - Use the scope seed:
"celo-names" - After successful verification, call
claimWithSelf() - Check verification status via
RegistrarStorage.isVerified(user)