Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package v036 is used for legacy migration scripts. Actual migration scripts for v036 have been removed, but the v039->v042 migration script still references types from this file, so we're keeping it for now.
Index ¶
- Constants
 - func ErrEmptyChanges(codespace string) error
 - func ErrEmptyKey(codespace string) error
 - func ErrEmptySubspace(codespace string) error
 - func ErrEmptyValue(codespace string) error
 - func ErrSettingParameter(codespace string, key, subkey, value, msg string) error
 - func ErrUnknownSubspace(codespace string, space string) error
 - func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
 - func ValidateChanges(changes []ParamChange) error
 - type ParamChange
 - type ParameterChangeProposal
 - func (pcp ParameterChangeProposal) GetDescription() string
 - func (pcp ParameterChangeProposal) GetTitle() string
 - func (pcp ParameterChangeProposal) ProposalRoute() string
 - func (pcp ParameterChangeProposal) ProposalType() string
 - func (pcp ParameterChangeProposal) String() string
 - func (pcp ParameterChangeProposal) ValidateBasic() error
 
Constants ¶
const ( // ModuleName defines the name of the module ModuleName = "params" // RouterKey defines the routing key for a ParameterChangeProposal RouterKey = "params" )
const ( DefaultCodespace = "params" CodeUnknownSubspace = 1 CodeSettingParameter = 2 CodeEmptyData = 3 )
Param module codespace constants
const (
	// ProposalTypeChange defines the type for a ParameterChangeProposal
	ProposalTypeChange = "ParameterChange"
)
    Variables ¶
This section is empty.
Functions ¶
func ErrEmptyChanges ¶
ErrEmptyChanges returns an error for empty parameter changes.
func ErrEmptyKey ¶
ErrEmptyKey returns an error for when an empty key is given.
func ErrEmptySubspace ¶
ErrEmptySubspace returns an error for an empty subspace.
func ErrEmptyValue ¶
ErrEmptyValue returns an error for when an empty key is given.
func ErrSettingParameter ¶
ErrSettingParameter returns an error for failing to set a parameter.
func ErrUnknownSubspace ¶
ErrUnknownSubspace returns an unknown subspace error.
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
func ValidateChanges ¶
func ValidateChanges(changes []ParamChange) error
ValidateChange performs basic validation checks over a set of ParamChange. It returns an error if any ParamChange is invalid.
Types ¶
type ParamChange ¶
type ParamChange struct {
	Subspace string `json:"subspace" yaml:"subspace"`
	Key      string `json:"key" yaml:"key"`
	Subkey   string `json:"subkey,omitempty" yaml:"subkey,omitempty"`
	Value    string `json:"value" yaml:"value"`
}
    ParamChange defines a parameter change.
func NewParamChange ¶
func NewParamChange(subspace, key, value string) ParamChange
func NewParamChangeWithSubkey ¶
func NewParamChangeWithSubkey(subspace, key, subkey, value string) ParamChange
func (ParamChange) String ¶
func (pc ParamChange) String() string
String implements the Stringer interface.
type ParameterChangeProposal ¶
type ParameterChangeProposal struct {
	Title       string        `json:"title" yaml:"title"`
	Description string        `json:"description" yaml:"description"`
	Changes     []ParamChange `json:"changes" yaml:"changes"`
}
    ParameterChangeProposal defines a proposal which contains multiple parameter changes.
func NewParameterChangeProposal ¶
func NewParameterChangeProposal(title, description string, changes []ParamChange) ParameterChangeProposal
func (ParameterChangeProposal) GetDescription ¶
func (pcp ParameterChangeProposal) GetDescription() string
GetDescription returns the description of a parameter change proposal.
func (ParameterChangeProposal) GetTitle ¶
func (pcp ParameterChangeProposal) GetTitle() string
GetTitle returns the title of a parameter change proposal.
func (ParameterChangeProposal) ProposalRoute ¶
func (pcp ParameterChangeProposal) ProposalRoute() string
GetDescription returns the routing key of a parameter change proposal.
func (ParameterChangeProposal) ProposalType ¶
func (pcp ParameterChangeProposal) ProposalType() string
ProposalType returns the type of a parameter change proposal.
func (ParameterChangeProposal) String ¶
func (pcp ParameterChangeProposal) String() string
String implements the Stringer interface.
func (ParameterChangeProposal) ValidateBasic ¶
func (pcp ParameterChangeProposal) ValidateBasic() error
ValidateBasic validates the parameter change proposal