title | description | redirectFrom | |
---|---|---|---|
Manage Domains Using Smart Contracts Guide | UD Developer Portal |
This guide covers how to manage UD domain records using the Etherscan and Polygonscan user interfaces to write and execute proxy contracts. |
|
This guide covers how to manage UD domain records using proxy contracts. This process requires using the Etherscan and Polygonscan user interface to write and execute contracts.
The UNS Registry smart contract is where domain owners store their data and is a map of domain namehashes to key-value dictionaries of records. Choose one of the Unstoppable Registry smart contracts to interact with (either mainnet or testnet).
polygon registry contractNavigate to the Contract
tab in either the Etherscan or Polygonscan page of the Registry 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:
Choose the set
or setMany
method from the Write as Proxy
tab section. The set
method allows you to update a single record, while the setMany
method allows you to update multiple records simultaneously.
Next, add the record(s) you want to manage to the key
and value
fields as a single value for the set
method or array of values for the setMany
method.
:::info Please see the Record Reference guide and reference JSON file for all the resolver keys used by the Unstoppable Domains UNS Registry. :::
After generating the domain namehash, insert it into the tokenId
field of the set
or setMany
method.
Click the 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:
:::success Congratulations! You have successfully managed your Unstoppable Domain records using smart contracts. Happy hacking! :::