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

Implement vet.domains (#839) #867

Merged
merged 14 commits into from
May 17, 2024
Merged

Conversation

ifavo
Copy link
Contributor

@ifavo ifavo commented May 14, 2024

Description

Add support for name and address lookups by adding its support to the VechainBaseSigner, VechainProvider and the Transaction Module.

If a name is passed into clauses, it will be resolved to the configured address on vet.domains.

The new functionality available is:

  • signer.resolveName(name)
  • provider.resolveName(name)
  • provider.lookupAddress(address)
  • vnsUtils.resolveName(name)
  • vnsUtils.lookupAddress(address)
  • vnsUtils.resolveNames(names[])
  • vnsUtils.lookupAddresses(addresses[])

Closes #839

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Transaction Module and Signer are currently tested with TestNet lookups or if the lookup function is correctly called.

  • VechainBaseSigner: resolveName(vnsName)
  • VechainProvider: resolveName(vnsName)
  • VechainProvider: lookupAddress(address)
  • vnsUtils: resolveName(vnsName)
  • vnsUtils: lookupAddress(address)
  • vnsUtils: correct contract interaction without network testing
  • solo node seeded tests with ENS contracts

Test Configuration:

  • Node.js Version: 18.20.2
  • Yarn Version: 3.6.1

Checklist:

  • My code follows the coding standards of this project
  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • New and existing integration tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have not added any vulnerable dependencies to my code

@ifavo ifavo marked this pull request as ready for review May 15, 2024 18:22
@ifavo ifavo requested a review from a team as a code owner May 15, 2024 18:22
@rodolfopietro97 rodolfopietro97 merged commit 55f8ab2 into vechain:main May 17, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Signer :: Implement VET domains
2 participants