Documentation ¶
Index ¶
- type Hooks
- type Keeper
- func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64)
- func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64)
- func (k Keeper) CreateDeveloperVestingModuleAccount(ctx sdk.Context, amount sdk.Coin) error
- func (k Keeper) DistributeMintedCoin(ctx sdk.Context, mintedCoin sdk.Coin) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetLastHalvenEpochNum(ctx sdk.Context) int64
- func (k Keeper) GetMinter(ctx sdk.Context) (minter types.Minter)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- 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) MintCoins(ctx sdk.Context, newCoins sdk.Coins) error
- func (k *Keeper) SetHooks(h types.MintHooks) *Keeper
- func (k Keeper) SetInitialSupplyOffsetDuringMigration(ctx sdk.Context) error
- func (k Keeper) SetLastHalvenEpochNum(ctx sdk.Context, epochNum int64)
- 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 ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the mint store.
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper, ck types.CommunityPoolKeeper, epochKeeper types.EpochKeeper, feeCollectorName string, ) Keeper
NewKeeper creates a new mint Keeper instance.
func (Keeper) AfterEpochEnd ¶
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 reducing minted coins according to the parameters. For an attempt to 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 ¶
BeforeEpochStart is a hook which is executed before the start of an epoch. It is a no-op for mint module.
func (Keeper) CreateDeveloperVestingModuleAccount ¶
CreateDeveloperVestingModuleAccount creates the developer vesting module account and mints amount of tokens to it. Should only be called during the initial genesis creation, never again. Returns nil on success. Returns error in the following cases: - amount is nil or zero. - if ctx has block height greater than 0. - developer vesting module account is already created prior to calling this method.
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) GetLastHalvenEpochNum ¶
GetLastHalvenEpochNum returns last halven epoch number.
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
InitGenesis new mint genesis.
func (Keeper) MintCoins ¶
MintCoins implements an alias call to the underlying supply keeper's MintCoins to be used in BeginBlocker.
func (Keeper) SetInitialSupplyOffsetDuringMigration ¶
SetInitialSupplyOffsetDuringMigration sets the supply offset based on the balance of the developer vesting module account. CreateDeveloperVestingModuleAccount must be called prior to calling this method. That is, developer vesting module account must exist when SetInitialSupplyOffsetDuringMigration is called. Also, SetInitialSupplyOffsetDuringMigration should only be called one time during the initial migration to v7. This is done so because we would like to ensure that unvested developer tokens are not returned as part of the supply queries. The method returns an error if current height in ctx is greater than the v7 upgrade height.
func (Keeper) SetLastHalvenEpochNum ¶
SetLastHalvenEpochNum set last halven epoch number.
type Querier ¶
type Querier struct {
Keeper
}
Querier defines a wrapper around the x/mint keeper providing gRPC method handlers.
func NewQuerier ¶
func (Querier) EpochProvisions ¶
func (q Querier) EpochProvisions(c context.Context, _ *types.QueryEpochProvisionsRequest) (*types.QueryEpochProvisionsResponse, error)
EpochProvisions returns minter.EpochProvisions of the mint module.
func (Querier) Params ¶
func (q Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params returns params of the mint module.