Skip to content

Commit a453d96

Browse files
committed
[SDK] Unstoppable Domains resolvers (#4905)
<!-- start pr-codex --> ## PR-Codex overview This PR focuses on adding support for Unstoppable Domains within the `thirdweb` SDK, including new resolvers for names and addresses, and enhancing functionality through tests and constants. ### Detailed summary - Added `UD_POLYGON_MAINNET` constant. - Introduced functions: `resolveName`, `resolveAddress`, `reverseNameOf`, `getMany`, and `namehash`. - Implemented tests for `resolveName` and `resolveAddress`. - Added exports for new types and functions in `unstoppable-domains.ts`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent bfe9753 commit a453d96

File tree

11 files changed

+607
-0
lines changed

11 files changed

+607
-0
lines changed

.changeset/khaki-items-tease.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": minor
3+
---
4+
5+
Add name & address resolvers for Unstoppable Domains
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[
2+
"function reverseNameOf(address addr) view returns (string reverseUri)",
3+
"function getMany(string[] keys, uint256 tokenId) view returns (string[] values)",
4+
"function namehash(string[] labels) pure returns (uint256 hash)"
5+
]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export { UD_POLYGON_MAINNET } from "../../extensions/unstoppable-domains/consts.js";
2+
export {
3+
type ResolveUDNameOptions,
4+
resolveName,
5+
} from "../../extensions/unstoppable-domains/read/resolveName.js";
6+
export {
7+
type ResolveAddressOptions,
8+
resolveAddress,
9+
} from "../../extensions/unstoppable-domains/read/resolveAddress.js";

packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/getMany.ts

Lines changed: 130 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/namehash.ts

Lines changed: 124 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)