This page outlines the steps developers will take to integrate with Polygon and support Unstoppable domains on Polygon L2 network.
There will be minimal changes to Unstoppable Domains’ resolution libraries and resolution service with the rollout of our Layer 2 solution on Polygon. Over 90% of the library and resolution service will be similar to what we provide for Ethereum. However, for UD developers, all of the integrated "apps" will need to update their resolution libraries or API endpoints in order to be able to read and resolve NFT domains on Polygon.
To further assist with L2, the Polygon team will be adding Unstoppable Domains resolution to their API and Matic.js library. This will make it easier, for example, for Polygon apps to use domains for payments in wallets and login with dapps.
Resolution Library Updates
Our Layer 2 resolution libraries will require a few configuration changes to allow the libraries to read from Polygon. There are a few small changes to function/method calls and one brand new method which provides additional resolution information.
Method Changes and Updates
gettokensownedby has been deprecated and is no longer supported in L2.
getallrecords has changed structurally but does not require a change to the function or method call; the external interface remains the same, but the method will not be as decentralized because it uses our resolution service instead of querying the blockchain.
New Supported Method
Resolution#getLocations([domain1, domain2, domain3]) is a new method array that returns information for an unlimited number of domains; it only supports UNS and CNS due to Zilliqa technical limits.
This method returns a list of domain locations:
Blockchain Provider URL (if possible otherwise null)