The SubdomainRegistrar
contract allows users to register subdomains under a specified parent node.
- Register Subdomains: Users can register subdomains by paying a registration fee.
- Set Subnode Record: The contract interacts with the
INameWrapper
interface to set the subnode record. - Adjustable Registration Fee: The owner can set and update the registration fee.
- Configurable Fee Recipient: The owner can set and update the address that receives the registration fees.
To deploy the SubdomainRegistrar
contract, provide the following parameters:
_nameWrapper
: The address of theINameWrapper
contract._resolver
: The address of the resolver._parentNode
: The parent node under which subdomains will be registered._registrationFee
: The initial registration fee._feeRecipient
: The address that will receive the registration fees.
-
Register a Subdomain:
- Call the
register
function with the desired subdomain label and pay the registration fee.
- Call the
-
Set Registration Fee (Owner only):
- Call the
setRegistrationFee
function with the new fee amount.
- Call the
-
Set Fee Recipient (Owner only):
- Call the
setFeeRecipient
function with the new recipient address.
- Call the
- Lock the ENS Parent Name:
- Ensure that the ENS parent name is locked so it is imposssible to unwrap it.
- Set Approval for All:
- The contract's address must be set as ApprovedForAll on the nameWrapper contract.
This project is licensed under the MIT License.