📘How it works

Have a read here to learn about resolvers.

Requirements

  • Name should be represented as an NFT so it can be easily traded.

  • A Name should resolve to at most 1 Address

  • An Address on any shard (group) should resolve to at most 1 Name

  • The holder of the Name NFT has permission to assign any Address to a Name

  • An Address does not need to hold the Name NFT in order to be resolved

  • An Address needs to give permission for which Name should 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