pub struct WhirlpoolRewardInfo {
pub mint: Pubkey,
pub vault: Pubkey,
pub authority: Pubkey,
pub emissions_per_second_x64: u128,
pub growth_global_x64: u128,
}
Expand description
Stores the state relevant for tracking liquidity mining rewards at the Whirlpool
level.
These values are used in conjunction with PositionRewardInfo
, Tick.reward_growths_outside
,
and Whirlpool.reward_last_updated_timestamp
to determine how many rewards are earned by open
positions.
Fields§
§mint: Pubkey
Reward token mint.
vault: Pubkey
Reward vault token account.
Authority account that has permission to initialize the reward and set emissions.
emissions_per_second_x64: u128
Q64.64 number that indicates how many tokens per second are earned per unit of liquidity.
growth_global_x64: u128
Q64.64 number that tracks the total tokens earned per unit of liquidity since the reward emissions were turned on.
Trait Implementations§
§impl BorshDeserialize for WhirlpoolRewardInfowhere
Pubkey: BorshDeserialize,
u128: BorshDeserialize,
impl BorshDeserialize for WhirlpoolRewardInfowhere
Pubkey: BorshDeserialize,
u128: BorshDeserialize,
fn deserialize_reader<R>(reader: &mut R) -> Result<WhirlpoolRewardInfo, Error>where
R: Read,
§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,
§impl BorshSerialize for WhirlpoolRewardInfowhere
Pubkey: BorshSerialize,
u128: BorshSerialize,
impl BorshSerialize for WhirlpoolRewardInfowhere
Pubkey: BorshSerialize,
u128: BorshSerialize,
§impl Clone for WhirlpoolRewardInfo
impl Clone for WhirlpoolRewardInfo
§fn clone(&self) -> WhirlpoolRewardInfo
fn clone(&self) -> WhirlpoolRewardInfo
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 more§impl Debug for WhirlpoolRewardInfo
impl Debug for WhirlpoolRewardInfo
§impl From<WhirlpoolRewardInfo> for WhirlpoolRewardInfoFacade
impl From<WhirlpoolRewardInfo> for WhirlpoolRewardInfoFacade
§fn from(val: WhirlpoolRewardInfo) -> WhirlpoolRewardInfoFacade
fn from(val: WhirlpoolRewardInfo) -> WhirlpoolRewardInfoFacade
Converts to this type from the input type.
§impl PartialEq for WhirlpoolRewardInfo
impl PartialEq for WhirlpoolRewardInfo
impl Eq for WhirlpoolRewardInfo
impl StructuralPartialEq for WhirlpoolRewardInfo
Auto Trait Implementations§
impl Freeze for WhirlpoolRewardInfo
impl RefUnwindSafe for WhirlpoolRewardInfo
impl Send for WhirlpoolRewardInfo
impl Sync for WhirlpoolRewardInfo
impl Unpin for WhirlpoolRewardInfo
impl UnwindSafe for WhirlpoolRewardInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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