Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCodec(cdc *codec.Codec)
- func ValidateChanges(changes []ParamChange) error
- type Codec
- type ParamChange
- func (*ParamChange) Descriptor() ([]byte, []int)
- func (this *ParamChange) Equal(that interface{}) bool
- func (m *ParamChange) GetKey() string
- func (m *ParamChange) GetSubspace() string
- func (m *ParamChange) GetValue() string
- func (m *ParamChange) Marshal() (dAtA []byte, err error)
- func (m *ParamChange) MarshalTo(dAtA []byte) (int, error)
- func (m *ParamChange) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ParamChange) ProtoMessage()
- func (m *ParamChange) Reset()
- func (m *ParamChange) Size() (n int)
- func (pc ParamChange) String() string
- func (m *ParamChange) Unmarshal(dAtA []byte) error
- func (m *ParamChange) XXX_DiscardUnknown()
- func (m *ParamChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ParamChange) XXX_Merge(src proto.Message)
- func (m *ParamChange) XXX_Size() int
- func (m *ParamChange) XXX_Unmarshal(b []byte) error
- type ParameterChangeProposal
- func (*ParameterChangeProposal) Descriptor() ([]byte, []int)
- func (this *ParameterChangeProposal) Equal(that interface{}) bool
- func (pcp ParameterChangeProposal) GetDescription() string
- func (pcp ParameterChangeProposal) GetTitle() string
- func (m *ParameterChangeProposal) Marshal() (dAtA []byte, err error)
- func (m *ParameterChangeProposal) MarshalTo(dAtA []byte) (int, error)
- func (m *ParameterChangeProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (pcp ParameterChangeProposal) ProposalRoute() string
- func (pcp ParameterChangeProposal) ProposalType() string
- func (*ParameterChangeProposal) ProtoMessage()
- func (m *ParameterChangeProposal) Reset()
- func (m *ParameterChangeProposal) Size() (n int)
- func (pcp ParameterChangeProposal) String() string
- func (m *ParameterChangeProposal) Unmarshal(dAtA []byte) error
- func (pcp ParameterChangeProposal) ValidateBasic() error
- func (m *ParameterChangeProposal) XXX_DiscardUnknown()
- func (m *ParameterChangeProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ParameterChangeProposal) XXX_Merge(src proto.Message)
- func (m *ParameterChangeProposal) XXX_Size() int
- func (m *ParameterChangeProposal) XXX_Unmarshal(b []byte) error
Constants ¶
const ( // ModuleName defines the name of the module ModuleName = "kuparams" // RouterKey defines the routing key for a ParameterChangeProposal RouterKey = "kuparams" )
const (
// ProposalTypeChange defines the type for a ParameterChangeProposal
ProposalTypeChange = "ParameterChange"
)
Variables ¶
var ( ErrUnknownSubspace = sdkerrors.Register(ModuleName, 2, "unknown subspace") ErrSettingParameter = sdkerrors.Register(ModuleName, 3, "failed to set parameter") ErrEmptyChanges = sdkerrors.Register(ModuleName, 4, "submitted parameter changes are empty") ErrEmptySubspace = sdkerrors.Register(ModuleName, 5, "parameter subspace is empty") ErrEmptyKey = sdkerrors.Register(ModuleName, 6, "parameter key is empty") ErrEmptyValue = sdkerrors.Register(ModuleName, 7, "parameter value is empty") )
x/params module sentinel errors
Functions ¶
func RegisterCodec ¶
RegisterCodec registers all necessary param module types with a given codec.
func ValidateChanges ¶
func ValidateChanges(changes []ParamChange) error
ValidateChanges 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 `protobuf:"bytes,1,opt,name=subspace,proto3" json:"subspace,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` }
ParamChange defines a parameter change.
func NewParamChange ¶
func NewParamChange(subspace, key, value string) ParamChange
func (*ParamChange) Descriptor ¶
func (*ParamChange) Descriptor() ([]byte, []int)
func (*ParamChange) Equal ¶
func (this *ParamChange) Equal(that interface{}) bool
func (*ParamChange) GetKey ¶
func (m *ParamChange) GetKey() string
func (*ParamChange) GetSubspace ¶
func (m *ParamChange) GetSubspace() string
func (*ParamChange) GetValue ¶
func (m *ParamChange) GetValue() string
func (*ParamChange) Marshal ¶
func (m *ParamChange) Marshal() (dAtA []byte, err error)
func (*ParamChange) MarshalToSizedBuffer ¶
func (m *ParamChange) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ParamChange) ProtoMessage ¶
func (*ParamChange) ProtoMessage()
func (*ParamChange) Reset ¶
func (m *ParamChange) Reset()
func (*ParamChange) Size ¶
func (m *ParamChange) Size() (n int)
func (ParamChange) String ¶
func (pc ParamChange) String() string
String implements the Stringer interface.
func (*ParamChange) Unmarshal ¶
func (m *ParamChange) Unmarshal(dAtA []byte) error
func (*ParamChange) XXX_DiscardUnknown ¶
func (m *ParamChange) XXX_DiscardUnknown()
func (*ParamChange) XXX_Marshal ¶
func (m *ParamChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ParamChange) XXX_Merge ¶
func (m *ParamChange) XXX_Merge(src proto.Message)
func (*ParamChange) XXX_Size ¶
func (m *ParamChange) XXX_Size() int
func (*ParamChange) XXX_Unmarshal ¶
func (m *ParamChange) XXX_Unmarshal(b []byte) error
type ParameterChangeProposal ¶
type ParameterChangeProposal struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Changes []ParamChange `protobuf:"bytes,3,rep,name=changes,proto3" json:"changes"` }
ParameterChangeProposal defines a proposal which contains multiple parameter changes.
func NewParameterChangeProposal ¶
func NewParameterChangeProposal(title, description string, changes []ParamChange) ParameterChangeProposal
func (*ParameterChangeProposal) Descriptor ¶
func (*ParameterChangeProposal) Descriptor() ([]byte, []int)
func (*ParameterChangeProposal) Equal ¶
func (this *ParameterChangeProposal) Equal(that interface{}) bool
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) Marshal ¶
func (m *ParameterChangeProposal) Marshal() (dAtA []byte, err error)
func (*ParameterChangeProposal) MarshalTo ¶
func (m *ParameterChangeProposal) MarshalTo(dAtA []byte) (int, error)
func (*ParameterChangeProposal) MarshalToSizedBuffer ¶
func (m *ParameterChangeProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (ParameterChangeProposal) ProposalRoute ¶
func (pcp ParameterChangeProposal) ProposalRoute() string
ProposalRoute 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) ProtoMessage ¶
func (*ParameterChangeProposal) ProtoMessage()
func (*ParameterChangeProposal) Reset ¶
func (m *ParameterChangeProposal) Reset()
func (*ParameterChangeProposal) Size ¶
func (m *ParameterChangeProposal) Size() (n int)
func (ParameterChangeProposal) String ¶
func (pcp ParameterChangeProposal) String() string
String implements the Stringer interface.
func (*ParameterChangeProposal) Unmarshal ¶
func (m *ParameterChangeProposal) Unmarshal(dAtA []byte) error
func (ParameterChangeProposal) ValidateBasic ¶
func (pcp ParameterChangeProposal) ValidateBasic() error
ValidateBasic validates the parameter change proposal
func (*ParameterChangeProposal) XXX_DiscardUnknown ¶
func (m *ParameterChangeProposal) XXX_DiscardUnknown()
func (*ParameterChangeProposal) XXX_Marshal ¶
func (m *ParameterChangeProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ParameterChangeProposal) XXX_Merge ¶
func (m *ParameterChangeProposal) XXX_Merge(src proto.Message)
func (*ParameterChangeProposal) XXX_Size ¶
func (m *ParameterChangeProposal) XXX_Size() int
func (*ParameterChangeProposal) XXX_Unmarshal ¶
func (m *ParameterChangeProposal) XXX_Unmarshal(b []byte) error