Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- type Hooks
- type Keeper
- func (k Keeper) ActivePots(goCtx context.Context, req *types.ActivePotsRequest) (*types.ActivePotsResponse, error)
- func (k Keeper) ActivePotsIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) AddToPotRewards(ctx sdk.Context, owner sdk.AccAddress, coins sdk.Coins, potID 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, pot types.Pot) error
- func (k Keeper) CreatePot(ctx sdk.Context, isPerpetual bool, owner sdk.AccAddress, coins sdk.Coins, ...) (uint64, error)
- func (k Keeper) Distribute(ctx sdk.Context, pot types.Pot) (sdk.Coins, error)
- func (k Keeper) FilteredLocksDistributionEst(ctx sdk.Context, pot types.Pot, filteredLocks []lockuptypes.PeriodLock) (types.Pot, sdk.Coins, error)
- func (k Keeper) FinishDistribution(ctx sdk.Context, pot types.Pot) error
- func (k Keeper) FinishedPotsIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetActivePots(ctx sdk.Context) []types.Pot
- func (k Keeper) GetFinishedPots(ctx sdk.Context) []types.Pot
- 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) GetNotFinishedPots(ctx sdk.Context) []types.Pot
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPotByID(ctx sdk.Context, potID uint64) (*types.Pot, error)
- func (k Keeper) GetPotFromIDs(ctx sdk.Context, refValue []byte) ([]types.Pot, error)
- func (k Keeper) GetPots(ctx sdk.Context) []types.Pot
- func (k Keeper) GetRewardsEst(ctx sdk.Context, addr sdk.AccAddress, locks []lockuptypes.PeriodLock, ...) sdk.Coins
- func (k Keeper) GetUpcomingPots(ctx sdk.Context) []types.Pot
- func (k Keeper) Hooks() Hooks
- 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) PotByID(goCtx context.Context, req *types.PotByIDRequest) (*types.PotByIDResponse, error)
- func (k Keeper) Pots(goCtx context.Context, req *types.PotsRequest) (*types.PotsResponse, error)
- func (k Keeper) PotsIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) RewardsEst(goCtx context.Context, req *types.RewardsEstRequest) (*types.RewardsEstResponse, error)
- func (k *Keeper) SetHooks(ih types.IncentiveHooks) *Keeper
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPotWithRefKey(ctx sdk.Context, pot *types.Pot) error
- func (k Keeper) UpcomingPots(goCtx context.Context, req *types.UpcomingPotsRequest) (*types.UpcomingPotsResponse, error)
- func (k Keeper) UpcomingPotsIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) UpcomingPotsIteratorAfterTime(ctx sdk.Context, time time.Time) sdk.Iterator
- func (k Keeper) UpcomingPotsIteratorBeforeTime(ctx sdk.Context, time time.Time) sdk.Iterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.Marshaler, storeKey sdk.StoreKey, paramSpace paramtypes.Subspace, ak authkeeper.AccountKeeper, bk types.BankKeeper, lk types.LockupKeeper, ek types.EpochKeeper) *Keeper
func (Keeper) ActivePots ¶
func (k Keeper) ActivePots(goCtx context.Context, req *types.ActivePotsRequest) (*types.ActivePotsResponse, error)
ActivePots returns active pots
func (Keeper) ActivePotsIterator ¶
ActivePotsIterator returns iterator for active pots
func (Keeper) AddToPotRewards ¶
func (k Keeper) AddToPotRewards(ctx sdk.Context, owner sdk.AccAddress, coins sdk.Coins, potID uint64) error
AddToPot add coins to pot
func (Keeper) AfterEpochEnd ¶
func (Keeper) BeforeEpochStart ¶
func (Keeper) BeginDistribution ¶
BeginDistribution is a utility to begin distribution for a specific pot
func (Keeper) CreatePot ¶
func (k Keeper) CreatePot(ctx sdk.Context, isPerpetual bool, owner sdk.AccAddress, coins sdk.Coins, distrTo lockuptypes.QueryCondition, startTime time.Time, numEpochsPaidOver uint64) (uint64, error)
CreatePot create a pot and send coins to the pot
func (Keeper) Distribute ¶
Distribute coins from pot according to its conditions
func (Keeper) FilteredLocksDistributionEst ¶
func (k Keeper) FilteredLocksDistributionEst(ctx sdk.Context, pot types.Pot, filteredLocks []lockuptypes.PeriodLock) (types.Pot, sdk.Coins, error)
FilteredLocksDistributionEst estimate distribution amount coins from pot for fitting conditions
func (Keeper) FinishDistribution ¶
FinishDistribution is a utility to finish distribution for a specific pot
func (Keeper) FinishedPotsIterator ¶
FinishedPotsIterator returns iterator for finished pots
func (Keeper) GetActivePots ¶
GetActivePots returns active pots
func (Keeper) GetFinishedPots ¶
GetFinishedPots returns finished pots
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) GetPotByID ¶
GetPotByID Returns pot from pot ID
func (Keeper) GetPotFromIDs ¶
GetPotFromIDs returns pots from pot ids reference
func (Keeper) GetRewardsEst ¶
func (k Keeper) GetRewardsEst(ctx sdk.Context, addr sdk.AccAddress, locks []lockuptypes.PeriodLock, pots []types.Pot, endEpoch int64) sdk.Coins
GetRewardsEst returns rewards estimation at a future specific time
func (Keeper) GetUpcomingPots ¶
GetUpcomingPots returns scheduled pots
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) PotByID ¶
func (k Keeper) PotByID(goCtx context.Context, req *types.PotByIDRequest) (*types.PotByIDResponse, error)
PotByID returns Pot by id
func (Keeper) Pots ¶
func (k Keeper) Pots(goCtx context.Context, req *types.PotsRequest) (*types.PotsResponse, error)
Pots returns pots both upcoming and active
func (Keeper) PotsIterator ¶
PotsIterator returns iterator for all pots
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) SetHooks ¶
func (k *Keeper) SetHooks(ih types.IncentiveHooks) *Keeper
Set the gamm hooks
func (Keeper) SetPotWithRefKey ¶
func (Keeper) UpcomingPots ¶
func (k Keeper) UpcomingPots(goCtx context.Context, req *types.UpcomingPotsRequest) (*types.UpcomingPotsResponse, error)
UpcomingPots returns scheduled pots
func (Keeper) UpcomingPotsIterator ¶
UpcomingPotsIterator returns iterator for upcoming pots
func (Keeper) UpcomingPotsIteratorAfterTime ¶
UpcomingPotsIteratorAfterTime returns the iterator to get upcoming pots that start distribution after specific time