pub struct CreateOrder<'info> {Show 19 fields
pub owner: AccountInfo<'info>,
pub receiver: AccountInfo<'info>,
pub store: AccountInfo<'info>,
pub market: AccountInfo<'info>,
pub user: AccountInfo<'info>,
pub order: AccountInfo<'info>,
pub position: Option<AccountInfo<'info>>,
pub initial_collateral_token: Option<AccountInfo<'info>>,
pub final_output_token: AccountInfo<'info>,
pub long_token: Option<AccountInfo<'info>>,
pub short_token: Option<AccountInfo<'info>>,
pub initial_collateral_token_escrow: Option<AccountInfo<'info>>,
pub final_output_token_escrow: Option<AccountInfo<'info>>,
pub long_token_escrow: Option<AccountInfo<'info>>,
pub short_token_escrow: Option<AccountInfo<'info>>,
pub initial_collateral_token_source: Option<AccountInfo<'info>>,
pub system_program: AccountInfo<'info>,
pub token_program: AccountInfo<'info>,
pub associated_token_program: AccountInfo<'info>,
}
Expand description
Generated CPI struct of the accounts for CreateOrder
.
Fields§
§owner: AccountInfo<'info>
The owner of the order to be created.
receiver: AccountInfo<'info>
The receiver of the output funds.
store: AccountInfo<'info>
Store.
market: AccountInfo<'info>
Market.
user: AccountInfo<'info>
User Account.
order: AccountInfo<'info>
The order to be created.
position: Option<AccountInfo<'info>>
The related position.
initial_collateral_token: Option<AccountInfo<'info>>
Initial collateral token / swap in token. Only required by increase and swap orders.
final_output_token: AccountInfo<'info>
Final output token. Used as collateral token / swap out token for increase and swap orders; and used as final output token for decrease orders.
For the case of increase or swap orders, it will be checked to be a valid collateral / swap out token.
long_token: Option<AccountInfo<'info>>
Long token of the market.
short_token: Option<AccountInfo<'info>>
Short token of the market.
initial_collateral_token_escrow: Option<AccountInfo<'info>>
Initial collateral token escrow account. Only requried by increase and swap orders.
final_output_token_escrow: Option<AccountInfo<'info>>
Final output token escrow account. Only required by decrease and swap orders.
long_token_escrow: Option<AccountInfo<'info>>
Long token escrow. Only required by increase and decrease orders.
short_token_escrow: Option<AccountInfo<'info>>
Short token escrow. Only required by increase and decrease orders.
initial_collateral_token_source: Option<AccountInfo<'info>>
The source initial token account. Only requried by increase and swap orders.
system_program: AccountInfo<'info>
The system program.
token_program: AccountInfo<'info>
The token program.
associated_token_program: AccountInfo<'info>
The associated token program.
Trait Implementations§
Source§impl<'info> ToAccountInfos<'info> for CreateOrder<'info>
impl<'info> ToAccountInfos<'info> for CreateOrder<'info>
fn to_account_infos(&self) -> Vec<AccountInfo<'info>>
Source§impl<'info> ToAccountMetas for CreateOrder<'info>
impl<'info> ToAccountMetas for CreateOrder<'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 CreateOrder<'info>
impl<'info> !RefUnwindSafe for CreateOrder<'info>
impl<'info> !Send for CreateOrder<'info>
impl<'info> !Sync for CreateOrder<'info>
impl<'info> Unpin for CreateOrder<'info>
impl<'info> !UnwindSafe for CreateOrder<'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