Documentation ¶
Index ¶
- Constants
- Variables
- func ErrInvalidInput(codeSpace btypes.CodespaceType, msg string) btypes.Error
- func ErrSenderAccountCoinsNotEnough(codeSpace btypes.CodespaceType, msg string) btypes.Error
- func ErrSenderAccountNotExists(codeSpace btypes.CodespaceType, msg string) btypes.Error
- func ValidateGenesis(gs GenesisState) error
- type GenesisState
- type TransItem
- type TransItems
Constants ¶
View Source
const ( DefaultCodeSpace btypes.CodespaceType = "transfer" CodeInvalidInput btypes.CodeType = 201 // 基础数据输入有误 CodeSenderAccountNotExists btypes.CodeType = 202 // 转出账户不存在 CodeSenderAccountCoinsNotEnough btypes.CodeType = 203 // 转出账户余额不足 )
Transfer errors reserve 200 ~ 299.
Variables ¶
View Source
var ( EventTypeSend = "send" EventTypeReceive = "receive" EventTypeInvariantCheck = types.EventTypeInvariantCheck AttributeKeyModule = "transfer" AttributeKeyAddress = "address" AttributeKeyQOS = "qos" AttributeKeyQSCs = "qscs" AttributeKeySender = "sender" AttributeKeyHeight = "height" )
Functions ¶
func ErrInvalidInput ¶
func ErrInvalidInput(codeSpace btypes.CodespaceType, msg string) btypes.Error
func ErrSenderAccountCoinsNotEnough ¶
func ErrSenderAccountCoinsNotEnough(codeSpace btypes.CodespaceType, msg string) btypes.Error
func ErrSenderAccountNotExists ¶
func ErrSenderAccountNotExists(codeSpace btypes.CodespaceType, msg string) btypes.Error
func ValidateGenesis ¶
func ValidateGenesis(gs GenesisState) error
Types ¶
type GenesisState ¶
type GenesisState struct {
Accounts []*qtypes.QOSAccount `json:"accounts"`
}
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
func NewGenesisState ¶
func NewGenesisState(accounts []*qtypes.QOSAccount) GenesisState
type TransItem ¶
type TransItems ¶
type TransItems []TransItem
func (TransItems) Match ¶
func (items TransItems) Match(itemsB TransItems) (bool, error)
total QOS、QSCs in items and itemsB are equal
Click to show internal directories.
Click to hide internal directories.