pub enum ExchangeInstruction {
AccountRequest,
TransferRequest(Token, u64),
OrderRequest(OrderRequestInfo),
OrderCancellation,
SwapRequest,
}
Variants
AccountRequest
New token account key 0 - Signer key 1 - New token account
TransferRequest(Token, u64)
Transfer tokens between two accounts key 0 - Account to transfer tokens to key 1 - Account to transfer tokens from. This can be the exchange program itself, the exchange has a limitless number of tokens it can transfer.
OrderRequest(OrderRequestInfo)
Order request key 0 - Signer key 1 - Account in which to record the trade order key 2 - Token account to source tokens from
OrderCancellation
Order cancellation key 0 - Signer key 1 - Order to cancel
SwapRequest
Trade swap request
key 0 - Signer
key 2 - ‘To’ trade order
key 3 - From
trade order
key 6 - Token account in which to deposit the brokers profit from the swap.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ExchangeInstruction
impl Send for ExchangeInstruction
impl Sync for ExchangeInstruction
impl Unpin for ExchangeInstruction
impl UnwindSafe for ExchangeInstruction
Blanket Implementations
pub default fn visit_for_abi(
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
pub default fn visit_for_abi(
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
pub default fn example() -> T
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more