Trait TimelockOps

Source
pub trait TimelockOps<C> {
    // Required methods
    fn initialize_timelock_config(
        &self,
        store: &Pubkey,
        initial_delay: u32,
    ) -> TransactionBuilder<'_, C, Pubkey>;
    fn increase_timelock_delay(
        &self,
        store: &Pubkey,
        delta: u32,
    ) -> TransactionBuilder<'_, C>;
    fn initialize_executor(
        &self,
        store: &Pubkey,
        role: &str,
    ) -> Result<TransactionBuilder<'_, C, Pubkey>>;
    fn create_timelocked_instruction(
        &self,
        store: &Pubkey,
        role: &str,
        buffer: impl Signer + 'static,
        instruction: Instruction,
    ) -> Result<TransactionBuilder<'_, C, Pubkey>>;
    fn approve_timelocked_instruction(
        &self,
        store: &Pubkey,
        buffer: &Pubkey,
        role_hint: Option<&str>,
    ) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>;
    fn approve_timelocked_instructions(
        &self,
        store: &Pubkey,
        buffers: impl IntoIterator<Item = Pubkey>,
        role_hint: Option<&str>,
    ) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>;
    fn cancel_timelocked_instruction(
        &self,
        store: &Pubkey,
        buffer: &Pubkey,
        executor_hint: Option<&Pubkey>,
        rent_receiver_hint: Option<&Pubkey>,
    ) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>;
    fn cancel_timelocked_instructions(
        &self,
        store: &Pubkey,
        buffers: impl IntoIterator<Item = Pubkey>,
        executor_hint: Option<&Pubkey>,
        rent_receiver_hint: Option<&Pubkey>,
    ) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>;
    fn execute_timelocked_instruction(
        &self,
        store: &Pubkey,
        buffer: &Pubkey,
        hint: Option<ExecuteTimelockedInstructionHint<'_>>,
    ) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>;
    fn timelock_bypassed_revoke_role(
        &self,
        store: &Pubkey,
        role: &str,
        address: &Pubkey,
    ) -> TransactionBuilder<'_, C>;
    fn timelock_bypassed_set_epxected_price_provider(
        &self,
        store: &Pubkey,
        token_map: &Pubkey,
        token: &Pubkey,
        new_expected_price_provider: PriceProviderKind,
    ) -> TransactionBuilder<'_, C>;
}
Expand description

Timelock instructions.

Required Methods§

Source

fn initialize_timelock_config( &self, store: &Pubkey, initial_delay: u32, ) -> TransactionBuilder<'_, C, Pubkey>

Initialize TimelockConfig account.

Source

fn increase_timelock_delay( &self, store: &Pubkey, delta: u32, ) -> TransactionBuilder<'_, C>

Increase timelock delay.

Source

fn initialize_executor( &self, store: &Pubkey, role: &str, ) -> Result<TransactionBuilder<'_, C, Pubkey>>

Initialize Executor account.

Source

fn create_timelocked_instruction( &self, store: &Pubkey, role: &str, buffer: impl Signer + 'static, instruction: Instruction, ) -> Result<TransactionBuilder<'_, C, Pubkey>>

Create a timelocked instruction buffer for the given instruction.

Source

fn approve_timelocked_instruction( &self, store: &Pubkey, buffer: &Pubkey, role_hint: Option<&str>, ) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>

Approve timelocked instruction.

Source

fn approve_timelocked_instructions( &self, store: &Pubkey, buffers: impl IntoIterator<Item = Pubkey>, role_hint: Option<&str>, ) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>

Approve timelocked instruction.

Source

fn cancel_timelocked_instruction( &self, store: &Pubkey, buffer: &Pubkey, executor_hint: Option<&Pubkey>, rent_receiver_hint: Option<&Pubkey>, ) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>

Cancel timelocked instruction.

Source

fn cancel_timelocked_instructions( &self, store: &Pubkey, buffers: impl IntoIterator<Item = Pubkey>, executor_hint: Option<&Pubkey>, rent_receiver_hint: Option<&Pubkey>, ) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>

Cancel timelocked instruction.

Source

fn execute_timelocked_instruction( &self, store: &Pubkey, buffer: &Pubkey, hint: Option<ExecuteTimelockedInstructionHint<'_>>, ) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>

Execute timelocked instruction.

Source

fn timelock_bypassed_revoke_role( &self, store: &Pubkey, role: &str, address: &Pubkey, ) -> TransactionBuilder<'_, C>

Timelock-bypassed revoke role.

Source

fn timelock_bypassed_set_epxected_price_provider( &self, store: &Pubkey, token_map: &Pubkey, token: &Pubkey, new_expected_price_provider: PriceProviderKind, ) -> TransactionBuilder<'_, C>

Timelock-bypassed set expected price provider.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<C: Deref<Target = impl Signer> + Clone> TimelockOps<C> for Client<C>