types

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeUpdateParams = "update_params"

	AttributeValueCategory = ModuleName
	AttributeKeyParamKey   = "param_key"
)

params module event types

View Source
const (
	// ModuleName is the name of the params module
	ModuleName = paramtypes.ModuleName

	// StoreKey is the string store representation
	StoreKey = ModuleName

	// QuerierRoute is the querier route for the params module
	QuerierRoute = ModuleName

	// RouterKey is the msg router key for the params module
	RouterKey = ModuleName
)

Variables

View Source
var (
	ErrUnknownSubspace  = proposal.ErrUnknownSubspace
	ErrSettingParameter = proposal.ErrSettingParameter
	ErrEmptyChanges     = proposal.ErrEmptyChanges
	ErrEmptySubspace    = proposal.ErrEmptySubspace
	ErrEmptyKey         = proposal.ErrEmptyKey
	ErrEmptyValue       = proposal.ErrEmptyValue

	// Custom error codes start at 20
	ErrUnknownKey = sdkerrors.Register(ModuleName, 20, "unknown key")
)

alias params module sentinel errors

View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary interfaces and concrete types on the provided Amino codec. These types are used for Amino JSON serialization.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

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 MsgClient

type MsgClient interface {
	// UpdateParams defines a method for update a set of system params.
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgServer

type MsgServer interface {
	// UpdateParams defines a method for update a set of system params.
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateParams

type MsgUpdateParams struct {
	Changes  []ParamChange `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes"`
	Operator string        `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"`
}

MsgUpdateParams defines an SDK message for updating params.

func NewMsgUpdateParams

func NewMsgUpdateParams(changes []ParamChange, operator sdk.AccAddress) *MsgUpdateParams

NewMsgUpdateParams creates a new MsgUpdateParams instance.

func (*MsgUpdateParams) Descriptor

func (*MsgUpdateParams) Descriptor() ([]byte, []int)

func (*MsgUpdateParams) Equal

func (this *MsgUpdateParams) Equal(that interface{}) bool

func (MsgUpdateParams) GetSignBytes

func (m MsgUpdateParams) GetSignBytes() []byte

GetSignBytes implements Msg

func (MsgUpdateParams) GetSigners

func (m MsgUpdateParams) GetSigners() []sdk.AccAddress

GetSigners implements Msg

func (*MsgUpdateParams) Marshal

func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)

func (*MsgUpdateParams) MarshalTo

func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateParams) MarshalToSizedBuffer

func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset

func (m *MsgUpdateParams) Reset()

func (MsgUpdateParams) Route

func (m MsgUpdateParams) Route() string

Route implements Msg

func (*MsgUpdateParams) Size

func (m *MsgUpdateParams) Size() (n int)

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (MsgUpdateParams) Type

func (m MsgUpdateParams) Type() string

Type implements Msg

func (*MsgUpdateParams) Unmarshal

func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error

func (MsgUpdateParams) ValidateBasic

func (m MsgUpdateParams) ValidateBasic() error

ValidateBasic implements Msg

func (*MsgUpdateParams) XXX_DiscardUnknown

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal

func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateParams) XXX_Merge

func (m *MsgUpdateParams) XXX_Merge(src proto.Message)

func (*MsgUpdateParams) XXX_Size

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal

func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
}

MsgUpdateParamsResponse defines the Msg/UpdateParams response type.

func (*MsgUpdateParamsResponse) Descriptor

func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)

func (*MsgUpdateParamsResponse) Marshal

func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)

func (*MsgUpdateParamsResponse) MarshalTo

func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer

func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size

func (m *MsgUpdateParamsResponse) Size() (n int)

func (*MsgUpdateParamsResponse) String

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal

func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal

func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateParamsResponse) XXX_Merge

func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)

func (*MsgUpdateParamsResponse) XXX_Size

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal

func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error

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 (*ParamChange) Descriptor

func (*ParamChange) Descriptor() ([]byte, []int)

func (*ParamChange) Equal

func (this *ParamChange) Equal(that interface{}) bool

func (*ParamChange) Marshal

func (m *ParamChange) Marshal() (dAtA []byte, err error)

func (*ParamChange) MarshalTo

func (m *ParamChange) MarshalTo(dAtA []byte) (int, 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 (m *ParamChange) String() string

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 UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) UpdateParams

Jump to

Keyboard shortcuts

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