๐ŸŒณIZNSRootRegistrar

CoreRegisterArgs

struct CoreRegisterArgs {
  bytes32 parentHash;
  bytes32 domainHash;
  address registrant;
  address domainAddress;
  uint256 price;
  uint256 stakeFee;
  string label;
  string tokenURI;
  bool isStakePayment;
  struct PaymentConfig paymentConfig;
}

IZNSRootRegistrar

IZNSRootRegistrar.sol - Interface for the ZNSRootRegistrar contract resposible for registering root domains.

Below are docs for the types in this file:

  • OwnerOf: Enum signifying ownership of ZNS entities

    • NAME: The owner of the Name only

    • TOKEN: The owner of the Token only

    • BOTH: The owner of both the Name and the Token

  • CoreRegisterArgs: Struct containing all the arguments required to register a domain with ZNSRootRegistrar.coreRegister():

    • parentHash: The hash of the parent domain (0x0 for root domains)

    • domainHash: The hash of the domain to be registered

    • label: The label of the domain to be registered

    • registrant: The address of the user who is registering the domain

    • price: The determined price for the domain to be registered based on parent rules

    • stakeFee: The determined stake fee for the domain to be registered (only for PaymentType.STAKE!)

    • domainAddress: The address to which the domain will be resolved to

    • tokenURI: The tokenURI for the domain to be registered

    • isStakePayment: A flag for whether the payment is a stake payment or not

OwnerOf

enum OwnerOf {
  NAME,
  TOKEN,
  BOTH
}

DomainRegistered

event DomainRegistered(bytes32 parentHash, bytes32 domainHash, uint256 tokenId, string label, address registrant, address domainAddress)

Emitted when a NEW domain is registered.

domainAddress parameter is the address to which a domain name will relate to in ZNS. E.g. if a user made a domain for his wallet, the address of the wallet will be the domainAddress. This can be 0 as this variable is not required to perform registration process and can be set at a later time by the domain owner.

Parameters

DomainRevoked

event DomainRevoked(bytes32 domainHash, address owner, bool stakeRefunded)

Emitted when a domain is revoked.

Parameters

DomainReclaimed

event DomainReclaimed(bytes32 domainHash, address registrant)

Emitted when an ownership of the Name is reclaimed by the Token owner.

Parameters

RootPricerSet

event RootPricerSet(address rootPricer)

Emitted when the rootPricer address is set in state.

Parameters

TreasurySet

event TreasurySet(address treasury)

Emitted when the treasury address is set in state.

Parameters

DomainTokenSet

event DomainTokenSet(address domainToken)

Emitted when the domainToken address is set in state.

Parameters

SubRegistrarSet

event SubRegistrarSet(address subRegistrar)

Emitted when the subRegistrar address is set in state.

Parameters

initialize

function initialize(address accessController_, address registry_, address rootPricer_, address treasury_, address domainToken_) external

registerRootDomain

function registerRootDomain(string name, address domainAddress, string tokenURI, struct IDistributionConfig.DistributionConfig distributionConfig, struct PaymentConfig paymentConfig) external returns (bytes32)

coreRegister

function coreRegister(struct CoreRegisterArgs args) external

revokeDomain

function revokeDomain(bytes32 domainHash) external

reclaimDomain

function reclaimDomain(bytes32 domainHash) external

isOwnerOf

function isOwnerOf(bytes32 domainHash, address candidate, enum IZNSRootRegistrar.OwnerOf ownerOf) external view returns (bool)

setRegistry

function setRegistry(address registry_) external

setRootPricer

function setRootPricer(address rootPricer_) external

setTreasury

function setTreasury(address treasury_) external

setDomainToken

function setDomainToken(address domainToken_) external

setSubRegistrar

function setSubRegistrar(address subRegistrar_) external