pub struct CreateDepositParams {
pub execution_lamports: u64,
pub long_token_swap_length: u8,
pub short_token_swap_length: u8,
pub initial_long_token_amount: u64,
pub initial_short_token_amount: u64,
pub min_market_token_amount: u64,
pub should_unwrap_native_token: bool,
}Expand description
Create Deposit Params.
Fields§
§execution_lamports: u64Execution fee in lamports
long_token_swap_length: u8The length of the swap path for long token.
short_token_swap_length: u8The length of the swap path for short token.
initial_long_token_amount: u64Initial long token amount to deposit.
initial_short_token_amount: u64Initial short otken amount to deposit.
min_market_token_amount: u64The minimum acceptable amount of market tokens to receive.
should_unwrap_native_token: boolWhether to unwrap native token when sending funds back.
Trait Implementations§
Source§impl ActionParams for CreateDepositParams
impl ActionParams for CreateDepositParams
Source§fn execution_lamports(&self) -> u64
fn execution_lamports(&self) -> u64
Get max allowed execution fee in lamports.
Source§impl BorshDeserialize for CreateDepositParams
impl BorshDeserialize for CreateDepositParams
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for CreateDepositParams
impl BorshSerialize for CreateDepositParams
Source§impl Clone for CreateDepositParams
impl Clone for CreateDepositParams
Source§fn clone(&self) -> CreateDepositParams
fn clone(&self) -> CreateDepositParams
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CreateDepositParams
impl RefUnwindSafe for CreateDepositParams
impl Send for CreateDepositParams
impl Sync for CreateDepositParams
impl Unpin for CreateDepositParams
impl UnwindSafe for CreateDepositParams
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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 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>
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