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_timelock_execution::GovernorTimelockExecutionComponent::InternalTrait

pub trait InternalTrait<TContractState, +HasComponent<TContractState>, impl GovernorSettingsTrait<TContractState>: GovernorSettingsTrait<TContractState>, impl GovernorCountingTrait<TContractState>: GovernorCountingTrait<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 timelock contract address.

Requirements:

  • timelock_controller must not be zero.

Fully qualified path: openzeppelin_governance::governor::extensions::governor_timelock_execution::GovernorTimelockExecutionComponent::InternalTrait::initializer

fn initializer(ref self: ComponentState<TContractState>, timelock_controller: ContractAddress)

assert_only_governance

Wrapper for Governor::assert_only_governance.

Fully qualified path: openzeppelin_governance::governor::extensions::governor_timelock_execution::GovernorTimelockExecutionComponent::InternalTrait::assert_only_governance

fn assert_only_governance(self: @ComponentState<TContractState>)

timelock_salt

Computes the TimelockController operation salt as the XOR of the governor address and description_hash. In the case of overflow, it is reduced modulo P.

It is computed with the governor address itself to avoid collisions across governor instances using the same timelock.

Fully qualified path: openzeppelin_governance::governor::extensions::governor_timelock_execution::GovernorTimelockExecutionComponent::InternalTrait::timelock_salt

fn timelock_salt(self: @ComponentState<TContractState>, description_hash: felt252) -> felt252

get_timelock_dispatcher

Returns the timelock contract address wrapped in a ITimelockDispatcher.

Fully qualified path: openzeppelin_governance::governor::extensions::governor_timelock_execution::GovernorTimelockExecutionComponent::InternalTrait::get_timelock_dispatcher

fn get_timelock_dispatcher(self: @ComponentState<TContractState>) -> ITimelockDispatcher

_update_timelock

Updates the timelock contract address.

Emits a TimelockUpdated event.

Fully qualified path: openzeppelin_governance::governor::extensions::governor_timelock_execution::GovernorTimelockExecutionComponent::InternalTrait::_update_timelock

fn _update_timelock(ref self: ComponentState<TContractState>, new_timelock: ContractAddress)