keeper

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: 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,
	ps paramtypes.Subspace,
	epochstorageKeeper types.EpochStorageKeeper,
	specKeeper types.SpecKeeper,
) *Keeper

func (Keeper) AddPlan

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

AddPlan adds a new plan to the KVStore

func (Keeper) BeginBlock added in v0.10.0

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

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) []commontypes.RawMessage

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, data []commontypes.RawMessage)

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) Migrate2to3

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

Migrate2to3 implements store migration from v1 to v2:

  • Trigger the version upgrade of the planFS fixation store
  • Update plan policy

func (Migrator) Migrate3to4

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

Migrate3to4 implements store migration from v3 to v4:

  • Trigger the version upgrade of the planFS fixation store
  • Replace the store prefix from module-name ("plan") to "plan-fs"

func (Migrator) Migrate4to5

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

Migrate4to5 implements store migration from v4 to v5:

  • Trigger the version upgrade of the planFS fixation store (so it will call the version upgrade of its timer store).

func (Migrator) Migrate5to6

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

Migrate5to6 implements store migration from v5 to v6: -- trigger fixation migration, deleteat and live variables

func (Migrator) Migrate6to7

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

Migrate6to7 implements store migration from v6 to v7: -- trigger fixation migration (v4->v5), initialize IsLatest field

Jump to

Keyboard shortcuts

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