keeper

package
v4.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 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 Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,
	epochstorageKeeper types.EpochStorageKeeper,
	specKeeper types.SpecKeeper,
	fixationStoreKeeper types.FixationStoreKeeper,
	stakingKeeper types.StakingKeeper,
) *Keeper

func (Keeper) AddPlan

func (k Keeper) AddPlan(ctx sdk.Context, planToAdd types.Plan, modify bool) error

AddPlan adds a new plan to the KVStore

func (Keeper) DelPlan

func (k Keeper) DelPlan(ctx sdk.Context, index string) error

DelPlan deletes a plan, so it is not visible/gettable for new subscriptions (however, existing referenced versions remain intact until not used anymore)

func (Keeper) ExportPlans

func (k Keeper) ExportPlans(ctx sdk.Context) fixationtypes.GenesisState

Export all plans from the KVStore

func (Keeper) FindPlan

func (k Keeper) FindPlan(ctx sdk.Context, index string, block uint64) (val types.Plan, found bool)

FindPlan gets a plan with nearest-smaller block (without changing its refcount)

func (Keeper) GetAllPlanIndices

func (k Keeper) GetAllPlanIndices(ctx sdk.Context) (val []string)

GetAllPlanIndices gets from the KVStore all the plans' indices

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetPlan

func (k Keeper) GetPlan(ctx sdk.Context, index string) (val types.Plan, found bool)

GetPlan gets the latest plan from the KVStore and increments its refcount

func (Keeper) Info

func (Keeper) InitPlans

func (k Keeper) InitPlans(ctx sdk.Context, gs fixationtypes.GenesisState)

Init all plans in the KVStore

func (Keeper) IsEpochStart

func (k Keeper) IsEpochStart(ctx sdk.Context) bool

func (Keeper) List

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) PutPlan

func (k Keeper) PutPlan(ctx sdk.Context, index string, block uint64)

PutPlan finds a plan with nearest-smaller block and decrements its refcount

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) ValidatePlanFields

func (k Keeper) ValidatePlanFields(ctx sdk.Context, planToAdd *types.Plan) error

type Migrator

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

func NewMigrator

func NewMigrator(keeper Keeper) Migrator

func (Migrator) Migrate7to8

func (m Migrator) Migrate7to8(ctx sdk.Context) error

Jump to

Keyboard shortcuts

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