Developer Guide
Registry

Registry

The registry serves as the central contract pivotal to name resolution processes. Every lookup initiates by consulting the registry, which holds a catalog of domains along with their respective owners, resolvers, and TTLs. It grants domain owners the capability to modify this information.

The registry's specifications are outlined in EIP 137 (opens in a new tab).

The Top-Level Domain (TLD) .vet is managed by smart contracts known as registrars. These registrars define the rules for allocating their respective names. By adhering to the rules set forth by these registrar contracts, anyone can acquire ownership of a domain for personal use.

TLDRegistrar Contract
[root]The Registry
.vetVET Registry
.addr.reverseReverse Registrar

The Registry (opens in a new tab) belongs to the Root (opens in a new tab), which in turn is owned by the vet.domains wallet (opens in a new tab). You can check this by using the owner function on both the registry and root contracts.

Interface

pragma solidity >=0.8.4;
 
interface ENS {
    // Logged when the owner of a node assigns a new owner to a subnode.
    event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);
 
    // Logged when the owner of a node transfers ownership to a new account.
    event Transfer(bytes32 indexed node, address owner);
 
    // Logged when the resolver for a node changes.
    event NewResolver(bytes32 indexed node, address resolver);
 
    // Logged when the TTL of a node changes
    event NewTTL(bytes32 indexed node, uint64 ttl);
 
    // Logged when an operator is added or removed.
    event ApprovalForAll(
        address indexed owner,
        address indexed operator,
        bool approved
    );
 
    function setRecord(
        bytes32 node,
        address owner,
        address resolver,
        uint64 ttl
    ) external;
 
    function setSubnodeRecord(
        bytes32 node,
        bytes32 label,
        address owner,
        address resolver,
        uint64 ttl
    ) external;
 
    function setSubnodeOwner(
        bytes32 node,
        bytes32 label,
        address owner
    ) external returns (bytes32);
 
    function setResolver(bytes32 node, address resolver) external;
 
    function setOwner(bytes32 node, address owner) external;
 
    function setTTL(bytes32 node, uint64 ttl) external;
 
    function setApprovalForAll(address operator, bool approved) external;
 
    function owner(bytes32 node) external view returns (address);
 
    function resolver(bytes32 node) external view returns (address);
 
    function ttl(bytes32 node) external view returns (uint64);
 
    function recordExists(bytes32 node) external view returns (bool);
 
    function isApprovedForAll(
        address owner,
        address operator
    ) external view returns (bool);
}