-
Notifications
You must be signed in to change notification settings - Fork 364
feat: add support for unstoppable domains minted on polygon #3930
Conversation
- update @unstoppabledomains/resolution in package.json
- full list: .nft, .x, .wallet, .bitcoin, .dao, .888, .coin
CLA Assistant Lite All Contributors have signed the CLA. |
I have read the CLA Document and I hereby sign the CLA |
Looks great, thank you @0xfuje! One question though: how does it work with different chains? |
recheckcla |
Thank you for your contribution! Please, let us know your Ethereum address to receive this NFT on Gnosis Chain. |
Pull Request Test Coverage Report for Build 2508355150
💛 - Coveralls |
It seems like there is a multiChainAddr method that accepts the @0xfuje, have you tested this cross-chain? |
Hey @katspaugh and @iamacook! I tested it and the resolution works cross-chain. Should it only be enabled to work on mainnet? I think this works with rate-free Infura RPCs internally. Would that be a problem somehow? |
I'm not sure how this works for UD, but with ENS, if you created a domain on mainnet, it should only resolve on mainnet. E.g. on Polygon, it could resolve to a different address. Is this the case with UD as well? If so, how does it know which chain to query with the chain config removed? |
@0xfuje, no |
I think it first resolves on mainnet, but if no mainnet address has found it resolves on polygon. I will try to dig deeper into the unstoppable resolution library to find out more and to understand it better. Yeah the currency is probably not a reference to the chain it resolves in. |
Which still refers to a mainnet address, if I understand right. Please let us know what you find out! |
Yes - the Resolution library will look for a domain on Polygon mainnet, and if it's not found there will check the Ethereum mainnet. This is because the vast majority of UD domains are Polygon NFTs, and all minted domains since fall are now entirely Polygon based. As you see, the backend handles all that logic so the app itself doesn't need to support those chains. The SDK is simply looking to those chains to get the token addresses which the user has configured, they can be any token / chain type. The resolution library is simply fetching the address and not actually performing the peer to peer send tx, so no chain id is needed to be passed in. This is standard deployment |
Thanks for clarifying, @jim-unstoppable. |
Yup this will resolve mainnet addresses, even though the domains are Polygon. Essentially the information is stored on the Polygon NFT, and the API retrieves it. It's same method whether retrieving the ETH address, BTC address, etc - the library grabs the data from the NFT and returns back the address as a string. |
Great, thank you @jim-unstoppable! Then I think this PR is good to go 👍 @francovenica please test crypto|nft|x|wallet|bitcoin|dao|888|coin domains. |
This PR doesn't have an environment to access to, and I cannot fetch the branch. Both things probably because is an external contributor. |
@francovenica I've copied it to #3979, please test on there. |
Looks good. Tested here: Names used: |
Thanks @0xfuje 🙏 |
What it solves
Resolves #3831
How this PR fixes it
How to test it
Video
IPFS Link