pub struct CreateGlvDepositParams {
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 market_token_amount: u64,
pub min_market_token_amount: u64,
pub min_glv_token_amount: u64,
pub should_unwrap_native_token: bool,
}
Expand description
Create GLV Deposit Params.
Fields§
§execution_lamports: u64
Execution fee in lamports
long_token_swap_length: u8
The length of the swap path for long token.
short_token_swap_length: u8
The length of the swap path for short token.
initial_long_token_amount: u64
Initial long token amount to deposit.
initial_short_token_amount: u64
Initial short otken amount to deposit.
market_token_amount: u64
Market token amount.
min_market_token_amount: u64
Minimum acceptable maount of market tokens to be minted.
min_glv_token_amount: u64
Minimum acceptable amount of glv tokens to receive.
should_unwrap_native_token: bool
Whether to unwrap native token when sending funds back.
Trait Implementations§
Source§impl ActionParams for CreateGlvDepositParams
impl ActionParams for CreateGlvDepositParams
Source§fn execution_lamports(&self) -> u64
fn execution_lamports(&self) -> u64
Get max allowed execution fee in lamports.
Source§impl BorshDeserialize for CreateGlvDepositParams
impl BorshDeserialize for CreateGlvDepositParams
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 CreateGlvDepositParams
impl BorshSerialize for CreateGlvDepositParams
Source§impl Clone for CreateGlvDepositParams
impl Clone for CreateGlvDepositParams
Source§fn clone(&self) -> CreateGlvDepositParams
fn clone(&self) -> CreateGlvDepositParams
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 CreateGlvDepositParams
impl RefUnwindSafe for CreateGlvDepositParams
impl Send for CreateGlvDepositParams
impl Sync for CreateGlvDepositParams
impl Unpin for CreateGlvDepositParams
impl UnwindSafe for CreateGlvDepositParams
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