Documentation ¶
Index ¶
- Constants
- Variables
- func GetCmdListTokens(queryRoute string, cdc *codec.Codec) *cobra.Command
- func GetCmdTokenInfo(queryRoute string, cdc *codec.Codec) *cobra.Command
- func GetCmdTransferInfo(queryRoute string, cdc *codec.Codec) *cobra.Command
- func GetCmdTransferToken(cdc *codec.Codec) *cobra.Command
- func InitGenesis(ctx sdk.Context, keeper Keeper, state GenesisState) []abci.ValidatorUpdate
- func NewHandler(keeper Keeper) sdk.Handler
- func NewQuerier(keeper Keeper) sdk.Querier
- func RegisterCodec(cdc *codec.Codec)
- func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router, cdc *codec.Codec, storeName string)
- func ValidateGenesis(data GenesisState) error
- type AppModule
- func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) types.Tags
- func (am AppModule) EndBlock(types.Context, abci.RequestEndBlock) ([]abci.ValidatorUpdate, types.Tags)
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (am AppModule) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (am AppModule) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (am AppModule) InitGenesis(ctx types.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (am AppModule) NewHandler() types.Handler
- func (am AppModule) NewQuerierHandler() types.Querier
- func (am AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (am AppModule) RegisterRESTRoutes(cliCtx context.CLIContext, r *mux.Router)
- func (am AppModule) Route() string
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(*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(cliCtx context.CLIContext, r *mux.Router)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type BaseNFT
- type GenesisState
- type Keeper
- func (k Keeper) BuyNFToken(ctx sdk.Context, nfTokenID string, buyer sdk.AccAddress) error
- func (k Keeper) DeleteNFT(ctx sdk.Context, tokenID string)
- func (k Keeper) GetNFTIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetNFToken(ctx sdk.Context, tokenID string) *NFT
- func (k Keeper) GetNFTokens(ctx sdk.Context) []NFT
- func (k Keeper) PutNFTokenOnTheMarket(ctx sdk.Context, token NFT, sender sdk.AccAddress) error
- func (k Keeper) StoreNFT(ctx sdk.Context, nft NFT, owner sdk.AccAddress)
- type MsgBuyNFToken
- type MsgPutNFTokenOnTheMarket
- type MsgTransferTokenToZone
- type NFT
- type ProofPacket
- type QueryResNFTokens
- type SendTokenPacket
- type Transfer
Constants ¶
const ( ConnectionID = "market_connection" CounterpartyID = "hub" CounterpartyClientID = "me" )
const ( QueryNFToken = "NFToken" QueryNFTokens = "NFTokens" )
Query endpoints supported by the hh Querier.
const ModuleName = "hh"
const RouterKey = ModuleName
const StoreKey = "hh"
StoreKey to be used when creating the KVStore
Variables ¶
var ModuleCdc = codec.New()
Functions ¶
func GetCmdTransferInfo ¶
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, keeper Keeper, state GenesisState) []abci.ValidatorUpdate
func NewHandler ¶
NewHandler returns a handler for "hh" type messages.
func NewQuerier ¶
NewQuerier is the module level router for state queries
func RegisterCodec ¶
RegisterCodec registers concrete types on the Amino codec
func RegisterRoutes ¶
RegisterRoutes - Central function to define routes that get registered by the main application
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
func NewAppModule ¶
NewAppModule creates a new AppModule Object
func (AppModule) BeginBlock ¶
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(types.Context, abci.RequestEndBlock) ([]abci.ValidatorUpdate, types.Tags)
func (AppModule) ExportGenesis ¶
func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx types.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)
func (AppModule) RegisterRESTRoutes ¶
func (am AppModule) RegisterRESTRoutes(cliCtx context.CLIContext, r *mux.Router)
type AppModuleBasic ¶
type AppModuleBasic struct{}
app module Basics object
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd(*codec.Codec) *cobra.Command
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(cliCtx context.CLIContext, r *mux.Router)
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
Validation check of the Genesis
type BaseNFT ¶
type BaseNFT struct { ID string `json:"id,omitempty"` // id of the token; not exported to clients Owner sdk.AccAddress `json:"owner,string"` // account address that owns the NFT Name string `json:"name,string"` // name of the token Description string `json:"description,string"` // unique description of the NFT Image string `json:"image,string"` // image path TokenURI string `json:"token_uri,string"` // optional extra properties available fo querying }
BaseNFT non fungible token definition
func NewBaseNFT ¶
func NewBaseNFT(ID string, owner sdk.AccAddress, tokenURI, description, image, name string) BaseNFT
NewBaseNFT creates a new NFT instance
type GenesisState ¶
type GenesisState struct { NFTRecords []NFT `json:"nft_records"` AuthData auth.GenesisState `json:"auth"` BankData bank.GenesisState `json:"bank"` Accounts []*auth.BaseAccount `json:"accounts"` }
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState
func NewGenesisState ¶
func NewGenesisState(nftRecords []NFT) GenesisState
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, ibcKeeper ibck.Keeper, accountKeeper auth.AccountKeeper, feeCollectionKeeper auth.FeeCollectionKeeper, storeKey sdk.StoreKey, cdc *codec.Codec) Keeper
NewKeeper creates new instances of the hh Keeper
func (Keeper) BuyNFToken ¶
func (Keeper) PutNFTokenOnTheMarket ¶
type MsgBuyNFToken ¶
type MsgBuyNFToken struct { Sender sdk.AccAddress NFTokenID string Price sdk.Coins }
MsgBuyNFToken.
func NewMsgBuyNFToken ¶
func NewMsgBuyNFToken(tokenID string, price sdk.Coins, sender sdk.AccAddress) MsgBuyNFToken
NewMsgBuyNFToken is a constructor function for MsgBuyNFToken
func (MsgBuyNFToken) GetSignBytes ¶
func (msg MsgBuyNFToken) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgBuyNFToken) GetSigners ¶
func (msg MsgBuyNFToken) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgBuyNFToken) Route ¶
func (msg MsgBuyNFToken) Route() string
Route should return the name of the module
func (MsgBuyNFToken) ValidateBasic ¶
func (msg MsgBuyNFToken) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgPutNFTokenOnTheMarket ¶
type MsgPutNFTokenOnTheMarket struct { Sender sdk.AccAddress Token NFT }
MsgPutNFTokenOnTheMarket.
func NewMsgPutNFTokenOnTheMarket ¶
func NewMsgPutNFTokenOnTheMarket(token NFT, sender sdk.AccAddress) MsgPutNFTokenOnTheMarket
NewMsgPutNFTokenOnTheMarket is a constructor function for MsgPutNFTokenOnTheMarket
func (MsgPutNFTokenOnTheMarket) GetSignBytes ¶
func (msg MsgPutNFTokenOnTheMarket) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgPutNFTokenOnTheMarket) GetSigners ¶
func (msg MsgPutNFTokenOnTheMarket) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgPutNFTokenOnTheMarket) Route ¶
func (msg MsgPutNFTokenOnTheMarket) Route() string
Route should return the name of the module
func (MsgPutNFTokenOnTheMarket) Type ¶
func (msg MsgPutNFTokenOnTheMarket) Type() string
Type should return the action
func (MsgPutNFTokenOnTheMarket) ValidateBasic ¶
func (msg MsgPutNFTokenOnTheMarket) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgTransferTokenToZone ¶
type MsgTransferTokenToZone struct { Owner sdk.AccAddress TokenID string //fixme fill it ConnectionID string CounterpartyID string CounterpartyClientID string }
func NewMsgTransferTokenToZone ¶
func NewMsgTransferTokenToZone(owner sdk.AccAddress, tokenID string, zoneID string) MsgTransferTokenToZone
NewMsgCreateNFT is a constructor function for MsgCreateNFT
func (MsgTransferTokenToZone) GetSignBytes ¶
func (msg MsgTransferTokenToZone) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgTransferTokenToZone) GetSigners ¶
func (msg MsgTransferTokenToZone) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgTransferTokenToZone) Route ¶
func (msg MsgTransferTokenToZone) Route() string
Route should return the name of the module
func (MsgTransferTokenToZone) Type ¶
func (msg MsgTransferTokenToZone) Type() string
Type should return the action
func (MsgTransferTokenToZone) ValidateBasic ¶
func (msg MsgTransferTokenToZone) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type ProofPacket ¶
type ProofPacket struct { }
func (*ProofPacket) GetKey ¶
func (p *ProofPacket) GetKey() []byte
func (*ProofPacket) Verify ¶
func (p *ProofPacket) Verify(commitment.Root, []byte) error
type QueryResNFTokens ¶
type QueryResNFTokens []NFT
func (QueryResNFTokens) String ¶
func (m QueryResNFTokens) String() string
type SendTokenPacket ¶
type SendTokenPacket struct {
Token *BaseNFT `json:"token"`
}
func NewSendTokenPacket ¶
func NewSendTokenPacket(token *BaseNFT) *SendTokenPacket
func (*SendTokenPacket) Commit ¶
func (m *SendTokenPacket) Commit() []byte
func (*SendTokenPacket) Timeout ¶
func (m *SendTokenPacket) Timeout() uint64