keeper

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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,
	sk types.StakingKeeper, ak types.AccountKeeper, bk types.BankKeeper, dk types.DistrKeeper,
	feeCollectorName string,
) Keeper

NewKeeper creates a new mint Keeper instance

func (Keeper) AnnualProvisions

AnnualProvisions returns minter.AnnualProvisions of the mint module.

func (Keeper) BeginBlocker

func (k Keeper) BeginBlocker(ctx sdk.Context) error

BeginBlocker mints new coins for the previous block.

func (Keeper) BondedRatio

func (k Keeper) BondedRatio(ctx sdk.Context) sdk.Dec

BondedRatio implements an alias call to the underlying staking keeper's BondedRatio to be used in BeginBlocker.

func (Keeper) DistributeMintedCoin

func (k Keeper) DistributeMintedCoin(ctx sdk.Context, mintedCoin sdk.Coin) error

DistributeMintedCoin implements distribution of minted coins from mint to be used in BeginBlocker.

func (Keeper) GetMinter

func (k Keeper) GetMinter(ctx sdk.Context) (minter types.Minter)

GetMinter gets the minter

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams returns the total set of minting parameters.

func (Keeper) GetProportion

func (k Keeper) GetProportion(_ sdk.Context, mintedCoin sdk.Coin, ratio sdk.Dec) sdk.Coin

GetProportion gets the balance of the `MintedDenom` from minted coins and returns coins according to the `AllocationRatio`.

func (Keeper) Inflation

Inflation returns minter.Inflation of the mint module.

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) MintCoin

func (k Keeper) MintCoin(ctx sdk.Context, coin sdk.Coin) error

MintCoin implements an alias call to the underlying supply keeper's MintCoin to be used in BeginBlocker.

func (Keeper) Params

Params returns params of the mint module.

func (Keeper) SetMinter

func (k Keeper) SetMinter(ctx sdk.Context, minter types.Minter)

SetMinter sets the minter

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams sets the total set of minting parameters.

func (Keeper) StakingTokenSupply

func (k Keeper) StakingTokenSupply(ctx sdk.Context) sdkmath.Int

StakingTokenSupply implements an alias call to the underlying staking keeper's StakingTokenSupply to be used in BeginBlocker.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL