WhitelistUtils

Git Source

Title: WhitelistUtils

Shared read of the name whitelist's grants for the dotNS controllers.

Every controller that refuses a granted name reads the grant through this library, so the whitelist lookup and the network-without-whitelist case are handled in one place. Each controller raises its own error.

Note: security-contact: admin@parity.io

Functions

granteeOf

Returns the live grantee of the name at node, or the zero address.

A network with no whitelist configured has no grants to honour, so it returns the zero address. Reads by node, so the whitelist makes no TLD lookup of its own.

function granteeOf(
    IDotnsProtocolRegistry protocolRegistry,
    bytes32 node
)
    internal
    view
    returns (address grantee);

Parameters

NameTypeDescription
protocolRegistryIDotnsProtocolRegistryProtocol registry the whitelist is configured in.
nodebytes32Namehash of the label under the active TLD.

Returns

NameTypeDescription
granteeaddressBeneficiary of a live grant on the name, or the zero address.