Documentation
¶
Index ¶
- func DefaultMintFn(ic types.InflationCalculationFn, staking types.StakingKeeper, k *Keeper) types.MintFn
- func NewMsgServerImpl(k *Keeper) types.MsgServer
- func NewQueryServerImpl(k *Keeper) types.QueryServer
- type Keeper
- func (k *Keeper) AddCollectedFees(ctx context.Context, fees sdk.Coins) error
- func (k Keeper) BeginBlocker(ctx context.Context) error
- func (keeper Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error)
- func (k *Keeper) GetAuthority() string
- func (keeper Keeper) InitGenesis(ctx context.Context, ak types.AccountKeeper, data *types.GenesisState) error
- func (k *Keeper) MintCoins(ctx context.Context, newCoins sdk.Coins) error
- func (k *Keeper) MintFn(ctx context.Context, minter *types.Minter, epochId string, epochNumber int64) error
- func (k *Keeper) SetMintFn(mintFn types.MintFn) error
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultMintFn ¶
func DefaultMintFn(ic types.InflationCalculationFn, staking types.StakingKeeper, k *Keeper) types.MintFn
DefaultMintFn returns a default mint function. It requires the Staking module and the mint keeper. The default Mintfn has a requirement on staking as it uses bond to calculate inflation.
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the x/mint MsgServer interface.
func NewQueryServerImpl ¶
func NewQueryServerImpl(k *Keeper) types.QueryServer
Types ¶
type Keeper ¶
type Keeper struct { appmodule.Environment Schema collections.Schema Params collections.Item[types.Params] Minter collections.Item[types.Minter] // contains filtered or unexported fields }
Keeper of the mint store
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, env appmodule.Environment, ak types.AccountKeeper, bk types.BankKeeper, feeCollectorName string, authority string, ) *Keeper
NewKeeper creates a new mint Keeper instance
func (*Keeper) AddCollectedFees ¶
AddCollectedFees implements an alias call to the underlying supply keeper's AddCollectedFees to be used in BeginBlocker.
func (Keeper) BeginBlocker ¶
BeginBlocker mints new tokens for the previous block.
func (Keeper) ExportGenesis ¶
ExportGenesis returns a GenesisState for a given context and keeper.
func (*Keeper) GetAuthority ¶
GetAuthority returns the x/mint module's authority.
func (Keeper) InitGenesis ¶
func (keeper Keeper) InitGenesis(ctx context.Context, ak types.AccountKeeper, data *types.GenesisState) error
InitGenesis new mint genesis
func (*Keeper) MintCoins ¶
MintCoins implements an alias call to the underlying supply keeper's MintCoins to be used in BeginBlocker.
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place state migrations.
func NewMigrator ¶
NewMigrator returns Migrator instance for the state migration.
func (Migrator) Migrate1to2 ¶
Migrate1to2 migrates the x/mint module state from the consensus version 1 to version 2. Specifically, it takes the parameters that are currently stored and managed by the x/params modules and stores them directly into the x/mint module state.