keeper

package
v5.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LabelExecuteReadySchedules   = "execute_ready_schedules"
	LabelScheduleCount           = "schedule_count"
	LabelScheduleExecutionsCount = "schedule_executions_count"

	MetricLabelSuccess      = "success"
	MetricLabelScheduleName = "schedule_name"
)

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 {
	WasmMsgServer types.WasmMsgServer
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	accountKeeper types.AccountKeeper,
	authority string,
) *Keeper

func (*Keeper) AddSchedule

func (k *Keeper) AddSchedule(
	ctx sdk.Context,
	name string,
	period uint64,
	msgs []types.MsgExecuteContract,
	executionStage types.ExecutionStage,
) error

AddSchedule adds a new schedule to be executed every certain number of blocks, specified in the `period`. First schedule execution is supposed to be on `now + period` block.

func (*Keeper) ExecuteReadySchedules

func (k *Keeper) ExecuteReadySchedules(ctx sdk.Context, executionStage types.ExecutionStage)

ExecuteReadySchedules gets all schedules that are due for execution (with limit that is equal to Params.Limit) and executes messages in each one

func (*Keeper) GetAllSchedules

func (k *Keeper) GetAllSchedules(ctx sdk.Context) []types.Schedule

GetAllSchedules returns all schedules

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (*Keeper) GetSchedule

func (k *Keeper) GetSchedule(ctx sdk.Context, name string) (*types.Schedule, bool)

GetSchedule returns schedule with a given `name`

func (*Keeper) GetScheduleCount

func (k *Keeper) GetScheduleCount(ctx sdk.Context) int32

func (*Keeper) Logger

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

func (Keeper) Params

func (*Keeper) RemoveSchedule

func (k *Keeper) RemoveSchedule(ctx sdk.Context, name string)

RemoveSchedule removes schedule with a given `name`

func (Keeper) SetParams

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

SetParams set the params

type Migrator

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

Migrator is a struct for handling in-place store migrations.

func NewMigrator

func NewMigrator(keeper Keeper) Migrator

NewMigrator returns a new Migrator.

func (Migrator) Migrate1to2

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

Migrate1to2 migrates from version 1 to 2.

Jump to

Keyboard shortcuts

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