Enum spl_governance::state::enums::VoteThreshold
source · pub enum VoteThreshold {
YesVotePercentage(u8),
QuorumPercentage(u8),
Disabled,
}
Expand description
The type of the vote threshold used to resolve a vote on a Proposal
Note: In the current version only YesVotePercentage and Disabled thresholds are supported
Variants§
YesVotePercentage(u8)
Voting threshold of Yes votes in % required to tip the vote (Approval Quorum) It’s the percentage of tokens out of the entire pool of governance tokens eligible to vote Note: If the threshold is below or equal to 50% then an even split of votes ex: 50:50 or 40:40 is always resolved as Defeated In other words a ‘+1 vote’ tie breaker is always required to have a successful vote
QuorumPercentage(u8)
The minimum number of votes in % out of the entire pool of governance tokens eligible to vote which must be cast for the vote to be valid Once the quorum is achieved a simple majority (50%+1) of Yes votes is required for the vote to succeed Note: Quorum is not implemented in the current version
Disabled
Disabled vote threshold indicates the given voting population (community or council) is not allowed to vote on proposals for the given Governance
Trait Implementations§
source§impl BorshDeserialize for VoteThresholdwhere
u8: BorshDeserialize,
impl BorshDeserialize for VoteThresholdwhere
u8: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSchema for VoteThreshold
impl BorshSchema for VoteThreshold
source§fn declaration() -> Declaration
fn declaration() -> Declaration
source§fn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>
)
fn add_definitions_recursively( definitions: &mut HashMap<Declaration, Definition> )
source§fn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition>
)
fn add_definition( declaration: String, definition: Definition, definitions: &mut HashMap<String, Definition> )
fn schema_container() -> BorshSchemaContainer
source§impl BorshSerialize for VoteThresholdwhere
u8: BorshSerialize,
impl BorshSerialize for VoteThresholdwhere
u8: BorshSerialize,
source§impl Clone for VoteThreshold
impl Clone for VoteThreshold
source§fn clone(&self) -> VoteThreshold
fn clone(&self) -> VoteThreshold
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for VoteThreshold
impl Debug for VoteThreshold
source§impl EnumExt for VoteThresholdwhere
u8: BorshDeserialize,
impl EnumExt for VoteThresholdwhere
u8: BorshDeserialize,
source§impl PartialEq for VoteThreshold
impl PartialEq for VoteThreshold
source§fn eq(&self, other: &VoteThreshold) -> bool
fn eq(&self, other: &VoteThreshold) -> bool
self
and other
values to be equal, and is used
by ==
.