keeper

package
v4.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func PaginateArray

func PaginateArray(
	length int,
	pageReq *query.PageRequest,
	onResult func(i int) error,
	defaultLimit int,
	maxLimit int,
) (pageRes *query.PageResponse, err error)

Customized version of query.Paginate to paginate array instead of KVStore

func PaginateStringArray

func PaginateStringArray(
	arr []string,
	pageReq *query.PageRequest,
	onResult func(i int, val string) error,
	defaultLimit int,
	maxLimit int,
) (pageRes *query.PageResponse, err error)

func SortMintPeriod

func SortMintPeriod(mintPeriods []types.MintPeriod, descending bool) []types.MintPeriod

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,

	accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, iscnKeeper types.IscnKeeper, nftKeeper types.NftKeeper, feegrantKeeper ante.FeegrantKeeper,
) *Keeper

func (Keeper) ClassRevealQueueByTimeIterator

func (k Keeper) ClassRevealQueueByTimeIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator

func (Keeper) ClassRevealQueueIterator

func (k Keeper) ClassRevealQueueIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) ComputeRoyaltyAllocation

func (k Keeper) ComputeRoyaltyAllocation(ctx sdk.Context, txnAmount uint64, fullPayToRoyalty bool, config types.RoyaltyConfig) (royaltyAmount uint64, allocations []types.RoyaltyAllocation, err error)

func (Keeper) DeductFeePerByte

func (k Keeper) DeductFeePerByte(ctx sdk.Context, msgSender sdk.AccAddress, bytesLength int, msg sdk.Msg) error

func (Keeper) ExpireListing

func (k Keeper) ExpireListing(ctx sdk.Context, listing types.ListingStoreRecord) error

func (Keeper) ExpireOffer

func (k Keeper) ExpireOffer(ctx sdk.Context, offer types.OfferStoreRecord) error

func (Keeper) FeePerByte

func (k Keeper) FeePerByte(ctx sdk.Context) (res sdk.DecCoin)

func (Keeper) GetAllBlindBoxContent

func (k Keeper) GetAllBlindBoxContent(ctx sdk.Context) (list []types.BlindBoxContent)

GetAllBlindBoxContent returns all BlindBoxContent

func (Keeper) GetAllClassesByAccount

func (k Keeper) GetAllClassesByAccount(ctx sdk.Context) (list []types.ClassesByAccount)

GetAllClassesByAccount returns all classesByAccount

func (Keeper) GetAllClassesByISCN

func (k Keeper) GetAllClassesByISCN(ctx sdk.Context) (list []types.ClassesByISCN)

GetAllClassesByISCN returns all classesByISCN

func (Keeper) GetAllListing

func (k Keeper) GetAllListing(ctx sdk.Context) (list []types.ListingStoreRecord)

GetAllListing returns all listing

func (Keeper) GetAllOffer

func (k Keeper) GetAllOffer(ctx sdk.Context) (list []types.OfferStoreRecord)

GetAllOffer returns all offer

func (Keeper) GetAllRoyaltyConfig

func (k Keeper) GetAllRoyaltyConfig(ctx sdk.Context) (list []types.RoyaltyConfigByClass)

GetAllRoyaltyConfig returns all royaltyConfigByClass

func (Keeper) GetBlindBoxContent

func (k Keeper) GetBlindBoxContent(
	ctx sdk.Context,
	classId string,
	id string,

) (val types.BlindBoxContent, found bool)

GetBlindBoxContent returns a blind box content from its index

func (Keeper) GetBlindBoxContents

func (k Keeper) GetBlindBoxContents(ctx sdk.Context, classId string) (list []types.BlindBoxContent)

GetBlindBoxContents returns all blind box content of a class

func (Keeper) GetClass

func (k Keeper) GetClass(ctx sdk.Context, classId string) (nft.Class, types.ClassData, error)

func (Keeper) GetClassRevealQueue

func (k Keeper) GetClassRevealQueue(ctx sdk.Context) (list []types.ClassRevealQueueEntry)

GetClassRevealQueue returns all classRevealQueueEntry

func (Keeper) GetClassRevealQueueByTime

func (k Keeper) GetClassRevealQueueByTime(ctx sdk.Context, endTime time.Time) (list []types.ClassRevealQueueEntry)

func (Keeper) GetClassesByAccount

func (k Keeper) GetClassesByAccount(
	ctx sdk.Context,
	account sdk.AccAddress,

) (val types.ClassesByAccount, found bool)

GetClassesByAccount returns a classesByAccount from its index

func (Keeper) GetClassesByISCN

