Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: integrate ENSIP-16 v2 to manage domain page #137

Closed
alextnetto opened this issue Aug 12, 2024 · 1 comment · Fixed by #152
Closed

feat: integrate ENSIP-16 v2 to manage domain page #137

alextnetto opened this issue Aug 12, 2024 · 1 comment · Fixed by #152
Assignees
Labels
enhancement New feature or request

Comments

@alextnetto
Copy link
Member

alextnetto commented Aug 12, 2024

Feature Request

Describe the Feature Request

The dapp should be able to gather all the information related to any given domain, even those being stored off-chain. Although the The Graph is capable of handling domains stored on-chain, it lacks features for the domains stored anywhere other than the L1, which is where the ENSIP-16 comes into play.

Describe Preferred Solution

The dapp should be capable of gather the domain's record by following the steps below:

  1. Fetch the resolved by calling findResolver(bytes32 node) from the UniversalResolver
  2. *Check whether this resolve implements the function metadata() external view returns (string memory) function by calling supportsInterface(0x392f37e9) with 0x392f37e9 being the selector of the metadata function
  3. if it returns true it means the contract supports the ENSIP-16, exposing a GraphQL API on the URL returned by the metadata function. The latest version of the DatabaseResolver (0xfCfC138635e8c00BfDa78507C8abeD5013148150) returns the following this URL.
  4. the following is the query that fetches the most infos about a given domain:
query Domain($name: String!) {
  domain(name: $name) {
    id
    context
    name
    namehash
    labelName
    labelhash
    resolvedAddress
    parent
    subdomains
    subdomainCount
    resolver {
      id
      node
      context
      address
      addr
      contentHash
      texts {
        key
        value
      }
      addresses {
        address
        coin
      }
    }
    expiryDate
  }
}

P.S: the current implementation of the DBResolver doesn't return tru for the supportsInterface(<metadata selector> yet, it is still being developed. You can call the Metadata API directly for now.

@alextnetto alextnetto added the enhancement New feature or request label Aug 12, 2024
@alextnetto alextnetto added this to ENS Aug 12, 2024
@alextnetto alextnetto moved this to 🔖 TODO in ENS Aug 12, 2024
@eduramme eduramme moved this from 🔖 TODO to 🛠️ In Progress in ENS Aug 20, 2024
@eduramme eduramme linked a pull request Aug 22, 2024 that will close this issue
@eduramme eduramme moved this from 🛠️ In Progress to 🕵️‍♀️ In Review in ENS Aug 22, 2024
@FrancoAguzzi FrancoAguzzi moved this from 🕵️‍♀️ In Review to 🛠️ In Progress in ENS Aug 23, 2024
@eduramme eduramme moved this from 🕵️‍♀️ In Review to 🔥 QA in ENS Aug 28, 2024
@pikonha
Copy link
Contributor

pikonha commented Aug 28, 2024

LGTM

@github-project-automation github-project-automation bot moved this from 🔥 QA to ✅ Done in ENS Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants