Documentation
¶
Overview ¶
copied from https://github.com/cosmos/cosmos-sdk/blob/v0.38.1/types/coin.go
Index ¶
- Constants
- Variables
- func AccountKey(contractID string, acc sdk.AccAddress) []byte
- func AccountOwnNFTKey(contractID string, owner sdk.AccAddress, tokenID string) []byte
- func CollectionApprovedKey(contractID string, proxy sdk.AccAddress, approver sdk.AccAddress) []byte
- func CollectionApproversKey(contractID string, proxy sdk.AccAddress) []byte
- func CollectionKey(contractID string) []byte
- func NextTokenIDNFTKey(contractID, tokenType string) []byte
- func NextTokenTypeFTKey(contractID string) []byte
- func NextTokenTypeNFTKey(contractID string) []byte
- func ParamKeyTable() subspace.KeyTable
- func PermKey(contractID string, addr sdk.AccAddress) []byte
- func RegisterCodec(cdc *codec.Codec)
- func SupplyKey(contractID string) []byte
- func TokenChildToParentKey(contractID, tokenID string) []byte
- func TokenKey(contractID, tokenID string) []byte
- func TokenParentToChildKey(contractID, parent, child string) []byte
- func TokenParentToChildSubKey(contractID, parent string) []byte
- func TokenTypeBurnCount(contractID, tokenType string) []byte
- func TokenTypeKey(contractID, tokenType string) []byte
- func TokenTypeMintCount(contractID, tokenType string) []byte
- func ValidateBaseImgURI(baseImgURI string) bool
- func ValidateDenom(denom string) error
- func ValidateMeta(meta string) bool
- func ValidateName(name string) bool
- func ValidateReg(symbol string, reg *regexp.Regexp) error
- func ValidateTokenID(tokenID string) error
- func ValidateTokenIndex(index string) error
- func ValidateTokenType(tokenType string) error
- func ValidateTokenTypeFT(tokenType string) error
- func ValidateTokenTypeNFT(tokenType string) error
- func WrapIfOverflowPanic(r interface{}) error
- type Account
- type AccountKeeper
- type AccountPermission
- func (ap *AccountPermission) AddPermission(p Permission)
- func (ap *AccountPermission) GetAddress() sdk.AccAddress
- func (ap *AccountPermission) GetPermissions() Permissions
- func (ap *AccountPermission) HasPermission(p Permission) bool
- func (ap *AccountPermission) RemovePermission(p Permission)
- func (ap *AccountPermission) String() string
- type AccountPermissionI
- type Accounts
- type ApproversParam
- type BalanceParam
- type BaseAccount
- type BaseCollection
- func (c BaseCollection) GetBaseImgURI() string
- func (c BaseCollection) GetContractID() string
- func (c BaseCollection) GetMeta() string
- func (c BaseCollection) GetName() string
- func (c *BaseCollection) SetBaseImgURI(baseImgURI string)
- func (c *BaseCollection) SetMeta(meta string)
- func (c *BaseCollection) SetName(name string)
- func (c BaseCollection) String() string
- type BaseFT
- func (t BaseFT) GetContractID() string
- func (t BaseFT) GetDecimals() sdk.Int
- func (t BaseFT) GetMeta() string
- func (t BaseFT) GetMintable() bool
- func (t BaseFT) GetName() string
- func (t BaseFT) GetTokenID() string
- func (t BaseFT) GetTokenIndex() string
- func (t BaseFT) GetTokenType() string
- func (t *BaseFT) SetMeta(meta string)
- func (t *BaseFT) SetName(name string)
- func (t BaseFT) String() string
- type BaseNFT
- func (t BaseNFT) GetContractID() string
- func (t BaseNFT) GetMeta() string
- func (t BaseNFT) GetName() string
- func (t BaseNFT) GetOwner() sdk.AccAddress
- func (t BaseNFT) GetTokenID() string
- func (t BaseNFT) GetTokenIndex() string
- func (t BaseNFT) GetTokenType() string
- func (t *BaseNFT) SetMeta(meta string)
- func (t *BaseNFT) SetName(name string)
- func (t *BaseNFT) SetOwner(owner sdk.AccAddress)
- func (t BaseNFT) String() string
- type BaseSupply
- func (supply BaseSupply) Deflate(amount Coins) Supply
- func (supply BaseSupply) GetContractID() string
- func (supply BaseSupply) GetTotalBurn() Coins
- func (supply BaseSupply) GetTotalMint() Coins
- func (supply BaseSupply) GetTotalSupply() Coins
- func (supply BaseSupply) Inflate(amount Coins) Supply
- func (supply BaseSupply) SetTotalSupply(total Coins) Supply
- func (supply BaseSupply) String() string
- func (supply BaseSupply) ValidateBasic() error
- type BaseTokenType
- type Change
- type Changes
- type ChangesValidator
- type Coin
- func (coin Coin) Add(coinB Coin) Coin
- func (coin Coin) IsEqual(other Coin) bool
- func (coin Coin) IsGTE(other Coin) bool
- func (coin Coin) IsLT(other Coin) bool
- func (coin Coin) IsNegative() bool
- func (coin Coin) IsPositive() bool
- func (coin Coin) IsValid() bool
- func (coin Coin) IsZero() bool
- func (coin Coin) String() string
- func (coin Coin) Sub(coinB Coin) Coin
- type Coins
- func (coins Coins) Add(coinsB ...Coin) Coins
- func (coins Coins) AmountOf(denom string) sdk.Int
- func (coins Coins) DenomsSubsetOf(coinsB Coins) bool
- func (coins Coins) Empty() bool
- func (coins Coins) GetDenomByIndex(i int) string
- func (coins Coins) IsAllGT(coinsB Coins) bool
- func (coins Coins) IsAllGTE(coinsB Coins) bool
- func (coins Coins) IsAllLT(coinsB Coins) bool
- func (coins Coins) IsAllLTE(coinsB Coins) bool
- func (coins Coins) IsAllPositive() bool
- func (coins Coins) IsAnyGT(coinsB Coins) bool
- func (coins Coins) IsAnyGTE(coinsB Coins) bool
- func (coins Coins) IsAnyNegative() bool
- func (coins Coins) IsEqual(coinsB Coins) bool
- func (coins Coins) IsValid() bool
- func (coins Coins) IsZero() bool
- func (coins Coins) Len() int
- func (coins Coins) Less(i, j int) bool
- func (coins Coins) MarshalJSON() ([]byte, error)
- func (coins Coins) SafeSub(coinsB Coins) (Coins, bool)
- func (coins Coins) Sort() Coins
- func (coins Coins) String() string
- func (coins Coins) Sub(coinsB Coins) Coins
- func (coins Coins) Swap(i, j int)
- type Collection
- type CollectionParam
- type Collections
- type FT
- type Findable
- type IsApprovedParam
- type MintNFTParam
- type ModifiableFields
- type MsgApprove
- type MsgAttach
- func (msg MsgAttach) GetContractID() string
- func (msg MsgAttach) GetSignBytes() []byte
- func (msg MsgAttach) GetSigners() []sdk.AccAddress
- func (msg MsgAttach) MarshalJSON() ([]byte, error)
- func (MsgAttach) Route() string
- func (MsgAttach) Type() string
- func (msg *MsgAttach) UnmarshalJSON(data []byte) error
- func (msg MsgAttach) ValidateBasic() error
- type MsgAttachFrom
- func (msg MsgAttachFrom) GetContractID() string
- func (msg MsgAttachFrom) GetSignBytes() []byte
- func (msg MsgAttachFrom) GetSigners() []sdk.AccAddress
- func (msg MsgAttachFrom) MarshalJSON() ([]byte, error)
- func (MsgAttachFrom) Route() string
- func (MsgAttachFrom) Type() string
- func (msg *MsgAttachFrom) UnmarshalJSON(data []byte) error
- func (msg MsgAttachFrom) ValidateBasic() error
- type MsgBurnFT
- type MsgBurnFTFrom
- type MsgBurnNFT
- type MsgBurnNFTFrom
- type MsgCreateCollection
- type MsgDetach
- func (msg MsgDetach) GetContractID() string
- func (msg MsgDetach) GetSignBytes() []byte
- func (msg MsgDetach) GetSigners() []sdk.AccAddress
- func (msg MsgDetach) MarshalJSON() ([]byte, error)
- func (MsgDetach) Route() string
- func (MsgDetach) Type() string
- func (msg *MsgDetach) UnmarshalJSON(data []byte) error
- func (msg MsgDetach) ValidateBasic() error
- type MsgDetachFrom
- func (msg MsgDetachFrom) GetContractID() string
- func (msg MsgDetachFrom) GetSignBytes() []byte
- func (msg MsgDetachFrom) GetSigners() []sdk.AccAddress
- func (msg MsgDetachFrom) MarshalJSON() ([]byte, error)
- func (MsgDetachFrom) Route() string
- func (MsgDetachFrom) Type() string
- func (msg *MsgDetachFrom) UnmarshalJSON(data []byte) error
- func (msg MsgDetachFrom) ValidateBasic() error
- type MsgDisapprove
- type MsgGrantPermission
- type MsgIssueFT
- type MsgIssueNFT
- type MsgMintFT
- type MsgMintNFT
- type MsgModify
- type MsgRevokePermission
- func (msg MsgRevokePermission) GetContractID() string
- func (msg MsgRevokePermission) GetSignBytes() []byte
- func (msg MsgRevokePermission) GetSigners() []sdk.AccAddress
- func (MsgRevokePermission) Route() string
- func (MsgRevokePermission) Type() string
- func (msg MsgRevokePermission) ValidateBasic() error
- type MsgRoute
- type MsgTransferFT
- func (msg MsgTransferFT) GetContractID() string
- func (msg MsgTransferFT) GetSignBytes() []byte
- func (msg MsgTransferFT) GetSigners() []sdk.AccAddress
- func (msg MsgTransferFT) MarshalJSON() ([]byte, error)
- func (MsgTransferFT) Route() string
- func (MsgTransferFT) Type() string
- func (msg *MsgTransferFT) UnmarshalJSON(data []byte) error
- func (msg MsgTransferFT) ValidateBasic() error
- type MsgTransferFTFrom
- func (msg MsgTransferFTFrom) GetContractID() string
- func (msg MsgTransferFTFrom) GetSignBytes() []byte
- func (msg MsgTransferFTFrom) GetSigners() []sdk.AccAddress
- func (msg MsgTransferFTFrom) MarshalJSON() ([]byte, error)
- func (MsgTransferFTFrom) Route() string
- func (MsgTransferFTFrom) Type() string
- func (msg *MsgTransferFTFrom) UnmarshalJSON(data []byte) error
- func (msg MsgTransferFTFrom) ValidateBasic() error
- type MsgTransferNFT
- func (msg MsgTransferNFT) GetContractID() string
- func (msg MsgTransferNFT) GetSignBytes() []byte
- func (msg MsgTransferNFT) GetSigners() []sdk.AccAddress
- func (msg MsgTransferNFT) MarshalJSON() ([]byte, error)
- func (MsgTransferNFT) Route() string
- func (MsgTransferNFT) Type() string
- func (msg *MsgTransferNFT) UnmarshalJSON(data []byte) error
- func (msg MsgTransferNFT) ValidateBasic() error
- type MsgTransferNFTFrom
- func (msg MsgTransferNFTFrom) GetContractID() string
- func (msg MsgTransferNFTFrom) GetSignBytes() []byte
- func (msg MsgTransferNFTFrom) GetSigners() []sdk.AccAddress
- func (msg MsgTransferNFTFrom) MarshalJSON() ([]byte, error)
- func (MsgTransferNFTFrom) Route() string
- func (MsgTransferNFTFrom) Type() string
- func (msg *MsgTransferNFTFrom) UnmarshalJSON(data []byte) error
- func (msg MsgTransferNFTFrom) ValidateBasic() error
- type NFT
- type NodeQuerier
- type Params
- type PermParam
- type Permission
- type Permissions
- func (pms *Permissions) AddPermission(p Permission)
- func (pms *Permissions) GetPermissions() []Permission
- func (pms Permissions) HasPermission(p Permission) bool
- func (pms *Permissions) RemoveElement(idx int)
- func (pms *Permissions) RemovePermission(p Permission)
- func (pms Permissions) String() string
- type QueryAccAddressParams
- type QueryApprovedWrapper
- type QueryApproversWrapper
- type QueryBalanceWrapper
- type QueryCollectionWrapper
- type QueryIsApprovedParams
- type QueryNFTCountWrapper
- type QueryPermsWrapper
- type QueryProxyParams
- type QueryTokenIDAccAddressParams
- type QueryTokenIDParams
- type QueryTokenTypeParams
- type QueryTokenTypeWrapper
- type QueryTokenTypesWrapper
- type QueryTokensWrapper
- type QueryTotalWrapper
- type Supply
- type Token
- type TokenType
- type TokenTypeParam
- type TokenTypes
- type TokenTypesParam
- type Tokens
- type TokensParam
- type TotalParam
- type WasmCustomMsg
- type WasmCustomQuerier
Constants ¶
const ( RCreateCollection = MsgRoute("create") RIssueNFT = MsgRoute("issue_nft") RIssueFT = MsgRoute("issue_ft") RMintFT = MsgRoute("mint_ft") RMintNFT = MsgRoute("mint_nft") RBurnNFT = MsgRoute("burn_nft") RBurnFT = MsgRoute("burn_ft") RBurnFTFrom = MsgRoute("burn_ft_from") RBurnNFTFrom = MsgRoute("burn_nft_from") RTransferFT = MsgRoute("transfer_ft") RTransferNFT = MsgRoute("transfer_nft") RTransferFTFrom = MsgRoute("transfer_ft_from") RTransferNFTFrom = MsgRoute("transfer_nft_from") RModify = MsgRoute("modify") RApprove = MsgRoute("approve") RDisapprove = MsgRoute("disapprove") RGrantPerm = MsgRoute("grant_perm") RRevokePerm = MsgRoute("revoke_perm") RAttach = MsgRoute("attach") RDetach = MsgRoute("detach") RAttachFrom = MsgRoute("attach_from") RDetachFrom = MsgRoute("detach_from") )
const ( ModuleName = "collection" StoreKey = ModuleName RouterKey = ModuleName )
const ( DefaultParamspace = ModuleName DefaultMaxComposableDepth uint64 = 20 DefaultMaxComposableWidth uint64 = 20 )
const ( MintAction = "mint" BurnAction = "burn" IssueAction = "issue" ModifyAction = "modify" )
const ( QuerierRoute = ModuleName QueryBalances = "balances" QueryBalance = "balance" QueryTokens = "tokens" QueryTokensWithTokenType = "tokensWithTokenType" QueryTokenTypes = "tokentypes" QueryPerms = "perms" QueryCollections = "collections" QuerySupply = "supply" QueryMint = "mint" QueryBurn = "burn" QueryNFTCount = "nftcount" QueryNFTMint = "nftmint" QueryNFTBurn = "nftburn" QueryParent = "parent" QueryRoot = "root" QueryChildren = "children" QueryIsApproved = "approved" QueryApprovers = "approver" )
const ( TokenTypeLength = 8 SmallestAlphanum = "0" FungibleFlag = SmallestAlphanum ReservedEmpty = "00000000" SmallestFTType = "00000001" ReservedEmptyNFT = "10000000" SmallestNFTType = "10000001" SmallestTokenIndex = "00000001" )
const ( MaxBaseImgURILength = 1000 MaxTokenNameLength = 20 MaxChangeFieldsCount = 100 MaxTokenMetaLength = 1000 )
const (
EncodeRouterKey = "collectionencode"
)
Variables ¶
var ( OneCoin = func(denom string) Coin { return NewCoin(denom, sdk.NewInt(1)) } OneCoins = func(denom string) Coins { return NewCoins(OneCoin(denom)) } )
var ( ErrTokenExist = sdkerrors.Register(ModuleName, 1, "token symbol, token-id already exists") ErrTokenNotExist = sdkerrors.Register(ModuleName, 2, "token symbol, token-id does not exist") ErrTokenNotMintable = sdkerrors.Register(ModuleName, 3, "token symbol, token-id is not mintable") ErrInvalidTokenName = sdkerrors.Register(ModuleName, 4, "token name should not be empty") ErrInvalidTokenID = sdkerrors.Register(ModuleName, 5, "invalid token id") ErrInvalidTokenDecimals = sdkerrors.Register(ModuleName, 6, "token decimals should be within the range in 0 ~ 18") ErrInvalidIssueFT = sdkerrors.Register(ModuleName, 7, "Issuing token with amount[1], decimals[0], mintable[false] prohibited. Issue nft token instead.") ErrInvalidAmount = sdkerrors.Register(ModuleName, 8, "invalid token amount") ErrInvalidBaseImgURILength = sdkerrors.Register(ModuleName, 9, "invalid base_img_uri length") ErrInvalidNameLength = sdkerrors.Register(ModuleName, 10, "invalid name length") ErrInvalidTokenType = sdkerrors.Register(ModuleName, 11, "invalid token type pattern found") ErrInvalidTokenIndex = sdkerrors.Register(ModuleName, 12, "invalid token index pattern found") ErrCollectionExist = sdkerrors.Register(ModuleName, 13, "collection already exists") ErrCollectionNotExist = sdkerrors.Register(ModuleName, 14, "collection does not exists") ErrTokenTypeExist = sdkerrors.Register(ModuleName, 15, "token type for contract_id, token-type already exists") ErrTokenTypeNotExist = sdkerrors.Register(ModuleName, 16, "token type for contract_id, token-type does not exist") ErrTokenTypeFull = sdkerrors.Register(ModuleName, 17, "all token type for contract_id are occupied") ErrTokenIndexFull = sdkerrors.Register(ModuleName, 18, "all non-fungible token index for contract_id, token-type are occupied") ErrTokenIDFull = sdkerrors.Register(ModuleName, 19, "all fungible token-id for contract_id are occupied") ErrTokenNoPermission = sdkerrors.Register(ModuleName, 20, "account does not have the permission") ErrTokenAlreadyAChild = sdkerrors.Register(ModuleName, 21, "token is already a child of some other") ErrTokenNotAChild = sdkerrors.Register(ModuleName, 22, "token is not a child of some other") ErrTokenNotOwnedBy = sdkerrors.Register(ModuleName, 23, "token is being not owned by") ErrTokenCannotTransferChildToken = sdkerrors.Register(ModuleName, 24, "cannot transfer a child token") ErrTokenNotNFT = sdkerrors.Register(ModuleName, 25, "token is not a NFT") ErrCannotAttachToItself = sdkerrors.Register(ModuleName, 26, "cannot attach token to itself") ErrCannotAttachToADescendant = sdkerrors.Register(ModuleName, 27, "cannot attach token to a descendant") ErrApproverProxySame = sdkerrors.Register(ModuleName, 28, "approver is same with proxy") ErrCollectionNotApproved = sdkerrors.Register(ModuleName, 29, "proxy is not approved on the collection") ErrCollectionAlreadyApproved = sdkerrors.Register(ModuleName, 30, "proxy is already approved on the collection") ErrAccountExist = sdkerrors.Register(ModuleName, 31, "account already exists") ErrAccountNotExist = sdkerrors.Register(ModuleName, 32, "account does not exists") ErrInsufficientSupply = sdkerrors.Register(ModuleName, 33, "insufficient supply") ErrInvalidCoin = sdkerrors.Register(ModuleName, 34, "invalid coin") ErrInvalidChangesFieldCount = sdkerrors.Register(ModuleName, 35, "invalid count of field changes") ErrEmptyChanges = sdkerrors.Register(ModuleName, 36, "changes is empty") ErrInvalidChangesField = sdkerrors.Register(ModuleName, 37, "invalid field of changes") ErrTokenIndexWithoutType = sdkerrors.Register(ModuleName, 38, "There is a token index but no token type") ErrTokenTypeFTWithoutIndex = sdkerrors.Register(ModuleName, 39, "There is a token type of ft but no token index") ErrInsufficientToken = sdkerrors.Register(ModuleName, 40, "insufficient token") ErrDuplicateChangesField = sdkerrors.Register(ModuleName, 41, "duplicate field of changes") ErrInvalidMetaLength = sdkerrors.Register(ModuleName, 42, "invalid meta length") ErrSupplyOverflow = sdkerrors.Register(ModuleName, 43, "supply for collection reached maximum") ErrEmptyField = sdkerrors.Register(ModuleName, 44, "required field cannot be empty") ErrCompositionTooDeep = sdkerrors.Register(ModuleName, 45, "cannot attach token (composition too deep)") ErrCompositionTooWide = sdkerrors.Register(ModuleName, 46, "cannot attach token (composition too wide)") ErrBurnNonRootNFT = sdkerrors.Register(ModuleName, 47, "cannot burn non-root NFTs") )
var ( EventTypeIssueFT = "issue_ft" EventTypeIssueNFT = "issue_nft" EventTypeMintFT = "mint_ft" EventTypeBurnFT = "burn_ft" EventTypeMintNFT = "mint_nft" EventTypeModifyCollection = "modify_collection" EventTypeModifyTokenType = "modify_token_type" /* #nosec */ EventTypeModifyToken = "modify_token" EventTypeGrantPermToken = "grant_perm" EventTypeRevokePermToken = "revoke_perm" EventTypeCreateCollection = "create_collection" EventTypeAttachToken = "attach" /* #nosec */ EventTypeDetachToken = "detach" /* #nosec */ EventTypeAttachFrom = "attach_from" EventTypeDetachFrom = "detach_from" EventTypeTransfer = "transfer" EventTypeTransferFT = "transfer_ft" EventTypeTransferNFT = "transfer_nft" EventTypeTransferFTFrom = "transfer_ft_from" EventTypeTransferNFTFrom = "transfer_nft_from" EventTypeOperationTransferNFT = "operation_transfer_nft" EventTypeApproveCollection = "approve_collection" EventTypeDisapproveCollection = "disapprove_collection" EventTypeBurnNFT = "burn_nft" EventTypeBurnFTFrom = "burn_ft_from" EventTypeBurnNFTFrom = "burn_nft_from" EventTypeOperationBurnNFT = "operation_burn_nft" EventTypeOperationRootChanged = "operation_root_changed" AttributeKeyName = "name" AttributeKeyMeta = "meta" AttributeKeyContractID = "contract_id" AttributeKeyTokenID = "token_id" AttributeKeyOwner = "owner" AttributeKeyAmount = "amount" AttributeKeyDecimals = "decimals" AttributeKeyBaseImgURI = "base_img_uri" AttributeKeyMintable = "mintable" AttributeKeyTokenType = "token_type" AttributeKeyFrom = "from" AttributeKeyTo = "to" AttributeKeyPerm = "perm" AttributeKeyToTokenID = "to_token_id" AttributeKeyFromTokenID = "from_token_id" AttributeKeyApprover = "approver" AttributeKeyProxy = "proxy" AttributeKeyOldRoot = "old_root_token_id" AttributeKeyNewRoot = "new_root_token_id" AttributeValueCategory = ModuleName )
var ( AccountKeyPrefix = []byte{0x00} CollectionKeyPrefix = []byte{0x01} SupplyKeyPrefix = []byte{0x02} TokenKeyPrefix = []byte{0x03} TokenTypeKeyPrefix = []byte{0x04} TokenChildToParentKeyPrefix = []byte{0x05} TokenParentToChildKeyPrefix = []byte{0x06} CollectionApprovedKeyPrefix = []byte{0x07} NextTokenTypeFTKeyPrefix = []byte{0x08} NextTokenTypeNFTKeyPrefix = []byte{0x09} NextTokenIDNFTKeyPrefix = []byte{0x0a} PermKeyPrefix = []byte{0x0b} AccountOwnNFTKeyPrefix = []byte{0x0c} TokenTypeMintCountPrefix = []byte{0x0d} TokenTypeBurnCountPrefix = []byte{0x0e} )
var ( KeyMaxComposableDepth = []byte("MaxComposableDepth") KeyMaxComposableWidth = []byte("MaxComposableWidth") )
var ( CollectionModifiableFields = ModifiableFields{ AttributeKeyName: true, AttributeKeyBaseImgURI: true, AttributeKeyMeta: true, } TokenTypeModifiableFields = ModifiableFields{ AttributeKeyName: true, AttributeKeyMeta: true, } TokenModifiableFields = ModifiableFields{ AttributeKeyName: true, AttributeKeyMeta: true, } )
var ModuleCdc *codec.Codec
Functions ¶
func AccountKey ¶
func AccountKey(contractID string, acc sdk.AccAddress) []byte
func AccountOwnNFTKey ¶
func AccountOwnNFTKey(contractID string, owner sdk.AccAddress, tokenID string) []byte
func CollectionApprovedKey ¶
func CollectionApprovedKey(contractID string, proxy sdk.AccAddress, approver sdk.AccAddress) []byte
func CollectionApproversKey ¶
func CollectionApproversKey(contractID string, proxy sdk.AccAddress) []byte
func CollectionKey ¶
func NextTokenIDNFTKey ¶
func NextTokenTypeFTKey ¶
func NextTokenTypeNFTKey ¶
func ParamKeyTable ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on the Amino codec
func TokenChildToParentKey ¶
func TokenParentToChildKey ¶
func TokenTypeBurnCount ¶
func TokenTypeKey ¶
func TokenTypeMintCount ¶
func ValidateBaseImgURI ¶
func ValidateDenom ¶
ValidateDenom validates a denomination string returning an error if it is invalid.
func ValidateMeta ¶
func ValidateName ¶
func ValidateTokenID ¶
func ValidateTokenIndex ¶
func ValidateTokenType ¶
func ValidateTokenTypeFT ¶
func ValidateTokenTypeNFT ¶
func WrapIfOverflowPanic ¶
func WrapIfOverflowPanic(r interface{}) error
Types ¶
type AccountKeeper ¶
type AccountPermission ¶
type AccountPermission struct { Address sdk.AccAddress Permissions Permissions }
func (*AccountPermission) AddPermission ¶
func (ap *AccountPermission) AddPermission(p Permission)
func (*AccountPermission) GetAddress ¶
func (ap *AccountPermission) GetAddress() sdk.AccAddress
func (*AccountPermission) GetPermissions ¶
func (ap *AccountPermission) GetPermissions() Permissions
func (*AccountPermission) HasPermission ¶
func (ap *AccountPermission) HasPermission(p Permission) bool
func (*AccountPermission) RemovePermission ¶
func (ap *AccountPermission) RemovePermission(p Permission)
func (*AccountPermission) String ¶
func (ap *AccountPermission) String() string
type AccountPermissionI ¶
type AccountPermissionI interface { GetAddress() sdk.AccAddress HasPermission(Permission) bool AddPermission(Permission) RemovePermission(Permission) String() string GetPermissions() Permissions }
func NewAccountPermission ¶
func NewAccountPermission(addr sdk.AccAddress) AccountPermissionI
type ApproversParam ¶
type ApproversParam struct { ContractID string `json:"contract_id"` Proxy sdk.AccAddress `json:"proxy"` }
type BalanceParam ¶
type BalanceParam struct { ContractID string `json:"contract_id"` TokenID string `json:"token_id"` Addr sdk.AccAddress `json:"addr"` }
type BaseAccount ¶
type BaseAccount struct { Address sdk.AccAddress `json:"address"` ContractID string `json:"contract_id"` Coins Coins `json:"tokens"` }
func NewBaseAccountWithAddress ¶
func NewBaseAccountWithAddress(contractID string, addr sdk.AccAddress) *BaseAccount
func (BaseAccount) GetAddress ¶
func (acc BaseAccount) GetAddress() sdk.AccAddress
func (BaseAccount) GetCoins ¶
func (acc BaseAccount) GetCoins() Coins
func (BaseAccount) GetContractID ¶
func (acc BaseAccount) GetContractID() string
func (BaseAccount) SetCoins ¶
func (acc BaseAccount) SetCoins(coins Coins) Account
func (BaseAccount) String ¶
func (acc BaseAccount) String() string
type BaseCollection ¶
type BaseCollection struct { ContractID string `json:"contract_id"` Name string `json:"name"` Meta string `json:"meta"` BaseImgURI string `json:"base_img_uri"` }
func (BaseCollection) GetBaseImgURI ¶
func (c BaseCollection) GetBaseImgURI() string
func (BaseCollection) GetContractID ¶
func (c BaseCollection) GetContractID() string
func (BaseCollection) GetMeta ¶
func (c BaseCollection) GetMeta() string
func (BaseCollection) GetName ¶
func (c BaseCollection) GetName() string
func (*BaseCollection) SetBaseImgURI ¶
func (c *BaseCollection) SetBaseImgURI(baseImgURI string)
func (*BaseCollection) SetMeta ¶
func (c *BaseCollection) SetMeta(meta string)
func (*BaseCollection) SetName ¶
func (c *BaseCollection) SetName(name string)
func (BaseCollection) String ¶
func (c BaseCollection) String() string
type BaseFT ¶
type BaseFT struct { ContractID string `json:"contract_id"` TokenID string `json:"token_id"` Decimals sdk.Int `json:"decimals"` Mintable bool `json:"mintable"` Name string `json:"name"` Meta string `json:"meta"` }
func (BaseFT) GetContractID ¶
func (BaseFT) GetDecimals ¶
func (BaseFT) GetMintable ¶
func (BaseFT) GetTokenID ¶
func (BaseFT) GetTokenIndex ¶
func (BaseFT) GetTokenType ¶
type BaseNFT ¶
type BaseNFT struct { ContractID string `json:"contract_id"` TokenID string `json:"token_id"` Owner sdk.AccAddress `json:"owner"` Name string `json:"name"` Meta string `json:"meta"` }
func (BaseNFT) GetContractID ¶
func (BaseNFT) GetOwner ¶
func (t BaseNFT) GetOwner() sdk.AccAddress
func (BaseNFT) GetTokenID ¶
func (BaseNFT) GetTokenIndex ¶
func (BaseNFT) GetTokenType ¶
func (*BaseNFT) SetOwner ¶
func (t *BaseNFT) SetOwner(owner sdk.AccAddress)
type BaseSupply ¶
type BaseSupply struct { ContractID string `json:"contract_id"` TotalSupply Coins `json:"total_supply"` TotalMint Coins `json:"total_mint"` TotalBurn Coins `json:"total_burn"` }
func (BaseSupply) Deflate ¶
func (supply BaseSupply) Deflate(amount Coins) Supply
func (BaseSupply) GetContractID ¶
func (supply BaseSupply) GetContractID() string
func (BaseSupply) GetTotalBurn ¶
func (supply BaseSupply) GetTotalBurn() Coins
func (BaseSupply) GetTotalMint ¶
func (supply BaseSupply) GetTotalMint() Coins
func (BaseSupply) GetTotalSupply ¶
func (supply BaseSupply) GetTotalSupply() Coins
func (BaseSupply) Inflate ¶
func (supply BaseSupply) Inflate(amount Coins) Supply
func (BaseSupply) SetTotalSupply ¶
func (supply BaseSupply) SetTotalSupply(total Coins) Supply
func (BaseSupply) String ¶
func (supply BaseSupply) String() string
func (BaseSupply) ValidateBasic ¶
func (supply BaseSupply) ValidateBasic() error
type BaseTokenType ¶
type BaseTokenType struct { ContractID string `json:"contract_id"` TokenType string `json:"token_type"` Name string `json:"name"` Meta string `json:"meta"` }
func (BaseTokenType) GetContractID ¶
func (t BaseTokenType) GetContractID() string
func (BaseTokenType) GetMeta ¶
func (t BaseTokenType) GetMeta() string
func (BaseTokenType) GetName ¶
func (t BaseTokenType) GetName() string
func (BaseTokenType) GetTokenType ¶
func (t BaseTokenType) GetTokenType() string
func (*BaseTokenType) SetMeta ¶
func (t *BaseTokenType) SetMeta(meta string)
func (*BaseTokenType) SetName ¶
func (t *BaseTokenType) SetName(name string)
func (BaseTokenType) String ¶
func (t BaseTokenType) String() string
type ChangesValidator ¶
type ChangesValidator struct {
// contains filtered or unexported fields
}
func NewChangesValidator ¶
func NewChangesValidator() *ChangesValidator
func (*ChangesValidator) SetMode ¶
func (c *ChangesValidator) SetMode(tokenType, tokenIndex string) error
func (*ChangesValidator) Validate ¶
func (c *ChangesValidator) Validate(changes Changes) error
type Coin ¶
type Coin struct { Denom string `json:"token_id"` // To allow the use of unsigned integers (see: #1273) a larger refactor will // need to be made. So we use signed integers for now with safety measures in // place preventing negative values being used. Amount sdk.Int `json:"amount"` }
Coin hold some amount of one currency.
CONTRACT: A coin will never hold a negative amount of any denomination.
func NewCoin ¶
NewCoin returns a new coin with a denomination and amount. It will panic if the amount is negative.
func NewInt64Coin ¶
NewInt64Coin returns a new coin with a denomination and amount. It will panic if the amount is negative.
func ParseCoin ¶
ParseCoin parses a cli input for one coin type, returning errors if invalid. This returns an error on an empty string as well.
func (Coin) Add ¶
Adds amounts of two coins with same denom. If the coins differ in denom then it panics.
func (Coin) IsGTE ¶
IsGTE returns true if they are the same type and the receiver is an equal or greater value
func (Coin) IsNegative ¶
IsNegative returns true if the coin amount is negative and false otherwise.
func (Coin) IsPositive ¶
IsPositive returns true if coin amount is positive.
func (Coin) IsValid ¶
IsValid returns true if the Coin has a non-negative amount and the denom is vaild.
type Coins ¶
type Coins []Coin
Coins is a set of Coin, one per currency
func ParseCoins ¶
ParseCoins will parse out a list of coins separated by commas. If nothing is provided, it returns nil Coins. Returned coins are sorted.
func (Coins) Add ¶
Add adds two sets of coins.
e.g. {2A} + {A, 2B} = {3A, 2B} {2A} + {0B} = {2A}
NOTE: Add operates under the invariant that coins are sorted by denominations.
CONTRACT: Add will never return Coins where one Coin has a non-positive amount. In otherwords, IsValid will always return true.
func (Coins) DenomsSubsetOf ¶
DenomsSubsetOf returns true if receiver's denom set is subset of coinsB's denoms.
func (Coins) GetDenomByIndex ¶
GetDenomByIndex returns the Denom of the certain coin to make the findDup generic
func (Coins) IsAllGT ¶
IsAllGT returns true if for every denom in coinsB, the denom is present at a greater amount in coins.
func (Coins) IsAllGTE ¶
IsAllGTE returns false if for any denom in coinsB, the denom is present at a smaller amount in coins; else returns true.
func (Coins) IsAllLT ¶
IsAllLT returns True iff for every denom in coins, the denom is present at a smaller amount in coinsB.
func (Coins) IsAllLTE ¶
IsAllLTE returns true iff for every denom in coins, the denom is present at a smaller or equal amount in coinsB.
func (Coins) IsAllPositive ¶
IsAllPositive returns true if there is at least one coin and all currencies have a positive value.
func (Coins) IsAnyGT ¶
IsAnyGT returns true iff for any denom in coins, the denom is present at a greater amount in coinsB.
e.g. {2A, 3B}.IsAnyGT{A} = true {2A, 3B}.IsAnyGT{5C} = false {}.IsAnyGT{5C} = false {2A, 3B}.IsAnyGT{} = false
func (Coins) IsAnyGTE ¶
IsAnyGTE returns true iff coins contains at least one denom that is present at a greater or equal amount in coinsB; it returns false otherwise.
NOTE: IsAnyGTE operates under the invariant that both coin sets are sorted by denominations and there exists no zero coins.
func (Coins) IsAnyNegative ¶
IsAnyNegative returns true if there is at least one coin whose amount is negative; returns false otherwise. It returns false if the coin set is empty too.
func (Coins) IsValid ¶
IsValid asserts the Coins are sorted, have positive amount, and Denom does not contain upper case characters.
func (Coins) MarshalJSON ¶
MarshalJSON implements a custom JSON marshaller for the Coins type to allow nil Coins to be encoded as an empty array.
func (Coins) SafeSub ¶
SafeSub performs the same arithmetic as Sub but returns a boolean if any negative coin amount was returned.
type Collection ¶
type Collection interface { GetContractID() string GetName() string SetName(name string) GetBaseImgURI() string SetBaseImgURI(baseImgURI string) GetMeta() string SetMeta(meta string) String() string }
func NewCollection ¶
func NewCollection(contractID, name, meta, baseImgURI string) Collection
type CollectionParam ¶
type CollectionParam struct {
ContractID string `json:"contract_id"`
}
type Collections ¶
type Collections []Collection
func (Collections) String ¶
func (collections Collections) String() string
type IsApprovedParam ¶
type IsApprovedParam struct { ContractID string `json:"contract_id"` Proxy sdk.AccAddress `json:"proxy"` Approver sdk.AccAddress `json:"approver"` }
type MintNFTParam ¶
type MintNFTParam struct { Name string `json:"name"` Meta string `json:"meta"` TokenType string `json:"token_type"` }
func NewMintNFTParam ¶
func NewMintNFTParam(name, meta, tokenType string) MintNFTParam
type ModifiableFields ¶
type MsgApprove ¶
type MsgApprove struct { Approver sdk.AccAddress `json:"approver"` ContractID string `json:"contract_id"` Proxy sdk.AccAddress `json:"proxy"` }
func NewMsgApprove ¶
func NewMsgApprove(approver sdk.AccAddress, contractID string, proxy sdk.AccAddress) MsgApprove
func (MsgApprove) GetContractID ¶
func (msg MsgApprove) GetContractID() string
func (MsgApprove) GetSignBytes ¶
func (msg MsgApprove) GetSignBytes() []byte
func (MsgApprove) GetSigners ¶
func (msg MsgApprove) GetSigners() []sdk.AccAddress
func (MsgApprove) Route ¶
func (MsgApprove) Route() string
func (MsgApprove) Type ¶
func (MsgApprove) Type() string
func (MsgApprove) ValidateBasic ¶
func (msg MsgApprove) ValidateBasic() error
type MsgAttach ¶
type MsgAttach struct { From sdk.AccAddress `json:"from"` ContractID string `json:"contract_id"` ToTokenID string `json:"to_token_id"` TokenID string `json:"token_id"` }
func NewMsgAttach ¶
func (MsgAttach) GetContractID ¶
func (MsgAttach) GetSignBytes ¶
func (MsgAttach) GetSigners ¶
func (msg MsgAttach) GetSigners() []sdk.AccAddress
func (MsgAttach) MarshalJSON ¶
func (*MsgAttach) UnmarshalJSON ¶
func (MsgAttach) ValidateBasic ¶
type MsgAttachFrom ¶
type MsgAttachFrom struct { Proxy sdk.AccAddress `json:"proxy"` ContractID string `json:"contract_id"` From sdk.AccAddress `json:"from"` ToTokenID string `json:"to_token_id"` TokenID string `json:"token_id"` }
func NewMsgAttachFrom ¶
func NewMsgAttachFrom(proxy sdk.AccAddress, contractID string, from sdk.AccAddress, toTokenID string, tokenID string) MsgAttachFrom
func (MsgAttachFrom) GetContractID ¶
func (msg MsgAttachFrom) GetContractID() string
func (MsgAttachFrom) GetSignBytes ¶
func (msg MsgAttachFrom) GetSignBytes() []byte
func (MsgAttachFrom) GetSigners ¶
func (msg MsgAttachFrom) GetSigners() []sdk.AccAddress
func (MsgAttachFrom) MarshalJSON ¶
func (msg MsgAttachFrom) MarshalJSON() ([]byte, error)
func (MsgAttachFrom) Route ¶
func (MsgAttachFrom) Route() string
func (MsgAttachFrom) Type ¶
func (MsgAttachFrom) Type() string
func (*MsgAttachFrom) UnmarshalJSON ¶
func (msg *MsgAttachFrom) UnmarshalJSON(data []byte) error
func (MsgAttachFrom) ValidateBasic ¶
func (msg MsgAttachFrom) ValidateBasic() error
type MsgBurnFT ¶
type MsgBurnFT struct { From sdk.AccAddress `json:"from"` ContractID string `json:"contract_id"` Amount Coins `json:"amount"` }
func NewMsgBurnFT ¶
func NewMsgBurnFT(from sdk.AccAddress, contractID string, amount ...Coin) MsgBurnFT
func (MsgBurnFT) GetContractID ¶
func (MsgBurnFT) GetSignBytes ¶
func (MsgBurnFT) GetSigners ¶
func (msg MsgBurnFT) GetSigners() []sdk.AccAddress
func (MsgBurnFT) ValidateBasic ¶
type MsgBurnFTFrom ¶
type MsgBurnFTFrom struct { Proxy sdk.AccAddress `json:"proxy"` ContractID string `json:"contract_id"` From sdk.AccAddress `json:"from"` Amount Coins `json:"amount"` }
func NewMsgBurnFTFrom ¶
func NewMsgBurnFTFrom(proxy sdk.AccAddress, contractID string, from sdk.AccAddress, amount ...Coin) MsgBurnFTFrom
func (MsgBurnFTFrom) GetContractID ¶
func (msg MsgBurnFTFrom) GetContractID() string
func (MsgBurnFTFrom) GetSignBytes ¶
func (msg MsgBurnFTFrom) GetSignBytes() []byte
func (MsgBurnFTFrom) GetSigners ¶
func (msg MsgBurnFTFrom) GetSigners() []sdk.AccAddress
func (MsgBurnFTFrom) Route ¶
func (MsgBurnFTFrom) Route() string
func (MsgBurnFTFrom) Type ¶
func (MsgBurnFTFrom) Type() string
func (MsgBurnFTFrom) ValidateBasic ¶
func (msg MsgBurnFTFrom) ValidateBasic() error
type MsgBurnNFT ¶
type MsgBurnNFT struct { From sdk.AccAddress `json:"from"` ContractID string `json:"contract_id"` TokenIDs []string `json:"token_ids"` }
func NewMsgBurnNFT ¶
func NewMsgBurnNFT(from sdk.AccAddress, contractID string, tokenIDs ...string) MsgBurnNFT
func (MsgBurnNFT) GetContractID ¶
func (msg MsgBurnNFT) GetContractID() string
func (MsgBurnNFT) GetSignBytes ¶
func (msg MsgBurnNFT) GetSignBytes() []byte
func (MsgBurnNFT) GetSigners ¶
func (msg MsgBurnNFT) GetSigners() []sdk.AccAddress
func (MsgBurnNFT) Route ¶
func (msg MsgBurnNFT) Route() string
func (MsgBurnNFT) Type ¶
func (msg MsgBurnNFT) Type() string
func (MsgBurnNFT) ValidateBasic ¶
func (msg MsgBurnNFT) ValidateBasic() error
type MsgBurnNFTFrom ¶
type MsgBurnNFTFrom struct { Proxy sdk.AccAddress `json:"proxy"` ContractID string `json:"contract_id"` From sdk.AccAddress `json:"from"` TokenIDs []string `json:"token_ids"` }
func NewMsgBurnNFTFrom ¶
func NewMsgBurnNFTFrom(proxy sdk.AccAddress, contractID string, from sdk.AccAddress, tokenIDs ...string) MsgBurnNFTFrom
func (MsgBurnNFTFrom) GetContractID ¶
func (msg MsgBurnNFTFrom) GetContractID() string
func (MsgBurnNFTFrom) GetSignBytes ¶
func (msg MsgBurnNFTFrom) GetSignBytes() []byte
func (MsgBurnNFTFrom) GetSigners ¶
func (msg MsgBurnNFTFrom) GetSigners() []sdk.AccAddress
func (MsgBurnNFTFrom) Route ¶
func (msg MsgBurnNFTFrom) Route() string
func (MsgBurnNFTFrom) Type ¶
func (msg MsgBurnNFTFrom) Type() string
func (MsgBurnNFTFrom) ValidateBasic ¶
func (msg MsgBurnNFTFrom) ValidateBasic() error
type MsgCreateCollection ¶
type MsgCreateCollection struct { Owner sdk.AccAddress `json:"owner"` Name string `json:"name"` Meta string `json:"meta"` BaseImgURI string `json:"base_img_uri"` }
func NewMsgCreateCollection ¶
func NewMsgCreateCollection(owner sdk.AccAddress, name, meta, baseImgURI string) MsgCreateCollection
func (MsgCreateCollection) GetSignBytes ¶
func (msg MsgCreateCollection) GetSignBytes() []byte
func (MsgCreateCollection) GetSigners ¶
func (msg MsgCreateCollection) GetSigners() []sdk.AccAddress
func (MsgCreateCollection) Route ¶
func (MsgCreateCollection) Route() string
func (MsgCreateCollection) Type ¶
func (MsgCreateCollection) Type() string
func (MsgCreateCollection) ValidateBasic ¶
func (msg MsgCreateCollection) ValidateBasic() error
type MsgDetach ¶
type MsgDetach struct { From sdk.AccAddress `json:"from"` ContractID string `json:"contract_id"` TokenID string `json:"token_id"` }
func NewMsgDetach ¶
func NewMsgDetach(from sdk.AccAddress, contractID string, tokenID string) MsgDetach
func (MsgDetach) GetContractID ¶
func (MsgDetach) GetSignBytes ¶
func (MsgDetach) GetSigners ¶
func (msg MsgDetach) GetSigners() []sdk.AccAddress
func (MsgDetach) MarshalJSON ¶
func (*MsgDetach) UnmarshalJSON ¶
func (MsgDetach) ValidateBasic ¶
type MsgDetachFrom ¶
type MsgDetachFrom struct { Proxy sdk.AccAddress `json:"proxy"` ContractID string `json:"contract_id"` From sdk.AccAddress `json:"from"` TokenID string `json:"token_id"` }
func NewMsgDetachFrom ¶
func NewMsgDetachFrom(proxy sdk.AccAddress, contractID string, from sdk.AccAddress, tokenID string) MsgDetachFrom
func (MsgDetachFrom) GetContractID ¶
func (msg MsgDetachFrom) GetContractID() string
func (MsgDetachFrom) GetSignBytes ¶
func (msg MsgDetachFrom) GetSignBytes() []byte
func (MsgDetachFrom) GetSigners ¶
func (msg MsgDetachFrom) GetSigners() []sdk.AccAddress
func (MsgDetachFrom) MarshalJSON ¶
func (msg MsgDetachFrom) MarshalJSON() ([]byte, error)
func (MsgDetachFrom) Route ¶
func (MsgDetachFrom) Route() string
func (MsgDetachFrom) Type ¶
func (MsgDetachFrom) Type() string
func (*MsgDetachFrom) UnmarshalJSON ¶
func (msg *MsgDetachFrom) UnmarshalJSON(data []byte) error
func (MsgDetachFrom) ValidateBasic ¶
func (msg MsgDetachFrom) ValidateBasic() error
type MsgDisapprove ¶
type MsgDisapprove struct { Approver sdk.AccAddress `json:"approver"` ContractID string `json:"contract_id"` Proxy sdk.AccAddress `json:"proxy"` }
func NewMsgDisapprove ¶
func NewMsgDisapprove(approver sdk.AccAddress, contractID string, proxy sdk.AccAddress) MsgDisapprove
func (MsgDisapprove) GetContractID ¶
func (msg MsgDisapprove) GetContractID() string
func (MsgDisapprove) GetSignBytes ¶
func (msg MsgDisapprove) GetSignBytes() []byte
func (MsgDisapprove) GetSigners ¶
func (msg MsgDisapprove) GetSigners() []sdk.AccAddress
func (MsgDisapprove) Route ¶
func (MsgDisapprove) Route() string
func (MsgDisapprove) Type ¶
func (MsgDisapprove) Type() string
func (MsgDisapprove) ValidateBasic ¶
func (msg MsgDisapprove) ValidateBasic() error
type MsgGrantPermission ¶
type MsgGrantPermission struct { From sdk.AccAddress `json:"from"` ContractID string `json:"contract_id"` To sdk.AccAddress `json:"to"` Permission Permission `json:"permission"` }
func NewMsgGrantPermission ¶
func NewMsgGrantPermission(from sdk.AccAddress, contractID string, to sdk.AccAddress, perm Permission) MsgGrantPermission
func (MsgGrantPermission) GetContractID ¶
func (msg MsgGrantPermission) GetContractID() string
func (MsgGrantPermission) GetSignBytes ¶
func (msg MsgGrantPermission) GetSignBytes() []byte
func (MsgGrantPermission) GetSigners ¶
func (msg MsgGrantPermission) GetSigners() []sdk.AccAddress
func (MsgGrantPermission) Route ¶
func (MsgGrantPermission) Route() string
func (MsgGrantPermission) Type ¶
func (MsgGrantPermission) Type() string
func (MsgGrantPermission) ValidateBasic ¶
func (msg MsgGrantPermission) ValidateBasic() error
type MsgIssueFT ¶
type MsgIssueFT struct { Owner sdk.AccAddress `json:"owner"` ContractID string `json:"contract_id"` To sdk.AccAddress `json:"to"` Name string `json:"name"` Meta string `json:"meta"` Amount sdk.Int `json:"amount"` Mintable bool `json:"mintable"` Decimals sdk.Int `json:"decimals"` }
func NewMsgIssueFT ¶
func NewMsgIssueFT(owner, to sdk.AccAddress, contractID string, name, meta string, amount sdk.Int, decimal sdk.Int, mintable bool) MsgIssueFT
func (MsgIssueFT) GetContractID ¶
func (msg MsgIssueFT) GetContractID() string
func (MsgIssueFT) GetSignBytes ¶
func (msg MsgIssueFT) GetSignBytes() []byte
func (MsgIssueFT) GetSigners ¶
func (msg MsgIssueFT) GetSigners() []sdk.AccAddress
func (MsgIssueFT) Route ¶
func (msg MsgIssueFT) Route() string
func (MsgIssueFT) Type ¶
func (msg MsgIssueFT) Type() string
func (MsgIssueFT) ValidateBasic ¶
func (msg MsgIssueFT) ValidateBasic() error
type MsgIssueNFT ¶
type MsgIssueNFT struct { Owner sdk.AccAddress `json:"owner"` ContractID string `json:"contract_id"` Name string `json:"name"` Meta string `json:"meta"` }
func NewMsgIssueNFT ¶
func NewMsgIssueNFT(owner sdk.AccAddress, contractID, name, meta string) MsgIssueNFT
func (MsgIssueNFT) GetContractID ¶
func (msg MsgIssueNFT) GetContractID() string
func (MsgIssueNFT) GetSignBytes ¶
func (msg MsgIssueNFT) GetSignBytes() []byte
func (MsgIssueNFT) GetSigners ¶
func (msg MsgIssueNFT) GetSigners() []sdk.AccAddress
func (MsgIssueNFT) Route ¶
func (MsgIssueNFT) Route() string
func (MsgIssueNFT) Type ¶
func (MsgIssueNFT) Type() string
func (MsgIssueNFT) ValidateBasic ¶
func (msg MsgIssueNFT) ValidateBasic() error
type MsgMintFT ¶
type MsgMintFT struct { From sdk.AccAddress `json:"from"` ContractID string `json:"contract_id"` To sdk.AccAddress `json:"to"` Amount Coins `json:"amount"` }
func NewMsgMintFT ¶
func NewMsgMintFT(from sdk.AccAddress, contractID string, to sdk.AccAddress, amount ...Coin) MsgMintFT
func (MsgMintFT) GetContractID ¶
func (MsgMintFT) GetSignBytes ¶
func (MsgMintFT) GetSigners ¶
func (msg MsgMintFT) GetSigners() []sdk.AccAddress
func (MsgMintFT) ValidateBasic ¶
type MsgMintNFT ¶
type MsgMintNFT struct { From sdk.AccAddress `json:"from"` ContractID string `json:"contract_id"` To sdk.AccAddress `json:"to"` MintNFTParams []MintNFTParam `json:"params"` }
func NewMsgMintNFT ¶
func NewMsgMintNFT(from sdk.AccAddress, contractID string, to sdk.AccAddress, mintNFTParams ...MintNFTParam) MsgMintNFT
func (MsgMintNFT) GetContractID ¶
func (msg MsgMintNFT) GetContractID() string
func (MsgMintNFT) GetSignBytes ¶
func (msg MsgMintNFT) GetSignBytes() []byte
func (MsgMintNFT) GetSigners ¶
func (msg MsgMintNFT) GetSigners() []sdk.AccAddress
func (MsgMintNFT) Route ¶
func (msg MsgMintNFT) Route() string
func (MsgMintNFT) Type ¶
func (msg MsgMintNFT) Type() string
func (MsgMintNFT) ValidateBasic ¶
func (msg MsgMintNFT) ValidateBasic() error
type MsgModify ¶
type MsgModify struct { Owner sdk.AccAddress `json:"owner"` ContractID string `json:"contract_id"` TokenType string `json:"token_type"` TokenIndex string `json:"token_index"` Changes Changes `json:"changes"` }
func NewMsgModify ¶
func NewMsgModify(owner sdk.AccAddress, contractID, tokenType, tokenIndex string, changes Changes) MsgModify
func (MsgModify) GetContractID ¶
func (MsgModify) GetSignBytes ¶
func (MsgModify) GetSigners ¶
func (msg MsgModify) GetSigners() []sdk.AccAddress
func (MsgModify) ValidateBasic ¶
type MsgRevokePermission ¶
type MsgRevokePermission struct { From sdk.AccAddress `json:"from"` ContractID string `json:"contract_id"` Permission Permission `json:"permission"` }
func NewMsgRevokePermission ¶
func NewMsgRevokePermission(from sdk.AccAddress, contractID string, perm Permission) MsgRevokePermission
func (MsgRevokePermission) GetContractID ¶
func (msg MsgRevokePermission) GetContractID() string
func (MsgRevokePermission) GetSignBytes ¶
func (msg MsgRevokePermission) GetSignBytes() []byte
func (MsgRevokePermission) GetSigners ¶
func (msg MsgRevokePermission) GetSigners() []sdk.AccAddress
func (MsgRevokePermission) Route ¶
func (MsgRevokePermission) Route() string
func (MsgRevokePermission) Type ¶
func (MsgRevokePermission) Type() string
func (MsgRevokePermission) ValidateBasic ¶
func (msg MsgRevokePermission) ValidateBasic() error
type MsgTransferFT ¶
type MsgTransferFT struct { From sdk.AccAddress `json:"from"` ContractID string `json:"contract_id"` To sdk.AccAddress `json:"to"` Amount Coins `json:"amount"` }
func NewMsgTransferFT ¶
func NewMsgTransferFT(from sdk.AccAddress, contractID string, to sdk.AccAddress, amount ...Coin) MsgTransferFT
func (MsgTransferFT) GetContractID ¶
func (msg MsgTransferFT) GetContractID() string
func (MsgTransferFT) GetSignBytes ¶
func (msg MsgTransferFT) GetSignBytes() []byte
func (MsgTransferFT) GetSigners ¶
func (msg MsgTransferFT) GetSigners() []sdk.AccAddress
func (MsgTransferFT) MarshalJSON ¶
func (msg MsgTransferFT) MarshalJSON() ([]byte, error)
func (MsgTransferFT) Route ¶
func (MsgTransferFT) Route() string
func (MsgTransferFT) Type ¶
func (MsgTransferFT) Type() string
func (*MsgTransferFT) UnmarshalJSON ¶
func (msg *MsgTransferFT) UnmarshalJSON(data []byte) error
func (MsgTransferFT) ValidateBasic ¶
func (msg MsgTransferFT) ValidateBasic() error
type MsgTransferFTFrom ¶
type MsgTransferFTFrom struct { Proxy sdk.AccAddress `json:"proxy"` ContractID string `json:"contract_id"` From sdk.AccAddress `json:"from"` To sdk.AccAddress `json:"to"` Amount Coins `json:"amount"` }
func NewMsgTransferFTFrom ¶
func NewMsgTransferFTFrom(proxy sdk.AccAddress, contractID string, from sdk.AccAddress, to sdk.AccAddress, amount ...Coin) MsgTransferFTFrom
func (MsgTransferFTFrom) GetContractID ¶
func (msg MsgTransferFTFrom) GetContractID() string
func (MsgTransferFTFrom) GetSignBytes ¶
func (msg MsgTransferFTFrom) GetSignBytes() []byte
func (MsgTransferFTFrom) GetSigners ¶
func (msg MsgTransferFTFrom) GetSigners() []sdk.AccAddress
func (MsgTransferFTFrom) MarshalJSON ¶
func (msg MsgTransferFTFrom) MarshalJSON() ([]byte, error)
func (MsgTransferFTFrom) Route ¶
func (MsgTransferFTFrom) Route() string
func (MsgTransferFTFrom) Type ¶
func (MsgTransferFTFrom) Type() string
func (*MsgTransferFTFrom) UnmarshalJSON ¶
func (msg *MsgTransferFTFrom) UnmarshalJSON(data []byte) error
func (MsgTransferFTFrom) ValidateBasic ¶
func (msg MsgTransferFTFrom) ValidateBasic() error
type MsgTransferNFT ¶
type MsgTransferNFT struct { From sdk.AccAddress `json:"from"` ContractID string `json:"contract_id"` To sdk.AccAddress `json:"to"` TokenIDs []string `json:"token_ids"` }
func NewMsgTransferNFT ¶
func NewMsgTransferNFT(from sdk.AccAddress, contractID string, to sdk.AccAddress, tokenIDs ...string) MsgTransferNFT
func (MsgTransferNFT) GetContractID ¶
func (msg MsgTransferNFT) GetContractID() string
func (MsgTransferNFT) GetSignBytes ¶
func (msg MsgTransferNFT) GetSignBytes() []byte
func (MsgTransferNFT) GetSigners ¶
func (msg MsgTransferNFT) GetSigners() []sdk.AccAddress
func (MsgTransferNFT) MarshalJSON ¶
func (msg MsgTransferNFT) MarshalJSON() ([]byte, error)
func (MsgTransferNFT) Route ¶
func (MsgTransferNFT) Route() string
func (MsgTransferNFT) Type ¶
func (MsgTransferNFT) Type() string
func (*MsgTransferNFT) UnmarshalJSON ¶
func (msg *MsgTransferNFT) UnmarshalJSON(data []byte) error
func (MsgTransferNFT) ValidateBasic ¶
func (msg MsgTransferNFT) ValidateBasic() error
type MsgTransferNFTFrom ¶
type MsgTransferNFTFrom struct { Proxy sdk.AccAddress `json:"proxy"` ContractID string `json:"contract_id"` From sdk.AccAddress `json:"from"` To sdk.AccAddress `json:"to"` TokenIDs []string `json:"token_ids"` }
func NewMsgTransferNFTFrom ¶
func NewMsgTransferNFTFrom(proxy sdk.AccAddress, contractID string, from sdk.AccAddress, to sdk.AccAddress, tokenIDs ...string) MsgTransferNFTFrom
func (MsgTransferNFTFrom) GetContractID ¶
func (msg MsgTransferNFTFrom) GetContractID() string
func (MsgTransferNFTFrom) GetSignBytes ¶
func (msg MsgTransferNFTFrom) GetSignBytes() []byte
func (MsgTransferNFTFrom) GetSigners ¶
func (msg MsgTransferNFTFrom) GetSigners() []sdk.AccAddress
func (MsgTransferNFTFrom) MarshalJSON ¶
func (msg MsgTransferNFTFrom) MarshalJSON() ([]byte, error)
func (MsgTransferNFTFrom) Route ¶
func (MsgTransferNFTFrom) Route() string
func (MsgTransferNFTFrom) Type ¶
func (MsgTransferNFTFrom) Type() string
func (*MsgTransferNFTFrom) UnmarshalJSON ¶
func (msg *MsgTransferNFTFrom) UnmarshalJSON(data []byte) error
func (MsgTransferNFTFrom) ValidateBasic ¶
func (msg MsgTransferNFTFrom) ValidateBasic() error
type NFT ¶
type NFT interface { Token GetOwner() sdk.AccAddress SetOwner(sdk.AccAddress) }
type NodeQuerier ¶
type Params ¶
type Params struct { MaxComposableDepth uint64 `json:"max_composable_depth" yaml:"max_composable_depth"` MaxComposableWidth uint64 `json:"max_composable_width" yaml:"max_composable_width"` }
func DefaultParams ¶
func DefaultParams() Params
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() subspace.ParamSetPairs
type PermParam ¶
type PermParam struct { ContractID string `json:"contract_id"` Address sdk.AccAddress `json:"address"` }
type Permission ¶
type Permission string
func NewBurnPermission ¶
func NewBurnPermission() Permission
func NewIssuePermission ¶
func NewIssuePermission() Permission
func NewMintPermission ¶
func NewMintPermission() Permission
func NewModifyPermission ¶
func NewModifyPermission() Permission
func (Permission) Equal ¶
func (p Permission) Equal(p2 Permission) bool
func (Permission) String ¶
func (p Permission) String() string
func (Permission) Validate ¶
func (p Permission) Validate() bool
type Permissions ¶
type Permissions []Permission
func NewPermissions ¶
func NewPermissions(perms ...Permission) Permissions
func (*Permissions) AddPermission ¶
func (pms *Permissions) AddPermission(p Permission)
func (*Permissions) GetPermissions ¶
func (pms *Permissions) GetPermissions() []Permission
func (Permissions) HasPermission ¶
func (pms Permissions) HasPermission(p Permission) bool
func (*Permissions) RemoveElement ¶
func (pms *Permissions) RemoveElement(idx int)
func (*Permissions) RemovePermission ¶
func (pms *Permissions) RemovePermission(p Permission)
func (Permissions) String ¶
func (pms Permissions) String() string
type QueryAccAddressParams ¶
type QueryAccAddressParams struct {
Addr sdk.AccAddress `json:"addr"`
}
func NewQueryAccAddressParams ¶
func NewQueryAccAddressParams(addr sdk.AccAddress) QueryAccAddressParams
type QueryApprovedWrapper ¶
type QueryApprovedWrapper struct {
IsApprovedParam IsApprovedParam `json:"is_approved_param"`
}
type QueryApproversWrapper ¶
type QueryApproversWrapper struct {
ApproversParam ApproversParam `json:"approvers_param"`
}
type QueryBalanceWrapper ¶
type QueryBalanceWrapper struct {
BalanceParam BalanceParam `json:"balance_param"`
}
type QueryCollectionWrapper ¶
type QueryCollectionWrapper struct {
CollectionParam CollectionParam `json:"collection_param"`
}
type QueryIsApprovedParams ¶
type QueryIsApprovedParams struct { Proxy sdk.AccAddress `json:"proxy"` Approver sdk.AccAddress `json:"approver"` }
func NewQueryIsApprovedParams ¶
func NewQueryIsApprovedParams(proxy sdk.AccAddress, approver sdk.AccAddress) QueryIsApprovedParams
type QueryNFTCountWrapper ¶
type QueryNFTCountWrapper struct {
TokensParam TokensParam `json:"tokens_param"`
}
type QueryPermsWrapper ¶
type QueryPermsWrapper struct {
PermParam PermParam `json:"perm_param"`
}
type QueryProxyParams ¶
type QueryProxyParams struct {
Proxy sdk.AccAddress `json:"proxy"`
}
func NewQueryApproverParams ¶
func NewQueryApproverParams(proxy sdk.AccAddress) QueryProxyParams
type QueryTokenIDAccAddressParams ¶
type QueryTokenIDAccAddressParams struct { TokenID string `json:"token_id"` Addr sdk.AccAddress `json:"addr"` }
func NewQueryTokenIDAccAddressParams ¶
func NewQueryTokenIDAccAddressParams(tokenID string, addr sdk.AccAddress) QueryTokenIDAccAddressParams
type QueryTokenIDParams ¶
type QueryTokenIDParams struct {
TokenID string `json:"token_id"`
}
func NewQueryTokenIDParams ¶
func NewQueryTokenIDParams(tokenID string) QueryTokenIDParams
type QueryTokenTypeParams ¶
type QueryTokenTypeParams struct {
TokenType string `json:"token_type"`
}
func NewQueryTokenTypeParams ¶
func NewQueryTokenTypeParams(tokenType string) QueryTokenTypeParams
type QueryTokenTypeWrapper ¶
type QueryTokenTypeWrapper struct {
TokenTypeParam TokenTypeParam `json:"token_type_param"`
}
type QueryTokenTypesWrapper ¶
type QueryTokenTypesWrapper struct {
TokenTypesParam TokenTypesParam `json:"tokentypes_param"`
}
type QueryTokensWrapper ¶
type QueryTokensWrapper struct {
TokensParam TokensParam `json:"tokens_param"`
}
type QueryTotalWrapper ¶
type QueryTotalWrapper struct {
TotalParam TotalParam `json:"total_param"`
}
type Supply ¶
type Supply interface { GetContractID() string GetTotalSupply() Coins SetTotalSupply(total Coins) Supply GetTotalMint() Coins GetTotalBurn() Coins Inflate(amount Coins) Supply Deflate(amount Coins) Supply String() string ValidateBasic() error }
func DefaultSupply ¶
type TokenType ¶
type TokenType interface { GetName() string SetName(string) GetMeta() string SetMeta(string) GetContractID() string GetTokenType() string String() string }
func NewBaseTokenType ¶
type TokenTypeParam ¶
type TokenTypes ¶
type TokenTypes []TokenType
func (TokenTypes) String ¶
func (ts TokenTypes) String() string
type TokenTypesParam ¶
type TokensParam ¶
type TotalParam ¶
type WasmCustomMsg ¶
type WasmCustomMsg struct { Route string `json:"route"` Data json.RawMessage `json:"data"` }
type WasmCustomQuerier ¶
type WasmCustomQuerier struct { Route string `json:"route"` Data json.RawMessage `json:"data"` }
Source Files
¶
- account.go
- codec.go
- coin.go
- collection.go
- encoder.go
- errors.go
- events.go
- expected_keeper.go
- key.go
- modify.go
- msgs_collection.go
- msgs_compossible.go
- msgs_issue.go
- msgs_mint.go
- msgs_modify.go
- msgs_perm.go
- msgs_proxy.go
- msgs_transfer.go
- params.go
- perm.go
- querier.go
- supply.go
- symbol.go
- token.go
- token_type.go
- validators.go