Developer Hub
Protocol

Protocol

The AZERO.ID Protocol comprises multiple ink! smart contracts, each with different responsibilities.

ContractRust ModuleDescription
Routerazns_routerTop-level router for registry & domain resolving
Registryazns_registryMain domain registry
Name Checkerazns_name_checkerDomain charset & length validator
Fee Calculatorazns_fee_calculatorDomain fee determination
Merkle Verifierazns_merkle_verifierMerkle tree whitelist verifier

All smart contract deployment addresses and metadata can be found here.

Overview

Router

The Router contract acts as a central hub for managing and routing requests within the AZERO.ID system. It maintains the mapping relationship between top-level domain (TLD) and their corresponding registration contract addresses.

Additionally, it acts as a universal domain and address resolver that forwards queries to their respective Registry contracts depending on the TLD.

Registry

The Registry contract serves as a decentralized domain registration system, where each registry represents a distinct top-level domain (TLD), which can have alias TLDs associated with it.

This contract offers various essential functionalities, including:

  • Registry: Registry a specific domain.
  • Transfer: Transfer the ownership to another address.
  • Release: Release a domain from registration.
  • Set primary domain: Set the primary Domains of an address.
  • Set resolver: Set the resolving address of a domain.
  • Set controller: Set the controller address of a domain.
  • Update records: Controllers and Owners can update the records.
  • Check domain status: Get the current status of a domain.

In addition to that, the Registry contract also implements the PSP34 (opens in a new tab) standard, as well as the PSP34Metadata and PSP34Enumerable extensions.

Name Checker

The Name Checker contract validates domain names at registration, cross-checking them with accepted charsets and validity rules. Its configuration, including allowed Unicode and length boundaries, can be updated by the controlling multisig.

Fee Calculator

The Fee Calculator contract is responsible to determine the fee upon domain registration, which depends on the domain character length and registration period. Additionally, the fee can be deducted by the Registry contract if a valid domain is passed as a referrer.

Merkle Verifier

The Merkle Verifier contract is a custom Merkle tree implementation that was used to efficiently store all 40k+ whitelisted addresses taken from our initial testnet participation. As our whitelist phase is over, the Merkle Verifier contract will no longer be used.