pub struct RemoveLiquiditySingleSide<'info> {Show 15 fields
pub pool: Box<Account<'info, Pool>>,
pub lp_mint: Account<'info, Mint>,
pub user_pool_lp: Account<'info, TokenAccount>,
pub a_vault_lp: Box<Account<'info, TokenAccount>>,
pub b_vault_lp: Box<Account<'info, TokenAccount>>,
pub a_vault: Box<Account<'info, Vault>>,
pub b_vault: Box<Account<'info, Vault>>,
pub a_vault_lp_mint: Box<Account<'info, Mint>>,
pub b_vault_lp_mint: Box<Account<'info, Mint>>,
pub a_token_vault: Box<Account<'info, TokenAccount>>,
pub b_token_vault: Box<Account<'info, TokenAccount>>,
pub user_destination_token: Account<'info, TokenAccount>,
pub user: Signer<'info>,
pub vault_program: Program<'info, MercurialVault>,
pub token_program: Program<'info, Token>,
}Expand description
Accounts for remove liquidity single sided instruction
Fields§
§pool: Box<Account<'info, Pool>>Pool account (PDA)
lp_mint: Account<'info, Mint>LP token mint of the pool
user_pool_lp: Account<'info, TokenAccount>User pool lp token account. LP will be burned from this account upon success liquidity removal.
a_vault_lp: Box<Account<'info, TokenAccount>>LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault.
b_vault_lp: Box<Account<'info, TokenAccount>>LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault.
a_vault: Box<Account<'info, Vault>>Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account.
b_vault: Box<Account<'info, Vault>>Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account.
a_vault_lp_mint: Box<Account<'info, Mint>>LP token mint of vault A
b_vault_lp_mint: Box<Account<'info, Mint>>LP token mint of vault B
a_token_vault: Box<Account<'info, TokenAccount>>Token vault account of vault A
b_token_vault: Box<Account<'info, TokenAccount>>Token vault account of vault B
user_destination_token: Account<'info, TokenAccount>User token account to receive token upon success liquidity removal.
user: Signer<'info>User account. Must be owner of the user_pool_lp account.
vault_program: Program<'info, MercurialVault>Vault program. The pool will deposit/withdraw liquidity from the vault.
token_program: Program<'info, Token>Token program.
Trait Implementations§
Source§impl<'info> Accounts<'info> for RemoveLiquiditySingleSide<'info>where
'info: 'info,
impl<'info> Accounts<'info> for RemoveLiquiditySingleSide<'info>where
'info: 'info,
Source§fn try_accounts(
program_id: &Pubkey,
accounts: &mut &[AccountInfo<'info>],
ix_data: &[u8],
__bumps: &mut BTreeMap<String, u8>,
__reallocs: &mut BTreeSet<Pubkey>,
) -> Result<Self>
fn try_accounts( program_id: &Pubkey, accounts: &mut &[AccountInfo<'info>], ix_data: &[u8], __bumps: &mut BTreeMap<String, u8>, __reallocs: &mut BTreeSet<Pubkey>, ) -> Result<Self>
Mint account from the SPL token program in a particular
field, then it should be impossible for this method to return Ok if
any other account type is given–from the SPL token program or elsewhere. Read moreSource§impl<'info> AccountsExit<'info> for RemoveLiquiditySingleSide<'info>where
'info: 'info,
impl<'info> AccountsExit<'info> for RemoveLiquiditySingleSide<'info>where
'info: 'info,
Source§impl<'info> ToAccountInfos<'info> for RemoveLiquiditySingleSide<'info>where
'info: 'info,
impl<'info> ToAccountInfos<'info> for RemoveLiquiditySingleSide<'info>where
'info: 'info,
fn to_account_infos(&self) -> Vec<AccountInfo<'info>>
Source§impl<'info> ToAccountMetas for RemoveLiquiditySingleSide<'info>
impl<'info> ToAccountMetas for RemoveLiquiditySingleSide<'info>
Source§fn to_account_metas(&self, is_signer: Option<bool>) -> Vec<AccountMeta>
fn to_account_metas(&self, is_signer: Option<bool>) -> Vec<AccountMeta>
is_signer is given as an optional override for the signer meta field.
This covers the edge case when a program-derived-address needs to relay
a transaction from a client to another program but sign the transaction
before the relay. The client cannot mark the field as a signer, and so
we have to override the is_signer meta field given by the client.Auto Trait Implementations§
impl<'info> Freeze for RemoveLiquiditySingleSide<'info>
impl<'info> !RefUnwindSafe for RemoveLiquiditySingleSide<'info>
impl<'info> !Send for RemoveLiquiditySingleSide<'info>
impl<'info> !Sync for RemoveLiquiditySingleSide<'info>
impl<'info> Unpin for RemoveLiquiditySingleSide<'info>
impl<'info> !UnwindSafe for RemoveLiquiditySingleSide<'info>
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
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>
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>
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