Documentation ¶
Index ¶
- type Hooks
- type Keeper
- func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64)
- func (k Keeper) AllocateExponentialInflation(ctx sdk.Context, mintedCoin sdk.Coin) error
- func (k Keeper) BeforeEpochStart(_ sdk.Context, _ string, _ int64)
- func (k Keeper) BondedRatio(ctx sdk.Context) sdk.Dec
- func (k Keeper) EpochMintProvision(c context.Context, _ *types.QueryEpochMintProvisionRequest) (*types.QueryEpochMintProvisionResponse, error)
- func (k Keeper) GetEpochIdentifier(ctx sdk.Context) string
- func (k Keeper) GetEpochMintProvision(ctx sdk.Context) (sdk.Dec, bool)
- func (k Keeper) GetEpochsPerPeriod(ctx sdk.Context) int64
- func (k Keeper) GetInflationRate(ctx sdk.Context) sdk.Dec
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPeriod(ctx sdk.Context) uint64
- func (k Keeper) GetProportions(ctx sdk.Context, coin sdk.Coin, distribution sdk.Dec) sdk.Coin
- func (k Keeper) GetSkippedEpochs(ctx sdk.Context) uint64
- func (k Keeper) GetTotalSupply(ctx sdk.Context) sdk.Dec
- func (k Keeper) Hooks() Hooks
- func (k Keeper) InflationRate(c context.Context, _ *types.QueryInflationRateRequest) (*types.QueryInflationRateResponse, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MintAndAllocateInflation(ctx sdk.Context, coin sdk.Coin) error
- func (k Keeper) MintCoins(ctx sdk.Context, newCoin sdk.Coin) error
- func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) Period(c context.Context, _ *types.QueryPeriodRequest) (*types.QueryPeriodResponse, error)
- func (k Keeper) SetEpochIdentifier(ctx sdk.Context, epochIdentifier string)
- func (k Keeper) SetEpochMintProvision(ctx sdk.Context, epochMintProvision sdk.Dec)
- func (k Keeper) SetEpochsPerPeriod(ctx sdk.Context, epochsPerPeriod int64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPeriod(ctx sdk.Context, period uint64)
- func (k Keeper) SetSkippedEpochs(ctx sdk.Context, skippedEpochs uint64)
- func (k Keeper) SkippedEpochs(c context.Context, _ *types.QuerySkippedEpochsRequest) (*types.QuerySkippedEpochsResponse, error)
- func (k Keeper) TotalSupply(c context.Context, _ *types.QueryTotalSupplyRequest) (*types.QueryTotalSupplyResponse, error)
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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
}
Keeper of the inflation store
func NewKeeper ¶
func NewKeeper( storeKey sdk.StoreKey, cdc codec.BinaryCodec, ps paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper, dk types.DistrKeeper, sk types.StakingKeeper, feeCollectorName string, ) Keeper
NewKeeper creates a new mint Keeper instance
func (Keeper) AfterEpochEnd ¶
AfterEpochEnd mints and distributes coins at the end of each epoch end
func (Keeper) AllocateExponentialInflation ¶
AllocateExponentialInflation 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 ¶
BeforeEpochStart: noop, We don't need to do anything here
func (Keeper) BondedRatio ¶
BondedRatio the fraction of the staking tokens which are currently bonded It doesn't consider team allocation for inflation
func (Keeper) EpochMintProvision ¶
func (k Keeper) EpochMintProvision( c context.Context, _ *types.QueryEpochMintProvisionRequest, ) (*types.QueryEpochMintProvisionResponse, error)
EpochMintProvision returns the EpochMintProvision of the inflation module.
func (Keeper) GetEpochIdentifier ¶
GetEpochIdentifier gets the epoch identifier
func (Keeper) GetEpochMintProvision ¶
GetEpochMintProvision gets the current EpochMintProvision
func (Keeper) GetEpochsPerPeriod ¶
GetEpochsPerPeriod gets the epochs per period
func (Keeper) GetInflationRate ¶
GetInflationRate returns the inflation rate for the current period.
func (Keeper) GetProportions ¶
GetAllocationProportion 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) GetTotalSupply ¶
GetTotalSupply returns the bank supply of the mintDenom excluding the team allocation in the first year
func (Keeper) InflationRate ¶
func (k Keeper) InflationRate( c context.Context, _ *types.QueryInflationRateRequest, ) (*types.QueryInflationRateResponse, error)
InflationRate returns the number of skipped Epochs of the inflation module.
func (Keeper) MintAndAllocateInflation ¶
MintAndAllocateInflation performs inflation minting and allocation
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( c context.Context, _ *types.QueryParamsRequest, ) (*types.QueryParamsResponse, error)
Params returns params of the mint module.
func (Keeper) Period ¶
func (k Keeper) Period( c context.Context, _ *types.QueryPeriodRequest, ) (*types.QueryPeriodResponse, error)
Period returns the current period of the inflation module.
func (Keeper) SetEpochIdentifier ¶
SetEpochsPerPeriod stores the epoch identifier
func (Keeper) SetEpochMintProvision ¶
SetEpochMintProvision sets the current EpochMintProvision
func (Keeper) SetEpochsPerPeriod ¶
SetEpochsPerPeriod stores the epochs per period
func (Keeper) SetSkippedEpochs ¶
SetSkippedEpochs stores the number of skipped epochs
func (Keeper) SkippedEpochs ¶
func (k Keeper) SkippedEpochs( c context.Context, _ *types.QuerySkippedEpochsRequest, ) (*types.QuerySkippedEpochsResponse, error)
SkippedEpochs returns the number of skipped Epochs of the inflation module.
func (Keeper) TotalSupply ¶
func (k Keeper) TotalSupply( c context.Context, _ *types.QueryTotalSupplyRequest, ) (*types.QueryTotalSupplyResponse, error)
TotalSupply returns the number of skipped Epochs of the inflation module.