IThresholdGovernor
Inherits: IBatchGovernor
Author: M^0 Labs
Functions
getProposal
Returns all data of a proposal with identifier proposalId
.
Parameters
proposalId
uint256
The unique identifier for the proposal.
Returns
voteStart
uint48
The first clock value when voting on the proposal is allowed.
voteEnd
uint48
The last clock value when voting on the proposal is allowed.
state
ProposalState
The state of the proposal.
noVotes
uint256
The amount of votes cast against the proposal.
yesVotes
uint256
The amount of votes cast for the proposal.
proposer
address
The address of the account that created the proposal.
quorum
uint256
The threshold/quorum of yes votes required for the proposal to succeed.
quorumNumerator
uint16
The threshold/quorum numerator used to calculate the quorum.
thresholdRatio
Returns the threshold ratio to be applied to determine the success threshold for a proposal.
For all intents and purposes, this is the same as quorumNumerator
.
proposalQuorum
Returns the quorum of yes votes needed for a specific proposal to succeed.
Parameters
proposalId
uint256
The unique identifier for the proposal.
Returns
<none>
uint256
The quorum of yes votes needed for the proposal to succeed.
quorumNumerator
Returns the quorum numerator used to determine the quorum for a proposal.
For all intents and purposes, this is the same as thresholdRatio
.
quorumDenominator
Returns the quorum denominator used to determine the quorum for a proposal.
ONE
Returns the value used as 100%, to be used to correctly ascertain the threshold ratio.
Events
ThresholdRatioSet
Emitted when the threshold ratio is set.
Parameters
thresholdRatio
uint16
The new threshold ratio.
QuorumNumeratorUpdated
Emitted when the quorum numerator is set.
Parameters
oldQuorumNumerator
uint256
The old quorum numerator.
newQuorumNumerator
uint256
The new quorum numerator.
Errors
InvalidThresholdRatio
Revert message when trying to set the threshold ratio above 100% or below 2.71%.
Parameters
thresholdRatio
uint256
The threshold ratio being set.
minThresholdRatio
uint256
The minimum allowed threshold ratio.
maxThresholdRatio
uint256
The maximum allowed threshold ratio.