pub struct GraduateWhirlpoolCpiBuilder<'a, 'b> { /* private fields */ }Expand description
Instruction builder for GraduateWhirlpool via CPI.
§Accounts:
[writable, signer]signer[]lp_authority[writable]bonding_curve[]quote_mint[writable]quote_vault[writable]signer_quote_ata[writable]lp_authority_quote_ata[writable]whirlpool_quote_vault[writable]base_mint[writable]base_vault[writable]lp_authority_base_ata[writable]whirlpool_base_vault[]whirlpool_config[]fee_tier[writable]whirlpool[writable]oracle[writable]position[writable]position_mint[writable]position_token_account[writable]lp_authority_token_account[writable]lower_tick_array[writable]upper_tick_array[]quote_token_badge[]base_token_badge[]whirlpool_init_authority[]whirlpool_update_authority[writable]lock_config[]system_program[]ata_program[]quote_token_program[]base_token_program[]token22_program[]memo_program[]whirlpool_program[]rent
Implementations§
Source§impl<'a, 'b> GraduateWhirlpoolCpiBuilder<'a, 'b>
impl<'a, 'b> GraduateWhirlpoolCpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
Sourcepub fn signer(&mut self, signer: &'b AccountInfo<'a>) -> &mut Self
pub fn signer(&mut self, signer: &'b AccountInfo<'a>) -> &mut Self
The signer of the transaction
The lp authority of the token
Sourcepub fn bonding_curve(&mut self, bonding_curve: &'b AccountInfo<'a>) -> &mut Self
pub fn bonding_curve(&mut self, bonding_curve: &'b AccountInfo<'a>) -> &mut Self
The bonding curve account
Sourcepub fn quote_mint(&mut self, quote_mint: &'b AccountInfo<'a>) -> &mut Self
pub fn quote_mint(&mut self, quote_mint: &'b AccountInfo<'a>) -> &mut Self
The quote token mint account
Sourcepub fn quote_vault(&mut self, quote_vault: &'b AccountInfo<'a>) -> &mut Self
pub fn quote_vault(&mut self, quote_vault: &'b AccountInfo<'a>) -> &mut Self
The quote token vault
Sourcepub fn signer_quote_ata(
&mut self,
signer_quote_ata: &'b AccountInfo<'a>,
) -> &mut Self
pub fn signer_quote_ata( &mut self, signer_quote_ata: &'b AccountInfo<'a>, ) -> &mut Self
The quote token ata account
The lp authority quote token ata account
Sourcepub fn whirlpool_quote_vault(
&mut self,
whirlpool_quote_vault: &'b AccountInfo<'a>,
) -> &mut Self
pub fn whirlpool_quote_vault( &mut self, whirlpool_quote_vault: &'b AccountInfo<'a>, ) -> &mut Self
The whirlpool quote vault account
Sourcepub fn base_mint(&mut self, base_mint: &'b AccountInfo<'a>) -> &mut Self
pub fn base_mint(&mut self, base_mint: &'b AccountInfo<'a>) -> &mut Self
The base token mint account
Sourcepub fn base_vault(&mut self, base_vault: &'b AccountInfo<'a>) -> &mut Self
pub fn base_vault(&mut self, base_vault: &'b AccountInfo<'a>) -> &mut Self
The config base vault account
The lp authority base token ata account
Sourcepub fn whirlpool_base_vault(
&mut self,
whirlpool_base_vault: &'b AccountInfo<'a>,
) -> &mut Self
pub fn whirlpool_base_vault( &mut self, whirlpool_base_vault: &'b AccountInfo<'a>, ) -> &mut Self
The whirlpool base vault account
Sourcepub fn whirlpool_config(
&mut self,
whirlpool_config: &'b AccountInfo<'a>,
) -> &mut Self
pub fn whirlpool_config( &mut self, whirlpool_config: &'b AccountInfo<'a>, ) -> &mut Self
The whirlpool config account
Sourcepub fn fee_tier(&mut self, fee_tier: &'b AccountInfo<'a>) -> &mut Self
pub fn fee_tier(&mut self, fee_tier: &'b AccountInfo<'a>) -> &mut Self
The fee tier account
Sourcepub fn whirlpool(&mut self, whirlpool: &'b AccountInfo<'a>) -> &mut Self
pub fn whirlpool(&mut self, whirlpool: &'b AccountInfo<'a>) -> &mut Self
The whirlpool account
Sourcepub fn oracle(&mut self, oracle: &'b AccountInfo<'a>) -> &mut Self
pub fn oracle(&mut self, oracle: &'b AccountInfo<'a>) -> &mut Self
The whirlpool oracle account
Sourcepub fn position(&mut self, position: &'b AccountInfo<'a>) -> &mut Self
pub fn position(&mut self, position: &'b AccountInfo<'a>) -> &mut Self
The position account
Sourcepub fn position_mint(&mut self, position_mint: &'b AccountInfo<'a>) -> &mut Self
pub fn position_mint(&mut self, position_mint: &'b AccountInfo<'a>) -> &mut Self
The position mint account
Sourcepub fn position_token_account(
&mut self,
position_token_account: &'b AccountInfo<'a>,
) -> &mut Self
pub fn position_token_account( &mut self, position_token_account: &'b AccountInfo<'a>, ) -> &mut Self
The position token account for the bonding curve
The position token account for the lp authority
Sourcepub fn lower_tick_array(
&mut self,
lower_tick_array: &'b AccountInfo<'a>,
) -> &mut Self
pub fn lower_tick_array( &mut self, lower_tick_array: &'b AccountInfo<'a>, ) -> &mut Self
The lower tick array account
Sourcepub fn upper_tick_array(
&mut self,
upper_tick_array: &'b AccountInfo<'a>,
) -> &mut Self
pub fn upper_tick_array( &mut self, upper_tick_array: &'b AccountInfo<'a>, ) -> &mut Self
The upper tick array account
Sourcepub fn quote_token_badge(
&mut self,
quote_token_badge: &'b AccountInfo<'a>,
) -> &mut Self
pub fn quote_token_badge( &mut self, quote_token_badge: &'b AccountInfo<'a>, ) -> &mut Self
The quote token badge account
Sourcepub fn base_token_badge(
&mut self,
base_token_badge: &'b AccountInfo<'a>,
) -> &mut Self
pub fn base_token_badge( &mut self, base_token_badge: &'b AccountInfo<'a>, ) -> &mut Self
The base token badge account
The whirlpool init authority account
The whirlpool update authority account
Sourcepub fn lock_config(&mut self, lock_config: &'b AccountInfo<'a>) -> &mut Self
pub fn lock_config(&mut self, lock_config: &'b AccountInfo<'a>) -> &mut Self
The lock config account
Sourcepub fn system_program(
&mut self,
system_program: &'b AccountInfo<'a>,
) -> &mut Self
pub fn system_program( &mut self, system_program: &'b AccountInfo<'a>, ) -> &mut Self
The system program
Sourcepub fn ata_program(&mut self, ata_program: &'b AccountInfo<'a>) -> &mut Self
pub fn ata_program(&mut self, ata_program: &'b AccountInfo<'a>) -> &mut Self
The ata program
Sourcepub fn quote_token_program(
&mut self,
quote_token_program: &'b AccountInfo<'a>,
) -> &mut Self
pub fn quote_token_program( &mut self, quote_token_program: &'b AccountInfo<'a>, ) -> &mut Self
The quote token program
Sourcepub fn base_token_program(
&mut self,
base_token_program: &'b AccountInfo<'a>,
) -> &mut Self
pub fn base_token_program( &mut self, base_token_program: &'b AccountInfo<'a>, ) -> &mut Self
The base token program
Sourcepub fn token22_program(
&mut self,
token22_program: &'b AccountInfo<'a>,
) -> &mut Self
pub fn token22_program( &mut self, token22_program: &'b AccountInfo<'a>, ) -> &mut Self
The token 22 program
Sourcepub fn memo_program(&mut self, memo_program: &'b AccountInfo<'a>) -> &mut Self
pub fn memo_program(&mut self, memo_program: &'b AccountInfo<'a>) -> &mut Self
The memo program
Sourcepub fn whirlpool_program(
&mut self,
whirlpool_program: &'b AccountInfo<'a>,
) -> &mut Self
pub fn whirlpool_program( &mut self, whirlpool_program: &'b AccountInfo<'a>, ) -> &mut Self
The whirlpool program
Sourcepub fn rent(&mut self, rent: &'b AccountInfo<'a>) -> &mut Self
pub fn rent(&mut self, rent: &'b AccountInfo<'a>) -> &mut Self
The rent sysvar
Sourcepub fn add_remaining_account(
&mut self,
account: &'b AccountInfo<'a>,
is_writable: bool,
is_signer: bool,
) -> &mut Self
pub fn add_remaining_account( &mut self, account: &'b AccountInfo<'a>, is_writable: bool, is_signer: bool, ) -> &mut Self
Add an additional account to the instruction.
Sourcepub fn add_remaining_accounts(
&mut self,
accounts: &[(&'b AccountInfo<'a>, bool, bool)],
) -> &mut Self
pub fn add_remaining_accounts( &mut self, accounts: &[(&'b AccountInfo<'a>, bool, bool)], ) -> &mut Self
Add additional accounts to the instruction.
Each account is represented by a tuple of the AccountInfo, a bool indicating whether the account is writable or not,
and a bool indicating whether the account is a signer or not.
pub fn invoke(&self) -> ProgramResult
pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> ProgramResult
Trait Implementations§
Source§impl<'a, 'b> Clone for GraduateWhirlpoolCpiBuilder<'a, 'b>
impl<'a, 'b> Clone for GraduateWhirlpoolCpiBuilder<'a, 'b>
Source§fn clone(&self) -> GraduateWhirlpoolCpiBuilder<'a, 'b>
fn clone(&self) -> GraduateWhirlpoolCpiBuilder<'a, 'b>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more