Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AddListing(ctx sdk.Context, listing types.Listing) error
- func (k Keeper) Auction(goCtx context.Context, req *types.QueryAuctionRequest) (*types.QueryAuctionResponse, error)
- func (k Keeper) AuctionByNftId(goCtx context.Context, req *types.QueryAuctionByNFTIDRequest) (*types.QueryAuctionResponse, error)
- func (k Keeper) Auctions(goCtx context.Context, req *types.QueryAuctionsRequest) (*types.QueryAuctionsResponse, error)
- func (k Keeper) AuctionsByOwner(goCtx context.Context, req *types.QueryAuctionsByOwnerRequest) (*types.QueryAuctionsResponse, error)
- func (k Keeper) AuctionsByPriceDenom(goCtx context.Context, req *types.QueryAuctionsByPriceDenomRequest) (*types.QueryAuctionsResponse, error)
- func (k Keeper) Bid(goCtx context.Context, req *types.QueryBidRequest) (*types.QueryBidResponse, error)
- func (k Keeper) Bids(goCtx context.Context, req *types.QueryBidsRequest) (*types.QueryBidsResponse, error)
- func (k Keeper) Buy(ctx sdk.Context, listing types.Listing, buyer sdk.AccAddress) error
- func (k Keeper) CancelAuctionListing(ctx sdk.Context, auction types.AuctionListing) error
- func (k Keeper) CreateAuctionListing(ctx sdk.Context, auction types.AuctionListing) error
- func (k Keeper) DeleteListing(ctx sdk.Context, listing types.Listing)
- func (k Keeper) DistributeCommission(ctx sdk.Context, marketplaceCoin sdk.Coin) error
- func (k Keeper) GetAllAuctionListings(ctx sdk.Context) (list []types.AuctionListing)
- func (k Keeper) GetAllBids(ctx sdk.Context) (list []types.Bid)
- func (k Keeper) GetAllListings(ctx sdk.Context) (list []types.Listing)
- func (k Keeper) GetAuctionListing(ctx sdk.Context, id uint64) (val types.AuctionListing, found bool)
- func (k Keeper) GetAuctionListingIdByNftId(ctx sdk.Context, nftId string) (val uint64, found bool)
- func (k Keeper) GetAuctionListingsByOwner(ctx sdk.Context, owner sdk.AccAddress) (auctionListings []types.AuctionListing)
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetBid(ctx sdk.Context, id uint64) (val types.Bid, found bool)
- func (k Keeper) GetBidCloseDuration(ctx sdk.Context) (duration time.Duration)
- func (k Keeper) GetBidsByBidder(ctx sdk.Context, bidder sdk.AccAddress) (bids []types.Bid)
- func (k Keeper) GetListing(ctx sdk.Context, id string) (val types.Listing, found bool)
- func (k Keeper) GetListingCount(ctx sdk.Context) uint64
- func (k Keeper) GetListingIdByNftId(ctx sdk.Context, nftId string) (val string, found bool)
- func (k Keeper) GetListingsByOwner(ctx sdk.Context, owner sdk.AccAddress) (listings []types.Listing)
- func (k Keeper) GetMarketplaceAccount(ctx sdk.Context) sdk.ModuleAccountI
- func (k Keeper) GetMarketplaceDistributionParams(ctx sdk.Context) (distParams types.Distribution)
- func (k Keeper) GetMaxAuctionDuration(ctx sdk.Context) (duration time.Duration)
- func (k Keeper) GetNewBidPrice(denom string, amount sdk.Coin, increment sdkmath.LegacyDec) sdk.Coin
- func (k Keeper) GetNextAuctionNumber(ctx sdk.Context) uint64
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetProportions(totalCoin sdk.Coin, ratio sdkmath.LegacyDec) sdk.Coin
- func (k Keeper) GetSaleCommission(ctx sdk.Context) (percent sdkmath.LegacyDec)
- func (k Keeper) HasAuctionListing(ctx sdk.Context, id uint64) bool
- func (k Keeper) HasBid(ctx sdk.Context, id uint64) bool
- func (k Keeper) HasListing(ctx sdk.Context, id string) bool
- func (k Keeper) IterateActiveAuctions(ctx sdk.Context, fn func(index int, item types.AuctionListing) (stop bool))
- func (k Keeper) IterateInactiveAuctions(ctx sdk.Context, fn func(index int, item types.AuctionListing) (stop bool))
- func (k Keeper) Listing(goCtx context.Context, req *types.QueryListingRequest) (*types.QueryListingResponse, error)
- func (k Keeper) ListingByNftId(goCtx context.Context, req *types.QueryListingByNFTIDRequest) (*types.QueryListingResponse, error)
- func (k Keeper) Listings(goCtx context.Context, req *types.QueryListingsRequest) (*types.QueryListingsResponse, error)
- func (k Keeper) ListingsByOwner(goCtx context.Context, req *types.QueryListingsByOwnerRequest) (*types.QueryListingsByOwnerResponse, error)
- func (k Keeper) ListingsByPriceDenom(goCtx context.Context, req *types.QueryListingsByPriceDenomRequest) (*types.QueryListingsByPriceDenomResponse, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PlaceBid(ctx sdk.Context, auction types.AuctionListing, newBid types.Bid) error
- func (k Keeper) RemoveAuctionListing(ctx sdk.Context, id uint64)
- func (k Keeper) RemoveBid(ctx sdk.Context, id uint64)
- func (k Keeper) RemoveListing(ctx sdk.Context, id string)
- func (k Keeper) SetActiveAuction(ctx sdk.Context, auctionId uint64)
- func (k Keeper) SetAuctionListing(ctx sdk.Context, auctionListing types.AuctionListing)
- func (k Keeper) SetAuctionListingWithNFTID(ctx sdk.Context, nftId string, id uint64)
- func (k Keeper) SetAuctionListingWithOwner(ctx sdk.Context, owner sdk.AccAddress, id uint64)
- func (k Keeper) SetAuctionListingWithPriceDenom(ctx sdk.Context, priceDenom string, id uint64)
- func (k Keeper) SetBid(ctx sdk.Context, bid types.Bid)
- func (k Keeper) SetInactiveAuction(ctx sdk.Context, auctionId uint64)
- func (k Keeper) SetListing(ctx sdk.Context, listing types.Listing)
- func (k Keeper) SetListingCount(ctx sdk.Context, count uint64)
- func (k Keeper) SetNextAuctionNumber(ctx sdk.Context, number uint64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error
- func (k Keeper) SetWithNFTID(ctx sdk.Context, nftId, id string)
- func (k Keeper) SetWithOwner(ctx sdk.Context, owner sdk.AccAddress, id string)
- func (k Keeper) SetWithPriceDenom(ctx sdk.Context, priceDenom, id string)
- func (k Keeper) TransferRoyalty(ctx sdk.Context, nftRoyaltyShareCoin sdk.Coin, ...) error
- func (k Keeper) UnsetActiveAuction(ctx sdk.Context, auctionId uint64)
- func (k Keeper) UnsetAuctionListingWithNFTID(ctx sdk.Context, nftId string)
- func (k Keeper) UnsetAuctionListingWithOwner(ctx sdk.Context, owner sdk.AccAddress, id uint64)
- func (k Keeper) UnsetAuctionListingWithPriceDenom(ctx sdk.Context, priceDenom string, id uint64)
- func (k Keeper) UnsetInactiveAuction(ctx sdk.Context, auctionId uint64)
- func (k Keeper) UnsetWithNFTID(ctx sdk.Context, nftId string)
- func (k Keeper) UnsetWithOwner(ctx sdk.Context, owner sdk.AccAddress, id string)
- func (k Keeper) UnsetWithPriceDenom(ctx sdk.Context, priceDenom, id string)
- func (k Keeper) UpdateAuctionStatusesAndProcessBids(ctx sdk.Context) error
- func (k Keeper) ValidateSplitShareAddresses(splitShares []types.WeightedAddress) error
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the token MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, nftKeeper types.NftKeeper, distrKeeper types.DistributionKeeper, authority string, ) Keeper
func (Keeper) AddListing ¶
AddListing adds a listing in the store and set owner to listing and updates the count
func (Keeper) Auction ¶
func (k Keeper) Auction(goCtx context.Context, req *types.QueryAuctionRequest) (*types.QueryAuctionResponse, error)
func (Keeper) AuctionByNftId ¶
func (k Keeper) AuctionByNftId(goCtx context.Context, req *types.QueryAuctionByNFTIDRequest) (*types.QueryAuctionResponse, error)
func (Keeper) Auctions ¶
func (k Keeper) Auctions(goCtx context.Context, req *types.QueryAuctionsRequest) (*types.QueryAuctionsResponse, error)
func (Keeper) AuctionsByOwner ¶
func (k Keeper) AuctionsByOwner(goCtx context.Context, req *types.QueryAuctionsByOwnerRequest) (*types.QueryAuctionsResponse, error)
func (Keeper) AuctionsByPriceDenom ¶
func (k Keeper) AuctionsByPriceDenom(goCtx context.Context, req *types.QueryAuctionsByPriceDenomRequest) (*types.QueryAuctionsResponse, error)
func (Keeper) Bid ¶
func (k Keeper) Bid(goCtx context.Context, req *types.QueryBidRequest) (*types.QueryBidResponse, error)
func (Keeper) Bids ¶
func (k Keeper) Bids(goCtx context.Context, req *types.QueryBidsRequest) (*types.QueryBidsResponse, error)
func (Keeper) CancelAuctionListing ¶
func (Keeper) CreateAuctionListing ¶
CreateAuctionListing creates a auction in the store and set owner to auction and updates the next auction number
func (Keeper) DistributeCommission ¶
func (Keeper) GetAllAuctionListings ¶
func (k Keeper) GetAllAuctionListings(ctx sdk.Context) (list []types.AuctionListing)
GetAllAuctionListings returns all auction listings
func (Keeper) GetAllBids ¶
GetAllBids returns all bids
func (Keeper) GetAllListings ¶
GetAllListings returns all listings
func (Keeper) GetAuctionListing ¶
func (k Keeper) GetAuctionListing(ctx sdk.Context, id uint64) (val types.AuctionListing, found bool)
GetAuctionListing returns a auction listing by its id
func (Keeper) GetAuctionListingIdByNftId ¶
GetListing returns a listing from its nft id
func (Keeper) GetAuctionListingsByOwner ¶
func (k Keeper) GetAuctionListingsByOwner(ctx sdk.Context, owner sdk.AccAddress) (auctionListings []types.AuctionListing)
GetAuctionListingsByOwner returns all auction listings of specific owner
func (Keeper) GetAuthority ¶
GetAuthority returns the x/marketplace module's authority.
func (Keeper) GetBidCloseDuration ¶
GetBidCloseDuration returns the closing duration for bid for auctions.
func (Keeper) GetBidsByBidder ¶
GetBidsByBidder returns all bids of specific bidder
func (Keeper) GetListing ¶
GetListing returns a listing from its id
func (Keeper) GetListingCount ¶
GetListingCount get the total number of listings
func (Keeper) GetListingIdByNftId ¶
GetListing returns a listing from its nft id
func (Keeper) GetListingsByOwner ¶
func (k Keeper) GetListingsByOwner(ctx sdk.Context, owner sdk.AccAddress) (listings []types.Listing)
GetListingsByOwner returns all listings of specific owner
func (Keeper) GetMarketplaceAccount ¶
func (k Keeper) GetMarketplaceAccount(ctx sdk.Context) sdk.ModuleAccountI
GetMarketplaceAccount returns marketplace ModuleAccount
func (Keeper) GetMarketplaceDistributionParams ¶
func (k Keeper) GetMarketplaceDistributionParams(ctx sdk.Context) (distParams types.Distribution)
GetMarketplaceDistributionParams returns the current distribution of marketplace commission.
func (Keeper) GetMaxAuctionDuration ¶
GetMaxAuctionDuration returns the maximum duration for auctions.
func (Keeper) GetNewBidPrice ¶
func (Keeper) GetNextAuctionNumber ¶
GetNextAuctionNumber get the next auction number
func (Keeper) GetProportions ¶
func (Keeper) GetSaleCommission ¶
GetSaleCommission returns the current sale commission of marketplace.
func (Keeper) HasAuctionListing ¶
func (Keeper) IterateActiveAuctions ¶
func (Keeper) IterateInactiveAuctions ¶
func (Keeper) Listing ¶
func (k Keeper) Listing(goCtx context.Context, req *types.QueryListingRequest) (*types.QueryListingResponse, error)
func (Keeper) ListingByNftId ¶
func (k Keeper) ListingByNftId( goCtx context.Context, req *types.QueryListingByNFTIDRequest, ) (*types.QueryListingResponse, error)
func (Keeper) Listings ¶
func (k Keeper) Listings(goCtx context.Context, req *types.QueryListingsRequest) (*types.QueryListingsResponse, error)
func (Keeper) ListingsByOwner ¶
func (k Keeper) ListingsByOwner(goCtx context.Context, req *types.QueryListingsByOwnerRequest) (*types.QueryListingsByOwnerResponse, error)
func (Keeper) ListingsByPriceDenom ¶
func (k Keeper) ListingsByPriceDenom( goCtx context.Context, req *types.QueryListingsByPriceDenomRequest, ) (*types.QueryListingsByPriceDenomResponse, error)
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params queries params of marketplace module
func (Keeper) RemoveAuctionListing ¶
RemoveAuctionListing removes a auction listing from the store
func (Keeper) RemoveListing ¶
RemoveListing removes a listing from the store
func (Keeper) SetActiveAuction ¶
func (Keeper) SetAuctionListing ¶
func (k Keeper) SetAuctionListing(ctx sdk.Context, auctionListing types.AuctionListing)
SetAuctionListing set a specific auction listing in the store
func (Keeper) SetAuctionListingWithNFTID ¶
func (Keeper) SetAuctionListingWithOwner ¶
func (Keeper) SetAuctionListingWithPriceDenom ¶
func (Keeper) SetInactiveAuction ¶
func (Keeper) SetListing ¶
SetListing set a specific listing in the store
func (Keeper) SetListingCount ¶
SetListingCount set the total number of listings
func (Keeper) SetNextAuctionNumber ¶
SetNextAuctionNumber set the next auction number
func (Keeper) SetWithOwner ¶
func (Keeper) SetWithPriceDenom ¶
func (Keeper) TransferRoyalty ¶
func (k Keeper) TransferRoyalty( ctx sdk.Context, nftRoyaltyShareCoin sdk.Coin, royaltyReceivers []*onfttypes.WeightedAddress, creator sdk.AccAddress, ) error
func (Keeper) UnsetActiveAuction ¶
func (Keeper) UnsetAuctionListingWithNFTID ¶
func (Keeper) UnsetAuctionListingWithOwner ¶
func (Keeper) UnsetAuctionListingWithPriceDenom ¶
func (Keeper) UnsetInactiveAuction ¶
func (Keeper) UnsetWithOwner ¶
func (Keeper) UnsetWithPriceDenom ¶
func (Keeper) UpdateAuctionStatusesAndProcessBids ¶
UpdateAuctionStatusesAndProcessBids update all auction listings status
func (Keeper) ValidateSplitShareAddresses ¶
func (k Keeper) ValidateSplitShareAddresses(splitShares []types.WeightedAddress) error
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place state migrations.
func (Migrator) Migrate2to3 ¶
Migrate2to3 migrates the x/marketplace module state from the consensus version 2 to version 3. Specifically, it takes the parameters that are currently stored and managed by the x/params modules and stores them directly into the x/marketplace module state.