keeper

package
v2.0.1-0...-ba8258b Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 18 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) error

AddSchedule adds new schedule to execution for every block `period`. First schedule execution is supposed to be on `now + period` block.

func (*Keeper) ExecuteReadySchedules

func (k *Keeper) ExecuteReadySchedules(ctx sdk.Context)

ExecuteReadySchedules gets all schedules that are due for execution (with limit that is equal to Params.Limit) and executes messages in each one NOTE that errors in contract calls rollback all already executed messages

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

func (Keeper) UpdateParams

UpdateParams updates the module parameters

Jump to

Keyboard shortcuts

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