{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-web3/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"CNS Smart Contract","description":"The developer documentation portal and API reference for Unstoppable Domains.","siteUrl":"https://docs.unstoppabledomains.com","keywords":"unstoppable domains developer portal, api reference docs","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"cns-smart-contract","__idx":0},"children":["CNS Smart Contract"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Crypto Name Service (CNS) is built on Ethereum and is effectively a bundle of Solidity smart contracts. Their source code is hosted in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto"},"children":["dot-crypto repository"]}," and maintained by the Unstoppable Domains team. This page lists the smart contracts from that repository and gives a brief description of each along with links to the source code and deployment addresses. For high-level details about how CNS works, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/overview/cns-architecture-overview"},"children":["CNS Architecture overview"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This page is divided into sections, grouping contracts by the following categories:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#user-facing-contracts"},"children":["User-facing contracts"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#registry-controllers"},"children":["Registry controllers"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#interfaces"},"children":["Interfaces"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#utility-contracts"},"children":["Utility contracts"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#test-smart-contracts"},"children":["Test smart contracts"]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All contract addresses are available on the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/uns/blob/main/Contracts.md"},"children":["UNS GitHub repository"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"user-facing-contracts","__idx":1},"children":["User-facing contracts"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This section lists all the smart contracts that users can directly interact with."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"registry","__idx":2},"children":["Registry"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Registry"]}," is the central smart contract, which stores all CNS domains. Implementing the ERC-721 non-fungible token standard, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Registry"]}," defines domain ownership rules. It stores owner and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Resolver"]}," addresses. For more details, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/overview/cns-architecture-overview#registry"},"children":["Architecture overview - Registry"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/Registry.sol"},"children":["contracts/Registry.sol"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"resolver","__idx":3},"children":["Resolver"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Resolver"]}," is the smart contract that stores domain records and provides methods for domain resolution. For more details, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/overview/cns-architecture-overview#resolver"},"children":["Architecture overview - Resolver"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/Resolver.sol"},"children":["contracts/Resolver.sol"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"proxyreader","__idx":4},"children":["ProxyReader"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ProxyReader"]}," provides an interface that allows users to fetch information about domains from both ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Registry"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Resolver"]}," smart contracts in one call. For more details, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/overview/cns-architecture-overview#proxyreader"},"children":["Architecture overview - ProxyReader"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/ProxyReader.sol"},"children":["contracts/ProxyReader.sol"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"signaturecontroller","__idx":5},"children":["SignatureController"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SignatureController"]}," allows any account to submit management transactions on behalf of a token owner if an owner provides a signature for that call."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/controllers/SignatureController.sol"},"children":["contracts/controllers/SignatureController.sol"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"domainzonecontroller","__idx":6},"children":["DomainZoneController"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DomainZoneController"]}," allows owners of a domain zone to mint subdomains. These subdomains can be managed only by the domain zone owners. For more details, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/overview/cns-architecture-overview#alternative-ownership-models"},"children":["Architecture Overview - Alternative Ownership Models"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/controllers/DomainZoneController.sol"},"children":["contracts/controllers/DomainZoneController.sol"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"twittervalidationoperator","__idx":7},"children":["TwitterValidationOperator"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TwitterValidationOperator"]}," is used when initiating Chainlink verification requests to link domain records with Twitter usernames."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/operators/TwitterValidationOperator.sol"},"children":["contracts/operators/TwitterValidationOperator.sol"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"registry-controllers","__idx":8},"children":["Registry controllers"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Unstoppable Domains team reserves the right to mint second-level domains and edit some ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Registry"]}," settings, such as token URI prefix. To avoid giving anyone absolute admin rights, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Registry"]}," utilizes controllers that implement a limited set of admin actions."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"mintingcontroller","__idx":9},"children":["MintingController"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The deployed version of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Registry"]}," smart contract only allows ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MintingController"]}," to mint second-level domains."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/controllers/MintingController.sol"},"children":["contracts/controllers/MintingController.sol"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"uriprefixcontroller","__idx":10},"children":["URIPrefixController"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["URIPrefixController"]}," enables the Unstoppable Domains team to edit the token URI prefix."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/controllers/URIPrefixController.sol"},"children":["contracts/controllers/URIPrefixController.sol"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"interfaces","__idx":11},"children":["Interfaces"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following interfaces can be used as guidelines for the minimal implementation of custom smart contract versions. Also, Solidity developers can rely on them for making calls to the official CNS smart contracts."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"iregistry","__idx":12},"children":["IRegistry"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IRegistry"]}," interface declares all the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Registry"]}," events and methods (both read and write)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/IRegistry.sol"},"children":["contracts/IRegistry.sol"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Implemented by:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#registry"},"children":["Registry"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"iregistryreader","__idx":13},"children":["IRegistryReader"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IRegistryReader"]}," interface declares only read-only ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Registry"]}," methods."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/IRegistryReader.sol"},"children":["contracts/IRegistryReader.sol"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Implemented by:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#registry"},"children":["Registry"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#proxyreader"},"children":["ProxyReader"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"iresolver","__idx":14},"children":["IResolver"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IResolver"]}," interface declares the minimal set of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Resolver"]}," methods for configuring domain records."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/IResolver.sol"},"children":["contracts/IResolver.sol"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Implemented by:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#resolver"},"children":["Resolver"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"iresolverreader","__idx":15},"children":["IResolverReader"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IResolverReader"]}," interface declares the set of methods for reading ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Resolver"]}," records."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/IResolverReader.sol"},"children":["contracts/IResolverReader.sol"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Implemented by:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#resolver"},"children":["Resolver"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#proxyreader"},"children":["ProxyReader"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"idatareader","__idx":16},"children":["IDataReader"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IDataReader"]}," interface declares the methods that are unique to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ProxyReader"]}," smart contract, which returns combined data from the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Registry"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Resolver"]}," contracts."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/IDataReader.sol"},"children":["contracts/IDataReader.sol"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Implemented by:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#proxyreader"},"children":["ProxyReader"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"imintingcontroller","__idx":17},"children":["IMintingController"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IMintingController"]}," interface declares a set of methods for minting, which both ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MintingController"]}," implement."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/controllers/IMintingController.sol"},"children":["contracts/controllers/IMintingController.sol"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Implemented by:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#mintingcontroller"},"children":["MintingController"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"isignaturecontroller","__idx":18},"children":["ISignatureController"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ISignatureController"]}," interface declares the functions that are implemented by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SignatureController"]}," to enable Meta transactions for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Registry"]}," smart contract."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/controllers/ISignatureController.sol"},"children":["contracts/controllers/ISignatureController.sol"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Implemented by:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#signaturecontroller"},"children":["SignatureController"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"iuriprefixcontroller","__idx":19},"children":["IURIPrefixController"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IURIPrefixController"]}," interface declares the functions that are implemented by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["URIPrefixController"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/controllers/IURIPrefixController.sol"},"children":["contracts/controllers/IURIPrefixController.sol"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Implemented by:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#uriprefixcontroller"},"children":["URIPrefixController"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"erc677receiver","__idx":20},"children":["ERC677Receiver"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ERC677Receiver"]}," interface declares an ERC-677 method for receiving smart contracts."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/util/ERC677Receiver.sol"},"children":["contracts/util/ERC677Receiver.sol"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Implemented by:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#twittervalidationoperator"},"children":["TwitterValidationOperator.sol"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"utility-contracts","__idx":21},"children":["Utility contracts"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Utility contracts are generally used to share common functionality between other smart contracts. This list also includes some contracts that are used internally by the Unstoppable Domains team."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"controllerrole","__idx":22},"children":["ControllerRole"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ControllerRole"]}," smart contract defines an Open Zeppelin ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://docs.openzeppelin.com/contracts/2.x/access-control#using-roles"},"children":["Role"]},", which is used by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Registry"]}," to designate controllers."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/util/ControllerRole.sol"},"children":["contracts/util/ControllerRole.sol"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Used by:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#registry"},"children":["Registry"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"multisend","__idx":23},"children":["MultiSend"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MultiSend"]}," smart contract is used internally by the Unstoppable Domains team to fund worker accounts."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/util/MultiSend.sol"},"children":["contracts/util/MultiSend.sol"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"signatureutil","__idx":24},"children":["SignatureUtil"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SignatureUtil"]}," is a helper smart contract. Its implementation is used to extend smart contracts that require Meta Transactions."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/util/SignatureUtil.sol"},"children":["contracts/util/SignatureUtil.sol"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Used by:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#resolver"},"children":["Resolver"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#signaturecontroller"},"children":["SignatureController"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"migrations","__idx":25},"children":["Migrations"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://www.trufflesuite.com/docs/truffle/getting-started/running-migrations"},"children":["Truffle migrations"]}," smart contract."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/Migrations.sol"},"children":["contracts/Migrations.sol"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"test-smart-contracts","__idx":26},"children":["Test smart contracts"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There are several smart contracts that are used for testing purposes without being deployed to public networks or imported by other smart contracts."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"linktokenmock","__idx":27},"children":["LinkTokenMock"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LinkTokenMock"]}," smart contract is used for testing ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/web3/smart-contracts/contract-reference/cns-smart-contracts#twittervalidationoperator"},"children":["TwitterValidationOperator"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/test-helpers/LinkTokenMock.sol"},"children":["contracts/test-helpers/LinkTokenMock.sol"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"relaytest","__idx":28},"children":["RelayTest"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RelayTest"]}," is used for testing relaying functionality for Meta Transactions."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/test-helpers/RelayTest.sol"},"children":["contracts/test-helpers/RelayTest.sol"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"simple","__idx":29},"children":["Simple"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Simple"]}," smart contract is used for testing ERC-721 receiver validation checks."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source code:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/unstoppabledomains/dot-crypto/blob/master/contracts/test-helpers/Simple.sol"},"children":["contracts/test-helpers/Simple.sol"]}]}]},"headings":[{"value":"CNS Smart Contract","id":"cns-smart-contract","depth":1},{"value":"User-facing contracts","id":"user-facing-contracts","depth":2},{"value":"Registry","id":"registry","depth":3},{"value":"Resolver","id":"resolver","depth":3},{"value":"ProxyReader","id":"proxyreader","depth":3},{"value":"SignatureController","id":"signaturecontroller","depth":3},{"value":"DomainZoneController","id":"domainzonecontroller","depth":3},{"value":"TwitterValidationOperator","id":"twittervalidationoperator","depth":3},{"value":"Registry controllers","id":"registry-controllers","depth":2},{"value":"MintingController","id":"mintingcontroller","depth":3},{"value":"URIPrefixController","id":"uriprefixcontroller","depth":3},{"value":"Interfaces","id":"interfaces","depth":2},{"value":"IRegistry","id":"iregistry","depth":3},{"value":"IRegistryReader","id":"iregistryreader","depth":3},{"value":"IResolver","id":"iresolver","depth":3},{"value":"IResolverReader","id":"iresolverreader","depth":3},{"value":"IDataReader","id":"idatareader","depth":3},{"value":"IMintingController","id":"imintingcontroller","depth":3},{"value":"ISignatureController","id":"isignaturecontroller","depth":3},{"value":"IURIPrefixController","id":"iuriprefixcontroller","depth":3},{"value":"ERC677Receiver","id":"erc677receiver","depth":3},{"value":"Utility contracts","id":"utility-contracts","depth":2},{"value":"ControllerRole","id":"controllerrole","depth":3},{"value":"MultiSend","id":"multisend","depth":3},{"value":"SignatureUtil","id":"signatureutil","depth":3},{"value":"Migrations","id":"migrations","depth":3},{"value":"Test smart contracts","id":"test-smart-contracts","depth":2},{"value":"LinkTokenMock","id":"linktokenmock","depth":3},{"value":"RelayTest","id":"relaytest","depth":3},{"value":"Simple","id":"simple","depth":3}],"frontmatter":{"title":"CNS Smart Contract | Unstoppable Domains Developer Portal","description":"This page provides brief descriptions with links to source code and deployment addresses for the Crypto Name Service smart contracts.","editPage":{"disable":true},"redirects":{"/developer-toolkit/reference/smart-contracts/cns-smart-contracts/":{}},"seo":{"title":"CNS Smart Contract"}},"editPage":{"to":"https://github.com/unstoppabledomains/dev-docs/blob/main/web3/smart-contracts/contract-reference/cns-smart-contracts.md"},"lastModified":"2026-04-10T16:45:57.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/web3/smart-contracts/contract-reference/cns-smart-contracts","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}