Documentation ¶
Index ¶
- Constants
- Variables
- func DecEq(t *testing.T, exp, got Dec) (*testing.T, bool, string, string, string)
- func DecsEqual(d1s, d2s []Dec) bool
- func FileMD5(filepath string) (string, error)
- func FormatInvariant(module, name, msg string, coins types.BaseCoins, broken bool) (string, types.BaseCoins, bool)
- func GetDefaultChainId() (string, error)
- func GetIntFromFlag(flag string, allowZero bool) (amount btypes.BigInt, err error)
- func ProtoQOSAccount() account.Account
- func RegisterCodec(cdc *go_amino.Codec)
- func Uint64ToBigEndian(i uint64) []byte
- type AppModule
- type AppModuleBasic
- type AppModuleGenesis
- type BasicManager
- func (bm BasicManager) AddQueryCommands(rootQueryCmd *cobra.Command, cdc *amino.Codec)
- func (bm BasicManager) AddTxCommands(rootTxCmd *cobra.Command, cdc *amino.Codec)
- func (bm BasicManager) DefaultGenesis() map[string]json.RawMessage
- func (bm BasicManager) RegisterCodec(cdc *amino.Codec)
- func (bm BasicManager) RegisterRoutes(ctx cliContext.CLIContext, routes *mux.Router)
- func (bm BasicManager) ValidateGenesis(genesis map[string]json.RawMessage) error
- type Dec
- func MaxDec(d1, d2 Dec) Dec
- func MinDec(d1, d2 Dec) Dec
- func MustNewDecFromStr(s string) Dec
- func NewDec(i int64) Dec
- func NewDecFromBigInt(i *big.Int) Dec
- func NewDecFromBigIntWithPrec(i *big.Int, prec int64) Dec
- func NewDecFromInt(i btypes.BigInt) Dec
- func NewDecFromIntWithPrec(i btypes.BigInt, prec int64) Dec
- func NewDecFromStr(str string) (d Dec, err error)
- func NewDecWithPrec(i, prec int64) Dec
- func OneDec() Dec
- func ZeroDec() Dec
- func (d Dec) Abs() Dec
- func (d Dec) Add(d2 Dec) Dec
- func (d Dec) Ceil() Dec
- func (d Dec) Equal(d2 Dec) bool
- func (d Dec) Format(s fmt.State, verb rune)
- func (d Dec) GT(d2 Dec) bool
- func (d Dec) GTE(d2 Dec) bool
- func (d Dec) IsInteger() bool
- func (d Dec) IsNegative() bool
- func (d Dec) IsNil() bool
- func (d Dec) IsPositive() bool
- func (d Dec) IsZero() bool
- func (d Dec) LT(d2 Dec) bool
- func (d Dec) LTE(d2 Dec) bool
- func (d Dec) MarshalAmino() (string, error)
- func (d Dec) MarshalJSON() ([]byte, error)
- func (d Dec) Mul(d2 Dec) Dec
- func (d Dec) MulInt(i btypes.BigInt) Dec
- func (d Dec) MulTruncate(d2 Dec) Dec
- func (d Dec) Neg() Dec
- func (d Dec) Quo(d2 Dec) Dec
- func (d Dec) QuoInt(i btypes.BigInt) Dec
- func (d Dec) QuoTruncate(d2 Dec) Dec
- func (d Dec) RoundInt() btypes.BigInt
- func (d Dec) RoundInt64() int64
- func (d Dec) String() string
- func (d Dec) Sub(d2 Dec) Dec
- func (d Dec) TruncateDec() Dec
- func (d Dec) TruncateInt() btypes.BigInt
- func (d Dec) TruncateInt64() int64
- func (d *Dec) UnmarshalAmino(text string) (err error)
- func (d *Dec) UnmarshalJSON(bz []byte) error
- type Fraction
- func (frac Fraction) Add(f1 Fraction) Fraction
- func (frac Fraction) Equal(f1 Fraction) bool
- func (frac Fraction) Mul(f1 Fraction) Fraction
- func (frac Fraction) MultiBigInt(t btypes.BigInt) btypes.BigInt
- func (frac Fraction) MultiInt64(t int64) btypes.BigInt
- func (frac Fraction) Sub(f1 Fraction) Fraction
- type GenesisOnlyAppModule
- func (gam GenesisOnlyAppModule) BeginBlock(ctx context.Context, req abci.RequestBeginBlock)
- func (GenesisOnlyAppModule) EndBlock(_ context.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (GenesisOnlyAppModule) RegisterInvariants(_ InvariantRegistry)
- func (GenesisOnlyAppModule) RegisterQuerier(_ QueryRegistry)
- type GenesisState
- type Hooks
- type HooksMapper
- type HooksMapperRegistry
- type InvarRoute
- type Invariant
- type InvariantRegistry
- type Invariants
- type KeyValuePair
- type KeyValuePairs
- type Manager
- func (m *Manager) BeginBlock(ctx context.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (m *Manager) EndBlock(ctx context.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (m *Manager) ExportGenesis(ctx context.Context) map[string]json.RawMessage
- func (m *Manager) InitGenesis(ctx context.Context, bapp *baseabci.BaseApp, ...) abci.ResponseInitChain
- func (m *Manager) RegisterInvariants(ir InvariantRegistry)
- func (m *Manager) RegisterMapperAndHooks(hmr HooksMapperRegistry, paramsInitializerModule string, ps ...ParamSet)
- func (m *Manager) RegisterQueriers(qr QueryRegistry)
- func (m *Manager) SetOrderBeginBlockers(moduleNames ...string)
- func (m *Manager) SetOrderEndBlockers(moduleNames ...string)
- func (m *Manager) SetOrderExportGenesis(moduleNames ...string)
- func (m *Manager) SetOrderInitGenesis(moduleNames ...string)
- type MapperWithHooks
- type MetricsMapper
- type ParamSet
- type ParamsInitializer
- type QOSAccount
- func (account *QOSAccount) EnoughOf(qos btypes.BigInt, qscs QSCs) bool
- func (account *QOSAccount) EnoughOfQOS(qos btypes.BigInt) bool
- func (account *QOSAccount) EnoughOfQSC(qsc QSC) bool
- func (account *QOSAccount) EnoughOfQSCs(qscs QSCs) bool
- func (account *QOSAccount) GetQOS() btypes.BigInt
- func (account *QOSAccount) GetQSC(qscName string) (qsc QSC, exists bool)
- func (account *QOSAccount) GetQSCs() QSCs
- func (account *QOSAccount) MarshalJSON() ([]byte, error)
- func (account *QOSAccount) Minus(qos btypes.BigInt, qscs QSCs) error
- func (account *QOSAccount) MinusQOS(qos btypes.BigInt) error
- func (account *QOSAccount) MinusQSC(qsc QSC) error
- func (account *QOSAccount) MinusQSCs(qscs QSCs) error
- func (account *QOSAccount) MustMinus(qos btypes.BigInt, qscs QSCs)
- func (account *QOSAccount) MustMinusQOS(qos btypes.BigInt)
- func (account *QOSAccount) MustMinusQSC(qsc QSC)
- func (account *QOSAccount) MustMinusQSCs(qscs QSCs)
- func (account *QOSAccount) MustPlus(qos btypes.BigInt, qscs QSCs)
- func (account *QOSAccount) MustPlusQOS(qos btypes.BigInt)
- func (account *QOSAccount) MustPlusQSC(qsc QSC)
- func (account *QOSAccount) MustPlusQSCs(qscs QSCs)
- func (account *QOSAccount) Plus(qos btypes.BigInt, qscs QSCs) error
- func (account *QOSAccount) PlusQOS(qos btypes.BigInt) error
- func (account *QOSAccount) PlusQSC(qsc QSC) error
- func (account *QOSAccount) PlusQSCs(qscs QSCs) error
- func (account *QOSAccount) RemoveQSC(qscName string)
- func (account *QOSAccount) SetQOS(qos btypes.BigInt) error
- func (account *QOSAccount) SetQSC(qsc QSC) error
- func (account *QOSAccount) UnmarshalJSON(bz []byte) error
- type QSC
- type QSCs
- type Querier
- type QueryRegistry
Constants ¶
const ( Decimal = 4 //4位精度 TotalQOSAmount = 100e8 //100亿 )
const ( Precision = 18 // bytes required to represent the above precision // Ceiling[Log2[999 999 999 999 999 999]] DecimalPrecisionBits = 60 )
number of decimal places
const (
QOSCoinName = "QOS"
)
Variables ¶
var ( UnitQOS = math.Pow(10, Decimal) // QOS unit DefaultTotalUnitQOSQuantity = int64(TotalQOSAmount * UnitQOS) // total QOS amount DefaultBlockInterval = int64(5) // 5 seconds UnitQOSGas = int64(100) // 1 QOS = 100 gas )
var ( DefaultCLIHome = os.ExpandEnv("$HOME/.qoscli") DefaultNodeHome = os.ExpandEnv("$HOME/.qosd") )
var (
// event type for invariant checking
EventTypeInvariantCheck = "invariant_check"
)
Functions ¶
func FormatInvariant ¶ added in v0.0.6
func FormatInvariant(module, name, msg string, coins types.BaseCoins, broken bool) (string, types.BaseCoins, bool)
FormatInvariant returns a standardized invariant message along with a boolean indicating whether the invariant has been broken.
func GetDefaultChainId ¶ added in v0.0.2
Get default chain-id.
func GetIntFromFlag ¶ added in v0.0.8
从flag中解析Int值
func ProtoQOSAccount ¶ added in v0.0.4
func Uint64ToBigEndian ¶ added in v0.0.6
Uint64ToBigEndian - marshals uint64 to a bigendian byte slice so it can be sorted
Types ¶
type AppModule ¶ added in v0.0.6
type AppModule interface { AppModuleGenesis // registers RegisterInvariants(InvariantRegistry) RegisterQuerier(QueryRegistry) BeginBlock(context.Context, abci.RequestBeginBlock) EndBlock(context.Context, abci.RequestEndBlock) []abci.ValidatorUpdate }
AppModule is the standard form for an application module
func NewGenesisOnlyAppModule ¶ added in v0.0.6
func NewGenesisOnlyAppModule(amg AppModuleGenesis) AppModule
NewGenesisOnlyAppModule creates a new GenesisOnlyAppModule object
type AppModuleBasic ¶ added in v0.0.6
type AppModuleBasic interface { Name() string RegisterCodec(*amino.Codec) // genesis DefaultGenesis() json.RawMessage ValidateGenesis(json.RawMessage) error // mapper and hooks GetMapperAndHooks() MapperWithHooks // client functionality GetTxCmds(*amino.Codec) []*cobra.Command GetQueryCmds(*amino.Codec) []*cobra.Command RegisterRestRoutes(ctx cliContext.CLIContext, routes *mux.Router) }
type AppModuleGenesis ¶ added in v0.0.6
type AppModuleGenesis interface { AppModuleBasic InitGenesis(context.Context, *baseabci.BaseApp, json.RawMessage) []abci.ValidatorUpdate ExportGenesis(context.Context) json.RawMessage }
_________________________________________________________ AppModuleGenesis is the standard form for an application module genesis functions
type BasicManager ¶ added in v0.0.6
type BasicManager map[string]AppModuleBasic
collections of AppModuleBasic
func NewBasicManager ¶ added in v0.0.6
func NewBasicManager(modules ...AppModuleBasic) BasicManager
func (BasicManager) AddQueryCommands ¶ added in v0.0.6
func (bm BasicManager) AddQueryCommands(rootQueryCmd *cobra.Command, cdc *amino.Codec)
add all query commands to the rootQueryCmd
func (BasicManager) AddTxCommands ¶ added in v0.0.6
func (bm BasicManager) AddTxCommands(rootTxCmd *cobra.Command, cdc *amino.Codec)
add all tx commands to the rootTxCmd
func (BasicManager) DefaultGenesis ¶ added in v0.0.6
func (bm BasicManager) DefaultGenesis() map[string]json.RawMessage
Provided default genesis information for all modules
func (BasicManager) RegisterCodec ¶ added in v0.0.6
func (bm BasicManager) RegisterCodec(cdc *amino.Codec)
RegisterCodecs registers all module codecs
func (BasicManager) RegisterRoutes ¶ added in v0.0.8
func (bm BasicManager) RegisterRoutes(ctx cliContext.CLIContext, routes *mux.Router)
func (BasicManager) ValidateGenesis ¶ added in v0.0.6
func (bm BasicManager) ValidateGenesis(genesis map[string]json.RawMessage) error
Provided default genesis information for all modules
type Dec ¶ added in v0.0.4
NOTE: never use new(Dec) or else we will panic unmarshalling into the nil embedded big.Int
func MustNewDecFromStr ¶ added in v0.0.4
Decimal from string, panic on error
func NewDecFromBigInt ¶ added in v0.0.4
create a new Dec from big integer assuming whole numbers CONTRACT: prec <= Precision
func NewDecFromBigIntWithPrec ¶ added in v0.0.4
create a new Dec from big integer assuming whole numbers CONTRACT: prec <= Precision
func NewDecFromInt ¶ added in v0.0.4
create a new Dec from big integer assuming whole numbers CONTRACT: prec <= Precision
func NewDecFromIntWithPrec ¶ added in v0.0.4
create a new Dec from big integer with decimal place at prec CONTRACT: prec <= Precision
func NewDecFromStr ¶ added in v0.0.4
create a decimal from an input decimal string. valid must come in the form:
(-) whole integers (.) decimal integers
examples of acceptable input include:
-123.456 456.7890 345 -456789
NOTE - An error will return if more decimal places are provided in the string than the constant Precision.
CONTRACT - This function does not mutate the input str.
func NewDecWithPrec ¶ added in v0.0.4
create a new Dec from integer with decimal place at prec CONTRACT: prec <= Precision
func (Dec) Ceil ¶ added in v0.0.4
Ceil returns the smallest interger value (as a decimal) that is greater than or equal to the given decimal.
func (Dec) IsNegative ¶ added in v0.0.4
func (Dec) IsNil ¶ added in v0.0.4
______________________________________________________________________________________________ nolint
func (Dec) IsPositive ¶ added in v0.0.4
func (Dec) MarshalAmino ¶ added in v0.0.4
wraps d.MarshalText()
func (Dec) MarshalJSON ¶ added in v0.0.4
MarshalJSON marshals the decimal
func (Dec) MulTruncate ¶ added in v0.0.4
multiplication truncate
func (Dec) RoundInt64 ¶ added in v0.0.4
RoundInt64 rounds the decimal using bankers rounding
func (Dec) TruncateDec ¶ added in v0.0.4
TruncateDec truncates the decimals from the number and returns a Dec
func (Dec) TruncateInt ¶ added in v0.0.4
TruncateInt truncates the decimals from the number and returns an Int
func (Dec) TruncateInt64 ¶ added in v0.0.4
TruncateInt64 truncates the decimals from the number and returns an int64
func (*Dec) UnmarshalAmino ¶ added in v0.0.4
requires a valid JSON string - strings quotes and calls UnmarshalText
func (*Dec) UnmarshalJSON ¶ added in v0.0.4
UnmarshalJSON defines custom decoding scheme
type Fraction ¶ added in v0.0.4
type Fraction struct {
Value Dec `json:"value"`
}
func NewFraction ¶ added in v0.0.4
func NewFractionFromBigInt ¶ added in v0.0.4
func OneFraction ¶ added in v0.0.4
func OneFraction() Fraction
func ZeroFraction ¶ added in v0.0.4
func ZeroFraction() Fraction
func (Fraction) MultiBigInt ¶ added in v0.0.4
type GenesisOnlyAppModule ¶ added in v0.0.6
type GenesisOnlyAppModule struct {
AppModuleGenesis
}
___________________________ app module
func (GenesisOnlyAppModule) BeginBlock ¶ added in v0.0.6
func (gam GenesisOnlyAppModule) BeginBlock(ctx context.Context, req abci.RequestBeginBlock)
module begin-block
func (GenesisOnlyAppModule) EndBlock ¶ added in v0.0.6
func (GenesisOnlyAppModule) EndBlock(_ context.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
module end-block
func (GenesisOnlyAppModule) RegisterInvariants ¶ added in v0.0.6
func (GenesisOnlyAppModule) RegisterInvariants(_ InvariantRegistry)
register invariants
func (GenesisOnlyAppModule) RegisterQuerier ¶ added in v0.0.6
func (GenesisOnlyAppModule) RegisterQuerier(_ QueryRegistry)
register querier
type GenesisState ¶ added in v0.0.6
type GenesisState map[string]json.RawMessage
func (GenesisState) UnmarshalModuleState ¶ added in v0.0.6
func (gs GenesisState) UnmarshalModuleState(cdc *amino.Codec, module string, state interface{}) interface{}
type Hooks ¶ added in v0.0.6
type Hooks interface { // return mapper name who use this hooks HookMapper() string }
hooks for mappers
type HooksMapper ¶ added in v0.0.6
type HooksMapper interface {
SetHooks(hooks Hooks)
}
type HooksMapperRegistry ¶ added in v0.0.6
type HooksMapperRegistry interface {
RegisterHooksMapper(map[string]MapperWithHooks)
}
type InvarRoute ¶ added in v0.0.6
invariant route
func NewInvarRoute ¶ added in v0.0.6
func NewInvarRoute(moduleName, route string, invar Invariant) InvarRoute
NewInvarRoute - create an InvarRoute object
func (InvarRoute) FullRoute ¶ added in v0.0.6
func (i InvarRoute) FullRoute() string
get the full invariance route
type Invariant ¶ added in v0.0.6
An Invariant is a function which tests a particular invariant. The invariant returns a descriptive message about what happened and total tokens, the mint module always return a negative value and a boolean indicating whether the invariant has been broken. The simulator will then halt and print the logs.
type InvariantRegistry ¶ added in v0.0.6
expected interface for registering invariants
type Invariants ¶ added in v0.0.6
type Invariants []Invariant
Invariants defines a group of invariants
type KeyValuePair ¶ added in v0.0.7
type KeyValuePair struct { Key []byte Value interface{} }
type KeyValuePairs ¶ added in v0.0.7
type KeyValuePairs []KeyValuePair
type Manager ¶ added in v0.0.6
type Manager struct { Modules map[string]AppModule OrderInitGenesis []string OrderExportGenesis []string OrderBeginBlockers []string OrderEndBlockers []string }
____________________________________________________________________________ module manager provides the high level utility for managing and executing operations for a group of modules
func NewManager ¶ added in v0.0.6
NewModuleManager creates a new Manager object
func (*Manager) BeginBlock ¶ added in v0.0.6
func (m *Manager) BeginBlock(ctx context.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlock performs begin block functionality for all modules. It creates a child context with an event manager to aggregate events emitted from all modules.
func (*Manager) EndBlock ¶ added in v0.0.6
func (m *Manager) EndBlock(ctx context.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlock performs end block functionality for all modules. It creates a child context with an event manager to aggregate events emitted from all modules.
func (*Manager) ExportGenesis ¶ added in v0.0.6
perform export genesis functionality for modules
func (*Manager) InitGenesis ¶ added in v0.0.6
func (m *Manager) InitGenesis(ctx context.Context, bapp *baseabci.BaseApp, genesisData map[string]json.RawMessage) abci.ResponseInitChain
perform init genesis functionality for modules
func (*Manager) RegisterInvariants ¶ added in v0.0.6
func (m *Manager) RegisterInvariants(ir InvariantRegistry)
register all module routes and module invariant routes
func (*Manager) RegisterMapperAndHooks ¶ added in v0.0.6
func (m *Manager) RegisterMapperAndHooks(hmr HooksMapperRegistry, paramsInitializerModule string, ps ...ParamSet)
register all module mapper and hooks routes
func (*Manager) RegisterQueriers ¶ added in v0.0.6
func (m *Manager) RegisterQueriers(qr QueryRegistry)
register all module querier routes
func (*Manager) SetOrderBeginBlockers ¶ added in v0.0.6
set the order of set begin-blocker calls
func (*Manager) SetOrderEndBlockers ¶ added in v0.0.6
set the order of set end-blocker calls
func (*Manager) SetOrderExportGenesis ¶ added in v0.0.6
set the order of export genesis calls
func (*Manager) SetOrderInitGenesis ¶ added in v0.0.6
set the order of init genesis calls
type MapperWithHooks ¶ added in v0.0.6
mapper for db
func NewMapperWithHooks ¶ added in v0.0.6
func NewMapperWithHooks(mapper mapper.IMapper, hooks Hooks) MapperWithHooks
func (*MapperWithHooks) IsNil ¶ added in v0.0.6
func (mh *MapperWithHooks) IsNil() bool
type MetricsMapper ¶ added in v0.0.8
type MetricsMapper interface {
SetUpMetrics(cfg *config.InstrumentationConfig)
}
type ParamSet ¶ added in v0.0.7
type ParamSet interface { // 参数键值对 KeyValuePairs() KeyValuePairs // 单个参数类型和值校验 ValidateKeyValue(key string, value string) (interface{}, btypes.Error) // 参数所属模块名 GetParamSpace() string // 参数校验 Validate() btypes.Error // 设置单个参数 SetKeyValue(key string, value interface{}) btypes.Error }
参数接口,不同模块参数结构必须实现该接口并注册到params模块才能正常使用params提供的参数管理方法。
type ParamsInitializer ¶ added in v0.0.7
type ParamsInitializer interface {
RegisterParamSet(ps ...ParamSet)
}
type QOSAccount ¶ added in v0.0.4
type QOSAccount struct { account.BaseAccount `json:"base_account"` // inherits BaseAccount QOS btypes.BigInt `json:"qos"` // coins in public chain QSCs QSCs `json:"qscs"` // varied QSCs }
func NewQOSAccount ¶ added in v0.0.4
func NewQOSAccount(addr btypes.AccAddress, qos btypes.BigInt, qscs QSCs) *QOSAccount
func NewQOSAccountWithAddress ¶ added in v0.0.4
func NewQOSAccountWithAddress(addr btypes.AccAddress) *QOSAccount
func NewQOSAccountZero ¶ added in v0.0.4
func NewQOSAccountZero() *QOSAccount
func ParseAccounts ¶ added in v0.0.4
func ParseAccounts(str, clientHome string) ([]*QOSAccount, error)
Parse accounts from string address16lwp3kykkjdc2gdknpjy6u9uhfpa9q4vj78ytd,1000000qos,1000000qstars. Multiple accounts separated by ';'
func (*QOSAccount) EnoughOf ¶ added in v0.0.4
func (account *QOSAccount) EnoughOf(qos btypes.BigInt, qscs QSCs) bool
func (*QOSAccount) EnoughOfQOS ¶ added in v0.0.4
func (account *QOSAccount) EnoughOfQOS(qos btypes.BigInt) bool
是否有足够QOS
func (*QOSAccount) EnoughOfQSC ¶ added in v0.0.4
func (account *QOSAccount) EnoughOfQSC(qsc QSC) bool
是否有足够QSC
func (*QOSAccount) EnoughOfQSCs ¶ added in v0.0.4
func (account *QOSAccount) EnoughOfQSCs(qscs QSCs) bool
是否有足够QSCs
func (*QOSAccount) GetQOS ¶ added in v0.0.4
func (account *QOSAccount) GetQOS() btypes.BigInt
func (*QOSAccount) GetQSC ¶ added in v0.0.4
func (account *QOSAccount) GetQSC(qscName string) (qsc QSC, exists bool)
返回指定币种币值
func (*QOSAccount) GetQSCs ¶ added in v0.0.4
func (account *QOSAccount) GetQSCs() QSCs
func (*QOSAccount) MarshalJSON ¶ added in v0.0.8
func (account *QOSAccount) MarshalJSON() ([]byte, error)
func (*QOSAccount) Minus ¶ added in v0.0.4
func (account *QOSAccount) Minus(qos btypes.BigInt, qscs QSCs) error
减少QOS,QSCs
func (*QOSAccount) MinusQOS ¶ added in v0.0.4
func (account *QOSAccount) MinusQOS(qos btypes.BigInt) error
减少QOS,减少量小于0或结果小于0时返回错误
func (*QOSAccount) MinusQSC ¶ added in v0.0.4
func (account *QOSAccount) MinusQSC(qsc QSC) error
减少QSC
func (*QOSAccount) MinusQSCs ¶ added in v0.0.4
func (account *QOSAccount) MinusQSCs(qscs QSCs) error
减少QSCs
func (*QOSAccount) MustMinus ¶ added in v0.0.4
func (account *QOSAccount) MustMinus(qos btypes.BigInt, qscs QSCs)
func (*QOSAccount) MustMinusQOS ¶ added in v0.0.4
func (account *QOSAccount) MustMinusQOS(qos btypes.BigInt)
减少QOS,返回错误panic
func (*QOSAccount) MustMinusQSC ¶ added in v0.0.4
func (account *QOSAccount) MustMinusQSC(qsc QSC)
func (*QOSAccount) MustMinusQSCs ¶ added in v0.0.4
func (account *QOSAccount) MustMinusQSCs(qscs QSCs)
func (*QOSAccount) MustPlus ¶ added in v0.0.4
func (account *QOSAccount) MustPlus(qos btypes.BigInt, qscs QSCs)
func (*QOSAccount) MustPlusQOS ¶ added in v0.0.4
func (account *QOSAccount) MustPlusQOS(qos btypes.BigInt)
增加QOS,返回错误时panic
func (*QOSAccount) MustPlusQSC ¶ added in v0.0.4
func (account *QOSAccount) MustPlusQSC(qsc QSC)
func (*QOSAccount) MustPlusQSCs ¶ added in v0.0.4
func (account *QOSAccount) MustPlusQSCs(qscs QSCs)
func (*QOSAccount) Plus ¶ added in v0.0.4
func (account *QOSAccount) Plus(qos btypes.BigInt, qscs QSCs) error
增加QOS,QSCs
func (*QOSAccount) PlusQOS ¶ added in v0.0.4
func (account *QOSAccount) PlusQOS(qos btypes.BigInt) error
增加QOS,增加量小于0时返回错误
func (*QOSAccount) PlusQSC ¶ added in v0.0.4
func (account *QOSAccount) PlusQSC(qsc QSC) error
增加QSC
func (*QOSAccount) PlusQSCs ¶ added in v0.0.4
func (account *QOSAccount) PlusQSCs(qscs QSCs) error
增加QSCs
func (*QOSAccount) RemoveQSC ¶ added in v0.0.4
func (account *QOSAccount) RemoveQSC(qscName string)
移除QSC
func (*QOSAccount) SetQOS ¶ added in v0.0.4
func (account *QOSAccount) SetQOS(qos btypes.BigInt) error
设置QOS,币值必须大于等于0
func (*QOSAccount) UnmarshalJSON ¶ added in v0.0.8
func (account *QOSAccount) UnmarshalJSON(bz []byte) error