Skip to content
Lattice

GovernedVaultInit

Git Source

Title: GovernedVaultInit

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

One-shot initializer for the self-governed ERC-4626 vault diamond. Runs every module initializer in dependency order inside a single initializing window. The SELF-REFERENTIAL wiring is the crux: this contract is delegatecalled by Diamond.initialize, so address(this) IS the diamond — the Governor's vote token and timelock are both set to it, the timelock's sole proposer is it (so the Governor can queue), and its DEFAULT_ADMIN_ROLE (the vault's strategy-admin gate) is held by it (i.e. only reachable through a passed, timelock-executed proposal). Execution is left OPEN (executor = address(0)), so anyone may execute a queued proposal once its delay elapses and until its 14-day grace period ends; after that the proposal is Expired and the timelock refuses it.

Delegatecalled inside the diamond's initializing window — each __*_init guard passes because the window is already open; it must NOT open its own pre/postInitializer.

Functions

init

function init(GovernedVaultParams calldata p) external;

Parameters

NameTypeDescription
pGovernedVaultParams