keeper

package
v1.4.5-rc0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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

func (h Hooks) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64) error

func (Hooks) BeforeEpochStart

func (h Hooks) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64) error

epochs hooks.

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

NewKeeper creates a new mint Keeper instance.

func (Keeper) AfterEpochEnd

func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64) error

func (Keeper) BeforeEpochStart

func (Keeper) BeforeEpochStart(_ sdk.Context, _ string, _ int64) error

func (Keeper) DistributeMintedCoin

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

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

func (Keeper) GetLastReductionEpochNum

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

GetLastReductionEpochNum returns last Reduction 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 (Keeper) GetProportions(mintedCoin sdk.Coin, ratio sdk.Dec) sdk.Coin

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

func (Keeper) Hooks

func (k Keeper) Hooks() Hooks

Return the wrapper struct.

func (Keeper) Logger

func (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) SetHooks

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

Set the mint hooks.

func (Keeper) SetLastReductionEpochNum

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

SetLastReductionEpochNum set last Reduction 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.

type Querier

type Querier struct {
	Keeper
}

Querier defines a wrapper around the x/mint keeper providing gRPC method handlers.

func NewQuerier

func NewQuerier(k Keeper) Querier

func (Querier) EpochProvisions

EpochProvisions returns minter.EpochProvisions of the mint module.

func (Querier) Params

Params returns params of the mint module.

Jump to

Keyboard shortcuts

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