use borsh::BorshSerialize;
use borsh::BorshDeserialize;
#[derive(Debug)]
pub struct InitializePoolV2 {
pub vortex_config: solana_program::pubkey::Pubkey,
pub token_mint_a: solana_program::pubkey::Pubkey,
pub token_mint_b: solana_program::pubkey::Pubkey,
pub token_badge_a: solana_program::pubkey::Pubkey,
pub token_badge_b: solana_program::pubkey::Pubkey,
pub funder: solana_program::pubkey::Pubkey,
pub vortex: solana_program::pubkey::Pubkey,
pub token_vault_a: solana_program::pubkey::Pubkey,
pub token_vault_b: solana_program::pubkey::Pubkey,
pub cyclone_address: Option<solana_program::pubkey::Pubkey>,
pub fee_tier: solana_program::pubkey::Pubkey,
pub token_program_a: solana_program::pubkey::Pubkey,
pub token_program_b: solana_program::pubkey::Pubkey,
pub system_program: solana_program::pubkey::Pubkey,
pub rent: solana_program::pubkey::Pubkey,
}
impl InitializePoolV2 {
pub fn instruction(&self, args: InitializePoolV2InstructionArgs) -> solana_program::instruction::Instruction {
self.instruction_with_remaining_accounts(args, &[])
}
#[allow(clippy::arithmetic_side_effects)]
#[allow(clippy::vec_init_then_push)]
pub fn instruction_with_remaining_accounts(&self, args: InitializePoolV2InstructionArgs, remaining_accounts: &[solana_program::instruction::AccountMeta]) -> solana_program::instruction::Instruction {
let mut accounts = Vec::with_capacity(15+ remaining_accounts.len());
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
self.vortex_config,
false
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
self.token_mint_a,
false
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
self.token_mint_b,
false
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
self.token_badge_a,
false
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
self.token_badge_b,
false
));
accounts.push(solana_program::instruction::AccountMeta::new(
self.funder,
true
));
accounts.push(solana_program::instruction::AccountMeta::new(
self.vortex,
false
));
accounts.push(solana_program::instruction::AccountMeta::new(
self.token_vault_a,
true
));
accounts.push(solana_program::instruction::AccountMeta::new(
self.token_vault_b,
true
));
if let Some(cyclone_address) = self.cyclone_address {
accounts.push(solana_program::instruction::AccountMeta::new(
cyclone_address,
false,
));
} else {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
crate::VORTEX_ID,
false,
));
}
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
self.fee_tier,
false
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
self.token_program_a,
false
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
self.token_program_b,
false
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
self.system_program,
false
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
self.rent,
false
));
accounts.extend_from_slice(remaining_accounts);
let mut data = borsh::to_vec(&InitializePoolV2InstructionData::new()).unwrap();
let mut args = borsh::to_vec(&args).unwrap();
data.append(&mut args);
solana_program::instruction::Instruction {
program_id: crate::VORTEX_ID,
accounts,
data,
}
}
}
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct InitializePoolV2InstructionData {
discriminator: [u8; 8],
}
impl InitializePoolV2InstructionData {
pub fn new() -> Self {
Self {
discriminator: [207, 45, 87, 242, 27, 63, 204, 67],
}
}
}
impl Default for InitializePoolV2InstructionData {
fn default() -> Self {
Self::new()
}
}
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct InitializePoolV2InstructionArgs {
pub tick_spacing: u16,
pub initial_sqrt_price: u128,
}
#[derive(Clone, Debug, Default)]
pub struct InitializePoolV2Builder {
vortex_config: Option<solana_program::pubkey::Pubkey>,
token_mint_a: Option<solana_program::pubkey::Pubkey>,
token_mint_b: Option<solana_program::pubkey::Pubkey>,
token_badge_a: Option<solana_program::pubkey::Pubkey>,
token_badge_b: Option<solana_program::pubkey::Pubkey>,
funder: Option<solana_program::pubkey::Pubkey>,
vortex: Option<solana_program::pubkey::Pubkey>,
token_vault_a: Option<solana_program::pubkey::Pubkey>,
token_vault_b: Option<solana_program::pubkey::Pubkey>,
cyclone_address: Option<solana_program::pubkey::Pubkey>,
fee_tier: Option<solana_program::pubkey::Pubkey>,
token_program_a: Option<solana_program::pubkey::Pubkey>,
token_program_b: Option<solana_program::pubkey::Pubkey>,
system_program: Option<solana_program::pubkey::Pubkey>,
rent: Option<solana_program::pubkey::Pubkey>,
tick_spacing: Option<u16>,
initial_sqrt_price: Option<u128>,
__remaining_accounts: Vec<solana_program::instruction::AccountMeta>,
}
impl InitializePoolV2Builder {
pub fn new() -> Self {
Self::default()
}
#[inline(always)]
pub fn vortex_config(&mut self, vortex_config: solana_program::pubkey::Pubkey) -> &mut Self {
self.vortex_config = Some(vortex_config);
self
}
#[inline(always)]
pub fn token_mint_a(&mut self, token_mint_a: solana_program::pubkey::Pubkey) -> &mut Self {
self.token_mint_a = Some(token_mint_a);
self
}
#[inline(always)]
pub fn token_mint_b(&mut self, token_mint_b: solana_program::pubkey::Pubkey) -> &mut Self {
self.token_mint_b = Some(token_mint_b);
self
}
#[inline(always)]
pub fn token_badge_a(&mut self, token_badge_a: solana_program::pubkey::Pubkey) -> &mut Self {
self.token_badge_a = Some(token_badge_a);
self
}
#[inline(always)]
pub fn token_badge_b(&mut self, token_badge_b: solana_program::pubkey::Pubkey) -> &mut Self {
self.token_badge_b = Some(token_badge_b);
self
}
#[inline(always)]
pub fn funder(&mut self, funder: solana_program::pubkey::Pubkey) -> &mut Self {
self.funder = Some(funder);
self
}
#[inline(always)]
pub fn vortex(&mut self, vortex: solana_program::pubkey::Pubkey) -> &mut Self {
self.vortex = Some(vortex);
self
}
#[inline(always)]
pub fn token_vault_a(&mut self, token_vault_a: solana_program::pubkey::Pubkey) -> &mut Self {
self.token_vault_a = Some(token_vault_a);
self
}
#[inline(always)]
pub fn token_vault_b(&mut self, token_vault_b: solana_program::pubkey::Pubkey) -> &mut Self {
self.token_vault_b = Some(token_vault_b);
self
}
#[inline(always)]
pub fn cyclone_address(&mut self, cyclone_address: Option<solana_program::pubkey::Pubkey>) -> &mut Self {
self.cyclone_address = cyclone_address;
self
}
#[inline(always)]
pub fn fee_tier(&mut self, fee_tier: solana_program::pubkey::Pubkey) -> &mut Self {
self.fee_tier = Some(fee_tier);
self
}
#[inline(always)]
pub fn token_program_a(&mut self, token_program_a: solana_program::pubkey::Pubkey) -> &mut Self {
self.token_program_a = Some(token_program_a);
self
}
#[inline(always)]
pub fn token_program_b(&mut self, token_program_b: solana_program::pubkey::Pubkey) -> &mut Self {
self.token_program_b = Some(token_program_b);
self
}
#[inline(always)]
pub fn system_program(&mut self, system_program: solana_program::pubkey::Pubkey) -> &mut Self {
self.system_program = Some(system_program);
self
}
#[inline(always)]
pub fn rent(&mut self, rent: solana_program::pubkey::Pubkey) -> &mut Self {
self.rent = Some(rent);
self
}
#[inline(always)]
pub fn tick_spacing(&mut self, tick_spacing: u16) -> &mut Self {
self.tick_spacing = Some(tick_spacing);
self
}
#[inline(always)]
pub fn initial_sqrt_price(&mut self, initial_sqrt_price: u128) -> &mut Self {
self.initial_sqrt_price = Some(initial_sqrt_price);
self
}
#[inline(always)]
pub fn add_remaining_account(&mut self, account: solana_program::instruction::AccountMeta) -> &mut Self {
self.__remaining_accounts.push(account);
self
}
#[inline(always)]
pub fn add_remaining_accounts(&mut self, accounts: &[solana_program::instruction::AccountMeta]) -> &mut Self {
self.__remaining_accounts.extend_from_slice(accounts);
self
}
#[allow(clippy::clone_on_copy)]
pub fn instruction(&self) -> solana_program::instruction::Instruction {
let accounts = InitializePoolV2 {
vortex_config: self.vortex_config.expect("vortex_config is not set"),
token_mint_a: self.token_mint_a.expect("token_mint_a is not set"),
token_mint_b: self.token_mint_b.expect("token_mint_b is not set"),
token_badge_a: self.token_badge_a.expect("token_badge_a is not set"),
token_badge_b: self.token_badge_b.expect("token_badge_b is not set"),
funder: self.funder.expect("funder is not set"),
vortex: self.vortex.expect("vortex is not set"),
token_vault_a: self.token_vault_a.expect("token_vault_a is not set"),
token_vault_b: self.token_vault_b.expect("token_vault_b is not set"),
cyclone_address: self.cyclone_address,
fee_tier: self.fee_tier.expect("fee_tier is not set"),
token_program_a: self.token_program_a.expect("token_program_a is not set"),
token_program_b: self.token_program_b.expect("token_program_b is not set"),
system_program: self.system_program.unwrap_or(solana_program::pubkey!("11111111111111111111111111111111")),
rent: self.rent.unwrap_or(solana_program::pubkey!("SysvarRent111111111111111111111111111111111")),
};
let args = InitializePoolV2InstructionArgs {
tick_spacing: self.tick_spacing.clone().expect("tick_spacing is not set"),
initial_sqrt_price: self.initial_sqrt_price.clone().expect("initial_sqrt_price is not set"),
};
accounts.instruction_with_remaining_accounts(args, &self.__remaining_accounts)
}
}
pub struct InitializePoolV2CpiAccounts<'a, 'b> {
pub vortex_config: &'b solana_program::account_info::AccountInfo<'a>,
pub token_mint_a: &'b solana_program::account_info::AccountInfo<'a>,
pub token_mint_b: &'b solana_program::account_info::AccountInfo<'a>,
pub token_badge_a: &'b solana_program::account_info::AccountInfo<'a>,
pub token_badge_b: &'b solana_program::account_info::AccountInfo<'a>,
pub funder: &'b solana_program::account_info::AccountInfo<'a>,
pub vortex: &'b solana_program::account_info::AccountInfo<'a>,
pub token_vault_a: &'b solana_program::account_info::AccountInfo<'a>,
pub token_vault_b: &'b solana_program::account_info::AccountInfo<'a>,
pub cyclone_address: Option<&'b solana_program::account_info::AccountInfo<'a>>,
pub fee_tier: &'b solana_program::account_info::AccountInfo<'a>,
pub token_program_a: &'b solana_program::account_info::AccountInfo<'a>,
pub token_program_b: &'b solana_program::account_info::AccountInfo<'a>,
pub system_program: &'b solana_program::account_info::AccountInfo<'a>,
pub rent: &'b solana_program::account_info::AccountInfo<'a>,
}
pub struct InitializePoolV2Cpi<'a, 'b> {
pub __program: &'b solana_program::account_info::AccountInfo<'a>,
pub vortex_config: &'b solana_program::account_info::AccountInfo<'a>,
pub token_mint_a: &'b solana_program::account_info::AccountInfo<'a>,
pub token_mint_b: &'b solana_program::account_info::AccountInfo<'a>,
pub token_badge_a: &'b solana_program::account_info::AccountInfo<'a>,
pub token_badge_b: &'b solana_program::account_info::AccountInfo<'a>,
pub funder: &'b solana_program::account_info::AccountInfo<'a>,
pub vortex: &'b solana_program::account_info::AccountInfo<'a>,
pub token_vault_a: &'b solana_program::account_info::AccountInfo<'a>,
pub token_vault_b: &'b solana_program::account_info::AccountInfo<'a>,
pub cyclone_address: Option<&'b solana_program::account_info::AccountInfo<'a>>,
pub fee_tier: &'b solana_program::account_info::AccountInfo<'a>,
pub token_program_a: &'b solana_program::account_info::AccountInfo<'a>,
pub token_program_b: &'b solana_program::account_info::AccountInfo<'a>,
pub system_program: &'b solana_program::account_info::AccountInfo<'a>,
pub rent: &'b solana_program::account_info::AccountInfo<'a>,
pub __args: InitializePoolV2InstructionArgs,
}
impl<'a, 'b> InitializePoolV2Cpi<'a, 'b> {
pub fn new(
program: &'b solana_program::account_info::AccountInfo<'a>,
accounts: InitializePoolV2CpiAccounts<'a, 'b>,
args: InitializePoolV2InstructionArgs,
) -> Self {
Self {
__program: program,
vortex_config: accounts.vortex_config,
token_mint_a: accounts.token_mint_a,
token_mint_b: accounts.token_mint_b,
token_badge_a: accounts.token_badge_a,
token_badge_b: accounts.token_badge_b,
funder: accounts.funder,
vortex: accounts.vortex,
token_vault_a: accounts.token_vault_a,
token_vault_b: accounts.token_vault_b,
cyclone_address: accounts.cyclone_address,
fee_tier: accounts.fee_tier,
token_program_a: accounts.token_program_a,
token_program_b: accounts.token_program_b,
system_program: accounts.system_program,
rent: accounts.rent,
__args: args,
}
}
#[inline(always)]
pub fn invoke(&self) -> solana_program::entrypoint::ProgramResult {
self.invoke_signed_with_remaining_accounts(&[], &[])
}
#[inline(always)]
pub fn invoke_with_remaining_accounts(&self, remaining_accounts: &[(&'b solana_program::account_info::AccountInfo<'a>, bool, bool)]) -> solana_program::entrypoint::ProgramResult {
self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
}
#[inline(always)]
pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> solana_program::entrypoint::ProgramResult {
self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
}
#[allow(clippy::arithmetic_side_effects)]
#[allow(clippy::clone_on_copy)]
#[allow(clippy::vec_init_then_push)]
pub fn invoke_signed_with_remaining_accounts(
&self,
signers_seeds: &[&[&[u8]]],
remaining_accounts: &[(&'b solana_program::account_info::AccountInfo<'a>, bool, bool)]
) -> solana_program::entrypoint::ProgramResult {
let mut accounts = Vec::with_capacity(15+ remaining_accounts.len());
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*self.vortex_config.key,
false
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*self.token_mint_a.key,
false
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*self.token_mint_b.key,
false
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*self.token_badge_a.key,
false
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*self.token_badge_b.key,
false
));
accounts.push(solana_program::instruction::AccountMeta::new(
*self.funder.key,
true
));
accounts.push(solana_program::instruction::AccountMeta::new(
*self.vortex.key,
false
));
accounts.push(solana_program::instruction::AccountMeta::new(
*self.token_vault_a.key,
true
));
accounts.push(solana_program::instruction::AccountMeta::new(
*self.token_vault_b.key,
true
));
if let Some(cyclone_address) = self.cyclone_address {
accounts.push(solana_program::instruction::AccountMeta::new(
*cyclone_address.key,
false,
));
} else {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
crate::VORTEX_ID,
false,
));
}
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*self.fee_tier.key,
false
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*self.token_program_a.key,
false
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*self.token_program_b.key,
false
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*self.system_program.key,
false
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*self.rent.key,
false
));
remaining_accounts.iter().for_each(|remaining_account| {
accounts.push(solana_program::instruction::AccountMeta {
pubkey: *remaining_account.0.key,
is_signer: remaining_account.1,
is_writable: remaining_account.2,
})
});
let mut data = borsh::to_vec(&InitializePoolV2InstructionData::new()).unwrap();
let mut args = borsh::to_vec(&self.__args).unwrap();
data.append(&mut args);
let instruction = solana_program::instruction::Instruction {
program_id: crate::VORTEX_ID,
accounts,
data,
};
let mut account_infos = Vec::with_capacity(16 + remaining_accounts.len());
account_infos.push(self.__program.clone());
account_infos.push(self.vortex_config.clone());
account_infos.push(self.token_mint_a.clone());
account_infos.push(self.token_mint_b.clone());
account_infos.push(self.token_badge_a.clone());
account_infos.push(self.token_badge_b.clone());
account_infos.push(self.funder.clone());
account_infos.push(self.vortex.clone());
account_infos.push(self.token_vault_a.clone());
account_infos.push(self.token_vault_b.clone());
if let Some(cyclone_address) = self.cyclone_address {
account_infos.push(cyclone_address.clone());
}
account_infos.push(self.fee_tier.clone());
account_infos.push(self.token_program_a.clone());
account_infos.push(self.token_program_b.clone());
account_infos.push(self.system_program.clone());
account_infos.push(self.rent.clone());
remaining_accounts.iter().for_each(|remaining_account| account_infos.push(remaining_account.0.clone()));
if signers_seeds.is_empty() {
solana_program::program::invoke(&instruction, &account_infos)
} else {
solana_program::program::invoke_signed(&instruction, &account_infos, signers_seeds)
}
}
}
#[derive(Clone, Debug)]
pub struct InitializePoolV2CpiBuilder<'a, 'b> {
instruction: Box<InitializePoolV2CpiBuilderInstruction<'a, 'b>>,
}
impl<'a, 'b> InitializePoolV2CpiBuilder<'a, 'b> {
pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
let instruction = Box::new(InitializePoolV2CpiBuilderInstruction {
__program: program,
vortex_config: None,
token_mint_a: None,
token_mint_b: None,
token_badge_a: None,
token_badge_b: None,
funder: None,
vortex: None,
token_vault_a: None,
token_vault_b: None,
cyclone_address: None,
fee_tier: None,
token_program_a: None,
token_program_b: None,
system_program: None,
rent: None,
tick_spacing: None,
initial_sqrt_price: None,
__remaining_accounts: Vec::new(),
});
Self { instruction }
}
#[inline(always)]
pub fn vortex_config(&mut self, vortex_config: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.vortex_config = Some(vortex_config);
self
}
#[inline(always)]
pub fn token_mint_a(&mut self, token_mint_a: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.token_mint_a = Some(token_mint_a);
self
}
#[inline(always)]
pub fn token_mint_b(&mut self, token_mint_b: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.token_mint_b = Some(token_mint_b);
self
}
#[inline(always)]
pub fn token_badge_a(&mut self, token_badge_a: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.token_badge_a = Some(token_badge_a);
self
}
#[inline(always)]
pub fn token_badge_b(&mut self, token_badge_b: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.token_badge_b = Some(token_badge_b);
self
}
#[inline(always)]
pub fn funder(&mut self, funder: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.funder = Some(funder);
self
}
#[inline(always)]
pub fn vortex(&mut self, vortex: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.vortex = Some(vortex);
self
}
#[inline(always)]
pub fn token_vault_a(&mut self, token_vault_a: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.token_vault_a = Some(token_vault_a);
self
}
#[inline(always)]
pub fn token_vault_b(&mut self, token_vault_b: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.token_vault_b = Some(token_vault_b);
self
}
#[inline(always)]
pub fn cyclone_address(&mut self, cyclone_address: Option<&'b solana_program::account_info::AccountInfo<'a>>) -> &mut Self {
self.instruction.cyclone_address = cyclone_address;
self
}
#[inline(always)]
pub fn fee_tier(&mut self, fee_tier: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.fee_tier = Some(fee_tier);
self
}
#[inline(always)]
pub fn token_program_a(&mut self, token_program_a: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.token_program_a = Some(token_program_a);
self
}
#[inline(always)]
pub fn token_program_b(&mut self, token_program_b: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.token_program_b = Some(token_program_b);
self
}
#[inline(always)]
pub fn system_program(&mut self, system_program: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.system_program = Some(system_program);
self
}
#[inline(always)]
pub fn rent(&mut self, rent: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.rent = Some(rent);
self
}
#[inline(always)]
pub fn tick_spacing(&mut self, tick_spacing: u16) -> &mut Self {
self.instruction.tick_spacing = Some(tick_spacing);
self
}
#[inline(always)]
pub fn initial_sqrt_price(&mut self, initial_sqrt_price: u128) -> &mut Self {
self.instruction.initial_sqrt_price = Some(initial_sqrt_price);
self
}
#[inline(always)]
pub fn add_remaining_account(&mut self, account: &'b solana_program::account_info::AccountInfo<'a>, is_writable: bool, is_signer: bool) -> &mut Self {
self.instruction.__remaining_accounts.push((account, is_writable, is_signer));
self
}
#[inline(always)]
pub fn add_remaining_accounts(&mut self, accounts: &[(&'b solana_program::account_info::AccountInfo<'a>, bool, bool)]) -> &mut Self {
self.instruction.__remaining_accounts.extend_from_slice(accounts);
self
}
#[inline(always)]
pub fn invoke(&self) -> solana_program::entrypoint::ProgramResult {
self.invoke_signed(&[])
}
#[allow(clippy::clone_on_copy)]
#[allow(clippy::vec_init_then_push)]
pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> solana_program::entrypoint::ProgramResult {
let args = InitializePoolV2InstructionArgs {
tick_spacing: self.instruction.tick_spacing.clone().expect("tick_spacing is not set"),
initial_sqrt_price: self.instruction.initial_sqrt_price.clone().expect("initial_sqrt_price is not set"),
};
let instruction = InitializePoolV2Cpi {
__program: self.instruction.__program,
vortex_config: self.instruction.vortex_config.expect("vortex_config is not set"),
token_mint_a: self.instruction.token_mint_a.expect("token_mint_a is not set"),
token_mint_b: self.instruction.token_mint_b.expect("token_mint_b is not set"),
token_badge_a: self.instruction.token_badge_a.expect("token_badge_a is not set"),
token_badge_b: self.instruction.token_badge_b.expect("token_badge_b is not set"),
funder: self.instruction.funder.expect("funder is not set"),
vortex: self.instruction.vortex.expect("vortex is not set"),
token_vault_a: self.instruction.token_vault_a.expect("token_vault_a is not set"),
token_vault_b: self.instruction.token_vault_b.expect("token_vault_b is not set"),
cyclone_address: self.instruction.cyclone_address,
fee_tier: self.instruction.fee_tier.expect("fee_tier is not set"),
token_program_a: self.instruction.token_program_a.expect("token_program_a is not set"),
token_program_b: self.instruction.token_program_b.expect("token_program_b is not set"),
system_program: self.instruction.system_program.expect("system_program is not set"),
rent: self.instruction.rent.expect("rent is not set"),
__args: args,
};
instruction.invoke_signed_with_remaining_accounts(signers_seeds, &self.instruction.__remaining_accounts)
}
}
#[derive(Clone, Debug)]
struct InitializePoolV2CpiBuilderInstruction<'a, 'b> {
__program: &'b solana_program::account_info::AccountInfo<'a>,
vortex_config: Option<&'b solana_program::account_info::AccountInfo<'a>>,
token_mint_a: Option<&'b solana_program::account_info::AccountInfo<'a>>,
token_mint_b: Option<&'b solana_program::account_info::AccountInfo<'a>>,
token_badge_a: Option<&'b solana_program::account_info::AccountInfo<'a>>,
token_badge_b: Option<&'b solana_program::account_info::AccountInfo<'a>>,
funder: Option<&'b solana_program::account_info::AccountInfo<'a>>,
vortex: Option<&'b solana_program::account_info::AccountInfo<'a>>,
token_vault_a: Option<&'b solana_program::account_info::AccountInfo<'a>>,
token_vault_b: Option<&'b solana_program::account_info::AccountInfo<'a>>,
cyclone_address: Option<&'b solana_program::account_info::AccountInfo<'a>>,
fee_tier: Option<&'b solana_program::account_info::AccountInfo<'a>>,
token_program_a: Option<&'b solana_program::account_info::AccountInfo<'a>>,
token_program_b: Option<&'b solana_program::account_info::AccountInfo<'a>>,
system_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
rent: Option<&'b solana_program::account_info::AccountInfo<'a>>,
tick_spacing: Option<u16>,
initial_sqrt_price: Option<u128>,
__remaining_accounts: Vec<(&'b solana_program::account_info::AccountInfo<'a>, bool, bool)>,
}