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

Feature/ens #9

Open
wants to merge 8 commits into
base: dev-nish
Choose a base branch
from
Open

Feature/ens #9

wants to merge 8 commits into from

Conversation

nishil-edx
Copy link

No description provided.

@nishil-edx nishil-edx requested a review from ex-rohan-edx April 19, 2024 04:59
README.md Outdated
## License

MIT
This branch mainly targeted on ENS interactions
Copy link
Contributor

Choose a reason for hiding this comment

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

Revert back to old READ ME file

const provider = new ethers.providers.JsonRpcProvider(RPC_URL)
const reverseName = `${input.slice(2)}.addr.reverse`;
const node = ethers.utils.namehash(reverseName);
const resolverContract_ = new ethers.Contract('0xEF1db68FaDfdD398886EE73Cbc34918Be51Ae304', publicResolver.abi, provider);
Copy link
Contributor

Choose a reason for hiding this comment

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

Move static contract address into a constants file

throw new Error(`ENS Not Registered for ${input}`)
else return detailsObject.resolver
const node = ethers.utils.namehash(input);
const resolverContract_ = new ethers.Contract('0xEF1db68FaDfdD398886EE73Cbc34918Be51Ae304', publicResolver.abi, provider);
Copy link
Contributor

Choose a reason for hiding this comment

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

Move static contract address into a constants file

async resolveName(input: string) { //name string input
try {
// Check if the input is a valid Ethereum address
if (input.endsWith(".edx") && input.split(".")[0].length >= 4) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Move static string checking var to a constants file




resolveAddress("0x44aDbAcC4B0baD81dBc6D24b9512da3806c5aCCD")
Copy link
Contributor

Choose a reason for hiding this comment

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

Add more test cases to check the functionality for example add negative test cases too

tsconfig.json Outdated
@@ -18,6 +18,6 @@
"esModuleInterop": true,
"declaration": true
},
"include": ["./src/**/*"],
"include": ["./src/**/*", "testENSresolve.ts"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Reset back to original file

@nishil-edx
Copy link
Author

nishil-edx commented Apr 24, 2024 via email

Copy link
Contributor

@ex-rohan-edx ex-rohan-edx left a comment

Choose a reason for hiding this comment

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

Function Comments:
- Add comments to each function describing:
- The function's purpose.
- The types of arguments it accepts.
- What the function returns.

Test Case Improvement:

  • Specify the expected results in your test cases to clarify what the test is verifying.
  • Use descriptive names for your test cases to indicate the aspect of the function being tested.

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