pub struct InitializePermissionlessPool<'info> {Show 24 fields
pub pool: Box<Account<'info, Pool>>,
pub lp_mint: Box<Account<'info, Mint>>,
pub token_a_mint: Box<Account<'info, Mint>>,
pub token_b_mint: Box<Account<'info, Mint>>,
pub a_vault: Box<Account<'info, Vault>>,
pub b_vault: Box<Account<'info, Vault>>,
pub a_token_vault: Box<Account<'info, TokenAccount>>,
pub b_token_vault: Box<Account<'info, TokenAccount>>,
pub a_vault_lp_mint: Box<Account<'info, Mint>>,
pub b_vault_lp_mint: Box<Account<'info, Mint>>,
pub a_vault_lp: Box<Account<'info, TokenAccount>>,
pub b_vault_lp: Box<Account<'info, TokenAccount>>,
pub payer_token_a: Box<Account<'info, TokenAccount>>,
pub payer_token_b: Box<Account<'info, TokenAccount>>,
pub payer_pool_lp: Box<Account<'info, TokenAccount>>,
pub admin_token_a_fee: Box<Account<'info, TokenAccount>>,
pub admin_token_b_fee: Box<Account<'info, TokenAccount>>,
pub payer: Signer<'info>,
pub fee_owner: UncheckedAccount<'info>,
pub rent: Sysvar<'info, Rent>,
pub vault_program: Program<'info, MercurialVault>,
pub token_program: Program<'info, Token>,
pub associated_token_program: Program<'info, AssociatedToken>,
pub system_program: Program<'info, System>,
}Expand description
Permissionless Initialize Accounts for initialize new pool instruction
Fieldsยง
ยงpool: Box<Account<'info, Pool>>Pool account (PDA address)
lp_mint: Box<Account<'info, Mint>>LP token mint of the pool
token_a_mint: Box<Account<'info, Mint>>Token A mint of the pool. Eg: USDT
token_b_mint: Box<Account<'info, Mint>>Token B mint of the pool. Eg: USDC
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_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
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_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 vault LP upon deposit/withdraw from the vault.
payer_token_a: Box<Account<'info, TokenAccount>>Payer token account for pool token A mint. Used to bootstrap the pool with initial liquidity.
payer_token_b: Box<Account<'info, TokenAccount>>Admin token account for pool token B mint. Used to bootstrap the pool with initial liquidity.
payer_pool_lp: Box<Account<'info, TokenAccount>>CHECK: Payer pool LP token account. Used to receive LP during first deposit (initialize pool)
admin_token_a_fee: Box<Account<'info, TokenAccount>>Admin fee token account for token A. Used to receive trading fee.
admin_token_b_fee: Box<Account<'info, TokenAccount>>Admin fee token account for token B. Used to receive trading fee.
payer: Signer<'info>Admin account. This account will be the admin of the pool, and the payer for PDA during initialize pool.
fee_owner: UncheckedAccount<'info>CHECK: fee owner
rent: Sysvar<'info, Rent>Rent account.
vault_program: Program<'info, MercurialVault>Vault program. The pool will deposit/withdraw liquidity from the vault.
token_program: Program<'info, Token>Token program.
associated_token_program: Program<'info, AssociatedToken>Associated token program.
system_program: Program<'info, System>System program.
Trait Implementationsยง
Sourceยงimpl<'info> Accounts<'info> for InitializePermissionlessPool<'info>where
'info: 'info,
impl<'info> Accounts<'info> for InitializePermissionlessPool<'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 InitializePermissionlessPool<'info>where
'info: 'info,
impl<'info> AccountsExit<'info> for InitializePermissionlessPool<'info>where
'info: 'info,
Sourceยงimpl<'info> ToAccountInfos<'info> for InitializePermissionlessPool<'info>where
'info: 'info,
impl<'info> ToAccountInfos<'info> for InitializePermissionlessPool<'info>where
'info: 'info,
fn to_account_infos(&self) -> Vec<AccountInfo<'info>>
Sourceยงimpl<'info> ToAccountMetas for InitializePermissionlessPool<'info>
impl<'info> ToAccountMetas for InitializePermissionlessPool<'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 InitializePermissionlessPool<'info>
impl<'info> !RefUnwindSafe for InitializePermissionlessPool<'info>
impl<'info> !Send for InitializePermissionlessPool<'info>
impl<'info> !Sync for InitializePermissionlessPool<'info>
impl<'info> Unpin for InitializePermissionlessPool<'info>
impl<'info> !UnwindSafe for InitializePermissionlessPool<'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