diff --git a/UPGRADING.md b/UPGRADING.md index 64f8b56780..887fb2a1e4 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -277,6 +277,10 @@ Authz was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/authz Bank was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/bank` +### `x/crsis` + +The Crisis module was removed due to it not being supported or functional any longer. + #### `x/distribution` Distribution was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/distribution` diff --git a/api/cosmos/crisis/module/v1/module.pulsar.go b/api/cosmos/crisis/module/v1/module.pulsar.go deleted file mode 100644 index 2e0a34d7d3..0000000000 --- a/api/cosmos/crisis/module/v1/module.pulsar.go +++ /dev/null @@ -1,654 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package modulev1 - -import ( - _ "cosmossdk.io/api/cosmos/app/v1alpha1" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Module protoreflect.MessageDescriptor - fd_Module_fee_collector_name protoreflect.FieldDescriptor - fd_Module_authority protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crisis_module_v1_module_proto_init() - md_Module = File_cosmos_crisis_module_v1_module_proto.Messages().ByName("Module") - fd_Module_fee_collector_name = md_Module.Fields().ByName("fee_collector_name") - fd_Module_authority = md_Module.Fields().ByName("authority") -} - -var _ protoreflect.Message = (*fastReflection_Module)(nil) - -type fastReflection_Module Module - -func (x *Module) ProtoReflect() protoreflect.Message { - return (*fastReflection_Module)(x) -} - -func (x *Module) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crisis_module_v1_module_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Module_messageType fastReflection_Module_messageType -var _ protoreflect.MessageType = fastReflection_Module_messageType{} - -type fastReflection_Module_messageType struct{} - -func (x fastReflection_Module_messageType) Zero() protoreflect.Message { - return (*fastReflection_Module)(nil) -} -func (x fastReflection_Module_messageType) New() protoreflect.Message { - return new(fastReflection_Module) -} -func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Module -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { - return md_Module -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Module) Type() protoreflect.MessageType { - return _fastReflection_Module_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Module) New() protoreflect.Message { - return new(fastReflection_Module) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { - return (*Module)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.FeeCollectorName != "" { - value := protoreflect.ValueOfString(x.FeeCollectorName) - if !f(fd_Module_fee_collector_name, value) { - return - } - } - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_Module_authority, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crisis.module.v1.Module.fee_collector_name": - return x.FeeCollectorName != "" - case "cosmos.crisis.module.v1.Module.authority": - return x.Authority != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.module.v1.Module")) - } - panic(fmt.Errorf("message cosmos.crisis.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crisis.module.v1.Module.fee_collector_name": - x.FeeCollectorName = "" - case "cosmos.crisis.module.v1.Module.authority": - x.Authority = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.module.v1.Module")) - } - panic(fmt.Errorf("message cosmos.crisis.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crisis.module.v1.Module.fee_collector_name": - value := x.FeeCollectorName - return protoreflect.ValueOfString(value) - case "cosmos.crisis.module.v1.Module.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.module.v1.Module")) - } - panic(fmt.Errorf("message cosmos.crisis.module.v1.Module does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crisis.module.v1.Module.fee_collector_name": - x.FeeCollectorName = value.Interface().(string) - case "cosmos.crisis.module.v1.Module.authority": - x.Authority = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.module.v1.Module")) - } - panic(fmt.Errorf("message cosmos.crisis.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crisis.module.v1.Module.fee_collector_name": - panic(fmt.Errorf("field fee_collector_name of message cosmos.crisis.module.v1.Module is not mutable")) - case "cosmos.crisis.module.v1.Module.authority": - panic(fmt.Errorf("field authority of message cosmos.crisis.module.v1.Module is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.module.v1.Module")) - } - panic(fmt.Errorf("message cosmos.crisis.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crisis.module.v1.Module.fee_collector_name": - return protoreflect.ValueOfString("") - case "cosmos.crisis.module.v1.Module.authority": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.module.v1.Module")) - } - panic(fmt.Errorf("message cosmos.crisis.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crisis.module.v1.Module", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Module) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.FeeCollectorName) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0x12 - } - if len(x.FeeCollectorName) > 0 { - i -= len(x.FeeCollectorName) - copy(dAtA[i:], x.FeeCollectorName) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeeCollectorName))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeCollectorName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.FeeCollectorName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/crisis/module/v1/module.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Module is the config object of the crisis module. -type Module struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // fee_collector_name is the name of the FeeCollector ModuleAccount. - FeeCollectorName string `protobuf:"bytes,1,opt,name=fee_collector_name,json=feeCollectorName,proto3" json:"fee_collector_name,omitempty"` - // authority defines the custom module authority. If not set, defaults to the governance module. - Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` -} - -func (x *Module) Reset() { - *x = Module{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crisis_module_v1_module_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Module) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Module) ProtoMessage() {} - -// Deprecated: Use Module.ProtoReflect.Descriptor instead. -func (*Module) Descriptor() ([]byte, []int) { - return file_cosmos_crisis_module_v1_module_proto_rawDescGZIP(), []int{0} -} - -func (x *Module) GetFeeCollectorName() string { - if x != nil { - return x.FeeCollectorName - } - return "" -} - -func (x *Module) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -var File_cosmos_crisis_module_v1_module_proto protoreflect.FileDescriptor - -var file_cosmos_crisis_module_v1_module_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2f, - 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, - 0x72, 0x69, 0x73, 0x69, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, - 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x83, 0x01, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x12, - 0x66, 0x65, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x66, 0x65, 0x65, 0x43, 0x6f, 0x6c, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x2d, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x27, - 0x0a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, - 0x2f, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x42, 0xdc, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2e, 0x6d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, - 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, - 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x4d, 0xaa, - 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2e, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x69, - 0x73, 0x69, 0x73, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1a, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_crisis_module_v1_module_proto_rawDescOnce sync.Once - file_cosmos_crisis_module_v1_module_proto_rawDescData = file_cosmos_crisis_module_v1_module_proto_rawDesc -) - -func file_cosmos_crisis_module_v1_module_proto_rawDescGZIP() []byte { - file_cosmos_crisis_module_v1_module_proto_rawDescOnce.Do(func() { - file_cosmos_crisis_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_crisis_module_v1_module_proto_rawDescData) - }) - return file_cosmos_crisis_module_v1_module_proto_rawDescData -} - -var file_cosmos_crisis_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_crisis_module_v1_module_proto_goTypes = []interface{}{ - (*Module)(nil), // 0: cosmos.crisis.module.v1.Module -} -var file_cosmos_crisis_module_v1_module_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_crisis_module_v1_module_proto_init() } -func file_cosmos_crisis_module_v1_module_proto_init() { - if File_cosmos_crisis_module_v1_module_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_crisis_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_crisis_module_v1_module_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_crisis_module_v1_module_proto_goTypes, - DependencyIndexes: file_cosmos_crisis_module_v1_module_proto_depIdxs, - MessageInfos: file_cosmos_crisis_module_v1_module_proto_msgTypes, - }.Build() - File_cosmos_crisis_module_v1_module_proto = out.File - file_cosmos_crisis_module_v1_module_proto_rawDesc = nil - file_cosmos_crisis_module_v1_module_proto_goTypes = nil - file_cosmos_crisis_module_v1_module_proto_depIdxs = nil -} diff --git a/api/cosmos/crisis/v1beta1/genesis.pulsar.go b/api/cosmos/crisis/v1beta1/genesis.pulsar.go deleted file mode 100644 index 301a23ec50..0000000000 --- a/api/cosmos/crisis/v1beta1/genesis.pulsar.go +++ /dev/null @@ -1,600 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package crisisv1beta1 - -import ( - _ "cosmossdk.io/api/amino" - v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_constant_fee protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crisis_v1beta1_genesis_proto_init() - md_GenesisState = File_cosmos_crisis_v1beta1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_constant_fee = md_GenesisState.Fields().ByName("constant_fee") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crisis_v1beta1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ConstantFee != nil { - value := protoreflect.ValueOfMessage(x.ConstantFee.ProtoReflect()) - if !f(fd_GenesisState_constant_fee, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.GenesisState.constant_fee": - return x.ConstantFee != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.GenesisState.constant_fee": - x.ConstantFee = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crisis.v1beta1.GenesisState.constant_fee": - value := x.ConstantFee - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.GenesisState.constant_fee": - x.ConstantFee = value.Message().Interface().(*v1beta1.Coin) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.GenesisState.constant_fee": - if x.ConstantFee == nil { - x.ConstantFee = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.ConstantFee.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.GenesisState.constant_fee": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crisis.v1beta1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.ConstantFee != nil { - l = options.Size(x.ConstantFee) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.ConstantFee != nil { - encoded, err := options.Marshal(x.ConstantFee) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConstantFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.ConstantFee == nil { - x.ConstantFee = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConstantFee); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/crisis/v1beta1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the crisis module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // constant_fee is the fee used to verify the invariant in the crisis - // module. - ConstantFee *v1beta1.Coin `protobuf:"bytes,3,opt,name=constant_fee,json=constantFee,proto3" json:"constant_fee,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crisis_v1beta1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_crisis_v1beta1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetConstantFee() *v1beta1.Coin { - if x != nil { - return x.ConstantFee - } - return nil -} - -var File_cosmos_crisis_v1beta1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_crisis_v1beta1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, - 0x69, 0x73, 0x69, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, - 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x74, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, - 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x42, 0xd5, - 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, - 0x69, 0x73, 0x69, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, 0xaa, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xca, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x21, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_crisis_v1beta1_genesis_proto_rawDescOnce sync.Once - file_cosmos_crisis_v1beta1_genesis_proto_rawDescData = file_cosmos_crisis_v1beta1_genesis_proto_rawDesc -) - -func file_cosmos_crisis_v1beta1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_crisis_v1beta1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_crisis_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_crisis_v1beta1_genesis_proto_rawDescData) - }) - return file_cosmos_crisis_v1beta1_genesis_proto_rawDescData -} - -var file_cosmos_crisis_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_crisis_v1beta1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.crisis.v1beta1.GenesisState - (*v1beta1.Coin)(nil), // 1: cosmos.base.v1beta1.Coin -} -var file_cosmos_crisis_v1beta1_genesis_proto_depIdxs = []int32{ - 1, // 0: cosmos.crisis.v1beta1.GenesisState.constant_fee:type_name -> cosmos.base.v1beta1.Coin - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_crisis_v1beta1_genesis_proto_init() } -func file_cosmos_crisis_v1beta1_genesis_proto_init() { - if File_cosmos_crisis_v1beta1_genesis_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_crisis_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_crisis_v1beta1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_crisis_v1beta1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_crisis_v1beta1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_crisis_v1beta1_genesis_proto_msgTypes, - }.Build() - File_cosmos_crisis_v1beta1_genesis_proto = out.File - file_cosmos_crisis_v1beta1_genesis_proto_rawDesc = nil - file_cosmos_crisis_v1beta1_genesis_proto_goTypes = nil - file_cosmos_crisis_v1beta1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/crisis/v1beta1/tx.pulsar.go b/api/cosmos/crisis/v1beta1/tx.pulsar.go deleted file mode 100644 index e2e4c96144..0000000000 --- a/api/cosmos/crisis/v1beta1/tx.pulsar.go +++ /dev/null @@ -1,2133 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package crisisv1beta1 - -import ( - _ "cosmossdk.io/api/amino" - v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - _ "cosmossdk.io/api/cosmos/msg/v1" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_MsgVerifyInvariant protoreflect.MessageDescriptor - fd_MsgVerifyInvariant_sender protoreflect.FieldDescriptor - fd_MsgVerifyInvariant_invariant_module_name protoreflect.FieldDescriptor - fd_MsgVerifyInvariant_invariant_route protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crisis_v1beta1_tx_proto_init() - md_MsgVerifyInvariant = File_cosmos_crisis_v1beta1_tx_proto.Messages().ByName("MsgVerifyInvariant") - fd_MsgVerifyInvariant_sender = md_MsgVerifyInvariant.Fields().ByName("sender") - fd_MsgVerifyInvariant_invariant_module_name = md_MsgVerifyInvariant.Fields().ByName("invariant_module_name") - fd_MsgVerifyInvariant_invariant_route = md_MsgVerifyInvariant.Fields().ByName("invariant_route") -} - -var _ protoreflect.Message = (*fastReflection_MsgVerifyInvariant)(nil) - -type fastReflection_MsgVerifyInvariant MsgVerifyInvariant - -func (x *MsgVerifyInvariant) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVerifyInvariant)(x) -} - -func (x *MsgVerifyInvariant) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crisis_v1beta1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgVerifyInvariant_messageType fastReflection_MsgVerifyInvariant_messageType -var _ protoreflect.MessageType = fastReflection_MsgVerifyInvariant_messageType{} - -type fastReflection_MsgVerifyInvariant_messageType struct{} - -func (x fastReflection_MsgVerifyInvariant_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVerifyInvariant)(nil) -} -func (x fastReflection_MsgVerifyInvariant_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVerifyInvariant) -} -func (x fastReflection_MsgVerifyInvariant_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVerifyInvariant -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgVerifyInvariant) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVerifyInvariant -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgVerifyInvariant) Type() protoreflect.MessageType { - return _fastReflection_MsgVerifyInvariant_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVerifyInvariant) New() protoreflect.Message { - return new(fastReflection_MsgVerifyInvariant) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVerifyInvariant) Interface() protoreflect.ProtoMessage { - return (*MsgVerifyInvariant)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgVerifyInvariant) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_MsgVerifyInvariant_sender, value) { - return - } - } - if x.InvariantModuleName != "" { - value := protoreflect.ValueOfString(x.InvariantModuleName) - if !f(fd_MsgVerifyInvariant_invariant_module_name, value) { - return - } - } - if x.InvariantRoute != "" { - value := protoreflect.ValueOfString(x.InvariantRoute) - if !f(fd_MsgVerifyInvariant_invariant_route, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgVerifyInvariant) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.sender": - return x.Sender != "" - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_module_name": - return x.InvariantModuleName != "" - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_route": - return x.InvariantRoute != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariant")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariant does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVerifyInvariant) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.sender": - x.Sender = "" - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_module_name": - x.InvariantModuleName = "" - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_route": - x.InvariantRoute = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariant")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariant does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgVerifyInvariant) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_module_name": - value := x.InvariantModuleName - return protoreflect.ValueOfString(value) - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_route": - value := x.InvariantRoute - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariant")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariant does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVerifyInvariant) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.sender": - x.Sender = value.Interface().(string) - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_module_name": - x.InvariantModuleName = value.Interface().(string) - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_route": - x.InvariantRoute = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariant")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariant does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVerifyInvariant) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.sender": - panic(fmt.Errorf("field sender of message cosmos.crisis.v1beta1.MsgVerifyInvariant is not mutable")) - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_module_name": - panic(fmt.Errorf("field invariant_module_name of message cosmos.crisis.v1beta1.MsgVerifyInvariant is not mutable")) - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_route": - panic(fmt.Errorf("field invariant_route of message cosmos.crisis.v1beta1.MsgVerifyInvariant is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariant")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariant does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgVerifyInvariant) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.sender": - return protoreflect.ValueOfString("") - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_module_name": - return protoreflect.ValueOfString("") - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_route": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariant")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariant does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgVerifyInvariant) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crisis.v1beta1.MsgVerifyInvariant", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgVerifyInvariant) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVerifyInvariant) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgVerifyInvariant) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgVerifyInvariant) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVerifyInvariant) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.InvariantModuleName) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.InvariantRoute) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgVerifyInvariant) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.InvariantRoute) > 0 { - i -= len(x.InvariantRoute) - copy(dAtA[i:], x.InvariantRoute) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InvariantRoute))) - i-- - dAtA[i] = 0x1a - } - if len(x.InvariantModuleName) > 0 { - i -= len(x.InvariantModuleName) - copy(dAtA[i:], x.InvariantModuleName) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InvariantModuleName))) - i-- - dAtA[i] = 0x12 - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgVerifyInvariant) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVerifyInvariant: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVerifyInvariant: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InvariantModuleName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.InvariantModuleName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InvariantRoute", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.InvariantRoute = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgVerifyInvariantResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_crisis_v1beta1_tx_proto_init() - md_MsgVerifyInvariantResponse = File_cosmos_crisis_v1beta1_tx_proto.Messages().ByName("MsgVerifyInvariantResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgVerifyInvariantResponse)(nil) - -type fastReflection_MsgVerifyInvariantResponse MsgVerifyInvariantResponse - -func (x *MsgVerifyInvariantResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVerifyInvariantResponse)(x) -} - -func (x *MsgVerifyInvariantResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crisis_v1beta1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgVerifyInvariantResponse_messageType fastReflection_MsgVerifyInvariantResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgVerifyInvariantResponse_messageType{} - -type fastReflection_MsgVerifyInvariantResponse_messageType struct{} - -func (x fastReflection_MsgVerifyInvariantResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVerifyInvariantResponse)(nil) -} -func (x fastReflection_MsgVerifyInvariantResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVerifyInvariantResponse) -} -func (x fastReflection_MsgVerifyInvariantResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVerifyInvariantResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgVerifyInvariantResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVerifyInvariantResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgVerifyInvariantResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgVerifyInvariantResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVerifyInvariantResponse) New() protoreflect.Message { - return new(fastReflection_MsgVerifyInvariantResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVerifyInvariantResponse) Interface() protoreflect.ProtoMessage { - return (*MsgVerifyInvariantResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgVerifyInvariantResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgVerifyInvariantResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariantResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariantResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVerifyInvariantResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariantResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariantResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgVerifyInvariantResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariantResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariantResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVerifyInvariantResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariantResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariantResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVerifyInvariantResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariantResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariantResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgVerifyInvariantResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariantResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariantResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgVerifyInvariantResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crisis.v1beta1.MsgVerifyInvariantResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgVerifyInvariantResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVerifyInvariantResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgVerifyInvariantResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgVerifyInvariantResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVerifyInvariantResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgVerifyInvariantResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgVerifyInvariantResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVerifyInvariantResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVerifyInvariantResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateParams protoreflect.MessageDescriptor - fd_MsgUpdateParams_authority protoreflect.FieldDescriptor - fd_MsgUpdateParams_constant_fee protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crisis_v1beta1_tx_proto_init() - md_MsgUpdateParams = File_cosmos_crisis_v1beta1_tx_proto.Messages().ByName("MsgUpdateParams") - fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") - fd_MsgUpdateParams_constant_fee = md_MsgUpdateParams.Fields().ByName("constant_fee") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) - -type fastReflection_MsgUpdateParams MsgUpdateParams - -func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(x) -} - -func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crisis_v1beta1_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} - -type fastReflection_MsgUpdateParams_messageType struct{} - -func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(nil) -} -func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) -} -func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateParams) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParams)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgUpdateParams_authority, value) { - return - } - } - if x.ConstantFee != nil { - value := protoreflect.ValueOfMessage(x.ConstantFee.ProtoReflect()) - if !f(fd_MsgUpdateParams_constant_fee, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.MsgUpdateParams.authority": - return x.Authority != "" - case "cosmos.crisis.v1beta1.MsgUpdateParams.constant_fee": - return x.ConstantFee != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgUpdateParams")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.MsgUpdateParams.authority": - x.Authority = "" - case "cosmos.crisis.v1beta1.MsgUpdateParams.constant_fee": - x.ConstantFee = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgUpdateParams")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crisis.v1beta1.MsgUpdateParams.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "cosmos.crisis.v1beta1.MsgUpdateParams.constant_fee": - value := x.ConstantFee - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgUpdateParams")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgUpdateParams does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.MsgUpdateParams.authority": - x.Authority = value.Interface().(string) - case "cosmos.crisis.v1beta1.MsgUpdateParams.constant_fee": - x.ConstantFee = value.Message().Interface().(*v1beta1.Coin) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgUpdateParams")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.MsgUpdateParams.constant_fee": - if x.ConstantFee == nil { - x.ConstantFee = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.ConstantFee.ProtoReflect()) - case "cosmos.crisis.v1beta1.MsgUpdateParams.authority": - panic(fmt.Errorf("field authority of message cosmos.crisis.v1beta1.MsgUpdateParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgUpdateParams")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.MsgUpdateParams.authority": - return protoreflect.ValueOfString("") - case "cosmos.crisis.v1beta1.MsgUpdateParams.constant_fee": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgUpdateParams")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crisis.v1beta1.MsgUpdateParams", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateParams) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ConstantFee != nil { - l = options.Size(x.ConstantFee) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.ConstantFee != nil { - encoded, err := options.Marshal(x.ConstantFee) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConstantFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.ConstantFee == nil { - x.ConstantFee = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConstantFee); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateParamsResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_crisis_v1beta1_tx_proto_init() - md_MsgUpdateParamsResponse = File_cosmos_crisis_v1beta1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) - -type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse - -func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(x) -} - -func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crisis_v1beta1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} - -type fastReflection_MsgUpdateParamsResponse_messageType struct{} - -func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(nil) -} -func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) -} -func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParamsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crisis.v1beta1.MsgUpdateParamsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/crisis/v1beta1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgVerifyInvariant represents a message to verify a particular invariance. -type MsgVerifyInvariant struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sender is the account address of private key to send coins to fee collector account. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // name of the invariant module. - InvariantModuleName string `protobuf:"bytes,2,opt,name=invariant_module_name,json=invariantModuleName,proto3" json:"invariant_module_name,omitempty"` - // invariant_route is the msg's invariant route. - InvariantRoute string `protobuf:"bytes,3,opt,name=invariant_route,json=invariantRoute,proto3" json:"invariant_route,omitempty"` -} - -func (x *MsgVerifyInvariant) Reset() { - *x = MsgVerifyInvariant{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crisis_v1beta1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgVerifyInvariant) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgVerifyInvariant) ProtoMessage() {} - -// Deprecated: Use MsgVerifyInvariant.ProtoReflect.Descriptor instead. -func (*MsgVerifyInvariant) Descriptor() ([]byte, []int) { - return file_cosmos_crisis_v1beta1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgVerifyInvariant) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *MsgVerifyInvariant) GetInvariantModuleName() string { - if x != nil { - return x.InvariantModuleName - } - return "" -} - -func (x *MsgVerifyInvariant) GetInvariantRoute() string { - if x != nil { - return x.InvariantRoute - } - return "" -} - -// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. -type MsgVerifyInvariantResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgVerifyInvariantResponse) Reset() { - *x = MsgVerifyInvariantResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crisis_v1beta1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgVerifyInvariantResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgVerifyInvariantResponse) ProtoMessage() {} - -// Deprecated: Use MsgVerifyInvariantResponse.ProtoReflect.Descriptor instead. -func (*MsgVerifyInvariantResponse) Descriptor() ([]byte, []int) { - return file_cosmos_crisis_v1beta1_tx_proto_rawDescGZIP(), []int{1} -} - -// MsgUpdateParams is the Msg/UpdateParams request type. -type MsgUpdateParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // constant_fee defines the x/crisis parameter. - ConstantFee *v1beta1.Coin `protobuf:"bytes,2,opt,name=constant_fee,json=constantFee,proto3" json:"constant_fee,omitempty"` -} - -func (x *MsgUpdateParams) Reset() { - *x = MsgUpdateParams{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crisis_v1beta1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateParams) ProtoMessage() {} - -// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. -func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_cosmos_crisis_v1beta1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgUpdateParams) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgUpdateParams) GetConstantFee() *v1beta1.Coin { - if x != nil { - return x.ConstantFee - } - return nil -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -type MsgUpdateParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateParamsResponse) Reset() { - *x = MsgUpdateParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crisis_v1beta1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateParamsResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_crisis_v1beta1_tx_proto_rawDescGZIP(), []int{3} -} - -var File_cosmos_crisis_v1beta1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_crisis_v1beta1_tx_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, - 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x49, 0x6e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, - 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x32, 0x0a, - 0x15, 0x69, 0x6e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x69, 0x6e, - 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x5f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x76, 0x61, - 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x3a, 0x35, 0x88, 0xa0, 0x1f, 0x00, - 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, - 0xe7, 0xb0, 0x2a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, - 0x73, 0x67, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, - 0x74, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, 0x6e, - 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xdd, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x47, 0x0a, 0x0c, 0x63, - 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, - 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x74, 0x46, 0x65, 0x65, 0x3a, 0x49, 0xd2, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x37, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x23, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2f, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, - 0x2e, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x13, 0xd2, 0xb4, 0x2d, 0x0f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x37, 0x32, - 0xfa, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x6f, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x79, 0x49, 0x6e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x76, 0x61, - 0x72, 0x69, 0x61, 0x6e, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, - 0x72, 0x69, 0x73, 0x69, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7b, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x13, 0xca, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x20, 0x30, 0x2e, 0x34, 0x37, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd0, 0x01, 0x0a, - 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x69, 0x73, - 0x69, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x72, 0x69, 0x73, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x72, - 0x69, 0x73, 0x69, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, - 0x58, 0xaa, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x72, 0x69, 0x73, 0x69, - 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xe2, 0x02, 0x21, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x69, 0x73, 0x69, - 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, - 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_crisis_v1beta1_tx_proto_rawDescOnce sync.Once - file_cosmos_crisis_v1beta1_tx_proto_rawDescData = file_cosmos_crisis_v1beta1_tx_proto_rawDesc -) - -func file_cosmos_crisis_v1beta1_tx_proto_rawDescGZIP() []byte { - file_cosmos_crisis_v1beta1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_crisis_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_crisis_v1beta1_tx_proto_rawDescData) - }) - return file_cosmos_crisis_v1beta1_tx_proto_rawDescData -} - -var file_cosmos_crisis_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_cosmos_crisis_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgVerifyInvariant)(nil), // 0: cosmos.crisis.v1beta1.MsgVerifyInvariant - (*MsgVerifyInvariantResponse)(nil), // 1: cosmos.crisis.v1beta1.MsgVerifyInvariantResponse - (*MsgUpdateParams)(nil), // 2: cosmos.crisis.v1beta1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 3: cosmos.crisis.v1beta1.MsgUpdateParamsResponse - (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin -} -var file_cosmos_crisis_v1beta1_tx_proto_depIdxs = []int32{ - 4, // 0: cosmos.crisis.v1beta1.MsgUpdateParams.constant_fee:type_name -> cosmos.base.v1beta1.Coin - 0, // 1: cosmos.crisis.v1beta1.Msg.VerifyInvariant:input_type -> cosmos.crisis.v1beta1.MsgVerifyInvariant - 2, // 2: cosmos.crisis.v1beta1.Msg.UpdateParams:input_type -> cosmos.crisis.v1beta1.MsgUpdateParams - 1, // 3: cosmos.crisis.v1beta1.Msg.VerifyInvariant:output_type -> cosmos.crisis.v1beta1.MsgVerifyInvariantResponse - 3, // 4: cosmos.crisis.v1beta1.Msg.UpdateParams:output_type -> cosmos.crisis.v1beta1.MsgUpdateParamsResponse - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_crisis_v1beta1_tx_proto_init() } -func file_cosmos_crisis_v1beta1_tx_proto_init() { - if File_cosmos_crisis_v1beta1_tx_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_crisis_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVerifyInvariant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_crisis_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVerifyInvariantResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_crisis_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_crisis_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_crisis_v1beta1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_crisis_v1beta1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_crisis_v1beta1_tx_proto_depIdxs, - MessageInfos: file_cosmos_crisis_v1beta1_tx_proto_msgTypes, - }.Build() - File_cosmos_crisis_v1beta1_tx_proto = out.File - file_cosmos_crisis_v1beta1_tx_proto_rawDesc = nil - file_cosmos_crisis_v1beta1_tx_proto_goTypes = nil - file_cosmos_crisis_v1beta1_tx_proto_depIdxs = nil -} diff --git a/api/cosmos/crisis/v1beta1/tx_grpc.pb.go b/api/cosmos/crisis/v1beta1/tx_grpc.pb.go deleted file mode 100644 index 7923cab393..0000000000 --- a/api/cosmos/crisis/v1beta1/tx_grpc.pb.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: cosmos/crisis/v1beta1/tx.proto - -package crisisv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - Msg_VerifyInvariant_FullMethodName = "/cosmos.crisis.v1beta1.Msg/VerifyInvariant" - Msg_UpdateParams_FullMethodName = "/cosmos.crisis.v1beta1.Msg/UpdateParams" -) - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MsgClient interface { - // VerifyInvariant defines a method to verify a particular invariant. - VerifyInvariant(ctx context.Context, in *MsgVerifyInvariant, opts ...grpc.CallOption) (*MsgVerifyInvariantResponse, error) - // UpdateParams defines a governance operation for updating the x/crisis module - // parameters. The authority is defined in the keeper. - UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) VerifyInvariant(ctx context.Context, in *MsgVerifyInvariant, opts ...grpc.CallOption) (*MsgVerifyInvariantResponse, error) { - out := new(MsgVerifyInvariantResponse) - err := c.cc.Invoke(ctx, Msg_VerifyInvariant_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { - out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility -type MsgServer interface { - // VerifyInvariant defines a method to verify a particular invariant. - VerifyInvariant(context.Context, *MsgVerifyInvariant) (*MsgVerifyInvariantResponse, error) - // UpdateParams defines a governance operation for updating the x/crisis module - // parameters. The authority is defined in the keeper. - UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (UnimplementedMsgServer) VerifyInvariant(context.Context, *MsgVerifyInvariant) (*MsgVerifyInvariantResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VerifyInvariant not implemented") -} -func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_VerifyInvariant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgVerifyInvariant) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).VerifyInvariant(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_VerifyInvariant_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).VerifyInvariant(ctx, req.(*MsgVerifyInvariant)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateParams) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_UpdateParams_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.crisis.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "VerifyInvariant", - Handler: _Msg_VerifyInvariant_Handler, - }, - { - MethodName: "UpdateParams", - Handler: _Msg_UpdateParams_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/crisis/v1beta1/tx.proto", -} diff --git a/buf.work.yaml b/buf.work.yaml index 6b1ef77626..5a070acabf 100644 --- a/buf.work.yaml +++ b/buf.work.yaml @@ -7,7 +7,6 @@ directories: - x/bank/proto - x/circuit/proto - x/consensus/proto - - x/crisis/proto - x/distribution/proto - x/evidence/proto - x/feegrant/proto diff --git a/simapp/upgrades.go b/simapp/upgrades.go index 9433b94e37..7ff7377840 100644 --- a/simapp/upgrades.go +++ b/simapp/upgrades.go @@ -10,8 +10,6 @@ import ( epochstypes "cosmossdk.io/x/epochs/types" protocolpooltypes "cosmossdk.io/x/protocolpool/types" upgradetypes "cosmossdk.io/x/upgrade/types" - - crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" ) // UpgradeName defines the on-chain upgrade name for the sample SimApp upgrade @@ -48,9 +46,7 @@ func (app SimApp) RegisterUpgradeHandlers() { protocolpooltypes.StoreKey, epochstypes.StoreKey, }, - Deleted: []string{ - crisistypes.StoreKey, // The SDK discontinued the crisis module in v0.51.0 - }, + Deleted: []string{"crisis"}, // The SDK discontinued the crisis module in v0.52.0 } // configure store loader that checks if version == upgradeHeight and applies store upgrades diff --git a/simapp/v2/upgrades.go b/simapp/v2/upgrades.go index 4c76d0d78a..aa8ff003bb 100644 --- a/simapp/v2/upgrades.go +++ b/simapp/v2/upgrades.go @@ -8,8 +8,6 @@ import ( "cosmossdk.io/x/accounts" protocolpooltypes "cosmossdk.io/x/protocolpool/types" upgradetypes "cosmossdk.io/x/upgrade/types" - - crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" ) // UpgradeName defines the on-chain upgrade name for the sample SimApp upgrade @@ -39,9 +37,7 @@ func (app *SimApp[T]) RegisterUpgradeHandlers() { accounts.ModuleName, protocolpooltypes.ModuleName, }, - Deleted: []string{ - crisistypes.ModuleName, // The SDK discontinued the crisis module in v0.51.0 - }, + Deleted: []string{"crisis"}, // The SDK discontinued the crisis module in v0.52.0 } // configure store loader that checks if version == upgradeHeight and applies store upgrades diff --git a/testutil/configurator/configurator.go b/testutil/configurator/configurator.go index f1476221d2..84e1fc986c 100644 --- a/testutil/configurator/configurator.go +++ b/testutil/configurator/configurator.go @@ -56,7 +56,6 @@ func defaultConfig() *Config { testutil.AuthModuleName, testutil.BankModuleName, testutil.GovModuleName, - "crisis", "genutil", testutil.AuthzModuleName, testutil.FeegrantModuleName, @@ -69,7 +68,6 @@ func defaultConfig() *Config { testutil.EpochsModuleName, }, EndBlockersOrder: []string{ - "crisis", testutil.GovModuleName, testutil.StakingModuleName, testutil.AuthModuleName, @@ -98,7 +96,6 @@ func defaultConfig() *Config { testutil.SlashingModuleName, testutil.GovModuleName, testutil.MintModuleName, - "crisis", "genutil", testutil.EvidenceModuleName, testutil.AuthzModuleName, diff --git a/x/README.md b/x/README.md index cbcdf4704a..106d39ba11 100644 --- a/x/README.md +++ b/x/README.md @@ -9,7 +9,6 @@ Here are some production-grade modules that can be used in Cosmos SDK applicatio * [Auth](./auth/README.md) - Authentication of accounts and transactions for Cosmos SDK applications. * [Authz](./authz/README.md) - Authorization for accounts to perform actions on behalf of other accounts. * [Bank](./bank/README.md) - Token transfer functionalities. -* [Crisis](./crisis/README.md) - Halting the blockchain under certain circumstances (e.g. if an invariant is broken). * [Distribution](./distribution/README.md) - Fee distribution, and staking token provision distribution. * [Epochs](./epochs/README.md) - Allow other modules to set that they would like to be signaled once every period * [Evidence](./evidence/README.md) - Evidence handling for double signing, misbehaviour, etc. diff --git a/x/crisis/README.md b/x/crisis/README.md deleted file mode 100644 index e4e29d0a12..0000000000 --- a/x/crisis/README.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -sidebar_position: 1 ---- - -# `x/crisis` - -## Overview - -The crisis module halts the blockchain under the circumstance that a blockchain -invariant is broken. Invariants can be registered with the application during the -application initialization process. - -## Contents - -* [State](#state) -* [Messages](#messages) -* [Events](#events) -* [Parameters](#parameters) -* [Client](#client) - * [CLI](#cli) - -## State - -### ConstantFee - -Due to the anticipated large gas cost requirement to verify an invariant (and -potential to exceed the maximum allowable block gas limit) a constant fee is -used instead of the standard gas consumption method. The constant fee is -intended to be larger than the anticipated gas cost of running the invariant -with the standard gas consumption method. - -The ConstantFee param is stored in the module params state with the prefix of `0x01`, -it can be updated with governance or the address with authority. - -* Params: `mint/params -> legacy_amino(sdk.Coin)` - -## Messages - -In this section we describe the processing of the crisis messages and the -corresponding updates to the state. - -### MsgVerifyInvariant - -Blockchain invariants can be checked using the `MsgVerifyInvariant` message. - -```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/crisis/v1beta1/tx.proto#L26-L42 -``` - -This message is expected to fail if: - -* the sender does not have enough coins for the constant fee -* the invariant route is not registered - -This message checks the invariant provided, and if the invariant is broken it -panics, halting the blockchain. If the invariant is broken, the constant fee is -never deducted as the transaction is never committed to a block (equivalent to -being refunded). However, if the invariant is not broken, the constant fee will -not be refunded. - -## Events - -The crisis module emits the following events: - -### Handlers - -#### MsgVerifyInvariance - -| Type | Attribute Key | Attribute Value | -|-----------|---------------|------------------| -| invariant | route | {invariantRoute} | -| message | module | crisis | -| message | action | verify_invariant | -| message | sender | {senderAddress} | - -## Parameters - -The crisis module contains the following parameters: - -| Key | Type | Example | -|-------------|---------------|-----------------------------------| -| ConstantFee | object (coin) | {"denom":"uatom","amount":"1000"} | - -## Client - -### CLI - -A user can query and interact with the `crisis` module using the CLI. - -#### Transactions - -The `tx` commands allow users to interact with the `crisis` module. - -```bash -simd tx crisis --help -``` - -##### invariant-broken - -The `invariant-broken` command submits proof when an invariant was broken to halt the chain - -```bash -simd tx crisis invariant-broken [module-name] [invariant-route] [flags] -``` - -Example: - -```bash -simd tx crisis invariant-broken bank total-supply --from=[keyname or address] -``` diff --git a/x/crisis/abci.go b/x/crisis/abci.go deleted file mode 100644 index 2eacc641c4..0000000000 --- a/x/crisis/abci.go +++ /dev/null @@ -1,22 +0,0 @@ -package crisis - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/telemetry" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/crisis/keeper" - "github.com/cosmos/cosmos-sdk/x/crisis/types" -) - -// check all registered invariants -func EndBlocker(ctx context.Context, k keeper.Keeper) { - defer telemetry.ModuleMeasureSince(types.ModuleName, telemetry.Now(), telemetry.MetricKeyEndBlocker) - - sdkCtx := sdk.UnwrapSDKContext(ctx) - if k.InvCheckPeriod() == 0 || sdkCtx.BlockHeight()%int64(k.InvCheckPeriod()) != 0 { - // skip running the invariant check - return - } - k.AssertInvariants(sdkCtx) -} diff --git a/x/crisis/autocli.go b/x/crisis/autocli.go deleted file mode 100644 index 12c072ec0e..0000000000 --- a/x/crisis/autocli.go +++ /dev/null @@ -1,38 +0,0 @@ -package crisis - -import ( - "fmt" - - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - crisisv1beta1 "cosmossdk.io/api/cosmos/crisis/v1beta1" - - "github.com/cosmos/cosmos-sdk/version" -) - -// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. -func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { - return &autocliv1.ModuleOptions{ - Tx: &autocliv1.ServiceCommandDescriptor{ - Service: crisisv1beta1.Msg_ServiceDesc.ServiceName, - RpcCommandOptions: []*autocliv1.RpcCommandOptions{ - { - RpcMethod: "VerifyInvariant", - Use: "invariant-broken [module-name] [invariant-route] --from mykey", - Short: "Submit proof that an invariant broken", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{ - {ProtoField: "invariant_module_name"}, - {ProtoField: "invariant_route"}, - }, - }, - { - RpcMethod: "UpdateParams", - Use: "update-params-proposal [params]", - Short: "Submit a proposal to update crisis module params. Note: the entire params must be provided.", - Example: fmt.Sprintf(`%s tx crisis update-params-proposal '{ "constant_fee": {"denom": "stake", "amount": "1000"} }'`, version.AppName), - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "params"}}, - GovProposal: true, - }, - }, - }, - } -} diff --git a/x/crisis/depinject.go b/x/crisis/depinject.go deleted file mode 100644 index 1aac71f65f..0000000000 --- a/x/crisis/depinject.go +++ /dev/null @@ -1,92 +0,0 @@ -package crisis - -import ( - "github.com/spf13/cast" - - modulev1 "cosmossdk.io/api/cosmos/crisis/module/v1" - "cosmossdk.io/core/address" - "cosmossdk.io/core/appmodule" - "cosmossdk.io/core/store" - "cosmossdk.io/depinject" - "cosmossdk.io/depinject/appconfig" - authtypes "cosmossdk.io/x/auth/types" - - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/server" - servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/x/crisis/keeper" - "github.com/cosmos/cosmos-sdk/x/crisis/types" -) - -var _ depinject.OnePerModuleType = AppModule{} - -// IsOnePerModuleType implements the depinject.OnePerModuleType interface. -func (am AppModule) IsOnePerModuleType() {} - -func init() { - appconfig.RegisterModule( - &modulev1.Module{}, - appconfig.Provide(ProvideModule), - ) -} - -type ModuleInputs struct { - depinject.In - - Config *modulev1.Module - StoreService store.KVStoreService - Codec codec.Codec - AppOpts servertypes.AppOptions `optional:"true"` - - BankKeeper types.SupplyKeeper - AddressCodec address.Codec -} - -type ModuleOutputs struct { - depinject.Out - - Module appmodule.AppModule - CrisisKeeper *keeper.Keeper -} - -func ProvideModule(in ModuleInputs) ModuleOutputs { - var invalidCheckPeriod uint - if in.AppOpts != nil { - invalidCheckPeriod = cast.ToUint(in.AppOpts.Get(server.FlagInvCheckPeriod)) - } - - feeCollectorName := in.Config.FeeCollectorName - if feeCollectorName == "" { - feeCollectorName = authtypes.FeeCollectorName - } - - // default to governance authority if not provided - authority := authtypes.NewModuleAddress(types.GovModuleName) - if in.Config.Authority != "" { - authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) - } - - authorityAddr, err := in.AddressCodec.BytesToString(authority) - if err != nil { - panic(err) - } - - k := keeper.NewKeeper( - in.Codec, - in.StoreService, - invalidCheckPeriod, - in.BankKeeper, - feeCollectorName, - authorityAddr, - in.AddressCodec, - ) - - var skipGenesisInvariants bool - if in.AppOpts != nil { - skipGenesisInvariants = cast.ToBool(in.AppOpts.Get(FlagSkipGenesisInvariants)) - } - - m := NewAppModule(k, in.Codec, skipGenesisInvariants) - - return ModuleOutputs{CrisisKeeper: k, Module: m} -} diff --git a/x/crisis/keeper/genesis.go b/x/crisis/keeper/genesis.go deleted file mode 100644 index f95f28ad93..0000000000 --- a/x/crisis/keeper/genesis.go +++ /dev/null @@ -1,23 +0,0 @@ -package keeper - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/x/crisis/types" -) - -// new crisis genesis -func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) { - if err := k.ConstantFee.Set(ctx, data.ConstantFee); err != nil { - panic(err) - } -} - -// ExportGenesis returns a GenesisState for a given context and keeper. -func (k *Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) { - constantFee, err := k.ConstantFee.Get(ctx) - if err != nil { - return nil, err - } - return types.NewGenesisState(constantFee), nil -} diff --git a/x/crisis/keeper/genesis_test.go b/x/crisis/keeper/genesis_test.go deleted file mode 100644 index c49754d856..0000000000 --- a/x/crisis/keeper/genesis_test.go +++ /dev/null @@ -1,80 +0,0 @@ -package keeper_test - -import ( - "testing" - - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/suite" - - sdkmath "cosmossdk.io/math" - storetypes "cosmossdk.io/store/types" - - "github.com/cosmos/cosmos-sdk/codec" - addresscodec "github.com/cosmos/cosmos-sdk/codec/address" - codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" - "github.com/cosmos/cosmos-sdk/runtime" - "github.com/cosmos/cosmos-sdk/testutil" - sdk "github.com/cosmos/cosmos-sdk/types" - moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/cosmos/cosmos-sdk/x/crisis" - "github.com/cosmos/cosmos-sdk/x/crisis/keeper" - crisistestutil "github.com/cosmos/cosmos-sdk/x/crisis/testutil" - "github.com/cosmos/cosmos-sdk/x/crisis/types" -) - -type GenesisTestSuite struct { - suite.Suite - - sdkCtx sdk.Context - keeper keeper.Keeper - cdc codec.BinaryCodec -} - -func TestGenesisTestSuite(t *testing.T) { - suite.Run(t, new(GenesisTestSuite)) -} - -func (s *GenesisTestSuite) SetupTest() { - key := storetypes.NewKVStoreKey(types.StoreKey) - storeService := runtime.NewKVStoreService(key) - testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) - encCfg := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}, crisis.AppModule{}) - - // gomock initializations - ctrl := gomock.NewController(s.T()) - s.cdc = codec.NewProtoCodec(encCfg.InterfaceRegistry) - s.sdkCtx = testCtx.Ctx - - supplyKeeper := crisistestutil.NewMockSupplyKeeper(ctrl) - - s.keeper = *keeper.NewKeeper(s.cdc, storeService, 5, supplyKeeper, "", "", addresscodec.NewBech32Codec("cosmos")) -} - -func (s *GenesisTestSuite) TestImportExportGenesis() { - // default params - constantFee := sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(1000)) - err := s.keeper.ConstantFee.Set(s.sdkCtx, constantFee) - s.Require().NoError(err) - genesis, err := s.keeper.ExportGenesis(s.sdkCtx) - s.Require().NoError(err) - - // set constant fee to zero - constantFee = sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(0)) - err = s.keeper.ConstantFee.Set(s.sdkCtx, constantFee) - s.Require().NoError(err) - - s.keeper.InitGenesis(s.sdkCtx, genesis) - newGenesis, err := s.keeper.ExportGenesis(s.sdkCtx) - s.Require().NoError(err) - s.Require().Equal(genesis, newGenesis) -} - -func (s *GenesisTestSuite) TestInitGenesis() { - genesisState := types.DefaultGenesisState() - genesisState.ConstantFee = sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(1000)) - s.keeper.InitGenesis(s.sdkCtx, genesisState) - - constantFee, err := s.keeper.ConstantFee.Get(s.sdkCtx) - s.Require().NoError(err) - s.Require().Equal(genesisState.ConstantFee, constantFee) -} diff --git a/x/crisis/keeper/keeper.go b/x/crisis/keeper/keeper.go deleted file mode 100644 index 5091f37fcb..0000000000 --- a/x/crisis/keeper/keeper.go +++ /dev/null @@ -1,126 +0,0 @@ -package keeper - -import ( - "context" - "fmt" - "time" - - "cosmossdk.io/collections" - "cosmossdk.io/core/address" - "cosmossdk.io/core/log" - storetypes "cosmossdk.io/core/store" - - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/crisis/types" -) - -// Keeper - crisis keeper -type Keeper struct { - routes []types.InvarRoute - invCheckPeriod uint - storeService storetypes.KVStoreService - cdc codec.BinaryCodec - addressCodec address.Codec - - // the address capable of executing a MsgUpdateParams message. Typically, this - // should be the x/gov module account. - authority string - - supplyKeeper types.SupplyKeeper - - feeCollectorName string // name of the FeeCollector ModuleAccount - - Schema collections.Schema - ConstantFee collections.Item[sdk.Coin] -} - -// NewKeeper creates a new Keeper object -func NewKeeper( - cdc codec.BinaryCodec, storeService storetypes.KVStoreService, invCheckPeriod uint, - supplyKeeper types.SupplyKeeper, feeCollectorName, authority string, ac address.Codec, -) *Keeper { - sb := collections.NewSchemaBuilder(storeService) - k := &Keeper{ - storeService: storeService, - cdc: cdc, - routes: make([]types.InvarRoute, 0), - invCheckPeriod: invCheckPeriod, - supplyKeeper: supplyKeeper, - feeCollectorName: feeCollectorName, - authority: authority, - addressCodec: ac, - ConstantFee: collections.NewItem(sb, types.ConstantFeeKey, "constant_fee", codec.CollValue[sdk.Coin](cdc)), - } - schema, err := sb.Build() - if err != nil { - panic(err) - } - k.Schema = schema - return k -} - -// GetAuthority returns the x/crisis module's authority. -func (k *Keeper) GetAuthority() string { - return k.authority -} - -// Logger returns a module-specific logger. -func (k *Keeper) Logger(ctx context.Context) log.Logger { - sdkCtx := sdk.UnwrapSDKContext(ctx) - return sdkCtx.Logger().With("module", "x/"+types.ModuleName) -} - -// RegisterRoute register the routes for each of the invariants -func (k *Keeper) RegisterRoute(moduleName, route string, invar sdk.Invariant) { - invarRoute := types.NewInvarRoute(moduleName, route, invar) - k.routes = append(k.routes, invarRoute) -} - -// Routes - return the keeper's invariant routes -func (k *Keeper) Routes() []types.InvarRoute { - return k.routes -} - -// Invariants returns a copy of all registered Crisis keeper invariants. -func (k *Keeper) Invariants() []sdk.Invariant { - invars := make([]sdk.Invariant, len(k.routes)) - for i, route := range k.routes { - invars[i] = route.Invar - } - return invars -} - -// AssertInvariants asserts all registered invariants. If any invariant fails, -// the method panics. -func (k *Keeper) AssertInvariants(ctx context.Context) { - logger := k.Logger(ctx) - - start := time.Now() - invarRoutes := k.Routes() - n := len(invarRoutes) - sdkCtx := sdk.UnwrapSDKContext(ctx) - for i, ir := range invarRoutes { - logger.Info("asserting crisis invariants", "inv", fmt.Sprint(i+1, "/", n), "name", ir.FullRoute()) - - invCtx, _ := sdkCtx.CacheContext() - if res, stop := ir.Invar(invCtx); stop { - // TODO: Include app name as part of context to allow for this to be - // variable. - panic(fmt.Errorf("invariant broken: %s\n"+ - "\tCRITICAL please submit the following transaction:\n"+ - "\t\t tx crisis invariant-broken %s %s", res, ir.ModuleName, ir.Route)) - } - } - - diff := time.Since(start) - logger.Info("asserted all invariants", "duration", diff, "height", sdkCtx.BlockHeight()) -} - -// InvCheckPeriod returns the invariant checks period. -func (k *Keeper) InvCheckPeriod() uint { return k.invCheckPeriod } - -// SendCoinsFromAccountToFeeCollector transfers amt to the fee collector account. -func (k *Keeper) SendCoinsFromAccountToFeeCollector(ctx context.Context, senderAddr sdk.AccAddress, amt sdk.Coins) error { - return k.supplyKeeper.SendCoinsFromAccountToModule(ctx, senderAddr, k.feeCollectorName, amt) -} diff --git a/x/crisis/keeper/keeper_test.go b/x/crisis/keeper/keeper_test.go deleted file mode 100644 index 84910f9345..0000000000 --- a/x/crisis/keeper/keeper_test.go +++ /dev/null @@ -1,69 +0,0 @@ -package keeper_test - -import ( - "testing" - - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" - - storetypes "cosmossdk.io/store/types" - - addresscodec "github.com/cosmos/cosmos-sdk/codec/address" - codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" - "github.com/cosmos/cosmos-sdk/runtime" - "github.com/cosmos/cosmos-sdk/testutil" - sdk "github.com/cosmos/cosmos-sdk/types" - moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/cosmos/cosmos-sdk/x/crisis" - "github.com/cosmos/cosmos-sdk/x/crisis/keeper" - crisistestutil "github.com/cosmos/cosmos-sdk/x/crisis/testutil" - "github.com/cosmos/cosmos-sdk/x/crisis/types" -) - -func TestLogger(t *testing.T) { - ctrl := gomock.NewController(t) - supplyKeeper := crisistestutil.NewMockSupplyKeeper(ctrl) - - key := storetypes.NewKVStoreKey(types.StoreKey) - storeService := runtime.NewKVStoreService(key) - testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) - encCfg := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}, crisis.AppModule{}) - keeper := keeper.NewKeeper(encCfg.Codec, storeService, 5, supplyKeeper, "", "", addresscodec.NewBech32Codec("cosmos")) - - require.Equal(t, - testCtx.Ctx.Logger().With("module", "x/"+types.ModuleName), - keeper.Logger(testCtx.Ctx)) -} - -func TestInvariants(t *testing.T) { - ctrl := gomock.NewController(t) - supplyKeeper := crisistestutil.NewMockSupplyKeeper(ctrl) - - key := storetypes.NewKVStoreKey(types.StoreKey) - storeService := runtime.NewKVStoreService(key) - encCfg := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}, crisis.AppModule{}) - keeper := keeper.NewKeeper(encCfg.Codec, storeService, 5, supplyKeeper, "", "", addresscodec.NewBech32Codec("cosmos")) - require.Equal(t, keeper.InvCheckPeriod(), uint(5)) - - orgInvRoutes := keeper.Routes() - keeper.RegisterRoute("testModule", "testRoute", func(sdk.Context) (string, bool) { return "", false }) - invar := keeper.Invariants() - require.Equal(t, len(invar), len(orgInvRoutes)+1) -} - -func TestAssertInvariants(t *testing.T) { - ctrl := gomock.NewController(t) - supplyKeeper := crisistestutil.NewMockSupplyKeeper(ctrl) - - key := storetypes.NewKVStoreKey(types.StoreKey) - storeService := runtime.NewKVStoreService(key) - testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) - encCfg := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}, crisis.AppModule{}) - keeper := keeper.NewKeeper(encCfg.Codec, storeService, 5, supplyKeeper, "", "", addresscodec.NewBech32Codec("cosmos")) - - keeper.RegisterRoute("testModule", "testRoute1", func(sdk.Context) (string, bool) { return "", false }) - require.NotPanics(t, func() { keeper.AssertInvariants(testCtx.Ctx) }) - - keeper.RegisterRoute("testModule", "testRoute2", func(sdk.Context) (string, bool) { return "", true }) - require.Panics(t, func() { keeper.AssertInvariants(testCtx.Ctx) }) -} diff --git a/x/crisis/keeper/migrator.go b/x/crisis/keeper/migrator.go deleted file mode 100644 index 7929d86054..0000000000 --- a/x/crisis/keeper/migrator.go +++ /dev/null @@ -1,23 +0,0 @@ -package keeper - -import "context" - -// Migrator is a struct for handling in-place state migrations. -type Migrator struct { - keeper *Keeper -} - -// NewMigrator returns a new Migrator. -func NewMigrator(k *Keeper) Migrator { - return Migrator{ - keeper: k, - } -} - -// Migrate1to2 migrates the x/crisis module state from the consensus version 1 to -// version 2. Specifically, it takes the parameters that are currently stored -// and managed by the x/params modules and stores them directly into the x/crisis -// module state. -func (m Migrator) Migrate1to2(ctx context.Context) error { - return nil -} diff --git a/x/crisis/keeper/msg_server.go b/x/crisis/keeper/msg_server.go deleted file mode 100644 index 1602a68588..0000000000 --- a/x/crisis/keeper/msg_server.go +++ /dev/null @@ -1,96 +0,0 @@ -package keeper - -import ( - "context" - - "cosmossdk.io/errors" - - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/crisis/types" -) - -var _ types.MsgServer = &Keeper{} - -// VerifyInvariant implements MsgServer.VerifyInvariant method. -// It defines a method to verify a particular invariant. -func (k *Keeper) VerifyInvariant(goCtx context.Context, msg *types.MsgVerifyInvariant) (*types.MsgVerifyInvariantResponse, error) { - if msg.Sender == "" { - return nil, sdkerrors.ErrInvalidAddress.Wrap("empty address string is not allowed") - } - sender, err := k.addressCodec.StringToBytes(msg.Sender) - if err != nil { - return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid sender address: %s", err) - } - - ctx := sdk.UnwrapSDKContext(goCtx) - params, err := k.ConstantFee.Get(goCtx) - if err != nil { - return nil, err - } - constantFee := sdk.NewCoins(params) - - if err := k.SendCoinsFromAccountToFeeCollector(ctx, sender, constantFee); err != nil { - return nil, err - } - - // use a cached context to avoid gas costs during invariants - cacheCtx, _ := ctx.CacheContext() - - found := false - msgFullRoute := msg.FullInvariantRoute() - - var res string - var stop bool - for _, invarRoute := range k.Routes() { - if invarRoute.FullRoute() == msgFullRoute { - res, stop = invarRoute.Invar(cacheCtx) - found = true - - break - } - } - - if !found { - return nil, types.ErrUnknownInvariant - } - - if stop { - // Currently, because the chain halts here, this transaction will never be included in the - // blockchain thus the constant fee will have never been deducted. Thus no refund is required. - - // TODO replace with circuit breaker - panic(res) - } - - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeInvariant, - sdk.NewAttribute(types.AttributeKeyRoute, msg.InvariantRoute), - ), - }) - - return &types.MsgVerifyInvariantResponse{}, nil -} - -// UpdateParams implements MsgServer.UpdateParams method. -// It defines a method to update the x/crisis module parameters. -func (k *Keeper) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { - if k.authority != msg.Authority { - return nil, errors.Wrapf(types.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.authority, msg.Authority) - } - - if !msg.ConstantFee.IsValid() { - return nil, errors.Wrap(sdkerrors.ErrInvalidCoins, "invalid constant fee") - } - - if msg.ConstantFee.IsNegative() { - return nil, errors.Wrap(sdkerrors.ErrInvalidCoins, "negative constant fee") - } - - if err := k.ConstantFee.Set(ctx, msg.ConstantFee); err != nil { - return nil, err - } - - return &types.MsgUpdateParamsResponse{}, nil -} diff --git a/x/crisis/keeper/msg_server_test.go b/x/crisis/keeper/msg_server_test.go deleted file mode 100644 index fc7abcee47..0000000000 --- a/x/crisis/keeper/msg_server_test.go +++ /dev/null @@ -1,191 +0,0 @@ -package keeper_test - -import ( - "testing" - - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/suite" - - sdkmath "cosmossdk.io/math" - storetypes "cosmossdk.io/store/types" - - addresscodec "github.com/cosmos/cosmos-sdk/codec/address" - codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/cosmos/cosmos-sdk/runtime" - "github.com/cosmos/cosmos-sdk/testutil" - sdk "github.com/cosmos/cosmos-sdk/types" - moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/cosmos/cosmos-sdk/x/crisis" - "github.com/cosmos/cosmos-sdk/x/crisis/keeper" - crisistestutil "github.com/cosmos/cosmos-sdk/x/crisis/testutil" - "github.com/cosmos/cosmos-sdk/x/crisis/types" -) - -type KeeperTestSuite struct { - suite.Suite - - ctx sdk.Context - supplyKeeper *crisistestutil.MockSupplyKeeper - keeper *keeper.Keeper -} - -func (s *KeeperTestSuite) SetupTest() { - // gomock initializations - ctrl := gomock.NewController(s.T()) - supplyKeeper := crisistestutil.NewMockSupplyKeeper(ctrl) - - key := storetypes.NewKVStoreKey(types.StoreKey) - storeService := runtime.NewKVStoreService(key) - testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) - encCfg := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}, crisis.AppModule{}) - addr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString([]byte("addr1_______________")) - s.Require().NoError(err) - keeper := keeper.NewKeeper(encCfg.Codec, storeService, 5, supplyKeeper, "", addr, addresscodec.NewBech32Codec("cosmos")) - - s.ctx = testCtx.Ctx - s.keeper = keeper - s.supplyKeeper = supplyKeeper -} - -func (s *KeeperTestSuite) TestMsgVerifyInvariant() { - // default params - constantFee := sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(1000)) - err := s.keeper.ConstantFee.Set(s.ctx, constantFee) - s.Require().NoError(err) - - encCfg := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}, crisis.AppModule{}) - kr := keyring.NewInMemory(encCfg.Codec) - testutil.CreateKeyringAccounts(s.T(), kr, 1) - - sender := testutil.CreateKeyringAccounts(s.T(), kr, 1)[0] - senderAddr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(sender.Address) - s.Require().NoError(err) - - s.supplyKeeper.EXPECT().SendCoinsFromAccountToModule(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).Times(2) - s.keeper.RegisterRoute("bank", "total-supply", func(sdk.Context) (string, bool) { return "", false }) - - testCases := []struct { - name string - input *types.MsgVerifyInvariant - expErr bool - expErrMsg string - }{ - { - name: "empty sender not allowed", - input: &types.MsgVerifyInvariant{ - Sender: "", - InvariantModuleName: "bank", - InvariantRoute: "total-supply", - }, - expErr: true, - expErrMsg: "empty address string is not allowed", - }, - { - name: "invalid sender address", - input: &types.MsgVerifyInvariant{ - Sender: "invalid address", - InvariantModuleName: "bank", - InvariantRoute: "total-supply", - }, - expErr: true, - expErrMsg: "decoding bech32 failed", - }, - { - name: "unregistered invariant route", - input: &types.MsgVerifyInvariant{ - Sender: senderAddr, - InvariantModuleName: "module", - InvariantRoute: "invalidroute", - }, - expErr: true, - expErrMsg: "unknown invariant", - }, - { - name: "valid invariant", - input: &types.MsgVerifyInvariant{ - Sender: senderAddr, - InvariantModuleName: "bank", - InvariantRoute: "total-supply", - }, - expErr: false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - _, err = s.keeper.VerifyInvariant(s.ctx, tc.input) - if tc.expErr { - s.Require().Error(err) - s.Require().Contains(err.Error(), tc.expErrMsg) - } else { - s.Require().NoError(err) - } - }) - } -} - -func (s *KeeperTestSuite) TestMsgUpdateParams() { - // default params - constantFee := sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(1000)) - - testCases := []struct { - name string - input *types.MsgUpdateParams - expErr bool - expErrMsg string - }{ - { - name: "invalid authority", - input: &types.MsgUpdateParams{ - Authority: "invalid", - ConstantFee: constantFee, - }, - expErr: true, - expErrMsg: "invalid authority", - }, - { - name: "invalid constant fee", - input: &types.MsgUpdateParams{ - Authority: s.keeper.GetAuthority(), - ConstantFee: sdk.Coin{}, - }, - expErr: true, - }, - { - name: "negative constant fee", - input: &types.MsgUpdateParams{ - Authority: s.keeper.GetAuthority(), - ConstantFee: sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdkmath.NewInt(-1000)}, - }, - expErr: true, - }, - { - name: "all good", - input: &types.MsgUpdateParams{ - Authority: s.keeper.GetAuthority(), - ConstantFee: constantFee, - }, - expErr: false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - _, err := s.keeper.UpdateParams(s.ctx, tc.input) - - if tc.expErr { - s.Require().Error(err) - s.Require().Contains(err.Error(), tc.expErrMsg) - } else { - s.Require().NoError(err) - } - }) - } -} - -func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) -} diff --git a/x/crisis/module.go b/x/crisis/module.go deleted file mode 100644 index 245b6797c3..0000000000 --- a/x/crisis/module.go +++ /dev/null @@ -1,149 +0,0 @@ -package crisis - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/spf13/cobra" - "google.golang.org/grpc" - - "cosmossdk.io/core/appmodule" - "cosmossdk.io/core/legacy" - "cosmossdk.io/core/registry" - - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/x/crisis/keeper" - "github.com/cosmos/cosmos-sdk/x/crisis/types" -) - -// ConsensusVersion defines the current x/crisis module consensus version. -const ConsensusVersion = 2 - -var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - - _ appmodule.AppModule = AppModule{} - _ appmodule.HasEndBlocker = AppModule{} - _ appmodule.HasServices = AppModule{} - _ appmodule.HasMigrations = AppModule{} - _ appmodule.HasRegisterInterfaces = AppModule{} - _ appmodule.HasGenesis = AppModule{} -) - -// Module init related flags -const FlagSkipGenesisInvariants = "x-crisis-skip-assert-invariants" - -// AppModule implements an application module for the crisis module. -type AppModule struct { - // NOTE: We store a reference to the keeper here so that after a module - // manager is created, the invariants can be properly registered and - // executed. - keeper *keeper.Keeper - cdc codec.Codec - skipGenesisInvariants bool -} - -// NewAppModule creates a new AppModule object. If initChainAssertInvariants is set, -// we will call keeper.AssertInvariants during InitGenesis (it may take a significant time) -// - which doesn't impact the chain security unless 66+% of validators have a wrongly -// modified genesis file. -func NewAppModule(keeper *keeper.Keeper, cdc codec.Codec, skipGenesisInvariants bool) AppModule { - return AppModule{ - keeper: keeper, - skipGenesisInvariants: skipGenesisInvariants, - cdc: cdc, - } -} - -// IsAppModule implements the appmodule.AppModule interface. -func (am AppModule) IsAppModule() {} - -// Name returns the crisis module's name. -func (AppModule) Name() string { - return types.ModuleName -} - -// RegisterLegacyAminoCodec registers the crisis module's types on the given LegacyAmino codec. -func (AppModule) RegisterLegacyAminoCodec(cdc legacy.Amino) { - types.RegisterLegacyAminoCodec(cdc) -} - -// RegisterInterfaces registers interfaces and implementations of the crisis -// module. -func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { - types.RegisterInterfaces(registrar) -} - -// AddModuleInitFlags implements servertypes.ModuleInitFlags interface. -func AddModuleInitFlags(startCmd *cobra.Command) { - startCmd.Flags().Bool(FlagSkipGenesisInvariants, false, "Skip x/crisis invariants check on startup") -} - -// RegisterServices registers module services. -func (am AppModule) RegisterServices(registrar grpc.ServiceRegistrar) error { - types.RegisterMsgServer(registrar, am.keeper) - - return nil -} - -// RegisterMigrations registers the crisis module migrations. -func (am AppModule) RegisterMigrations(mr appmodule.MigrationRegistrar) error { - m := keeper.NewMigrator(am.keeper) - - if err := mr.Register(types.ModuleName, 1, m.Migrate1to2); err != nil { - return fmt.Errorf("failed to migrate x/%s from version 1 to 2: %w", types.ModuleName, err) - } - - return nil -} - -// DefaultGenesis returns default genesis state as raw bytes for the crisis module. -func (am AppModule) DefaultGenesis() json.RawMessage { - return am.cdc.MustMarshalJSON(types.DefaultGenesisState()) -} - -// ValidateGenesis performs genesis state validation for the crisis module. -func (am AppModule) ValidateGenesis(bz json.RawMessage) error { - var data types.GenesisState - if err := am.cdc.UnmarshalJSON(bz, &data); err != nil { - return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) - } - - return types.ValidateGenesis(&data) -} - -// InitGenesis performs genesis initialization for the crisis module. -func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error { - var genesisState types.GenesisState - if err := am.cdc.UnmarshalJSON(data, &genesisState); err != nil { - return err - } - - am.keeper.InitGenesis(ctx, &genesisState) - if !am.skipGenesisInvariants { - am.keeper.AssertInvariants(ctx) - } - return nil -} - -// ExportGenesis returns the exported genesis state as raw bytes for the crisis module. -func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { - gs, err := am.keeper.ExportGenesis(ctx) - if err != nil { - return nil, err - } - return am.cdc.MarshalJSON(gs) -} - -// ConsensusVersion implements HasConsensusVersion -func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } - -// EndBlock returns the end blocker for the crisis module. It returns no validator -// updates. -func (am AppModule) EndBlock(ctx context.Context) error { - EndBlocker(ctx, *am.keeper) - return nil -} diff --git a/x/crisis/proto/buf.gen.gogo.yaml b/x/crisis/proto/buf.gen.gogo.yaml deleted file mode 100644 index db36231d0c..0000000000 --- a/x/crisis/proto/buf.gen.gogo.yaml +++ /dev/null @@ -1,8 +0,0 @@ -version: v1 -plugins: - - name: gocosmos - out: .. - opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any - - name: grpc-gateway - out: .. - opt: logtostderr=true,allow_colon_final_segments=true diff --git a/x/crisis/proto/buf.gen.pulsar.yaml b/x/crisis/proto/buf.gen.pulsar.yaml deleted file mode 100644 index 88a5b0419d..0000000000 --- a/x/crisis/proto/buf.gen.pulsar.yaml +++ /dev/null @@ -1,18 +0,0 @@ -version: v1 -managed: - enabled: true - go_package_prefix: - default: cosmossdk.io/api - except: - - buf.build/googleapis/googleapis - - buf.build/cosmos/gogo-proto - - buf.build/cosmos/cosmos-proto - override: - buf.build/cosmos/cosmos-sdk: cosmossdk.io/api -plugins: - - name: go-pulsar - out: .. - opt: paths=source_relative - - name: go-grpc - out: .. - opt: paths=source_relative diff --git a/x/crisis/proto/buf.lock b/x/crisis/proto/buf.lock deleted file mode 100644 index 28c135cc08..0000000000 --- a/x/crisis/proto/buf.lock +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: cosmos - repository: cosmos-proto - commit: 04467658e59e44bbb22fe568206e1f70 - digest: shake256:73a640bd60e0c523b0f8237ff34eab67c45a38b64bbbde1d80224819d272dbf316ac183526bd245f994af6608b025f5130483d0133c5edd385531326b5990466 - - remote: buf.build - owner: cosmos - repository: cosmos-sdk - commit: cf13c7d232dd405180c2af616fa8a075 - digest: shake256:769a38e306a98339b549bc96991c97fae8bd3ceb1a7646c7bfe9a74e406ab068372970fbc5abda1891e2f3c36527cf2d3a25f631739d36900787226e564bb612 - - remote: buf.build - owner: cosmos - repository: gogo-proto - commit: 5e5b9fdd01804356895f8f79a6f1ddc1 - digest: shake256:0b85da49e2e5f9ebc4806eae058e2f56096ff3b1c59d1fb7c190413dd15f45dd456f0b69ced9059341c80795d2b6c943de15b120a9e0308b499e43e4b5fc2952 - - remote: buf.build - owner: googleapis - repository: googleapis - commit: 28151c0d0a1641bf938a7672c500e01d - digest: shake256:49215edf8ef57f7863004539deff8834cfb2195113f0b890dd1f67815d9353e28e668019165b9d872395871eeafcbab3ccfdb2b5f11734d3cca95be9e8d139de - - remote: buf.build - owner: protocolbuffers - repository: wellknowntypes - commit: 657250e6a39648cbb169d079a60bd9ba - digest: shake256:00de25001b8dd2e29d85fc4bcc3ede7aed886d76d67f5e0f7a9b320b90f871d3eb73507d50818d823a0512f3f8db77a11c043685528403e31ff3fef18323a9fb diff --git a/x/crisis/proto/buf.yaml b/x/crisis/proto/buf.yaml deleted file mode 100644 index 202f3f2e6f..0000000000 --- a/x/crisis/proto/buf.yaml +++ /dev/null @@ -1,17 +0,0 @@ -version: v1 -deps: - - buf.build/cosmos/cosmos-sdk # pin the Cosmos SDK version - - buf.build/cosmos/cosmos-proto - - buf.build/cosmos/gogo-proto - - buf.build/googleapis/googleapis -lint: - use: - - DEFAULT - - COMMENTS - - FILE_LOWER_SNAKE_CASE - except: - - UNARY_RPC - - COMMENT_FIELD - - SERVICE_SUFFIX - - PACKAGE_VERSION_SUFFIX - - RPC_REQUEST_STANDARD_NAME diff --git a/x/crisis/proto/cosmos/crisis/module/v1/module.proto b/x/crisis/proto/cosmos/crisis/module/v1/module.proto deleted file mode 100644 index fe9249626a..0000000000 --- a/x/crisis/proto/cosmos/crisis/module/v1/module.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package cosmos.crisis.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the crisis module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/crisis" - }; - - // fee_collector_name is the name of the FeeCollector ModuleAccount. - string fee_collector_name = 1; - - // authority defines the custom module authority. If not set, defaults to the governance module. - string authority = 2; -} \ No newline at end of file diff --git a/x/crisis/proto/cosmos/crisis/v1beta1/genesis.proto b/x/crisis/proto/cosmos/crisis/v1beta1/genesis.proto deleted file mode 100644 index b0ddb9b66f..0000000000 --- a/x/crisis/proto/cosmos/crisis/v1beta1/genesis.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; -package cosmos.crisis.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "amino/amino.proto"; - -// GenesisState defines the crisis module's genesis state. -message GenesisState { - // constant_fee is the fee used to verify the invariant in the crisis - // module. - cosmos.base.v1beta1.Coin constant_fee = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} diff --git a/x/crisis/proto/cosmos/crisis/v1beta1/tx.proto b/x/crisis/proto/cosmos/crisis/v1beta1/tx.proto deleted file mode 100644 index b96d114242..0000000000 --- a/x/crisis/proto/cosmos/crisis/v1beta1/tx.proto +++ /dev/null @@ -1,64 +0,0 @@ -syntax = "proto3"; -package cosmos.crisis.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types"; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -// Msg defines the bank Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // VerifyInvariant defines a method to verify a particular invariant. - rpc VerifyInvariant(MsgVerifyInvariant) returns (MsgVerifyInvariantResponse); - - // UpdateParams defines a governance operation for updating the x/crisis module - // parameters. The authority is defined in the keeper. - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse) { - option (cosmos_proto.method_added_in) = "cosmos-sdk 0.47"; - } -} - -// MsgVerifyInvariant represents a message to verify a particular invariance. -message MsgVerifyInvariant { - option (cosmos.msg.v1.signer) = "sender"; - option (amino.name) = "cosmos-sdk/MsgVerifyInvariant"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // sender is the account address of private key to send coins to fee collector account. - string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // name of the invariant module. - string invariant_module_name = 2; - - // invariant_route is the msg's invariant route. - string invariant_route = 3; -} - -// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. -message MsgVerifyInvariantResponse {} - -// MsgUpdateParams is the Msg/UpdateParams request type. -message MsgUpdateParams { - option (cosmos_proto.message_added_in) = "cosmos-sdk 0.47"; - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/x/crisis/MsgUpdateParams"; - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // constant_fee defines the x/crisis parameter. - cosmos.base.v1beta1.Coin constant_fee = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -message MsgUpdateParamsResponse { - option (cosmos_proto.message_added_in) = "cosmos-sdk 0.47"; -} diff --git a/x/crisis/testutil/expected_keepers_mocks.go b/x/crisis/testutil/expected_keepers_mocks.go deleted file mode 100644 index 663ab4074a..0000000000 --- a/x/crisis/testutil/expected_keepers_mocks.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: x/crisis/types/expected_keepers.go - -// Package testutil is a generated GoMock package. -package testutil - -import ( - context "context" - reflect "reflect" - - types "github.com/cosmos/cosmos-sdk/types" - gomock "github.com/golang/mock/gomock" -) - -// MockSupplyKeeper is a mock of SupplyKeeper interface. -type MockSupplyKeeper struct { - ctrl *gomock.Controller - recorder *MockSupplyKeeperMockRecorder -} - -// MockSupplyKeeperMockRecorder is the mock recorder for MockSupplyKeeper. -type MockSupplyKeeperMockRecorder struct { - mock *MockSupplyKeeper -} - -// NewMockSupplyKeeper creates a new mock instance. -func NewMockSupplyKeeper(ctrl *gomock.Controller) *MockSupplyKeeper { - mock := &MockSupplyKeeper{ctrl: ctrl} - mock.recorder = &MockSupplyKeeperMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockSupplyKeeper) EXPECT() *MockSupplyKeeperMockRecorder { - return m.recorder -} - -// SendCoinsFromAccountToModule mocks base method. -func (m *MockSupplyKeeper) SendCoinsFromAccountToModule(ctx context.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) - ret0, _ := ret[0].(error) - return ret0 -} - -// SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule. -func (mr *MockSupplyKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockSupplyKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt) -} diff --git a/x/crisis/types/codec.go b/x/crisis/types/codec.go deleted file mode 100644 index ca3f0e52af..0000000000 --- a/x/crisis/types/codec.go +++ /dev/null @@ -1,27 +0,0 @@ -package types - -import ( - corelegacy "cosmossdk.io/core/legacy" - "cosmossdk.io/core/registry" - coretransaction "cosmossdk.io/core/transaction" - - "github.com/cosmos/cosmos-sdk/codec/legacy" - "github.com/cosmos/cosmos-sdk/types/msgservice" -) - -// RegisterLegacyAminoCodec registers the necessary x/crisis interfaces and concrete types -// on the provided LegacyAmino codec. These types are used for Amino JSON serialization. -func RegisterLegacyAminoCodec(cdc corelegacy.Amino) { - legacy.RegisterAminoMsg(cdc, &MsgVerifyInvariant{}, "cosmos-sdk/MsgVerifyInvariant") - legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "cosmos-sdk/x/crisis/MsgUpdateParams") -} - -// RegisterInterfaces registers the interfaces types with the Interface Registry. -func RegisterInterfaces(registrar registry.InterfaceRegistrar) { - registrar.RegisterImplementations((*coretransaction.Msg)(nil), - &MsgVerifyInvariant{}, - &MsgUpdateParams{}, - ) - - msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) -} diff --git a/x/crisis/types/errors.go b/x/crisis/types/errors.go deleted file mode 100644 index 6bb22700a0..0000000000 --- a/x/crisis/types/errors.go +++ /dev/null @@ -1,10 +0,0 @@ -package types - -import "cosmossdk.io/errors" - -// x/crisis module sentinel errors -var ( - ErrNoSender = errors.Register(ModuleName, 2, "sender address is empty") - ErrUnknownInvariant = errors.Register(ModuleName, 3, "unknown invariant") - ErrInvalidSigner = errors.Register(ModuleName, 4, "expected authority account as only signer for proposal message") -) diff --git a/x/crisis/types/events.go b/x/crisis/types/events.go deleted file mode 100644 index 823051733f..0000000000 --- a/x/crisis/types/events.go +++ /dev/null @@ -1,8 +0,0 @@ -package types - -// crisis module event types -const ( - EventTypeInvariant = "invariant" - - AttributeKeyRoute = "route" -) diff --git a/x/crisis/types/expected_keepers.go b/x/crisis/types/expected_keepers.go deleted file mode 100644 index 5bd97754e0..0000000000 --- a/x/crisis/types/expected_keepers.go +++ /dev/null @@ -1,12 +0,0 @@ -package types - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// SupplyKeeper defines the expected supply keeper (noalias) -type SupplyKeeper interface { - SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error -} diff --git a/x/crisis/types/genesis.go b/x/crisis/types/genesis.go deleted file mode 100644 index 6583ae175a..0000000000 --- a/x/crisis/types/genesis.go +++ /dev/null @@ -1,34 +0,0 @@ -package types - -import ( - "fmt" - - sdkmath "cosmossdk.io/math" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// NewGenesisState creates a new GenesisState object -func NewGenesisState(constantFee sdk.Coin) *GenesisState { - return &GenesisState{ - ConstantFee: constantFee, - } -} - -// DefaultGenesisState creates a default GenesisState object -func DefaultGenesisState() *GenesisState { - return &GenesisState{ - ConstantFee: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(1000)), - } -} - -// ValidateGenesis - validate crisis genesis data -func ValidateGenesis(data *GenesisState) error { - if !data.ConstantFee.IsValid() { - return fmt.Errorf("constant fee is invalid") - } - if !data.ConstantFee.IsPositive() { - return fmt.Errorf("constant fee must be positive: %s", data.ConstantFee) - } - return nil -} diff --git a/x/crisis/types/genesis.pb.go b/x/crisis/types/genesis.pb.go deleted file mode 100644 index fbd2981eab..0000000000 --- a/x/crisis/types/genesis.pb.go +++ /dev/null @@ -1,330 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/crisis/v1beta1/genesis.proto - -package types - -import ( - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines the crisis module's genesis state. -type GenesisState struct { - // constant_fee is the fee used to verify the invariant in the crisis - // module. - ConstantFee types.Coin `protobuf:"bytes,3,opt,name=constant_fee,json=constantFee,proto3" json:"constant_fee"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_7a9c2781aa8a27ae, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetConstantFee() types.Coin { - if m != nil { - return m.ConstantFee - } - return types.Coin{} -} - -func init() { - proto.RegisterType((*GenesisState)(nil), "cosmos.crisis.v1beta1.GenesisState") -} - -func init() { - proto.RegisterFile("cosmos/crisis/v1beta1/genesis.proto", fileDescriptor_7a9c2781aa8a27ae) -} - -var fileDescriptor_7a9c2781aa8a27ae = []byte{ - // 241 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4e, 0xce, 0x2f, 0xce, - 0xcd, 0x2f, 0xd6, 0x4f, 0x2e, 0xca, 0x2c, 0xce, 0x2c, 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, - 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, - 0x12, 0x85, 0x28, 0xd2, 0x83, 0x28, 0xd2, 0x83, 0x2a, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, - 0xab, 0xd0, 0x07, 0xb1, 0x20, 0x8a, 0xa5, 0xe4, 0xa0, 0x26, 0x26, 0x25, 0x16, 0xa7, 0xc2, 0xcd, - 0x4b, 0xce, 0xcf, 0xcc, 0x83, 0xca, 0x0b, 0x26, 0xe6, 0x66, 0xe6, 0xe5, 0xeb, 0x83, 0x49, 0x88, - 0x90, 0x52, 0x38, 0x17, 0x8f, 0x3b, 0xc4, 0xc2, 0xe0, 0x92, 0xc4, 0x92, 0x54, 0x21, 0x77, 0x2e, - 0x9e, 0xe4, 0xfc, 0xbc, 0xe2, 0x92, 0xc4, 0xbc, 0x92, 0xf8, 0xb4, 0xd4, 0x54, 0x09, 0x66, 0x05, - 0x46, 0x0d, 0x6e, 0x23, 0x49, 0x3d, 0xa8, 0x33, 0x40, 0x26, 0xc3, 0x1c, 0xa1, 0xe7, 0x9c, 0x9f, - 0x99, 0xe7, 0xc4, 0x79, 0xe2, 0x9e, 0x3c, 0xc3, 0x8a, 0xe7, 0x1b, 0xb4, 0x18, 0x83, 0xb8, 0x61, - 0x3a, 0xdd, 0x52, 0x53, 0x9d, 0x5c, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, - 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, - 0x4a, 0x3b, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0x16, 0x04, 0x60, - 0x4a, 0xb7, 0x38, 0x25, 0x5b, 0xbf, 0x02, 0x16, 0x1e, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, - 0x60, 0x67, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x98, 0x45, 0xfd, 0x02, 0x2d, 0x01, 0x00, - 0x00, -} - -func (m *GenesisState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ConstantFee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ConstantFee.Size() - n += 1 + l + sovGenesis(uint64(l)) - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConstantFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ConstantFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/crisis/types/keys.go b/x/crisis/types/keys.go deleted file mode 100644 index 91df68ddaa..0000000000 --- a/x/crisis/types/keys.go +++ /dev/null @@ -1,17 +0,0 @@ -package types - -import "cosmossdk.io/collections" - -const ( - // module name - ModuleName = "crisis" - - StoreKey = ModuleName - - // GovModuleName duplicates the gov module's name to avoid a cyclic dependency with x/gov. - // It should be synced with the gov module's name if it is ever changed. - // See: https://github.com/cosmos/cosmos-sdk/blob/b62a28aac041829da5ded4aeacfcd7a42873d1c8/x/gov/types/keys.go#L9 - GovModuleName = "gov" -) - -var ConstantFeeKey = collections.NewPrefix(1) diff --git a/x/crisis/types/msgs.go b/x/crisis/types/msgs.go deleted file mode 100644 index ed8542ea33..0000000000 --- a/x/crisis/types/msgs.go +++ /dev/null @@ -1,24 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// ensure Msg interface compliance at compile time -var ( - _, _ sdk.Msg = &MsgVerifyInvariant{}, &MsgUpdateParams{} -) - -// NewMsgVerifyInvariant creates a new MsgVerifyInvariant object -func NewMsgVerifyInvariant(sender, invModeName, invRoute string) *MsgVerifyInvariant { - return &MsgVerifyInvariant{ - Sender: sender, - InvariantModuleName: invModeName, - InvariantRoute: invRoute, - } -} - -// FullInvariantRoute - get the messages full invariant route -func (msg MsgVerifyInvariant) FullInvariantRoute() string { - return msg.InvariantModuleName + "/" + msg.InvariantRoute -} diff --git a/x/crisis/types/route.go b/x/crisis/types/route.go deleted file mode 100644 index 1096798e8c..0000000000 --- a/x/crisis/types/route.go +++ /dev/null @@ -1,26 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// invariant route -type InvarRoute struct { - ModuleName string - Route string - Invar sdk.Invariant -} - -// NewInvarRoute - create an InvarRoute object -func NewInvarRoute(moduleName, route string, invar sdk.Invariant) InvarRoute { - return InvarRoute{ - ModuleName: moduleName, - Route: route, - Invar: invar, - } -} - -// get the full invariance route -func (i InvarRoute) FullRoute() string { - return i.ModuleName + "/" + i.Route -} diff --git a/x/crisis/types/tx.pb.go b/x/crisis/types/tx.pb.go deleted file mode 100644 index 15e8b33669..0000000000 --- a/x/crisis/types/tx.pb.go +++ /dev/null @@ -1,1022 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/crisis/v1beta1/tx.proto - -package types - -import ( - context "context" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/cosmos-sdk/types/msgservice" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// MsgVerifyInvariant represents a message to verify a particular invariance. -type MsgVerifyInvariant struct { - // sender is the account address of private key to send coins to fee collector account. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // name of the invariant module. - InvariantModuleName string `protobuf:"bytes,2,opt,name=invariant_module_name,json=invariantModuleName,proto3" json:"invariant_module_name,omitempty"` - // invariant_route is the msg's invariant route. - InvariantRoute string `protobuf:"bytes,3,opt,name=invariant_route,json=invariantRoute,proto3" json:"invariant_route,omitempty"` -} - -func (m *MsgVerifyInvariant) Reset() { *m = MsgVerifyInvariant{} } -func (m *MsgVerifyInvariant) String() string { return proto.CompactTextString(m) } -func (*MsgVerifyInvariant) ProtoMessage() {} -func (*MsgVerifyInvariant) Descriptor() ([]byte, []int) { - return fileDescriptor_61276163172fe867, []int{0} -} -func (m *MsgVerifyInvariant) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgVerifyInvariant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgVerifyInvariant.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgVerifyInvariant) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgVerifyInvariant.Merge(m, src) -} -func (m *MsgVerifyInvariant) XXX_Size() int { - return m.Size() -} -func (m *MsgVerifyInvariant) XXX_DiscardUnknown() { - xxx_messageInfo_MsgVerifyInvariant.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgVerifyInvariant proto.InternalMessageInfo - -// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. -type MsgVerifyInvariantResponse struct { -} - -func (m *MsgVerifyInvariantResponse) Reset() { *m = MsgVerifyInvariantResponse{} } -func (m *MsgVerifyInvariantResponse) String() string { return proto.CompactTextString(m) } -func (*MsgVerifyInvariantResponse) ProtoMessage() {} -func (*MsgVerifyInvariantResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_61276163172fe867, []int{1} -} -func (m *MsgVerifyInvariantResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgVerifyInvariantResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgVerifyInvariantResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgVerifyInvariantResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgVerifyInvariantResponse.Merge(m, src) -} -func (m *MsgVerifyInvariantResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgVerifyInvariantResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgVerifyInvariantResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgVerifyInvariantResponse proto.InternalMessageInfo - -// MsgUpdateParams is the Msg/UpdateParams request type. -type MsgUpdateParams struct { - // authority is the address that controls the module (defaults to x/gov unless overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // constant_fee defines the x/crisis parameter. - ConstantFee types.Coin `protobuf:"bytes,2,opt,name=constant_fee,json=constantFee,proto3" json:"constant_fee"` -} - -func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } -func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateParams) ProtoMessage() {} -func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_61276163172fe867, []int{2} -} -func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateParams.Merge(m, src) -} -func (m *MsgUpdateParams) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateParams) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo - -func (m *MsgUpdateParams) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgUpdateParams) GetConstantFee() types.Coin { - if m != nil { - return m.ConstantFee - } - return types.Coin{} -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -type MsgUpdateParamsResponse struct { -} - -func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } -func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateParamsResponse) ProtoMessage() {} -func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_61276163172fe867, []int{3} -} -func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) -} -func (m *MsgUpdateParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*MsgVerifyInvariant)(nil), "cosmos.crisis.v1beta1.MsgVerifyInvariant") - proto.RegisterType((*MsgVerifyInvariantResponse)(nil), "cosmos.crisis.v1beta1.MsgVerifyInvariantResponse") - proto.RegisterType((*MsgUpdateParams)(nil), "cosmos.crisis.v1beta1.MsgUpdateParams") - proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.crisis.v1beta1.MsgUpdateParamsResponse") -} - -func init() { proto.RegisterFile("cosmos/crisis/v1beta1/tx.proto", fileDescriptor_61276163172fe867) } - -var fileDescriptor_61276163172fe867 = []byte{ - // 529 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xcf, 0x6b, 0x13, 0x41, - 0x14, 0xc7, 0x77, 0x2d, 0x16, 0x32, 0x2d, 0x06, 0x37, 0x2d, 0x4d, 0x17, 0xdd, 0x94, 0x08, 0xfe, - 0x88, 0x64, 0xb6, 0x89, 0xbf, 0x20, 0x37, 0x23, 0x2a, 0x3d, 0x44, 0x24, 0xa2, 0x07, 0x2f, 0x61, - 0xb2, 0x3b, 0xdd, 0x0e, 0xba, 0x33, 0x61, 0xde, 0x24, 0x34, 0x78, 0x11, 0x4f, 0xe2, 0xc9, 0x3f, - 0xa1, 0x47, 0x8f, 0x39, 0xf4, 0x8f, 0x28, 0x9e, 0x4a, 0x4f, 0x22, 0x28, 0x92, 0x1c, 0xe2, 0xdf, - 0xe0, 0x49, 0x76, 0x77, 0x36, 0xa9, 0x49, 0xa4, 0xbd, 0x24, 0xcb, 0xfb, 0x7e, 0xdf, 0xbc, 0xf7, - 0x99, 0xf7, 0x06, 0x39, 0x9e, 0x80, 0x50, 0x80, 0xeb, 0x49, 0x06, 0x0c, 0xdc, 0x5e, 0xa5, 0x4d, - 0x15, 0xa9, 0xb8, 0x6a, 0x1f, 0x77, 0xa4, 0x50, 0xc2, 0x5a, 0x4f, 0x74, 0x9c, 0xe8, 0x58, 0xeb, - 0xf6, 0x5a, 0x20, 0x02, 0x11, 0x3b, 0xdc, 0xe8, 0x2b, 0x31, 0xdb, 0x9b, 0x89, 0xb9, 0x95, 0x08, - 0x3a, 0x33, 0x91, 0x36, 0x74, 0x9d, 0x10, 0x02, 0xb7, 0x57, 0x89, 0xfe, 0xb4, 0x70, 0x99, 0x84, - 0x8c, 0x0b, 0x37, 0xfe, 0xd5, 0xa1, 0xb4, 0xa7, 0x36, 0x01, 0x3a, 0xe9, 0xc8, 0x13, 0x8c, 0x27, - 0x7a, 0xf1, 0xbb, 0x89, 0xac, 0x06, 0x04, 0xaf, 0xa8, 0x64, 0xbb, 0xfd, 0x1d, 0xde, 0x23, 0x92, - 0x11, 0xae, 0xac, 0x6d, 0xb4, 0x0c, 0x94, 0xfb, 0x54, 0xe6, 0xcd, 0x2d, 0xf3, 0x66, 0xa6, 0x9e, - 0x3f, 0x39, 0x2c, 0xaf, 0xe9, 0x26, 0x1e, 0xfa, 0xbe, 0xa4, 0x00, 0x2f, 0x94, 0x64, 0x3c, 0x68, - 0x6a, 0x9f, 0x55, 0x45, 0xeb, 0x2c, 0x4d, 0x6f, 0x85, 0xc2, 0xef, 0xbe, 0xa5, 0x2d, 0x4e, 0x42, - 0x9a, 0xbf, 0x10, 0x1d, 0xd0, 0xcc, 0x4d, 0xc4, 0x46, 0xac, 0x3d, 0x23, 0x21, 0xb5, 0x6e, 0xa0, - 0xec, 0x34, 0x47, 0x8a, 0xae, 0xa2, 0xf9, 0xa5, 0xd8, 0x7d, 0x69, 0x12, 0x6e, 0x46, 0xd1, 0xda, - 0xbd, 0x8f, 0x07, 0x05, 0xe3, 0xf7, 0x41, 0xc1, 0xf8, 0x30, 0x1e, 0x94, 0x74, 0xc5, 0x4f, 0xe3, - 0x41, 0xe9, 0x6a, 0xd2, 0x52, 0x19, 0xfc, 0x37, 0xee, 0x3c, 0x45, 0xf1, 0x0a, 0xb2, 0xe7, 0xa3, - 0x4d, 0x0a, 0x1d, 0xc1, 0x81, 0x16, 0x7f, 0x98, 0x28, 0xdb, 0x80, 0xe0, 0x65, 0xc7, 0x27, 0x8a, - 0x3e, 0x27, 0x92, 0x84, 0x60, 0xdd, 0x47, 0x19, 0xd2, 0x55, 0x7b, 0x42, 0x32, 0xd5, 0x3f, 0x13, - 0x7d, 0x6a, 0xb5, 0x9e, 0xa2, 0x55, 0x4f, 0x70, 0x50, 0x11, 0xc8, 0x2e, 0x4d, 0xa0, 0x57, 0xaa, - 0x9b, 0x58, 0xe7, 0x45, 0xb7, 0x9f, 0xce, 0x1b, 0x3f, 0x12, 0x8c, 0xd7, 0x33, 0x47, 0x3f, 0x0b, - 0xc6, 0x97, 0xf1, 0xa0, 0x64, 0x36, 0x57, 0xd2, 0xcc, 0x27, 0x94, 0xd6, 0x76, 0x4e, 0x0e, 0xcb, - 0xd9, 0x29, 0xd5, 0xd6, 0x36, 0xbe, 0xfb, 0x20, 0x82, 0x9e, 0xd6, 0x8a, 0xb8, 0xaf, 0x9d, 0xe2, - 0xde, 0x4f, 0xf7, 0x6d, 0x86, 0xa5, 0x88, 0xd1, 0xc6, 0x4c, 0x28, 0x45, 0xaf, 0xe5, 0x16, 0x54, - 0xa9, 0xfe, 0x31, 0xd1, 0x52, 0x03, 0x02, 0x4b, 0xa0, 0xec, 0xec, 0x3a, 0xdc, 0xc2, 0x0b, 0x57, - 0x17, 0xcf, 0xdf, 0xae, 0x5d, 0x39, 0xb7, 0x35, 0xed, 0xc6, 0x7a, 0x87, 0x56, 0xff, 0x19, 0xc2, - 0xf5, 0xff, 0x1f, 0x71, 0xda, 0x67, 0xe3, 0xf3, 0xf9, 0x26, 0x03, 0xcf, 0x7d, 0x9d, 0xa7, 0xb6, - 0x2f, 0xbe, 0x8f, 0x86, 0x50, 0x7f, 0x7c, 0x34, 0x74, 0xcc, 0xe3, 0xa1, 0x63, 0xfe, 0x1a, 0x3a, - 0xe6, 0xe7, 0x91, 0x63, 0x1c, 0x8f, 0x1c, 0xe3, 0xdb, 0xc8, 0x31, 0x5e, 0xdf, 0x0e, 0x98, 0xda, - 0xeb, 0xb6, 0xb1, 0x27, 0x42, 0x37, 0x7d, 0xe0, 0x0b, 0x6e, 0x5f, 0xf5, 0x3b, 0x14, 0xda, 0xcb, - 0xf1, 0xab, 0xba, 0xf3, 0x37, 0x00, 0x00, 0xff, 0xff, 0x4d, 0x40, 0x65, 0xd0, 0x0b, 0x04, 0x00, - 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// 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. -type MsgClient interface { - // VerifyInvariant defines a method to verify a particular invariant. - VerifyInvariant(ctx context.Context, in *MsgVerifyInvariant, opts ...grpc.CallOption) (*MsgVerifyInvariantResponse, error) - // UpdateParams defines a governance operation for updating the x/crisis module - // parameters. The authority is defined in the keeper. - UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) VerifyInvariant(ctx context.Context, in *MsgVerifyInvariant, opts ...grpc.CallOption) (*MsgVerifyInvariantResponse, error) { - out := new(MsgVerifyInvariantResponse) - err := c.cc.Invoke(ctx, "/cosmos.crisis.v1beta1.Msg/VerifyInvariant", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { - out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, "/cosmos.crisis.v1beta1.Msg/UpdateParams", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - // VerifyInvariant defines a method to verify a particular invariant. - VerifyInvariant(context.Context, *MsgVerifyInvariant) (*MsgVerifyInvariantResponse, error) - // UpdateParams defines a governance operation for updating the x/crisis module - // parameters. The authority is defined in the keeper. - UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) VerifyInvariant(ctx context.Context, req *MsgVerifyInvariant) (*MsgVerifyInvariantResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VerifyInvariant not implemented") -} -func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_VerifyInvariant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgVerifyInvariant) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).VerifyInvariant(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.crisis.v1beta1.Msg/VerifyInvariant", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).VerifyInvariant(ctx, req.(*MsgVerifyInvariant)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateParams) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.crisis.v1beta1.Msg/UpdateParams", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.crisis.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "VerifyInvariant", - Handler: _Msg_VerifyInvariant_Handler, - }, - { - MethodName: "UpdateParams", - Handler: _Msg_UpdateParams_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/crisis/v1beta1/tx.proto", -} - -func (m *MsgVerifyInvariant) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgVerifyInvariant) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgVerifyInvariant) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.InvariantRoute) > 0 { - i -= len(m.InvariantRoute) - copy(dAtA[i:], m.InvariantRoute) - i = encodeVarintTx(dAtA, i, uint64(len(m.InvariantRoute))) - i-- - dAtA[i] = 0x1a - } - if len(m.InvariantModuleName) > 0 { - i -= len(m.InvariantModuleName) - copy(dAtA[i:], m.InvariantModuleName) - i = encodeVarintTx(dAtA, i, uint64(len(m.InvariantModuleName))) - i-- - dAtA[i] = 0x12 - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgVerifyInvariantResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgVerifyInvariantResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgVerifyInvariantResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ConstantFee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgVerifyInvariant) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.InvariantModuleName) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.InvariantRoute) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgVerifyInvariantResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgUpdateParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.ConstantFee.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgUpdateParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgVerifyInvariant) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgVerifyInvariant: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgVerifyInvariant: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvariantModuleName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InvariantModuleName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvariantRoute", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InvariantRoute = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgVerifyInvariantResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgVerifyInvariantResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgVerifyInvariantResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConstantFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ConstantFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTx(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTx - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTx - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTx - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/upgrade/README.md b/x/upgrade/README.md index 974d76c9e2..be6e3476a1 100644 --- a/x/upgrade/README.md +++ b/x/upgrade/README.md @@ -22,9 +22,9 @@ recover from. * [State](#state) * [Events](#events) * [Client](#client) - * [CLI](#cli) - * [REST](#rest) - * [gRPC](#grpc) + * [CLI](#cli) + * [REST](#rest) + * [gRPC](#grpc) * [Resources](#resources) ## Concepts @@ -246,8 +246,6 @@ module_versions: version: "1" - name: bank version: "2" -- name: crisis - version: "1" - name: distribution version: "2" - name: evidence @@ -410,10 +408,6 @@ Example Output: "name": "bank", "version": "2" }, - { - "name": "crisis", - "version": "1" - }, { "name": "distribution", "version": "2" @@ -552,10 +546,6 @@ Example Output: "name": "bank", "version": "2" }, - { - "name": "crisis", - "version": "1" - }, { "name": "distribution", "version": "2"