InitializePermissionlessPool

Struct InitializePermissionlessPool 

Source
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>,
}
๐Ÿ‘ŽDeprecated
Expand description

Permissionless Initialize Accounts for initialize new pool instruction

Fieldsยง

ยงpool: Box<Account<'info, Pool>>
๐Ÿ‘ŽDeprecated

Pool account (PDA address)

ยงlp_mint: Box<Account<'info, Mint>>
๐Ÿ‘ŽDeprecated

LP token mint of the pool

ยงtoken_a_mint: Box<Account<'info, Mint>>
๐Ÿ‘ŽDeprecated

Token A mint of the pool. Eg: USDT

ยงtoken_b_mint: Box<Account<'info, Mint>>
๐Ÿ‘ŽDeprecated

Token B mint of the pool. Eg: USDC

ยงa_vault: Box<Account<'info, Vault>>
๐Ÿ‘ŽDeprecated

Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account.

ยงb_vault: Box<Account<'info, Vault>>
๐Ÿ‘ŽDeprecated

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>>
๐Ÿ‘ŽDeprecated

Token vault account of vault A

ยงb_token_vault: Box<Account<'info, TokenAccount>>
๐Ÿ‘ŽDeprecated

Token vault account of vault B

ยงa_vault_lp_mint: Box<Account<'info, Mint>>
๐Ÿ‘ŽDeprecated

LP token mint of vault A

ยงb_vault_lp_mint: Box<Account<'info, Mint>>
๐Ÿ‘ŽDeprecated

LP token mint of vault B

ยงa_vault_lp: Box<Account<'info, TokenAccount>>
๐Ÿ‘ŽDeprecated

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>>
๐Ÿ‘ŽDeprecated

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>>
๐Ÿ‘ŽDeprecated

Payer token account for pool token A mint. Used to bootstrap the pool with initial liquidity.

ยงpayer_token_b: Box<Account<'info, TokenAccount>>
๐Ÿ‘ŽDeprecated

Admin token account for pool token B mint. Used to bootstrap the pool with initial liquidity.

ยงpayer_pool_lp: Box<Account<'info, TokenAccount>>
๐Ÿ‘ŽDeprecated

CHECK: Payer pool LP token account. Used to receive LP during first deposit (initialize pool)

ยงadmin_token_a_fee: Box<Account<'info, TokenAccount>>
๐Ÿ‘ŽDeprecated

Admin fee token account for token A. Used to receive trading fee.

ยงadmin_token_b_fee: Box<Account<'info, TokenAccount>>
๐Ÿ‘ŽDeprecated

Admin fee token account for token B. Used to receive trading fee.

ยงpayer: Signer<'info>
๐Ÿ‘ŽDeprecated

Admin account. This account will be the admin of the pool, and the payer for PDA during initialize pool.

ยงfee_owner: UncheckedAccount<'info>
๐Ÿ‘ŽDeprecated

CHECK: fee owner

ยงrent: Sysvar<'info, Rent>
๐Ÿ‘ŽDeprecated

Rent account.

ยงvault_program: Program<'info, MercurialVault>
๐Ÿ‘ŽDeprecated

Vault program. The pool will deposit/withdraw liquidity from the vault.

ยงtoken_program: Program<'info, Token>
๐Ÿ‘ŽDeprecated

Token program.

ยงassociated_token_program: Program<'info, AssociatedToken>
๐Ÿ‘ŽDeprecated

Associated token program.

ยงsystem_program: Program<'info, System>
๐Ÿ‘ŽDeprecated

System program.

Trait Implementationsยง

Sourceยง

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>

Returns the validated accounts struct. What constitutes โ€œvalidโ€ is program dependent. However, users of these types should never have to worry about account substitution attacks. For example, if a program expects a 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 more
Sourceยง

impl<'info> AccountsExit<'info> for InitializePermissionlessPool<'info>
where 'info: 'info,

Sourceยง

fn exit(&self, program_id: &Pubkey) -> Result<()>

program_id is the currently executing program.
Sourceยง

impl<'info> ToAccountInfos<'info> for InitializePermissionlessPool<'info>
where 'info: 'info,

Sourceยง

impl<'info> ToAccountMetas for InitializePermissionlessPool<'info>

Sourceยง

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ยง

Blanket Implementationsยง

Sourceยง

impl<T> AbiExample for T

Sourceยง

default fn example() -> T

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> 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> IntoEither for T

Sourceยง

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 more
Sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Sourceยง

impl<T> Pointable for T

Sourceยง

const ALIGN: usize

The alignment of pointer.
Sourceยง

type Init = T

The type for initializers.
Sourceยง

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Sourceยง

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Sourceยง

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Sourceยง

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Sourceยง

impl<T> Same for T

Sourceยง

type Output = T

Should always be Self
Sourceยง

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

Sourceยง

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Sourceยง

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Sourceยง

fn vzip(self) -> V