[Feat]: Update dotns-sdk subname issuance for the new SubnodeRecord shape and lite subnames
Nobody has claimed this yet.
- Dominant language
- Solidity
- Stars
- 4
- Forks
- 2
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 24
Description
Component
Registration
Priority
P1
Summary
The dotNS contracts changed how names below the top level are issued, and the dotns-sdk must be
updated anywhere it issues a subname or reads a lite (PoP) name.
Two contract-side changes drive this:
IDotnsRegistry.SubnodeRecordgained apersistfield. When true the registry indexes the
subnode into the owner'sLabelStore; when false it writes only the ownership and resolver
record and the caller writes the label into the store separately. EverysetSubnodeOwnercall
must now supply this field.- A PoP lite username (
alice.01) is now issued as a subnamealicebeneath the numeric
container01, not as one atomic label. Its node is
namehash(namehash(tldNode, keccak("01")), keccak("alice")), and its ownership lives in the
registry record, not as an ERC-721 token on the registrar.
Desired outcome: the SDK constructs the current SubnodeRecord shape, and resolves and reads
ownership of a lite name at its subname node through the registry.
Proposal
The new struct shape:
struct SubnodeRecord {
bytes32 parentNode;
string subLabel;
string parentLabel;
address owner;
bool persist;
}
- Update every place the SDK builds a
SubnodeRecord/ callssetSubnodeOwnerto include
persist, choosing true or false per the caller's store-indexing need. - For a lite name
<stem>.<suffix>, split on the separator and derive the node as
namehash(namehash(tldNode, keccak(suffix)), keccak(stem))rather than hashing the whole label
under the TLD. - Read a lite name's owner from the registry (
owner(node)), which resolves both a tokenised name
and a subname, rather than from the registrar'sownerOf.
Acceptance criteria
- The SDK builds against the current
SubnodeRecord(withpersist) and every call site sets it. - Subname issuance and lite-name resolution derive the subname node by splitting on the separator.
- Lite-name ownership is read from the registry, not the registrar.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating every SubnodeRecord construction and setSubnodeOwner call, then inspect the lite-name resolution and ownership entry points. Update those paths for persist, derive lite nodes by splitting the name into suffix and stem, and read ownership through the registry; the SDK should build against the current struct and satisfy all listed acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100