Documentation ¶
Index ¶
- func FilterLocksByMinDuration(locks []lockuptypes.PeriodLock, minDuration time.Duration, ...) []*lockuptypes.PeriodLock
- func NewIncentivesProposalHandler(k Keeper) govtypesv1.Handler
- func NewMsgServerImpl(keeper *Keeper) types.MsgServer
- type DistributionValueCache
- type GaugesFilterFn
- type Hooks
- type Keeper
- func (k Keeper) ActiveGaugesIterator(ctx sdk.Context) storetypes.Iterator
- 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) error
- func (k Keeper) AllocateAcrossGauges(ctx sdk.Context, activeGroups []types.Group) error
- func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64) error
- func (k Keeper) CreateGauge(ctx sdk.Context, isPerpetual bool, owner sdk.AccAddress, coins sdk.Coins, ...) (uint64, error)
- func (k Keeper) CreateGaugeRefKeys(ctx sdk.Context, gauge *types.Gauge, combinedKeys []byte) error
- func (k Keeper) CreateGroup(ctx sdk.Context, coins sdk.Coins, numEpochPaidOver uint64, ...) (uint64, error)
- func (k Keeper) CreateGroupAsIncentivesModuleAcc(ctx sdk.Context, numEpochPaidOver uint64, poolIDs []uint64) (uint64, error)
- func (k Keeper) Distribute(ctx sdk.Context, gauges []types.Gauge) (sdk.Coins, error)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) FilteredLocksDistributionEst(ctx sdk.Context, gauge types.Gauge, filteredLocks []lockuptypes.PeriodLock) (types.Gauge, sdk.Coins, bool, error)
- func (k Keeper) FinishedGaugesIterator(ctx sdk.Context) storetypes.Iterator
- func (k Keeper) GaugesIterator(ctx sdk.Context) storetypes.Iterator
- func (k Keeper) GetActiveGauges(ctx sdk.Context) []types.Gauge
- func (k Keeper) GetAllGroups(ctx sdk.Context) ([]types.Group, error)
- func (k Keeper) GetAllGroupsGauges(ctx sdk.Context) ([]types.Gauge, error)
- func (k Keeper) GetAllGroupsWithGauge(ctx sdk.Context) ([]types.GroupsWithGauge, error)
- 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) GetGroupByGaugeID(ctx sdk.Context, gaugeID uint64) (types.Group, error)
- func (k Keeper) GetLastGaugeID(ctx sdk.Context) uint64
- func (k Keeper) GetLockableDurations(ctx sdk.Context) []time.Duration
- 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) GetPoolFromGaugeId(ctx sdk.Context, gaugeId uint64, duration time.Duration) (poolmanagertypes.PoolI, error)
- func (k Keeper) GetPoolIdAndDurationFromGaugeRecord(ctx sdk.Context, gaugeRecord types.InternalGaugeRecord) (uint64, time.Duration, error)
- func (k Keeper) GetPoolIdsAndDurationsFromGaugeRecords(ctx sdk.Context, gaugeRecords []types.InternalGaugeRecord) ([]uint64, []time.Duration, error)
- 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) HandleCreateGaugeProposal(ctx sdk.Context, p *types.CreateGroupsProposal) error
- func (k Keeper) Hooks() Hooks
- func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) ParseGroupFromBz(bz []byte) (group types.Group, err error)
- func (k Keeper) SetGaugeWithRefKey(ctx sdk.Context, gauge *types.Gauge) error
- func (k Keeper) SetGroup(ctx sdk.Context, group types.Group)
- func (k *Keeper) SetHooks(ih types.IncentiveHooks) *Keeper
- func (k Keeper) SetLastGaugeID(ctx sdk.Context, ID uint64)
- func (k Keeper) SetLockableDurations(ctx sdk.Context, lockableDurations []time.Duration)
- func (k Keeper) SetParam(ctx sdk.Context, key []byte, value interface{})
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k *Keeper) SetPoolIncentivesKeeper(poolIncentiveKeeper types.PoolIncentiveKeeper)
- func (k Keeper) UpcomingGaugesIterator(ctx sdk.Context) storetypes.Iterator
- func (k Keeper) UpcomingGaugesIteratorAfterTime(ctx sdk.Context, time time.Time) storetypes.Iterator
- func (k Keeper) UpcomingGaugesIteratorBeforeTime(ctx sdk.Context, time time.Time) storetypes.Iterator
- type Querier
- func (q Querier) ActiveGauges(goCtx context.Context, req *types.ActiveGaugesRequest) (*types.ActiveGaugesResponse, error)
- func (q Querier) ActiveGaugesPerDenom(goCtx context.Context, req *types.ActiveGaugesPerDenomRequest) (*types.ActiveGaugesPerDenomResponse, error)
- func (q Querier) AllGroups(goCtx context.Context, req *types.QueryAllGroupsRequest) (*types.QueryAllGroupsResponse, error)
- func (q Querier) AllGroupsGauges(goCtx context.Context, req *types.QueryAllGroupsGaugesRequest) (*types.QueryAllGroupsGaugesResponse, error)
- func (q Querier) AllGroupsWithGauge(goCtx context.Context, req *types.QueryAllGroupsWithGaugeRequest) (*types.QueryAllGroupsWithGaugeResponse, error)
- func (q Querier) CurrentWeightByGroupGaugeID(goCtx context.Context, req *types.QueryCurrentWeightByGroupGaugeIDRequest) (*types.QueryCurrentWeightByGroupGaugeIDResponse, error)
- func (q Querier) ExternalGauges(goCtx context.Context, req *types.QueryExternalGaugesRequest) (*types.QueryExternalGaugesResponse, error)
- func (q Querier) GaugeByID(goCtx context.Context, req *types.GaugeByIDRequest) (*types.GaugeByIDResponse, error)
- func (q Querier) Gauges(goCtx context.Context, req *types.GaugesRequest) (*types.GaugesResponse, error)
- func (q Querier) GaugesByPoolID(goCtx context.Context, req *types.QueryGaugesByPoolIDRequest) (*types.QueryGaugesByPoolIDResponse, error)
- func (q Querier) GroupByGroupGaugeID(goCtx context.Context, req *types.QueryGroupByGroupGaugeIDRequest) (*types.QueryGroupByGroupGaugeIDResponse, error)
- func (q Querier) InternalGauges(goCtx context.Context, req *types.QueryInternalGaugesRequest) (*types.QueryInternalGaugesResponse, error)
- func (q Querier) LockableDurations(ctx context.Context, _ *types.QueryLockableDurationsRequest) (*types.QueryLockableDurationsResponse, error)
- func (q Querier) ModuleToDistributeCoins(goCtx context.Context, _ *types.ModuleToDistributeCoinsRequest) (*types.ModuleToDistributeCoinsResponse, error)
- func (q Querier) Params(goCtx context.Context, req *types.ParamsRequest) (*types.ParamsResponse, error)
- func (q Querier) RewardsEst(goCtx context.Context, req *types.RewardsEstRequest) (*types.RewardsEstResponse, error)
- func (q Querier) UpcomingGauges(goCtx context.Context, req *types.UpcomingGaugesRequest) (*types.UpcomingGaugesResponse, error)
- func (q Querier) UpcomingGaugesPerDenom(goCtx context.Context, req *types.UpcomingGaugesPerDenomRequest) (*types.UpcomingGaugesPerDenomResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterLocksByMinDuration ¶
func FilterLocksByMinDuration(locks []lockuptypes.PeriodLock, minDuration time.Duration, scratchSlice *[]*lockuptypes.PeriodLock) []*lockuptypes.PeriodLock
FilterLocksByMinDuration returns locks whose lock duration is greater than the provided minimum duration.
func NewIncentivesProposalHandler ¶
func NewIncentivesProposalHandler(k Keeper) govtypesv1.Handler
func NewMsgServerImpl ¶
NewMsgServerImpl returns an instance of MsgServer for the provided keeper.
Types ¶
type DistributionValueCache ¶
type DistributionValueCache struct {
// contains filtered or unexported fields
}
DistributionValueCache is a cache for when we calculate the minimum value an underlying token must be to be distributed.
type GaugesFilterFn ¶
GaugesFilterFn is used to apply a filter on gauges It must be used in query.FilterPaginate as a condition to add the gauge to the response data
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Hooks is the wrapper struct for the incentives keeper.
func (Hooks) AfterEpochEnd ¶
AfterEpochEnd is the epoch end hook.
func (Hooks) BeforeEpochStart ¶
BeforeEpochStart is the epoch start hook.
func (Hooks) GetModuleName ¶
GetModuleName implements types.EpochHooks.
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper provides a way to manage incentives module storage.
func NewKeeper ¶
func NewKeeper(storeKey storetypes.StoreKey, paramSpace paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper, lk types.LockupKeeper, ek types.EpochKeeper, ck types.CommunityPoolKeeper, txfk types.TxFeesKeeper, clk types.ConcentratedLiquidityKeeper, pmk types.PoolManagerKeeper, pik types.PoolIncentiveKeeper, prk types.ProtorevKeeper) *Keeper
NewKeeper returns a new instance of the incentive module keeper struct.
func (Keeper) ActiveGaugesIterator ¶
func (k Keeper) ActiveGaugesIterator(ctx sdk.Context) storetypes.Iterator
ActiveGaugesIterator returns the iterator for all active gauges.
func (Keeper) AddToGaugeRewards ¶
func (k Keeper) AddToGaugeRewards(ctx sdk.Context, owner sdk.AccAddress, coins sdk.Coins, gaugeID uint64) error
AddToGaugeRewards adds coins to gauge.
func (Keeper) AfterEpochEnd ¶
AfterEpochEnd is the epoch end hook.
func (Keeper) AllocateAcrossGauges ¶
AllocateAcrossGauges for every gauge in the input, it updates the weights according to the splitting policy and allocates the coins to the underlying gauges per the updated weights. Note, every group is associated with a group gauge. The distribution to regular gauges happens from the group gauge. Returns error if: - fails to retrieve a group gauge - fails to add gauge rewards to any of the underlying gauges in the group.
Silently skips the following errors: - syncing group gauge weights fails - this is acceptable. We don't want to fail all distributions due to an oddity with one group. The rewards should stay in the group gauge until the next distribution. Any issues can be fixed with a major upgrade without any loss of funds. - group gauge is inactive - similar reason, don't want to fail all distributions due to non-fatal issue.
ASSUMPTIONS: - group cannot outlive the gauges associated with it. CONTRACT: - every group in the input is active. If inactive group is passed in, it will be skipped.
func (Keeper) BeforeEpochStart ¶
BeforeEpochStart is the epoch start hook.
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, poolId uint64) (uint64, error)
CreateGauge creates a gauge with the given parameters and sends coins to the gauge. There can be 3 kinds of gauges for a given set of parameters: * lockuptypes.ByDuration - a gauge that incentivizes one of the lockable durations. For this gauge, the pool id must be 0. Fails if not.
* lockuptypes.NoLock - a gauge that incentivizes pools without locking. Initially, this is meant specifically for the concentrated liquidity pools. As a result, if NoLock gauge is being created, the given pool id must be non-zero, the pool at this id must exist and be of a concentrated liquidity type. Fails if not. Additionally, lockuptypes.Denom must be either an empty string, signifying that this is an external gauge, or be equal to types.NoLockInternalGaugeDenom(poolId). If the denom is empty, it will get overwritten to types.NoLockExternalGaugeDenom(poolId). This denom formatting is useful for querying internal vs external gauges associated with a pool. * lockuptypes.Group - a gauge that incentivizes a group of internal pool gauges based on the splitting policy created by a group data structure. It is expected to be created via CreateGroup keeper method. This gauge is the only gauge type that does not have ref keys (active/upcoming/finished) created and associated with it. For this gauge, the pool id must be 0. Fails if not.
Returns error if: - attempts to create non-perpetual gauge with numEpochsPaidOver of 0
On success, returns the gauge ID.
func (Keeper) CreateGaugeRefKeys ¶
CreateGaugeRefKeys takes combinedKey (the keyPrefix for upcoming, active, or finished gauges combined with gauge start time) and adds a reference to the respective gauge ID. If gauge is active or upcoming, creates reference between the denom and gauge ID. Used to consolidate codepaths for InitGenesis and CreateGauge.
func (Keeper) CreateGroup ¶
func (k Keeper) CreateGroup(ctx sdk.Context, coins sdk.Coins, numEpochPaidOver uint64, owner sdk.AccAddress, poolIDs []uint64) (uint64, error)
CreateGroup creates a new group. The group is 1:1 mapped to a group gauge that allocates rewards dynamically across its internal pool gauges based on the volume splitting policy. For each pool ID in the given slice, its main internal gauge is used to create gauge records to be associated with the Group. Note, that implies that only perpetual pool gauges can be associated with the Group. For Group's own distribution policy, a 1:1 group Gauge is created. This is the Gauge that receives incentives at the end of an epoch in the pool incentives as defined by the DistrRecord. The Group's Gauge can either be perpetual or non-perpetual. If numEpochPaidOver is 0, then the Group's Gauge is perpetual. Otherwise, it is non-perpetual. It syncs the group's weights at the time of creation. This is useful for validating that all the pools in the group are valid and have the associated volume at group creation time. Charges group creation fee, unless incentives module account. Returns nil on success. Returns error if: - given pool IDs slice is empty or has 1 pool only - fails to initialize gauge information for every pool ID - fails to send coins from owner to the incentives module for the Group's Gauge - fails to charge group creation fee - fails to set the Group's Gauge to state
func (Keeper) CreateGroupAsIncentivesModuleAcc ¶
func (k Keeper) CreateGroupAsIncentivesModuleAcc(ctx sdk.Context, numEpochPaidOver uint64, poolIDs []uint64) (uint64, error)
CreateGroupAsIncentivesModuleAcc creates a group as incentives module account. The group is 1:1 mapped to a group gauge that allocates rewards dynamically across its internal pool gauges based on the volume splitting policy. For each pool ID in the given slice, its main internal gauge is used to create gauge records to be associated with the Group. Note, that implies that only perpetual pool gauges can be associated with the Group. For Group's own distribution policy, a 1:1 group Gauge is created. This is the Gauge that receives incentives at the end of an epoch in the pool incentives as defined by the DistrRecord. The Group's Gauge can either be perpetual or non-perpetual. If numEpochPaidOver is 0, then the Group's Gauge is perpetual. Otherwise, it is non-perpetual. The group is created with empty coins. It does not sync weights at the time of creation. This is useful for creating groups of pools in a privileged way For example, in the upgrade handler. Use with care since it is possible to create a group of pools that are invalid (have no volume) due to lack of syncing. Stores the group to state. The group creation fee is not charged on the incentives module account. See other details of group creation by reviewing createGroup() spec. Returns group gauge ID on success. Returns error if: - fails to create Group
func (Keeper) Distribute ¶
Distribute distributes coins from an array of gauges to all eligible locks and pools in the case of "NoLock" gauges. Skips any group gauges as they are handled separately in AllocateAcrossGauges() CONTRACT: gauges must be active.
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the x/incentives module's exported genesis.
func (Keeper) FilteredLocksDistributionEst ¶
func (k Keeper) FilteredLocksDistributionEst(ctx sdk.Context, gauge types.Gauge, filteredLocks []lockuptypes.PeriodLock) (types.Gauge, sdk.Coins, bool, error)
FilteredLocksDistributionEst estimates distribution amount of coins from 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) FinishedGaugesIterator ¶
func (k Keeper) FinishedGaugesIterator(ctx sdk.Context) storetypes.Iterator
FinishedGaugesIterator returns the iterator for all finished gauges.
func (Keeper) GaugesIterator ¶
func (k Keeper) GaugesIterator(ctx sdk.Context) storetypes.Iterator
GaugesIterator returns the iterator for all gauges.
func (Keeper) GetActiveGauges ¶
GetActiveGauges returns active gauges.
func (Keeper) GetAllGroups ¶
GetAllGroupGauges gets all the groupGauges that is in state.
func (Keeper) GetAllGroupsGauges ¶
GetAllGroupsGauges iterates through all groups, sequentially pulls the gauges from each, and returns just the gauges.
func (Keeper) GetAllGroupsWithGauge ¶
GetAllGroupsWithGauge iterates through all groups, sequentially pulls the gauges from each, and returns the groups with their associated gauge.
func (Keeper) GetEpochInfo ¶
func (k Keeper) GetEpochInfo(ctx sdk.Context) epochtypes.EpochInfo
GetEpochInfo returns EpochInfo struct given context.
func (Keeper) GetFinishedGauges ¶
GetFinishedGauges returns finished gauges.
func (Keeper) GetGaugeByID ¶
GetGaugeByID returns gauge from gauge ID.
func (Keeper) GetGaugeFromIDs ¶
GetGaugeFromIDs returns multiple gauges from a gaugeIDs array.
func (Keeper) GetGroupByGaugeID ¶
GetGroupByGaugeID gets group struct for a given gauge ID. Note that Group and group's associated gauge are 1:1 mapped. As a result, they share the same ID.
func (Keeper) GetLastGaugeID ¶
GetLastGaugeID returns the last used gauge ID.
func (Keeper) GetLockableDurations ¶
GetLockableDurations returns all incentivized lockable durations.
func (Keeper) GetModuleDistributedCoins ¶
GetModuleDistributedCoins returns sum of coins that have been distributed so far for all of the module.
func (Keeper) GetModuleToDistributeCoins ¶
GetModuleToDistributeCoins returns sum of coins yet to be distributed for all of the module.
func (Keeper) GetNotFinishedGauges ¶
GetNotFinishedGauges returns both upcoming and active gauges.
func (Keeper) GetPoolFromGaugeId ¶
func (k Keeper) GetPoolFromGaugeId(ctx sdk.Context, gaugeId uint64, duration time.Duration) (poolmanagertypes.PoolI, error)
GetPoolFromGaugeId returns a pool associated with the given gauge id. Returns error if there is no link between pool id and gauge id. Returns error if pool is not saved in state.
func (Keeper) GetPoolIdAndDurationFromGaugeRecord ¶
func (k Keeper) GetPoolIdAndDurationFromGaugeRecord(ctx sdk.Context, gaugeRecord types.InternalGaugeRecord) (uint64, time.Duration, error)
GetPoolIdAndDurationFromGaugeRecord retrieves the pool ID and duration associated with a given gauge record. The function first retrieves the gauge associated with the gauge record. If the gauge's lock query type is NoLock, the function sets the gauge duration to the epoch duration. Otherwise, it sets the gauge duration to the longest lockable duration. The function then retrieves the pool ID associated with the gauge ID and the gauge duration. The function returns the pool ID and the gauge duration. If there is an error retrieving the gauge, the longest lockable duration, or the pool ID, the function returns an error.
func (Keeper) GetPoolIdsAndDurationsFromGaugeRecords ¶
func (k Keeper) GetPoolIdsAndDurationsFromGaugeRecords(ctx sdk.Context, gaugeRecords []types.InternalGaugeRecord) ([]uint64, []time.Duration, error)
GetPoolIdsAndDurationsFromGaugeRecords retrieves the pool IDs and their associated durations from a group's gauge records It iterates over each record and retrieves the pool ID and duration. The function returns two slices: one for the pool IDs and one for the durations. The indices in these slices correspond to each other. If there is an error retrieving the pool ID and duration for any gauge record, the function returns an error.
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 (by epoch) 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 upcoming gauges.
func (Keeper) HandleCreateGaugeProposal ¶
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
InitGenesis initializes the incentives module's state from a provided genesis state.
func (Keeper) ParseGroupFromBz ¶
func (Keeper) SetGaugeWithRefKey ¶
SetGaugeWithRefKey takes a single gauge and assigns a key. Takes combinedKey (the keyPrefix for upcoming, active, or finished gauges combined with gauge start time) and adds a reference to the respective gauge ID. If this gauge is active or upcoming, creates reference between the denom and gauge ID.
func (Keeper) SetGroup ¶
SetGroup sets groupGroup for a specific key. TODO: explore if we can store this better, this has GroupGaugeId in key and value
func (*Keeper) SetHooks ¶
func (k *Keeper) SetHooks(ih types.IncentiveHooks) *Keeper
SetHooks sets the incentives hooks.
func (Keeper) SetLastGaugeID ¶
SetLastGaugeID sets the last used gauge ID to the provided ID.
func (Keeper) SetLockableDurations ¶
SetLockableDurations sets which lockable durations will be incentivized.
func (Keeper) SetParam ¶
SetParam sets a specific incentives module's parameter with the provided parameter.
func (*Keeper) SetPoolIncentivesKeeper ¶
func (k *Keeper) SetPoolIncentivesKeeper(poolIncentiveKeeper types.PoolIncentiveKeeper)
SetPoolIncentivesKeeper sets pool incentives keeper
func (Keeper) UpcomingGaugesIterator ¶
func (k Keeper) UpcomingGaugesIterator(ctx sdk.Context) storetypes.Iterator
UpcomingGaugesIterator returns the iterator for all upcoming gauges.
func (Keeper) UpcomingGaugesIteratorAfterTime ¶
func (k Keeper) UpcomingGaugesIteratorAfterTime(ctx sdk.Context, time time.Time) storetypes.Iterator
UpcomingGaugesIteratorAfterTime returns the iterator to get all upcoming gauges that start distribution after a specific time.
func (Keeper) UpcomingGaugesIteratorBeforeTime ¶
func (k Keeper) UpcomingGaugesIteratorBeforeTime(ctx sdk.Context, time time.Time) storetypes.Iterator
UpcomingGaugesIteratorBeforeTime returns the iterator to get all upcoming gauges that have already started distribution before a specific time.
type Querier ¶
type Querier struct {
Keeper
}
Querier defines a wrapper around the incentives module keeper providing gRPC method handlers.
func (Querier) ActiveGauges ¶
func (q Querier) ActiveGauges(goCtx context.Context, req *types.ActiveGaugesRequest) (*types.ActiveGaugesResponse, error)
ActiveGauges returns all active gauges.
func (Querier) ActiveGaugesPerDenom ¶
func (q Querier) ActiveGaugesPerDenom(goCtx context.Context, req *types.ActiveGaugesPerDenomRequest) (*types.ActiveGaugesPerDenomResponse, error)
ActiveGaugesPerDenom returns all active gauges for the specified denom.
func (Querier) AllGroups ¶
func (q Querier) AllGroups(goCtx context.Context, req *types.QueryAllGroupsRequest) (*types.QueryAllGroupsResponse, error)
AllGroups returns all groups that exist on chain.
func (Querier) AllGroupsGauges ¶
func (q Querier) AllGroupsGauges(goCtx context.Context, req *types.QueryAllGroupsGaugesRequest) (*types.QueryAllGroupsGaugesResponse, error)
AllGroupsGauges returns all group gauges that exist on chain.
func (Querier) AllGroupsWithGauge ¶
func (q Querier) AllGroupsWithGauge(goCtx context.Context, req *types.QueryAllGroupsWithGaugeRequest) (*types.QueryAllGroupsWithGaugeResponse, error)
AllGroupsWithGauge returns all groups with their respective gauge that exist on chain.
func (Querier) CurrentWeightByGroupGaugeID ¶
func (q Querier) CurrentWeightByGroupGaugeID(goCtx context.Context, req *types.QueryCurrentWeightByGroupGaugeIDRequest) (*types.QueryCurrentWeightByGroupGaugeIDResponse, error)
func (Querier) ExternalGauges ¶
func (q Querier) ExternalGauges(goCtx context.Context, req *types.QueryExternalGaugesRequest) (*types.QueryExternalGaugesResponse, error)
func (Querier) GaugeByID ¶
func (q Querier) GaugeByID(goCtx context.Context, req *types.GaugeByIDRequest) (*types.GaugeByIDResponse, error)
GaugeByID takes a gaugeID and returns its respective gauge.
func (Querier) Gauges ¶
func (q Querier) Gauges(goCtx context.Context, req *types.GaugesRequest) (*types.GaugesResponse, error)
Gauges returns all upcoming and active gauges.
func (Querier) GaugesByPoolID ¶
func (q Querier) GaugesByPoolID(goCtx context.Context, req *types.QueryGaugesByPoolIDRequest) (*types.QueryGaugesByPoolIDResponse, error)
func (Querier) GroupByGroupGaugeID ¶
func (q Querier) GroupByGroupGaugeID(goCtx context.Context, req *types.QueryGroupByGroupGaugeIDRequest) (*types.QueryGroupByGroupGaugeIDResponse, error)
GroupByGroupGaugeID retrieves a group by its associated gauge ID. If the group cannot be found or an error occurs during the operation, it returns an error.
func (Querier) InternalGauges ¶
func (q Querier) InternalGauges(goCtx context.Context, req *types.QueryInternalGaugesRequest) (*types.QueryInternalGaugesResponse, error)
func (Querier) LockableDurations ¶
func (q Querier) LockableDurations(ctx context.Context, _ *types.QueryLockableDurationsRequest) (*types.QueryLockableDurationsResponse, error)
LockableDurations returns all of the allowed lockable durations on chain.
func (Querier) ModuleToDistributeCoins ¶
func (q Querier) ModuleToDistributeCoins(goCtx context.Context, _ *types.ModuleToDistributeCoinsRequest) (*types.ModuleToDistributeCoinsResponse, error)
ModuleToDistributeCoins returns coins that are going to be distributed.
func (Querier) Params ¶
func (q Querier) Params(goCtx context.Context, req *types.ParamsRequest) (*types.ParamsResponse, error)
func (Querier) RewardsEst ¶
func (q Querier) RewardsEst(goCtx context.Context, req *types.RewardsEstRequest) (*types.RewardsEstResponse, error)
RewardsEst returns rewards estimation at a future specific time (by epoch).
func (Querier) UpcomingGauges ¶
func (q Querier) UpcomingGauges(goCtx context.Context, req *types.UpcomingGaugesRequest) (*types.UpcomingGaugesResponse, error)
UpcomingGauges returns all upcoming gauges.
func (Querier) UpcomingGaugesPerDenom ¶
func (q Querier) UpcomingGaugesPerDenom(goCtx context.Context, req *types.UpcomingGaugesPerDenomRequest) (*types.UpcomingGaugesPerDenomResponse, error)
UpcomingGaugesPerDenom returns all upcoming gauges for the specified denom.