keeper

package
v0.32.4 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: Apache-2.0 Imports: 19 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) 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

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