Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

InternalTrait

Fully qualified path: openzeppelin_governance::governor::extensions::governor_votes_quorum_fraction::GovernorVotesQuorumFractionComponent::InternalTrait

pub trait InternalTrait<TContractState, +HasComponent<TContractState>, impl GovernorVotesTrait<TContractState>: GovernorVotesTrait<TContractState>, impl Governor: HasComponent<TContractState>, +Drop<TContractState>>

Trait functions

initializer

Initializes the component by setting the votes token and the initial quorum numerator value.

Requirements:

  • votes_token must not be zero.
  • quorum_numerator must be less than quorum_denominator.

Emits a QuorumNumeratorUpdated event.

Fully qualified path: openzeppelin_governance::governor::extensions::governor_votes_quorum_fraction::GovernorVotesQuorumFractionComponent::InternalTrait::initializer

fn initializer(
    ref self: ComponentState<TContractState>, votes_token: ContractAddress, quorum_numerator: u256,
)

update_quorum_numerator

Updates the quorum numerator.

NOTE: This function does not emit an event if the new quorum numerator is the same as the old one.

Requirements:

  • new_quorum_numerator must be less than quorum_denominator.

May emit a QuorumNumeratorUpdated event.

Fully qualified path: openzeppelin_governance::governor::extensions::governor_votes_quorum_fraction::GovernorVotesQuorumFractionComponent::InternalTrait::update_quorum_numerator

fn update_quorum_numerator(ref self: ComponentState<TContractState>, new_quorum_numerator: u256)