InternalTrait
Fully qualified path: openzeppelin_governance::governor::extensions::governor_settings::GovernorSettingsComponent::InternalTrait
pub trait InternalTrait<TContractState, +HasComponent<TContractState>, impl GovernorCountingTrait<TContractState>: GovernorCountingTrait<TContractState>, impl GovernorExecutionTrait<TContractState>: GovernorExecutionTrait<TContractState>, impl GovernorVotesTrait<TContractState>: GovernorVotesTrait<TContractState>, impl HasComponent<TContractState>: HasComponent<TContractState>, impl Governor: HasComponent<TContractState>, +Drop<TContractState>>
Trait functions
initializer
Initializes the component by setting the default values.
Requirements:
new_voting_periodmust be greater than 0.
Emits a VotingDelayUpdated, VotingPeriodUpdated, and ProposalThresholdUpdated
event.
Fully qualified path: openzeppelin_governance::governor::extensions::governor_settings::GovernorSettingsComponent::InternalTrait::initializer
fn initializer(
ref self: ComponentState<TContractState>,
new_voting_delay: u64,
new_voting_period: u64,
new_proposal_threshold: u256,
)
assert_only_governance
Wrapper for Governor::assert_only_governance.
Fully qualified path: openzeppelin_governance::governor::extensions::governor_settings::GovernorSettingsComponent::InternalTrait::assert_only_governance
fn assert_only_governance(self: @ComponentState<TContractState>)
_set_voting_delay
Internal function to update the voting delay.
NOTE: This function does not emit an event if the new voting delay is the same as the old one.
May emit a VotingDelayUpdated event.
Fully qualified path: openzeppelin_governance::governor::extensions::governor_settings::GovernorSettingsComponent::InternalTrait::_set_voting_delay
fn _set_voting_delay(ref self: ComponentState<TContractState>, new_voting_delay: u64)
_set_voting_period
Internal function to update the voting period.
Requirements:
new_voting_periodmust be greater than 0.
NOTE: This function does not emit an event if the new voting period is the same as the old one.
May emit a VotingPeriodUpdated event.
Fully qualified path: openzeppelin_governance::governor::extensions::governor_settings::GovernorSettingsComponent::InternalTrait::_set_voting_period
fn _set_voting_period(ref self: ComponentState<TContractState>, new_voting_period: u64)
_set_proposal_threshold
Internal function to update the proposal threshold.
NOTE: This function does not emit an event if the new proposal threshold is the same as the old one.
May emit a ProposalThresholdUpdated event.
Fully qualified path: openzeppelin_governance::governor::extensions::governor_settings::GovernorSettingsComponent::InternalTrait::_set_proposal_threshold
fn _set_proposal_threshold(ref self: ComponentState<TContractState>, new_proposal_threshold: u256)