Documentation
Complete technical documentation for integrating with Base Names Service.
Verified Smart ContractsBase Mainnet
All contracts are verified on Basescan and open source
Getting Started
What are Base Names?
Learn about decentralized domain names on Base L2
Base Names provide human-readable addresses for the Base blockchain. Instead of using complex addresses like 0x742d..., users can register domains like 'alice.base' for easier transactions and identity.
System Requirements
What you need to use Base Names
• Web3 wallet (MetaMask, Coinbase Wallet, etc.) • ETH on Base network for gas fees • ETH for domain registration costs • Base network configured in your wallet (Chain ID: 8453)
Smart Contracts
Contract Addresses
Official verified contracts on Base Mainnet
BaseController: 0xca7FD90f4C76FbCdbdBB3427804374b16058F55e BaseRegistrar: 0xD158de26c787ABD1E0f2955C442fea9d4DC0a917 ENSRegistry: 0x5f0C3a1d7B285262cce8D8716bf9718feA6D0f9E PublicResolver: 0x[address_here]
Registration Flow
How domain registration works on-chain
1. Check domain availability via BaseRegistrar.available() 2. Get pricing via BaseController.rentPrice() 3. Call BaseController.register() with payment 4. Domain NFT minted to your address 5. Resolver records can be set immediately
Integration Guide
Web3 Integration
Integrate Base Names into your application
// Example: Check domain availability const isAvailable = await baseRegistrar.available(labelHash('mydomain')); // Example: Resolve domain to address const address = await publicResolver.resolve('mydomain.base'); // Example: Get domain owner const owner = await baseRegistrar.ownerOf(tokenId);
Pricing Structure
Current domain pricing on Base Names
• 4+ characters: 0.01 ETH per year • 3 characters: 0.05 ETH per year • 1-2 characters: 0.1 ETH per year • Premium domains: Variable pricing • Gas fees: ~$1-3 depending on network congestion
Security
Best Practices
Keep your domains and wallet secure
• Always verify contract addresses before interacting • Use hardware wallets for valuable domains • Enable 2FA on your wallet if available • Never share your private keys or seed phrase • Verify transactions before signing
Contract Security
Our security measures and audits
• All contracts are verified on Basescan • Built on proven ENS architecture • Open source and auditable • Large TVL indicates community trust • Base/Coinbase backing provides additional assurance
Code Examples
Check Domain Availabilityjavascript
import { createPublicClient, http } from 'viem';
import { base } from 'viem/chains';
const client = createPublicClient({
chain: base,
transport: http()
});
const isAvailable = await client.readContract({
address: '0xD158de26c787ABD1E0f2955C442fea9d4DC0a917',
abi: registrarAbi,
functionName: 'available',
args: [labelHash('mydomain')]
});
Register Domainjavascript
const { request } = await client.simulateContract({
address: '0xca7FD90f4C76FbCdbdBB3427804374b16058F55e',
abi: controllerAbi,
functionName: 'register',
args: [
'mydomain', // name
'0x...', // owner
BigInt(365 * 24 * 60 * 60), // duration (1 year)
'0x0000...', // secret
'0x...', // resolver
[], // data
true, // reverseRecord
0 // ownerControlledFuses
],
value: parseEther('0.01') // payment
});
await walletClient.writeContract(request);
Additional Resources
External links and tools for Base Names development