keeper

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CharacterMinPrice = sdk.Coins{sdk.NewInt64Coin(x.SpendDenomination, 1)}

Functions

func AdvancedCheckCost

func AdvancedCheckCost(cost string) error

func AdvancedCheckIsForSale

func AdvancedCheckIsForSale(t int64) bool

func AdvancedCheckValue

func AdvancedCheckValue(goCtx context.Context, ctype string, value []byte, ctypeKeeper TypeserviceChecker) error

func CalcNextSaleTime

func CalcNextSaleTime(timeInMinutes int64) int64

func GetAccount

func GetAccount(addr string) sdk.AccAddress

func GetCoins

func GetCoins(coins string) (sdk.Coins, error)

func GetCreator

func GetCreator(char types.Character) sdk.AccAddress

func GetOwner

func GetOwner(char types.Character) sdk.AccAddress

func HasOwner

func HasOwner(char types.Character) bool

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 sdk.StoreKey,

	bankKeeper types.BankKeeper, typeserviceKeeper types.TypeserviceKeeper,
) *Keeper

func (Keeper) GetAllCharacter

func (k Keeper) GetAllCharacter(ctx sdk.Context) (list []types.Character)

GetAllCharacter returns all character

func (Keeper) GetCharacter

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

GetCharacter returns a character from its index

func (Keeper) Logger

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

func (Keeper) RemoveCharacter

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

RemoveCharacter removes a character from the store

func (Keeper) SetCharacter

func (k Keeper) SetCharacter(ctx sdk.Context, character types.Character)

SetCharacter set a specific character in the store from its index

type TypeserviceChecker

type TypeserviceChecker interface {
	Ctype(c context.Context, req *types.QueryGetCtypeRequest) (*types.QueryGetCtypeResponse, error)
}

Jump to

Keyboard shortcuts

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