GovernedSafeDiamondCutInit
Title: GovernedSafeDiamondCutInit
Author: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80)
One-shot initializer for a Safe-gated, timelocked diamond-cut diamond — seeds AccessControl (so
guardian management + emergencyResume are DEFAULT_ADMIN_ROLE-gated), EmergencyStop, registers
the IERC165 + IDiamondCut + IDiamondLoupe ERC-165 flags, and pins the Safe authority + minimum threshold +
minimum timelock delay (the module also self-registers its own IGovernedSafeDiamondCut ERC-165
id 0xacb1aeb6). 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). Mirrors exactly what the old MockGovernedSafeDiamond.initialize did, minus the
redundant pre/postInitializer. Companion to the ERC2981Init pattern — a
first-class production deploy artifact.
Functions
init
Runs the access-control + emergency-stop + governed-Safe-cut module initializers. MUST be
invoked via the diamond's initialize _init delegatecall.
function init(address admin, address safe, uint256 minThreshold, uint256 minDelay) external;Parameters
| Name | Type | Description |
|---|---|---|
| admin | address | The address granted DEFAULT_ADMIN_ROLE (manages guardians and resumes operation). |
| safe | address | The Gnosis Safe multisig pinned as the sole scheduling/execution authority. |
| minThreshold | uint256 | The minimum signature threshold the pinned Safe must enforce. |
| minDelay | uint256 | The minimum timelock delay (seconds) between schedule and execute. |