Documentation ¶
Index ¶
- Constants
- Variables
- func CustomIBCHandler(ibcKeeper *ibc.Keeper, mpKeeper *Keeper) sdk.Handler
- func CustomNFTHandler(nftKeeper *nft.Keeper, mpKeeper *Keeper) sdk.Handler
- func GetBalances(ctx sdk.Context, mpKeeper *Keeper, addrs ...sdk.AccAddress) []*balance
- func GetCommission(price sdk.Coins, rat64 float64) sdk.Coins
- func HandleMsgBurnNFTMarketplace(ctx sdk.Context, msg nft.MsgBurnNFT, nftKeeper *nft.Keeper, mpKeeper *Keeper) sdk.Result
- func HandleMsgMintNFTMarketplace(ctx sdk.Context, msg nft.MsgMintNFT, nftKeeper *nft.Keeper, mpKeeper *Keeper) sdk.Result
- func HandleMsgRecvPacket(ctx sdk.Context, mpKeeper *Keeper, k *ibc.Keeper, msg transfer.MsgRecvPacket) (res sdk.Result)
- func HandleMsgTransferNFTByIBC(ctx sdk.Context, k *Keeper, msg MsgTransferNFTByIBC) sdk.Result
- func HandleMsgTransferNFTMarketplace(ctx sdk.Context, msg nft.MsgTransferNFT, nftKeeper *nft.Keeper, ...) sdk.Result
- func InitGenesis(ctx sdk.Context, keeper *Keeper, data GenesisState) []abci.ValidatorUpdate
- func NewHandler(keeper *Keeper) sdk.Handler
- func NewQuerier(keeper *Keeper, nftKeeper *nft.Keeper) sdk.Querier
- func RollbackCommissions(ctx sdk.Context, mpKeeper *Keeper, logger log.Logger, ...)
- func ValidateGenesis(data GenesisState) error
- type AccountResponse
- type AppModule
- func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
- func (am AppModule) EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (am AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (am AppModule) Route() string
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type AuctionLotRecord
- type BaseReq
- type FinishAuctionReq
- type FungibleToken
- type GenesisState
- type IBCModuleMarketplace
- type Keeper
- func (k *Keeper) BurnFungibleTokens(ctx sdk.Context, currencyOwner sdk.AccAddress, denom string, amount int64) error
- func (k *Keeper) BurnNFT(ctx sdk.Context, id string) error
- func (k *Keeper) BuyLotOnAuction(ctx sdk.Context, buyer, buyerBeneficiary sdk.AccAddress, price sdk.Coins, ...) error
- func (k *Keeper) CheckFinishedAuctions(ctx sdk.Context)
- func (k *Keeper) CreateFungibleToken(ctx sdk.Context, creator sdk.AccAddress, denom string, amount int64) error
- func (k *Keeper) GetAuctionLot(ctx sdk.Context, id string) (*types.AuctionLot, error)
- func (k *Keeper) GetAuctionLotsIterator(ctx sdk.Context) sdk.Iterator
- func (k *Keeper) GetFungibleToken(ctx sdk.Context, name string) (*FungibleToken, error)
- func (k *Keeper) GetFungibleTokensIterator(ctx sdk.Context) sdk.Iterator
- func (k *Keeper) GetNFT(ctx sdk.Context, id string) (*NFT, error)
- func (k *Keeper) GetNFTsIterator(ctx sdk.Context) sdk.Iterator
- func (k *Keeper) GetRegisteredCurrenciesIterator(ctx sdk.Context) sdk.Iterator
- func (k *Keeper) IsDenomExist(ctx sdk.Context, coins sdk.Coins) bool
- func (k *Keeper) MintNFT(ctx sdk.Context, nft *NFT) error
- func (k *Keeper) PutNFTOnAuction(ctx sdk.Context, id string, owner, beneficiary sdk.AccAddress, ...) error
- func (k *Keeper) PutNFTOnMarket(ctx sdk.Context, id string, owner, beneficiary sdk.AccAddress, price sdk.Coins) error
- func (k *Keeper) ReceiveNFTByIBCTransferTx(ctx sdk.Context, data types.NFTPacketData, packet exported.PacketI) error
- func (k *Keeper) RegisterBasicDenoms(ctx sdk.Context)
- func (k *Keeper) RemoveNFTFromAuction(ctx sdk.Context, id string, owner sdk.AccAddress) error
- func (k *Keeper) RemoveNFTFromMarket(ctx sdk.Context, id string, owner sdk.AccAddress) error
- func (k *Keeper) SendFinish(id string, acc exported.Account) error
- func (k *Keeper) SendNFTByIBCTransferTx(ctx sdk.Context, id, denom, tokenURI, sourcePort, sourceChannel string, ...) error
- func (k *Keeper) TransferFungibleTokens(ctx sdk.Context, currencyOwner, recipient sdk.AccAddress, denom string, ...) error
- func (k *Keeper) TransferNFT(ctx sdk.Context, id string, sender, recipient sdk.AccAddress) error
- func (k *Keeper) UpdateAuctionLot(ctx sdk.Context, lot *types.AuctionLot) error
- func (k *Keeper) UpdateNFT(ctx sdk.Context, newToken *NFT) error
- type MsgAcceptOffer
- type MsgBatchBuyOnMarket
- type MsgBatchPutOnMarket
- type MsgBatchRemoveFromMarket
- type MsgBatchTransfer
- type MsgBurnFungibleToken
- type MsgBuyNFT
- type MsgBuyoutOnAuction
- type MsgCreateFungibleToken
- type MsgFinishAuction
- type MsgMakeBidOnAuction
- type MsgMakeOffer
- type MsgPutNFTOnAuction
- type MsgPutNFTOnMarket
- type MsgRemoveNFTFromAuction
- type MsgRemoveNFTFromMarket
- type MsgRemoveOffer
- type MsgTransferFungibleTokens
- type MsgTransferNFTByIBC
- type MsgUpdateNFTParams
- type NFT
- type NFTInfo
- type NFTModuleMarketplace
Constants ¶
const ( ModuleName = types.ModuleName RouterKey = types.RouterKey StoreKey = types.StoreKey RegisterCurrencyKey = types.RegisterCurrency AuctionKey = types.AuctionKey DeletedNFTKey = types.DeletedNFTKey FungibleTokenCreationPrice = types.FungibleTokenCreationPrice FungibleCommissionAddress = types.FungibleCommissionAddress MaxBeneficiaryCommission = types.FlagMaxCommission )
const ( QueryNFT = "nft" QueryNFTs = "nfts" QueryFungibleToken = "fungible_token" QueryFungibleTokens = "fungible_tokens" QueryAuctionLot = "auction_lot" QueryAuctionLots = "auction_lots" )
query endpoints supported by the marketplace Querier
Variables ¶
var ( NewNFT = types.NewNFT ModuleCdc = types.ModuleCdc RegisterCodec = types.RegisterCodec EventKeyOfferID = types.AttributeKeyOfferID )
Functions ¶
func CustomNFTHandler ¶
CustomNFTHandler routes the messages to the handlers
func GetBalances ¶
func GetBalances(ctx sdk.Context, mpKeeper *Keeper, addrs ...sdk.AccAddress) []*balance
func HandleMsgMintNFTMarketplace ¶
func HandleMsgMintNFTMarketplace(ctx sdk.Context, msg nft.MsgMintNFT, nftKeeper *nft.Keeper, mpKeeper *Keeper) sdk.Result
HandleMsgMintNFTMarketplace handles MsgMintNFT
func HandleMsgRecvPacket ¶
func HandleMsgTransferNFTMarketplace ¶
func HandleMsgTransferNFTMarketplace(ctx sdk.Context, msg nft.MsgTransferNFT, nftKeeper *nft.Keeper, mpKeeper *Keeper) sdk.Result
HandleMsgMintNFTMarketplace handles MsgMintNFT
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, keeper *Keeper, data GenesisState) []abci.ValidatorUpdate
func NewHandler ¶
NewHandler returns a handler for "marketplace" type messages.
func NewQuerier ¶
NewQuerier is the module level router for state queries
func RollbackCommissions ¶
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
Types ¶
type AccountResponse ¶
type AppModule ¶
type AppModule struct { module.AppModuleSimulation AppModuleBasic // contains filtered or unexported fields }
func NewAppModule ¶
NewAppModule creates a new AppModule Object
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate
func (AppModule) ExportGenesis ¶
func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
func (AppModule) NewHandler ¶
func (AppModule) NewQuerierHandler ¶
func (AppModule) QuerierRoute ¶
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
type AppModuleBasic ¶
type AppModuleBasic struct{}
app module Basics object
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
Get the root query command of this module
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
Get the root tx command of this module
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
Register rest routes
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
Validation check of the Genesis
type AuctionLotRecord ¶
type BaseReq ¶
type BaseReq struct { From string `json:"from,omitempty"` Memo string `json:"memo,omitempty"` ChainID string `json:"chain_id,omitempty"` AccountNumber uint64 `json:"account_number,string,omitempty"` Sequence uint64 `json:"sequence,string,omitempty"` Fees sdk.Coins `json:"fees,omitempty"` GasPrices sdk.DecCoins `json:"gas_prices,omitempty"` Gas string `json:"gas,omitempty"` GasAdjustment string `json:"gas_adjustment,omitempty"` Simulate bool `json:"simulate,omitempty"` }
type FinishAuctionReq ¶
type FungibleToken ¶
type FungibleToken = types.FungibleToken
type GenesisState ¶
type GenesisState struct { NFTRecords []*NFT `json:"nft_records"` RegisteredCurrencies []FungibleToken `json:"registered_tokens"` }
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k *Keeper) GenesisState
func NewGenesisState ¶
func NewGenesisState(nftRecords []*NFT) GenesisState
type IBCModuleMarketplace ¶
func NewIBCModuleMarketplace ¶
func (IBCModuleMarketplace) NewHandler ¶
func (m IBCModuleMarketplace) NewHandler() sdk.Handler
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine
func NewKeeper ¶
func NewKeeper( coinKeeper bank.Keeper, stakingKeeper staking.Keeper, distrKeeper distribution.Keeper, storeKey sdk.StoreKey, deletedStoreKey *sdk.KVStoreKey, currencyRegistryStoreKey *sdk.KVStoreKey, auctionStoreKey *sdk.KVStoreKey, cdc *codec.Codec, cfg *config.MPServerConfig, msgMetr *common.MsgMetrics, nftKeeper *nft.Keeper, supplyKeeper *supply.Keeper, accKeeper *auth.AccountKeeper, ibcKeeper *ibc.Keeper, ) *Keeper
NewKeeper creates new instances of the marketplace Keeper
func (*Keeper) BurnFungibleTokens ¶
func (*Keeper) BuyLotOnAuction ¶
func (k *Keeper) BuyLotOnAuction(ctx sdk.Context, buyer, buyerBeneficiary sdk.AccAddress, price sdk.Coins, lot *types.AuctionLot, buyerCommission string) error
buyout the lot
func (*Keeper) CheckFinishedAuctions ¶
func (*Keeper) CreateFungibleToken ¶
func (k *Keeper) CreateFungibleToken(ctx sdk.Context, creator sdk.AccAddress, denom string, amount int64) error
Creates a new fungible token with given supply and denom for FungibleTokenCreationPrice
func (*Keeper) GetAuctionLot ¶
func (*Keeper) GetAuctionLotsIterator ¶
func (*Keeper) GetFungibleToken ¶
func (*Keeper) GetFungibleTokensIterator ¶
Get an iterator over all Fungible Tokens
func (*Keeper) GetNFTsIterator ¶
Get an iterator over all NFTs.
func (*Keeper) GetRegisteredCurrenciesIterator ¶
Get an iterator over all registered currencies
func (*Keeper) PutNFTOnAuction ¶
func (*Keeper) PutNFTOnMarket ¶
func (*Keeper) ReceiveNFTByIBCTransferTx ¶
func (*Keeper) RegisterBasicDenoms ¶
Should be run just once
func (*Keeper) RemoveNFTFromAuction ¶
important! must do all necessary checks before evoking this function
func (*Keeper) RemoveNFTFromMarket ¶
func (*Keeper) SendNFTByIBCTransferTx ¶
func (*Keeper) TransferFungibleTokens ¶
func (k *Keeper) TransferFungibleTokens(ctx sdk.Context, currencyOwner, recipient sdk.AccAddress, denom string, amount int64) error
Transfers amount of fungible tokens from one account to another
func (*Keeper) TransferNFT ¶
func (*Keeper) UpdateAuctionLot ¶
type MsgAcceptOffer ¶
type MsgAcceptOffer = types.MsgAcceptOffer
type MsgBatchBuyOnMarket ¶
type MsgBatchBuyOnMarket = types.MsgBatchBuyOnMarket
type MsgBatchPutOnMarket ¶
type MsgBatchPutOnMarket = types.MsgBatchPutOnMarket
type MsgBatchRemoveFromMarket ¶
type MsgBatchRemoveFromMarket = types.MsgBatchRemoveFromMarket
type MsgBatchTransfer ¶
type MsgBatchTransfer = types.MsgBatchTransfer
type MsgBurnFungibleToken ¶
type MsgBurnFungibleToken = types.MsgBurnFungibleTokens
type MsgBuyoutOnAuction ¶
type MsgBuyoutOnAuction = types.MsgBuyoutOnAuction
type MsgCreateFungibleToken ¶
type MsgCreateFungibleToken = types.MsgCreateFungibleToken
type MsgFinishAuction ¶
type MsgFinishAuction = types.MsgFinishAuction
type MsgMakeBidOnAuction ¶
type MsgMakeBidOnAuction = types.MsgMakeBidOnAuction
type MsgMakeOffer ¶
type MsgMakeOffer = types.MsgMakeOffer
type MsgPutNFTOnAuction ¶
type MsgPutNFTOnAuction = types.MsgPutNFTOnAuction
type MsgPutNFTOnMarket ¶
type MsgPutNFTOnMarket = types.MsgPutNFTOnMarket
type MsgRemoveNFTFromAuction ¶
type MsgRemoveNFTFromAuction = types.MsgRemoveNFTFromAuction
type MsgRemoveNFTFromMarket ¶
type MsgRemoveNFTFromMarket = types.MsgRemoveNFTFromMarket
type MsgRemoveOffer ¶
type MsgRemoveOffer = types.MsgRemoveOffer
type MsgTransferFungibleTokens ¶
type MsgTransferFungibleTokens = types.MsgTransferFungibleTokens
type MsgTransferNFTByIBC ¶
type MsgTransferNFTByIBC = types.MsgTransferNFTByIBC
type MsgUpdateNFTParams ¶
type MsgUpdateNFTParams = types.MsgUpdateNFTParams
type NFTModuleMarketplace ¶
NFTModuleMarketplace overrides the NFT module for custom handlers
func NewNFTModuleMarketplace ¶
func NewNFTModuleMarketplace(appModule nft.AppModule, nftKeeper *nft.Keeper, mpKeeper *Keeper) *NFTModuleMarketplace
NewNFTModuleMarketplace generates a new NFT Module
func (NFTModuleMarketplace) NewHandler ¶
func (m NFTModuleMarketplace) NewHandler() sdk.Handler
NewHandler module handler for the NFTModuleMarketplace