keeper

package
v0.0.3-0...-8a3f181 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func NewQueryServerImpl

func NewQueryServerImpl(k Keeper) types.QueryServer

NewQueryServerImpl returns an implementation of the QueryServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	Schema collections.Schema
	Params collections.Item[types.Params]
	Minter collections.Item[types.Minter]
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	addressCodec address.Codec,
	storeService store.KVStoreService,
	logger log.Logger,
	authority string,
	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	stakingKeeper types.StakingKeeper,
	distrKeeper types.DistrKeeper,
	feeCollectorName string,
) Keeper

func (Keeper) BeginBlocker

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

BeginBlocker mints new coins for the previous block.

func (Keeper) BondedRatio

func (k Keeper) BondedRatio(ctx context.Context) (math.LegacyDec, error)

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 context.Context, mintedCoin sdk.Coin) error

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

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the module's authority.

func (Keeper) GetProportion

func (k Keeper) GetProportion(_ context.Context, mintedCoin sdk.Coin, ratio math.LegacyDec) sdk.Coin

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

func (Keeper) Logger

func (k Keeper) Logger() log.Logger

Logger returns a module-specific logger.

func (Keeper) MintCoin

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

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

func (Keeper) StakingTokenSupply

func (k Keeper) StakingTokenSupply(ctx context.Context) (math.Int, error)

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