Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- 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) (staking, communityPool sdk.Coins, err error)
- func (k Keeper) BeforeEpochStart(_ sdk.Context, _ string, _ int64)
- func (k Keeper) BondedRatio(ctx sdk.Context) sdkmath.LegacyDec
- func (k Keeper) CirculatingSupply(c context.Context, _ *types.QueryCirculatingSupplyRequest) (*types.QueryCirculatingSupplyResponse, error)
- func (k Keeper) EpochMintProvision(c context.Context, _ *types.QueryEpochMintProvisionRequest) (*types.QueryEpochMintProvisionResponse, error)
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetCirculatingSupply(ctx sdk.Context) sdkmath.LegacyDec
- func (k Keeper) GetComPool(ctx sdk.Context) sdk.DecCoins
- func (k Keeper) GetEpochIdentifier(ctx sdk.Context) string
- func (k Keeper) GetEpochMintProvision(ctx sdk.Context) (sdkmath.LegacyDec, bool)
- func (k Keeper) GetEpochsPerPeriod(ctx sdk.Context) int64
- func (k Keeper) GetInflationRate(ctx sdk.Context) sdkmath.LegacyDec
- 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 sdkmath.LegacyDec) sdk.Coin
- func (k Keeper) GetSkippedEpochs(ctx sdk.Context) uint64
- 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) (staking, communityPool sdk.Coins, err error)
- func (k Keeper) MintCoins(ctx sdk.Context, coin 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 sdkmath.LegacyDec)
- 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)
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the inflation 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
}
Keeper of the inflation store
func NewKeeper ¶
func NewKeeper( storeService store.KVStoreService, cdc codec.BinaryCodec, ps paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper, dk distrkeeper.Keeper, sk types.StakingKeeper, feeCollectorName string, authority string, ) Keeper
NewKeeper creates a new mint Keeper instance
func (Keeper) AfterEpochEnd ¶
AfterEpochEnd mints and allocates coins at the end of each epoch end
func (Keeper) AllocateExponentialInflation ¶
func (k Keeper) AllocateExponentialInflation( ctx sdk.Context, mintedCoin sdk.Coin, ) ( staking, communityPool sdk.Coins, err error, )
AllocateExponentialInflation allocates coins from the inflation to external modules according to allocation proportions:
- staking rewards -> sdk `auth` module fee collector
- 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) CirculatingSupply ¶
func (k Keeper) CirculatingSupply( c context.Context, _ *types.QueryCirculatingSupplyRequest, ) (*types.QueryCirculatingSupplyResponse, error)
CirculatingSupply returns the total supply in circulation excluding the team allocation in the first year
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) GetAuthority ¶
GetAuthority returns the x/inflation module's authority.
func (Keeper) GetCirculatingSupply ¶
GetCirculatingSupply returns the bank supply of the mintDenom
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 ¶
func (k Keeper) GetProportions( ctx sdk.Context, coin sdk.Coin, distribution sdkmath.LegacyDec, ) sdk.Coin
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) 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 ¶
func (k Keeper) MintAndAllocateInflation( ctx sdk.Context, coin sdk.Coin, ) ( staking, communityPool sdk.Coins, err error, )
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.