ENSSubnameIssuer
Inherits: IENSSubnameIssuer
Title: ENSSubnameIssuer
Authors: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80), Modified from ENS (https://github.com/ensdomains/ens-contracts), Integrates the ENS NameWrapper (https://docs.ens.domains/wrapper/overview)
Stateless Diamond facet letting a diamond that owns a parent ENS name mint subnames
(e.g. treasury.myproto.eth) via the ENS NameWrapper.
All logic lives in ENSSubnameIssuerLib. Issuance is gated on ENS_SUBNAME_ISSUER_ROLE; the
NameWrapper is supplied at init and rotated per chain via setNameWrapper.
Notes:
- lattice-version: 0.1.0
- lattice-source: Lattice original
Functions
issueSubname
Mints label.<parent> via the NameWrapper, owned by owner with resolver set.
Gated on ENS_SUBNAME_ISSUER_ROLE. The diamond must own/approve parentNode in the
NameWrapper. To make the subname forward-resolve, the owner sets the addr record on
resolver; the child sets its reverse record via a future ENS reverse-record module.
function issueSubname(
bytes32 parentNode,
string calldata label,
address owner,
address resolver,
uint64 ttl,
uint32 fuses,
uint64 expiry
) external virtual returns (bytes32);Parameters
| Name | Type | Description |
|---|---|---|
| parentNode | bytes32 | The parent name's node (wrapped + controlled by this diamond). |
| label | string | The subname label. |
| owner | address | The owner of the new subname. |
| resolver | address | The resolver to set for the new subname. |
| ttl | uint64 | The TTL for the new subname. |
| fuses | uint32 | The fuses to burn on the new subname. |
| expiry | uint64 | The expiry timestamp for the new subname. |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bytes32 | The newly created subname's node. |
setNameWrapper
Sets or rotates the NameWrapper (per-chain configuration).
Gated on ENS_SUBNAME_ISSUER_ROLE. Reverts ENSSubnameIssuerZeroNameWrapper for zero.
function setNameWrapper(address nameWrapper_) external virtual;Parameters
| Name | Type | Description |
|---|---|---|
| nameWrapper_ | address | The NameWrapper to use. |
nameWrapper
Returns the configured NameWrapper.
function nameWrapper() external view virtual returns (address);Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
exportSelectors
ERC-8153 selector export: this facet's cuttable selectors, tightly packed (4 bytes each).
Excludes exportSelectors() itself (0x0ef22643) - it is never cut into a diamond. Order matches
forge inspect ENSSubnameIssuer methodIdentifiers (alphabetical by signature); kept in exact parity by
ExportSelectorsParityTest. Chunks:
issueSubname(bytes32,string,address,address,uint64,uint32,uint64) 0xf15cd0d2
nameWrapper() 0xa8e5fbc0
setNameWrapper(address) 0x371412f1
function exportSelectors() external pure virtual returns (bytes memory selectors);Returns
| Name | Type | Description |
|---|---|---|
| selectors | bytes |