IDotnsProtocolRegistry
Title: IDotnsProtocolRegistry
Author: Parity
Interface for the DotNS protocol-level address registry.
Single source of truth for sibling lookups. Contracts resolve each other via well-known
bytes32 constants in DotnsConstants so an upgrade or rewire only mutates the
registry, never the consumers.
Note: security-contact: admin@parity.io
Functions
get
Returns the address stored for a given key.
Returns address(0) when the key is unset; callers must validate when non-zero is
required.
function get(bytes32 key) external view returns (address addr);
set
Sets or updates the address for a given key.
Owner-restricted, otherwise @custom:reverts OwnableUnauthorizedAccount. addr
must be non-zero, otherwise @custom:reverts ZeroAddress. Idempotent when the new
value matches the stored one (no event emitted in that case). Maintains a
per-address refcount so the same contract can occupy multiple keys without losing
its registered status until every key is rewired. Emits
Note: emits: AddressUpdated on each effective change.
function set(bytes32 key, address addr) external;
isRegisteredAddress
Returns true iff addr is currently registered under at least one well-known key.
O(1) refcount-backed lookup. Canonical peer-trust check consumed by LabelStore
writes and StoreFactory deploys; only addresses governance has actively
registered return true. Treats address(0) as never registered regardless of
refcount.
function isRegisteredAddress(address addr) external view returns (bool registered);
Events
AddressUpdated
Emitted when a protocol address is set or updated.
event AddressUpdated(bytes32 indexed key, address indexed addr);
Errors
ZeroAddress
Thrown when a zero address is provided where one is not allowed.
error ZeroAddress();