IThresholdGovernor
Inherits: IBatchGovernor
Author: M^0 Labs
Functions
getProposal
Returns all data of a proposal with identifier proposalId
.
Parameters
Name | Type | Description |
---|---|---|
|
| The unique identifier for the proposal. |
Returns
Name | Type | Description |
---|---|---|
|
| The first clock value when voting on the proposal is allowed. |
|
| The last clock value when voting on the proposal is allowed. |
|
| The state of the proposal. |
|
| The amount of votes cast against the proposal. |
|
| The amount of votes cast for the proposal. |
|
| The address of the account that created the proposal. |
|
| The threshold/quorum of yes votes required for the proposal to succeed. |
|
| 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
Name | Type | Description |
---|---|---|
|
| The unique identifier for the proposal. |
Returns
Name | Type | Description |
---|---|---|
|
| 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
Name | Type | Description |
---|---|---|
|
| The new threshold ratio. |
QuorumNumeratorUpdated
Emitted when the quorum numerator is set.
Parameters
Name | Type | Description |
---|---|---|
|
| The old quorum numerator. |
|
| The new quorum numerator. |
Errors
InvalidThresholdRatio
Revert message when trying to set the threshold ratio above 100% or below 2.71%.
Parameters
Name | Type | Description |
---|---|---|
|
| The threshold ratio being set. |
|
| The minimum allowed threshold ratio. |
|
| The maximum allowed threshold ratio. |