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

Add tests for OwnedResolver #280

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

subashcs
Copy link

  • Adds the test cases for OwnedResolver taking reference from the PublicResolver function.
  • Updates the SPDX license for the smart contract as it was throwing a warning while compiling ( check if it is correct)

Fixes #243

Subash Chandra Sapkota added 2 commits September 29, 2023 22:47
This commit adds test case for OwnedResolver and moves the dnsName utility function
in test-utils folder from PublicResolver and renames it nameToHex for sharing with
OwnedResolver
Copy link
Member

@Arachnid Arachnid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -7,8 +7,36 @@ function hexEncodeName(name) {
function hexEncodeTXT(keys) {
return '0x' + packet.answer.encode(keys).toString('hex')
}
// resolves to a hexadecimal address from a name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of rewriting this instead of using dnsName?

Copy link
Author

@subashcs subashcs Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the question @Arachnid. Actually, the "dnsName" function is renamed to the "nameToHex" function. Also, I have moved this "nameToHex" function to the utils section for sharing between the newly created TestOwnedResolver and the old TestPublicResolver.

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.

2 participants