IDotnsPopLens
Title: IDotnsPopLens
Read-only view over PoP identity data, composed from the controller, the registrar, the store factory, the PoP resolver, and PopRules.
Holds no state of its own beyond the protocol registry it resolves siblings through, and takes no part in issuance. It exists so the query surface lives outside the controller, which keeps the controller within the contract-size limit and keeps ownership on the registrar.
Note: security-contact: admin@parity.io
Functions
protocolRegistry
The protocol registry the lens resolves siblings through.
function protocolRegistry() external view returns (address registry);
Returns
| Name | Type | Description |
|---|---|---|
registry | address | The protocol registry address. |
liteNamesOf
Lists the lite-person names currently owned by user.
Reads the user's LabelStore labels and pending claims, keeps the lite-person
shaped ones, and re-checks each against registrar.ownerOf so a name transferred away
drops out and a name transferred in shows under its current owner. Ordering follows the
store then the pending queue. An offset past the end returns an empty array rather than
reverting, and a short return means the slice ended. A gateway name transferred before it
settles has its label in no store, so it cannot appear here and is reachable only by node
via @custom:function nameDetailByNode. Gas grows with the account's holdings, so call it
off-chain. A page holds at most DotnsConstants.MAX_PAGE_SIZE entries, and the pending
portion covers up to that many staged claims.
function liteNamesOf(
address user,
uint256 offset,
uint256 limit
)
external
view
returns (Name[] memory names);
Parameters
| Name | Type | Description |
|---|---|---|
user | address | Account whose lite names are listed. |
offset | uint256 | Start index into the filtered sequence. |
limit | uint256 | Maximum entries to return. |
Returns
| Name | Type | Description |
|---|---|---|
names | Name[] | Page of the account's lite names; see @custom:struct Name. |
fullNamesOf
Lists the full-person names currently owned by user.
Same ownership-verified read as @custom:function liteNamesOf, keeping base-shaped labels instead of lite-shaped ones.
function fullNamesOf(
address user,
uint256 offset,
uint256 limit
)
external
view
returns (Name[] memory names);
Parameters
| Name | Type | Description |
|---|---|---|
user | address | Account whose full names are listed. |
offset | uint256 | Start index into the filtered sequence. |
limit | uint256 | Maximum entries to return. |
Returns
| Name | Type | Description |
|---|---|---|
names | Name[] | Page of the account's full names; see @custom:struct Name. |
liteNameCountOf
Counts the lite-person names currently owned by user.
Uses the same ownership-verified read as @custom:function liteNamesOf; counting scans the account's holdings, so gas grows with them. Call it off-chain.
function liteNameCountOf(address user) external view returns (uint256 count);
Parameters
| Name | Type | Description |
|---|---|---|
user | address | Account whose lite names are counted. |
Returns
| Name | Type | Description |
|---|---|---|
count | uint256 | Number of lite names currently owned. |
fullNameCountOf
Counts the full-person names currently owned by user.
Uses the same ownership-verified read as @custom:function fullNamesOf; counting scans the account's holdings, so gas grows with them. Call it off-chain.
function fullNameCountOf(address user) external view returns (uint256 count);
Parameters
| Name | Type | Description |
|---|---|---|
user | address | Account whose full names are counted. |
Returns
| Name | Type | Description |
|---|---|---|
count | uint256 | Number of full names currently owned. |
nameDetail
Returns the full on-chain record for a name given its label string.
Resolves the node internally, so a caller holding only the string needs no namehash
implementation. Never reverts on an unknown name: absent fields read as zero or empty.
This overload can populate fullClaim because it holds the label and so its labelhash.
function nameDetail(string calldata name) external view returns (NameDetail memory detail);
Parameters
| Name | Type | Description |
|---|---|---|
name | string | Bare DNS label (no TLD). |
Returns
| Name | Type | Description |
|---|---|---|
detail | NameDetail | The name's record; see @custom:struct NameDetail. |
nameDetailByNode
Returns the full on-chain record for a name given its node.
The node cannot be inverted to its labelhash, so fullClaim is populated only when
the label is independently resolvable from the node and reads zero otherwise; every other
field is resolved directly. Never reverts on an unknown node.
function nameDetailByNode(bytes32 node) external view returns (NameDetail memory detail);
Parameters
| Name | Type | Description |
|---|---|---|
node | bytes32 | namehash of the name. |
Returns
| Name | Type | Description |
|---|---|---|
detail | NameDetail | The name's record; see @custom:struct NameDetail. |
profileOf
Returns an account-level summary of a user's PoP state.
O(1) facts only; lite and full name counts are read separately via
Note: function: liteNameCountOf and @custom:function fullNameCountOf because those scan the account's holdings. Never reverts.
function profileOf(address user) external view returns (PopProfile memory profile);
Parameters
| Name | Type | Description |
|---|---|---|
user | address | Account being summarised. |
Returns
| Name | Type | Description |
|---|---|---|
profile | PopProfile | The account summary; see @custom:struct PopProfile. |
Structs
Name
One row in a per-account name listing: the name and the node used to look it up.
Computed on read; not stored. settled is false while the name still sits in the
temporary pending-claim queue and true once its label is written into a LabelStore.
deadline is the pending settlement deadline (mintedAt + reservationDuration) and is
zero for a settled name.
struct Name {
bytes32 node;
string label;
bool settled;
uint64 deadline;
}
Properties
| Name | Type | Description |
|---|---|---|
node | bytes32 | namehash of the name; the key for chat-key, link, and detail lookups. |
label | string | Full name string. |
settled | bool | Whether the label is written into a LabelStore. |
deadline | uint64 | Pending settlement deadline, or zero when settled. |
NameDetail
The full on-chain record for a single name, gathered from the registrar, the PoP resolver, and PopRules in one read.
Computed on read; not stored. Never reverts on an unminted or unsettled name: absent
fields read as zero or empty. tier classifies the label shape (the tier the name
requires), not the owner's personhood. fullClaim is keyed by the lite labelhash, which
cannot be recovered from a node alone, so it is populated by @custom:function nameDetail
and left zero by @custom:function nameDetailByNode unless the label is independently
resolvable.
struct NameDetail {
bytes32 node;
string label;
address owner;
bool exists;
bool settled;
IPopRules.PopStatus tier;
bytes chatKey;
bytes32 liteLink;
bytes32 fullClaim;
}
Properties
| Name | Type | Description |
|---|---|---|
node | bytes32 | namehash of the name. |
label | string | Full name string, or empty when the name is unminted or its claim is unsettled. |
owner | address | Current registrar owner, or the zero address when the name does not exist. |
exists | bool | Whether the name is minted. |
settled | bool | Whether the label is written into the current owner's LabelStore. |
tier | IPopRules.PopStatus | PopRules classification of the label. |
chatKey | bytes | Chat-key bytes recorded on the PoP resolver for the node. |
liteLink | bytes32 | For a full name, the linked lite labelhash; zero otherwise. |
fullClaim | bytes32 | For a lite name, the promoted full node; zero otherwise or when unresolvable from a node. |
PopProfile
An account-level summary of PoP state, gathered in one read.
Computed on read; not stored, and never reverts. Name counts are excluded because counting scans the account's holdings; read them with @custom:function liteNameCountOf and
Note: function: fullNameCountOf when required. The account's personhood tier is read separately via @custom:function IPopRules.personhoodOf, which consults the personhood precompile and so does not belong in this precompile-free summary.
struct PopProfile {
bool hasLabelStore;
uint256 pendingClaimCount;
bytes32 reservationLabelhash;
}
Properties
| Name | Type | Description |
|---|---|---|
hasLabelStore | bool | Whether the account has a deployed LabelStore. |
pendingClaimCount | uint256 | Number of claims still staged in the pending queue. |
reservationLabelhash | bytes32 | The base label the account holds a live reservation on, or zero when none. |