SeeDAO Name Service is a name service dedicated to SeeDAO.
It is recommended to use the hardhat_metamask_client2 plugin for deployment. With this plugin, you can directly use the MetaMask extension in the browser to deploy and interact with contracts. To enable this feature, just set useMetamaskClient to true in hardhat.config.ts on line #78:
extendEnvironment((hre) => {
hre.useMetamaskClient = true;
});If you do not want to using the hardhat_metamask_client2 plugin, you need to set useMetamaskClient to false and fill in the private key in hardhat.config.ts on line #9 or modify it to read the private key from the .env file.
We did not use the more common
.envfile because we recommend using the MetaMask extension in the browser to deploy and interact with contracts.
$ REPORT_GAS=true npx hardhat testThe following commands need to be executed in order to deploy a total of 6 contracts.
Note:
04_deploy_BaseRegistrar.ts#26~#28 set the top-level domain (.seedao) and ERC721's symbol and name05_deploy_SeeDAORegistrarController.ts#26 #27 set the lifetime of commitment08_deploy_SeeDAOActivityMinter.ts#26 set the address of SCR contract
# Deploy `SNSRegistry` contract
$ npx hardhat run --network mainnet scripts/01_deploy_SNSRegistry.ts
# Deploy `Root` contract
$ npx hardhat run --network mainnet scripts/02_deploy_Root.ts
# Deploy `ReverseRegistrar` contract
$ npx hardhat run --network mainnet scripts/03_deploy_ReverseRegistrar.ts
# Deploy `BaseRegistrar` contract
$ npx hardhat run --network mainnet scripts/04_deploy_BaseRegistrar.ts
# Deploy `SeeDAORegistrarController` contract
$ npx hardhat run --network mainnet scripts/05_deploy_SeeDAORegistrarController.ts
# Deploy `PublicResolver` contract
$ npx hardhat run --network mainnet scripts/06_deploy_PublicResolver.ts
# Deploy `SeeDAOMinter` contract
$ npx hardhat run --network mainnet scripts/07_deploy_SeeDAOMinter.ts
# Deploy `SeeDAOActivityMinter` contract
$ npx hardhat run --network mainnet scripts/08_deploy_SeeDAOActivityMinter.ts# Upgrade `BaseRegistrar` contract
$ npx hardhat run --network mainnet scripts/101_update_BaseRegistrar.ts
# Upgrade `SeeDAORegistrarController` contract
$ npx hardhat run --network mainnet scripts/102_upgrade_SeeDAORegistrarController.ts
# Upgrade `SeeDAOMinter` contract
$ npx hardhat run --network mainnet scripts/103_upgrade_SeeDAOMinter.ts
# Upgrade `SeeDAOActivityMinter` contract
$ npx hardhat run --network mainnet scripts/104_upgrade_SeeDAOActivityMinter.ts# Verify `SNSRegistry` contract
$ npx hardhat verify --network mainnet <SNSRegistry Address>
# Verify `Root` contract
$ npx hardhat verify --network mainnet <Root Address> <SNSRegistry Address>
# Verify `ReverseRegistrar` contract
$ npx hardhat verify --network mainnet <ReverseRegistrar Address> <SNSRegistry Address>
# Verify `BaseRegistrar` contract
$ npx hardhat verify --network mainnet <BaseRegistrar Address>
# Verify `SeeDAORegistrarController` contract
$ npx hardhat verify --network mainnet <SeeDAORegistrarController Address>
# Verify `PublicResolver` contract
$ npx hardhat verify --network mainnet <PublicResolver Address> <SNSRegistry Address> <ReverseRegistrar Address> <SeeDAORegistrarController Address> 0x0000000000000000000000000000000000000000
# Verify `SeeDAOMinter` contract
$ npx hardhat verify --network mainnet <SeeDAOMinter Address>
# Verify `SeeDAOActivityMinter` contract
$ npx hardhat verify --network mainnet <SeeDAOActivityMinter Address>Management methods:
-
enableTransferable()
-
disableTransferable()
-
setBaseURI(string)
Other methods:
-
available(bytes32)
-
nextTokenId()
-
register(bytes32, address, address)
-
reclaim(bytes32, address)
-
all functions inherited from
ERC721
Management methods:
-
grantMinter(address):
-
revokeMinter(address):
-
enableRegister():
-
disableRegister()
-
setMaxOwnedNumber(uint256)
Other methods:
-
available(string)
-
valid(string)
-
balanceOf(address)
-
nextTokenId()
-
batchRegister(string[], address[], address)
-
makeCommitment(string, address, address, bytes32)
-
commit(bytes32)
-
registerWithCommitment(string, address, address, bytes32)
-
register(string, address, address)
-
reclaim(string, address, address)
-
setDefaultName(string, address)
-
setDefaultAddr(string, address, address)
Management methods:
-
setRegistrarController()
-
enableRegister()
-
disableRegister()
-
enableRegisterWithWhitelist()
-
disableRegisterWithWhitelist()
-
setWhitelist(uint256, bytes32)
-
setCondERC20(address)
-
...
-
setPriceOracle(IPriceOracle)
Other methods:
- register(string, address, bytes32, address)
- registerWithWhitelist(string, address, bytes32, uint256, bytes32[])