func (k Keeper) GetClassesByISCN(
	ctx sdk.Context,
	iscnIdPrefix string,

) (val types.ClassesByISCN, found bool)

GetClassesByISCN returns a classesByISCN from its index

func (Keeper) GetListing

func (k Keeper) GetListing(
	ctx sdk.Context,
	classId string,
	nftId string,
	seller sdk.AccAddress,

) (val types.ListingStoreRecord, found bool)

GetListing returns a listing from its index

func (Keeper) GetListingByKeyBytes

func (k Keeper) GetListingByKeyBytes(
	ctx sdk.Context,
	key []byte,
) (val types.ListingStoreRecord, found bool)

func (Keeper) GetListingExpireQueue

func (k Keeper) GetListingExpireQueue(ctx sdk.Context) (list []types.ListingExpireQueueEntry)

GetListingExpireQueue returns all listingExpireQueueEntry

func (Keeper) GetListingExpireQueueByTime

func (k Keeper) GetListingExpireQueueByTime(ctx sdk.Context, endTime time.Time) (list []types.ListingExpireQueueEntry)

func (Keeper) GetListingExpireQueueEntry

func (k Keeper) GetListingExpireQueueEntry(
	ctx sdk.Context,
	expireTime time.Time,
	listingKey []byte,
) (val types.ListingExpireQueueEntry, found bool)

GetListingExpireQueueEntry returns a listingExpireQueueEntry from its index

func (Keeper) GetListingsByClass

func (k Keeper) GetListingsByClass(
	ctx sdk.Context,
	classId string,
) (list []types.ListingStoreRecord)

func (Keeper) GetListingsByNFT

func (k Keeper) GetListingsByNFT(
	ctx sdk.Context,
	classId string,
	nftId string,
) (list []types.ListingStoreRecord)

func (Keeper) GetOffer

func (k Keeper) GetOffer(
	ctx sdk.Context,
	classId string,
	nftId string,
	buyer sdk.AccAddress,

) (val types.OfferStoreRecord, found bool)

GetOffer returns a offer from its index

func (Keeper) GetOfferByKeyBytes

func (k Keeper) GetOfferByKeyBytes(
	ctx sdk.Context,
	key []byte,
) (val types.OfferStoreRecord, found bool)

func (Keeper) GetOfferExpireQueue

func (k Keeper) GetOfferExpireQueue(ctx sdk.Context) (list []types.OfferExpireQueueEntry)

GetOfferExpireQueue returns all offerExpireQueueEntry

func (Keeper) GetOfferExpireQueueByTime

func (k Keeper) GetOfferExpireQueueByTime(ctx sdk.Context, endTime time.Time) (list []types.OfferExpireQueueEntry)

func (Keeper) GetOfferExpireQueueEntry

func (k Keeper) GetOfferExpireQueueEntry(
	ctx sdk.Context,
	expireTime time.Time,
	offerKey []byte,
) (val types.OfferExpireQueueEntry, found bool)

GetOfferExpireQueueEntry returns a offerExpireQueueEntry from its index

func (Keeper) GetOffersByClass

func (k Keeper) GetOffersByClass(
	ctx sdk.Context,
	classId string,
) (list []types.OfferStoreRecord)

func (Keeper) GetOffersByNFT

func (k Keeper) GetOffersByNFT(
	ctx sdk.Context,
	classId string,
	nftId string,
) (list []types.OfferStoreRecord)

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetRoyaltyConfig

func (k Keeper) GetRoyaltyConfig(
	ctx sdk.Context,
	classId string,

) (config types.RoyaltyConfig, found bool)

GetRoyaltyConfig returns a royaltyConfigByClass from its index

func (Keeper) IterateAllBlindBoxContent

func (k Keeper) IterateAllBlindBoxContent(ctx sdk.Context, callback func(types.BlindBoxContent))

func (Keeper) IterateBlindBoxContents

func (k Keeper) IterateBlindBoxContents(ctx sdk.Context, classId string, callback func(types.BlindBoxContent))

func (Keeper) IterateClassRevealQueue

func (k Keeper) IterateClassRevealQueue(ctx sdk.Context, cb func(val types.ClassRevealQueueEntry) (stop bool))

IterateClassRevealQueue iterates over all classRevealQueueEntry

func (Keeper) IterateClassRevealQueueByTime

func (k Keeper) IterateClassRevealQueueByTime(ctx sdk.Context, endTime time.Time, cb func(val types.ClassRevealQueueEntry) (stop bool))

func (Keeper) IterateListingExpireQueue

func (k Keeper) IterateListingExpireQueue(ctx sdk.Context, cb func(val types.ListingExpireQueueEntry) (stop bool))

