pub struct BondingCurveInitializeCpiBuilder<'a, 'b> { /* private fields */ }Expand description
Instruction builder for BondingCurveInitialize via CPI.
§Accounts:
[writable, signer]authority[writable]bonding_curve[]base_mint[]quote_mint[writable]quote_vault[]authority_config[]system_program[]base_token_program[]quote_token_program[]ata_program
Implementations§
Source§impl<'a, 'b> BondingCurveInitializeCpiBuilder<'a, 'b>
impl<'a, 'b> BondingCurveInitializeCpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
The authority that is allowed to initialize a bonding curve
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 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 token mint 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
The authority 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
System 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 token program for the new token
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 token program for the quote token
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 associated token account program
pub fn start_price(&mut self, start_price: u128) -> &mut Self
pub fn end_price(&mut self, end_price: u128) -> &mut Self
pub fn control_points(&mut self, control_points: [u16; 4]) -> &mut Self
pub fn creator(&mut self, creator: Pubkey) -> &mut Self
pub fn graduation_methods( &mut self, graduation_methods: [GraduationMethod; 8], ) -> &mut Self
pub fn swap_fee_bps(&mut self, swap_fee_bps: u16) -> &mut Self
pub fn quote_fee_bps(&mut self, quote_fee_bps: u16) -> &mut Self
pub fn base_fee_bps(&mut self, base_fee_bps: u16) -> &mut Self
pub fn launch_time(&mut self, launch_time: i64) -> &mut Self
pub fn creator_reward(&mut self, creator_reward: u64) -> &mut Self
pub fn graduation_reward(&mut self, graduation_reward: u64) -> &mut Self
pub fn graduation_target(&mut self, graduation_target: u64) -> &mut Self
pub fn graduation_time(&mut self, graduation_time: i64) -> &mut Self
pub fn min_reserve_bps(&mut self, min_reserve_bps: u16) -> &mut Self
pub fn buy_requires_permission( &mut self, buy_requires_permission: bool, ) -> &mut Self
pub fn buy_permission_bitmap( &mut self, buy_permission_bitmap: [u8; 32], ) -> &mut Self
pub fn sell_requires_permission( &mut self, sell_requires_permission: bool, ) -> &mut Self
pub fn sell_permission_bitmap( &mut self, sell_permission_bitmap: [u8; 32], ) -> &mut Self
pub fn max_buy_amount(&mut self, max_buy_amount: u64) -> &mut Self
pub fn max_sell_amount(&mut self, max_sell_amount: u64) -> &mut Self
pub fn base_allocation_bps(&mut self, base_allocation_bps: u16) -> &mut Self
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 BondingCurveInitializeCpiBuilder<'a, 'b>
impl<'a, 'b> Clone for BondingCurveInitializeCpiBuilder<'a, 'b>
Source§fn clone(&self) -> BondingCurveInitializeCpiBuilder<'a, 'b>
fn clone(&self) -> BondingCurveInitializeCpiBuilder<'a, 'b>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a, 'b> Freeze for BondingCurveInitializeCpiBuilder<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for BondingCurveInitializeCpiBuilder<'a, 'b>
impl<'a, 'b> !Send for BondingCurveInitializeCpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for BondingCurveInitializeCpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for BondingCurveInitializeCpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for BondingCurveInitializeCpiBuilder<'a, 'b>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more