Documentation ¶
Index ¶
- func FilterLocksByMinDuration(locks []lockuptypes.PeriodLock, minDuration time.Duration) []lockuptypes.PeriodLock
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- type Hooks
- type Keeper
- func (k Keeper) ActiveGauges(goCtx context.Context, req *types.ActiveGaugesRequest) (*types.ActiveGaugesResponse, error)
- func (k Keeper) ActiveGaugesIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) ActiveGaugesPerDenom(goCtx context.Context, req *types.ActiveGaugesPerDenomRequest) (*types.ActiveGaugesPerDenomResponse, error)
- func (k Keeper) AddToGaugeRewards(ctx sdk.Context, owner sdk.AccAddress, coins sdk.Coins, gaugeID uint64) error
- func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64)
- func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64)
- func (k Keeper) BeginDistribution(ctx sdk.Context, gauge types.Gauge) error
- func (k Keeper) CreateGauge(ctx sdk.Context, isPerpetual bool, owner sdk.AccAddress, coins sdk.Coins, ...) (uint64, error)
- func (k Keeper) Distribute(ctx sdk.Context, gauges []types.Gauge) (sdk.Coins, error)
- func (k Keeper) FilteredLocksDistributionEst(ctx sdk.Context, gauge types.Gauge, filteredLocks []lockuptypes.PeriodLock) (types.Gauge, sdk.Coins, error)
- func (k Keeper) FinishDistribution(ctx sdk.Context, gauge types.Gauge) error
- func (k Keeper) FinishedGaugesIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GaugeByID(goCtx context.Context, req *types.GaugeByIDRequest) (*types.GaugeByIDResponse, error)
- func (k Keeper) Gauges(goCtx context.Context, req *types.GaugesRequest) (*types.GaugesResponse, error)
- func (k Keeper) GaugesIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetActiveGauges(ctx sdk.Context) []types.Gauge
- func (k Keeper) GetEpochInfo(ctx sdk.Context) epochtypes.EpochInfo
- func (k Keeper) GetFinishedGauges(ctx sdk.Context) []types.Gauge
- func (k Keeper) GetGaugeByID(ctx sdk.Context, gaugeID uint64) (*types.Gauge, error)
- func (k Keeper) GetGaugeFromIDs(ctx sdk.Context, gaugeIDs []uint64) ([]types.Gauge, error)
- func (k Keeper) GetGauges(ctx sdk.Context) []types.Gauge
- func (k Keeper) GetLockableDurations(ctx sdk.Context) []time.Duration
- func (k Keeper) GetLocksToDistribution(ctx sdk.Context, distrTo lockuptypes.QueryCondition) []lockuptypes.PeriodLock
- func (k Keeper) GetModuleDistributedCoins(ctx sdk.Context) sdk.Coins
- func (k Keeper) GetModuleToDistributeCoins(ctx sdk.Context) sdk.Coins
- func (k Keeper) GetNotFinishedGauges(ctx sdk.Context) []types.Gauge
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetRewardsEst(ctx sdk.Context, addr sdk.AccAddress, locks []lockuptypes.PeriodLock, ...) sdk.Coins
- func (k Keeper) GetUpcomingGauges(ctx sdk.Context) []types.Gauge
- func (k Keeper) Hooks() Hooks
- func (k Keeper) LockableDurations(ctx context.Context, _ *types.QueryLockableDurationsRequest) (*types.QueryLockableDurationsResponse, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) ModuleDistributedCoins(goCtx context.Context, req *types.ModuleDistributedCoinsRequest) (*types.ModuleDistributedCoinsResponse, error)
- func (k Keeper) ModuleToDistributeCoins(goCtx context.Context, req *types.ModuleToDistributeCoinsRequest) (*types.ModuleToDistributeCoinsResponse, error)
- func (k Keeper) RewardsEst(goCtx context.Context, req *types.RewardsEstRequest) (*types.RewardsEstResponse, error)
- func (k Keeper) SetGaugeWithRefKey(ctx sdk.Context, gauge *types.Gauge) error
- func (k *Keeper) SetHooks(ih types.IncentiveHooks) *Keeper
- func (k Keeper) SetLockableDurations(ctx sdk.Context, lockableDurations []time.Duration)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) UpcomingGauges(goCtx context.Context, req *types.UpcomingGaugesRequest) (*types.UpcomingGaugesResponse, error)
- func (k Keeper) UpcomingGaugesIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) UpcomingGaugesIteratorAfterTime(ctx sdk.Context, time time.Time) sdk.Iterator
- func (k Keeper) UpcomingGaugesIteratorBeforeTime(ctx sdk.Context, time time.Time) sdk.Iterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterLocksByMinDuration ¶
func FilterLocksByMinDuration(locks []lockuptypes.PeriodLock, minDuration time.Duration) []lockuptypes.PeriodLock
func NewMsgServerImpl ¶
NewMsgServerImpl returns an instance of MsgServer
func NewQuerier ¶
func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
Types ¶
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Hooks wrapper struct for incentives keeper
func (Hooks) AfterEpochEnd ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(cdc codec.Codec, storeKey sdk.StoreKey, paramSpace paramtypes.Subspace, bk types.BankKeeper, lk types.LockupKeeper, ek types.EpochKeeper) *Keeper
func (Keeper) ActiveGauges ¶
func (k Keeper) ActiveGauges(goCtx context.Context, req *types.ActiveGaugesRequest) (*types.ActiveGaugesResponse, error)
ActiveGauges returns active gauges
func (Keeper) ActiveGaugesIterator ¶
ActiveGaugesIterator returns iterator for active gauges
func (Keeper) ActiveGaugesPerDenom ¶
func (k Keeper) ActiveGaugesPerDenom(goCtx context.Context, req *types.ActiveGaugesPerDenomRequest) (*types.ActiveGaugesPerDenomResponse, error)
ActiveGaugesPerDenom returns active gauges for the specified denom
func (Keeper) AddToGaugeRewards ¶
func (k Keeper) AddToGaugeRewards(ctx sdk.Context, owner sdk.AccAddress, coins sdk.Coins, gaugeID uint64) error
AddToGauge add coins to gauge
func (Keeper) AfterEpochEnd ¶
func (Keeper) BeforeEpochStart ¶
func (Keeper) BeginDistribution ¶
BeginDistribution is a utility to begin distribution for a specific gauge
func (Keeper) CreateGauge ¶
func (k Keeper) CreateGauge(ctx sdk.Context, isPerpetual bool, owner sdk.AccAddress, coins sdk.Coins, distrTo lockuptypes.QueryCondition, startTime time.Time, numEpochsPaidOver uint64) (uint64, error)
CreateGauge create a gauge and send coins to the gauge
func (Keeper) Distribute ¶
Distribute coins from gauge according to its conditions
func (Keeper) FilteredLocksDistributionEst ¶
func (k Keeper) FilteredLocksDistributionEst(ctx sdk.Context, gauge types.Gauge, filteredLocks []lockuptypes.PeriodLock) (types.Gauge, sdk.Coins, error)
FilteredLocksDistributionEst estimate distribution amount coins from gauge for fitting conditions Expectation: gauge is a valid gauge filteredLocks are all locks that are valid for gauge It also applies an update for the gauge, handling the sending of the rewards. (Note this update is in-memory, it does not change state.)
func (Keeper) FinishDistribution ¶
FinishDistribution is a utility to finish distribution for a specific gauge
func (Keeper) FinishedGaugesIterator ¶
FinishedGaugesIterator returns iterator for finished gauges
func (Keeper) GaugeByID ¶
func (k Keeper) GaugeByID(goCtx context.Context, req *types.GaugeByIDRequest) (*types.GaugeByIDResponse, error)
GaugeByID returns Gauge by id
func (Keeper) Gauges ¶
func (k Keeper) Gauges(goCtx context.Context, req *types.GaugesRequest) (*types.GaugesResponse, error)
Gauges returns gauges both upcoming and active
func (Keeper) GaugesIterator ¶
GaugesIterator returns iterator for all gauges
func (Keeper) GetActiveGauges ¶
GetActiveGauges returns active gauges
func (Keeper) GetEpochInfo ¶
func (k Keeper) GetEpochInfo(ctx sdk.Context) epochtypes.EpochInfo
func (Keeper) GetFinishedGauges ¶
GetFinishedGauges returns finished gauges
func (Keeper) GetGaugeByID ¶
GetGaugeByID Returns gauge from gauge ID
func (Keeper) GetGaugeFromIDs ¶
GetGaugeFromIDs returns gauges from gauge ids reference
func (Keeper) GetLockableDurations ¶
func (Keeper) GetLocksToDistribution ¶
func (k Keeper) GetLocksToDistribution(ctx sdk.Context, distrTo lockuptypes.QueryCondition) []lockuptypes.PeriodLock
GetLocksToDistribution get locks that are associated to a condition
func (Keeper) GetModuleDistributedCoins ¶
GetModuleDistributedCoins returns sum of distributed coins so far
func (Keeper) GetModuleToDistributeCoins ¶
GetModuleToDistributeCoins returns sum of to distribute coins for all of the module
func (Keeper) GetNotFinishedGauges ¶
func (Keeper) GetRewardsEst ¶
func (k Keeper) GetRewardsEst(ctx sdk.Context, addr sdk.AccAddress, locks []lockuptypes.PeriodLock, endEpoch int64) sdk.Coins
GetRewardsEst returns rewards estimation at a future specific time If locks are nil, it returns the rewards between now and the end epoch associated with address. If locks are not nil, it returns all the rewards for the given locks between now and end epoch.
func (Keeper) GetUpcomingGauges ¶
GetUpcomingGauges returns scheduled gauges
func (Keeper) LockableDurations ¶
func (k Keeper) LockableDurations(ctx context.Context, _ *types.QueryLockableDurationsRequest) (*types.QueryLockableDurationsResponse, error)
func (Keeper) ModuleDistributedCoins ¶
func (k Keeper) ModuleDistributedCoins(goCtx context.Context, req *types.ModuleDistributedCoinsRequest) (*types.ModuleDistributedCoinsResponse, error)
ModuleDistributedCoins returns coins that are distributed by module so far
func (Keeper) ModuleToDistributeCoins ¶
func (k Keeper) ModuleToDistributeCoins(goCtx context.Context, req *types.ModuleToDistributeCoinsRequest) (*types.ModuleToDistributeCoinsResponse, error)
ModuleToDistributeCoins returns coins that is going to be distributed
func (Keeper) RewardsEst ¶
func (k Keeper) RewardsEst(goCtx context.Context, req *types.RewardsEstRequest) (*types.RewardsEstResponse, error)
RewardsEst returns rewards estimation at a future specific time
func (Keeper) SetGaugeWithRefKey ¶
func (*Keeper) SetHooks ¶
func (k *Keeper) SetHooks(ih types.IncentiveHooks) *Keeper
Set the gamm hooks
func (Keeper) SetLockableDurations ¶
func (Keeper) UpcomingGauges ¶
func (k Keeper) UpcomingGauges(goCtx context.Context, req *types.UpcomingGaugesRequest) (*types.UpcomingGaugesResponse, error)
UpcomingGauges returns scheduled gauges
func (Keeper) UpcomingGaugesIterator ¶
UpcomingGaugesIterator returns iterator for upcoming gauges
func (Keeper) UpcomingGaugesIteratorAfterTime ¶
UpcomingGaugesIteratorAfterTime returns the iterator to get upcoming gauges that start distribution after specific time