pub struct CreateTokenBuilder { /* private fields */ }Expand description
Instruction builder for CreateToken.
§Accounts:
[writable, signer]user[writable, signer]payer[]coin_creator[]global_config (fixed to ‘H3csa1cgR7zPJdxCzNbS5chYymHMKS3XivDA5nRx4Bdq’)[writable, signer]base_mint[]quote_mint[writable, optional]bonding_curve (default to PDA derived from ‘bondingCurve’)[writable, optional]base_vault (default to PDA derived from ‘baseVault’)[writable, optional]quote_vault (default to PDA derived from ‘quoteVault’)[writable, optional]creator_fee_config (default to PDA derived from ‘creatorFeeConfig’)[]nexus_program (fixed to ‘7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX’)[]nexus_global_config (fixed to ‘3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr’)[signer]partner[optional]partner_config (default to PDA derived from ‘partnerConfig’)[optional]nexus_staking_config (default to PDA derived from ‘nexusStakingConfig’)[writable, optional]staking_reward_state (default to PDA derived from ‘stakingRewardState’)[writable, optional]reward_accrual (default to PDA derived from ‘rewardAccrual’)[writable, optional]staking_vault (default to PDA derived from ‘stakingVault’)[writable]staking_wsol_vault (fixed to ‘AyisZJxXz9ywXhMwR3sb3oePxBB6UBvixXycAQCdSgrz’)[writable]wsol_reward_accrual (fixed to ‘91AVurtPdUC2yG3joLoujzC216KAfH5HEKnZEELFMmVH’)[]pyth_price_feed (fixed to ‘7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE’)[]base_token_program (fixed to ‘TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb’)[]quote_token_program[]wsol_token_program (fixed to ‘TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA’)[]associated_token_program (fixed to ‘ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL’)[]system_program (fixed to ‘11111111111111111111111111111111’)[]event_authority (fixed to ‘FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T’)[]program (fixed to ‘5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP’)
Implementations§
Source§impl CreateTokenBuilder
impl CreateTokenBuilder
pub fn new( user: Address, payer: Address, coin_creator: Address, base_mint: Address, quote_mint: Address, partner: (Address, bool), quote_token_program: Address, platform_config: Address, creator_platform: String, creator_id: String, creator_hash: Address, name: String, symbol: String, uri: String, ) -> Self
Sourcepub fn bonding_curve(&mut self, bonding_curve: Address) -> &mut Self
pub fn bonding_curve(&mut self, bonding_curve: Address) -> &mut Self
[optional account, default to PDA derived from 'bondingCurve']
Sourcepub fn base_vault(&mut self, base_vault: Address) -> &mut Self
pub fn base_vault(&mut self, base_vault: Address) -> &mut Self
[optional account, default to PDA derived from 'baseVault']
Sourcepub fn quote_vault(&mut self, quote_vault: Address) -> &mut Self
pub fn quote_vault(&mut self, quote_vault: Address) -> &mut Self
[optional account, default to PDA derived from 'quoteVault']
Sourcepub fn creator_fee_config(&mut self, creator_fee_config: Address) -> &mut Self
pub fn creator_fee_config(&mut self, creator_fee_config: Address) -> &mut Self
[optional account, default to PDA derived from 'creatorFeeConfig']
Sourcepub fn partner_config(&mut self, partner_config: Address) -> &mut Self
pub fn partner_config(&mut self, partner_config: Address) -> &mut Self
[optional account, default to PDA derived from 'partnerConfig']
Sourcepub fn nexus_staking_config(
&mut self,
nexus_staking_config: Address,
) -> &mut Self
pub fn nexus_staking_config( &mut self, nexus_staking_config: Address, ) -> &mut Self
[optional account, default to PDA derived from 'nexusStakingConfig']
Sourcepub fn staking_reward_state(
&mut self,
staking_reward_state: Address,
) -> &mut Self
pub fn staking_reward_state( &mut self, staking_reward_state: Address, ) -> &mut Self
[optional account, default to PDA derived from 'stakingRewardState']
Sourcepub fn reward_accrual(&mut self, reward_accrual: Address) -> &mut Self
pub fn reward_accrual(&mut self, reward_accrual: Address) -> &mut Self
[optional account, default to PDA derived from 'rewardAccrual']
Sourcepub fn staking_vault(&mut self, staking_vault: Address) -> &mut Self
pub fn staking_vault(&mut self, staking_vault: Address) -> &mut Self
[optional account, default to PDA derived from 'stakingVault']
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 CreateTokenBuilder
impl Clone for CreateTokenBuilder
Source§fn clone(&self) -> CreateTokenBuilder
fn clone(&self) -> CreateTokenBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Freeze for CreateTokenBuilder
impl RefUnwindSafe for CreateTokenBuilder
impl Send for CreateTokenBuilder
impl Sync for CreateTokenBuilder
impl Unpin for CreateTokenBuilder
impl UnsafeUnpin for CreateTokenBuilder
impl UnwindSafe for CreateTokenBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more