Documentation ¶
Index ¶
- func ProtoQOSAccount() account.Account
- func RegisterCodec(cdc *go_amino.Codec)
- type QOSAccount
- func (account *QOSAccount) EnoughOf(qos btypes.BigInt, qscs types.QSCs) bool
- func (account *QOSAccount) EnoughOfQOS(qos btypes.BigInt) bool
- func (account *QOSAccount) EnoughOfQSC(qsc types.QSC) bool
- func (account *QOSAccount) EnoughOfQSCs(qscs types.QSCs) bool
- func (account *QOSAccount) GetQOS() btypes.BigInt
- func (account *QOSAccount) GetQSC(qscName string) (qsc types.QSC, exists bool)
- func (account *QOSAccount) GetQSCs() types.QSCs
- func (account *QOSAccount) Minus(qos btypes.BigInt, qscs types.QSCs) error
- func (account *QOSAccount) MinusQOS(qos btypes.BigInt) error
- func (account *QOSAccount) MinusQSC(qsc types.QSC) error
- func (account *QOSAccount) MinusQSCs(qscs types.QSCs) error
- func (account *QOSAccount) MustMinus(qos btypes.BigInt, qscs types.QSCs)
- func (account *QOSAccount) MustMinusQOS(qos btypes.BigInt)
- func (account *QOSAccount) MustMinusQSC(qsc types.QSC)
- func (account *QOSAccount) MustMinusQSCs(qscs types.QSCs)
- func (account *QOSAccount) MustPlus(qos btypes.BigInt, qscs types.QSCs)
- func (account *QOSAccount) MustPlusQOS(qos btypes.BigInt)
- func (account *QOSAccount) MustPlusQSC(qsc types.QSC)
- func (account *QOSAccount) MustPlusQSCs(qscs types.QSCs)
- func (account *QOSAccount) Plus(qos btypes.BigInt, qscs types.QSCs) error
- func (account *QOSAccount) PlusQOS(qos btypes.BigInt) error
- func (account *QOSAccount) PlusQSC(qsc types.QSC) error
- func (account *QOSAccount) PlusQSCs(qscs types.QSCs) error
- func (account *QOSAccount) RemoveQSC(qscName string)
- func (account *QOSAccount) SetQOS(qos btypes.BigInt) error
- func (account *QOSAccount) SetQSC(qsc types.QSC) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProtoQOSAccount ¶
Types ¶
type QOSAccount ¶
type QOSAccount struct { account.BaseAccount `json:"base_account"` // inherits BaseAccount QOS btypes.BigInt `json:"qos"` // coins in public chain QSCs types.QSCs `json:"qscs"` // varied QSCs }
func NewQOSAccount ¶ added in v0.0.2
func NewQOSAccountWithAddress ¶ added in v0.0.3
func NewQOSAccountWithAddress(addr btypes.Address) *QOSAccount
func NewQOSAccountZero ¶ added in v0.0.3
func NewQOSAccountZero() *QOSAccount
func ParseAccounts ¶ added in v0.0.3
func ParseAccounts(str string) ([]*QOSAccount, error)
Parse accounts from string address16lwp3kykkjdc2gdknpjy6u9uhfpa9q4vj78ytd,1000000qos,1000000qstars. Multiple accounts separated by ';'
func (*QOSAccount) EnoughOfQOS ¶ added in v0.0.3
func (account *QOSAccount) EnoughOfQOS(qos btypes.BigInt) bool
是否有足够QOS
func (*QOSAccount) EnoughOfQSC ¶ added in v0.0.3
func (account *QOSAccount) EnoughOfQSC(qsc types.QSC) bool
是否有足够QSC
func (*QOSAccount) EnoughOfQSCs ¶ added in v0.0.3
func (account *QOSAccount) EnoughOfQSCs(qscs types.QSCs) bool
是否有足够QSCs
func (*QOSAccount) GetQOS ¶
func (account *QOSAccount) GetQOS() btypes.BigInt
func (*QOSAccount) GetQSC ¶
func (account *QOSAccount) GetQSC(qscName string) (qsc types.QSC, exists bool)
返回指定币种币值
func (*QOSAccount) GetQSCs ¶ added in v0.0.3
func (account *QOSAccount) GetQSCs() types.QSCs
func (*QOSAccount) MinusQOS ¶ added in v0.0.3
func (account *QOSAccount) MinusQOS(qos btypes.BigInt) error
减少QOS,减少量小于0或结果小于0时返回错误
func (*QOSAccount) MinusQSC ¶ added in v0.0.3
func (account *QOSAccount) MinusQSC(qsc types.QSC) error
减少QSC
func (*QOSAccount) MinusQSCs ¶ added in v0.0.3
func (account *QOSAccount) MinusQSCs(qscs types.QSCs) error
减少QSCs
func (*QOSAccount) MustMinus ¶ added in v0.0.3
func (account *QOSAccount) MustMinus(qos btypes.BigInt, qscs types.QSCs)
func (*QOSAccount) MustMinusQOS ¶ added in v0.0.3
func (account *QOSAccount) MustMinusQOS(qos btypes.BigInt)
减少QOS,返回错误panic
func (*QOSAccount) MustMinusQSC ¶ added in v0.0.3
func (account *QOSAccount) MustMinusQSC(qsc types.QSC)
func (*QOSAccount) MustMinusQSCs ¶ added in v0.0.3
func (account *QOSAccount) MustMinusQSCs(qscs types.QSCs)
func (*QOSAccount) MustPlus ¶ added in v0.0.3
func (account *QOSAccount) MustPlus(qos btypes.BigInt, qscs types.QSCs)
func (*QOSAccount) MustPlusQOS ¶ added in v0.0.3
func (account *QOSAccount) MustPlusQOS(qos btypes.BigInt)
增加QOS,返回错误时panic
func (*QOSAccount) MustPlusQSC ¶ added in v0.0.3
func (account *QOSAccount) MustPlusQSC(qsc types.QSC)
func (*QOSAccount) MustPlusQSCs ¶ added in v0.0.3
func (account *QOSAccount) MustPlusQSCs(qscs types.QSCs)
func (*QOSAccount) PlusQOS ¶ added in v0.0.3
func (account *QOSAccount) PlusQOS(qos btypes.BigInt) error
增加QOS,增加量小于0时返回错误
func (*QOSAccount) PlusQSC ¶ added in v0.0.3
func (account *QOSAccount) PlusQSC(qsc types.QSC) error
增加QSC
func (*QOSAccount) PlusQSCs ¶ added in v0.0.3
func (account *QOSAccount) PlusQSCs(qscs types.QSCs) error
增加QSCs
func (*QOSAccount) RemoveQSC ¶ added in v0.0.3
func (account *QOSAccount) RemoveQSC(qscName string)
移除QSC
Click to show internal directories.
Click to hide internal directories.