Skip to content

fix: ZDC integration of upgrade functionality #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 101 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
12a98c3
add protocolFee on unstake flow
JamesEarle Jan 10, 2024
b7a3a6e
add diagrams
JamesEarle Jan 11, 2024
2aeb733
submit first update for architecture.md
Whytecrowe Jan 11, 2024
83238b3
update the main Readme
Whytecrowe Jan 11, 2024
85ffa62
updated docs and diagrams
JamesEarle Jan 16, 2024
aaf8e8b
link local zDC package to start integration
Whytecrowe Jan 16, 2024
58f23b8
remove all isolated code for Campaign
Whytecrowe Jan 18, 2024
13fc3ef
move general types away from campaign
Whytecrowe Jan 18, 2024
0ae02a9
adapt code for missions by changing the imports to a new module and a…
Whytecrowe Jan 18, 2024
c688d70
fix types and imports in utilities and test files
Whytecrowe Jan 18, 2024
d61e827
rework zns campaign launcher functions to work with the code imported…
Whytecrowe Jan 18, 2024
f1c7644
fix root registrar test and try running locally with the new integration
Whytecrowe Jan 18, 2024
83f1d58
fix typing related to contract state and adapt missions to the new ch…
Whytecrowe Jan 19, 2024
88a4111
updates after review
JamesEarle Jan 22, 2024
da17436
remove space for lint
JamesEarle Jan 22, 2024
e89fd09
update architecture diagram
JamesEarle Jan 23, 2024
4942db6
switch back to alias bigint type
Whytecrowe Jan 24, 2024
1f529a9
adapt config types to zDC
Whytecrowe Jan 24, 2024
ed8d607
adapt signers in CampaignConfig type to new Base Map type in zDC, add…
Whytecrowe Jan 24, 2024
413ef69
add outDir to tsconfig to send files to the proper place if compiled
Whytecrowe Jan 24, 2024
dcd3be8
add dist folder to gitignore
Whytecrowe Jan 25, 2024
438030f
fix types and compiler errors
Whytecrowe Jan 25, 2024
6785ff3
remove linking and install the newly published zDC
Whytecrowe Jan 25, 2024
402899c
add zNS specific wrapper for mongo adapter and fix usage, isolate one…
Whytecrowe Jan 26, 2024
612721a
move dotenv.config() before imports so that imported packages can rea…
Whytecrowe Jan 26, 2024
9afe8d3
fix last failing tests
Whytecrowe Jan 26, 2024
f3f437c
install the newest zdc release and regenerate yarn.lock
Whytecrowe Jan 26, 2024
dc90e07
small opti
Whytecrowe Jan 29, 2024
53df710
feat: Add a `protocolFee` to the unstake action (#96)
Whytecrowe Jan 29, 2024
671174e
Merge branch 'development' into zdc-isolation
Whytecrowe Jan 29, 2024
14d3e1c
update yarn.lock
Whytecrowe Jan 29, 2024
d5eb5a1
feat: zDC Integration (#98)
Whytecrowe Jan 29, 2024
a529549
Merge branch 'development' into docs/diagrams
Whytecrowe Jan 31, 2024
3380218
fix test name
Whytecrowe Jan 31, 2024
8f67434
fix: Update Documentation (#97)
Whytecrowe Jan 31, 2024
1f08088
Update README.md
Whytecrowe Feb 3, 2024
2b95f36
Update README.md
Whytecrowe Feb 3, 2024
b21ea74
rename getconflict helper
Whytecrowe Feb 8, 2024
ca27cf8
switch contract missions to inherit BaseUpgradeMission
Whytecrowe Feb 9, 2024
cfc5c2a
add UPGRADE env var check to the ENV validator
Whytecrowe Feb 9, 2024
b95c106
adapt to the new type changes from zDC
Whytecrowe Feb 13, 2024
1f88cd0
remove compilation errors
Whytecrowe Feb 15, 2024
f269514
extend types for registration helpers
Whytecrowe Feb 15, 2024
56fa4f6
update DMs to inherit from the new Upgrade one
Whytecrowe Feb 20, 2024
3be7351
make env vars setting utils
Whytecrowe Feb 20, 2024
09360c8
make smoke test to run with zDC to find what's missing
Whytecrowe Feb 20, 2024
1343fcd
install zDC from local package and update upgrades
Whytecrowe Feb 20, 2024
7bcca17
fix linter errors
Whytecrowe Feb 26, 2024
5dd6a86
Fix linter errors (#104)
Whytecrowe Feb 26, 2024
bd583d5
update solidity version in all contracts
Whytecrowe Jun 21, 2024
e7cad5f
update all the possible packages, including zToken
Whytecrowe Jun 26, 2024
7e127b4
rework meow token deploy logic to use imported artifacts and it's moc…
Whytecrowe Jun 26, 2024
0658ca8
fix inheritance issues in DomainToken
Whytecrowe Jun 26, 2024
8b9a029
fix hardhat config to use proper solc versions
Whytecrowe Jun 26, 2024
7eb8f1a
fix all tests based on the new changes to revert errors and other things
Whytecrowe Jun 26, 2024
40963a7
try newer node image for CI
Whytecrowe Jun 27, 2024
17b764f
try adding more memory to hardhat coverage
Whytecrowe Jun 27, 2024
95bbb0e
try a different way
Whytecrowe Jun 27, 2024
e4f626e
try exporting old space size for Node before running coverage
Whytecrowe Jun 27, 2024
6561363
remove redundant imports
Whytecrowe Jun 27, 2024
70a983c
convert requires to custom errors for Access and Pricers
Whytecrowe Jun 27, 2024
f91e990
make errors for Registry and Registrars
Whytecrowe Jun 27, 2024
b65b7f5
add errors for AddressResolver and Treasury
Whytecrowe Jun 27, 2024
aa73a8b
try rolling back solcover version
Whytecrowe Jun 28, 2024
03f6d7c
update yarn.lock
Whytecrowe Jun 28, 2024
11ea094
fix contract errors to compile
Whytecrowe Jun 28, 2024
c3c9312
fix errors in if statements, add string utils
Whytecrowe Jun 29, 2024
e9dd200
fix error in StringUtils
Whytecrowe Jun 29, 2024
63fd27a
fix error constants in TS
Whytecrowe Jun 29, 2024
de901cf
first pass on reworking test error checks
Whytecrowe Jun 29, 2024
92993cc
second pass on the tests
Whytecrowe Jun 29, 2024
747beb2
try running CI without enlarging the heap
Whytecrowe Jun 29, 2024
0118102
small fixes
Whytecrowe Jun 29, 2024
6d20a06
add missing param to error
Whytecrowe Jun 29, 2024
0506426
Revert "try running CI without enlarging the heap"
Whytecrowe Jun 29, 2024
2aa9f00
try increasing heap to 8gb
Whytecrowe Jul 1, 2024
d1cc7ef
try measureStatementCoverage flag to false for coverage
Whytecrowe Jul 1, 2024
31a1caa
try skipping a large string test
Whytecrowe Jul 1, 2024
7f360bb
try removing the test skip
Whytecrowe Jul 1, 2024
bd7bc84
skip the test back and try removing heap increase
Whytecrowe Jul 1, 2024
be2a980
add missing tests for rootPricer state var
Whytecrowe Jul 2, 2024
cacba86
try adding slip on coverage for a long string name test
Whytecrowe Jul 2, 2024
38f16b0
add NatSpec for some non obvious errors
Whytecrowe Jul 2, 2024
d92590d
add test
Whytecrowe Jul 2, 2024
8789d9d
update hardhat to the newest version
Whytecrowe Jul 2, 2024
6908566
try updating solcover
Whytecrowe Jul 2, 2024
d0e1ae5
Codebase and dependency update (#109)
Whytecrowe Jul 2, 2024
ae74c06
Types upgrade after PROVIDER removal
MichaelKorchagin Jul 16, 2024
b387d4f
Deploy contracts through Hardhat script
MichaelKorchagin Jul 17, 2024
cfd06cc
Add Meow-testnet data
MichaelKorchagin Jul 18, 2024
d3a999f
Disable Meow-testnet
MichaelKorchagin Jul 18, 2024
0db9875
Correct contract format
MichaelKorchagin Jul 18, 2024
449e121
[ZNS ZChain] Update zDC, add deploy scripts for `dev` and ZChain (#113)
Whytecrowe Sep 11, 2024
84f0d12
fix compile (type) errors
Whytecrowe Sep 11, 2024
8513869
add ts compilation to build script so that CI checks for compilation …
Whytecrowe Sep 11, 2024
7e13b4a
Merge branch 'rc/zns-meowchain' into zdc-integration-upgrade
Whytecrowe Sep 12, 2024
55e332d
update packages
Whytecrowe Sep 12, 2024
1d4ea0b
fix leftover errors in tests
Whytecrowe Sep 12, 2024
8108e72
update eslint config
Whytecrowe Sep 26, 2024
aa47d98
fix naming for all upgrade mock files
Whytecrowe Oct 1, 2024
d47495c
fix mock DMs for upgrade testing and add mongo adapter reset to the test
Whytecrowe Oct 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ orbs:
defaults: &defaults
working_directory: ~/repo
docker:
- image: cimg/node:18.15.0
- image: cimg/node:18.20.3
- image: mongo:7.0.0-rc5-jammy

jobs:
Expand Down
5 changes: 3 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
"no-console": "off",
"no-shadow": "warn",
"@typescript-eslint/no-shadow": "warn",
"no-invalid-this": "off"
"no-invalid-this": "off",
"jsdoc/newline-after-description": "off"
// "@typescript-eslint/no-unused-vars": "off" // For debugging
}
}
]
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ coverage.json
typechain
typechain-types
.idea
dist

# Hardhat files
cache
Expand Down
4 changes: 4 additions & 0 deletions .solcover.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
module.exports = {
mocha: {
grep: "@skip-on-coverage", // Find everything with this tag
invert: true // Run the grep's inverse set.
},
skipFiles: [
'utils/StringUtils.sol',
'token/mocks',
Expand Down
66 changes: 64 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,70 @@

[![CircleCI](https://dl.circleci.com/status-badge/img/gh/zer0-os/zNS/tree/development.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/zer0-os/zNS/tree/development)

# zNS
# zNS - Zer0 Name Service Protocol
________________________________________________________

## System Documentation

### [System Architecture](./docs/architecture.md)
### [Smart Contract Docs](./docs/contracts)
### [Flow Diagrams](./docs/flows.md)
### [Flow Diagrams](./docs/flows.md)

**Full Protocol Documentation - [zero.study](https://www.zero.study/)**
________________________________________________________

## About
Zer0 Name Service, or zNS, is a protocol that allows you to create domain and subdomain NFTs that focus on community building and creation of unique, on-chain identification.

Zero Website - [zero.tech](https://zero.tech/)

## Developers

### Install Dependencies
We are using `yarn` as our package manager.
```bash
yarn install
```
> **Docker Engine** is required to run tests locally. You can install it from [here](https://docs.docker.com/engine/install/).

### Setup Environment
Create `.env` file in the root directory and add the following variables:
```bash
ENV_LEVEL: "dev" # local dev environment
MONGO_DB_URI: "mongodb://localhost:27018" # local instance of MongoDB in the Docker
MONGO_DB_NAME: "zns-campaign" # name of the database
MOCK_MEOW_TOKEN: "true" # use mock MeowToken contract for local testing
SILENT_LOGGER: "true" # disable logging for tests
```

The full ENV setup with descriptions can be found in the [.env.sample](./.env.sample) file.

### Build
```bash
yarn build
```
This will compile all the contracts and add a git tag and a last commit for the current version of the contracts
that is **required** for the MongoDB where deployed contract data is stored.

This will also run a bash script that will pull **tag and commit** from git and write
it locally to `./artifacts/git-tag.txt` file. If you are using Windows, that script may fail. In that case you can
pull git data manually and write it to the file or use the TS based script here: `./src/utils/save-tag.ts` simply by running `yarn save-tag`
The resulting text in the `./artifacts/git-tag.txt` file should look like this:
```
v1.0.1:213334f3d4f47940779cb7e825aaf1fab77adb2e
```

### Run Tests
```bash
yarn test
```
This will launch `docker-compose` with MongoDB instance on it, required for some tests. Then launch all the tests in the `./test` directory.

> Note: If you do not have Docker installed this will fail.

### Submit Work
All new code is submitted through Pull Requests **ONLY**. Please make sure that you have all the tests passing in CircleCI and that
you have added new tests for your code before submitting for review. Codecov will fail the CI if the coverage drops. Pull Requests are not merged with a failing CI build.

All new code is merged into `development` branch and that will make a new prerelease tag.
`master` branch is used for production releases only. Code from `development` branch should be fully tested on the testnet before merging into `master`.
6 changes: 3 additions & 3 deletions contracts/access/AAccessControlled.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
pragma solidity 0.8.26;

import { IZNSAccessController } from "./IZNSAccessController.sol";
import { ZeroAddressPassed } from "../utils/CommonErrors.sol";


/**
Expand All @@ -11,7 +12,6 @@ import { IZNSAccessController } from "./IZNSAccessController.sol";
* this contract needs to be inherited by the module.
*/
abstract contract AAccessControlled {

/**
* @notice Emitted when the access controller contract address is set.
*/
Expand Down Expand Up @@ -66,7 +66,7 @@ abstract contract AAccessControlled {
* @param _accessController Address of the ZNSAccessController contract.
*/
function _setAccessController(address _accessController) internal {
require(_accessController != address(0), "AC: _accessController is 0x0 address");
if (_accessController == address(0)) revert ZeroAddressPassed();
accessController = IZNSAccessController(_accessController);
emit AccessControllerSet(_accessController);
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/access/IZNSAccessController.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
pragma solidity 0.8.26;

import { IAccessControl } from "@openzeppelin/contracts/access/IAccessControl.sol";

Expand Down
9 changes: 4 additions & 5 deletions contracts/access/ZNSAccessController.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
pragma solidity 0.8.26;

import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol";
import { IZNSAccessController } from "./IZNSAccessController.sol";
import { ZNSRoles } from "./ZNSRoles.sol";
import { ZeroAddressPassed } from "../utils/CommonErrors.sol";


/**
Expand Down Expand Up @@ -77,10 +78,8 @@ contract ZNSAccessController is AccessControl, ZNSRoles, IZNSAccessController {
function _grantRoleToMany(bytes32 role, address[] memory addresses) internal {
uint256 length = addresses.length;
for (uint256 i = 0; i < length; ++i) {
require(
addresses[i] != address(0),
"ZNSAccessController: Can't grant role to zero address"
);
if (addresses[i] == address(0)) revert ZeroAddressPassed();

_grantRole(role, addresses[i]);
}
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/access/ZNSRoles.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
pragma solidity 0.8.26;


/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/oz-proxies/ERC1967ProxyAcc.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
pragma solidity 0.8.26;

// solhint-disable-next-line no-global-import
import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/oz-proxies/TransparentUpgradeableProxyAcc.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
pragma solidity 0.8.26;

// solhint-disable-next-line no-global-import
import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
Expand Down
19 changes: 18 additions & 1 deletion contracts/price/IZNSCurvePricer.sol
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
pragma solidity 0.8.26;

import { ICurvePriceConfig } from "../types/ICurvePriceConfig.sol";
import { IZNSPricer } from "../types/IZNSPricer.sol";


interface IZNSCurvePricer is ICurvePriceConfig, IZNSPricer {

/**
* @notice Reverted when multiplier passed by the domain owner
* is equal to 0 or more than 10^18, which is too large.
*/
error InvalidMultiplierPassed(uint256 multiplier);

/**
* @notice Reverted when `priceConfig` set by the owner does not result in a proper asymptotic curve
* and one of it's incorrect values causes the price spike at maxLength, meaning that the price
* for a domain label shorter than `baseLength` (the one before `minPrice`) becomes higher than `minPrice`.
*/
error InvalidConfigCausingPriceSpikes(
bytes32 configsDomainHash,
uint256 minPrice,
uint256 previousToMinPrice
);

/**
* @notice Emitted when the `maxPrice` is set in `CurvePriceConfig`
* @param price The new maxPrice value
Expand Down
2 changes: 1 addition & 1 deletion contracts/price/IZNSFixedPricer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
pragma solidity 0.8.26;

import { IZNSPricer } from "../types/IZNSPricer.sol";

Expand Down
27 changes: 12 additions & 15 deletions contracts/price/ZNSCurvePricer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
pragma solidity 0.8.26;

import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import { IZNSCurvePricer } from "./IZNSCurvePricer.sol";
Expand Down Expand Up @@ -75,10 +75,7 @@ contract ZNSCurvePricer is AAccessControlled, ARegistryWired, UUPSUpgradeable, I
string calldata label,
bool skipValidityCheck
) public view override returns (uint256) {
require(
priceConfigs[parentHash].isSet,
"ZNSCurvePricer: parent's price config has not been set properly through IZNSPricer.setPriceConfig()"
);
if (!priceConfigs[parentHash].isSet) revert ParentPriceConfigNotSet(parentHash);

if (!skipValidityCheck) {
// Confirms string values are only [a-z0-9-]
Expand Down Expand Up @@ -256,8 +253,8 @@ contract ZNSCurvePricer is AAccessControlled, ARegistryWired, UUPSUpgradeable, I
bytes32 domainHash,
uint256 multiplier
) public override onlyOwnerOrOperator(domainHash) {
require(multiplier != 0, "ZNSCurvePricer: precisionMultiplier cannot be 0");
require(multiplier <= 10**18, "ZNSCurvePricer: precisionMultiplier cannot be greater than 10^18");
if (multiplier == 0 || multiplier > 10**18) revert InvalidMultiplierPassed(multiplier);

priceConfigs[domainHash].precisionMultiplier = multiplier;

emit PrecisionMultiplierSet(domainHash, multiplier);
Expand All @@ -275,10 +272,8 @@ contract ZNSCurvePricer is AAccessControlled, ARegistryWired, UUPSUpgradeable, I
public
override
onlyOwnerOrOperator(domainHash) {
require(
feePercentage <= PERCENTAGE_BASIS,
"ZNSCurvePricer: feePercentage cannot be greater than PERCENTAGE_BASIS"
);
if (feePercentage > PERCENTAGE_BASIS)
revert FeePercentageValueTooLarge(feePercentage, PERCENTAGE_BASIS);

priceConfigs[domainHash].feePercentage = feePercentage;
emit FeePercentageSet(domainHash, feePercentage);
Expand Down Expand Up @@ -337,10 +332,12 @@ contract ZNSCurvePricer is AAccessControlled, ARegistryWired, UUPSUpgradeable, I
*/
function _validateConfig(bytes32 domainHash) internal view {
uint256 prevToMinPrice = _getPrice(domainHash, priceConfigs[domainHash].maxLength);
require(
priceConfigs[domainHash].minPrice <= prevToMinPrice,
"ZNSCurvePricer: incorrect value set causes the price spike at maxLength."
);
if (priceConfigs[domainHash].minPrice > prevToMinPrice)
revert InvalidConfigCausingPriceSpikes(
domainHash,
priceConfigs[domainHash].minPrice,
prevToMinPrice
);
}

/**
Expand Down
13 changes: 4 additions & 9 deletions contracts/price/ZNSFixedPricer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
pragma solidity 0.8.26;

import { AAccessControlled } from "../access/AAccessControlled.sol";
import { ARegistryWired } from "../registry/ARegistryWired.sol";
Expand Down Expand Up @@ -60,10 +60,7 @@ contract ZNSFixedPricer is AAccessControlled, ARegistryWired, UUPSUpgradeable, I
string calldata label,
bool skipValidityCheck
) public override view returns (uint256) {
require(
priceConfigs[parentHash].isSet,
"ZNSFixedPricer: parent's price config has not been set properly through IZNSPricer.setPriceConfig()"
);
if (!priceConfigs[parentHash].isSet) revert ParentPriceConfigNotSet(parentHash);

if (!skipValidityCheck) {
// Confirms string values are only [a-z0-9-]
Expand Down Expand Up @@ -161,10 +158,8 @@ contract ZNSFixedPricer is AAccessControlled, ARegistryWired, UUPSUpgradeable, I
* @param feePercentage The new feePercentage
*/
function _setFeePercentage(bytes32 domainHash, uint256 feePercentage) internal {
require(
feePercentage <= PERCENTAGE_BASIS,
"ZNSFixedPricer: feePercentage cannot be greater than PERCENTAGE_BASIS"
);
if (feePercentage > PERCENTAGE_BASIS)
revert FeePercentageValueTooLarge(feePercentage, PERCENTAGE_BASIS);

priceConfigs[domainHash].feePercentage = feePercentage;
emit FeePercentageSet(domainHash, feePercentage);
Expand Down
10 changes: 8 additions & 2 deletions contracts/registrar/IZNSRootRegistrar.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
pragma solidity 0.8.26;

import { IDistributionConfig } from "../types/IDistributionConfig.sol";
import { PaymentConfig } from "../treasury/IZNSTreasury.sol";
Expand Down Expand Up @@ -42,13 +42,19 @@ struct CoreRegisterArgs {
* + `isStakePayment`: A flag for whether the payment is a stake payment or not
*/
interface IZNSRootRegistrar is IDistributionConfig {
error NotTheOwnerOf(
OwnerOf ownerOf,
address candidate,
bytes32 domainHash
);

error InvalidOwnerOfEnumValue(OwnerOf value);

enum OwnerOf {
NAME,
TOKEN,
BOTH
}

/**
* @notice Emitted when a NEW domain is registered.
* @dev `domainAddress` parameter is the address to which a domain name will relate to in ZNS.
Expand Down
Loading