Documentation ¶
Index ¶
- type Hooks
- type Keeper
- func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochInfo epochstypes.EpochInfo)
- func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochInfo epochstypes.EpochInfo)
- func (k Keeper) CalcMintedCoins(ctx sdk.Context, totalAmt math.Int) sdk.Dec
- func (k Keeper) DistributeMintedCoin(ctx sdk.Context, mintedCoins sdk.Coins) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetMinter(ctx sdk.Context) (minter types.Minter)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) HandleInflationChange(ctx sdk.Context) (inflationRate sdk.Dec, err error)
- func (k Keeper) HandleMintingEpoch(ctx sdk.Context) (sdk.Coins, error)
- func (k Keeper) Hooks() Hooks
- func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k *Keeper) SetHooks(h types.MintHooks) *Keeper
- func (k Keeper) SetMinter(ctx sdk.Context, minter types.Minter)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- type Querier
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 ¶
func (h Hooks) AfterEpochEnd(ctx sdk.Context, epochInfo epochstypes.EpochInfo)
func (Hooks) BeforeEpochStart ¶
func (h Hooks) BeforeEpochStart(ctx sdk.Context, epochInfo epochstypes.EpochInfo)
epochs hooks.
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the mint store.
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper, epochKeeper types.EpochKeeper, feeCollectorName string, ) Keeper
NewKeeper creates a new mint Keeper instance.
func (Keeper) AfterEpochEnd ¶
func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochInfo epochstypes.EpochInfo)
AfterEpochEnd is a hook which is executed after the end of an epoch. This hook should attempt to mint and distribute coins according to the configuration set via parameters. In addition, it handles the logic for updating the inflation according to the parameters. For a mint to occur: - given epochIdentifier must be equal to the mint epoch identifier set via parameters. - given epochNumber must be greater than or equal to the mint start epoch set via parameters.
func (Keeper) BeforeEpochStart ¶
func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochInfo epochstypes.EpochInfo)
BeforeEpochStart is a hook which is executed before the start of an epoch. It is a no-op for mint module.
func (Keeper) CalcMintedCoins ¶
func (Keeper) DistributeMintedCoin ¶
DistributeMintedCoins implements distribution of minted coins from mint to external modules.
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns a GenesisState for a given context and keeper.
func (Keeper) HandleInflationChange ¶
func (Keeper) HandleMintingEpoch ¶
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
InitGenesis new mint genesis.
type Querier ¶
type Querier struct {
Keeper
}
Querier defines a wrapper around the x/mint keeper providing gRPC method handlers.
func NewQuerier ¶
func (Querier) Inflation ¶
func (q Querier) Inflation(c context.Context, _ *types.QueryInflationRequest) (*types.QueryInflationResponse, error)
func (Querier) Params ¶
func (q Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params returns params of the mint module.