keeper

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

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

func NewKeeper

func NewKeeper(cdc codec.Codec, storeKey sdk.StoreKey) *Keeper

func (Keeper) AfterEpochEnd

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

func (Keeper) AllEpochInfos

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

func (Keeper) BeforeEpochStart

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

func (Keeper) DeleteEpochInfo

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

DeleteEpochInfo delete epoch info.

func (Keeper) GetEpochInfo

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

GetEpochInfo returns epoch info by identifier.

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

func (Keeper) NumBlocksSinceEpochStart

func (k Keeper) NumBlocksSinceEpochStart(ctx sdk.Context, identifier string) (int64, error)

NumBlocksSinceEpochStart returns the number of blocks since the epoch started. if the epoch started on block N, then calling this during block N (after BeforeEpochStart) would return 0. Calling it any point in block N+1 (assuming the epoch doesn't increment) would return 1.

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

Set the gamm hooks.

type Querier added in v1.1.0

type Querier struct {
	Keeper
}

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

func NewQuerier

func NewQuerier(k Keeper) Querier

func (Querier) CurrentEpoch added in v1.1.0

CurrentEpoch provides current epoch of specified identifier.

func (Querier) EpochInfos added in v1.1.0

EpochInfos provide running epochInfos.

Jump to

Keyboard shortcuts

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