Entities that can control domains are defined by the ERC-721 standard:
Owner. This is a direct owner of a domain, which has full control in managing domain ownership and records.
Operator. Operators can control all domains owned by a user. There can be multiple operators per user.
Approved address. A domain owner can set an approved address that can control one particular domain. ERC-721 allows only one approved address per token (i.e.: domain).
There are five basic operations that affect domain ownership:
Minting. When a domain is first created, an initial domain owner is assigned.
Transferring. There are two possible ways to transfer a domain: one that keeps resolution settings, and one that resets them.
Setting an operator. Operators are other Ethereum addresses, which can control all domains owned by a caller.
Setting an approved address. Crypto Name Service (CNS) allows setting one approved address per domain, which has equal privileges with a domain owner.
Burning. Burns a domain, clearing all associated metadata and
This article covers all the
Registry methods that can be used for managing domain ownership.
Minting domains is a complex topic and won't be covered on this page.
Methods that change a direct owner of a domain can be called by either a domain owner, an operator, or an approved address.
Registry smart contract supports the following ERC-721 functions for transferring:
transferFrom(address from, address to, uint256 tokenId)safeTransferFrom(address from, address to, uint256 tokenId)safeTransferFrom(address from, address to, uint256 tokenId, bytes _data)
If one of these methods is called, both an approved operator and a Resolution address for a domain be reset.
Registry smart contract also implements the
setOwner function, which is not a part of the ERC-721 standard:
setOwner(address to, uint256 tokenId)
setOwner keeps a
Resolver address and resets an approved operator. This method makes it possible to preconfigure a domain with certain records and transfer it to another owner, keeping all resolution settings.
Any Ethereum address can set multiple operators, allowing them to manage domains that a caller owns directly. This is an operation defined by ERC-721:
setApprovalForAll(address to, bool approved)
An approved address can be set by either a domain owner or an operator. This method is defined by ERC-721 as well:
approve(address to, uint256 tokenId)
Approved addresses have equal rights as domain owners and operators, being able to both transfer ownership and manage resolution.
Registry smart contract supports "burning" operations. After burning, a domain becomes available for minting again.