pub struct CreateOrder {Show 19 fields
pub owner: Pubkey,
pub receiver: Pubkey,
pub store: Pubkey,
pub market: Pubkey,
pub user: Pubkey,
pub order: Pubkey,
pub position: Option<Pubkey>,
pub initial_collateral_token: Option<Pubkey>,
pub final_output_token: Pubkey,
pub long_token: Option<Pubkey>,
pub short_token: Option<Pubkey>,
pub initial_collateral_token_escrow: Option<Pubkey>,
pub final_output_token_escrow: Option<Pubkey>,
pub long_token_escrow: Option<Pubkey>,
pub short_token_escrow: Option<Pubkey>,
pub initial_collateral_token_source: Option<Pubkey>,
pub system_program: Pubkey,
pub token_program: Pubkey,
pub associated_token_program: Pubkey,
}
Expand description
Generated client accounts for CreateOrder
.
Fields§
§owner: Pubkey
The owner of the order to be created.
receiver: Pubkey
The receiver of the output funds.
store: Pubkey
Store.
market: Pubkey
Market.
user: Pubkey
User Account.
order: Pubkey
The order to be created.
position: Option<Pubkey>
The related position.
initial_collateral_token: Option<Pubkey>
Initial collateral token / swap in token. Only required by increase and swap orders.
final_output_token: Pubkey
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<Pubkey>
Long token of the market.
short_token: Option<Pubkey>
Short token of the market.
initial_collateral_token_escrow: Option<Pubkey>
Initial collateral token escrow account. Only requried by increase and swap orders.
final_output_token_escrow: Option<Pubkey>
Final output token escrow account. Only required by decrease and swap orders.
long_token_escrow: Option<Pubkey>
Long token escrow. Only required by increase and decrease orders.
short_token_escrow: Option<Pubkey>
Short token escrow. Only required by increase and decrease orders.
initial_collateral_token_source: Option<Pubkey>
The source initial token account. Only requried by increase and swap orders.
system_program: Pubkey
The system program.
token_program: Pubkey
The token program.
associated_token_program: Pubkey
The associated token program.
Trait Implementations§
Source§impl BorshSerialize for CreateOrderwhere
Pubkey: BorshSerialize,
Option<Pubkey>: BorshSerialize,
impl BorshSerialize for CreateOrderwhere
Pubkey: BorshSerialize,
Option<Pubkey>: BorshSerialize,
Source§impl ToAccountMetas for CreateOrder
impl ToAccountMetas for CreateOrder
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 Freeze for CreateOrder
impl RefUnwindSafe for CreateOrder
impl Send for CreateOrder
impl Sync for CreateOrder
impl Unpin for CreateOrder
impl UnwindSafe for CreateOrder
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