keeper

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: GPL-3.0, Apache-2.0 Imports: 15 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 Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	authority string,
) *Keeper

func (Keeper) AfterEpochEnd

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

AfterEpochEnd executes the indicated hook after epochs ends

func (Keeper) AllEpochInfos

func (k Keeper) AllEpochInfos(ctx sdk.Context) []types.EpochInfo

AllEpochInfos returns every epochInfo in the store

func (Keeper) BeforeEpochStart

func (k Keeper) BeforeEpochStart(ctx sdk.Context, identifier string, epochNumber int64)

BeforeEpochStart executes the indicated hook before the epochs

func (Keeper) BeginBlocker

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

BeginBlocker of epochs module

func (Keeper) CurrentEpoch

CurrentEpoch provides current epoch of specified identifier

func (Keeper) DeleteEpochInfo

func (k Keeper) DeleteEpochInfo(ctx sdk.Context, identifier string)

DeleteEpochInfo delete epoch info

func (Keeper) EpochInfos

EpochInfos provide running epochInfos

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the module's authority.

func (Keeper) GetEpochInfo

func (k Keeper) GetEpochInfo(ctx sdk.Context, identifier string) (types.EpochInfo, bool)

GetEpochInfo returns epoch info by identifier

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) IterateEpochInfo

func (k Keeper) IterateEpochInfo(ctx sdk.Context, fn func(index int64, epochInfo types.EpochInfo) (stop bool))

IterateEpochInfo iterate through epochs

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) Params

func (Keeper) SetEpochInfo

func (k Keeper) SetEpochInfo(ctx sdk.Context, epoch types.EpochInfo)

SetEpochInfo set epoch info

func (*Keeper) SetHooks

func (k *Keeper) SetHooks(eh types.EpochHooks) *Keeper

SetHooks set the epoch hooks

func (Keeper) SetParams

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

SetParams set the params

type MultiEpochHooks

type MultiEpochHooks []types.EpochHooks

combine multiple epoch hooks, all hook functions are run in array sequence

func NewMultiEpochHooks

func NewMultiEpochHooks(hooks ...types.EpochHooks) MultiEpochHooks

func (MultiEpochHooks) AfterEpochEnd

func (mh MultiEpochHooks) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64)

AfterEpochEnd is called when epoch is going to be ended, epochNumber is the number of epoch that is ending

func (MultiEpochHooks) BeforeEpochStart

func (mh MultiEpochHooks) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64)

BeforeEpochStart is called when epoch is going to be started, epochNumber is the number of epoch that is starting

Jump to

Keyboard shortcuts

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