Documentation ¶
Index ¶
- Constants
- Variables
- func ErrInvalidName(name string) sdk.Error
- func ErrInvalidSymbol(symbol string) sdk.Error
- func ErrInvalidTotalSupply(msg string) sdk.Error
- func ErrSymbolNotAllowed(symbol string) sdk.Error
- func ErrTokenExists(symbol Symbol) sdk.Error
- func ErrTokenNotExists(symbol Symbol) sdk.Error
- func RegisterCodec(cdc *codec.Codec)
- func ValidateGenesis(data GenesisState) error
- type BankKeeper
- type GenesisState
- type GenesisTokenKey
- type MsgIssueToken
- type Name
- type QueryTokenParams
- type ShortSymbol
- type Symbol
- type Token
- type Tokens
Constants ¶
View Source
const ( CodeInvalidName sdk.CodeType = 101 CodeInvalidSymbol sdk.CodeType = 102 CodeSymbolNotAllowed sdk.CodeType = 103 CodeInvalidTotalSupply sdk.CodeType = 104 CodeTokenExists sdk.CodeType = 105 CodeTokenNotExists sdk.CodeType = 106 )
View Source
const ( // module name ModuleName = "token" // StoreKey to be used when creating the KVStore StoreKey = ModuleName // RouterKey to be used in router RouterKey = ModuleName // QuerierRoute is the query router key QuerierRoute = ModuleName )
View Source
const ( QueryToken = "token" QueryListTokens = "listTokens" )
View Source
const DefaultCodespace sdk.CodespaceType = ModuleName
Variables ¶
View Source
var ModuleCdc *codec.Codec
ModuleCdc generic sealed codec to be used throughout module
Functions ¶
func ErrInvalidName ¶
func ErrInvalidSymbol ¶
func ErrInvalidTotalSupply ¶
func ErrSymbolNotAllowed ¶
func ErrTokenExists ¶
func ErrTokenNotExists ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on Amino codec
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
Types ¶
type BankKeeper ¶
type BankKeeper interface {
AddCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, sdk.Error)
}
BankKeeper defines the expected bank Keeper
type GenesisState ¶
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
type GenesisTokenKey ¶
type GenesisTokenKey struct {
Symbol Symbol `json:"symbol"`
}
func (GenesisTokenKey) Marshal ¶
func (k GenesisTokenKey) Marshal() string
func (*GenesisTokenKey) Unmarshal ¶
func (k *GenesisTokenKey) Unmarshal(key string) error
type MsgIssueToken ¶
type MsgIssueToken struct { Name Name `json:"name"` Symbol ShortSymbol `json:"symbol"` TotalSupply sdk.Int `json:"total_supply"` Mintable bool `json:"mintable"` OwnerAddress sdk.AccAddress `json:"owner_address"` }
MsgIssueToken defines a IssueToken message.
func NewMsgIssueToken ¶
func NewMsgIssueToken(name Name, symbol ShortSymbol, totalSupply sdk.Int, mintable bool, ownerAddress sdk.AccAddress) MsgIssueToken
NewMsgIssueToken is a constructor of MsgIssueToken.
func (MsgIssueToken) GetSignBytes ¶
func (msg MsgIssueToken) GetSignBytes() []byte
GetSignBytes returns the canonical byte representation of the message. Used to generate a signature.
func (MsgIssueToken) GetSigners ¶
func (msg MsgIssueToken) GetSigners() []sdk.AccAddress
GetSigners return the addresses of signers that must sign.
func (MsgIssueToken) Route ¶
func (msg MsgIssueToken) Route() string
Route returns the name of the module.
func (MsgIssueToken) Type ¶
func (msg MsgIssueToken) Type() string
Type returns the name of the action.
func (MsgIssueToken) ValidateBasic ¶
func (msg MsgIssueToken) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message.
type QueryTokenParams ¶
type QueryTokenParams struct {
Symbol Symbol
}
func NewQueryTokenParams ¶
func NewQueryTokenParams(symbol Symbol) *QueryTokenParams
type ShortSymbol ¶
type ShortSymbol string
type Symbol ¶
type Symbol string
func (Symbol) MicroDenom ¶
Click to show internal directories.
Click to hide internal directories.