📘How it works
Have a read here to learn about resolvers.
Requirements
Nameshould be represented as an NFT so it can be easily traded.A
Nameshould resolve to at most 1AddressAn
Addresson any shard (group) should resolve to at most 1NameThe holder of the
NameNFT has permission to assign anyAddressto aNameAn
Addressdoes not need to hold theNameNFT in order to be resolvedAn
Addressneeds to give permission for whichNameshould be resolved to them.
Solution
ForwardNameResolver is a contract on only group 0, which is used to assign which Address that a Name should resolve to. Only the holder of the Name NFT has permission to assign the Address.
ReverseNameResolver is a contract on every group, which is used to assign which Name that an Address should resolve to. An Address must assign its own Name.
A Name and Address should only be considered "Linked" if their exists both a ForwardNameResolver entry and a ReverseNameResolver entry. This provides a simple solution for "Linking" without having to pass around an NFT and requiring only 1 transaction for the Name holder and 1 transaction for the target Address.
Example
The following names are assigned in the ForwardNameResolver on Group 0
"bob" -> "address_1"
"alice" -> "address_1"
"steve" -> "address_1"
The following names are assigned in the ReverseNameResolver on Group 1
"address_2" -> "alice"
"address_1" -> "alice"
"address_3" -> "alice"
Using 2 requests and without needing off-chain processing, we can can confirm that "alice" and "address_1" are "Linked".
Last updated