Custom Top-Level Domain (TLD) Registration
Overview
You can create your own TLD (e.g., .custom) or sublevel domains by deploying a BaseRegistrar contract and configuring it with the PNS Registry.
Step-by-Step Process
Calculate Node Hash
const labelHash = keccak256('custom');
const rootNode = '0x0000000000000000000000000000000000000000000000000000000000000000';
const nodeHash = keccak256(rootNode + labelHash);Deploy BaseRegistrar
// Deploy new registrar for your TLD
const baseRegistrar = await BaseRegistrar.deploy(
PNS_REGISTRY_ADDRESS,
nodeHash
);Set Registrar as Owner
// Through PNS Registry
await pnsRegistry.setSubnodeOwner(
rootNode,
labelHash,
baseRegistrar.address
);Configure Registrar
Example Configuration
Last updated