Skip to main content

DecreaseLiquidityV2Builder

Struct DecreaseLiquidityV2Builder 

Source
pub struct DecreaseLiquidityV2Builder { /* private fields */ }
Expand description

Instruction builder for DecreaseLiquidityV2.

§Accounts:

  1. [signer] nft_owner
  2. [] nft_account
  3. [writable] personal_position
  4. [writable] pool_state
  5. [writable] protocol_position
  6. [writable] token_vault0
  7. [writable] token_vault1
  8. [writable] tick_array_lower
  9. [writable] tick_array_upper
  10. [writable] recipient_token_account0
  11. [writable] recipient_token_account1
  12. [optional] token_program (default to TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA)
  13. [optional] token_program2022 (default to TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb)
  14. [optional] memo_program (default to MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr)
  15. [] vault0_mint
  16. [] vault1_mint

Implementations§

Source§

impl DecreaseLiquidityV2Builder

Source

pub fn new() -> Self

Source

pub fn nft_owner(&mut self, nft_owner: Pubkey) -> &mut Self

The position owner or delegated authority

Source

pub fn nft_account(&mut self, nft_account: Pubkey) -> &mut Self

The token account for the tokenized position

Source

pub fn personal_position(&mut self, personal_position: Pubkey) -> &mut Self

Decrease liquidity for this position

Source

pub fn pool_state(&mut self, pool_state: Pubkey) -> &mut Self

Source

pub fn protocol_position(&mut self, protocol_position: Pubkey) -> &mut Self

Source

pub fn token_vault0(&mut self, token_vault0: Pubkey) -> &mut Self

Token_0 vault

Source

pub fn token_vault1(&mut self, token_vault1: Pubkey) -> &mut Self

Token_1 vault

Source

pub fn tick_array_lower(&mut self, tick_array_lower: Pubkey) -> &mut Self

Stores init state for the lower tick

Source

pub fn tick_array_upper(&mut self, tick_array_upper: Pubkey) -> &mut Self

Stores init state for the upper tick

Source

pub fn recipient_token_account0( &mut self, recipient_token_account0: Pubkey, ) -> &mut Self

The destination token account for receive amount_0

Source

pub fn recipient_token_account1( &mut self, recipient_token_account1: Pubkey, ) -> &mut Self

The destination token account for receive amount_1

Source

pub fn token_program(&mut self, token_program: Pubkey) -> &mut Self

[optional account, default to 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'] SPL program to transfer out tokens

Source

pub fn token_program2022(&mut self, token_program2022: Pubkey) -> &mut Self

[optional account, default to 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'] Token program 2022

Source

pub fn memo_program(&mut self, memo_program: Pubkey) -> &mut Self

[optional account, default to 'MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr'] memo program

Source

pub fn vault0_mint(&mut self, vault0_mint: Pubkey) -> &mut Self

The mint of token vault 0

Source

pub fn vault1_mint(&mut self, vault1_mint: Pubkey) -> &mut Self

The mint of token vault 1

Source

pub fn liquidity(&mut self, liquidity: u128) -> &mut Self

Source

pub fn amount0_min(&mut self, amount0_min: u64) -> &mut Self

Source

pub fn amount1_min(&mut self, amount1_min: u64) -> &mut Self

Source

pub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self

Add an additional account to the instruction.

Source

pub fn add_remaining_accounts(&mut self, accounts: &[AccountMeta]) -> &mut Self

Add additional accounts to the instruction.

Source

pub fn instruction(&self) -> Instruction

Trait Implementations§

Source§

impl Clone for DecreaseLiquidityV2Builder

Source§

fn clone(&self) -> DecreaseLiquidityV2Builder

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DecreaseLiquidityV2Builder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DecreaseLiquidityV2Builder

Source§

fn default() -> DecreaseLiquidityV2Builder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.