keeper

package
v0.0.0-...-b8f0a8d Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMarketItemIDBytes

func GetMarketItemIDBytes(id uint64) []byte

GetMarketItemIDBytes returns the byte representation of the ID

func GetMarketItemIDFromBytes

func GetMarketItemIDFromBytes(bz []byte) uint64

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

	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	storeKeeper types.StoreKeeper,
) *Keeper

func (Keeper) AppendMarketItem

func (k Keeper) AppendMarketItem(
	ctx sdk.Context,
	marketItem types.MarketItem,
) uint64

AppendMarketItem appends a marketItem in the store with a new id and update the count

func (Keeper) GetAllMarketItem

func (k Keeper) GetAllMarketItem(ctx sdk.Context) (list []types.MarketItem)

GetAllMarketItem returns all marketItem

func (Keeper) GetMarketItem

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

GetMarketItem returns a marketItem from its id

func (Keeper) GetMarketItemCount

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

GetMarketItemCount get the total number of marketItem

func (Keeper) Logger

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

func (Keeper) RemoveMarketItem

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

RemoveMarketItem removes a marketItem from the store

func (Keeper) SetMarketItem

func (k Keeper) SetMarketItem(ctx sdk.Context, marketItem types.MarketItem)

SetMarketItem set a specific marketItem in the store

func (Keeper) SetMarketItemCount

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

SetMarketItemCount set the total number of marketItem

Jump to

Keyboard shortcuts

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