Skip to content

[Feat]: Bind a whitelist entry to specific names #233

Description

@re-gius

Component

Registration

Priority

P1

Summary

whiteListAddress grants an address the power to mint any available name at zero cost, with no per-name binding and no cap, through registerReserved on the registrar controller. The capability is needed for launch: it is how names are provisioned before public registration opens, and it is the only path that bypasses the Reserved tier gate for names with a stem of

This is the small, launch-scoped version of #202, which replaces the whitelist with a reservation contract after launch.

Proposal

  • Key grants by label: mapping(bytes32 labelhash => address grantee), so a label is spoken for by at most one address and an address may hold as many grants as needed. whiteListAddress(address, string label) writes one grant, with a batch overload taking an array of labels so provisioning several names stays a single transaction.
  • onlyWhiteListedOrOwner checks that the caller is whitelisted for the label being registered, not merely whitelisted.
  • isWhiteListed gains the label, or a companion view is added, so callers can query the pair.
  • Migration: clear existing entries. They carry unbounded power and cannot be translated into a label-bound form.
  • The registration flow is otherwise unchanged. The same account still calls registerReserved, so the Reserved tier bypass keeps working for short names and no separate claimant has to exist or act.

Acceptance criteria

  • A whitelisted address can register only the label its entry names; any other label is refused for that caller.
  • Multiple labels can be granted to one address in a single call.
  • A label cannot be granted to two addresses at the same time; regranting it either reverts or replaces the prior grantee, and the chosen behaviour is tested.
  • A single grant can be revoked without affecting the grantee's other grants.
  • Existing whitelist entries are cleared on deployment, so no address retains unbounded mint power.
  • A whitelisted address can still register a Reserved-class name (stem of five characters or fewer) for its granted label.
  • dotns-sdk is updated: dotns account whitelist takes the label, and is-whitelisted reflects the pair.
  • Tests cover a granted label registering, a non-granted label refused for the same caller, and a short reserved name registering through a grant.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions