pub struct TokenCreateCpiBuilder<'a, 'b> { /* private fields */ }Expand description
Instruction builder for TokenCreate via CPI.
§Accounts:
[writable, signer]creator[writable]bonding_curve[writable, signer]base_mint[]quote_mint[writable]quote_vault[]config[]mint_config[writable]metadata[]system_program[]base_token_program[]quote_token_program[]ata_program[]metaplex_program
Implementations§
Source§impl<'a, 'b> TokenCreateCpiBuilder<'a, 'b>
impl<'a, 'b> TokenCreateCpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
Sourcepub fn creator(&mut self, creator: &'b AccountInfo<'a>) -> &mut Self
pub fn creator(&mut self, creator: &'b AccountInfo<'a>) -> &mut Self
The creator 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 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
Sourcepub fn config(&mut self, config: &'b AccountInfo<'a>) -> &mut Self
pub fn config(&mut self, config: &'b AccountInfo<'a>) -> &mut Self
The config account
Sourcepub fn mint_config(&mut self, mint_config: &'b AccountInfo<'a>) -> &mut Self
pub fn mint_config(&mut self, mint_config: &'b AccountInfo<'a>) -> &mut Self
The base token mint config account
Sourcepub fn metadata(&mut self, metadata: &'b AccountInfo<'a>) -> &mut Self
pub fn metadata(&mut self, metadata: &'b AccountInfo<'a>) -> &mut Self
The metadata 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
Sourcepub fn metaplex_program(
&mut self,
metaplex_program: &'b AccountInfo<'a>,
) -> &mut Self
pub fn metaplex_program( &mut self, metaplex_program: &'b AccountInfo<'a>, ) -> &mut Self
The metaplex metadata program
pub fn name(&mut self, name: String) -> &mut Self
pub fn symbol(&mut self, symbol: String) -> &mut Self
pub fn uri(&mut self, uri: String) -> &mut Self
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
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 TokenCreateCpiBuilder<'a, 'b>
impl<'a, 'b> Clone for TokenCreateCpiBuilder<'a, 'b>
Source§fn clone(&self) -> TokenCreateCpiBuilder<'a, 'b>
fn clone(&self) -> TokenCreateCpiBuilder<'a, 'b>
Returns a copy 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 TokenCreateCpiBuilder<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for TokenCreateCpiBuilder<'a, 'b>
impl<'a, 'b> !Send for TokenCreateCpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for TokenCreateCpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for TokenCreateCpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for TokenCreateCpiBuilder<'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