types

package
v0.0.0-...-962cb54 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2020 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeSpaceStakingX sdk.CodespaceType = "stakingx"

	// 401 ~ 499
	CodeInvalidMinSelfDelegation        sdk.CodeType = 401
	CodeMinSelfDelegationBelowRequired  sdk.CodeType = 402
	CodeBelowMinMandatoryCommissionRate sdk.CodeType = 403
)
View Source
const (
	// ModuleKey is the name of the module
	ModuleName = "stakingx"

	StoreKey = ModuleName

	// DefaultParamspace defines the default stakingx module parameter subspace
	DefaultParamspace = ModuleName

	// QuerierRoute is the querier route for stakingx
	QuerierRoute = ModuleName
)
View Source
const (
	DefaultMinSelfDelegation = int64(5000000e8)
)

Default parameter values

Variables

View Source
var (
	KeyMinSelfDelegation          = []byte("MinSelfDelegation")
	KeyMinMandatoryCommissionRate = []byte("MinMandatoryCommissionRate")

	DefaultMinMandatoryCommissionRate = sdk.NewDecWithPrec(1, 1)
)

Parameter keys

Functions

func ErrInvalidMinSelfDelegation

func ErrInvalidMinSelfDelegation(val int64) sdk.Error

func ErrMinSelfDelegationBelowRequired

func ErrMinSelfDelegationBelowRequired(expected, actual int64) sdk.Error

func ErrRateBelowMinMandatoryCommissionRate

func ErrRateBelowMinMandatoryCommissionRate(expected, actual sdk.Dec) sdk.Error

func ParamKeyTable

func ParamKeyTable() params.KeyTable

ParamKeyTable for stakingx module

Types

type MergedParams

type MergedParams struct {
	UnbondingTime              time.Duration `json:"unbonding_time" yaml:"unbonding_time"`
	MaxValidators              uint16        `json:"max_validators" yaml:"max_validators"`
	MaxEntries                 uint16        `json:"max_entries" yaml:"max_entries"`
	BondDenom                  string        `json:"bond_denom" yaml:"bond_denom"`
	MinSelfDelegation          int64         `json:"min_self_delegation" yaml:"min_self_delegation"`
	MinMandatoryCommissionRate sdk.Dec       `json:"min_mandatory_commission_rate" yaml:"min_mandatory_commission_rate"`
}

staking.Params & stakingx.Params

func NewMergedParams

func NewMergedParams(params staking.Params, paramsx Params) MergedParams

func (MergedParams) String

func (p MergedParams) String() string

type Params

type Params struct {
	MinSelfDelegation          int64   `json:"min_self_delegation"`
	MinMandatoryCommissionRate sdk.Dec `json:"min_mandatory_commission_rate"`
}

Params defines the parameters for the stakingx module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() params.ParamSetPairs

ParamSetPairs implements the ParamSet interface and returns all the key/value pairs pairs of stakingx module's parameters.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL