Skip to content
Lattice

GovernorStorage

Git Source

ERC-7201 namespaced storage for the Governor module.

Note:

  • storage-location: erc7201:lattice.storage.Governor
struct GovernorStorage {
    /// @dev Human-readable name of the governor.
    string _name;
    /// @dev IVotes token used to read voting power.
    address _token;
    /// @dev Optional TimelockController. address(0) means direct execution.
    address _timelock;
    /// @dev Delay (in clock units) before voting starts after proposal creation.
    uint48 _votingDelay;
    /// @dev Duration (in clock units) of the voting window.
    uint32 _votingPeriod;
    /// @dev Minimum voting power required to create a proposal.
    uint256 _proposalThreshold;
    /// @dev Quorum numerator (percentage points, denominator = 100).
    uint256 _quorumNumerator;
    /// @dev Proposals indexed by proposal ID.
    mapping(uint256 proposalId => ProposalCore) _proposals;
    /// @dev Vote tallies indexed by proposal ID.
    mapping(uint256 proposalId => ProposalVote) _proposalVotes;
    /// @dev Maps timelock operation ID → proposal ID for cancel tracking.
    mapping(bytes32 timelockId => uint256 proposalId) _timelockIds;
    /// @dev Maps proposal ID → timelock operation ID (reverse of _timelockIds).
    mapping(uint256 proposalId => bytes32 timelockId) _proposalTimelockIds;
    /// @dev Authorized self-call hashes during timelock execution (keccak256(calldata) → count).
    ///      Lets {_onlyGovernance} accept admin setters relayed by the timelock, but only when
    ///      they were part of a proposal executed through this governor's {execute}.
    mapping(bytes32 callHash => uint256 count) _governanceCall;
}

Properties

NameTypeDescription
_namestring
_tokenaddress
_timelockaddress
_votingDelayuint48
_votingPerioduint32
_proposalThresholduint256
_quorumNumeratoruint256
_proposalsmapping(uint256 proposalId => ProposalCore)
_proposalVotesmapping(uint256 proposalId => ProposalVote)
_timelockIdsmapping(bytes32 timelockId => uint256 proposalId)
_proposalTimelockIdsmapping(uint256 proposalId => bytes32 timelockId)
_governanceCallmapping(bytes32 callHash => uint256 count)