keeper

package
v0.0.0-...-0a2cf08 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRequestIDBytes

func GetRequestIDBytes(id uint64) []byte

GetRequestIDBytes returns the byte representation of the ID

func GetRequestIDFromBytes

func GetRequestIDFromBytes(bz []byte) uint64

GetRequestIDFromBytes returns ID in uint64 format from a byte array

func GetValidatorIDBytes

func GetValidatorIDBytes(id uint64) []byte

GetValidatorIDBytes returns the byte representation of the ID

func GetValidatorIDFromBytes

func GetValidatorIDFromBytes(bz []byte) uint64

GetValidatorIDFromBytes returns ID in uint64 format from a byte array

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,

	bankKeeper types.BankKeeper,

) *Keeper

func (Keeper) AppendRequest

func (k Keeper) AppendRequest(
	ctx sdk.Context,
	request types.Request,
) uint64

AppendRequest appends a request in the store with a new id and update the count

func (Keeper) AppendValidator

func (k Keeper) AppendValidator(
	ctx sdk.Context,
	validator types.Validator,
) uint64

AppendValidator appends a validator in the store with a new id and update the count

func (Keeper) GetAllRequest

func (k Keeper) GetAllRequest(ctx sdk.Context) (list []types.Request)

GetAllRequest returns all request

func (Keeper) GetAllValidator

func (k Keeper) GetAllValidator(ctx sdk.Context) (list []types.Validator)

GetAllValidator returns all validator

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetPrice

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

func (Keeper) GetRequest

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

GetRequest returns a request from its id

func (Keeper) GetRequestCount

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

GetRequestCount get the total number of request

func (Keeper) GetValidator

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

GetValidator returns a validator from its id

func (Keeper) GetValidatorCount

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

GetValidatorCount get the total number of validator

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) RemoveRequest

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

RemoveRequest removes a request from the store

func (Keeper) RemoveValidator

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

RemoveValidator removes a validator from the store

func (Keeper) RequestAll

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetRequest

func (k Keeper) SetRequest(ctx sdk.Context, request types.Request)

SetRequest set a specific request in the store

func (Keeper) SetRequestCount

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

SetRequestCount set the total number of request

func (Keeper) SetValidator

func (k Keeper) SetValidator(ctx sdk.Context, validator types.Validator)

SetValidator set a specific validator in the store

func (Keeper) SetValidatorCount

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

SetValidatorCount set the total number of validator

Jump to

Keyboard shortcuts

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