ProgramTestContextExt

Trait ProgramTestContextExt 

Source
pub trait ProgramTestContextExt {
    // Required methods
    fn mint_tokens<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 mut self,
        mint_authority: &'life1 Keypair,
        mint_pubkey: &'life2 Pubkey,
        token_account: &'life3 Pubkey,
        amount: u64,
    ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn get_token_account<'life0, 'async_trait>(
        &'life0 mut self,
        key: Pubkey,
    ) -> Pin<Box<dyn Future<Output = Result<Account, TestError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn sign_send_instructions<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 mut self,
        instructions: &'life1 [Instruction],
        signers: &'life2 [&'life3 Keypair],
    ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn warp_to_timestamp<'life0, 'async_trait>(
        &'life0 mut self,
        timestamp: i64,
    ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn initialize_token_accounts<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        mint: Pubkey,
        owners: &'life1 [Pubkey],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Pubkey>, TestError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_current_timestamp<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<i64, TestError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn initialize_new_account<'life0, 'async_trait>(
        &'life0 mut self,
        space: usize,
        program_id: Pubkey,
    ) -> Pin<Box<dyn Future<Output = Result<Pubkey, TestError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn mint_tokens<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, mint_authority: &'life1 Keypair, mint_pubkey: &'life2 Pubkey, token_account: &'life3 Pubkey, amount: u64, ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn get_token_account<'life0, 'async_trait>( &'life0 mut self, key: Pubkey, ) -> Pin<Box<dyn Future<Output = Result<Account, TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn sign_send_instructions<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, instructions: &'life1 [Instruction], signers: &'life2 [&'life3 Keypair], ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn warp_to_timestamp<'life0, 'async_trait>( &'life0 mut self, timestamp: i64, ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn initialize_token_accounts<'life0, 'life1, 'async_trait>( &'life0 mut self, mint: Pubkey, owners: &'life1 [Pubkey], ) -> Pin<Box<dyn Future<Output = Result<Vec<Pubkey>, TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_current_timestamp<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<i64, TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn initialize_new_account<'life0, 'async_trait>( &'life0 mut self, space: usize, program_id: Pubkey, ) -> Pin<Box<dyn Future<Output = Result<Pubkey, TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementations on Foreign Types§

Source§

impl ProgramTestContextExt for ProgramTestContext

Source§

fn mint_tokens<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, mint_authority: &'life1 Keypair, mint_pubkey: &'life2 Pubkey, token_account: &'life3 Pubkey, amount: u64, ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn get_token_account<'life0, 'async_trait>( &'life0 mut self, key: Pubkey, ) -> Pin<Box<dyn Future<Output = Result<Account, TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn sign_send_instructions<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, instructions: &'life1 [Instruction], signers: &'life2 [&'life3 Keypair], ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn warp_to_timestamp<'life0, 'async_trait>( &'life0 mut self, timestamp: i64, ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn initialize_token_accounts<'life0, 'life1, 'async_trait>( &'life0 mut self, mint: Pubkey, owners: &'life1 [Pubkey], ) -> Pin<Box<dyn Future<Output = Result<Vec<Pubkey>, TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_current_timestamp<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<i64, TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn initialize_new_account<'life0, 'async_trait>( &'life0 mut self, space: usize, program_id: Pubkey, ) -> Pin<Box<dyn Future<Output = Result<Pubkey, TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§