Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Hooks
- type Keeper
- func (k Keeper) AfterEpochEnd(ctx sdk.Context, _ string, _ int64)
- func (k Keeper) AllocateInflation(ctx sdk.Context, mintedCoin sdk.Coin, params types.Params) (validatorsCoins sdk.Coins, otherCoins []sdk.Coins, err error)
- func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64)
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetEpochIdentifier(ctx sdk.Context) string
- func (k Keeper) GetEpochsPerPeriod(ctx sdk.Context) int64
- func (k Keeper) GetInflationDistribution(ctx sdk.Context) (dist types.InflationDistribution, found bool)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPeriod(ctx sdk.Context) uint64
- func (k Keeper) GetPeriodMintProvisions(ctx sdk.Context) (sdk.DecCoins, error)
- func (k Keeper) GetProportions(_ sdk.Context, coin sdk.Coin, distribution math.LegacyDec) sdk.Coin
- func (k Keeper) GetSkippedEpochs(ctx sdk.Context) uint64
- func (k Keeper) Hooks() Hooks
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MintCoins(ctx sdk.Context, coin sdk.Coin) error
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetEpochIdentifier(ctx sdk.Context, epochIdentifier string)
- func (k Keeper) SetEpochsPerPeriod(ctx sdk.Context, epochsPerPeriod int64)
- func (k Keeper) SetInflationDistribution(ctx sdk.Context, dist types.InflationDistribution) error
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error
- func (k Keeper) SetPeriod(ctx sdk.Context, period uint64)
- func (k Keeper) SetPeriodMintProvisions(ctx sdk.Context, provisions sdk.DecCoins) error
- func (k Keeper) SetSkippedEpochs(ctx sdk.Context, skippedEpochs uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
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.BinaryCodec, storeKey, memKey storetypes.StoreKey, authority string, bankKeeper types.BankKeeper, distrKeeper types.DistrKeeper, ) Keeper
func (Keeper) AfterEpochEnd ¶
TODO: switch BeforeEpochStart and AfterEpochEnd
func (Keeper) AllocateInflation ¶
func (k Keeper) AllocateInflation( ctx sdk.Context, mintedCoin sdk.Coin, params types.Params, ) ( validatorsCoins sdk.Coins, otherCoins []sdk.Coins, err error, )
AllocateInflation allocates coins from the inflation to external modules according to allocation proportions:
- staking rewards -> sdk `auth` module fee collector
- usage incentives -> `x/incentives` module
- community pool -> `sdk `distr` module community pool
func (Keeper) BeforeEpochStart ¶
AfterEpochEnd mints and allocates coins at the end of each epoch end
func (Keeper) GetAuthority ¶
GetAuthority returns the module's authority.
func (Keeper) GetEpochIdentifier ¶
GetEpochIdentifier gets the epoch identifier
func (Keeper) GetEpochsPerPeriod ¶
GetEpochsPerPeriod gets the epochs per period
func (Keeper) GetInflationDistribution ¶
func (Keeper) GetPeriodMintProvisions ¶
func (Keeper) GetProportions ¶
func (k Keeper) GetProportions( _ sdk.Context, coin sdk.Coin, distribution math.LegacyDec, ) sdk.Coin
GetProportion calculates the proportion of coins that is to be allocated during inflation for a given distribution.
func (Keeper) GetSkippedEpochs ¶
GetSkippedEpochs gets the number of skipped epochs
func (Keeper) MintCoins ¶
MintCoins implements an alias call to the underlying supply keeper's MintCoins to be used in BeginBlocker.
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) SetEpochIdentifier ¶
SetEpochsPerPeriod stores the epoch identifier
func (Keeper) SetEpochsPerPeriod ¶
SetEpochsPerPeriod stores the epochs per period