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§
Sourcefn initialize_timelock_config(
&self,
store: &Pubkey,
initial_delay: u32,
) -> TransactionBuilder<'_, C, Pubkey>
fn initialize_timelock_config( &self, store: &Pubkey, initial_delay: u32, ) -> TransactionBuilder<'_, C, Pubkey>
Initialize TimelockConfig
account.
Sourcefn increase_timelock_delay(
&self,
store: &Pubkey,
delta: u32,
) -> TransactionBuilder<'_, C>
fn increase_timelock_delay( &self, store: &Pubkey, delta: u32, ) -> TransactionBuilder<'_, C>
Increase timelock delay.
Sourcefn initialize_executor(
&self,
store: &Pubkey,
role: &str,
) -> Result<TransactionBuilder<'_, C, Pubkey>>
fn initialize_executor( &self, store: &Pubkey, role: &str, ) -> Result<TransactionBuilder<'_, C, Pubkey>>
Initialize Executor
account.
Sourcefn create_timelocked_instruction(
&self,
store: &Pubkey,
role: &str,
buffer: impl Signer + 'static,
instruction: Instruction,
) -> Result<TransactionBuilder<'_, C, Pubkey>>
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.
Sourcefn approve_timelocked_instruction(
&self,
store: &Pubkey,
buffer: &Pubkey,
role_hint: Option<&str>,
) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>
fn approve_timelocked_instruction( &self, store: &Pubkey, buffer: &Pubkey, role_hint: Option<&str>, ) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>
Approve timelocked instruction.
Sourcefn approve_timelocked_instructions(
&self,
store: &Pubkey,
buffers: impl IntoIterator<Item = 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>>>
Approve timelocked instruction.
Sourcefn 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_instruction( &self, store: &Pubkey, buffer: &Pubkey, executor_hint: Option<&Pubkey>, rent_receiver_hint: Option<&Pubkey>, ) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>
Cancel timelocked instruction.
Sourcefn 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 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.
Sourcefn execute_timelocked_instruction(
&self,
store: &Pubkey,
buffer: &Pubkey,
hint: Option<ExecuteTimelockedInstructionHint<'_>>,
) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>
fn execute_timelocked_instruction( &self, store: &Pubkey, buffer: &Pubkey, hint: Option<ExecuteTimelockedInstructionHint<'_>>, ) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>
Execute timelocked instruction.
Sourcefn timelock_bypassed_revoke_role(
&self,
store: &Pubkey,
role: &str,
address: &Pubkey,
) -> TransactionBuilder<'_, C>
fn timelock_bypassed_revoke_role( &self, store: &Pubkey, role: &str, address: &Pubkey, ) -> TransactionBuilder<'_, C>
Timelock-bypassed revoke role.
Sourcefn timelock_bypassed_set_epxected_price_provider(
&self,
store: &Pubkey,
token_map: &Pubkey,
token: &Pubkey,
new_expected_price_provider: PriceProviderKind,
) -> TransactionBuilder<'_, C>
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.