Use UNS Repository
Crypto Registry Naming Service (CNS) is a naming service implemented using Ethereum Smart Contract Platform.
Each name inside CNS has a format of a domain name in .crypto
top level domain space. Like example.crypto
.
CNS's goal is to be an alternative to classical domain names system (DNS) by fixing its core downsides:
- Censorship Resistance
- Ensure permanent ownership of the domain by the owner
- Decentralized registration
- Decentralized access
CNS documentation is available at docs.unstoppabledomains.com.
If you're interested in contributing or compiling/testing the smart contracts, see our development guide.
Available domain resolution libraries to retrieve crypto registry data:
These libraries are only set to read data from crypto registry making them lightweight and fit for most application that do not require domain management compatibilities.
- Solc compiler
brew install https://raw.githubusercontent.com/ethereum/homebrew-ethereum/4d13060698e7f0cdac9ec24627b6485122b8f1b6/solidity.rb
Common rules for smart contract development.
It is useful to use Version
of smart contracts, it helps analyzing deployed contract. Besides versions it is useful to receive Name
of smart contract, when the contract is not verified.
string public constant NAME = 'Unstoppable Whitelisted Minter';
string public constant VERSION = '0.1.0';
We agreed to use three-part version number. Semantic - {major}.{minor}.{patch}
Each smart contract update should lead version change.
As a good practice reverting transaction must be with a message. We agreed to use error codes with <contract_name>: <error_code>
naming convention.
contract_name
allows to understand place where the error were thrown (eg Reslover
)
error_code
should be in uppercase with underscores. It have next structure: {noun}_{verb}
(eg RECEIVER_IS_EMPTY
)
Example of reverting code:
require(receiver != address(0x0), "WhitelistedMinter: RECEIVER_IS_EMPTY");