keeper

package
v0.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContractsIDBytes

func GetContractsIDBytes(id uint64) []byte

GetContractsIDBytes returns the byte representation of the ID

func GetContractsIDFromBytes

func GetContractsIDFromBytes(bz []byte) uint64

GetContractsIDFromBytes returns ID in uint64 format from a byte array

func NewContractAddress

func NewContractAddress(name string) sdk.AccAddress

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,

	accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, injectors []types.Injector,
) *Keeper

func (Keeper) AppendContracts

func (k Keeper) AppendContracts(
	ctx sdk.Context,
	contracts types.Contracts,
) uint64

AppendContracts appends a contracts in the store with a new id and update the count

func (Keeper) Cron

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

func (Keeper) ExecuteContract

func (k Keeper) ExecuteContract(ctx sdk.Context, name string, sourceCode string, entry string, creator sdk.AccAddress, args []goja.Value) (string, error)

func (Keeper) GetAllContracts

func (k Keeper) GetAllContracts(ctx sdk.Context) (list []types.Contracts)

GetAllContracts returns all contracts

func (Keeper) GetAllCronjobs

func (k Keeper) GetAllCronjobs(ctx sdk.Context) (list []types.Cronjobs)

GetAllCronjobs returns all cronjobs

func (Keeper) GetAllProgram

func (k Keeper) GetAllProgram(ctx sdk.Context) (list []types.Program)

GetAllProgram returns all program

func (Keeper) GetAllRomdata

func (k Keeper) GetAllRomdata(ctx sdk.Context) (list []types.Romdata)

GetAllRomdata returns all romdata

func (Keeper) GetContractVersion

func (k Keeper) GetContractVersion(program types.Program, version string) uint64

func (Keeper) GetContracts

func (k Keeper) GetContracts(ctx sdk.Context, id uint64) (val types.Contracts, found bool)

GetContracts returns a contracts from its id

func (Keeper) GetContractsCount

func (k Keeper) GetContractsCount(ctx sdk.Context) uint64

GetContractsCount get the total number of contracts

func (Keeper) GetCronjobs

func (k Keeper) GetCronjobs(
	ctx sdk.Context,
	contract string,
) (val types.Cronjobs, found bool)

GetCronjobs returns a cronjobs from its index

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetProgram

func (k Keeper) GetProgram(
	ctx sdk.Context,
	name string,
) (val types.Program, found bool)

GetProgram returns a program from its index

func (Keeper) GetRomdata

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

GetRomdata returns a romdata from its index

func (Keeper) InitContract

func (k Keeper) InitContract(ctx sdk.Context, name string, sourceCode string, creator sdk.AccAddress, args []goja.Value) (string, error)

func (Keeper) InitFloats

func (k Keeper) InitFloats(ctx sdk.Context, vm *goja.Runtime, std *goja.Object)

func (Keeper) Injectors

func (k Keeper) Injectors() []types.Injector

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) Query

func (Keeper) QueryContract

func (k Keeper) QueryContract(ctx sdk.Context, name string, sourceCode string, entry string, args []goja.Value) (string, error)

func (Keeper) RemoveContracts

func (k Keeper) RemoveContracts(ctx sdk.Context, id uint64)

RemoveContracts removes a contracts from the store

func (Keeper) RemoveCronjobs

func (k Keeper) RemoveCronjobs(
	ctx sdk.Context,
	contract string,
)

RemoveCronjobs removes a cronjobs from the store

func (Keeper) RemoveProgram

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

RemoveProgram removes a program from the store

func (Keeper) RemoveRomdata

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

RemoveRomdata removes a romdata from the store

func (Keeper) SetContracts

func (k Keeper) SetContracts(ctx sdk.Context, contracts types.Contracts)

SetContracts set a specific contracts in the store

func (Keeper) SetContractsCount

func (k Keeper) SetContractsCount(ctx sdk.Context, count uint64)

SetContractsCount set the total number of contracts

func (Keeper) SetCronjobs

func (k Keeper) SetCronjobs(ctx sdk.Context, cronjobs types.Cronjobs)

SetCronjobs set a specific cronjobs in the store from its index

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetProgram

func (k Keeper) SetProgram(ctx sdk.Context, program types.Program)

SetProgram set a specific program in the store from its index

func (Keeper) SetRomdata

func (k Keeper) SetRomdata(ctx sdk.Context, romdata types.Romdata)

SetRomdata set a specific romdata in the store from its index

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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