The specific Resolver for ZNS that maps domain hashes to strings.
This Resolver supports ONLY the string type.
mapping(bytes32 => string) resolvedStringsMapping of domain hash to string used to bind domains to any kinds of text.
constructor() publicfunction initialize(address accessController_, address registry_) externalInitializer for the ZNSStringResolver proxy.
Note that setter functions are used instead of direct state variable assignments
to use access control at deploy time. Only ADMIN can call this function.
| Name | Type | Description |
|---|---|---|
| accessController_ | address | The address of the ZNSAccessController contract |
| registry_ | address | The address of the ZNSRegistry contract |
function resolveDomainString(bytes32 domainHash) external view returns (string)Returns string associated with a given domain name hash.
| Name | Type | Description |
|---|---|---|
| domainHash | bytes32 | The identifying hash of a domain's name |
function setString(bytes32 domainHash, string newString) externalSets the string for a domain name hash.
| Name | Type | Description |
|---|---|---|
| domainHash | bytes32 | The identifying hash of a domain's name |
| newString | string | The new string to map the domain to |
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool)ERC-165 check for implementation identifier
Supports interfaces IZNSStringResolver and IERC165
| Name | Type | Description |
|---|---|---|
| interfaceId | bytes4 | ID to check, XOR of the first 4 bytes of each function signature |
function getInterfaceId() public pure returns (bytes4)Exposes IZNSStringResolver interfaceId
function setRegistry(address _registry) publicSets the address of the ZNSRegistry contract that holds all crucial data
for every domain in the system. This function can only be called by the ADMIN.
| Name | Type | Description |
|---|---|---|
| _registry | address | The address of the ZNSRegistry contract |
function _authorizeUpgrade(address) internal viewTo use UUPS proxy we override this function and revert if msg.sender isn't authorized