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: 0x0BDbd26f79a6Ef1339a95aDe6180a823dD0152a8 BaseRegistrar: 0x53F9f3352ea2587734aCA72A5489eB8E7b5444Ca ENSRegistry: 0x5f0C3a1d7B285262cce8D8716bf9718feA6D0f9E PublicResolver: 0x5D5bC53bDa5105561371FEf50B50E03aA94c962E Marketplace: 0x96F308aC9AAf5416733dFc92188320D24409D4D1
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: '0x53F9f3352ea2587734aCA72A5489eB8E7b5444Ca',
abi: registrarAbi,
functionName: 'available',
args: [labelHash('mydomain')]
});Register Domainjavascript
const { request } = await client.simulateContract({
address: '0x0BDbd26f79a6Ef1339a95aDe6180a823dD0152a8',
abi: controllerAbi,
functionName: 'register',
args: [
'mydomain', // name
'0x...', // owner
BigInt(365 * 24 * 60 * 60), // duration (1 year)
'0x0000...', // secret
'0x5D5bC53bDa5105561371FEf50B50E03aA94c962E', // resolver
[], // data
false, // reverseRecord
'0x0000...', // referrer
0 // fuses
],
value: parseEther('0.05') // payment (0.05 ETH for standard domains)
});
await walletClient.writeContract(request);Additional Resources
External links and tools for Base Names development