GovernorSettings
Inherits: Governor
Extension of {Governor} for settings updatable through governance.
State Variables
_proposalThreshold
uint256 private _proposalThreshold;
_votingDelay
uint48 private _votingDelay;
_votingPeriod
uint32 private _votingPeriod;
Functions
constructor
Initialize the governance parameters.
constructor(uint48 initialVotingDelay, uint32 initialVotingPeriod, uint256 initialProposalThreshold);
votingDelay
module:user-config
Delay, between the proposal is created and the vote starts. The unit this duration is expressed in depends on the clock (see ERC-6372) this contract uses. This can be increased to leave time for users to buy voting power, or delegate it, before the voting of a proposal starts. NOTE: While this interface returns a uint256, timepoints are stored as uint48 following the ERC-6372 clock type. Consequently this value must fit in a uint48 (when added to the current clock). See {IERC6372-clock}.
function votingDelay() public view virtual override returns (uint256);
votingPeriod
module:user-config
Delay between the vote start and vote end. The unit this duration is expressed in depends on the clock (see ERC-6372) this contract uses. NOTE: The {votingDelay} can delay the start of the vote. This must be considered when setting the voting duration compared to the voting delay. NOTE: This value is stored when the proposal is submitted so that possible changes to the value do not affect proposals that have already been submitted. The type used to save it is a uint32. Consequently, while this interface returns a uint256, the value it returns should fit in a uint32.
function votingPeriod() public view virtual override returns (uint256);
proposalThreshold
function proposalThreshold() public view virtual override returns (uint256);
setVotingDelay
Update the voting delay. This operation can only be performed through a governance proposal. Emits a VotingDelaySet event.
function setVotingDelay(uint48 newVotingDelay) public virtual onlyGovernance;
setVotingPeriod
Update the voting period. This operation can only be performed through a governance proposal. Emits a VotingPeriodSet event.
function setVotingPeriod(uint32 newVotingPeriod) public virtual onlyGovernance;
setProposalThreshold
Update the proposal threshold. This operation can only be performed through a governance proposal. Emits a ProposalThresholdSet event.
function setProposalThreshold(uint256 newProposalThreshold) public virtual onlyGovernance;
_setVotingDelay
Internal setter for the voting delay. Emits a VotingDelaySet event.
function _setVotingDelay(uint48 newVotingDelay) internal virtual;
_setVotingPeriod
Internal setter for the voting period. Emits a VotingPeriodSet event.
function _setVotingPeriod(uint32 newVotingPeriod) internal virtual;
_setProposalThreshold
Internal setter for the proposal threshold. Emits a ProposalThresholdSet event.
function _setProposalThreshold(uint256 newProposalThreshold) internal virtual;
Events
VotingDelaySet
event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay);
VotingPeriodSet
event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod);
ProposalThresholdSet
event ProposalThresholdSet(uint256 oldProposalThreshold, uint256 newProposalThreshold);