Skip to content
Lattice

INameWrapper

Git Source

Title: INameWrapper

Authors: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80), Vendored minimal subset of ENS's INameWrapper (https://github.com/ensdomains/ens-contracts). Upstream license: MIT.

Minimal vendored interface for the ENS NameWrapper, used by ENSSubnameIssuer to mint subnames. Only setSubnodeRecord is declared.

VERIFY the exact setSubnodeRecord signature (parameter order, fuses/expiry widths) against the deployed NameWrapper for your target chain before mainnet use — ENS has shipped multiple NameWrapper revisions. The selector for this signature is 0x24c1af44.

Functions

setSubnodeRecord

Creates label.<parent> as a subname, setting its owner, resolver, ttl, fuses, and expiry. The caller must be authorized to modify parentNode in the NameWrapper.

function setSubnodeRecord(
        bytes32 parentNode,
        string calldata label,
        address owner,
        address resolver,
        uint64 ttl,
        uint32 fuses,
        uint64 expiry
    ) external returns (bytes32 node);

Parameters

NameTypeDescription
parentNodebytes32The namehash of the parent name (wrapped + owned/approved by the caller).
labelstringThe subname label (e.g. "treasury" for treasury.parent.eth).
owneraddressThe owner of the new subname.
resolveraddressThe resolver to set for the new subname.
ttluint64The TTL for the new subname.
fusesuint32The fuses to burn on the new subname.
expiryuint64The expiry timestamp for the new subname.

Returns

NameTypeDescription
nodebytes32The namehash of the newly created subname.