Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BasicAccumulator ¶
type BasicAccumulator struct {
// contains filtered or unexported fields
}
BasicAccumulator is a default implementation of the RewardAccumulator interface. This applies to all claim types except for those with custom accumulator logic e.g. Earn.
func NewBasicAccumulator ¶
func NewBasicAccumulator( store store.IncentiveStore, adapters adapters.SourceAdapters, ) BasicAccumulator
NewBasicAccumulator returns a new BasicAccumulator.
func (BasicAccumulator) AccumulateRewards ¶
func (k BasicAccumulator) AccumulateRewards( ctx sdk.Context, claimType types.ClaimType, rewardPeriod types.MultiRewardPeriod, ) error
AccumulateRewards calculates new rewards to distribute this block and updates the global indexes to reflect this. The provided rewardPeriod must be valid to avoid panics in calculating time durations.
type EarnAccumulator ¶
type EarnAccumulator struct {
// contains filtered or unexported fields
}
EarnAccumulator is an accumulator for Earn claim types. This includes claiming staking rewards and reward distribution for liquid mage.
func NewEarnAccumulator ¶
func NewEarnAccumulator( store store.IncentiveStore, liquidKeeper types.LiquidKeeper, earnKeeper types.EarnKeeper, adapters adapters.SourceAdapters, ) EarnAccumulator
NewEarnAccumulator returns a new EarnAccumulator.
func (EarnAccumulator) AccumulateRewards ¶
func (a EarnAccumulator) AccumulateRewards( ctx sdk.Context, claimType types.ClaimType, rewardPeriod types.MultiRewardPeriod, ) error
AccumulateRewards calculates new rewards to distribute this block and updates the global indexes to reflect this. The provided rewardPeriod must be valid to avoid panics in calculating time durations.