Contract Architecture
The registry is a simple smart contract that holds a mapping from the namehash of a domain to a record of:- The owner address
- The resolver address
- The TTL (Time-to-Live)
Supported TLDs
The Namoshi Registry (ENSRegistry.sol) explicitly manages the root nodes for:
- .btc (
0xf702f1b03281458158bc938ae02bb9e415467e8a03af28a2c5e55b6a55192b77) - .citrea (
0x45e2eb5062b833c50fa834c0e45b3051fe61426b0a0a4d9e6b19239b600a033d)
0x0).
Key Functions
Setting an Owner
To change the owner of a node, the current owner callssetOwner.
Setting a Subnode Owner
To create a subdomain or transfer ownership of an existing one, the owner of the parent node callssetSubnodeOwner. This is the primary mechanism for registrars to issue new names.
Setting a Resolver
To set the resolver for a node, the owner callssetResolver.
Setting the TTL
To set the TTL for caching purposes, the owner callssetTTL.
Events
The registry emits the following events, which indexers and subgraphs use to track the state of the system:Transfer(bytes32 indexed node, address owner)NewOwner(bytes32 indexed node, bytes32 indexed label, address owner)NewResolver(bytes32 indexed node, address resolver)NewTTL(bytes32 indexed node, uint64 ttl)