Skip to content
Lattice

SemaphoreInit

Git Source

Title: SemaphoreInit

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

One-shot initializer for a Semaphore diamond — seeds AccessControl (so the setVerifier admin setter is DEFAULT_ADMIN_ROLE-gated) and registers the ISemaphore interface (ERC-165) with its off-chain proof verifier. 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 + Semaphore module initializers. MUST be invoked via the diamond's initialize _init delegatecall.

function init(address admin, address verifier) external;

Parameters

NameTypeDescription
adminaddressThe address granted DEFAULT_ADMIN_ROLE (controls setVerifier).
verifieraddressThe ISemaphoreVerifier contract address used to check Semaphore proofs.