Documentation
¶
Index ¶
- func NewMsgServerImpl(k Keeper) types.MsgServer
- func NewQueryServerImpl(k Keeper) types.QueryServer
- type InitOption
- type Keeper
- func (k Keeper) AddCollectedFees(ctx context.Context, fees sdk.Coins) error
- func (k Keeper) BondedRatio(ctx context.Context) (math.LegacyDec, error)
- func (keeper Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAuthority() string
- func (keeper Keeper) InitGenesis(ctx sdk.Context, ak types.AccountKeeper, data *types.GenesisState)
- func (k Keeper) Logger(ctx context.Context) log.Logger
- func (k Keeper) MintCoins(ctx context.Context, newCoins sdk.Coins) error
- func (k *Keeper) MintFn(ctx sdk.Context) error
- func (k Keeper) StakingTokenSupply(ctx context.Context) (math.Int, error)
- type Migrator
- type MintFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶ added in v0.47.0
NewMsgServerImpl returns an implementation of the x/mint MsgServer interface.
func NewQueryServerImpl ¶ added in v0.50.1
func NewQueryServerImpl(k Keeper) types.QueryServer
Types ¶
type InitOption ¶ added in v0.53.0
type InitOption func(*Keeper)
func WithMintFn ¶ added in v0.53.0
func WithMintFn(mintFn MintFn) InitOption
WithMintFn sets a custom minting function for the x/mint keeper.
type Keeper ¶
type Keeper struct {
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, storeService storetypes.KVStoreService, sk types.StakingKeeper, ak types.AccountKeeper, bk types.BankKeeper, feeCollectorName string, authority string, opts ...InitOption, ) Keeper
NewKeeper creates a new mint Keeper instance.
The mint keeper is always initialized with the DefaultMintFn but this can be overridden with the WithMintFn option.
func (Keeper) AddCollectedFees ¶
AddCollectedFees implements an alias call to the underlying supply keeper's AddCollectedFees to be used in BeginBlocker.
func (Keeper) BondedRatio ¶
BondedRatio implements an alias call to the underlying staking keeper's BondedRatio to be used in BeginBlocker.
func (Keeper) ExportGenesis ¶ added in v0.46.0
func (keeper Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns a GenesisState for a given context and keeper.
func (Keeper) GetAuthority ¶ added in v0.47.0
GetAuthority returns the x/mint module's authority.
func (Keeper) InitGenesis ¶ added in v0.46.0
func (keeper Keeper) InitGenesis(ctx sdk.Context, ak types.AccountKeeper, 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.
type Migrator ¶ added in v0.47.0
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place state migrations.
func NewMigrator ¶ added in v0.47.0
NewMigrator returns Migrator instance for the state migration.
func (Migrator) Migrate1to2 ¶ added in v0.47.0
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.
type MintFn ¶ added in v0.53.0
MintFn defines the function that needs to be implemented in order to customize the minting process.
func DefaultMintFn ¶ added in v0.53.0
func DefaultMintFn(ic types.InflationCalculationFn) MintFn
DefaultMintFn returns a default mint function. The default MintFn has a requirement on staking as it uses bond to calculate inflation.