keeper

package
v12.0.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 9 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.BinaryCodec, key storetypes.StoreKey, mint expected.MintKeeper) Keeper

func (*Keeper) BeginBlock

func (k *Keeper) BeginBlock(ctx sdk.Context) []abcitypes.ValidatorUpdate

func (*Keeper) DeleteInflation

func (k *Keeper) DeleteInflation(ctx sdk.Context, t time.Time)

DeleteInflation removes an inflation record from the module's KVStore based on the timestamp.

func (*Keeper) ExportGenesis

func (k *Keeper) ExportGenesis(ctx sdk.Context) *v1.GenesisState

func (*Keeper) GetInflation

func (k *Keeper) GetInflation(ctx sdk.Context, t time.Time) (inflation v1.Inflation, found bool)

GetInflation retrieves an inflation record from the module's KVStore based on the timestamp. If the inflation record exists, it returns the record and 'found' as true; otherwise, it returns 'found' as false.

func (*Keeper) GetInflations

func (k *Keeper) GetInflations(ctx sdk.Context) (items []v1.Inflation)

GetInflations retrieves all inflation records stored in the module's KVStore.

func (*Keeper) InitGenesis

func (k *Keeper) InitGenesis(ctx sdk.Context, state *v1.GenesisState)

func (*Keeper) IterateInflations

func (k *Keeper) IterateInflations(ctx sdk.Context, fn func(index int, item v1.Inflation) (stop bool))

IterateInflations iterates over all inflation records stored in the module's KVStore and calls the provided function for each record. The iteration stops when the provided function returns 'true'.

func (*Keeper) Logger

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

func (*Keeper) SetInflation

func (k *Keeper) SetInflation(ctx sdk.Context, inflation v1.Inflation)

SetInflation stores an inflation record in the module's KVStore.

func (*Keeper) Store

func (k *Keeper) Store(ctx sdk.Context) sdk.KVStore

Jump to

Keyboard shortcuts

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