pub struct BootstrapLiquidity<'info> {Show 16 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_a_token: Account<'info, TokenAccount>,
pub user_b_token: Account<'info, TokenAccount>,
pub user: Signer<'info>,
pub vault_program: Program<'info, MercurialVault>,
pub token_program: Program<'info, Token>,
}Expand description
Bootstrap pool with zero liquidity Accounts for bootstrap pool 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_a_token: Account<'info, TokenAccount>User token A account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account.
user_b_token: Account<'info, TokenAccount>User token B account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account.
user: Signer<'info>User account. Must be owner of user_a_token, and user_b_token.
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 BootstrapLiquidity<'info>where
'info: 'info,
impl<'info> Accounts<'info> for BootstrapLiquidity<'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 BootstrapLiquidity<'info>where
'info: 'info,
impl<'info> AccountsExit<'info> for BootstrapLiquidity<'info>where
'info: 'info,
Source§impl<'info> ToAccountInfos<'info> for BootstrapLiquidity<'info>where
'info: 'info,
impl<'info> ToAccountInfos<'info> for BootstrapLiquidity<'info>where
'info: 'info,
fn to_account_infos(&self) -> Vec<AccountInfo<'info>>
Source§impl<'info> ToAccountMetas for BootstrapLiquidity<'info>
impl<'info> ToAccountMetas for BootstrapLiquidity<'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 BootstrapLiquidity<'info>
impl<'info> !RefUnwindSafe for BootstrapLiquidity<'info>
impl<'info> !Send for BootstrapLiquidity<'info>
impl<'info> !Sync for BootstrapLiquidity<'info>
impl<'info> Unpin for BootstrapLiquidity<'info>
impl<'info> !UnwindSafe for BootstrapLiquidity<'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