keeper

package
v0.0.0-...-7868e01 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier

NewQuerier returns a minting Querier handler.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper of the mint store

func NewKeeper

func NewKeeper(
	cdc codec.BinaryMarshaler, key sdk.StoreKey, paramSpace paramtypes.Subspace,
	ak types.AccountKeeper, bk types.BankKeeper,
	feeCollectorName string,
) Keeper

NewKeeper creates a new mint Keeper instance

func (Keeper) DistributeMintedCoins

func (k Keeper) DistributeMintedCoins(ctx sdk.Context, mintedCoins sdk.Coins) error

DistributeMintedCoins implements distribution of minted coins from mint to external modules.

func (Keeper) EpochProvisions

EpochProvisions returns minter.EpochProvisions of the mint module.

func (Keeper) GetEpochNum

func (k Keeper) GetEpochNum(ctx sdk.Context) int64

GetEpochNum returns epoch number

func (Keeper) GetLastEpochTime

func (k Keeper) GetLastEpochTime(ctx sdk.Context) time.Time

GetLastEpochTime returns last epoch time

func (Keeper) GetLastHalvenEpochNum

func (k Keeper) GetLastHalvenEpochNum(ctx sdk.Context) int64

GetLastHalvenEpochNum returns last halven epoch number

func (Keeper) GetMinter

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

get 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) GetProportions

func (k Keeper) GetProportions(ctx sdk.Context, fees sdk.Coins, ratio sdk.Dec) sdk.Coin

GetPoolAllocatableAsset gets the balance of the `MintedDenom` from fees and returns coins according to the `AllocationRatio`

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) MintCoins

func (k Keeper) MintCoins(ctx sdk.Context, newCoins sdk.Coins) error

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

func (Keeper) Params

Params returns params of the mint module.

func (Keeper) SetEpochNum

func (k Keeper) SetEpochNum(ctx sdk.Context, epochNum int64)

SetEpochNum set epoch number

func (*Keeper) SetHooks

func (k *Keeper) SetHooks(h types.MintHooks) *Keeper

Set the mint hooks

func (Keeper) SetLastEpochTime

func (k Keeper) SetLastEpochTime(ctx sdk.Context, epochTime time.Time)

SetLastEpochTime set last epoch time

func (Keeper) SetLastHalvenEpochNum

func (k Keeper) SetLastHalvenEpochNum(ctx sdk.Context, epochNum int64)

SetLastHalvenEpochNum set last halven epoch number

func (Keeper) SetMinter

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

set the minter

func (Keeper) SetParams

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

SetParams sets the total set of minting parameters.

Jump to

Keyboard shortcuts

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