Skip to content
Lattice

ChainRegistryInit

Git Source

Title: ChainRegistryInit

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

One-shot initializer for a chain-registry diamond — seeds AccessControl (every registry setter and the ChainRegistry.addEvmChain fan-out are DEFAULT_ADMIN_ROLE-gated) and registers the IChainRegistry interface via ERC-165. There are NO module config params: the registry starts empty and is populated post-deploy by the admin. 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).

Functions

init

Runs the access-control + chain-registry initializers. MUST be invoked via the diamond's initialize _init delegatecall.

function init(address admin) external;

Parameters

NameTypeDescription
adminaddressThe address granted DEFAULT_ADMIN_ROLE (controls every registry setter and the fan-out).