๐Ÿ“—IZNSRegistry

The DomainRecord struct is meant to hold relevant information about a domain, such as its owner and resolver.

  • owner (address): The owner of the domain (also called the owner of the Name).

  • resolver (address): The address of the Resolver contract where this domain's source records are stored.

In the future, there will be multiple Resolver contracts that support different types of sources. Currently, only the ZNSAddressResolver is implemented.

DomainRecord

struct DomainRecord {
  address owner;
  address resolver;
}

DomainOwnerSet

event DomainOwnerSet(bytes32 domainHash, address owner)

Emits when ownership of a domain is modified in records

Parameters

DomainResolverSet

event DomainResolverSet(bytes32 domainHash, address resolver)

Emit when a domain's resolver is modified in records

Parameters

DomainRecordDeleted

event DomainRecordDeleted(bytes32 domainHash)

Emits when a domain record is deleted

Parameters

OperatorPermissionSet

event OperatorPermissionSet(address owner, address operator, bool allowed)

Emit when an owner allows/disallows permissions for an operator

Parameters

ResolverAdded

event ResolverAdded(string resolverType, address resolver)

Emitted when a new resolver type is added to ZNS

Parameters

ResolverDeleted

event ResolverDeleted(string resolverType)

Emitted when a resolver is deleted from ZNS

Parameters

initialize

function initialize(address accessController) external

exists

function exists(bytes32 domainHash) external view returns (bool)

isOwnerOrOperator

function isOwnerOrOperator(bytes32 domainHash, address candidate) external view returns (bool)

isOperatorFor

function isOperatorFor(address operator, address owner) external view returns (bool)

setOwnersOperator

function setOwnersOperator(address operator, bool allowed) external

Set an operator as allowed to give or remove permissions for all domains owned by msg.sender

Parameters

getDomainRecord

function getDomainRecord(bytes32 domainHash) external view returns (struct IZNSRegistry.DomainRecord)

getDomainOwner

function getDomainOwner(bytes32 domainHash) external view returns (address)

getDomainResolver

function getDomainResolver(bytes32 domainHash) external view returns (address)

createDomainRecord

function createDomainRecord(bytes32 domainHash, address owner, string resolverType) external

getResolverType

function getResolverType(string resolverType) external returns (address)

addResolverType

function addResolverType(string resolverType, address resolver) external

deleteResolverType

function deleteResolverType(string resolverType) external

updateDomainRecord

function updateDomainRecord(bytes32 domainHash, address owner, string resolverType) external

updateDomainOwner

function updateDomainOwner(bytes32 domainHash, address owner) external

updateDomainResolver

function updateDomainResolver(bytes32 domainHash, string resolverType) external

deleteRecord

function deleteRecord(bytes32 domainHash) external