Subdomain Management
Overview
You can deploy BaseRegistrar for any node, not just TLDs. This allows for managed subdomain registration.
Creating a Subdomain Registrar
Calculate Subdomain Node
const node = namehash("service.dot");
Deploy Registrar
const subRegistrar = await BaseRegistrar.deploy(
PNS_REGISTRY_ADDRESS,
node
);
Transfer Ownership
// Current owner must approve
await pnsRegistry.setSubnodeOwner(
node,
namehash("service"),
subRegistrar.address
);
Last updated