keeper

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCollectionIDBytes

func GetCollectionIDBytes(id uint64) []byte

GetCollectionIDBytes returns the byte representation of the ID

func GetCollectionIDFromBytes

func GetCollectionIDFromBytes(bz []byte) uint64

GetCollectionIDFromBytes returns ID in uint64 format from a byte array

func GetNftIDBytes

func GetNftIDBytes(id uint64) []byte

GetNftIDBytes returns the byte representation of the ID

func GetNftIDFromBytes

func GetNftIDFromBytes(bz []byte) uint64

GetNftIDFromBytes 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,
	ps paramtypes.Subspace,

	bankKeeper types.BankKeeper, nftKeeper types.NftKeeper,
) *Keeper

func (Keeper) AddAdmin

func (k Keeper) AddAdmin(ctx sdk.Context, admin, creator string) error

func (Keeper) AppendCollection

func (k Keeper) AppendCollection(
	ctx sdk.Context,
	collection types.Collection,
) uint64

AppendCollection appends a collection in the store with a new id and update the count

func (Keeper) AppendNft

func (k Keeper) AppendNft(
	ctx sdk.Context,
	nft types.Nft,
) uint64

AppendNft appends a nft in the store with a new id and update the count

func (Keeper) BuyNFT

func (k Keeper) BuyNFT(ctx sdk.Context, nftID uint64, buyer sdk.AccAddress) (types.Nft, error)

func (Keeper) CreateCollection

func (k Keeper) CreateCollection(ctx sdk.Context, sender sdk.AccAddress, id, name, schema, symbol, traits, description, minter, data string, mintRoyalties, resaleRoyalties []types.Royalty, verified bool) (uint64, error)

func (Keeper) DistributeRoyalties

func (k Keeper) DistributeRoyalties(ctx sdk.Context, price sdk.Coin, seller string, royalties []types.Royalty) error

func (Keeper) GetAdmins

func (k Keeper) GetAdmins(ctx sdk.Context) ([]string, error)

func (Keeper) GetAllCollection

func (k Keeper) GetAllCollection(ctx sdk.Context) (list []types.Collection)

GetAllCollection returns all collection

func (Keeper) GetAllNft

func (k Keeper) GetAllNft(ctx sdk.Context) (list []types.Nft)

GetAllNft returns all nft

func (Keeper) GetCollection

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

GetCollection returns a collection from its id

func (Keeper) GetCollectionByDenomID

func (k Keeper) GetCollectionByDenomID(ctx sdk.Context, denomID string) (types.Collection, bool)

func (Keeper) GetCollectionCount

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

GetCollectionCount get the total number of collection

func (Keeper) GetCollectionStatus

func (k Keeper) GetCollectionStatus(ctx sdk.Context, id uint64) (bool, error)

func (Keeper) GetNextUniqueId

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

SetNextUniqueId gets the next unique id for new nft listings

func (Keeper) GetNft

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

GetNft returns a nft from its id

func (Keeper) GetNftCount

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

GetNftCount get the total number of nft

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) IsAdmin

func (k Keeper) IsAdmin(ctx sdk.Context, address string) error

func (Keeper) ListAdmins

func (Keeper) Logger

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

func (Keeper) MintNFT

func (k Keeper) MintNFT(ctx sdk.Context, denomID, name, uri, data string, price sdk.Coin, recipient sdk.AccAddress, sender sdk.AccAddress) (string, error)

func (Keeper) NftAll

func (Keeper) Params

func (Keeper) PublishCollection

func (k Keeper) PublishCollection(ctx sdk.Context, collection types.Collection) (uint64, error)

func (Keeper) PublishNFT

func (k Keeper) PublishNFT(ctx sdk.Context, nft types.Nft) (uint64, error)

func (Keeper) RemoveAdmin

func (k Keeper) RemoveAdmin(ctx sdk.Context, admin, creator string) error

func (Keeper) RemoveCollection

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

RemoveCollection removes a collection from the store

func (Keeper) RemoveNFT

func (k Keeper) RemoveNFT(ctx sdk.Context, nftID uint64, owner sdk.AccAddress) (types.Nft, error)

func (Keeper) RemoveNft

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

RemoveNft removes a nft from the store

func (Keeper) SetCollection

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

SetCollection set a specific collection in the store

func (Keeper) SetCollectionCount

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

SetCollectionCount set the total number of collection

func (Keeper) SetCollectionRoyalties

func (k Keeper) SetCollectionRoyalties(ctx sdk.Context, sender string, id uint64, mintRoyalties, resaleRoyalties []types.Royalty) error

func (Keeper) SetCollectionStatus

func (k Keeper) SetCollectionStatus(ctx sdk.Context, id uint64, verified bool) error

func (Keeper) SetNextUniqueId

func (k Keeper) SetNextUniqueId(ctx sdk.Context, nextUniqueId uint64)

SetNextUniqueId set the next unique id for new nft listings

func (Keeper) SetNft

func (k Keeper) SetNft(ctx sdk.Context, nft types.Nft)

SetNft set a specific nft in the store

func (Keeper) SetNftCount

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

SetNftCount set the total number of nft

func (Keeper) SetNftPrice

func (k Keeper) SetNftPrice(ctx sdk.Context, sender string, id uint64, price sdk.Coin) (types.Nft, error)

func (Keeper) SetParams

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

SetParams set the params

Jump to

Keyboard shortcuts

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