Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCodec(cdc *codec.Codec)
- type AuctionBid
- type AuctionLot
- type FungibleToken
- type MsgAcceptOffer
- type MsgBatchBuyOnMarket
- type MsgBatchPutOnMarket
- type MsgBatchRemoveFromMarket
- type MsgBatchTransfer
- type MsgBurnFungibleTokens
- 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
- func (m *NFT) AddOffer(offer *Offer)
- func (m *NFT) GetOffer(id string) (*Offer, bool)
- func (m *NFT) GetPrice() sdk.Coins
- func (m *NFT) GetTimeCreated() time.Time
- func (m *NFT) IsActive() bool
- func (m *NFT) IsOnAuction() bool
- func (m *NFT) IsOnMarket() bool
- func (m *NFT) IsOnSale() bool
- func (m *NFT) RemoveOffer(offerID string, buyer sdk.AccAddress) bool
- func (m *NFT) SetPrice(price sdk.Coins)
- func (m *NFT) SetSellerBeneficiary(addr sdk.AccAddress)
- func (m *NFT) SetStatus(status NFTStatus)
- func (m NFT) String() string
- type NFTInfo
- type NFTMetaData
- type NFTPacketData
- type NFTParam
- type NFTParams
- type NFTStatus
- type Offer
- type QueryResAuctionLots
- type QueryResFungibleTokens
- type QueryResNFTs
Constants ¶
const ( // module name ModuleName = "marketplace" // StoreKey to be used when creating the KVStore StoreKey = ModuleName RegisterCurrency = "register_currency" AuctionKey = "auction" DeletedNFTKey = "deleted_nft" FungibleTokenCreationPrice = 10 // TODO: price or commission FungibleCommissionAddress = "" // TODO: create account for commissions RouterKey = ModuleName FlagMaxCommission = "max-commission" FlagBeneficiaryCommission = "beneficiary-commission" FlagBeneficiaryCommissionShort = "c" FlagParamTokenName = "name" FlagParamTokenNameShort = "n" FlagParamDescription = "description" FlagParamDescriptionShort = "d" FlagParamImage = "image" FlagParamImageShort = "i" FlagParamTokenURI = "token_uri" FlagParamTokenURIShort = "u" FlagParamPrice = "price" FlagParamPriceShort = "p" FlagParamBuyoutPrice = "buyout" FlagParamBuyoutPriceShort = "u" DefaultMaximumBeneficiaryCommission = 0.05 DefaultBeneficiariesCommission = 0.015 DefaultValidatorsCommission = 0.01 DefaultTokenDenom = "token" MaxTokenIDLength = 36 MaxNameLength = 50 MaxDescriptionLength = 32000 MaxImageLength = 32000 MaxTokenURILength = 32000 MaxDenomLength = 16 MinDenomLength = 3 IBCNFTPort = "transfernft" DefaultFinishAuctionHost = "localhost" DefaultFinishAuctionPort = 1317 DefaultChainName = "mpchain" DefaultFinishingAccountName = "dgaming" DefaultFinishingAccountPass = "12345678" DefaultFinishingAccountAddr = "cosmos1tctr64k4en25uvet2k2tfkwkh0geyrv8fvuvet" )
Variables ¶
var ( AttributeValueCategory = ModuleName AttributeKeyAmount = "amount" AttributeKeyBid = "bid" AttributeKeyBidder = "bidder" AttributeKeyBuyer = "buyer" AttributeKeyBuyoutPrice = "buyout_price" AttributeKeyBeneficiary = "beneficiary" AttributeKeyCommission = "commission" AttributeKeyDenom = "denom" AttributeKeyFinishTime = "finish_time" AttributeKeyNFTID = "nft_id" AttributeKeyOwner = "owner" AttributeKeyOpeningPrice = "opening_price" AttributeKeyPrice = "price" AttributeKeyRecipient = "recipient" AttributeKeySender = "sender" AttributeKeyNFTTokenURI = "token_uri" AttributeKeyOfferID = "offer_id" AttributeKeyIsBuyout = "is_buyout" )
var ModuleCdc = codec.New()
Functions ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on the Amino codec
Types ¶
type AuctionBid ¶
type AuctionBid struct { Bidder sdk.AccAddress `json:"bidder"` // account address that made the bid BuyerBeneficiary sdk.AccAddress `json:"buyer_beneficiary"` // account address that will be the beneficiary of the purchase BeneficiaryCommission string `json:"beneficiary_commission"` Bid sdk.Coins `json:"bid"` TimeCreated time.Time `json:"time_created"` }
func NewAuctionBid ¶
func NewAuctionBid(bidder, beneficiary sdk.AccAddress, price sdk.Coins, commission string) *AuctionBid
type AuctionLot ¶
type AuctionLot struct { NFTID string `json:"nft_id"` LastBid *AuctionBid `json:"last_bid"` OpeningPrice sdk.Coins `json:"opening_price"` BuyoutPrice sdk.Coins `json:"buyout_price"` ExpirationTime time.Time `json:"expiration_time"` }
func NewAuctionLot ¶
func (*AuctionLot) SetLastBid ¶
func (lot *AuctionLot) SetLastBid(bid *AuctionBid)
func (AuctionLot) String ¶
func (lot AuctionLot) String() string
type FungibleToken ¶
type FungibleToken struct { Denom string `json:"denom"` EmissionAmount int64 `json:"emission_amount"` Creator sdk.AccAddress `json:"creator"` }
func (FungibleToken) String ¶
func (c FungibleToken) String() string
type MsgAcceptOffer ¶
type MsgAcceptOffer struct { Seller sdk.AccAddress `json:"seller"` SellerBeneficiary sdk.AccAddress `json:"seller_beneficiary"` BeneficiaryCommission string `json:"beneficiary_commission,omitempty"` TokenID string `json:"token_id"` OfferID string `json:"offer_id"` }
func NewMsgAcceptOffer ¶
func NewMsgAcceptOffer(seller, sellerBeneficiary sdk.AccAddress, tokenID, offerID string, commission string) *MsgAcceptOffer
func (MsgAcceptOffer) GetSignBytes ¶
func (m MsgAcceptOffer) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgAcceptOffer) GetSigners ¶
func (m MsgAcceptOffer) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgAcceptOffer) Route ¶
func (m MsgAcceptOffer) Route() string
Route should return the name of the module
func (MsgAcceptOffer) ValidateBasic ¶
func (m MsgAcceptOffer) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgBatchBuyOnMarket ¶
type MsgBatchBuyOnMarket struct { Buyer sdk.AccAddress `json:"owner"` Beneficiary sdk.AccAddress `json:"beneficiary"` BeneficiaryCommission string `json:"beneficiary_commission,omitempty"` TokenIDs []string `json:"token_ids"` }
func NewMsgBatchBuyOnMarket ¶
func NewMsgBatchBuyOnMarket(buyer, beneficiary sdk.AccAddress, commission string, tokenIDs []string) *MsgBatchBuyOnMarket
func (MsgBatchBuyOnMarket) GetSignBytes ¶
func (m MsgBatchBuyOnMarket) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgBatchBuyOnMarket) GetSigners ¶
func (m MsgBatchBuyOnMarket) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgBatchBuyOnMarket) Route ¶
func (m MsgBatchBuyOnMarket) Route() string
Route should return the name of the module
func (MsgBatchBuyOnMarket) Type ¶
func (m MsgBatchBuyOnMarket) Type() string
Type should return the action
func (MsgBatchBuyOnMarket) ValidateBasic ¶
func (m MsgBatchBuyOnMarket) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgBatchPutOnMarket ¶
type MsgBatchPutOnMarket struct { Owner sdk.AccAddress `json:"owner"` Beneficiary sdk.AccAddress `json:"beneficiary"` TokenIDs []string `json:"token_ids"` TokenPrices []sdk.Coins `json:"token_prices"` }
func NewMsgBatchPutOnMarket ¶
func NewMsgBatchPutOnMarket(owner, beneficiary sdk.AccAddress, tokenIDs []string, tokenPrices []sdk.Coins) *MsgBatchPutOnMarket
func (MsgBatchPutOnMarket) GetSignBytes ¶
func (m MsgBatchPutOnMarket) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgBatchPutOnMarket) GetSigners ¶
func (m MsgBatchPutOnMarket) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgBatchPutOnMarket) Route ¶
func (m MsgBatchPutOnMarket) Route() string
Route should return the name of the module
func (MsgBatchPutOnMarket) Type ¶
func (m MsgBatchPutOnMarket) Type() string
Type should return the action
func (MsgBatchPutOnMarket) ValidateBasic ¶
func (m MsgBatchPutOnMarket) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgBatchRemoveFromMarket ¶
type MsgBatchRemoveFromMarket struct { Owner sdk.AccAddress `json:"owner"` TokenIDs []string `json:"token_ids"` }
func NewMsgBatchRemoveFromMarket ¶
func NewMsgBatchRemoveFromMarket(owner sdk.AccAddress, tokenIDs []string) *MsgBatchRemoveFromMarket
func (MsgBatchRemoveFromMarket) GetSignBytes ¶
func (m MsgBatchRemoveFromMarket) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgBatchRemoveFromMarket) GetSigners ¶
func (m MsgBatchRemoveFromMarket) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgBatchRemoveFromMarket) Route ¶
func (m MsgBatchRemoveFromMarket) Route() string
Route should return the name of the module
func (MsgBatchRemoveFromMarket) Type ¶
func (m MsgBatchRemoveFromMarket) Type() string
Type should return the action
func (MsgBatchRemoveFromMarket) ValidateBasic ¶
func (m MsgBatchRemoveFromMarket) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgBatchTransfer ¶
type MsgBatchTransfer struct { Sender sdk.AccAddress `json:"sender"` Recipient sdk.AccAddress `json:"recipient"` TokenIDs []string `json:"token_ids"` }
func NewMsgBatchTransfer ¶
func NewMsgBatchTransfer(sender, recipient sdk.AccAddress, tokenIDs []string) *MsgBatchTransfer
func (MsgBatchTransfer) GetSignBytes ¶
func (m MsgBatchTransfer) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgBatchTransfer) GetSigners ¶
func (m MsgBatchTransfer) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgBatchTransfer) Route ¶
func (m MsgBatchTransfer) Route() string
Route should return the name of the module
func (MsgBatchTransfer) Type ¶
func (m MsgBatchTransfer) Type() string
Type should return the action
func (MsgBatchTransfer) ValidateBasic ¶
func (m MsgBatchTransfer) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgBurnFungibleTokens ¶
type MsgBurnFungibleTokens struct { Owner sdk.AccAddress `json:"owner"` Denom string `json:"denom"` Amount int64 `json:"amount"` }
func NewMsgBurnFungibleTokens ¶
func NewMsgBurnFungibleTokens(owner sdk.AccAddress, denom string, amount int64) *MsgBurnFungibleTokens
func (MsgBurnFungibleTokens) GetSignBytes ¶
func (m MsgBurnFungibleTokens) GetSignBytes() []byte
func (MsgBurnFungibleTokens) GetSigners ¶
func (m MsgBurnFungibleTokens) GetSigners() []sdk.AccAddress
func (MsgBurnFungibleTokens) Route ¶
func (m MsgBurnFungibleTokens) Route() string
func (MsgBurnFungibleTokens) Type ¶
func (m MsgBurnFungibleTokens) Type() string
func (MsgBurnFungibleTokens) ValidateBasic ¶
func (m MsgBurnFungibleTokens) ValidateBasic() sdk.Error
type MsgBuyNFT ¶
type MsgBuyNFT struct { Buyer sdk.AccAddress `json:"buyer"` // Beneficiary is the cosmos user who gets the commission for this transaction. Beneficiary sdk.AccAddress `json:"beneficiary"` BeneficiaryCommission string `json:"beneficiary_commission,omitempty"` TokenID string `json:"token_id"` }
func NewMsgBuyNFT ¶
func NewMsgBuyNFT(owner, beneficiary sdk.AccAddress, tokenID string, commission string) *MsgBuyNFT
func (MsgBuyNFT) GetSignBytes ¶
GetSignBytes encodes the message for signing
func (MsgBuyNFT) GetSigners ¶
func (m MsgBuyNFT) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgBuyNFT) ValidateBasic ¶
ValidateBasic runs stateless checks on the message
type MsgBuyoutOnAuction ¶
type MsgBuyoutOnAuction struct { Buyer sdk.AccAddress `json:"buyer"` BuyerBeneficiary sdk.AccAddress `json:"buyer_beneficiary"` BeneficiaryCommission string `json:"beneficiary_commission,omitempty"` TokenID string `json:"token_id"` }
func NewMsgBuyOutOnAuction ¶
func NewMsgBuyOutOnAuction(bidder, buyerBeneficiary sdk.AccAddress, tokenID string, commission string) *MsgBuyoutOnAuction
func (MsgBuyoutOnAuction) GetSignBytes ¶
func (m MsgBuyoutOnAuction) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgBuyoutOnAuction) GetSigners ¶
func (m MsgBuyoutOnAuction) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgBuyoutOnAuction) Route ¶
func (m MsgBuyoutOnAuction) Route() string
Route should return the name of the module
func (MsgBuyoutOnAuction) Type ¶
func (m MsgBuyoutOnAuction) Type() string
Type should return the action
func (MsgBuyoutOnAuction) ValidateBasic ¶
func (m MsgBuyoutOnAuction) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgCreateFungibleToken ¶
type MsgCreateFungibleToken struct { Creator sdk.AccAddress `json:"creator"` Denom string `json:"denom"` Amount int64 `json:"amount"` }
func NewMsgCreateFungibleToken ¶
func NewMsgCreateFungibleToken(creator sdk.AccAddress, denom string, amount int64) *MsgCreateFungibleToken
func (MsgCreateFungibleToken) GetSignBytes ¶
func (m MsgCreateFungibleToken) GetSignBytes() []byte
func (MsgCreateFungibleToken) GetSigners ¶
func (m MsgCreateFungibleToken) GetSigners() []sdk.AccAddress
func (MsgCreateFungibleToken) Route ¶
func (m MsgCreateFungibleToken) Route() string
func (MsgCreateFungibleToken) Type ¶
func (m MsgCreateFungibleToken) Type() string
func (MsgCreateFungibleToken) ValidateBasic ¶
func (m MsgCreateFungibleToken) ValidateBasic() sdk.Error
type MsgFinishAuction ¶
type MsgFinishAuction MsgRemoveNFTFromMarket
func NewMsgFinishAuction ¶
func NewMsgFinishAuction(owner sdk.AccAddress, tokenID string) *MsgFinishAuction
func (MsgFinishAuction) GetSignBytes ¶
func (m MsgFinishAuction) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgFinishAuction) GetSigners ¶
func (m MsgFinishAuction) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgFinishAuction) Route ¶
func (m MsgFinishAuction) Route() string
Route should return the name of the module
func (MsgFinishAuction) Type ¶
func (m MsgFinishAuction) Type() string
Type should return the action
func (MsgFinishAuction) ValidateBasic ¶
func (m MsgFinishAuction) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgMakeBidOnAuction ¶
type MsgMakeBidOnAuction struct { Bidder sdk.AccAddress `json:"bidder"` // Beneficiary is the cosmos user who gets the commission for this transaction. BuyerBeneficiary sdk.AccAddress `json:"buyer_beneficiary"` BeneficiaryCommission string `json:"beneficiary_commission,omitempty"` TokenID string `json:"token_id"` Bid sdk.Coins `json:"bid"` }
func NewMsgMakeBidOnAuction ¶
func NewMsgMakeBidOnAuction(bidder, buyerBeneficiary sdk.AccAddress, tokenID string, bid sdk.Coins, commission string) *MsgMakeBidOnAuction
func (MsgMakeBidOnAuction) GetSignBytes ¶
func (m MsgMakeBidOnAuction) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgMakeBidOnAuction) GetSigners ¶
func (m MsgMakeBidOnAuction) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgMakeBidOnAuction) Route ¶
func (m MsgMakeBidOnAuction) Route() string
Route should return the name of the module
func (MsgMakeBidOnAuction) Type ¶
func (m MsgMakeBidOnAuction) Type() string
Type should return the action
func (MsgMakeBidOnAuction) ValidateBasic ¶
func (m MsgMakeBidOnAuction) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgMakeOffer ¶
type MsgMakeOffer struct { Buyer sdk.AccAddress `json:"buyer"` Price sdk.Coins `json:"price"` BuyerBeneficiary sdk.AccAddress `json:"buyer_beneficiary"` BeneficiaryCommission string `json:"beneficiary_commission,omitempty"` TokenID string `json:"token_id"` }
func NewMsgMakeOffer ¶
func NewMsgMakeOffer(bidder, buyerBeneficiary sdk.AccAddress, price sdk.Coins, tokenID string, commission string) *MsgMakeOffer
func (MsgMakeOffer) GetSignBytes ¶
func (m MsgMakeOffer) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgMakeOffer) GetSigners ¶
func (m MsgMakeOffer) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgMakeOffer) Route ¶
func (m MsgMakeOffer) Route() string
Route should return the name of the module
func (MsgMakeOffer) ValidateBasic ¶
func (m MsgMakeOffer) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgPutNFTOnAuction ¶
type MsgPutNFTOnAuction struct { Owner sdk.AccAddress `json:"owner"` // Beneficiary is the cosmos user who gets the commission for this transaction. Beneficiary sdk.AccAddress `json:"beneficiary"` TokenID string `json:"token_id"` OpeningPrice sdk.Coins `json:"opening_price"` BuyoutPrice sdk.Coins `json:"buyout_price"` TimeToSell time.Time `json:"time_to_sell"` }
func NewMsgPutNFTOnAuction ¶
func NewMsgPutNFTOnAuction(owner, beneficiary sdk.AccAddress, tokenID string, openingPrice, buyoutPrice sdk.Coins, timeToSell time.Time) *MsgPutNFTOnAuction
func (MsgPutNFTOnAuction) GetSignBytes ¶
func (m MsgPutNFTOnAuction) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgPutNFTOnAuction) GetSigners ¶
func (m MsgPutNFTOnAuction) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgPutNFTOnAuction) Route ¶
func (m MsgPutNFTOnAuction) Route() string
Route should return the name of the module
func (MsgPutNFTOnAuction) Type ¶
func (m MsgPutNFTOnAuction) Type() string
Type should return the action
func (MsgPutNFTOnAuction) ValidateBasic ¶
func (m MsgPutNFTOnAuction) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgPutNFTOnMarket ¶
type MsgPutNFTOnMarket struct { Owner sdk.AccAddress `json:"owner"` // Beneficiary is the cosmos user who gets the commission for this transaction. Beneficiary sdk.AccAddress `json:"beneficiary"` TokenID string `json:"token_id"` Price sdk.Coins `json:"price"` }
func NewMsgPutOnMarketNFT ¶
func NewMsgPutOnMarketNFT(owner, beneficiary sdk.AccAddress, tokenID string, price sdk.Coins) *MsgPutNFTOnMarket
func (MsgPutNFTOnMarket) GetSignBytes ¶
func (m MsgPutNFTOnMarket) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgPutNFTOnMarket) GetSigners ¶
func (m MsgPutNFTOnMarket) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgPutNFTOnMarket) Route ¶
func (m MsgPutNFTOnMarket) Route() string
Route should return the name of the module
func (MsgPutNFTOnMarket) Type ¶
func (m MsgPutNFTOnMarket) Type() string
Type should return the action
func (MsgPutNFTOnMarket) ValidateBasic ¶
func (m MsgPutNFTOnMarket) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgRemoveNFTFromAuction ¶
type MsgRemoveNFTFromAuction MsgRemoveNFTFromMarket
func NewMsgRemoveNFTFromAuction ¶
func NewMsgRemoveNFTFromAuction(owner sdk.AccAddress, tokenID string) *MsgRemoveNFTFromAuction
func (MsgRemoveNFTFromAuction) GetSignBytes ¶
func (m MsgRemoveNFTFromAuction) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgRemoveNFTFromAuction) GetSigners ¶
func (m MsgRemoveNFTFromAuction) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgRemoveNFTFromAuction) Route ¶
func (m MsgRemoveNFTFromAuction) Route() string
Route should return the name of the module
func (MsgRemoveNFTFromAuction) Type ¶
func (m MsgRemoveNFTFromAuction) Type() string
Type should return the action
func (MsgRemoveNFTFromAuction) ValidateBasic ¶
func (m MsgRemoveNFTFromAuction) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgRemoveNFTFromMarket ¶
type MsgRemoveNFTFromMarket struct { Owner sdk.AccAddress `json:"owner"` TokenID string `json:"token_id"` }
func NewMsgRemoveNFTFromMarket ¶
func NewMsgRemoveNFTFromMarket(owner sdk.AccAddress, tokenID string) *MsgRemoveNFTFromMarket
func (MsgRemoveNFTFromMarket) GetSignBytes ¶
func (m MsgRemoveNFTFromMarket) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgRemoveNFTFromMarket) GetSigners ¶
func (m MsgRemoveNFTFromMarket) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgRemoveNFTFromMarket) Route ¶
func (m MsgRemoveNFTFromMarket) Route() string
Route should return the name of the module
func (MsgRemoveNFTFromMarket) Type ¶
func (m MsgRemoveNFTFromMarket) Type() string
Type should return the action
func (MsgRemoveNFTFromMarket) ValidateBasic ¶
func (m MsgRemoveNFTFromMarket) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgRemoveOffer ¶
type MsgRemoveOffer struct { Buyer sdk.AccAddress `json:"buyer"` TokenID string `json:"token_id"` OfferID string `json:"offer_id"` }
func NewMsgRemoveOffer ¶
func NewMsgRemoveOffer(buyer sdk.AccAddress, tokenID, offerID string) *MsgRemoveOffer
func (MsgRemoveOffer) GetSignBytes ¶
func (m MsgRemoveOffer) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgRemoveOffer) GetSigners ¶
func (m MsgRemoveOffer) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgRemoveOffer) Route ¶
func (m MsgRemoveOffer) Route() string
Route should return the name of the module
func (MsgRemoveOffer) ValidateBasic ¶
func (m MsgRemoveOffer) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgTransferFungibleTokens ¶
type MsgTransferFungibleTokens struct { Owner sdk.AccAddress `json:"owner"` Recipient sdk.AccAddress `json:"recipient"` Denom string `json:"denom"` Amount int64 `json:"amount"` }
func NewMsgTransferFungibleTokens ¶
func NewMsgTransferFungibleTokens(owner, recipient sdk.AccAddress, denom string, amount int64) *MsgTransferFungibleTokens
func (MsgTransferFungibleTokens) GetSignBytes ¶
func (m MsgTransferFungibleTokens) GetSignBytes() []byte
func (MsgTransferFungibleTokens) GetSigners ¶
func (m MsgTransferFungibleTokens) GetSigners() []sdk.AccAddress
func (MsgTransferFungibleTokens) Route ¶
func (m MsgTransferFungibleTokens) Route() string
func (MsgTransferFungibleTokens) Type ¶
func (m MsgTransferFungibleTokens) Type() string
func (MsgTransferFungibleTokens) ValidateBasic ¶
func (m MsgTransferFungibleTokens) ValidateBasic() sdk.Error
type MsgTransferNFTByIBC ¶
type MsgTransferNFTByIBC struct { SourcePort string `json:"source_port" yaml:"source_port"` // the port on which the packet will be sent SourceChannel string `json:"source_channel" yaml:"source_channel"` // the channel by which the packet will be sent TokenID string `json:"token_id" yaml:"token_id"` // the id of token to be transferred Sender sdk.AccAddress `json:"sender" yaml:"sender"` // the sender address Receiver sdk.AccAddress `json:"receiver" yaml:"receiver"` // the recipient address on the destination chain Source bool `json:"source" yaml:"source"` // indicates if the sending chain is the source chain of the tokens to be transferred }
func NewMsgTransferNFTByIBC ¶
func NewMsgTransferNFTByIBC(sourcePort, sourceChannel string, tokenID string, sender, receiver sdk.AccAddress, source bool, ) MsgTransferNFTByIBC
NewMsgTransfer creates a new MsgTransfer instance
func (MsgTransferNFTByIBC) GetSignBytes ¶
func (msg MsgTransferNFTByIBC) GetSignBytes() []byte
GetSignBytes implements sdk.Msg
func (MsgTransferNFTByIBC) GetSigners ¶
func (msg MsgTransferNFTByIBC) GetSigners() []sdk.AccAddress
GetSigners implements sdk.Msg
func (MsgTransferNFTByIBC) Route ¶
func (MsgTransferNFTByIBC) Route() string
Route implements sdk.Msg
func (MsgTransferNFTByIBC) ValidateBasic ¶
func (msg MsgTransferNFTByIBC) ValidateBasic() sdk.Error
ValidateBasic implements sdk.Msg
type MsgUpdateNFTParams ¶
type MsgUpdateNFTParams struct { Owner sdk.AccAddress `json:"owner"` Params NFTParams `json:"params"` TokenID string `json:"token_id"` }
func NewMsgUpdateNFTParams ¶
func NewMsgUpdateNFTParams(owner sdk.AccAddress, id string, params []NFTParam) *MsgUpdateNFTParams
func (MsgUpdateNFTParams) GetSignBytes ¶
func (m MsgUpdateNFTParams) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgUpdateNFTParams) GetSigners ¶
func (m MsgUpdateNFTParams) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgUpdateNFTParams) Route ¶
func (m MsgUpdateNFTParams) Route() string
Route should return the name of the module
func (MsgUpdateNFTParams) Type ¶
func (m MsgUpdateNFTParams) Type() string
Type should return the action
func (MsgUpdateNFTParams) ValidateBasic ¶
func (m MsgUpdateNFTParams) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type NFT ¶
type NFT struct { ID string `json:"id"` Denom string `json:"denom"` Owner sdk.AccAddress `json:"owner"` Price sdk.Coins `json:"price"` Status NFTStatus `json:"status"` SellerBeneficiary sdk.AccAddress `json:"seller_beneficiary"` TimeCreated time.Time `json:"time_created"` Offers []*Offer `json:"offers"` }
func (*NFT) GetTimeCreated ¶
func (*NFT) IsOnAuction ¶
func (*NFT) IsOnMarket ¶
func (*NFT) RemoveOffer ¶
func (m *NFT) RemoveOffer(offerID string, buyer sdk.AccAddress) bool
func (*NFT) SetSellerBeneficiary ¶
func (m *NFT) SetSellerBeneficiary(addr sdk.AccAddress)
type NFTInfo ¶
type NFTInfo struct { MPNFTInfo *NFT `json:"nft_mp_info"` *NFTMetaData `json:"nft_meta_data"` }
type NFTMetaData ¶
type NFTMetaData struct { ID string `json:"id"` Owner sdk.AccAddress `json:"owner"` TokenURI string `json:"token_uri"` }
copy of data got from exported/nft interface
func NewNFTMetaData ¶
func NewNFTMetaData(token exported.NFT) *NFTMetaData
func (NFTMetaData) String ¶
func (d NFTMetaData) String() string
type NFTPacketData ¶
type NFTPacketData struct { CollectionDenom string `json:"denom"` ID string `json:"id"` TokenMetadataURI string `json:"tokenMetadataUri"` Sender string `json:"sender"` Receiver string `json:"receiver"` Source bool `json:"source"` }
struct for data in IBC packet
type NFTStatus ¶
type NFTStatus int8
func (NFTStatus) MarshalJSON ¶
func (*NFTStatus) UnmarshalJSON ¶
type Offer ¶
type Offer struct { ID string `json:"id"` Buyer sdk.AccAddress `json:"buyer"` Price sdk.Coins `json:"price"` BuyerBeneficiary sdk.AccAddress `json:"buyer_beneficiary"` BeneficiaryCommission string `json:"beneficiary_commission"` }
type QueryResAuctionLots ¶
type QueryResAuctionLots struct {
AuctionLots []*AuctionLot `json:"auction_lots"`
}
func (QueryResAuctionLots) String ¶
func (r QueryResAuctionLots) String() string
type QueryResFungibleTokens ¶
type QueryResFungibleTokens struct {
FungibleTokens []*FungibleToken `json:"fungible_tokens"`
}
func (QueryResFungibleTokens) String ¶
func (r QueryResFungibleTokens) String() string
type QueryResNFTs ¶
type QueryResNFTs struct {
NFTs []*NFTInfo `json:"nfts"`
}
func (QueryResNFTs) String ¶
func (r QueryResNFTs) String() string