Versions in this module Expand all Collapse all v1 v1.1.0 May 18, 2020 Changes in this version + const AttributeKeyAmount + const AttributeKeySymbol + const AttributeValueCategory + const DefaultParamspace + const DoNotModify + const EventTypeEditToken + const EventTypeIssueToken + const EventTypeMintToken + const EventTypeTransferTokenOwner + const MaximumInitSupply + const MaximumMaxSupply + const MaximumMinUnitLen + const MaximumNameLen + const MaximumScale + const MaximumSymbolLen + const MinimumMinUnitLen + const MinimumSymbolLen + const ModuleName + const MsgRoute + const QuerierRoute + const QueryFees + const QueryParams + const QueryToken + const QueryTokens + const RouterKey + const StoreKey + const TypeMsgEditToken + const TypeMsgIssueToken + const TypeMsgMintToken + const TypeMsgTransferTokenOwner + var ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + var ErrInvalidAddress = sdkerrors.Register(ModuleName, 12, "the owner of the token must be specified") + var ErrInvalidInitSupply = sdkerrors.Register(ModuleName, 6, "invalid token initial supply") + var ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidMaxSupply = sdkerrors.Register(ModuleName, 7, "invalid token max supply") + var ErrInvalidMinUnit = sdkerrors.Register(ModuleName, 4, "invalid token min_unit") + var ErrInvalidName = sdkerrors.Register(ModuleName, 3, "invalid token name") + var ErrInvalidOwner = sdkerrors.Register(ModuleName, 14, "invalid token owner") + var ErrInvalidScale = sdkerrors.Register(ModuleName, 8, "invalid token scale") + var ErrInvalidSymbol = sdkerrors.Register(ModuleName, 5, "must be standard denom") + var ErrInvalidToAddress = sdkerrors.Register(ModuleName, 13, "the new owner must not be same as the original owner") + var ErrMinUnitAlreadyExists = sdkerrors.Register(ModuleName, 10, "min_unit has existed") + var ErrNilOwner = sdkerrors.Register(ModuleName, 2, "the owner of the token must be specified") + var ErrNotMintable = sdkerrors.Register(ModuleName, 15, "the token is set to be non-mintable") + var ErrSymbolAlreadyExists = sdkerrors.Register(ModuleName, 9, "symbol has existed") + var ErrTokenNotExists = sdkerrors.Register(ModuleName, 11, "token does not exist") + var ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") + var IsAlphaNumeric = regexp.MustCompile(`^[a-zA-Z0-9]+$`).MatchString + var IsBeginWithAlpha = regexp.MustCompile(`^[a-zA-Z].*`).MatchString + var KeyIssueTokenBaseFee = []byte("IssueTokenBaseFee") + var KeyMintTokenFeeRatio = []byte("MintTokenFeeRatio") + var KeyTokenTaxRate = []byte("TokenTaxRate") + var ModuleCdc = codec.NewHybridCodec(amino, types.NewInterfaceRegistry()) + var PrefixTokenForMinUint = []byte + var PrefixTokenForSymbol = []byte + var PrefixTokens = []byte + func CheckSymbol(symbol string) error + func KeyMinUint(minUnit string) []byte + func KeySymbol(symbol string) []byte + func KeyTokens(owner sdk.AccAddress, symbol string) []byte + func ParamKeyTable() paramtypes.KeyTable + func RegisterCodec(cdc *codec.Codec) + func SetNativeToken(symbol, name, minUnit string, decimal uint32, initialSupply, maxSupply uint64, ...) + func ValidateParams(p Params) error + func ValidateToken(token Token) error + type AccountKeeper interface + GetAccount func(ctx sdk.Context, addr sdk.AccAddress) auth.Account + GetModuleAccount func(ctx sdk.Context, name string) auth.ModuleAccountI + GetModuleAddress func(name string) sdk.AccAddress + type BankKeeper interface + BurnCoins func(ctx sdk.Context, moduleName string, amt sdk.Coins) error + GetBalance func(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin + GetSupply func(ctx sdk.Context) (supply bank.SupplyI) + MintCoins func(ctx sdk.Context, moduleName string, amt sdk.Coins) error + SendCoinsFromAccountToModule func(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, ...) error + SendCoinsFromModuleToAccount func(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, ...) error + SendCoinsFromModuleToModule func(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error + SpendableCoins func(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + type Bool string + const False + const Nil + const True + func ParseBool(v string) (Bool, error) + func (b *Bool) Unmarshal(data []byte) error + func (b *Bool) UnmarshalJSON(data []byte) error + func (b Bool) Marshal() ([]byte, error) + func (b Bool) MarshalJSON() ([]byte, error) + func (b Bool) String() string + func (b Bool) ToBool() bool + type Codec interface + MarshalSupply func(supply exported.TokenI) ([]byte, error) + MarshalSupplyJSON func(supply exported.TokenI) ([]byte, error) + UnmarshalSupply func(bz []byte) (exported.TokenI, error) + UnmarshalSupplyJSON func(bz []byte) (exported.TokenI, error) + type GenesisState struct + Params Params + Tokens Tokens + func NewGenesisState(params Params, tokens Tokens) GenesisState + type MsgEditToken struct + MaxSupply uint64 + Mintable Bool + Name string + Owner github_com_cosmos_cosmos_sdk_types.AccAddress + Symbol string + func NewMsgEditToken(name, symbol string, maxSupply uint64, mintable Bool, owner sdk.AccAddress) MsgEditToken + func (*MsgEditToken) Descriptor() ([]byte, []int) + func (*MsgEditToken) ProtoMessage() + func (m *MsgEditToken) Marshal() (dAtA []byte, err error) + func (m *MsgEditToken) MarshalTo(dAtA []byte) (int, error) + func (m *MsgEditToken) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *MsgEditToken) Reset() + func (m *MsgEditToken) Size() (n int) + func (m *MsgEditToken) String() string + func (m *MsgEditToken) Unmarshal(dAtA []byte) error + func (m *MsgEditToken) XXX_DiscardUnknown() + func (m *MsgEditToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *MsgEditToken) XXX_Merge(src proto.Message) + func (m *MsgEditToken) XXX_Size() int + func (m *MsgEditToken) XXX_Unmarshal(b []byte) error + func (msg MsgEditToken) GetSignBytes() []byte + func (msg MsgEditToken) GetSigners() []sdk.AccAddress + func (msg MsgEditToken) Route() string + func (msg MsgEditToken) Type() string + func (msg MsgEditToken) ValidateBasic() error + type MsgIssueToken struct + InitialSupply uint64 + MaxSupply uint64 + MinUnit string + Mintable bool + Name string + Owner github_com_cosmos_cosmos_sdk_types.AccAddress + Scale uint32 + Symbol string + func NewMsgIssueToken(symbol string, minUnit string, name string, scale uint32, ...) MsgIssueToken + func (*MsgIssueToken) Descriptor() ([]byte, []int) + func (*MsgIssueToken) ProtoMessage() + func (m *MsgIssueToken) Marshal() (dAtA []byte, err error) + func (m *MsgIssueToken) MarshalTo(dAtA []byte) (int, error) + func (m *MsgIssueToken) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *MsgIssueToken) Reset() + func (m *MsgIssueToken) Size() (n int) + func (m *MsgIssueToken) String() string + func (m *MsgIssueToken) Unmarshal(dAtA []byte) error + func (m *MsgIssueToken) XXX_DiscardUnknown() + func (m *MsgIssueToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *MsgIssueToken) XXX_Merge(src proto.Message) + func (m *MsgIssueToken) XXX_Size() int + func (m *MsgIssueToken) XXX_Unmarshal(b []byte) error + func (msg MsgIssueToken) GetSignBytes() []byte + func (msg MsgIssueToken) GetSigners() []sdk.AccAddress + func (msg MsgIssueToken) Route() string + func (msg MsgIssueToken) Type() string + func (msg MsgIssueToken) ValidateBasic() error + type MsgMintToken struct + Amount uint64 + Owner github_com_cosmos_cosmos_sdk_types.AccAddress + Symbol string + To github_com_cosmos_cosmos_sdk_types.AccAddress + func NewMsgMintToken(symbol string, owner, to sdk.AccAddress, amount uint64) MsgMintToken + func (*MsgMintToken) Descriptor() ([]byte, []int) + func (*MsgMintToken) ProtoMessage() + func (m *MsgMintToken) Marshal() (dAtA []byte, err error) + func (m *MsgMintToken) MarshalTo(dAtA []byte) (int, error) + func (m *MsgMintToken) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *MsgMintToken) Reset() + func (m *MsgMintToken) Size() (n int) + func (m *MsgMintToken) String() string + func (m *MsgMintToken) Unmarshal(dAtA []byte) error + func (m *MsgMintToken) XXX_DiscardUnknown() + func (m *MsgMintToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *MsgMintToken) XXX_Merge(src proto.Message) + func (m *MsgMintToken) XXX_Size() int + func (m *MsgMintToken) XXX_Unmarshal(b []byte) error + func (msg MsgMintToken) GetSignBytes() []byte + func (msg MsgMintToken) GetSigners() []sdk.AccAddress + func (msg MsgMintToken) Route() string + func (msg MsgMintToken) Type() string + func (msg MsgMintToken) ValidateBasic() error + type MsgTransferTokenOwner struct + DstOwner github_com_cosmos_cosmos_sdk_types.AccAddress + SrcOwner github_com_cosmos_cosmos_sdk_types.AccAddress + Symbol string + func NewMsgTransferTokenOwner(srcOwner, dstOwner sdk.AccAddress, symbol string) MsgTransferTokenOwner + func (*MsgTransferTokenOwner) Descriptor() ([]byte, []int) + func (*MsgTransferTokenOwner) ProtoMessage() + func (m *MsgTransferTokenOwner) Marshal() (dAtA []byte, err error) + func (m *MsgTransferTokenOwner) MarshalTo(dAtA []byte) (int, error) + func (m *MsgTransferTokenOwner) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *MsgTransferTokenOwner) Reset() + func (m *MsgTransferTokenOwner) Size() (n int) + func (m *MsgTransferTokenOwner) String() string + func (m *MsgTransferTokenOwner) Unmarshal(dAtA []byte) error + func (m *MsgTransferTokenOwner) XXX_DiscardUnknown() + func (m *MsgTransferTokenOwner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *MsgTransferTokenOwner) XXX_Merge(src proto.Message) + func (m *MsgTransferTokenOwner) XXX_Size() int + func (m *MsgTransferTokenOwner) XXX_Unmarshal(b []byte) error + func (msg MsgTransferTokenOwner) GetSignBytes() []byte + func (msg MsgTransferTokenOwner) GetSigners() []sdk.AccAddress + func (msg MsgTransferTokenOwner) Route() string + func (msg MsgTransferTokenOwner) Type() string + func (msg MsgTransferTokenOwner) ValidateBasic() error + type Params struct + IssueTokenBaseFee types.Coin + MintTokenFeeRatio github_com_cosmos_cosmos_sdk_types.Dec + TokenTaxRate github_com_cosmos_cosmos_sdk_types.Dec + func DefaultParams() Params + func NewParams(tokenTaxRate sdk.Dec, issueTokenBaseFee sdk.Coin, mintTokenFeeRatio sdk.Dec) Params + func (*Params) Descriptor() ([]byte, []int) + func (*Params) ProtoMessage() + func (m *Params) Marshal() (dAtA []byte, err error) + func (m *Params) MarshalTo(dAtA []byte) (int, error) + func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Params) Reset() + func (m *Params) Size() (n int) + func (m *Params) Unmarshal(dAtA []byte) error + func (m *Params) XXX_DiscardUnknown() + func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Params) XXX_Merge(src proto.Message) + func (m *Params) XXX_Size() int + func (m *Params) XXX_Unmarshal(b []byte) error + func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs + func (p Params) String() string + func (this *Params) Equal(that interface{}) bool + type QueryTokenFeesParams struct + Symbol string + type QueryTokenParams struct + Denom string + type QueryTokensParams struct + Owner sdk.AccAddress + type Token struct + InitialSupply uint64 + MaxSupply uint64 + MinUnit string + Mintable bool + Name string + Owner github_com_cosmos_cosmos_sdk_types.AccAddress + Scale uint32 + Symbol string + func GetNativeToken() Token + func NewToken(symbol, name, minUnit string, scale uint32, initialSupply, maxSupply uint64, ...) Token + func (*Token) Descriptor() ([]byte, []int) + func (*Token) ProtoMessage() + func (m *Token) Marshal() (dAtA []byte, err error) + func (m *Token) MarshalTo(dAtA []byte) (int, error) + func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Token) Reset() + func (m *Token) Size() (n int) + func (m *Token) String() string + func (m *Token) Unmarshal(dAtA []byte) error + func (m *Token) XXX_DiscardUnknown() + func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Token) XXX_Merge(src proto.Message) + func (m *Token) XXX_Size() int + func (m *Token) XXX_Unmarshal(b []byte) error + func (t Token) GetInitialSupply() uint64 + func (t Token) GetMaxSupply() uint64 + func (t Token) GetMinUnit() string + func (t Token) GetMintable() bool + func (t Token) GetName() string + func (t Token) GetOwner() sdk.AccAddress + func (t Token) GetScale() uint32 + func (t Token) GetSymbol() string + func (t Token) ToMainCoin(coin sdk.Coin) (sdk.DecCoin, error) + func (t Token) ToMinCoin(coin sdk.DecCoin) (newCoin sdk.Coin, err error) + func (this *Token) Equal(that interface{}) bool + type TokenFees struct + Exist bool + IssueFee sdk.Coin + MintFee sdk.Coin + func (tfo TokenFees) String() string + type Tokens []Token + func (tokens Tokens) String() string