Documentation ¶
Index ¶
Constants ¶
const ( DefaultCodespace string = "params" BaseParamsError = 4001 CodeInvalidMaxProposalNum uint32 = BaseParamsError + 4 )
Param module codespace constants
const (
QueryParams = "params"
)
Variables ¶
var ( // ParamStoreKeyParamsParams is the raw store key for params module KeyMaxDepositPeriod = []byte("MaxDepositPeriod") KeyMinDeposit = []byte("MinDeposit") KeyVotingPeriod = []byte("VotingPeriod") KeyMaxBlockHeight = []byte("MaxBlockHeight") )
var (
NewParamChange = types.NewParamChange
)
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 ¶
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