func (Keeper) IterateListingExpireQueueByTime

func (k Keeper) IterateListingExpireQueueByTime(ctx sdk.Context, endTime time.Time, cb func(val types.ListingExpireQueueEntry) (stop bool))

func (Keeper) IterateListingsByClass

func (k Keeper) IterateListingsByClass(
	ctx sdk.Context,
	classId string,
	callback func(types.ListingStoreRecord),
)

func (Keeper) IterateListingsByNFT

func (k Keeper) IterateListingsByNFT(
	ctx sdk.Context,
	classId string,
	nftId string,
	callback func(types.ListingStoreRecord),
)

func (Keeper) IterateOfferExpireQueue

func (k Keeper) IterateOfferExpireQueue(ctx sdk.Context, cb func(val types.OfferExpireQueueEntry) (stop bool))

func (Keeper) IterateOfferExpireQueueByTime

func (k Keeper) IterateOfferExpireQueueByTime(ctx sdk.Context, endTime time.Time, cb func(val types.OfferExpireQueueEntry) (stop bool))

func (Keeper) IterateOffersByClass

func (k Keeper) IterateOffersByClass(
	ctx sdk.Context,
	classId string,
	callback func(types.OfferStoreRecord),
)

func (Keeper) IterateOffersByNFT

func (k Keeper) IterateOffersByNFT(
	ctx sdk.Context,
	classId string,
	nftId string,
	callback func(types.OfferStoreRecord),
)

func (Keeper) ListingExpireQueueByTimeIterator

func (k Keeper) ListingExpireQueueByTimeIterator(ctx sdk.Context, expireTime time.Time) sdk.Iterator

func (Keeper) ListingExpireQueueIterator

func (k Keeper) ListingExpireQueueIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) Logger

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

func (Keeper) MaxListingDuration

func (k Keeper) MaxListingDuration(ctx sdk.Context) time.Duration

func (Keeper) MaxListingDurationText

func (k Keeper) MaxListingDurationText(ctx sdk.Context) string

func (Keeper) MaxOfferDuration

func (k Keeper) MaxOfferDuration(ctx sdk.Context) time.Duration

func (Keeper) MaxOfferDurationText

func (k Keeper) MaxOfferDurationText(ctx sdk.Context) string

func (Keeper) MaxRoyaltyBasisPoints

func (k Keeper) MaxRoyaltyBasisPoints(ctx sdk.Context) (res uint64)

func (Keeper) MaxRoyaltyBasisPointsText

func (k Keeper) MaxRoyaltyBasisPointsText(ctx sdk.Context) string

func (Keeper) NewClassParentFromInput

func (k Keeper) NewClassParentFromInput(ctx sdk.Context, input types.ClassParentInput, parentAccBech32 string) (types.ClassParentWithOwner, error)

func (Keeper) Offer

func (Keeper) OfferExpireQueueByTimeIterator

func (k Keeper) OfferExpireQueueByTimeIterator(ctx sdk.Context, expireTime time.Time) sdk.Iterator

func (Keeper) OfferExpireQueueIterator

func (k Keeper) OfferExpireQueueIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) Params

func (Keeper) PriceDenom

func (k Keeper) PriceDenom(ctx sdk.Context) (res string)

func (Keeper) PruneAllListingsForNFT

func (k Keeper) PruneAllListingsForNFT(ctx sdk.Context, classId string, nftId string)

func (Keeper) PruneInvalidListingsForNFT

func (k Keeper) PruneInvalidListingsForNFT(ctx sdk.Context, classId string, nftId string)

func (Keeper) RemoveBlindBoxContent

func (k Keeper) RemoveBlindBoxContent(
	ctx sdk.Context,
	classId string,
	id string,

)

RemoveBlindBoxContent removes a blind box content from the store

func (Keeper) RemoveBlindBoxContents

func (k Keeper) RemoveBlindBoxContents(
	ctx sdk.Context,
	classId string,
)

RemoveBlindBoxContent removes a blind box content from the store

func (Keeper) RemoveClassRevealQueueEntry

func (k Keeper) RemoveClassRevealQueueEntry(
	ctx sdk.Context,
	revealTime time.Time,
	classId string,

)

RemoveClassRevealQueueEntry removes a classRevealQueueEntry from the store

func (Keeper) RemoveClassesByAccount

func (k Keeper) RemoveClassesByAccount(
	ctx sdk.Context,
	account sdk.AccAddress,
)

RemoveClassesByAccount removes a classesByAccount from the store

func (Keeper) RemoveClassesByISCN

func (k Keeper) RemoveClassesByISCN(
	ctx sdk.Context,
	iscnIdPrefix string,

)

