types

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultCodespace string = "params"
	BaseParamsError         = 4001

	CodeInvalidMaxProposalNum uint32 = BaseParamsError + 4
)

Param module codespace constants

View Source
const (
	QueryParams = "params"
)

Variables

View Source
var (
	// ParamStoreKeyParamsParams is the raw store key for params module
	KeyMaxDepositPeriod = []byte("MaxDepositPeriod")
	KeyMinDeposit       = []byte("MinDeposit")
	KeyVotingPeriod     = []byte("VotingPeriod")
	KeyMaxBlockHeight   = []byte("MaxBlockHeight")
)
View Source
var (
	NewParamChange = types.NewParamChange
)
View Source
var RegisteredErrInvalidParamsNum = sdkerrors.Register(params.ModuleName, CodeInvalidMaxProposalNum, "invalid param number")

ErrInvalidMaxProposalNum returns error when the number of params to change are out of limit

Functions

func ErrInvalidParamsNum

func ErrInvalidParamsNum(codespace string, msg string) sdk.EnvelopedErr

ErrInvalidParamsNum returns error when the number of params to change are out of limit

func ParamKeyTable

func ParamKeyTable() sdkparams.KeyTable

ParamKeyTable returns the key declaration for parameters

Types

type ParamChange

type ParamChange = types.ParamChange

type ParameterChangeProposal

type ParameterChangeProposal struct {
	sdkparams.ParameterChangeProposal
	Height uint64 `json:"height" yaml:"height"`
}

ParameterChangeProposal is the struct of param change proposal

func NewParameterChangeProposal

func NewParameterChangeProposal(title, description string, changes []types.ParamChange, height uint64,
) ParameterChangeProposal

NewParameterChangeProposal creates a new instance of ParameterChangeProposal

func (ParameterChangeProposal) ValidateBasic

func (pcp ParameterChangeProposal) ValidateBasic() sdk.Error

ValidateBasic validates the parameter change proposal

type Params

type Params struct {
	// DexList proposal params
	// Maximum period for okb holders to deposit on a dex list proposal. Initial value: 2 days
	MaxDepositPeriod time.Duration `json:"max_deposit_period"`
	// Minimum deposit for a critical dex list proposal to enter voting period
	MinDeposit sdk.SysCoins `json:"min_deposit"`
	// Length of the critical voting period for dex list proposal
	VotingPeriod time.Duration `json:"voting_period"`
	// block height for dex list can not be greater than DexListMaxBlockHeight
	MaxBlockHeight uint64 `json:"max_block_height"`
}

Params is the struct of the parameters in this module

func DefaultParams

func DefaultParams() Params

DefaultParams returns the instance of Params with default value

func (*Params) ParamSetPairs

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

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

func (Params) String

func (p Params) String() string

Jump to

Keyboard shortcuts

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