Skip to content
Lattice

ENSResolverInit

Git Source

Title: ENSResolverInit

Author: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80)

One-shot initializer for an ENS forward-resolution diamond — seeds AccessControl (so the registry setter is ENS_MANAGER_ROLE-gated), registers the IENSResolver interface (ERC-165), and wires the external ENS registry the facet reads resolvers from. Delegatecalled by Diamond.initialize inside the initializing window (so it must NOT open its own pre/postInitializer; each __*_init guard passes because the window is already open). Reverts ENSResolverZeroRegistry for a zero registry.

Functions

init

Runs the ENS resolver + access-control module initializers. MUST be invoked via the diamond's initialize _init delegatecall.

function init(address admin, address registry) external;

Parameters

NameTypeDescription
adminaddressThe address granted DEFAULT_ADMIN_ROLE (controls role assignment).
registryaddressThe external ENS registry the facet reads resolvers from.