Documentation
¶
Index ¶
- Constants
- Variables
- func AccountIDFromCoinLockedStatStoreKey(key []byte) chainTypes.AccountID
- func AccountIDFromCoinLockedStoreKey(key []byte) chainTypes.AccountID
- func AccountIDFromCoinPowerStoreKey(key []byte) chainTypes.AccountID
- func AccountIDFromCoinStoreKey(key []byte) chainTypes.AccountID
- func Cdc() *codec.Codec
- func CheckCoinStatOpts(createHeight int64, canIssue, canLock bool, issue2Height int64, init, max Coin) error
- func CoinDescStoreKey(creator, symbol chainTypes.Name) []byte
- func CoinLockedStatStoreKey(account chainTypes.AccountID) []byte
- func CoinLockedStoreKey(account chainTypes.AccountID) []byte
- func CoinPowerStoreKey(account chainTypes.AccountID) []byte
- func CoinStatStoreKey(creator, symbol chainTypes.Name) []byte
- func CoinStoreKey(account chainTypes.AccountID) []byte
- func GetKeyPrefix(pre []byte) []byte
- func RegisterCodec(cdc *codec.Codec)
- type AccountID
- type AssetRetriever
- func (ar AssetRetriever) GetCoin(acc AccountID, creator, symbol Name) (Coin, int64, error)
- func (ar AssetRetriever) GetCoinPower(acc AccountID, creator, symbol Name) (Coin, int64, error)
- func (ar AssetRetriever) GetCoinPowers(acc AccountID) (Coins, int64, error)
- func (ar AssetRetriever) GetCoinStat(creator, symbol Name) (GetCoinStatResponse, int64, error)
- func (ar AssetRetriever) GetCoins(acc AccountID) (Coins, int64, error)
- func (ar AssetRetriever) GetLockedCoins(acc AccountID) (QueryLockedCoinsResponse, int64, error)
- type BaseGenesisAsset
- type BaseGensisAssetCoin
- type Coin
- type CoinDescription
- func (*CoinDescription) Descriptor() ([]byte, []int)
- func (m *CoinDescription) Marshal() (dAtA []byte, err error)
- func (m *CoinDescription) MarshalTo(dAtA []byte) (int, error)
- func (m *CoinDescription) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CoinDescription) ProtoMessage()
- func (m *CoinDescription) Reset()
- func (m *CoinDescription) Size() (n int)
- func (m CoinDescription) String() string
- func (m *CoinDescription) Unmarshal(dAtA []byte) error
- func (m *CoinDescription) XXX_DiscardUnknown()
- func (m *CoinDescription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CoinDescription) XXX_Merge(src proto.Message)
- func (m *CoinDescription) XXX_Size() int
- func (m *CoinDescription) XXX_Unmarshal(b []byte) error
- type CoinStat
- func (*CoinStat) Descriptor() ([]byte, []int)
- func (c *CoinStat) GetCurrentMaxSupplyLimit(currentHeight int64) types.Coin
- func (m *CoinStat) Marshal() (dAtA []byte, err error)
- func (m *CoinStat) MarshalTo(dAtA []byte) (int, error)
- func (m *CoinStat) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CoinStat) ProtoMessage()
- func (m *CoinStat) Reset()
- func (c *CoinStat) SetOpt(canIssue, canLock bool, issue2Height int64, initSupply Coin) error
- func (m *CoinStat) Size() (n int)
- func (m CoinStat) String() string
- func (m *CoinStat) Unmarshal(dAtA []byte) error
- func (m *CoinStat) XXX_DiscardUnknown()
- func (m *CoinStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CoinStat) XXX_Merge(src proto.Message)
- func (m *CoinStat) XXX_Size() int
- func (m *CoinStat) XXX_Unmarshal(b []byte) error
- type Coins
- type GenesisAsset
- type GenesisCoin
- type GenesisState
- type GetCoinStatResponse
- type Int
- type KuMsg
- type LockedCoins
- type MsgBurnCoin
- type MsgBurnCoinData
- func (*MsgBurnCoinData) Descriptor() ([]byte, []int)
- func (m *MsgBurnCoinData) Marshal() (dAtA []byte, err error)
- func (m *MsgBurnCoinData) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgBurnCoinData) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgBurnCoinData) ProtoMessage()
- func (m *MsgBurnCoinData) Reset()
- func (m *MsgBurnCoinData) Size() (n int)
- func (m *MsgBurnCoinData) String() string
- func (MsgBurnCoinData) Type() types.Name
- func (m *MsgBurnCoinData) Unmarshal(dAtA []byte) error
- func (m *MsgBurnCoinData) XXX_DiscardUnknown()
- func (m *MsgBurnCoinData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgBurnCoinData) XXX_Merge(src proto.Message)
- func (m *MsgBurnCoinData) XXX_Size() int
- func (m *MsgBurnCoinData) XXX_Unmarshal(b []byte) error
- type MsgCreateCoin
- type MsgCreateCoinData
- func (*MsgCreateCoinData) Descriptor() ([]byte, []int)
- func (m *MsgCreateCoinData) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateCoinData) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateCoinData) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateCoinData) ProtoMessage()
- func (m *MsgCreateCoinData) Reset()
- func (m *MsgCreateCoinData) Size() (n int)
- func (m *MsgCreateCoinData) String() string
- func (MsgCreateCoinData) Type() types.Name
- func (m *MsgCreateCoinData) Unmarshal(dAtA []byte) error
- func (m *MsgCreateCoinData) XXX_DiscardUnknown()
- func (m *MsgCreateCoinData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateCoinData) XXX_Merge(src proto.Message)
- func (m *MsgCreateCoinData) XXX_Size() int
- func (m *MsgCreateCoinData) XXX_Unmarshal(b []byte) error
- type MsgIssueCoin
- type MsgIssueCoinData
- func (*MsgIssueCoinData) Descriptor() ([]byte, []int)
- func (m *MsgIssueCoinData) Marshal() (dAtA []byte, err error)
- func (m *MsgIssueCoinData) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgIssueCoinData) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgIssueCoinData) ProtoMessage()
- func (m *MsgIssueCoinData) Reset()
- func (m *MsgIssueCoinData) Size() (n int)
- func (m *MsgIssueCoinData) String() string
- func (MsgIssueCoinData) Type() types.Name
- func (m *MsgIssueCoinData) Unmarshal(dAtA []byte) error
- func (m *MsgIssueCoinData) XXX_DiscardUnknown()
- func (m *MsgIssueCoinData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgIssueCoinData) XXX_Merge(src proto.Message)
- func (m *MsgIssueCoinData) XXX_Size() int
- func (m *MsgIssueCoinData) XXX_Unmarshal(b []byte) error
- type MsgLockCoin
- type MsgLockCoinData
- func (*MsgLockCoinData) Descriptor() ([]byte, []int)
- func (m *MsgLockCoinData) Marshal() (dAtA []byte, err error)
- func (m *MsgLockCoinData) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgLockCoinData) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgLockCoinData) ProtoMessage()
- func (m *MsgLockCoinData) Reset()
- func (m *MsgLockCoinData) Size() (n int)
- func (m *MsgLockCoinData) String() string
- func (m *MsgLockCoinData) Type() types.Name
- func (m *MsgLockCoinData) Unmarshal(dAtA []byte) error
- func (m *MsgLockCoinData) XXX_DiscardUnknown()
- func (m *MsgLockCoinData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgLockCoinData) XXX_Merge(src proto.Message)
- func (m *MsgLockCoinData) XXX_Size() int
- func (m *MsgLockCoinData) XXX_Unmarshal(b []byte) error
- type MsgUnlockCoin
- type MsgUnlockCoinData
- func (*MsgUnlockCoinData) Descriptor() ([]byte, []int)
- func (m *MsgUnlockCoinData) Marshal() (dAtA []byte, err error)
- func (m *MsgUnlockCoinData) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUnlockCoinData) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUnlockCoinData) ProtoMessage()
- func (m *MsgUnlockCoinData) Reset()
- func (m *MsgUnlockCoinData) Size() (n int)
- func (m *MsgUnlockCoinData) String() string
- func (m *MsgUnlockCoinData) Type() types.Name
- func (m *MsgUnlockCoinData) Unmarshal(dAtA []byte) error
- func (m *MsgUnlockCoinData) XXX_DiscardUnknown()
- func (m *MsgUnlockCoinData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUnlockCoinData) XXX_Merge(src proto.Message)
- func (m *MsgUnlockCoinData) XXX_Size() int
- func (m *MsgUnlockCoinData) XXX_Unmarshal(b []byte) error
- type Name
- type NodeQuerier
- type QueryCoinDescParams
- type QueryCoinParams
- type QueryCoinPowerParams
- type QueryCoinPowersParams
- type QueryCoinStatParams
- type QueryCoinsParams
- type QueryLockedCoinsParams
- type QueryLockedCoinsResponse
Constants ¶
const ( EventTypeCreate = "create" EventTypeIssue = "issue" EventTypeTransfer = "transfer" EventTypeLock = "lock" EventTypeUnlock = "unlock" )
const ( AttributeKeyFrom = "from" AttributeKeyTo = "to" AttributeKeyAmount = "amount" AttributeKeyCreator = "creator" AttributeKeySymbol = "symbol" AttributeKeyMaxSupply = "max" AttributeKeyAccount = "id" AttributeKeyUnlockHeight = "unlockHeight" AttributeKeyCanIssue = "canIssue" AttributeKeyCanLock = "canLock" AttributeKeyIssueToHeight = "issueToHeight" AttributeKeyInit = "init" AttributeKeyDescription = "desc" )
const ( // module name ModuleName = "asset" // StoreKey is string representation of the store key for auth StoreKey = "asset" // QuerierRoute is the querier route for acc QuerierRoute = StoreKey )
const ( QueryCoin = "coin" QueryCoins = "coins" QueryCoinPower = "coinpower" QueryCoinPowers = "coinpowers" QueryCoinStat = "coinstate" QueryCoinDescription = "coindesc" QueryCoinLocked = "coinslocked" )
query endpoints supported by the auth Querier
const (
AttributeValueCategory = ModuleName
)
const (
CoinDescriptionLen = 256
)
const (
MaxDescriptionLength = 256
)
const RouterKey = ModuleName
RouterKey is they name of the asset module
Variables ¶
var ( CoinDenom = types.CoinDenom CoinAccountsFromDenom = types.CoinAccountsFromDenom NewCoin = types.NewCoin NewName = types.NewName MustName = types.MustName NewAccountIDFromName = types.NewAccountIDFromName NewAccountIDFromStr = types.NewAccountIDFromStr NewInt = sdk.NewInt )
var ( ErrAssetHasCreated = sdkerrors.Register(ModuleName, 1, "asset has created") ErrAssetDenom = sdkerrors.Register(ModuleName, 2, "denom format error") ErrAssetDescriptorTooLarge = sdkerrors.Register(ModuleName, 3, "description for coin too large") ErrAssetIssueGTMaxSupply = sdkerrors.Register(ModuleName, 4, "asset issue cannot great then max supply") ErrAssetNoCreator = sdkerrors.Register(ModuleName, 5, "asset creator error") ErrAssetCoinNoExit = sdkerrors.Register(ModuleName, 6, "asset no exit") ErrAssetCoinNoEnough = sdkerrors.Register(ModuleName, 7, "account coins no enough") ErrAssetFromAccountEmpty = sdkerrors.Register(ModuleName, 8, "from account empty") ErrAssetToAccountEmpty = sdkerrors.Register(ModuleName, 9, "to account empty") ErrAssetLockCoinsNoEnough = sdkerrors.Register(ModuleName, 10, "current coins need great or equal to lock coins") ErrAssetLockUnlockBlockHeightErr = sdkerrors.Register(ModuleName, 11, "unlock block height error") ErrAssetUnLockCoins = sdkerrors.Register(ModuleName, 12, "unlock coins error") ErrAssetCoinsLocked = sdkerrors.Register(ModuleName, 13, "coins has locked") ErrAssetCoinCannotBeLock = sdkerrors.Register(ModuleName, 14, "coin state not allowe lock") ErrAssetCoinCannotBeIssue = sdkerrors.Register(ModuleName, 15, "coin state not allowe issue") ErrAssetCoinCannotBeIssueInHeight = sdkerrors.Register(ModuleName, 16, "coin state not allowe issue that in this height") ErrAssetCoinMustCanIssueWhenIssueByBlock = sdkerrors.Register(ModuleName, 17, "coin state must can issue when set to issue by height") ErrAssetCoinMustSupplyNeedGTInitSupply = sdkerrors.Register(ModuleName, 18, "coin max_supply need > init_supply") ErrAssetIssueToHeightMustGTCurrentHeight = sdkerrors.Register(ModuleName, 19, "coin issue to height must > current height") )
var ( // AssetModuleKeyPrefix prefix for asset store // TODO: all Store key prefix should be more to a go package AssetModuleKeyPrefix = []byte{0x02} CoinStoreKeyPrefix = chainTypes.MustName("coin").Bytes() CoinPowerStoreKeyPrefix = chainTypes.MustName("coin.power").Bytes() CoinLockedStoreKeyPrefix = chainTypes.MustName("coin.lock").Bytes() CoinLockedStatStoreKeyPrefix = chainTypes.MustName("coin.locks").Bytes() CoinStatStoreKeyPrefix = chainTypes.MustName("coin.stat").Bytes() CoinDescStoreKeyPrefix = chainTypes.MustName("coin.desc").Bytes() )
var ( ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") )
var ModuleCdc = codec.New()
ModuleCdc auth module wide codec
var (
RouterKeyName = types.MustName(RouterKey)
)
Functions ¶
func AccountIDFromCoinLockedStatStoreKey ¶
func AccountIDFromCoinLockedStatStoreKey(key []byte) chainTypes.AccountID
AccountIDFromCoinLockedStatStoreKey get accountID from key
func AccountIDFromCoinLockedStoreKey ¶
func AccountIDFromCoinLockedStoreKey(key []byte) chainTypes.AccountID
AccountIDFromCoinLockedStoreKey get accountID from key
func AccountIDFromCoinPowerStoreKey ¶
func AccountIDFromCoinPowerStoreKey(key []byte) chainTypes.AccountID
AccountIDFromCoinPowerStoreKey get accountID from key
func AccountIDFromCoinStoreKey ¶
func AccountIDFromCoinStoreKey(key []byte) chainTypes.AccountID
AccountIDFromCoinStoreKey get accountID from key
func CheckCoinStatOpts ¶
func CoinDescStoreKey ¶
func CoinDescStoreKey(creator, symbol chainTypes.Name) []byte
CoinDescStoreKey get the key of coin desc store keeper for asset
func CoinLockedStatStoreKey ¶
func CoinLockedStatStoreKey(account chainTypes.AccountID) []byte
CoinLockedStatStoreKey get the key of coin store keeper for asset
func CoinLockedStoreKey ¶
func CoinLockedStoreKey(account chainTypes.AccountID) []byte
CoinLockedStoreKey get the key of coin store keeper for asset
func CoinPowerStoreKey ¶
func CoinPowerStoreKey(account chainTypes.AccountID) []byte
CoinPowerStoreKey get the key of coin store keeper for asset
func CoinStatStoreKey ¶
func CoinStatStoreKey(creator, symbol chainTypes.Name) []byte
CoinStatStoreKey get the key of coin state store keeper for asset
func CoinStoreKey ¶
func CoinStoreKey(account chainTypes.AccountID) []byte
CoinStoreKey get the key of coin store keeper for asset
func RegisterCodec ¶
RegisterCodec registers concrete types on the codec
Types ¶
type AssetRetriever ¶
type AssetRetriever struct {
// contains filtered or unexported fields
}
AssetRetriever defines the properties of a type that can be used to retrieve accounts.
func NewAssetRetriever ¶
func NewAssetRetriever(querier NodeQuerier) AssetRetriever
NewAssetRetriever init a new AssetRetriever instance.
func (AssetRetriever) GetCoinPower ¶
GetCoin queries for coin for a account
func (AssetRetriever) GetCoinPowers ¶
func (ar AssetRetriever) GetCoinPowers(acc AccountID) (Coins, int64, error)
GetCoinPowers queries for coins powers for a account
func (AssetRetriever) GetCoinStat ¶
func (ar AssetRetriever) GetCoinStat(creator, symbol Name) (GetCoinStatResponse, int64, error)
func (AssetRetriever) GetCoins ¶
func (ar AssetRetriever) GetCoins(acc AccountID) (Coins, int64, error)
GetCoins queries for coins for a account
func (AssetRetriever) GetLockedCoins ¶
func (ar AssetRetriever) GetLockedCoins(acc AccountID) (QueryLockedCoinsResponse, int64, error)
GetLockedCoins queries for coins locked for a account
type BaseGenesisAsset ¶
func NewGenesisAsset ¶
func NewGenesisAsset(id AccountID, coins ...Coin) BaseGenesisAsset
func NewGenesisAssetByCoins ¶
func NewGenesisAssetByCoins(id AccountID, coins Coins) BaseGenesisAsset
func (BaseGenesisAsset) GetCoins ¶
func (g BaseGenesisAsset) GetCoins() Coins
func (BaseGenesisAsset) GetID ¶
func (g BaseGenesisAsset) GetID() AccountID
type BaseGensisAssetCoin ¶
type BaseGensisAssetCoin struct { Creator Name `json:"creator"` Symbol Name `json:"symbol"` MaxSupply Coin `json:"maxSupply"` Description string `json:"description"` }
GensisAssetCoin
func NewGenesisCoin ¶
func NewGenesisCoin(creator, symbol Name, maxSupplyAmount Int, description string) BaseGensisAssetCoin
func (BaseGensisAssetCoin) GetCreator ¶
func (g BaseGensisAssetCoin) GetCreator() Name
GetCreator imp GenesisCoin
func (BaseGensisAssetCoin) GetDescription ¶
func (g BaseGensisAssetCoin) GetDescription() string
GetDescription imp GenesisCoin
func (BaseGensisAssetCoin) GetMaxSupply ¶
func (g BaseGensisAssetCoin) GetMaxSupply() Coin
GetMaxSupply imp GenesisCoin
func (BaseGensisAssetCoin) GetSymbol ¶
func (g BaseGensisAssetCoin) GetSymbol() Name
GetSymbol imp GenesisCoin
func (BaseGensisAssetCoin) Validate ¶
func (g BaseGensisAssetCoin) Validate() error
Validate imp GenesisCoin
type CoinDescription ¶
type CoinDescription struct { // Symbol coin symbol name Symbol types.Name `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol" yaml:"symbol"` // Creator coin creator account name Creator types.Name `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator" yaml:"creator"` // Description coin description info Description []byte `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` }
CoinDescription description info for a coin type
func NewCoinDescription ¶
func NewCoinDescription(creator, symbol Name, desc []byte) CoinDescription
NewCoinDescription create coin description
func (*CoinDescription) Descriptor ¶
func (*CoinDescription) Descriptor() ([]byte, []int)
func (*CoinDescription) Marshal ¶
func (m *CoinDescription) Marshal() (dAtA []byte, err error)
func (*CoinDescription) MarshalToSizedBuffer ¶
func (m *CoinDescription) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CoinDescription) ProtoMessage ¶
func (*CoinDescription) ProtoMessage()
func (*CoinDescription) Reset ¶
func (m *CoinDescription) Reset()
func (*CoinDescription) Size ¶
func (m *CoinDescription) Size() (n int)
func (CoinDescription) String ¶
func (m CoinDescription) String() string
func (*CoinDescription) Unmarshal ¶
func (m *CoinDescription) Unmarshal(dAtA []byte) error
func (*CoinDescription) XXX_DiscardUnknown ¶
func (m *CoinDescription) XXX_DiscardUnknown()
func (*CoinDescription) XXX_Marshal ¶
func (m *CoinDescription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CoinDescription) XXX_Merge ¶
func (m *CoinDescription) XXX_Merge(src proto.Message)
func (*CoinDescription) XXX_Size ¶
func (m *CoinDescription) XXX_Size() int
func (*CoinDescription) XXX_Unmarshal ¶
func (m *CoinDescription) XXX_Unmarshal(b []byte) error
type CoinStat ¶
type CoinStat struct { // Symbol coin symbol name Symbol types.Name `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol" yaml:"symbol"` // Creator coin creator account name Creator types.Name `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator" yaml:"creator"` CreateHeight int64 `protobuf:"varint,3,opt,name=create_height,json=createHeight,proto3" json:"create_height,omitempty" yaml:"create_height"` // Supply coin current supply Supply types1.Coin `protobuf:"bytes,4,opt,name=supply,proto3" json:"supply" yaml:"supply"` // MaxSupply coin max supply limit MaxSupply types1.Coin `protobuf:"bytes,5,opt,name=max_supply,json=maxSupply,proto3" json:"max_supply" yaml:"max_supply"` CanIssue bool `protobuf:"varint,6,opt,name=can_issue,json=canIssue,proto3" json:"can_issue,omitempty" yaml:"can_issue"` CanLock bool `protobuf:"varint,7,opt,name=can_lock,json=canLock,proto3" json:"can_lock,omitempty" yaml:"can_lock"` IssueToHeight int64 `` /* 126-byte string literal not displayed */ // InitSupply coin init supply, if issue_to_height is not zero, this will be the start supply for issue InitSupply types1.Coin `protobuf:"bytes,9,opt,name=init_supply,json=initSupply,proto3" json:"init_supply" yaml:"init_supply"` }
CoinStat state for a coin type
func NewCoinStat ¶
NewCoinStat creates a Coin status
func (*CoinStat) Descriptor ¶
func (*CoinStat) GetCurrentMaxSupplyLimit ¶
func (*CoinStat) MarshalToSizedBuffer ¶
func (*CoinStat) ProtoMessage ¶
func (*CoinStat) ProtoMessage()
func (*CoinStat) XXX_DiscardUnknown ¶
func (m *CoinStat) XXX_DiscardUnknown()
func (*CoinStat) XXX_Marshal ¶
func (*CoinStat) XXX_Unmarshal ¶
type GenesisAsset ¶
GenesisAsset gensis asset for accountID
type GenesisCoin ¶
type GenesisCoin interface { GetCreator() Name GetSymbol() Name GetMaxSupply() Coin GetDescription() string Validate() error }
GenesisCoin gensis coin type
type GenesisState ¶
type GenesisState struct { GenesisAssets []GenesisAsset `json:"genesisAssets"` GenesisCoins []GenesisCoin `json:"genesisCoins"` }
GenesisState is the bank state that must be provided at genesis.
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState returns a default genesis state
func NewGenesisState ¶
func NewGenesisState() GenesisState
NewGenesisState creates a new genesis state.
func (GenesisState) ValidateGenesis ¶
func (g GenesisState) ValidateGenesis() error
ValidateGenesis performs basic validation of bank genesis data returning an error for any failed validation criteria.
type GetCoinStatResponse ¶
type LockedCoins ¶
type MsgBurnCoin ¶
type MsgBurnCoinData ¶
type MsgBurnCoinData struct { // Symbol coin symbol name Id types.AccountID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` // MaxSupply coin max supply limit Amount types1.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount" yaml:"amount"` }
func (*MsgBurnCoinData) Descriptor ¶
func (*MsgBurnCoinData) Descriptor() ([]byte, []int)
func (*MsgBurnCoinData) Marshal ¶
func (m *MsgBurnCoinData) Marshal() (dAtA []byte, err error)
func (*MsgBurnCoinData) MarshalToSizedBuffer ¶
func (m *MsgBurnCoinData) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgBurnCoinData) ProtoMessage ¶
func (*MsgBurnCoinData) ProtoMessage()
func (*MsgBurnCoinData) Reset ¶
func (m *MsgBurnCoinData) Reset()
func (*MsgBurnCoinData) Size ¶
func (m *MsgBurnCoinData) Size() (n int)
func (*MsgBurnCoinData) String ¶
func (m *MsgBurnCoinData) String() string
func (*MsgBurnCoinData) Unmarshal ¶
func (m *MsgBurnCoinData) Unmarshal(dAtA []byte) error
func (*MsgBurnCoinData) XXX_DiscardUnknown ¶
func (m *MsgBurnCoinData) XXX_DiscardUnknown()
func (*MsgBurnCoinData) XXX_Marshal ¶
func (m *MsgBurnCoinData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgBurnCoinData) XXX_Merge ¶
func (m *MsgBurnCoinData) XXX_Merge(src proto.Message)
func (*MsgBurnCoinData) XXX_Size ¶
func (m *MsgBurnCoinData) XXX_Size() int
func (*MsgBurnCoinData) XXX_Unmarshal ¶
func (m *MsgBurnCoinData) XXX_Unmarshal(b []byte) error
type MsgCreateCoin ¶
type MsgCreateCoinData ¶
type MsgCreateCoinData struct { // Symbol coin symbol name Symbol types.Name `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol" yaml:"symbol"` // Creator coin creator account name Creator types.Name `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator" yaml:"creator"` // MaxSupply coin max supply limit MaxSupply types1.Coin `protobuf:"bytes,3,opt,name=max_supply,json=maxSupply,proto3" json:"max_supply" yaml:"max_supply"` // CanIssue if the coin can issue after create CanIssue bool `protobuf:"varint,4,opt,name=can_issue,json=canIssue,proto3" json:"can_issue,omitempty" yaml:"can_issue"` // CanLock if the coin can lock by user CanLock bool `protobuf:"varint,5,opt,name=can_lock,json=canLock,proto3" json:"can_lock,omitempty" yaml:"can_lock"` // IssueToHeight if this is not zero, creator only can issue this IssueToHeight int64 `` /* 126-byte string literal not displayed */ // InitSupply coin init supply, if issue_to_height is not zero, this will be the start supply for issue InitSupply types1.Coin `protobuf:"bytes,7,opt,name=init_supply,json=initSupply,proto3" json:"init_supply" yaml:"init_supply"` Desc []byte `protobuf:"bytes,8,opt,name=desc,proto3" json:"desc,omitempty" yaml:"desc"` }
func (*MsgCreateCoinData) Descriptor ¶
func (*MsgCreateCoinData) Descriptor() ([]byte, []int)
func (*MsgCreateCoinData) Marshal ¶
func (m *MsgCreateCoinData) Marshal() (dAtA []byte, err error)
func (*MsgCreateCoinData) MarshalTo ¶
func (m *MsgCreateCoinData) MarshalTo(dAtA []byte) (int, error)
func (*MsgCreateCoinData) MarshalToSizedBuffer ¶
func (m *MsgCreateCoinData) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateCoinData) ProtoMessage ¶
func (*MsgCreateCoinData) ProtoMessage()
func (*MsgCreateCoinData) Reset ¶
func (m *MsgCreateCoinData) Reset()
func (*MsgCreateCoinData) Size ¶
func (m *MsgCreateCoinData) Size() (n int)
func (*MsgCreateCoinData) String ¶
func (m *MsgCreateCoinData) String() string
func (MsgCreateCoinData) Type ¶
func (MsgCreateCoinData) Type() types.Name
func (*MsgCreateCoinData) Unmarshal ¶
func (m *MsgCreateCoinData) Unmarshal(dAtA []byte) error
func (*MsgCreateCoinData) XXX_DiscardUnknown ¶
func (m *MsgCreateCoinData) XXX_DiscardUnknown()
func (*MsgCreateCoinData) XXX_Marshal ¶
func (m *MsgCreateCoinData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateCoinData) XXX_Merge ¶
func (m *MsgCreateCoinData) XXX_Merge(src proto.Message)
func (*MsgCreateCoinData) XXX_Size ¶
func (m *MsgCreateCoinData) XXX_Size() int
func (*MsgCreateCoinData) XXX_Unmarshal ¶
func (m *MsgCreateCoinData) XXX_Unmarshal(b []byte) error
type MsgIssueCoin ¶
func NewMsgBurn ¶
func NewMsgBurn(auth types.AccAddress, id types.AccountID, amount types.Coin) MsgIssueCoin
NewMsgBurn new issue msg
func NewMsgIssue ¶
func NewMsgIssue(auth types.AccAddress, creator, symbol types.Name, amount types.Coin) MsgIssueCoin
NewMsgIssue new issue msg
type MsgIssueCoinData ¶
type MsgIssueCoinData struct { // Symbol coin symbol name Symbol types.Name `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol" yaml:"symbol"` // Creator coin creator account name Creator types.Name `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator" yaml:"creator"` // MaxSupply coin max supply limit Amount types1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount" yaml:"amount"` }
func (*MsgIssueCoinData) Descriptor ¶
func (*MsgIssueCoinData) Descriptor() ([]byte, []int)
func (*MsgIssueCoinData) Marshal ¶
func (m *MsgIssueCoinData) Marshal() (dAtA []byte, err error)
func (*MsgIssueCoinData) MarshalToSizedBuffer ¶
func (m *MsgIssueCoinData) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgIssueCoinData) ProtoMessage ¶
func (*MsgIssueCoinData) ProtoMessage()
func (*MsgIssueCoinData) Reset ¶
func (m *MsgIssueCoinData) Reset()
func (*MsgIssueCoinData) Size ¶
func (m *MsgIssueCoinData) Size() (n int)
func (*MsgIssueCoinData) String ¶
func (m *MsgIssueCoinData) String() string
func (MsgIssueCoinData) Type ¶
func (MsgIssueCoinData) Type() types.Name
Type imp for data KuMsgData
func (*MsgIssueCoinData) Unmarshal ¶
func (m *MsgIssueCoinData) Unmarshal(dAtA []byte) error
func (*MsgIssueCoinData) XXX_DiscardUnknown ¶
func (m *MsgIssueCoinData) XXX_DiscardUnknown()
func (*MsgIssueCoinData) XXX_Marshal ¶
func (m *MsgIssueCoinData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgIssueCoinData) XXX_Merge ¶
func (m *MsgIssueCoinData) XXX_Merge(src proto.Message)
func (*MsgIssueCoinData) XXX_Size ¶
func (m *MsgIssueCoinData) XXX_Size() int
func (*MsgIssueCoinData) XXX_Unmarshal ¶
func (m *MsgIssueCoinData) XXX_Unmarshal(b []byte) error
type MsgLockCoin ¶
MsgLockCoin msg to lock coin
func NewMsgLockCoin ¶
func NewMsgLockCoin(auth types.AccAddress, id types.AccountID, amount types.Coins, unlockBlockHeight int64) MsgLockCoin
NewMsgLockCoin create new lock coin msg
type MsgLockCoinData ¶
type MsgLockCoinData struct { // Id lock account Id types.AccountID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` // Amount coins to lock Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount" yaml:"amount"` // UnlockBlockHeight the block height the coins unlock UnlockBlockHeight int64 `protobuf:"varint,3,opt,name=unlockBlockHeight,proto3" json:"unlockBlockHeight,omitempty" yaml:"unlockBlockHeight"` }
func (*MsgLockCoinData) Descriptor ¶
func (*MsgLockCoinData) Descriptor() ([]byte, []int)
func (*MsgLockCoinData) Marshal ¶
func (m *MsgLockCoinData) Marshal() (dAtA []byte, err error)
func (*MsgLockCoinData) MarshalToSizedBuffer ¶
func (m *MsgLockCoinData) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgLockCoinData) ProtoMessage ¶
func (*MsgLockCoinData) ProtoMessage()
func (*MsgLockCoinData) Reset ¶
func (m *MsgLockCoinData) Reset()
func (*MsgLockCoinData) Size ¶
func (m *MsgLockCoinData) Size() (n int)
func (*MsgLockCoinData) String ¶
func (m *MsgLockCoinData) String() string
func (*MsgLockCoinData) Type ¶
func (m *MsgLockCoinData) Type() types.Name
Type imp for data KuMsgData
func (*MsgLockCoinData) Unmarshal ¶
func (m *MsgLockCoinData) Unmarshal(dAtA []byte) error
func (*MsgLockCoinData) XXX_DiscardUnknown ¶
func (m *MsgLockCoinData) XXX_DiscardUnknown()
func (*MsgLockCoinData) XXX_Marshal ¶
func (m *MsgLockCoinData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgLockCoinData) XXX_Merge ¶
func (m *MsgLockCoinData) XXX_Merge(src proto.Message)
func (*MsgLockCoinData) XXX_Size ¶
func (m *MsgLockCoinData) XXX_Size() int
func (*MsgLockCoinData) XXX_Unmarshal ¶
func (m *MsgLockCoinData) XXX_Unmarshal(b []byte) error
type MsgUnlockCoin ¶
MsgUnlockCoin msg to unlock coin
func NewMsgUnlockCoin ¶
func NewMsgUnlockCoin(auth types.AccAddress, id types.AccountID, amount types.Coins) MsgUnlockCoin
NewMsgUnlockCoin create new lock coin msg
type MsgUnlockCoinData ¶
type MsgUnlockCoinData struct { // Id lock account Id types.AccountID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` // Amount coins to lock Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount" yaml:"amount"` }
func (*MsgUnlockCoinData) Descriptor ¶
func (*MsgUnlockCoinData) Descriptor() ([]byte, []int)
func (*MsgUnlockCoinData) Marshal ¶
func (m *MsgUnlockCoinData) Marshal() (dAtA []byte, err error)
func (*MsgUnlockCoinData) MarshalTo ¶
func (m *MsgUnlockCoinData) MarshalTo(dAtA []byte) (int, error)
func (*MsgUnlockCoinData) MarshalToSizedBuffer ¶
func (m *MsgUnlockCoinData) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUnlockCoinData) ProtoMessage ¶
func (*MsgUnlockCoinData) ProtoMessage()
func (*MsgUnlockCoinData) Reset ¶
func (m *MsgUnlockCoinData) Reset()
func (*MsgUnlockCoinData) Size ¶
func (m *MsgUnlockCoinData) Size() (n int)
func (*MsgUnlockCoinData) String ¶
func (m *MsgUnlockCoinData) String() string
func (*MsgUnlockCoinData) Type ¶
func (m *MsgUnlockCoinData) Type() types.Name
Type imp for data KuMsgData
func (*MsgUnlockCoinData) Unmarshal ¶
func (m *MsgUnlockCoinData) Unmarshal(dAtA []byte) error
func (*MsgUnlockCoinData) XXX_DiscardUnknown ¶
func (m *MsgUnlockCoinData) XXX_DiscardUnknown()
func (*MsgUnlockCoinData) XXX_Marshal ¶
func (m *MsgUnlockCoinData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUnlockCoinData) XXX_Merge ¶
func (m *MsgUnlockCoinData) XXX_Merge(src proto.Message)
func (*MsgUnlockCoinData) XXX_Size ¶
func (m *MsgUnlockCoinData) XXX_Size() int
func (*MsgUnlockCoinData) XXX_Unmarshal ¶
func (m *MsgUnlockCoinData) XXX_Unmarshal(b []byte) error
type NodeQuerier ¶
type NodeQuerier interface { // QueryWithData performs a query to a Tendermint node with the provided path // and a data payload. It returns the result and height of the query upon success // or an error if the query fails. QueryWithData(path string, data []byte) ([]byte, int64, error) }
NodeQuerier is an interface that is satisfied by types that provide the QueryWithData method
type QueryCoinDescParams ¶
QueryCoinDescParams defines the params for querying coin desc.
func NewQueryCoinDescParams ¶
func NewQueryCoinDescParams(creator, symbol types.Name) QueryCoinDescParams
NewQueryCoinDescParams creates a new instance of QueryCoinDescParams.
type QueryCoinParams ¶
QueryCoinParams defines the params for querying coin.
func NewQueryCoinParams ¶
func NewQueryCoinParams(accountID types.AccountID, creator, symbol types.Name) QueryCoinParams
NewQueryCoinParams creates a new instance of QueryCoinParams.
type QueryCoinPowerParams ¶
QueryCoinPowerParams defines the params for querying coin.
func NewQueryCoinPowerParams ¶
func NewQueryCoinPowerParams(accountID types.AccountID, creator, symbol types.Name) QueryCoinPowerParams
NewQueryCoinPowerParams creates a new instance of QueryCoinParams.
type QueryCoinPowersParams ¶
QueryCoinPowersParams defines the params for querying coin.
func NewQueryCoinPowersParams ¶
func NewQueryCoinPowersParams(accountID types.AccountID) QueryCoinPowersParams
NewQueryCoinPowersParams creates a new instance of QueryCoinParams.
type QueryCoinStatParams ¶
QueryCoinStatParams defines the params for querying coin stat.
func NewQueryCoinStatParams ¶
func NewQueryCoinStatParams(creator, symbol types.Name) QueryCoinStatParams
NewQueryCoinStatParams creates a new instance of QueryCoinStatParams.
type QueryCoinsParams ¶
QueryCoinsParams defines the params for querying coin.
func NewQueryCoinsParams ¶
func NewQueryCoinsParams(accountID types.AccountID) QueryCoinsParams
NewQueryCoinsParams creates a new instance of QueryCoinParams.
type QueryLockedCoinsParams ¶
QueryLockedCoinsParams defines the params for querying coin.
func NewQueryLockedCoinsParams ¶
func NewQueryLockedCoinsParams(accountID types.AccountID) QueryLockedCoinsParams
NewQueryLockedCoinsParamscreates a new instance of QueryCoinParams.
type QueryLockedCoinsResponse ¶
type QueryLockedCoinsResponse struct { LockedCoins types.Coins `json:"coins"` Locks []LockedCoins `json:"locks"` }