keeper

package
v0.0.0-...-ab1d363 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

NewQuerier creates a new querier for affondra clients.

Types

type Keeper

type Keeper struct {
	CoinKeeper bank.Keeper

	// paramspace types.ParamSubspace
	// add NFTKeeper
	NFTKeeper nft.Keeper
	// contains filtered or unexported fields
}

Keeper of the affondra store

func NewKeeper

func NewKeeper(coinKeeper bank.Keeper, nftKeeper nft.Keeper, cdc *codec.Codec, key sdk.StoreKey) Keeper

NewKeeper creates a affondra keeper

func (Keeper) BuyItem

func (k Keeper) BuyItem(ctx sdk.Context, key string, receiver sdk.AccAddress) (err error)

BuyItem create transactions

func (Keeper) CreateItem

func (k Keeper) CreateItem(ctx sdk.Context, item types.Item) (err error)

CreateItem creates a item

func (Keeper) DeleteItem

func (k Keeper) DeleteItem(ctx sdk.Context, key string)

DeleteItem deletes a item

func (Keeper) GetCollection

func (k Keeper) GetCollection(ctx sdk.Context, denom string) (collection types.Collection, found bool)

GetCollection returns a collection of Items

func (Keeper) GetItem

func (k Keeper) GetItem(ctx sdk.Context, key string) (types.Item, error)

GetItem returns the item information

func (Keeper) GetItemOwner

func (k Keeper) GetItemOwner(ctx sdk.Context, key string) sdk.AccAddress

GetItemOwner returns creator of the item

func (Keeper) GetOwner

func (k Keeper) GetOwner(ctx sdk.Context, addr sdk.AccAddress) (owner types.Owner, found bool)

GetOwner uses address as a key and return s owner struct

func (Keeper) ItemExists

func (k Keeper) ItemExists(ctx sdk.Context, key string) bool

ItemExists check if the key exists in the store

func (Keeper) IterateItems

func (k Keeper) IterateItems(ctx sdk.Context, handler func(item types.Item) (stop bool))

IterateItems iterates over collections and performs a function

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) SetCollection

func (k Keeper) SetCollection(ctx sdk.Context, denom string, collection types.Collection)

SetCollection sets the entire collection of a single denom

func (Keeper) SetItem

func (k Keeper) SetItem(ctx sdk.Context, item types.Item)

SetItem sets a item

func (Keeper) SetOwner

func (k Keeper) SetOwner(ctx sdk.Context, addr sdk.AccAddress, owner types.Owner)

SetOwner uses address as a key and update items

Jump to

Keyboard shortcuts

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