pub struct CreatePresaleBuilder { /* private fields */ }Expand description
Instruction builder for CreatePresale.
§Accounts:
[writable, signer]creator[writable]bonding_curve[writable, signer]base_mint[]quote_mint[writable]quote_vault[]mint_config[writable]metadata[optional]system_program (default to11111111111111111111111111111111)[]base_token_program[]quote_token_program[optional]ata_program (default toATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL)[]metaplex_program
Implementations§
Source§impl CreatePresaleBuilder
impl CreatePresaleBuilder
pub fn new() -> Self
Sourcepub fn bonding_curve(&mut self, bonding_curve: Pubkey) -> &mut Self
pub fn bonding_curve(&mut self, bonding_curve: Pubkey) -> &mut Self
The bonding curve account
Sourcepub fn quote_mint(&mut self, quote_mint: Pubkey) -> &mut Self
pub fn quote_mint(&mut self, quote_mint: Pubkey) -> &mut Self
The quote token mint account
Sourcepub fn quote_vault(&mut self, quote_vault: Pubkey) -> &mut Self
pub fn quote_vault(&mut self, quote_vault: Pubkey) -> &mut Self
The quote token vault
Sourcepub fn mint_config(&mut self, mint_config: Pubkey) -> &mut Self
pub fn mint_config(&mut self, mint_config: Pubkey) -> &mut Self
The base token mint config account
Sourcepub fn system_program(&mut self, system_program: Pubkey) -> &mut Self
pub fn system_program(&mut self, system_program: Pubkey) -> &mut Self
[optional account, default to '11111111111111111111111111111111']
System program
Sourcepub fn base_token_program(&mut self, base_token_program: Pubkey) -> &mut Self
pub fn base_token_program(&mut self, base_token_program: Pubkey) -> &mut Self
The token program for the new token
Sourcepub fn quote_token_program(&mut self, quote_token_program: Pubkey) -> &mut Self
pub fn quote_token_program(&mut self, quote_token_program: Pubkey) -> &mut Self
The token program for the quote token
Sourcepub fn ata_program(&mut self, ata_program: Pubkey) -> &mut Self
pub fn ata_program(&mut self, ata_program: Pubkey) -> &mut Self
[optional account, default to 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL']
The associated token account program
Sourcepub fn metaplex_program(&mut self, metaplex_program: Pubkey) -> &mut Self
pub fn metaplex_program(&mut self, metaplex_program: Pubkey) -> &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
Sourcepub fn token_price(&mut self, token_price: u128) -> &mut Self
pub fn token_price(&mut self, token_price: u128) -> &mut Self
[optional argument]
Sourcepub fn graduation_target(&mut self, graduation_target: u64) -> &mut Self
pub fn graduation_target(&mut self, graduation_target: u64) -> &mut Self
[optional argument]
Sourcepub fn graduation_methods(
&mut self,
graduation_methods: [GraduationMethod; 8],
) -> &mut Self
pub fn graduation_methods( &mut self, graduation_methods: [GraduationMethod; 8], ) -> &mut Self
[optional argument]
Sourcepub fn launch_time(&mut self, launch_time: i64) -> &mut Self
pub fn launch_time(&mut self, launch_time: i64) -> &mut Self
[optional argument]
Sourcepub fn graduation_time(&mut self, graduation_time: i64) -> &mut Self
pub fn graduation_time(&mut self, graduation_time: i64) -> &mut Self
[optional argument]
Sourcepub fn min_reserve_bps(&mut self, min_reserve_bps: u16) -> &mut Self
pub fn min_reserve_bps(&mut self, min_reserve_bps: u16) -> &mut Self
[optional argument]
Sourcepub fn base_allocation_bps(&mut self, base_allocation_bps: u16) -> &mut Self
pub fn base_allocation_bps(&mut self, base_allocation_bps: u16) -> &mut Self
[optional argument]
Sourcepub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
pub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
Add an additional account to the instruction.
Sourcepub fn add_remaining_accounts(&mut self, accounts: &[AccountMeta]) -> &mut Self
pub fn add_remaining_accounts(&mut self, accounts: &[AccountMeta]) -> &mut Self
Add additional accounts to the instruction.
pub fn instruction(&self) -> Instruction
Trait Implementations§
Source§impl Clone for CreatePresaleBuilder
impl Clone for CreatePresaleBuilder
Source§fn clone(&self) -> CreatePresaleBuilder
fn clone(&self) -> CreatePresaleBuilder
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 moreSource§impl Debug for CreatePresaleBuilder
impl Debug for CreatePresaleBuilder
Source§impl Default for CreatePresaleBuilder
impl Default for CreatePresaleBuilder
Source§fn default() -> CreatePresaleBuilder
fn default() -> CreatePresaleBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CreatePresaleBuilder
impl RefUnwindSafe for CreatePresaleBuilder
impl Send for CreatePresaleBuilder
impl Sync for CreatePresaleBuilder
impl Unpin for CreatePresaleBuilder
impl UnwindSafe for CreatePresaleBuilder
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