keeper

package
v0.45.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

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.

Types

type Hooks

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

Hooks wrapper struct for commitments keeper

func (Hooks) AfterEpochEnd

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

AfterEpochEnd implements EpochHooks

func (Hooks) BeforeEpochStart

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

BeforeEpochStart implements EpochHooks

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,

	authKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	authority string,
) *Keeper

func (Keeper) AfterEpochEnd

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

AfterEpochEnd burns native tokens held in the module wallet at the end of each epoch

func (Keeper) BeforeEpochStart

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

BeforeEpochStart performs a no-op

func (Keeper) BurnTokensForAllDenoms

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

BurnTokensForAllDenoms burns tokens for all denominations

func (Keeper) GetAllHistory

func (k Keeper) GetAllHistory(ctx sdk.Context) (list []types.History)

GetAllHistory returns all history

func (Keeper) GetHistory

func (k Keeper) GetHistory(
	ctx sdk.Context,
	timestamp string,
	denom string,
) (val types.History, found bool)

GetHistory returns a history from its index

func (Keeper) GetLegacyParams added in v0.45.0

func (k Keeper) GetLegacyParams(ctx sdk.Context) types.Params

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) HistoryAll

func (Keeper) Hooks

func (k Keeper) Hooks() Hooks

Return the wrapper struct

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) RemoveHistory

func (k Keeper) RemoveHistory(
	ctx sdk.Context,
	timestamp string,
	denom string,
)

RemoveHistory removes a history from the store

func (Keeper) SetHistory

func (k Keeper) SetHistory(ctx sdk.Context, history types.History)

SetHistory set a specific history in the store from its index

func (Keeper) SetParams

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

func (Keeper) ShouldBurnTokens

func (k Keeper) ShouldBurnTokens(ctx sdk.Context, epochIdentifier string) bool

ShouldBurnTokens checks if tokens should be burned for the given epoch

Jump to

Keyboard shortcuts

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