Struct WhirlpoolRewardInfo
pub struct WhirlpoolRewardInfo {
pub mint: Address,
pub vault: Address,
pub extension: [u8; 32],
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: AddressReward token mint.
vault: AddressReward vault token account.
extension: [u8; 32]reward_infos[0]: Authority account that has permission to initialize the reward and set emissions. reward_infos[1]: used for a struct that contains fields for extending the functionality of Whirlpool. reward_infos[2]: reserved for future use.
Historical notes: Originally, this was a field named “authority”, but it was found that there was no opportunity to set different authorities for the three rewards. Therefore, the use of this field was changed for Whirlpool’s future extensibility.
emissions_per_second_x64: u128Q64.64 number that indicates how many tokens per second are earned per unit of liquidity.
growth_global_x64: u128Q64.64 number that tracks the total tokens earned per unit of liquidity since the reward emissions were turned on.
Trait Implementations§
§impl BorshDeserialize for WhirlpoolRewardInfo
impl BorshDeserialize for WhirlpoolRewardInfo
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>
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
§impl BorshSerialize for WhirlpoolRewardInfo
impl BorshSerialize for WhirlpoolRewardInfo
§impl Clone for WhirlpoolRewardInfo
impl Clone for WhirlpoolRewardInfo
§fn clone(&self) -> WhirlpoolRewardInfo
fn clone(&self) -> WhirlpoolRewardInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
§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
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
§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>
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