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: add web3-name-sdk resolve name to address #320

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

minghuipei
Copy link

No description provided.

@@ -33,6 +34,16 @@ export async function lookupAddresses(addresses: Address[]): Promise<Record<Addr
}
}

export async function resolveNames(): Promise<Record<Handle, Address>> {
return {};
export async function resolveName(name: string): Promise<Address | undefined> {
Copy link
Contributor

Choose a reason for hiding this comment

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

You shouldn't replace snapshot.ts resolver but instead making a new file spaceid.ts

Copy link
Author

Choose a reason for hiding this comment

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

I got it.

@@ -43,7 +44,8 @@
"sharp": "^0.30.1",
"starknet": "^6.11.0",
"ts-node": "^10.8.1",
"typescript": "^4.7.3"
"typescript": "^5.6.3",
"viem": "^2.21.35"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see this being used, could you remove it?

Copy link
Author

Choose a reason for hiding this comment

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

I don't see this being used, could you remove it?

Our library need these.

@@ -28,6 +28,7 @@
"@snapshot-labs/snapshot-sentry": "^1.5.5",
"@snapshot-labs/snapshot.js": "^0.12.28",
"@unstoppabledomains/resolution": "^9.2.2",
"@web3-name-sdk/core": "^0.2.0",
Copy link
Contributor

@bonustrack bonustrack Oct 28, 2024

Choose a reason for hiding this comment

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

Isn't there a way to do onchain call with Ethers.js to get the name instead of using that library?

Copy link
Author

Choose a reason for hiding this comment

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

Isn't there a way to do onchain call with Ethers.js to get the name instead of using that library?

Our library is specifically designed to achieve that functionality and also supports additional parsing features. For more details, please refer to https://docs.space.id/developer-guide/web3-name-sdk

@minghuipei minghuipei force-pushed the feat/snapshot-resolve branch from 65b4827 to af51ce0 Compare October 29, 2024 02:53
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