This guide covers how to mint UD subdomains using proxy contracts. This process requires using the Polygonscan user interface to write and execute proxy contracts.
Subdomains can only be minted for Polygon-based (L2) domains. Ethereum and Zilliqa domains will need to be migrated to Polygon before they can mint subdomains.
The Minting Manager smart contract is an interface for minting second-level domains. Choose one of the Minting Manager smart contracts to interact with (either Polygon mainnet or testnet).
Navigate to the
Contract tab in the Polygonscan page of the Minting Manager contract and click on the
Write as Proxy tab:
Click on the
Connect to Web3 button in the
Write as Proxy tab and connect the wallet associated with the domain:
issueWithRecords() method from the
Write as Proxy tab section. The method allows you to mint subdomains of domains you already own to your wallet address.
Next, add your wallet address that owns the root domain to the
to field and the subdomain you want to mint to the
labels field. For example, if you own the
example.crypto domain with your wallet address as
0xC37d3c4326ab0E1D2b9D8b916bBdf5715f780fcF and you want to mint
blog.example.crypto, you will fill the parameters like so:
Then, add the record(s) you want pre-filled in the subdomain after minting to the
values fields as an array of values. See the Records Reference documentation for supported values. You can also provide empty records if you wish to. Set parameter
false if you do not need to set reverse record for the subdomain. It is possible to set reverse record for subdomain only if it is going to be minted to parent's domain owner, otherwise setting reverse is considered insecure without subdomain owner's signature.
Domain records aren't automatically pre-filled in subdomains unless specified during minting. If you do not provide any records when minting a subdomain, you can always add/update them at a later time.
Write button to sign the transaction and execute the contract. After signing the transaction, you can view its details on the blockchain explorer, like so:
The following considerations apply to minting subdomains:
Subdomains must contain only lowercase letters (
a-z), numbers (
0-9), and hyphens (
Subdomain names cannot start with a hyphen (
You have successfully minted a subdomain using smart contracts. Happy hacking!