Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

GovernorExecutionTrait

Fully qualified path: openzeppelin_governance::governor::governor::GovernorComponent::GovernorExecutionTrait

pub trait GovernorExecutionTrait<TContractState>

Trait functions

state

See interface::IGovernor::state.

Fully qualified path: openzeppelin_governance::governor::governor::GovernorComponent::GovernorExecutionTrait::state

fn state(self: @ComponentState<TContractState>, proposal_id: felt252) -> ProposalState

executor

Address through which the governor executes action. Should be used to specify whether the module execute actions through another contract such as a timelock.

NOTE: MUST be the governor itself, or an instance of TimelockController with the governor as the only proposer, canceller, and executor.

WARNING: When the executor is not the governor itself (i.e. a timelock), it can call functions that are restricted with the assert_only_governance guard, and also potentially execute transactions on behalf of the governor. Because of this, this module is designed to work with the TimelockController as the unique potential external executor.

Fully qualified path: openzeppelin_governance::governor::governor::GovernorComponent::GovernorExecutionTrait::executor

fn executor(self: @ComponentState<TContractState>) -> ContractAddress

execute_operations

Execution mechanism. Can be used to modify the way execution is performed (for example adding a vault/timelock).

Fully qualified path: openzeppelin_governance::governor::governor::GovernorComponent::GovernorExecutionTrait::execute_operations

fn execute_operations(
    ref self: ComponentState<TContractState>,
    proposal_id: felt252,
    calls: Span<Call>,
    description_hash: felt252,
)

queue_operations

Queuing mechanism. Can be used to modify the way queuing is performed (for example adding a vault/timelock).

Requirements:

  • Must return a timestamp that describes the expected ETA for execution. If the returned value is 0, the core will consider queueing did not succeed, and the public queue function will revert.

Fully qualified path: openzeppelin_governance::governor::governor::GovernorComponent::GovernorExecutionTrait::queue_operations

fn queue_operations(
    ref self: ComponentState<TContractState>,
    proposal_id: felt252,
    calls: Span<Call>,
    description_hash: felt252,
) -> u64

proposal_needs_queuing

See interface::IGovernor::proposal_needs_queuing.

Fully qualified path: openzeppelin_governance::governor::governor::GovernorComponent::GovernorExecutionTrait::proposal_needs_queuing

fn proposal_needs_queuing(self: @ComponentState<TContractState>, proposal_id: felt252) -> bool

cancel_operations

Cancel mechanism. Can be used to modify the way canceling is performed (for example adding a vault/timelock).

Fully qualified path: openzeppelin_governance::governor::governor::GovernorComponent::GovernorExecutionTrait::cancel_operations

fn cancel_operations(
    ref self: ComponentState<TContractState>, proposal_id: felt252, description_hash: felt252,
)