RemoveClassesByISCN removes a classesByISCN from the store

func (Keeper) RemoveListing

func (k Keeper) RemoveListing(
	ctx sdk.Context,
	classId string,
	nftId string,
	seller sdk.AccAddress,

)

RemoveListing removes a listing from the store

func (Keeper) RemoveListingExpireQueueEntry

func (k Keeper) RemoveListingExpireQueueEntry(
	ctx sdk.Context,
	expireTime time.Time,
	listingKey []byte,
)

RemoveListingExpireQueueEntry removes a listingExpireQueueEntry from the store

func (Keeper) RemoveOffer

func (k Keeper) RemoveOffer(
	ctx sdk.Context,
	classId string,
	nftId string,
	buyer sdk.AccAddress,

)

RemoveOffer removes a offer from the store

func (Keeper) RemoveOfferExpireQueueEntry

func (k Keeper) RemoveOfferExpireQueueEntry(
	ctx sdk.Context,
	expireTime time.Time,
	offerKey []byte,
)

RemoveOfferExpireQueueEntry removes a offerExpireQueueEntry from the store

func (Keeper) RemoveRoyaltyConfig

func (k Keeper) RemoveRoyaltyConfig(
	ctx sdk.Context,
	classId string,
)

RemoveRoyaltyConfig removes a royaltyConfigByClass from the store

func (Keeper) RevealBlindBoxContents

func (k Keeper) RevealBlindBoxContents(ctx sdk.Context, classId string) error

func (Keeper) SetBlindBoxContent

func (k Keeper) SetBlindBoxContent(ctx sdk.Context, content types.BlindBoxContent)

SetBlindBoxContent set a specific blind box content in the store from its index

func (Keeper) SetClassRevealQueueEntry

func (k Keeper) SetClassRevealQueueEntry(ctx sdk.Context, classRevealQueueEntry types.ClassRevealQueueEntry)

SetClassRevealQueueEntry set a specific classRevealQueueEntry in the store from its index

func (Keeper) SetClassesByAccount

func (k Keeper) SetClassesByAccount(ctx sdk.Context, classesByAccount types.ClassesByAccount)

SetClassesByAccount set a specific classesByAccount in the store from its index

func (Keeper) SetClassesByISCN

func (k Keeper) SetClassesByISCN(ctx sdk.Context, classesByISCN types.ClassesByISCN)

SetClassesByISCN set a specific classesByISCN in the store from its index

func (Keeper) SetListing

func (k Keeper) SetListing(ctx sdk.Context, listing types.ListingStoreRecord)

SetListing set a specific listing in the store from its index

func (Keeper) SetListingExpireQueueEntry

func (k Keeper) SetListingExpireQueueEntry(ctx sdk.Context, listingExpireQueueEntry types.ListingExpireQueueEntry)

SetListingExpireQueueEntry set a specific listingExpireQueueEntry in the store from its index

func (Keeper) SetOffer

func (k Keeper) SetOffer(ctx sdk.Context, offer types.OfferStoreRecord)

SetOffer set a specific offer in the store from its index

func (Keeper) SetOfferExpireQueueEntry

func (k Keeper) SetOfferExpireQueueEntry(ctx sdk.Context, offerExpireQueueEntry types.OfferExpireQueueEntry)

SetOfferExpireQueueEntry set a specific offerExpireQueueEntry in the store from its index

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetRoyaltyConfig

func (k Keeper) SetRoyaltyConfig(ctx sdk.Context, royaltyConfigByClass types.RoyaltyConfigByClass)

SetRoyaltyConfig set a specific royaltyConfigByClass in the store from its index

func (Keeper) UpdateClassRevealQueueEntry

func (k Keeper) UpdateClassRevealQueueEntry(ctx sdk.Context, originalRevealTime time.Time, classId string, updatedRevealTime time.Time)

UpdateClassRevealQueueEntry updates a classRevealQueueEntry in the store

func (Keeper) UpdateListingExpireQueueEntry

func (k Keeper) UpdateListingExpireQueueEntry(ctx sdk.Context, originalExpireTime time.Time, listingKey []byte, updatedExpireTime time.Time)

func (Keeper) UpdateOfferExpireQueueEntry

func (k Keeper) UpdateOfferExpireQueueEntry(ctx sdk.Context, originalExpireTime time.Time, offerKey []byte, updatedExpireTime time.Time)

func (Keeper) ValidateAndRefreshClassParent

func (k Keeper) ValidateAndRefreshClassParent(ctx sdk.Context, classId string, parent types.ClassParent) (types.ClassParentWithOwner, error)

Jump to

Keyboard shortcuts

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