Documentation ¶
Index ¶
- type Hooks
- type Keeper
- func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber uint64)
- func (k Keeper) AllocateExponentialInflation(ctx sdk.Context, mintedCoin sdk.Coin, params types.Params) (staking, strategic, community sdk.Coin, err error)
- func (k Keeper) BeforeEpochStart(_ sdk.Context, _ string, _ uint64)
- 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) EpochsPerPeriod(ctx sdk.Context) (res uint64)
- func (k Keeper) ExponentialCalculation(ctx sdk.Context) (res types.ExponentialCalculation)
- func (k Keeper) GetCirculatingSupply(ctx sdk.Context, mintDenom string) sdkmath.Int
- func (k Keeper) GetEpochMintProvision(ctx sdk.Context) sdk.Dec
- func (k Keeper) GetInflationRate(ctx sdk.Context, mintDenom string) sdk.Dec
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetProportions(_ sdk.Context, coin sdk.Coin, proportion sdk.Dec) sdk.Coin
- func (k Keeper) Hooks() Hooks
- func (k Keeper) InflationDistribution(ctx sdk.Context) (res types.InflationDistribution)
- func (k Keeper) InflationEnabled(ctx sdk.Context) (res bool)
- 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, coins sdk.Coin, params types.Params) (staking, strategic, community sdk.Coin, 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) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SkippedEpochs(c context.Context, _ *types.QuerySkippedEpochsRequest) (*types.QuerySkippedEpochsResponse, error)
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 { CurrentPeriod collections.Sequence NumSkippedEpochs collections.Sequence // contains filtered or unexported fields }
Keeper of the inflation store
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, paramspace paramstypes.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 allocates coins at the end of each epoch end
func (Keeper) AllocateExponentialInflation ¶
func (k Keeper) AllocateExponentialInflation( ctx sdk.Context, mintedCoin sdk.Coin, params types.Params, ) ( staking, strategic, community sdk.Coin, err error, )
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) 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) ExponentialCalculation ¶
func (k Keeper) ExponentialCalculation(ctx sdk.Context) (res types.ExponentialCalculation)
VotePeriod returns the number of blocks during which voting takes place.
func (Keeper) GetCirculatingSupply ¶
GetCirculatingSupply returns the bank supply of the mintDenom excluding the team allocation in the first year
func (Keeper) GetEpochMintProvision ¶
GetEpochMintProvision retrieves necessary params KV storage and calculate EpochMintProvision
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) InflationDistribution ¶
func (k Keeper) InflationDistribution(ctx sdk.Context) (res types.InflationDistribution)
VoteThreshold returns the minimum percentage of votes that must be received for a ballot to pass.
func (Keeper) InflationEnabled ¶
VoteThreshold returns the minimum percentage of votes that must be received for a ballot to pass.
func (Keeper) InflationRate ¶
func (k Keeper) InflationRate( c context.Context, _ *types.QueryInflationRateRequest, ) (*types.QueryInflationRateResponse, error)
InflationRate returns the inflation rate for the current period.
func (Keeper) MintAndAllocateInflation ¶
func (k Keeper) MintAndAllocateInflation( ctx sdk.Context, coins sdk.Coin, params types.Params, ) ( staking, strategic, community sdk.Coin, 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) SkippedEpochs ¶
func (k Keeper) SkippedEpochs( c context.Context, _ *types.QuerySkippedEpochsRequest, ) (*types.QuerySkippedEpochsResponse, error)
SkippedEpochs returns the number of skipped Epochs of the inflation module.