GovernedVaultENSInit
Title: GovernedVaultENSInit
Author: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80)
One-shot initializer for the ENS-named self-governed ERC-4626 vault diamond: runs
GovernedVaultInit's EXACT module sequence (AccessControl seeded ONCE with the diamond itself,
share token, EIP-712 domain, vote checkpoints, timelock, governor), then wires the ENS module —
the reverse registrar is stored, ENS_MANAGER_ROLE is granted to the DIAMOND ONLY (so renames pass
exclusively through a passed, timelock-executed governance proposal), and, when ensName is
non-empty, the reverse name is claimed inline. The claim works because this contract is
delegatecalled by Diamond.initialize: address(this) IS the diamond, so the registrar sees the
DIAMOND as msg.sender — exactly the self-claim that makes the diamond's addr.reverse record
resolve to ensName.
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. The inline claim mirrors
ENSReverseClaimerLib.setEnsName minus its ENS_MANAGER_ROLE gate (which checks msg.sender — the
deployer during init, deliberately NOT a role holder): cache the name (CEI), forward setName to the
registrar, emit IENSReverseClaimer.EnsNameSet. It must NOT call ENSReverseClaimerInit, which would
re-run __AccessControl_init and clobber the self-admin wiring.
Functions
init
function init(GovernedVaultENSParams calldata p) external;Parameters
| Name | Type | Description |
|---|---|---|
| p | GovernedVaultENSParams |