pub struct TwoHopSwapV2Builder { /* private fields */ }
Expand description
Instruction builder for TwoHopSwapV2
.
§Accounts:
[writable]
whirlpool_one[writable]
whirlpool_two[]
token_mint_input[]
token_mint_intermediate[]
token_mint_output[]
token_program_input[]
token_program_intermediate[]
token_program_output[writable]
token_owner_account_input[writable]
token_vault_one_input[writable]
token_vault_one_intermediate[writable]
token_vault_two_intermediate[writable]
token_vault_two_output[writable]
token_owner_account_output[signer]
token_authority[writable]
tick_array_one0[writable]
tick_array_one1[writable]
tick_array_one2[writable]
tick_array_two0[writable]
tick_array_two1[writable]
tick_array_two2[writable]
oracle_one[writable]
oracle_two[]
memo_program
Implementations§
§impl TwoHopSwapV2Builder
impl TwoHopSwapV2Builder
pub fn new() -> TwoHopSwapV2Builder
pub fn whirlpool_one( &mut self, whirlpool_one: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn whirlpool_two( &mut self, whirlpool_two: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn token_mint_input( &mut self, token_mint_input: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn token_mint_intermediate( &mut self, token_mint_intermediate: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn token_mint_output( &mut self, token_mint_output: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn token_program_input( &mut self, token_program_input: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn token_program_intermediate( &mut self, token_program_intermediate: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn token_program_output( &mut self, token_program_output: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn token_owner_account_input( &mut self, token_owner_account_input: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn token_vault_one_input( &mut self, token_vault_one_input: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn token_vault_one_intermediate( &mut self, token_vault_one_intermediate: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn token_vault_two_intermediate( &mut self, token_vault_two_intermediate: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn token_vault_two_output( &mut self, token_vault_two_output: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn token_owner_account_output( &mut self, token_owner_account_output: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn tick_array_one0( &mut self, tick_array_one0: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn tick_array_one1( &mut self, tick_array_one1: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn tick_array_one2( &mut self, tick_array_one2: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn tick_array_two0( &mut self, tick_array_two0: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn tick_array_two1( &mut self, tick_array_two1: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn tick_array_two2( &mut self, tick_array_two2: Pubkey, ) -> &mut TwoHopSwapV2Builder
pub fn oracle_one(&mut self, oracle_one: Pubkey) -> &mut TwoHopSwapV2Builder
pub fn oracle_two(&mut self, oracle_two: Pubkey) -> &mut TwoHopSwapV2Builder
pub fn memo_program(&mut self, memo_program: Pubkey) -> &mut TwoHopSwapV2Builder
pub fn amount(&mut self, amount: u64) -> &mut TwoHopSwapV2Builder
pub fn other_amount_threshold( &mut self, other_amount_threshold: u64, ) -> &mut TwoHopSwapV2Builder
pub fn amount_specified_is_input( &mut self, amount_specified_is_input: bool, ) -> &mut TwoHopSwapV2Builder
pub fn a_to_b_one(&mut self, a_to_b_one: bool) -> &mut TwoHopSwapV2Builder
pub fn a_to_b_two(&mut self, a_to_b_two: bool) -> &mut TwoHopSwapV2Builder
pub fn sqrt_price_limit_one( &mut self, sqrt_price_limit_one: u128, ) -> &mut TwoHopSwapV2Builder
pub fn sqrt_price_limit_two( &mut self, sqrt_price_limit_two: u128, ) -> &mut TwoHopSwapV2Builder
pub fn remaining_accounts_info(
&mut self,
remaining_accounts_info: RemainingAccountsInfo,
) -> &mut TwoHopSwapV2Builder
pub fn remaining_accounts_info( &mut self, remaining_accounts_info: RemainingAccountsInfo, ) -> &mut TwoHopSwapV2Builder
[optional argument]
pub fn add_remaining_account(
&mut self,
account: AccountMeta,
) -> &mut TwoHopSwapV2Builder
pub fn add_remaining_account( &mut self, account: AccountMeta, ) -> &mut TwoHopSwapV2Builder
Add an additional account to the instruction.
pub fn add_remaining_accounts(
&mut self,
accounts: &[AccountMeta],
) -> &mut TwoHopSwapV2Builder
pub fn add_remaining_accounts( &mut self, accounts: &[AccountMeta], ) -> &mut TwoHopSwapV2Builder
Add additional accounts to the instruction.
pub fn instruction(&self) -> Instruction
Trait Implementations§
§impl Clone for TwoHopSwapV2Builder
impl Clone for TwoHopSwapV2Builder
§fn clone(&self) -> TwoHopSwapV2Builder
fn clone(&self) -> TwoHopSwapV2Builder
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 more§impl Debug for TwoHopSwapV2Builder
impl Debug for TwoHopSwapV2Builder
§impl Default for TwoHopSwapV2Builder
impl Default for TwoHopSwapV2Builder
§fn default() -> TwoHopSwapV2Builder
fn default() -> TwoHopSwapV2Builder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TwoHopSwapV2Builder
impl RefUnwindSafe for TwoHopSwapV2Builder
impl Send for TwoHopSwapV2Builder
impl Sync for TwoHopSwapV2Builder
impl Unpin for TwoHopSwapV2Builder
impl UnwindSafe for TwoHopSwapV2Builder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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