GovernorParameters
GovernorParameters
Abstract contract to handle governance parameters
Based on GovernorVotesQuorumFraction
, but without being opinionated on what's the source of voting power, and extended to handle proposal thresholds too. See OpenZeppelin's GovernorVotesQuorumFraction, GovernorVotes and GovernorSettings for reference.
FRACTION_DENOMINATOR
AVERAGE_BLOCK_TIME_IN_SECONDS
quorumNumerator
proposalThresholdNumerator
QuorumNumeratorUpdated
ProposalThresholdNumeratorUpdated
VotingDelaySet
VotingPeriodSet
constructor
updateQuorumNumerator
updateProposalThresholdNumerator
setVotingDelay
Update the voting delay. This operation can only be performed through a governance proposal. Emits a VotingDelaySet
event.
setVotingPeriod
Update the voting period. This operation can only be performed through a governance proposal. Emits a VotingPeriodSet
event.
quorum
Compute the required amount of voting power to reach quorum
Parameters
blockNumber
uint256
The block number to get the quorum at
proposalThreshold
Compute the required amount of voting power to create a proposal at the last block height
This function is implemented to comply with Governor API but we we will actually use proposalThreshold(uint256 blockNumber)
, as in our DAOs the threshold amount changes according to supply.
proposalThreshold
Compute the required amount of voting power to create a proposal
Parameters
blockNumber
uint256
The block number to get the proposal threshold at
votingDelay
module:user-config
Delay, in number of block, between the proposal is created and the vote starts. This can be increassed to leave time for users to buy voting power, of delegate it, before the voting of a proposal starts.
votingPeriod
module:user-config
Delay, in number of blocks, between the vote start and vote ends.
NOTE: The {votingDelay} can delay the start of the vote. This must be considered when setting the voting duration compared to the voting delay.
_updateQuorumNumerator
_updateProposalThresholdNumerator
_setVotingDelay
_setVotingPeriod
_getPastTotalSupply
Compute the past total voting power at a particular block
Parameters
blockNumber
uint256
The block number to get the vote power at
Last updated