params

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCodespace sdk.CodespaceType = "params"
	//
	CodeInvalidString sdk.CodeType = 0

	//gov
	CodeInvalidMinDeposit        sdk.CodeType = 100
	CodeInvalidMinDepositDenom   sdk.CodeType = 101
	CodeInvalidMinDepositAmount  sdk.CodeType = 102
	CodeInvalidDepositPeriod     sdk.CodeType = 103
	CodeInvalidVotingPeriod      sdk.CodeType = 104
	CodeInvalidVotingProcedure   sdk.CodeType = 105
	CodeInvalidThreshold         sdk.CodeType = 106
	CodeInvalidParticipation     sdk.CodeType = 107
	CodeInvalidVeto              sdk.CodeType = 108
	CodeInvalidGovernancePenalty sdk.CodeType = 109
	CodeInvalidTallyingProcedure sdk.CodeType = 110
	CodeInvalidKey               sdk.CodeType = 111
	CodeInvalidModule            sdk.CodeType = 112
	CodeInvalidQueryParams       sdk.CodeType = 113
	CodeInvalidMaxProposalNum    sdk.CodeType = 114
	CodeInvalidSystemHaltPeriod  sdk.CodeType = 115

	//service
	CodeInvalidMaxRequestTimeout    sdk.CodeType = 200
	CodeInvalidMinDepositMultiple   sdk.CodeType = 201
	CodeInvalidServiceFeeTax        sdk.CodeType = 202
	CodeInvalidSlashFraction        sdk.CodeType = 203
	CodeInvalidArbitrationTimeLimit sdk.CodeType = 204
	CodeComplaintRetrospect         sdk.CodeType = 205
	CodeInvalidServiceTxSizeLimit   sdk.CodeType = 206

	//upgrade
	CodeInvalidUpgradeParams sdk.CodeType = 300

	//mint
	CodeInvalidMintInflation sdk.CodeType = 400

	//stake
	CodeInvalidUnbondingTime sdk.CodeType = 500
	CodeInvalidMaxValidators sdk.CodeType = 501
	CodeInvalidBondDenom     sdk.CodeType = 502

	//auth
	CodeInvalidGasPriceThreshold sdk.CodeType = 600
	CodeInvalidTxSizeLimit       sdk.CodeType = 601

	//distribution
	CodeInvalidCommunityTax        sdk.CodeType = 700
	CodeInvalidBaseProposerReward  sdk.CodeType = 701
	CodeInvalidBonusProposerReward sdk.CodeType = 702

	//slash
	CodeInvalidSlashParams sdk.CodeType = 800
)
View Source
const (
	// StoreKey is the string key for the params store
	StoreKey = subspace.StoreKey

	// TStoreKey is the string key for the params transient store
	TStoreKey = subspace.TStoreKey
)
View Source
const (
	QueryModule = "module"
)

query endpoints supported by the params Querier

Variables

This section is empty.

Functions

func ErrInvalidString

func ErrInvalidString(valuestr string) sdk.Error

func GetParamKey

func GetParamKey(keystr string) string

func GetParamSpaceFromKey

func GetParamSpaceFromKey(keystr string) string

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

creates a querier for params REST endpoints

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

Register concrete types on codec codec

func RegisterParamSet

func RegisterParamSet(paramSets map[string]ParamSet, ps ...ParamSet)

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper of the global paramstore

func NewKeeper

func NewKeeper(cdc *codec.Codec, key *sdk.KVStoreKey, tkey *sdk.TransientStoreKey) (k Keeper)

NewKeeper constructs a params keeper

func (Keeper) GetParams

func (k Keeper) GetParams(paramSpace string) (ParamSet, bool)

Get existing substore from keeper

func (Keeper) GetSubspace

func (k Keeper) GetSubspace(storename string) (Subspace, bool)

Get existing substore from keeper

func (Keeper) RegisterParamSet

func (k Keeper) RegisterParamSet(ps ...ParamSet)

func (Keeper) Subspace

func (k Keeper) Subspace(spacename string) Subspace

Allocate subspace used for keepers

type KeyTable

type KeyTable = subspace.KeyTable

re-export types from subspace

func NewKeyTable

func NewKeyTable(keytypes ...interface{}) KeyTable

nolint - re-export functions from subspace

type ParamSet

type ParamSet = subspace.ParamSet

re-export types from subspace

type ParamSetPairs

type ParamSetPairs = subspace.ParamSetPairs

re-export types from subspace

type QueryModuleParams

type QueryModuleParams struct {
	Module string
}

defines the params for query: "custom/params/module"

type ReadOnlySubspace

type ReadOnlySubspace = subspace.ReadOnlySubspace

re-export types from subspace

type Subspace

type Subspace = subspace.Subspace

re-export types from subspace

func DefaultTestComponents

func DefaultTestComponents(t *testing.T) (sdk.Context, Subspace, func([]*types.KVStoreKey) sdk.CommitID)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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