GovernorCountingTrait
Fully qualified path: openzeppelin_governance::governor::governor::GovernorComponent::GovernorCountingTrait
pub trait GovernorCountingTrait<TContractState>
Trait functions
counting_mode
See interface::IGovernor::COUNTING_MODE.
Fully qualified path: openzeppelin_governance::governor::governor::GovernorComponent::GovernorCountingTrait::counting_mode
fn counting_mode(self: @ComponentState<TContractState>) -> ByteArray
count_vote
Register a vote for proposal_id by account with a given support,
voting weight and voting params.
NOTE: Support is generic and can represent various things depending on the voting system used.
Fully qualified path: openzeppelin_governance::governor::governor::GovernorComponent::GovernorCountingTrait::count_vote
fn count_vote(
ref self: ComponentState<TContractState>,
proposal_id: felt252,
account: ContractAddress,
support: u8,
total_weight: u256,
params: Span<felt252>,
) -> u256
has_voted
See interface::IGovernor::has_voted.
Fully qualified path: openzeppelin_governance::governor::governor::GovernorComponent::GovernorCountingTrait::has_voted
fn has_voted(
self: @ComponentState<TContractState>, proposal_id: felt252, account: ContractAddress,
) -> bool
quorum_reached
Returns whether amount of votes already cast passes the threshold limit.
Fully qualified path: openzeppelin_governance::governor::governor::GovernorComponent::GovernorCountingTrait::quorum_reached
fn quorum_reached(self: @ComponentState<TContractState>, proposal_id: felt252) -> bool
vote_succeeded
Returns whether the proposal is successful or not.
Fully qualified path: openzeppelin_governance::governor::governor::GovernorComponent::GovernorCountingTrait::vote_succeeded
fn vote_succeeded(self: @ComponentState<TContractState>, proposal_id: felt252) -> bool