SafeDiamondCutStorage
ERC-7201 namespaced storage for the SafeDiamondCut module.
Pins the Safe authority and holds the module's own append-only upgrade audit trail. APPEND-ONLY: fields are only ever added at the end — never reordered, retyped, or removed — so the ERC-7201 slot stays stable across upgrades. The slot constant is unchanged because the namespace string is unchanged.
Note:
- storage-location: erc7201:lattice.storage.SafeDiamondCut
struct SafeDiamondCutStorage {
/// @dev The pinned Safe multisig that is the sole authority for cuts / freezes / rotation. The
/// facet trusts `msg.sender == _safe`; the Safe verifies its M-of-N owner signatures off-chain
/// and on-chain in `execTransaction` and MUST dispatch with `operation = Call`.
address _safe;
/// @dev Monotonic counter of cuts applied; doubles as the latest registry version. The value
/// assigned to a cut (post-increment) IS that cut's `version`.
uint256 _cutCount;
/// @dev Append-only registry: version (1-indexed) => immutable {IUpgradeRegistry.CutRecord}.
/// Written once per successful cut and never mutated thereafter.
mapping(uint256 version => IUpgradeRegistry.CutRecord record) _cutRegistry;
/// @dev Append-only set of frozen function selectors. A selector in this set can never be the
/// target of a `Replace` or `Remove` in any future cut (the guard checks this set BEFORE
/// delegating to diamond-lib). There is deliberately no unfreeze.
EnumerableSet.Bytes4Set _frozenSelectors;
}Properties
| Name | Type | Description |
|---|---|---|
| _safe | address | |
| _cutCount | uint256 | |
| _cutRegistry | mapping(uint256 version => IUpgradeRegistry.CutRecord record) | |
| _frozenSelectors | EnumerableSet.Bytes4Set |