diff --git a/api/cosmos/accounts/defaults/multisig/v1/multisig.pulsar.go b/api/cosmos/accounts/defaults/multisig/v1/multisig.pulsar.go new file mode 100644 index 000000000000..dacebbd4ecf3 --- /dev/null +++ b/api/cosmos/accounts/defaults/multisig/v1/multisig.pulsar.go @@ -0,0 +1,9246 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package multisigv1 + +import ( + _ "cosmossdk.io/api/cosmos/msg/v1" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + 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" + anypb "google.golang.org/protobuf/types/known/anypb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_MsgCreateProposal protoreflect.MessageDescriptor + fd_MsgCreateProposal_proposal_id protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_MsgCreateProposal = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("MsgCreateProposal") + fd_MsgCreateProposal_proposal_id = md_MsgCreateProposal.Fields().ByName("proposal_id") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateProposal)(nil) + +type fastReflection_MsgCreateProposal MsgCreateProposal + +func (x *MsgCreateProposal) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateProposal)(x) +} + +func (x *MsgCreateProposal) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_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_MsgCreateProposal_messageType fastReflection_MsgCreateProposal_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateProposal_messageType{} + +type fastReflection_MsgCreateProposal_messageType struct{} + +func (x fastReflection_MsgCreateProposal_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateProposal)(nil) +} +func (x fastReflection_MsgCreateProposal_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateProposal) +} +func (x fastReflection_MsgCreateProposal_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateProposal +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateProposal) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateProposal +} + +// 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_MsgCreateProposal) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateProposal_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateProposal) New() protoreflect.Message { + return new(fastReflection_MsgCreateProposal) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateProposal) Interface() protoreflect.ProtoMessage { + return (*MsgCreateProposal)(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_MsgCreateProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ProposalId != uint64(0) { + value := protoreflect.ValueOfUint64(x.ProposalId) + if !f(fd_MsgCreateProposal_proposal_id, 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_MsgCreateProposal) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgCreateProposal.proposal_id": + return x.ProposalId != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgCreateProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgCreateProposal 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_MsgCreateProposal) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgCreateProposal.proposal_id": + x.ProposalId = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgCreateProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgCreateProposal 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_MsgCreateProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgCreateProposal.proposal_id": + value := x.ProposalId + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgCreateProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgCreateProposal 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_MsgCreateProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgCreateProposal.proposal_id": + x.ProposalId = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgCreateProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgCreateProposal 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_MsgCreateProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgCreateProposal.proposal_id": + panic(fmt.Errorf("field proposal_id of message cosmos.accounts.defaults.multisig.v1.MsgCreateProposal is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgCreateProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgCreateProposal 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_MsgCreateProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgCreateProposal.proposal_id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgCreateProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgCreateProposal 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_MsgCreateProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.MsgCreateProposal", 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_MsgCreateProposal) 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_MsgCreateProposal) 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_MsgCreateProposal) 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_MsgCreateProposal) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateProposal) + 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.ProposalId != 0 { + n += 1 + runtime.Sov(uint64(x.ProposalId)) + } + 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().(*MsgCreateProposal) + 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.ProposalId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) + i-- + dAtA[i] = 0x8 + } + 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().(*MsgCreateProposal) + 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: MsgCreateProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + x.ProposalId = 0 + 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++ + x.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 _ protoreflect.List = (*_MsgInit_1_list)(nil) + +type _MsgInit_1_list struct { + list *[]*Member +} + +func (x *_MsgInit_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgInit_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgInit_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Member) + (*x.list)[i] = concreteValue +} + +func (x *_MsgInit_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Member) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgInit_1_list) AppendMutable() protoreflect.Value { + v := new(Member) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgInit_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgInit_1_list) NewElement() protoreflect.Value { + v := new(Member) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgInit_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgInit protoreflect.MessageDescriptor + fd_MsgInit_members protoreflect.FieldDescriptor + fd_MsgInit_Config protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_MsgInit = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("MsgInit") + fd_MsgInit_members = md_MsgInit.Fields().ByName("members") + fd_MsgInit_Config = md_MsgInit.Fields().ByName("Config") +} + +var _ protoreflect.Message = (*fastReflection_MsgInit)(nil) + +type fastReflection_MsgInit MsgInit + +func (x *MsgInit) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInit)(x) +} + +func (x *MsgInit) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_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_MsgInit_messageType fastReflection_MsgInit_messageType +var _ protoreflect.MessageType = fastReflection_MsgInit_messageType{} + +type fastReflection_MsgInit_messageType struct{} + +func (x fastReflection_MsgInit_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInit)(nil) +} +func (x fastReflection_MsgInit_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInit) +} +func (x fastReflection_MsgInit_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInit +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInit) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInit +} + +// 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_MsgInit) Type() protoreflect.MessageType { + return _fastReflection_MsgInit_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInit) New() protoreflect.Message { + return new(fastReflection_MsgInit) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInit) Interface() protoreflect.ProtoMessage { + return (*MsgInit)(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_MsgInit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Members) != 0 { + value := protoreflect.ValueOfList(&_MsgInit_1_list{list: &x.Members}) + if !f(fd_MsgInit_members, value) { + return + } + } + if x.Config != nil { + value := protoreflect.ValueOfMessage(x.Config.ProtoReflect()) + if !f(fd_MsgInit_Config, 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_MsgInit) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgInit.members": + return len(x.Members) != 0 + case "cosmos.accounts.defaults.multisig.v1.MsgInit.Config": + return x.Config != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgInit 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_MsgInit) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgInit.members": + x.Members = nil + case "cosmos.accounts.defaults.multisig.v1.MsgInit.Config": + x.Config = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgInit 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_MsgInit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgInit.members": + if len(x.Members) == 0 { + return protoreflect.ValueOfList(&_MsgInit_1_list{}) + } + listValue := &_MsgInit_1_list{list: &x.Members} + return protoreflect.ValueOfList(listValue) + case "cosmos.accounts.defaults.multisig.v1.MsgInit.Config": + value := x.Config + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgInit 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_MsgInit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgInit.members": + lv := value.List() + clv := lv.(*_MsgInit_1_list) + x.Members = *clv.list + case "cosmos.accounts.defaults.multisig.v1.MsgInit.Config": + x.Config = value.Message().Interface().(*Config) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgInit 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_MsgInit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgInit.members": + if x.Members == nil { + x.Members = []*Member{} + } + value := &_MsgInit_1_list{list: &x.Members} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.defaults.multisig.v1.MsgInit.Config": + if x.Config == nil { + x.Config = new(Config) + } + return protoreflect.ValueOfMessage(x.Config.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgInit 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_MsgInit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgInit.members": + list := []*Member{} + return protoreflect.ValueOfList(&_MsgInit_1_list{list: &list}) + case "cosmos.accounts.defaults.multisig.v1.MsgInit.Config": + m := new(Config) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgInit 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_MsgInit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.MsgInit", 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_MsgInit) 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_MsgInit) 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_MsgInit) 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_MsgInit) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInit) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Members) > 0 { + for _, e := range x.Members { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Config != nil { + l = options.Size(x.Config) + 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().(*MsgInit) + 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.Config != nil { + encoded, err := options.Marshal(x.Config) + 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.Members) > 0 { + for iNdEx := len(x.Members) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Members[iNdEx]) + 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] = 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().(*MsgInit) + 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: MsgInit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInit: 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 Members", 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 + } + x.Members = append(x.Members, &Member{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Members[len(x.Members)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Config", 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.Config == nil { + x.Config = &Config{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Config); 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_MsgInitResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_MsgInitResponse = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("MsgInitResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgInitResponse)(nil) + +type fastReflection_MsgInitResponse MsgInitResponse + +func (x *MsgInitResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitResponse)(x) +} + +func (x *MsgInitResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_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_MsgInitResponse_messageType fastReflection_MsgInitResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitResponse_messageType{} + +type fastReflection_MsgInitResponse_messageType struct{} + +func (x fastReflection_MsgInitResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitResponse)(nil) +} +func (x fastReflection_MsgInitResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitResponse) +} +func (x fastReflection_MsgInitResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInitResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitResponse +} + +// 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_MsgInitResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgInitResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInitResponse) New() protoreflect.Message { + return new(fastReflection_MsgInitResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInitResponse) Interface() protoreflect.ProtoMessage { + return (*MsgInitResponse)(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_MsgInitResponse) 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_MsgInitResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgInitResponse 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_MsgInitResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgInitResponse 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_MsgInitResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgInitResponse 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_MsgInitResponse) 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.accounts.defaults.multisig.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgInitResponse 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_MsgInitResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgInitResponse 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_MsgInitResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgInitResponse 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_MsgInitResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.MsgInitResponse", 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_MsgInitResponse) 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_MsgInitResponse) 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_MsgInitResponse) 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_MsgInitResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitResponse) + 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().(*MsgInitResponse) + 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().(*MsgInitResponse) + 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: MsgInitResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitResponse: 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 _ protoreflect.List = (*_MsgUpdateConfigRequest_1_list)(nil) + +type _MsgUpdateConfigRequest_1_list struct { + list *[]*Member +} + +func (x *_MsgUpdateConfigRequest_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgUpdateConfigRequest_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgUpdateConfigRequest_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Member) + (*x.list)[i] = concreteValue +} + +func (x *_MsgUpdateConfigRequest_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Member) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgUpdateConfigRequest_1_list) AppendMutable() protoreflect.Value { + v := new(Member) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgUpdateConfigRequest_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgUpdateConfigRequest_1_list) NewElement() protoreflect.Value { + v := new(Member) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgUpdateConfigRequest_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgUpdateConfigRequest protoreflect.MessageDescriptor + fd_MsgUpdateConfigRequest_update_members protoreflect.FieldDescriptor + fd_MsgUpdateConfigRequest_Config protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_MsgUpdateConfigRequest = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("MsgUpdateConfigRequest") + fd_MsgUpdateConfigRequest_update_members = md_MsgUpdateConfigRequest.Fields().ByName("update_members") + fd_MsgUpdateConfigRequest_Config = md_MsgUpdateConfigRequest.Fields().ByName("Config") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateConfigRequest)(nil) + +type fastReflection_MsgUpdateConfigRequest MsgUpdateConfigRequest + +func (x *MsgUpdateConfigRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateConfigRequest)(x) +} + +func (x *MsgUpdateConfigRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_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_MsgUpdateConfigRequest_messageType fastReflection_MsgUpdateConfigRequest_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateConfigRequest_messageType{} + +type fastReflection_MsgUpdateConfigRequest_messageType struct{} + +func (x fastReflection_MsgUpdateConfigRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateConfigRequest)(nil) +} +func (x fastReflection_MsgUpdateConfigRequest_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateConfigRequest) +} +func (x fastReflection_MsgUpdateConfigRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateConfigRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateConfigRequest) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateConfigRequest +} + +// 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_MsgUpdateConfigRequest) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateConfigRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateConfigRequest) New() protoreflect.Message { + return new(fastReflection_MsgUpdateConfigRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateConfigRequest) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateConfigRequest)(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_MsgUpdateConfigRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.UpdateMembers) != 0 { + value := protoreflect.ValueOfList(&_MsgUpdateConfigRequest_1_list{list: &x.UpdateMembers}) + if !f(fd_MsgUpdateConfigRequest_update_members, value) { + return + } + } + if x.Config != nil { + value := protoreflect.ValueOfMessage(x.Config.ProtoReflect()) + if !f(fd_MsgUpdateConfigRequest_Config, 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_MsgUpdateConfigRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest.update_members": + return len(x.UpdateMembers) != 0 + case "cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest.Config": + return x.Config != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest 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_MsgUpdateConfigRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest.update_members": + x.UpdateMembers = nil + case "cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest.Config": + x.Config = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest 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_MsgUpdateConfigRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest.update_members": + if len(x.UpdateMembers) == 0 { + return protoreflect.ValueOfList(&_MsgUpdateConfigRequest_1_list{}) + } + listValue := &_MsgUpdateConfigRequest_1_list{list: &x.UpdateMembers} + return protoreflect.ValueOfList(listValue) + case "cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest.Config": + value := x.Config + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest 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_MsgUpdateConfigRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest.update_members": + lv := value.List() + clv := lv.(*_MsgUpdateConfigRequest_1_list) + x.UpdateMembers = *clv.list + case "cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest.Config": + x.Config = value.Message().Interface().(*Config) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest 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_MsgUpdateConfigRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest.update_members": + if x.UpdateMembers == nil { + x.UpdateMembers = []*Member{} + } + value := &_MsgUpdateConfigRequest_1_list{list: &x.UpdateMembers} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest.Config": + if x.Config == nil { + x.Config = new(Config) + } + return protoreflect.ValueOfMessage(x.Config.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest 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_MsgUpdateConfigRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest.update_members": + list := []*Member{} + return protoreflect.ValueOfList(&_MsgUpdateConfigRequest_1_list{list: &list}) + case "cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest.Config": + m := new(Config) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest 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_MsgUpdateConfigRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest", 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_MsgUpdateConfigRequest) 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_MsgUpdateConfigRequest) 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_MsgUpdateConfigRequest) 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_MsgUpdateConfigRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateConfigRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.UpdateMembers) > 0 { + for _, e := range x.UpdateMembers { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Config != nil { + l = options.Size(x.Config) + 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().(*MsgUpdateConfigRequest) + 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.Config != nil { + encoded, err := options.Marshal(x.Config) + 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.UpdateMembers) > 0 { + for iNdEx := len(x.UpdateMembers) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.UpdateMembers[iNdEx]) + 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] = 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().(*MsgUpdateConfigRequest) + 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: MsgUpdateConfigRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateConfigRequest: 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 UpdateMembers", 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 + } + x.UpdateMembers = append(x.UpdateMembers, &Member{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UpdateMembers[len(x.UpdateMembers)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Config", 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.Config == nil { + x.Config = &Config{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Config); 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_MsgUpdateConfigResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_MsgUpdateConfigResponse = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("MsgUpdateConfigResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateConfigResponse)(nil) + +type fastReflection_MsgUpdateConfigResponse MsgUpdateConfigResponse + +func (x *MsgUpdateConfigResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateConfigResponse)(x) +} + +func (x *MsgUpdateConfigResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[4] + 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_MsgUpdateConfigResponse_messageType fastReflection_MsgUpdateConfigResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateConfigResponse_messageType{} + +type fastReflection_MsgUpdateConfigResponse_messageType struct{} + +func (x fastReflection_MsgUpdateConfigResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateConfigResponse)(nil) +} +func (x fastReflection_MsgUpdateConfigResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateConfigResponse) +} +func (x fastReflection_MsgUpdateConfigResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateConfigResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateConfigResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateConfigResponse +} + +// 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_MsgUpdateConfigResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateConfigResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateConfigResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateConfigResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateConfigResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateConfigResponse)(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_MsgUpdateConfigResponse) 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_MsgUpdateConfigResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigResponse 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_MsgUpdateConfigResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigResponse 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_MsgUpdateConfigResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigResponse 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_MsgUpdateConfigResponse) 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.accounts.defaults.multisig.v1.MsgUpdateConfigResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigResponse 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_MsgUpdateConfigResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigResponse 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_MsgUpdateConfigResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigResponse 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_MsgUpdateConfigResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigResponse", 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_MsgUpdateConfigResponse) 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_MsgUpdateConfigResponse) 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_MsgUpdateConfigResponse) 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_MsgUpdateConfigResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateConfigResponse) + 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().(*MsgUpdateConfigResponse) + 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().(*MsgUpdateConfigResponse) + 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: MsgUpdateConfigResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateConfigResponse: 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_Member protoreflect.MessageDescriptor + fd_Member_address protoreflect.FieldDescriptor + fd_Member_weight protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_Member = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("Member") + fd_Member_address = md_Member.Fields().ByName("address") + fd_Member_weight = md_Member.Fields().ByName("weight") +} + +var _ protoreflect.Message = (*fastReflection_Member)(nil) + +type fastReflection_Member Member + +func (x *Member) ProtoReflect() protoreflect.Message { + return (*fastReflection_Member)(x) +} + +func (x *Member) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[5] + 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_Member_messageType fastReflection_Member_messageType +var _ protoreflect.MessageType = fastReflection_Member_messageType{} + +type fastReflection_Member_messageType struct{} + +func (x fastReflection_Member_messageType) Zero() protoreflect.Message { + return (*fastReflection_Member)(nil) +} +func (x fastReflection_Member_messageType) New() protoreflect.Message { + return new(fastReflection_Member) +} +func (x fastReflection_Member_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Member +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Member) Descriptor() protoreflect.MessageDescriptor { + return md_Member +} + +// 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_Member) Type() protoreflect.MessageType { + return _fastReflection_Member_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Member) New() protoreflect.Message { + return new(fastReflection_Member) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Member) Interface() protoreflect.ProtoMessage { + return (*Member)(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_Member) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_Member_address, value) { + return + } + } + if x.Weight != uint64(0) { + value := protoreflect.ValueOfUint64(x.Weight) + if !f(fd_Member_weight, 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_Member) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Member.address": + return x.Address != "" + case "cosmos.accounts.defaults.multisig.v1.Member.weight": + return x.Weight != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Member")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Member 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_Member) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Member.address": + x.Address = "" + case "cosmos.accounts.defaults.multisig.v1.Member.weight": + x.Weight = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Member")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Member 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_Member) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Member.address": + value := x.Address + return protoreflect.ValueOfString(value) + case "cosmos.accounts.defaults.multisig.v1.Member.weight": + value := x.Weight + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Member")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Member 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_Member) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Member.address": + x.Address = value.Interface().(string) + case "cosmos.accounts.defaults.multisig.v1.Member.weight": + x.Weight = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Member")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Member 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_Member) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Member.address": + panic(fmt.Errorf("field address of message cosmos.accounts.defaults.multisig.v1.Member is not mutable")) + case "cosmos.accounts.defaults.multisig.v1.Member.weight": + panic(fmt.Errorf("field weight of message cosmos.accounts.defaults.multisig.v1.Member is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Member")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Member 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_Member) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Member.address": + return protoreflect.ValueOfString("") + case "cosmos.accounts.defaults.multisig.v1.Member.weight": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Member")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Member 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_Member) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.Member", 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_Member) 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_Member) 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_Member) 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_Member) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Member) + 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.Address) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Weight != 0 { + n += 1 + runtime.Sov(uint64(x.Weight)) + } + 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().(*Member) + 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.Weight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Weight)) + i-- + dAtA[i] = 0x10 + } + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + 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().(*Member) + 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: Member: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Member: 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 Address", 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + x.Weight = 0 + 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++ + x.Weight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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_Config protoreflect.MessageDescriptor + fd_Config_threshold protoreflect.FieldDescriptor + fd_Config_quorum protoreflect.FieldDescriptor + fd_Config_voting_period protoreflect.FieldDescriptor + fd_Config_revote protoreflect.FieldDescriptor + fd_Config_early_execution protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_Config = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("Config") + fd_Config_threshold = md_Config.Fields().ByName("threshold") + fd_Config_quorum = md_Config.Fields().ByName("quorum") + fd_Config_voting_period = md_Config.Fields().ByName("voting_period") + fd_Config_revote = md_Config.Fields().ByName("revote") + fd_Config_early_execution = md_Config.Fields().ByName("early_execution") +} + +var _ protoreflect.Message = (*fastReflection_Config)(nil) + +type fastReflection_Config Config + +func (x *Config) ProtoReflect() protoreflect.Message { + return (*fastReflection_Config)(x) +} + +func (x *Config) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[6] + 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_Config_messageType fastReflection_Config_messageType +var _ protoreflect.MessageType = fastReflection_Config_messageType{} + +type fastReflection_Config_messageType struct{} + +func (x fastReflection_Config_messageType) Zero() protoreflect.Message { + return (*fastReflection_Config)(nil) +} +func (x fastReflection_Config_messageType) New() protoreflect.Message { + return new(fastReflection_Config) +} +func (x fastReflection_Config_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Config +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Config) Descriptor() protoreflect.MessageDescriptor { + return md_Config +} + +// 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_Config) Type() protoreflect.MessageType { + return _fastReflection_Config_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Config) New() protoreflect.Message { + return new(fastReflection_Config) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Config) Interface() protoreflect.ProtoMessage { + return (*Config)(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_Config) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Threshold != int64(0) { + value := protoreflect.ValueOfInt64(x.Threshold) + if !f(fd_Config_threshold, value) { + return + } + } + if x.Quorum != int64(0) { + value := protoreflect.ValueOfInt64(x.Quorum) + if !f(fd_Config_quorum, value) { + return + } + } + if x.VotingPeriod != int64(0) { + value := protoreflect.ValueOfInt64(x.VotingPeriod) + if !f(fd_Config_voting_period, value) { + return + } + } + if x.Revote != false { + value := protoreflect.ValueOfBool(x.Revote) + if !f(fd_Config_revote, value) { + return + } + } + if x.EarlyExecution != false { + value := protoreflect.ValueOfBool(x.EarlyExecution) + if !f(fd_Config_early_execution, 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_Config) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Config.threshold": + return x.Threshold != int64(0) + case "cosmos.accounts.defaults.multisig.v1.Config.quorum": + return x.Quorum != int64(0) + case "cosmos.accounts.defaults.multisig.v1.Config.voting_period": + return x.VotingPeriod != int64(0) + case "cosmos.accounts.defaults.multisig.v1.Config.revote": + return x.Revote != false + case "cosmos.accounts.defaults.multisig.v1.Config.early_execution": + return x.EarlyExecution != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Config")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Config 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_Config) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Config.threshold": + x.Threshold = int64(0) + case "cosmos.accounts.defaults.multisig.v1.Config.quorum": + x.Quorum = int64(0) + case "cosmos.accounts.defaults.multisig.v1.Config.voting_period": + x.VotingPeriod = int64(0) + case "cosmos.accounts.defaults.multisig.v1.Config.revote": + x.Revote = false + case "cosmos.accounts.defaults.multisig.v1.Config.early_execution": + x.EarlyExecution = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Config")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Config 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_Config) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Config.threshold": + value := x.Threshold + return protoreflect.ValueOfInt64(value) + case "cosmos.accounts.defaults.multisig.v1.Config.quorum": + value := x.Quorum + return protoreflect.ValueOfInt64(value) + case "cosmos.accounts.defaults.multisig.v1.Config.voting_period": + value := x.VotingPeriod + return protoreflect.ValueOfInt64(value) + case "cosmos.accounts.defaults.multisig.v1.Config.revote": + value := x.Revote + return protoreflect.ValueOfBool(value) + case "cosmos.accounts.defaults.multisig.v1.Config.early_execution": + value := x.EarlyExecution + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Config")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Config 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_Config) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Config.threshold": + x.Threshold = value.Int() + case "cosmos.accounts.defaults.multisig.v1.Config.quorum": + x.Quorum = value.Int() + case "cosmos.accounts.defaults.multisig.v1.Config.voting_period": + x.VotingPeriod = value.Int() + case "cosmos.accounts.defaults.multisig.v1.Config.revote": + x.Revote = value.Bool() + case "cosmos.accounts.defaults.multisig.v1.Config.early_execution": + x.EarlyExecution = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Config")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Config 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_Config) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Config.threshold": + panic(fmt.Errorf("field threshold of message cosmos.accounts.defaults.multisig.v1.Config is not mutable")) + case "cosmos.accounts.defaults.multisig.v1.Config.quorum": + panic(fmt.Errorf("field quorum of message cosmos.accounts.defaults.multisig.v1.Config is not mutable")) + case "cosmos.accounts.defaults.multisig.v1.Config.voting_period": + panic(fmt.Errorf("field voting_period of message cosmos.accounts.defaults.multisig.v1.Config is not mutable")) + case "cosmos.accounts.defaults.multisig.v1.Config.revote": + panic(fmt.Errorf("field revote of message cosmos.accounts.defaults.multisig.v1.Config is not mutable")) + case "cosmos.accounts.defaults.multisig.v1.Config.early_execution": + panic(fmt.Errorf("field early_execution of message cosmos.accounts.defaults.multisig.v1.Config is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Config")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Config 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_Config) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Config.threshold": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.accounts.defaults.multisig.v1.Config.quorum": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.accounts.defaults.multisig.v1.Config.voting_period": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.accounts.defaults.multisig.v1.Config.revote": + return protoreflect.ValueOfBool(false) + case "cosmos.accounts.defaults.multisig.v1.Config.early_execution": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Config")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Config 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_Config) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.Config", 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_Config) 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_Config) 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_Config) 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_Config) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Config) + 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.Threshold != 0 { + n += 1 + runtime.Sov(uint64(x.Threshold)) + } + if x.Quorum != 0 { + n += 1 + runtime.Sov(uint64(x.Quorum)) + } + if x.VotingPeriod != 0 { + n += 1 + runtime.Sov(uint64(x.VotingPeriod)) + } + if x.Revote { + n += 2 + } + if x.EarlyExecution { + n += 2 + } + 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().(*Config) + 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.EarlyExecution { + i-- + if x.EarlyExecution { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if x.Revote { + i-- + if x.Revote { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if x.VotingPeriod != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.VotingPeriod)) + i-- + dAtA[i] = 0x18 + } + if x.Quorum != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Quorum)) + i-- + dAtA[i] = 0x10 + } + if x.Threshold != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Threshold)) + i-- + dAtA[i] = 0x8 + } + 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().(*Config) + 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: Config: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Config: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) + } + x.Threshold = 0 + 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++ + x.Threshold |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Quorum", wireType) + } + x.Quorum = 0 + 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++ + x.Quorum |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingPeriod", wireType) + } + x.VotingPeriod = 0 + 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++ + x.VotingPeriod |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Revote", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Revote = bool(v != 0) + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EarlyExecution", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.EarlyExecution = bool(v != 0) + 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 _ protoreflect.List = (*_Proposal_3_list)(nil) + +type _Proposal_3_list struct { + list *[]*anypb.Any +} + +func (x *_Proposal_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Proposal_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Proposal_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + (*x.list)[i] = concreteValue +} + +func (x *_Proposal_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Proposal_3_list) AppendMutable() protoreflect.Value { + v := new(anypb.Any) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Proposal_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Proposal_3_list) NewElement() protoreflect.Value { + v := new(anypb.Any) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Proposal_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Proposal protoreflect.MessageDescriptor + fd_Proposal_title protoreflect.FieldDescriptor + fd_Proposal_summary protoreflect.FieldDescriptor + fd_Proposal_messages protoreflect.FieldDescriptor + fd_Proposal_execute protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_Proposal = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("Proposal") + fd_Proposal_title = md_Proposal.Fields().ByName("title") + fd_Proposal_summary = md_Proposal.Fields().ByName("summary") + fd_Proposal_messages = md_Proposal.Fields().ByName("messages") + fd_Proposal_execute = md_Proposal.Fields().ByName("execute") +} + +var _ protoreflect.Message = (*fastReflection_Proposal)(nil) + +type fastReflection_Proposal Proposal + +func (x *Proposal) ProtoReflect() protoreflect.Message { + return (*fastReflection_Proposal)(x) +} + +func (x *Proposal) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[7] + 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_Proposal_messageType fastReflection_Proposal_messageType +var _ protoreflect.MessageType = fastReflection_Proposal_messageType{} + +type fastReflection_Proposal_messageType struct{} + +func (x fastReflection_Proposal_messageType) Zero() protoreflect.Message { + return (*fastReflection_Proposal)(nil) +} +func (x fastReflection_Proposal_messageType) New() protoreflect.Message { + return new(fastReflection_Proposal) +} +func (x fastReflection_Proposal_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Proposal +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Proposal) Descriptor() protoreflect.MessageDescriptor { + return md_Proposal +} + +// 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_Proposal) Type() protoreflect.MessageType { + return _fastReflection_Proposal_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Proposal) New() protoreflect.Message { + return new(fastReflection_Proposal) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Proposal) Interface() protoreflect.ProtoMessage { + return (*Proposal)(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_Proposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_Proposal_title, value) { + return + } + } + if x.Summary != "" { + value := protoreflect.ValueOfString(x.Summary) + if !f(fd_Proposal_summary, value) { + return + } + } + if len(x.Messages) != 0 { + value := protoreflect.ValueOfList(&_Proposal_3_list{list: &x.Messages}) + if !f(fd_Proposal_messages, value) { + return + } + } + if x.Execute != false { + value := protoreflect.ValueOfBool(x.Execute) + if !f(fd_Proposal_execute, 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_Proposal) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Proposal.title": + return x.Title != "" + case "cosmos.accounts.defaults.multisig.v1.Proposal.summary": + return x.Summary != "" + case "cosmos.accounts.defaults.multisig.v1.Proposal.messages": + return len(x.Messages) != 0 + case "cosmos.accounts.defaults.multisig.v1.Proposal.execute": + return x.Execute != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Proposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Proposal 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_Proposal) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Proposal.title": + x.Title = "" + case "cosmos.accounts.defaults.multisig.v1.Proposal.summary": + x.Summary = "" + case "cosmos.accounts.defaults.multisig.v1.Proposal.messages": + x.Messages = nil + case "cosmos.accounts.defaults.multisig.v1.Proposal.execute": + x.Execute = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Proposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Proposal 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_Proposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Proposal.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "cosmos.accounts.defaults.multisig.v1.Proposal.summary": + value := x.Summary + return protoreflect.ValueOfString(value) + case "cosmos.accounts.defaults.multisig.v1.Proposal.messages": + if len(x.Messages) == 0 { + return protoreflect.ValueOfList(&_Proposal_3_list{}) + } + listValue := &_Proposal_3_list{list: &x.Messages} + return protoreflect.ValueOfList(listValue) + case "cosmos.accounts.defaults.multisig.v1.Proposal.execute": + value := x.Execute + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Proposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Proposal 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_Proposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Proposal.title": + x.Title = value.Interface().(string) + case "cosmos.accounts.defaults.multisig.v1.Proposal.summary": + x.Summary = value.Interface().(string) + case "cosmos.accounts.defaults.multisig.v1.Proposal.messages": + lv := value.List() + clv := lv.(*_Proposal_3_list) + x.Messages = *clv.list + case "cosmos.accounts.defaults.multisig.v1.Proposal.execute": + x.Execute = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Proposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Proposal 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_Proposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Proposal.messages": + if x.Messages == nil { + x.Messages = []*anypb.Any{} + } + value := &_Proposal_3_list{list: &x.Messages} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.defaults.multisig.v1.Proposal.title": + panic(fmt.Errorf("field title of message cosmos.accounts.defaults.multisig.v1.Proposal is not mutable")) + case "cosmos.accounts.defaults.multisig.v1.Proposal.summary": + panic(fmt.Errorf("field summary of message cosmos.accounts.defaults.multisig.v1.Proposal is not mutable")) + case "cosmos.accounts.defaults.multisig.v1.Proposal.execute": + panic(fmt.Errorf("field execute of message cosmos.accounts.defaults.multisig.v1.Proposal is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Proposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Proposal 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_Proposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.Proposal.title": + return protoreflect.ValueOfString("") + case "cosmos.accounts.defaults.multisig.v1.Proposal.summary": + return protoreflect.ValueOfString("") + case "cosmos.accounts.defaults.multisig.v1.Proposal.messages": + list := []*anypb.Any{} + return protoreflect.ValueOfList(&_Proposal_3_list{list: &list}) + case "cosmos.accounts.defaults.multisig.v1.Proposal.execute": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.Proposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.Proposal 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_Proposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.Proposal", 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_Proposal) 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_Proposal) 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_Proposal) 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_Proposal) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Proposal) + 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.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Summary) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Messages) > 0 { + for _, e := range x.Messages { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Execute { + n += 2 + } + 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().(*Proposal) + 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.Execute { + i-- + if x.Execute { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(x.Messages) > 0 { + for iNdEx := len(x.Messages) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Messages[iNdEx]) + 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 len(x.Summary) > 0 { + i -= len(x.Summary) + copy(dAtA[i:], x.Summary) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Summary))) + i-- + dAtA[i] = 0x12 + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + 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().(*Proposal) + 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: Proposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Proposal: 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 Title", 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.Title = 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 Summary", 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.Summary = 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 Messages", 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 + } + x.Messages = append(x.Messages, &anypb.Any{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Messages[len(x.Messages)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Execute", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Execute = bool(v != 0) + 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_QuerySequence protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_QuerySequence = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("QuerySequence") +} + +var _ protoreflect.Message = (*fastReflection_QuerySequence)(nil) + +type fastReflection_QuerySequence QuerySequence + +func (x *QuerySequence) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuerySequence)(x) +} + +func (x *QuerySequence) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[8] + 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_QuerySequence_messageType fastReflection_QuerySequence_messageType +var _ protoreflect.MessageType = fastReflection_QuerySequence_messageType{} + +type fastReflection_QuerySequence_messageType struct{} + +func (x fastReflection_QuerySequence_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuerySequence)(nil) +} +func (x fastReflection_QuerySequence_messageType) New() protoreflect.Message { + return new(fastReflection_QuerySequence) +} +func (x fastReflection_QuerySequence_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySequence +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QuerySequence) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySequence +} + +// 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_QuerySequence) Type() protoreflect.MessageType { + return _fastReflection_QuerySequence_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QuerySequence) New() protoreflect.Message { + return new(fastReflection_QuerySequence) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QuerySequence) Interface() protoreflect.ProtoMessage { + return (*QuerySequence)(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_QuerySequence) 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_QuerySequence) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QuerySequence")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QuerySequence 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_QuerySequence) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QuerySequence")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QuerySequence 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_QuerySequence) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QuerySequence")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QuerySequence 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_QuerySequence) 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.accounts.defaults.multisig.v1.QuerySequence")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QuerySequence 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_QuerySequence) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QuerySequence")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QuerySequence 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_QuerySequence) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QuerySequence")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QuerySequence 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_QuerySequence) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.QuerySequence", 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_QuerySequence) 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_QuerySequence) 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_QuerySequence) 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_QuerySequence) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QuerySequence) + 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().(*QuerySequence) + 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().(*QuerySequence) + 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: QuerySequence: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySequence: 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_QuerySequenceResponse protoreflect.MessageDescriptor + fd_QuerySequenceResponse_sequence protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_QuerySequenceResponse = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("QuerySequenceResponse") + fd_QuerySequenceResponse_sequence = md_QuerySequenceResponse.Fields().ByName("sequence") +} + +var _ protoreflect.Message = (*fastReflection_QuerySequenceResponse)(nil) + +type fastReflection_QuerySequenceResponse QuerySequenceResponse + +func (x *QuerySequenceResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuerySequenceResponse)(x) +} + +func (x *QuerySequenceResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[9] + 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_QuerySequenceResponse_messageType fastReflection_QuerySequenceResponse_messageType +var _ protoreflect.MessageType = fastReflection_QuerySequenceResponse_messageType{} + +type fastReflection_QuerySequenceResponse_messageType struct{} + +func (x fastReflection_QuerySequenceResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuerySequenceResponse)(nil) +} +func (x fastReflection_QuerySequenceResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QuerySequenceResponse) +} +func (x fastReflection_QuerySequenceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySequenceResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QuerySequenceResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySequenceResponse +} + +// 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_QuerySequenceResponse) Type() protoreflect.MessageType { + return _fastReflection_QuerySequenceResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QuerySequenceResponse) New() protoreflect.Message { + return new(fastReflection_QuerySequenceResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QuerySequenceResponse) Interface() protoreflect.ProtoMessage { + return (*QuerySequenceResponse)(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_QuerySequenceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_QuerySequenceResponse_sequence, 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_QuerySequenceResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse.sequence": + return x.Sequence != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse 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_QuerySequenceResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse.sequence": + x.Sequence = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse 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_QuerySequenceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse 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_QuerySequenceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse.sequence": + x.Sequence = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse 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_QuerySequenceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse.sequence": + panic(fmt.Errorf("field sequence of message cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse 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_QuerySequenceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse 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_QuerySequenceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse", 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_QuerySequenceResponse) 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_QuerySequenceResponse) 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_QuerySequenceResponse) 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_QuerySequenceResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QuerySequenceResponse) + 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.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + 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().(*QuerySequenceResponse) + 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.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x8 + } + 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().(*QuerySequenceResponse) + 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: QuerySequenceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySequenceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 0 + 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++ + x.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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_QueryConfig protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_QueryConfig = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("QueryConfig") +} + +var _ protoreflect.Message = (*fastReflection_QueryConfig)(nil) + +type fastReflection_QueryConfig QueryConfig + +func (x *QueryConfig) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryConfig)(x) +} + +func (x *QueryConfig) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[10] + 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_QueryConfig_messageType fastReflection_QueryConfig_messageType +var _ protoreflect.MessageType = fastReflection_QueryConfig_messageType{} + +type fastReflection_QueryConfig_messageType struct{} + +func (x fastReflection_QueryConfig_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryConfig)(nil) +} +func (x fastReflection_QueryConfig_messageType) New() protoreflect.Message { + return new(fastReflection_QueryConfig) +} +func (x fastReflection_QueryConfig_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryConfig +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryConfig) Descriptor() protoreflect.MessageDescriptor { + return md_QueryConfig +} + +// 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_QueryConfig) Type() protoreflect.MessageType { + return _fastReflection_QueryConfig_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryConfig) New() protoreflect.Message { + return new(fastReflection_QueryConfig) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryConfig) Interface() protoreflect.ProtoMessage { + return (*QueryConfig)(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_QueryConfig) 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_QueryConfig) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryConfig")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryConfig 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_QueryConfig) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryConfig")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryConfig 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_QueryConfig) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryConfig")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryConfig 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_QueryConfig) 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.accounts.defaults.multisig.v1.QueryConfig")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryConfig 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_QueryConfig) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryConfig")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryConfig 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_QueryConfig) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryConfig")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryConfig 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_QueryConfig) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.QueryConfig", 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_QueryConfig) 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_QueryConfig) 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_QueryConfig) 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_QueryConfig) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryConfig) + 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().(*QueryConfig) + 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().(*QueryConfig) + 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: QueryConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryConfig: 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 _ protoreflect.List = (*_QueryConfigResponse_1_list)(nil) + +type _QueryConfigResponse_1_list struct { + list *[]*Member +} + +func (x *_QueryConfigResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryConfigResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryConfigResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Member) + (*x.list)[i] = concreteValue +} + +func (x *_QueryConfigResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Member) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryConfigResponse_1_list) AppendMutable() protoreflect.Value { + v := new(Member) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryConfigResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryConfigResponse_1_list) NewElement() protoreflect.Value { + v := new(Member) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryConfigResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryConfigResponse protoreflect.MessageDescriptor + fd_QueryConfigResponse_members protoreflect.FieldDescriptor + fd_QueryConfigResponse_Config protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_QueryConfigResponse = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("QueryConfigResponse") + fd_QueryConfigResponse_members = md_QueryConfigResponse.Fields().ByName("members") + fd_QueryConfigResponse_Config = md_QueryConfigResponse.Fields().ByName("Config") +} + +var _ protoreflect.Message = (*fastReflection_QueryConfigResponse)(nil) + +type fastReflection_QueryConfigResponse QueryConfigResponse + +func (x *QueryConfigResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryConfigResponse)(x) +} + +func (x *QueryConfigResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[11] + 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_QueryConfigResponse_messageType fastReflection_QueryConfigResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryConfigResponse_messageType{} + +type fastReflection_QueryConfigResponse_messageType struct{} + +func (x fastReflection_QueryConfigResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryConfigResponse)(nil) +} +func (x fastReflection_QueryConfigResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryConfigResponse) +} +func (x fastReflection_QueryConfigResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryConfigResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryConfigResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryConfigResponse +} + +// 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_QueryConfigResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryConfigResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryConfigResponse) New() protoreflect.Message { + return new(fastReflection_QueryConfigResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryConfigResponse) Interface() protoreflect.ProtoMessage { + return (*QueryConfigResponse)(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_QueryConfigResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Members) != 0 { + value := protoreflect.ValueOfList(&_QueryConfigResponse_1_list{list: &x.Members}) + if !f(fd_QueryConfigResponse_members, value) { + return + } + } + if x.Config != nil { + value := protoreflect.ValueOfMessage(x.Config.ProtoReflect()) + if !f(fd_QueryConfigResponse_Config, 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_QueryConfigResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryConfigResponse.members": + return len(x.Members) != 0 + case "cosmos.accounts.defaults.multisig.v1.QueryConfigResponse.Config": + return x.Config != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryConfigResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryConfigResponse 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_QueryConfigResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryConfigResponse.members": + x.Members = nil + case "cosmos.accounts.defaults.multisig.v1.QueryConfigResponse.Config": + x.Config = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryConfigResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryConfigResponse 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_QueryConfigResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryConfigResponse.members": + if len(x.Members) == 0 { + return protoreflect.ValueOfList(&_QueryConfigResponse_1_list{}) + } + listValue := &_QueryConfigResponse_1_list{list: &x.Members} + return protoreflect.ValueOfList(listValue) + case "cosmos.accounts.defaults.multisig.v1.QueryConfigResponse.Config": + value := x.Config + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryConfigResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryConfigResponse 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_QueryConfigResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryConfigResponse.members": + lv := value.List() + clv := lv.(*_QueryConfigResponse_1_list) + x.Members = *clv.list + case "cosmos.accounts.defaults.multisig.v1.QueryConfigResponse.Config": + x.Config = value.Message().Interface().(*Config) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryConfigResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryConfigResponse 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_QueryConfigResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryConfigResponse.members": + if x.Members == nil { + x.Members = []*Member{} + } + value := &_QueryConfigResponse_1_list{list: &x.Members} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.defaults.multisig.v1.QueryConfigResponse.Config": + if x.Config == nil { + x.Config = new(Config) + } + return protoreflect.ValueOfMessage(x.Config.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryConfigResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryConfigResponse 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_QueryConfigResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryConfigResponse.members": + list := []*Member{} + return protoreflect.ValueOfList(&_QueryConfigResponse_1_list{list: &list}) + case "cosmos.accounts.defaults.multisig.v1.QueryConfigResponse.Config": + m := new(Config) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryConfigResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryConfigResponse 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_QueryConfigResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.QueryConfigResponse", 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_QueryConfigResponse) 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_QueryConfigResponse) 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_QueryConfigResponse) 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_QueryConfigResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryConfigResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Members) > 0 { + for _, e := range x.Members { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Config != nil { + l = options.Size(x.Config) + 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().(*QueryConfigResponse) + 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.Config != nil { + encoded, err := options.Marshal(x.Config) + 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.Members) > 0 { + for iNdEx := len(x.Members) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Members[iNdEx]) + 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] = 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().(*QueryConfigResponse) + 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: QueryConfigResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryConfigResponse: 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 Members", 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 + } + x.Members = append(x.Members, &Member{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Members[len(x.Members)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Config", 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.Config == nil { + x.Config = &Config{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Config); 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_QueryProposal protoreflect.MessageDescriptor + fd_QueryProposal_proposal_id protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_QueryProposal = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("QueryProposal") + fd_QueryProposal_proposal_id = md_QueryProposal.Fields().ByName("proposal_id") +} + +var _ protoreflect.Message = (*fastReflection_QueryProposal)(nil) + +type fastReflection_QueryProposal QueryProposal + +func (x *QueryProposal) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryProposal)(x) +} + +func (x *QueryProposal) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[12] + 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_QueryProposal_messageType fastReflection_QueryProposal_messageType +var _ protoreflect.MessageType = fastReflection_QueryProposal_messageType{} + +type fastReflection_QueryProposal_messageType struct{} + +func (x fastReflection_QueryProposal_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryProposal)(nil) +} +func (x fastReflection_QueryProposal_messageType) New() protoreflect.Message { + return new(fastReflection_QueryProposal) +} +func (x fastReflection_QueryProposal_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryProposal +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryProposal) Descriptor() protoreflect.MessageDescriptor { + return md_QueryProposal +} + +// 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_QueryProposal) Type() protoreflect.MessageType { + return _fastReflection_QueryProposal_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryProposal) New() protoreflect.Message { + return new(fastReflection_QueryProposal) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryProposal) Interface() protoreflect.ProtoMessage { + return (*QueryProposal)(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_QueryProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ProposalId != uint64(0) { + value := protoreflect.ValueOfUint64(x.ProposalId) + if !f(fd_QueryProposal_proposal_id, 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_QueryProposal) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryProposal.proposal_id": + return x.ProposalId != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryProposal 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_QueryProposal) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryProposal.proposal_id": + x.ProposalId = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryProposal 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_QueryProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryProposal.proposal_id": + value := x.ProposalId + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryProposal 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_QueryProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryProposal.proposal_id": + x.ProposalId = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryProposal 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_QueryProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryProposal.proposal_id": + panic(fmt.Errorf("field proposal_id of message cosmos.accounts.defaults.multisig.v1.QueryProposal is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryProposal 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_QueryProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryProposal.proposal_id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryProposal 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_QueryProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.QueryProposal", 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_QueryProposal) 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_QueryProposal) 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_QueryProposal) 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_QueryProposal) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryProposal) + 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.ProposalId != 0 { + n += 1 + runtime.Sov(uint64(x.ProposalId)) + } + 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().(*QueryProposal) + 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.ProposalId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) + i-- + dAtA[i] = 0x8 + } + 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().(*QueryProposal) + 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: QueryProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + x.ProposalId = 0 + 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++ + x.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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_QueryProposalResponse protoreflect.MessageDescriptor + fd_QueryProposalResponse_proposal protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_QueryProposalResponse = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("QueryProposalResponse") + fd_QueryProposalResponse_proposal = md_QueryProposalResponse.Fields().ByName("proposal") +} + +var _ protoreflect.Message = (*fastReflection_QueryProposalResponse)(nil) + +type fastReflection_QueryProposalResponse QueryProposalResponse + +func (x *QueryProposalResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryProposalResponse)(x) +} + +func (x *QueryProposalResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[13] + 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_QueryProposalResponse_messageType fastReflection_QueryProposalResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryProposalResponse_messageType{} + +type fastReflection_QueryProposalResponse_messageType struct{} + +func (x fastReflection_QueryProposalResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryProposalResponse)(nil) +} +func (x fastReflection_QueryProposalResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryProposalResponse) +} +func (x fastReflection_QueryProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryProposalResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryProposalResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryProposalResponse +} + +// 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_QueryProposalResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryProposalResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryProposalResponse) New() protoreflect.Message { + return new(fastReflection_QueryProposalResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryProposalResponse) Interface() protoreflect.ProtoMessage { + return (*QueryProposalResponse)(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_QueryProposalResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Proposal != nil { + value := protoreflect.ValueOfMessage(x.Proposal.ProtoReflect()) + if !f(fd_QueryProposalResponse_proposal, 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_QueryProposalResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryProposalResponse.proposal": + return x.Proposal != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryProposalResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryProposalResponse 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_QueryProposalResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryProposalResponse.proposal": + x.Proposal = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryProposalResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryProposalResponse 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_QueryProposalResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryProposalResponse.proposal": + value := x.Proposal + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryProposalResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryProposalResponse 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_QueryProposalResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryProposalResponse.proposal": + x.Proposal = value.Message().Interface().(*Proposal) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryProposalResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryProposalResponse 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_QueryProposalResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryProposalResponse.proposal": + if x.Proposal == nil { + x.Proposal = new(Proposal) + } + return protoreflect.ValueOfMessage(x.Proposal.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryProposalResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryProposalResponse 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_QueryProposalResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.QueryProposalResponse.proposal": + m := new(Proposal) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.QueryProposalResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.QueryProposalResponse 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_QueryProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.QueryProposalResponse", 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_QueryProposalResponse) 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_QueryProposalResponse) 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_QueryProposalResponse) 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_QueryProposalResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryProposalResponse) + 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.Proposal != nil { + l = options.Size(x.Proposal) + 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().(*QueryProposalResponse) + 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.Proposal != nil { + encoded, err := options.Marshal(x.Proposal) + 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] = 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().(*QueryProposalResponse) + 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: QueryProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProposalResponse: 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 Proposal", 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.Proposal == nil { + x.Proposal = &Proposal{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proposal); 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_MsgVote protoreflect.MessageDescriptor + fd_MsgVote_proposal_id protoreflect.FieldDescriptor + fd_MsgVote_vote protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_MsgVote = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("MsgVote") + fd_MsgVote_proposal_id = md_MsgVote.Fields().ByName("proposal_id") + fd_MsgVote_vote = md_MsgVote.Fields().ByName("vote") +} + +var _ protoreflect.Message = (*fastReflection_MsgVote)(nil) + +type fastReflection_MsgVote MsgVote + +func (x *MsgVote) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVote)(x) +} + +func (x *MsgVote) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[14] + 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_MsgVote_messageType fastReflection_MsgVote_messageType +var _ protoreflect.MessageType = fastReflection_MsgVote_messageType{} + +type fastReflection_MsgVote_messageType struct{} + +func (x fastReflection_MsgVote_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVote)(nil) +} +func (x fastReflection_MsgVote_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVote) +} +func (x fastReflection_MsgVote_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVote +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgVote) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVote +} + +// 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_MsgVote) Type() protoreflect.MessageType { + return _fastReflection_MsgVote_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgVote) New() protoreflect.Message { + return new(fastReflection_MsgVote) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgVote) Interface() protoreflect.ProtoMessage { + return (*MsgVote)(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_MsgVote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ProposalId != uint64(0) { + value := protoreflect.ValueOfUint64(x.ProposalId) + if !f(fd_MsgVote_proposal_id, value) { + return + } + } + if x.Vote != false { + value := protoreflect.ValueOfBool(x.Vote) + if !f(fd_MsgVote_vote, 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_MsgVote) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgVote.proposal_id": + return x.ProposalId != uint64(0) + case "cosmos.accounts.defaults.multisig.v1.MsgVote.vote": + return x.Vote != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgVote")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgVote 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_MsgVote) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgVote.proposal_id": + x.ProposalId = uint64(0) + case "cosmos.accounts.defaults.multisig.v1.MsgVote.vote": + x.Vote = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgVote")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgVote 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_MsgVote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgVote.proposal_id": + value := x.ProposalId + return protoreflect.ValueOfUint64(value) + case "cosmos.accounts.defaults.multisig.v1.MsgVote.vote": + value := x.Vote + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgVote")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgVote 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_MsgVote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgVote.proposal_id": + x.ProposalId = value.Uint() + case "cosmos.accounts.defaults.multisig.v1.MsgVote.vote": + x.Vote = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgVote")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgVote 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_MsgVote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgVote.proposal_id": + panic(fmt.Errorf("field proposal_id of message cosmos.accounts.defaults.multisig.v1.MsgVote is not mutable")) + case "cosmos.accounts.defaults.multisig.v1.MsgVote.vote": + panic(fmt.Errorf("field vote of message cosmos.accounts.defaults.multisig.v1.MsgVote is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgVote")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgVote 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_MsgVote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgVote.proposal_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.accounts.defaults.multisig.v1.MsgVote.vote": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgVote")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgVote 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_MsgVote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.MsgVote", 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_MsgVote) 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_MsgVote) 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_MsgVote) 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_MsgVote) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgVote) + 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.ProposalId != 0 { + n += 1 + runtime.Sov(uint64(x.ProposalId)) + } + if x.Vote { + n += 2 + } + 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().(*MsgVote) + 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.Vote { + i-- + if x.Vote { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if x.ProposalId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) + i-- + dAtA[i] = 0x8 + } + 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().(*MsgVote) + 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: MsgVote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + x.ProposalId = 0 + 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++ + x.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Vote = bool(v != 0) + 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_MsgVoteResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_MsgVoteResponse = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("MsgVoteResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgVoteResponse)(nil) + +type fastReflection_MsgVoteResponse MsgVoteResponse + +func (x *MsgVoteResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVoteResponse)(x) +} + +func (x *MsgVoteResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[15] + 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_MsgVoteResponse_messageType fastReflection_MsgVoteResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgVoteResponse_messageType{} + +type fastReflection_MsgVoteResponse_messageType struct{} + +func (x fastReflection_MsgVoteResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVoteResponse)(nil) +} +func (x fastReflection_MsgVoteResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVoteResponse) +} +func (x fastReflection_MsgVoteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgVoteResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteResponse +} + +// 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_MsgVoteResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgVoteResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgVoteResponse) New() protoreflect.Message { + return new(fastReflection_MsgVoteResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgVoteResponse) Interface() protoreflect.ProtoMessage { + return (*MsgVoteResponse)(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_MsgVoteResponse) 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_MsgVoteResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgVoteResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgVoteResponse 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_MsgVoteResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgVoteResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgVoteResponse 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_MsgVoteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgVoteResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgVoteResponse 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_MsgVoteResponse) 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.accounts.defaults.multisig.v1.MsgVoteResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgVoteResponse 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_MsgVoteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgVoteResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgVoteResponse 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_MsgVoteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgVoteResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgVoteResponse 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_MsgVoteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.MsgVoteResponse", 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_MsgVoteResponse) 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_MsgVoteResponse) 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_MsgVoteResponse) 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_MsgVoteResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgVoteResponse) + 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().(*MsgVoteResponse) + 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().(*MsgVoteResponse) + 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: MsgVoteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteResponse: 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_MsgExecuteProposal protoreflect.MessageDescriptor + fd_MsgExecuteProposal_proposal_id protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_MsgExecuteProposal = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("MsgExecuteProposal") + fd_MsgExecuteProposal_proposal_id = md_MsgExecuteProposal.Fields().ByName("proposal_id") +} + +var _ protoreflect.Message = (*fastReflection_MsgExecuteProposal)(nil) + +type fastReflection_MsgExecuteProposal MsgExecuteProposal + +func (x *MsgExecuteProposal) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgExecuteProposal)(x) +} + +func (x *MsgExecuteProposal) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[16] + 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_MsgExecuteProposal_messageType fastReflection_MsgExecuteProposal_messageType +var _ protoreflect.MessageType = fastReflection_MsgExecuteProposal_messageType{} + +type fastReflection_MsgExecuteProposal_messageType struct{} + +func (x fastReflection_MsgExecuteProposal_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgExecuteProposal)(nil) +} +func (x fastReflection_MsgExecuteProposal_messageType) New() protoreflect.Message { + return new(fastReflection_MsgExecuteProposal) +} +func (x fastReflection_MsgExecuteProposal_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecuteProposal +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgExecuteProposal) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecuteProposal +} + +// 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_MsgExecuteProposal) Type() protoreflect.MessageType { + return _fastReflection_MsgExecuteProposal_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgExecuteProposal) New() protoreflect.Message { + return new(fastReflection_MsgExecuteProposal) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgExecuteProposal) Interface() protoreflect.ProtoMessage { + return (*MsgExecuteProposal)(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_MsgExecuteProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ProposalId != uint64(0) { + value := protoreflect.ValueOfUint64(x.ProposalId) + if !f(fd_MsgExecuteProposal_proposal_id, 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_MsgExecuteProposal) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal.proposal_id": + return x.ProposalId != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal 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_MsgExecuteProposal) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal.proposal_id": + x.ProposalId = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal 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_MsgExecuteProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal.proposal_id": + value := x.ProposalId + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal 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_MsgExecuteProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal.proposal_id": + x.ProposalId = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal 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_MsgExecuteProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal.proposal_id": + panic(fmt.Errorf("field proposal_id of message cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal 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_MsgExecuteProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal.proposal_id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal 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_MsgExecuteProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal", 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_MsgExecuteProposal) 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_MsgExecuteProposal) 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_MsgExecuteProposal) 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_MsgExecuteProposal) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgExecuteProposal) + 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.ProposalId != 0 { + n += 1 + runtime.Sov(uint64(x.ProposalId)) + } + 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().(*MsgExecuteProposal) + 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.ProposalId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) + i-- + dAtA[i] = 0x8 + } + 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().(*MsgExecuteProposal) + 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: MsgExecuteProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecuteProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + x.ProposalId = 0 + 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++ + x.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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_MsgExecuteProposalResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() + md_MsgExecuteProposalResponse = File_cosmos_accounts_defaults_multisig_v1_multisig_proto.Messages().ByName("MsgExecuteProposalResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgExecuteProposalResponse)(nil) + +type fastReflection_MsgExecuteProposalResponse MsgExecuteProposalResponse + +func (x *MsgExecuteProposalResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgExecuteProposalResponse)(x) +} + +func (x *MsgExecuteProposalResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[17] + 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_MsgExecuteProposalResponse_messageType fastReflection_MsgExecuteProposalResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgExecuteProposalResponse_messageType{} + +type fastReflection_MsgExecuteProposalResponse_messageType struct{} + +func (x fastReflection_MsgExecuteProposalResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgExecuteProposalResponse)(nil) +} +func (x fastReflection_MsgExecuteProposalResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgExecuteProposalResponse) +} +func (x fastReflection_MsgExecuteProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecuteProposalResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgExecuteProposalResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecuteProposalResponse +} + +// 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_MsgExecuteProposalResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgExecuteProposalResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgExecuteProposalResponse) New() protoreflect.Message { + return new(fastReflection_MsgExecuteProposalResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgExecuteProposalResponse) Interface() protoreflect.ProtoMessage { + return (*MsgExecuteProposalResponse)(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_MsgExecuteProposalResponse) 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_MsgExecuteProposalResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgExecuteProposalResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgExecuteProposalResponse 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_MsgExecuteProposalResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgExecuteProposalResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgExecuteProposalResponse 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_MsgExecuteProposalResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgExecuteProposalResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgExecuteProposalResponse 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_MsgExecuteProposalResponse) 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.accounts.defaults.multisig.v1.MsgExecuteProposalResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgExecuteProposalResponse 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_MsgExecuteProposalResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgExecuteProposalResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgExecuteProposalResponse 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_MsgExecuteProposalResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.multisig.v1.MsgExecuteProposalResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.multisig.v1.MsgExecuteProposalResponse 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_MsgExecuteProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.multisig.v1.MsgExecuteProposalResponse", 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_MsgExecuteProposalResponse) 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_MsgExecuteProposalResponse) 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_MsgExecuteProposalResponse) 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_MsgExecuteProposalResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgExecuteProposalResponse) + 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().(*MsgExecuteProposalResponse) + 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().(*MsgExecuteProposalResponse) + 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: MsgExecuteProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecuteProposalResponse: 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/accounts/defaults/multisig/v1/multisig.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) +) + +type MsgCreateProposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` +} + +func (x *MsgCreateProposal) Reset() { + *x = MsgCreateProposal{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateProposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateProposal) ProtoMessage() {} + +// Deprecated: Use MsgCreateProposal.ProtoReflect.Descriptor instead. +func (*MsgCreateProposal) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgCreateProposal) GetProposalId() uint64 { + if x != nil { + return x.ProposalId + } + return 0 +} + +// MsgInit is used to initialize a multisig account. +type MsgInit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Members []*Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` + Config *Config `protobuf:"bytes,2,opt,name=Config,proto3" json:"Config,omitempty"` +} + +func (x *MsgInit) Reset() { + *x = MsgInit{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInit) ProtoMessage() {} + +// Deprecated: Use MsgInit.ProtoReflect.Descriptor instead. +func (*MsgInit) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{1} +} + +func (x *MsgInit) GetMembers() []*Member { + if x != nil { + return x.Members + } + return nil +} + +func (x *MsgInit) GetConfig() *Config { + if x != nil { + return x.Config + } + return nil +} + +// MsgInitResponse is the response returned after account initialization. +type MsgInitResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgInitResponse) Reset() { + *x = MsgInitResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitResponse) ProtoMessage() {} + +// Deprecated: Use MsgInitResponse.ProtoReflect.Descriptor instead. +func (*MsgInitResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{2} +} + +// MsgUpdateConfigRequest is used to change the config or members. +type MsgUpdateConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // only the members that are changing are required, if their weight is 0, they are removed. + UpdateMembers []*Member `protobuf:"bytes,1,rep,name=update_members,json=updateMembers,proto3" json:"update_members,omitempty"` + // not all fields from Config can be changed + Config *Config `protobuf:"bytes,2,opt,name=Config,proto3" json:"Config,omitempty"` +} + +func (x *MsgUpdateConfigRequest) Reset() { + *x = MsgUpdateConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateConfigRequest) ProtoMessage() {} + +// Deprecated: Use MsgUpdateConfigRequest.ProtoReflect.Descriptor instead. +func (*MsgUpdateConfigRequest) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{3} +} + +func (x *MsgUpdateConfigRequest) GetUpdateMembers() []*Member { + if x != nil { + return x.UpdateMembers + } + return nil +} + +func (x *MsgUpdateConfigRequest) GetConfig() *Config { + if x != nil { + return x.Config + } + return nil +} + +type MsgUpdateConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateConfigResponse) Reset() { + *x = MsgUpdateConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateConfigResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateConfigResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateConfigResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{4} +} + +type Member struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Weight uint64 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` +} + +func (x *Member) Reset() { + *x = Member{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Member) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Member) ProtoMessage() {} + +// Deprecated: Use Member.ProtoReflect.Descriptor instead. +func (*Member) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{5} +} + +func (x *Member) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *Member) GetWeight() uint64 { + if x != nil { + return x.Weight + } + return 0 +} + +type Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Threshold int64 `protobuf:"varint,1,opt,name=threshold,proto3" json:"threshold,omitempty"` + Quorum int64 `protobuf:"varint,2,opt,name=quorum,proto3" json:"quorum,omitempty"` + // voting_period is the duration in seconds for the voting period. + VotingPeriod int64 `protobuf:"varint,3,opt,name=voting_period,json=votingPeriod,proto3" json:"voting_period,omitempty"` + // revote defines if members can change their vote. + Revote bool `protobuf:"varint,4,opt,name=revote,proto3" json:"revote,omitempty"` + // early_execution defines if the multisig can be executed before the voting period ends. + EarlyExecution bool `protobuf:"varint,5,opt,name=early_execution,json=earlyExecution,proto3" json:"early_execution,omitempty"` +} + +func (x *Config) Reset() { + *x = Config{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config) ProtoMessage() {} + +// Deprecated: Use Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{6} +} + +func (x *Config) GetThreshold() int64 { + if x != nil { + return x.Threshold + } + return 0 +} + +func (x *Config) GetQuorum() int64 { + if x != nil { + return x.Quorum + } + return 0 +} + +func (x *Config) GetVotingPeriod() int64 { + if x != nil { + return x.VotingPeriod + } + return 0 +} + +func (x *Config) GetRevote() bool { + if x != nil { + return x.Revote + } + return false +} + +func (x *Config) GetEarlyExecution() bool { + if x != nil { + return x.EarlyExecution + } + return false +} + +type Proposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` + Messages []*anypb.Any `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` + // if true, the proposal will execute as soon as the quorum is reached. + Execute bool `protobuf:"varint,4,opt,name=execute,proto3" json:"execute,omitempty"` +} + +func (x *Proposal) Reset() { + *x = Proposal{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Proposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Proposal) ProtoMessage() {} + +// Deprecated: Use Proposal.ProtoReflect.Descriptor instead. +func (*Proposal) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{7} +} + +func (x *Proposal) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *Proposal) GetSummary() string { + if x != nil { + return x.Summary + } + return "" +} + +func (x *Proposal) GetMessages() []*anypb.Any { + if x != nil { + return x.Messages + } + return nil +} + +func (x *Proposal) GetExecute() bool { + if x != nil { + return x.Execute + } + return false +} + +// QuerySequence is the request for the account sequence. +type QuerySequence struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QuerySequence) Reset() { + *x = QuerySequence{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySequence) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySequence) ProtoMessage() {} + +// Deprecated: Use QuerySequence.ProtoReflect.Descriptor instead. +func (*QuerySequence) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{8} +} + +// QuerySequenceResponse returns the sequence of the account. +type QuerySequenceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // sequence is the current sequence of the account. + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (x *QuerySequenceResponse) Reset() { + *x = QuerySequenceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySequenceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySequenceResponse) ProtoMessage() {} + +// Deprecated: Use QuerySequenceResponse.ProtoReflect.Descriptor instead. +func (*QuerySequenceResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{9} +} + +func (x *QuerySequenceResponse) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +type QueryConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryConfig) Reset() { + *x = QueryConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryConfig) ProtoMessage() {} + +// Deprecated: Use QueryConfig.ProtoReflect.Descriptor instead. +func (*QueryConfig) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{10} +} + +// QuerySequenceResponse returns the sequence of the account. +type QueryConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Members []*Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` + Config *Config `protobuf:"bytes,2,opt,name=Config,proto3" json:"Config,omitempty"` +} + +func (x *QueryConfigResponse) Reset() { + *x = QueryConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryConfigResponse) ProtoMessage() {} + +// Deprecated: Use QueryConfigResponse.ProtoReflect.Descriptor instead. +func (*QueryConfigResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{11} +} + +func (x *QueryConfigResponse) GetMembers() []*Member { + if x != nil { + return x.Members + } + return nil +} + +func (x *QueryConfigResponse) GetConfig() *Config { + if x != nil { + return x.Config + } + return nil +} + +type QueryProposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` +} + +func (x *QueryProposal) Reset() { + *x = QueryProposal{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryProposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryProposal) ProtoMessage() {} + +// Deprecated: Use QueryProposal.ProtoReflect.Descriptor instead. +func (*QueryProposal) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{12} +} + +func (x *QueryProposal) GetProposalId() uint64 { + if x != nil { + return x.ProposalId + } + return 0 +} + +type QueryProposalResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` +} + +func (x *QueryProposalResponse) Reset() { + *x = QueryProposalResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryProposalResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryProposalResponse) ProtoMessage() {} + +// Deprecated: Use QueryProposalResponse.ProtoReflect.Descriptor instead. +func (*QueryProposalResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{13} +} + +func (x *QueryProposalResponse) GetProposal() *Proposal { + if x != nil { + return x.Proposal + } + return nil +} + +type MsgVote struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + Vote bool `protobuf:"varint,2,opt,name=vote,proto3" json:"vote,omitempty"` +} + +func (x *MsgVote) Reset() { + *x = MsgVote{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgVote) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgVote) ProtoMessage() {} + +// Deprecated: Use MsgVote.ProtoReflect.Descriptor instead. +func (*MsgVote) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{14} +} + +func (x *MsgVote) GetProposalId() uint64 { + if x != nil { + return x.ProposalId + } + return 0 +} + +func (x *MsgVote) GetVote() bool { + if x != nil { + return x.Vote + } + return false +} + +type MsgVoteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgVoteResponse) Reset() { + *x = MsgVoteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgVoteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgVoteResponse) ProtoMessage() {} + +// Deprecated: Use MsgVoteResponse.ProtoReflect.Descriptor instead. +func (*MsgVoteResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{15} +} + +type MsgExecuteProposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` +} + +func (x *MsgExecuteProposal) Reset() { + *x = MsgExecuteProposal{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgExecuteProposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgExecuteProposal) ProtoMessage() {} + +// Deprecated: Use MsgExecuteProposal.ProtoReflect.Descriptor instead. +func (*MsgExecuteProposal) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{16} +} + +func (x *MsgExecuteProposal) GetProposalId() uint64 { + if x != nil { + return x.ProposalId + } + return 0 +} + +type MsgExecuteProposalResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgExecuteProposalResponse) Reset() { + *x = MsgExecuteProposalResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgExecuteProposalResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgExecuteProposalResponse) ProtoMessage() {} + +// Deprecated: Use MsgExecuteProposalResponse.ProtoReflect.Descriptor instead. +func (*MsgExecuteProposalResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP(), []int{17} +} + +var File_cosmos_accounts_defaults_multisig_v1_multisig_proto protoreflect.FileDescriptor + +var file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, + 0x73, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, + 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, + 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, 0x22, 0x34, 0x0a, 0x11, 0x4d, 0x73, + 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, + 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, + 0x22, 0x97, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x46, 0x0a, 0x07, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, + 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x12, 0x44, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, + 0x67, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb3, 0x01, + 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x0d, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x44, 0x0a, + 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, + 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x54, + 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 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, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x77, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x22, 0xa4, 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x71, + 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, + 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x76, 0x6f, + 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, + 0x76, 0x6f, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x76, 0x6f, + 0x74, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x5f, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x61, 0x72, + 0x6c, 0x79, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x86, 0x01, 0x0a, 0x08, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x71, + 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x33, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xa3, 0x01, 0x0a, 0x13, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x46, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x44, 0x0a, 0x06, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, + 0x30, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, + 0x64, 0x22, 0x63, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x08, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x08, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0x3e, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x0a, 0x12, 0x4d, 0x73, 0x67, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, + 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, + 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xb0, + 0x02, 0x0a, 0x28, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, + 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x76, 0x31, 0xa2, 0x02, + 0x04, 0x43, 0x41, 0x44, 0x4d, 0xaa, 0x02, 0x24, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, + 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x30, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x28, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, + 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x44, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x73, 0x3a, 0x3a, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescOnce sync.Once + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescData = file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDesc +) + +func file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescGZIP() []byte { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescOnce.Do(func() { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescData) + }) + return file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDescData +} + +var file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_cosmos_accounts_defaults_multisig_v1_multisig_proto_goTypes = []interface{}{ + (*MsgCreateProposal)(nil), // 0: cosmos.accounts.defaults.multisig.v1.MsgCreateProposal + (*MsgInit)(nil), // 1: cosmos.accounts.defaults.multisig.v1.MsgInit + (*MsgInitResponse)(nil), // 2: cosmos.accounts.defaults.multisig.v1.MsgInitResponse + (*MsgUpdateConfigRequest)(nil), // 3: cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest + (*MsgUpdateConfigResponse)(nil), // 4: cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigResponse + (*Member)(nil), // 5: cosmos.accounts.defaults.multisig.v1.Member + (*Config)(nil), // 6: cosmos.accounts.defaults.multisig.v1.Config + (*Proposal)(nil), // 7: cosmos.accounts.defaults.multisig.v1.Proposal + (*QuerySequence)(nil), // 8: cosmos.accounts.defaults.multisig.v1.QuerySequence + (*QuerySequenceResponse)(nil), // 9: cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse + (*QueryConfig)(nil), // 10: cosmos.accounts.defaults.multisig.v1.QueryConfig + (*QueryConfigResponse)(nil), // 11: cosmos.accounts.defaults.multisig.v1.QueryConfigResponse + (*QueryProposal)(nil), // 12: cosmos.accounts.defaults.multisig.v1.QueryProposal + (*QueryProposalResponse)(nil), // 13: cosmos.accounts.defaults.multisig.v1.QueryProposalResponse + (*MsgVote)(nil), // 14: cosmos.accounts.defaults.multisig.v1.MsgVote + (*MsgVoteResponse)(nil), // 15: cosmos.accounts.defaults.multisig.v1.MsgVoteResponse + (*MsgExecuteProposal)(nil), // 16: cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal + (*MsgExecuteProposalResponse)(nil), // 17: cosmos.accounts.defaults.multisig.v1.MsgExecuteProposalResponse + (*anypb.Any)(nil), // 18: google.protobuf.Any +} +var file_cosmos_accounts_defaults_multisig_v1_multisig_proto_depIdxs = []int32{ + 5, // 0: cosmos.accounts.defaults.multisig.v1.MsgInit.members:type_name -> cosmos.accounts.defaults.multisig.v1.Member + 6, // 1: cosmos.accounts.defaults.multisig.v1.MsgInit.Config:type_name -> cosmos.accounts.defaults.multisig.v1.Config + 5, // 2: cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest.update_members:type_name -> cosmos.accounts.defaults.multisig.v1.Member + 6, // 3: cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigRequest.Config:type_name -> cosmos.accounts.defaults.multisig.v1.Config + 18, // 4: cosmos.accounts.defaults.multisig.v1.Proposal.messages:type_name -> google.protobuf.Any + 5, // 5: cosmos.accounts.defaults.multisig.v1.QueryConfigResponse.members:type_name -> cosmos.accounts.defaults.multisig.v1.Member + 6, // 6: cosmos.accounts.defaults.multisig.v1.QueryConfigResponse.Config:type_name -> cosmos.accounts.defaults.multisig.v1.Config + 7, // 7: cosmos.accounts.defaults.multisig.v1.QueryProposalResponse.proposal:type_name -> cosmos.accounts.defaults.multisig.v1.Proposal + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() } +func file_cosmos_accounts_defaults_multisig_v1_multisig_proto_init() { + if File_cosmos_accounts_defaults_multisig_v1_multisig_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateProposal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Member); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Proposal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySequence); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySequenceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryProposal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryProposalResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgVote); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgVoteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgExecuteProposal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgExecuteProposalResponse); 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_accounts_defaults_multisig_v1_multisig_proto_rawDesc, + NumEnums: 0, + NumMessages: 18, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_accounts_defaults_multisig_v1_multisig_proto_goTypes, + DependencyIndexes: file_cosmos_accounts_defaults_multisig_v1_multisig_proto_depIdxs, + MessageInfos: file_cosmos_accounts_defaults_multisig_v1_multisig_proto_msgTypes, + }.Build() + File_cosmos_accounts_defaults_multisig_v1_multisig_proto = out.File + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_rawDesc = nil + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_goTypes = nil + file_cosmos_accounts_defaults_multisig_v1_multisig_proto_depIdxs = nil +} diff --git a/x/accounts/CHANGELOG.md b/x/accounts/CHANGELOG.md index 7ce64dffb257..451bdece2863 100644 --- a/x/accounts/CHANGELOG.md +++ b/x/accounts/CHANGELOG.md @@ -23,4 +23,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ # Changelog -## [Unreleased] \ No newline at end of file +## [Unreleased] + +### Features + +* [#19988](https://github.com/cosmos/cosmos-sdk/pull/19988) Implemented `x/accounts/multisig`. \ No newline at end of file diff --git a/x/accounts/accountstd/test_util.go b/x/accounts/accountstd/test_util.go index b9980afa53e2..c5a9ba70a990 100644 --- a/x/accounts/accountstd/test_util.go +++ b/x/accounts/accountstd/test_util.go @@ -25,3 +25,7 @@ func NewMockContext( ctx, ss, accNumber, accountAddr, sender, funds, moduleExec, moduleExecUntyped, moduleQuery, ), ss } + +func SetSender(ctx context.Context, sender []byte) context.Context { + return implementation.SetSender(ctx, sender) +} diff --git a/x/accounts/defaults/base/account.go b/x/accounts/defaults/base/account.go index 7b29b2f10faf..731658db403d 100644 --- a/x/accounts/defaults/base/account.go +++ b/x/accounts/defaults/base/account.go @@ -38,6 +38,7 @@ func NewAccount(name string, handlerMap *signing.HandlerMap) accountstd.AccountC Sequence: collections.NewSequence(deps.SchemaBuilder, SequencePrefix, "sequence"), addrCodec: deps.AddressCodec, signingHandlers: handlerMap, + hs: deps.Environment.HeaderService, }, nil } } diff --git a/x/accounts/defaults/multisig/README.md b/x/accounts/defaults/multisig/README.md new file mode 100644 index 000000000000..0e0bd68b7c45 --- /dev/null +++ b/x/accounts/defaults/multisig/README.md @@ -0,0 +1,153 @@ +# Multisig Accounts + + +* [State](#state) + * [Config](#config) + * [Proposal](#proposal) + * [Members](#members) +* [Methods](#methods) + * [MsgInit](#msginit) + * [MsgUpdateConfig](#msgupdateconfig) + * [MsgCreateProposal](#msgcreateproposal) + * [MsgVote](#msgvote) + * [MsgExecuteProposal](#msgexecuteproposal) + +The x/accounts/defaults/multisig module provides the implementation for multisig accounts within the x/accounts module. + +## State + +The multisig account keeps its members as a map of addresses and weights (`<[]byte, uint64>`), a config struct, a map of proposals and a map of votes. + +```go +type Account struct { + Members collections.Map[[]byte, uint64] + Sequence collections.Sequence + Config collections.Item[v1.Config] + + addrCodec address.Codec + headerService header.Service + eventService event.Service + + Proposals collections.Map[uint64, v1.Proposal] + Votes collections.Map[collections.Pair[uint64, []byte], int32] // key: proposalID + voter address +} +``` + +### Config + +The config contains the basic rules defining how the multisig will work. All of these fields can be modified afterwards by calling [MsgUpdateConfig](#msgupdateconfig). + +```protobuf +message Config { + int64 threshold = 1; + + int64 quorum = 2; + + // voting_period is the duration in seconds for the voting period. + int64 voting_period = 3; + + // revote defines if members can change their vote. + bool revote = 4; + + // early_execution defines if the multisig can be executed before the voting period ends. + bool early_execution = 5; +} +``` + +### Proposal + +The proposal contains the title, summary, messages and the status of the proposal. The messages are stored as `google.protobuf.Any` to allow for any type of message to be stored. + +```protobuf +message Proposal { + string title = 1; + string summary = 2; + repeated google.protobuf.Any messages = 3; + + // if true, the proposal will execute as soon as the quorum is reached (last voter will execute). + bool execute = 4; + + // voting_period_end will be set by the account when the proposal is created. + int64 voting_period_end = 5; + + ProposalStatus status = 6; +} +``` + +### Members + +Members are stored as a map of addresses and weights. The weight is used to determine the voting power of the member. + + +## Methods + +### MsgInit + +The `MsgInit` message initializes a multisig account with the given members and config. + +```protobuf +message MsgInit { + repeated Member members = 1; + Config Config = 2; +} +``` + +### MsgUpdateConfig + +The `MsgUpdateConfig` message updates the config of the multisig account. Only the members that are changing are required, and if their weight is 0, they are removed. If the config is nil, then it will not be updated. + +```protobuf +message MsgUpdateConfig { + // only the members that are changing are required, if their weight is 0, they are removed. + repeated Member update_members = 1; + + // not all fields from Config can be changed + Config Config = 2; +} +``` + +### MsgCreateProposal + +Only a member can create a proposal. The proposal will be stored in the account and the members will be able to vote on it. + +If a voting period is not set, the proposal will be created using the voting period from the config. If the proposal has a voting period, it will be used instead. + +```protobuf +message MsgCreateProposal { + Proposal proposal = 1; +} +``` + +### MsgVote + +The `MsgVote` message allows a member to vote on a proposal. The vote can be either `Yes`, `No` or `Abstain`. + +```protobuf +message MsgVote { + uint64 proposal_id = 1; + VoteOption vote = 2; +} + +// VoteOption enumerates the valid vote options for a given proposal. +enum VoteOption { + // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + VOTE_OPTION_UNSPECIFIED = 0; + // VOTE_OPTION_YES defines the yes proposal vote option. + VOTE_OPTION_YES = 1; + // VOTE_OPTION_ABSTAIN defines the abstain proposal vote option. + VOTE_OPTION_ABSTAIN = 2; + // VOTE_OPTION_NO defines the no proposal vote option. + VOTE_OPTION_NO = 3; +} +``` + + +### MsgExecuteProposal + +The `MsgExecuteProposal` message allows a member to execute a proposal. The proposal must have reached the quorum and the voting period must have ended. + +```protobuf +message MsgExecuteProposal { + uint64 proposal_id = 1; +} +``` \ No newline at end of file diff --git a/x/accounts/defaults/multisig/account.go b/x/accounts/defaults/multisig/account.go new file mode 100644 index 000000000000..8b93d1441295 --- /dev/null +++ b/x/accounts/defaults/multisig/account.go @@ -0,0 +1,389 @@ +package multisig + +import ( + "context" + "errors" + "fmt" + "time" + + "cosmossdk.io/collections" + "cosmossdk.io/core/address" + "cosmossdk.io/core/event" + "cosmossdk.io/core/header" + "cosmossdk.io/x/accounts/accountstd" + v1 "cosmossdk.io/x/accounts/defaults/multisig/v1" + + "github.com/cosmos/cosmos-sdk/codec" +) + +var ( + MembersPrefix = collections.NewPrefix(0) + SequencePrefix = collections.NewPrefix(1) + ConfigPrefix = collections.NewPrefix(2) + ProposalsPrefix = collections.NewPrefix(3) + VotesPrefix = collections.NewPrefix(4) +) + +// Compile-time type assertions +var ( + _ accountstd.Interface = (*Account)(nil) +) + +type Account struct { + Members collections.Map[[]byte, uint64] + Sequence collections.Sequence + Config collections.Item[v1.Config] + + addrCodec address.Codec + headerService header.Service + eventService event.Service + + Proposals collections.Map[uint64, v1.Proposal] + Votes collections.Map[collections.Pair[uint64, []byte], int32] // key: proposalID + voter address +} + +// NewAccount returns a new multisig account creator function. +func NewAccount(name string) accountstd.AccountCreatorFunc { + return func(deps accountstd.Dependencies) (string, accountstd.Interface, error) { + return name, &Account{ + Members: collections.NewMap(deps.SchemaBuilder, MembersPrefix, "members", collections.BytesKey, collections.Uint64Value), + Sequence: collections.NewSequence(deps.SchemaBuilder, SequencePrefix, "sequence"), + Config: collections.NewItem(deps.SchemaBuilder, ConfigPrefix, "config", codec.CollValue[v1.Config](deps.LegacyStateCodec)), + Proposals: collections.NewMap(deps.SchemaBuilder, ProposalsPrefix, "proposals", collections.Uint64Key, codec.CollValue[v1.Proposal](deps.LegacyStateCodec)), + Votes: collections.NewMap(deps.SchemaBuilder, VotesPrefix, "votes", collections.PairKeyCodec(collections.Uint64Key, collections.BytesKey), collections.Int32Value), + addrCodec: deps.AddressCodec, + headerService: deps.Environment.HeaderService, + eventService: deps.Environment.EventService, + }, nil + } +} + +// Init initializes the multisig account with the given configuration and members. +func (a *Account) Init(ctx context.Context, msg *v1.MsgInit) (*v1.MsgInitResponse, error) { + if msg.Config == nil { + return nil, errors.New("config must be specified") + } + + if len(msg.Members) == 0 { + return nil, errors.New("members must be specified") + } + + // set members + totalWeight := uint64(0) + membersMap := map[string]struct{}{} // to check for duplicates + for i := range msg.Members { + if _, ok := membersMap[msg.Members[i].Address]; ok { + return nil, errors.New("duplicate member address found") + } + + membersMap[msg.Members[i].Address] = struct{}{} + + addrBz, err := a.addrCodec.StringToBytes(msg.Members[i].Address) + if err != nil { + return nil, err + } + + if msg.Members[i].Weight == 0 { + return nil, errors.New("member weight must be greater than zero") + } + + if err := a.Members.Set(ctx, addrBz, msg.Members[i].Weight); err != nil { + return nil, err + } + + totalWeight += msg.Members[i].Weight + } + + if err := validateConfig(*msg.Config, totalWeight); err != nil { + return nil, err + } + + if err := a.Config.Set(ctx, *msg.Config); err != nil { + return nil, err + } + + return &v1.MsgInitResponse{}, nil +} + +// Vote casts a vote on a proposal. The sender must be a member of the multisig and the proposal must be in the voting period. +func (a Account) Vote(ctx context.Context, msg *v1.MsgVote) (*v1.MsgVoteResponse, error) { + if msg.Vote <= v1.VoteOption_VOTE_OPTION_UNSPECIFIED { + return nil, errors.New("vote must be specified") + } + + cfg, err := a.Config.Get(ctx) + if err != nil { + return nil, err + } + + sender := accountstd.Sender(ctx) + + // check if the voter is a member + _, err = a.Members.Get(ctx, sender) + if err != nil { + return nil, err + } + + // check if the proposal exists + prop, err := a.Proposals.Get(ctx, msg.ProposalId) + if err != nil { + return nil, err + } + + // check if the voting period has ended + if a.headerService.HeaderInfo(ctx).Time.Unix() > prop.VotingPeriodEnd || prop.Status != v1.ProposalStatus_PROPOSAL_STATUS_VOTING_PERIOD { + return nil, errors.New("voting period has ended") + } + + // check if the voter has already voted + _, err = a.Votes.Get(ctx, collections.Join(msg.ProposalId, sender)) + if err == nil && !cfg.Revote { + return nil, errors.New("voter has already voted, can't change its vote per config") + } + if err != nil && !errors.Is(err, collections.ErrNotFound) { + return nil, err + } + + addr, err := a.addrCodec.BytesToString(sender) + if err != nil { + return nil, err + } + + if err = a.eventService.EventManager(ctx).EmitKV("vote", + event.NewAttribute("proposal_id", fmt.Sprint(msg.ProposalId)), + event.NewAttribute("voter", addr), + event.NewAttribute("vote", msg.Vote.String()), + ); err != nil { + return nil, err + } + + return &v1.MsgVoteResponse{}, a.Votes.Set(ctx, collections.Join(msg.ProposalId, sender), int32(msg.Vote)) +} + +// CreateProposal creates a new proposal. If the proposal contains a voting +// period it will be used, otherwise the default voting period will be used. +func (a Account) CreateProposal(ctx context.Context, msg *v1.MsgCreateProposal) (*v1.MsgCreateProposalResponse, error) { + // check if the sender is a member + _, err := a.Members.Get(ctx, accountstd.Sender(ctx)) + if err != nil { + return nil, err + } + + seq, err := a.Sequence.Next(ctx) + if err != nil { + return nil, err + } + + // check if the proposal already exists + _, err = a.Proposals.Get(ctx, seq) + if err == nil { + return nil, errors.New("proposal already exists") + } + + config, err := a.Config.Get(ctx) + if err != nil { + return nil, err + } + + // create the proposal + proposal := v1.Proposal{ + Title: msg.Proposal.Title, + Summary: msg.Proposal.Summary, + Messages: msg.Proposal.Messages, + Status: v1.ProposalStatus_PROPOSAL_STATUS_VOTING_PERIOD, + } + + // set the voting period, if not specified, use the default + if msg.Proposal.VotingPeriodEnd != 0 { + proposal.VotingPeriodEnd = msg.Proposal.VotingPeriodEnd + } else { + proposal.VotingPeriodEnd = a.headerService.HeaderInfo(ctx).Time.Add(time.Second * time.Duration(config.VotingPeriod)).Unix() + } + + if err = a.Proposals.Set(ctx, seq, proposal); err != nil { + return nil, err + } + + addr, err := a.addrCodec.BytesToString(accountstd.Sender(ctx)) + if err != nil { + return nil, err + } + + if err = a.eventService.EventManager(ctx).EmitKV("proposal_created", + event.NewAttribute("proposal_id", fmt.Sprint(seq)), + event.NewAttribute("proposer", addr), + ); err != nil { + return nil, err + } + + return &v1.MsgCreateProposalResponse{ProposalId: seq}, nil +} + +// deleteProposalAndVotes deletes a proposal and its votes, pruning the state. +func (a Account) deleteProposalAndVotes(ctx context.Context, proposalID uint64) error { + // delete the proposal + if err := a.Proposals.Remove(ctx, proposalID); err != nil { + return err + } + + // delete the votes + rng := collections.NewPrefixedPairRange[uint64, []byte](proposalID) + return a.Votes.Clear(ctx, rng) +} + +// ExecuteProposal tallies the votes for a proposal and executes it if it passes. If early execution is enabled, it will +// ignore the voting period and tally the votes without deleting them if the proposal has not passed. +func (a Account) ExecuteProposal(ctx context.Context, msg *v1.MsgExecuteProposal) (*v1.MsgExecuteProposalResponse, error) { + prop, err := a.Proposals.Get(ctx, msg.ProposalId) + if err != nil { + return nil, err + } + + config, err := a.Config.Get(ctx) + if err != nil { + return nil, err + } + + // check if voting period is still active and early execution is disabled + votingPeriodEnded := a.headerService.HeaderInfo(ctx).Time.Unix() > prop.VotingPeriodEnd + if !votingPeriodEnded && !config.EarlyExecution { + return nil, errors.New("voting period has not ended yet, and early execution is not enabled") + } + + // perform tally + rng := collections.NewPrefixedPairRange[uint64, []byte](msg.ProposalId) + yesVotes := uint64(0) + noVotes := uint64(0) + abstainVotes := uint64(0) + err = a.Votes.Walk(ctx, rng, func(key collections.Pair[uint64, []byte], vote int32) (stop bool, err error) { + weight, err := a.Members.Get(ctx, key.K2()) + if errors.Is(err, collections.ErrNotFound) { + // edge case: if a member has been removed after voting, we should ignore their vote + return false, nil + } else if err != nil { + return true, err + } + + switch v1.VoteOption(vote) { + case v1.VoteOption_VOTE_OPTION_YES: + yesVotes += weight + case v1.VoteOption_VOTE_OPTION_NO: + noVotes += weight + case v1.VoteOption_VOTE_OPTION_ABSTAIN: + abstainVotes += weight + } + return false, nil + }) + if err != nil { + return nil, err + } + + totalWeight := yesVotes + noVotes + abstainVotes + var ( + rejectErr error + execErr error + ) + + resp := &v1.MsgExecuteProposalResponse{} + + if totalWeight < uint64(config.Quorum) { + rejectErr = errors.New("quorum not reached") + prop.Status = v1.ProposalStatus_PROPOSAL_STATUS_REJECTED + } else if yesVotes < uint64(config.Threshold) { + rejectErr = errors.New("threshold not reached") + prop.Status = v1.ProposalStatus_PROPOSAL_STATUS_REJECTED + } else { + // we have quorum and threshold, execute the proposal + prop.Status = v1.ProposalStatus_PROPOSAL_STATUS_PASSED + resp.Responses, execErr = accountstd.ExecModuleAnys(ctx, prop.Messages) // do not return this error, just emit the event + } + + // if early execution is enabled, we return early if the proposal has NOT passed + if config.EarlyExecution && prop.Status != v1.ProposalStatus_PROPOSAL_STATUS_PASSED { + return nil, errors.New("early execution attempted and proposal has not passed") + } + + if err = a.deleteProposalAndVotes(ctx, msg.ProposalId); err != nil { + return nil, err + } + + if err = a.eventService.EventManager(ctx).EmitKV("proposal_tally", + event.NewAttribute("proposal_id", fmt.Sprint(msg.ProposalId)), + event.NewAttribute("yes_votes", fmt.Sprint(yesVotes)), + event.NewAttribute("no_votes", fmt.Sprint(noVotes)), + event.NewAttribute("abstain_votes", fmt.Sprint(abstainVotes)), + event.NewAttribute("status", prop.Status.String()), + event.NewAttribute("reject_err", fmt.Sprint(rejectErr)), + event.NewAttribute("exec_err", fmt.Sprint(execErr)), + ); err != nil { + return nil, err + } + + err = a.Proposals.Set(ctx, msg.ProposalId, prop) + if err != nil { + return nil, err + } + + return resp, nil +} + +// QuerySequence returns the current sequence number, used for proposal IDs. +func (a Account) QuerySequence(ctx context.Context, _ *v1.QuerySequence) (*v1.QuerySequenceResponse, error) { + seq, err := a.Sequence.Peek(ctx) + if err != nil { + return nil, err + } + return &v1.QuerySequenceResponse{Sequence: seq}, nil +} + +// QueryProposal returns a proposal for a given ID, if the proposal hasn't been pruned yet. +func (a Account) QueryProposal(ctx context.Context, q *v1.QueryProposal) (*v1.QueryProposalResponse, error) { + proposal, err := a.Proposals.Get(ctx, q.ProposalId) + if err != nil { + return nil, err + } + return &v1.QueryProposalResponse{Proposal: &proposal}, nil +} + +// QueryConfig returns the current multisig configuration. +func (a Account) QueryConfig(ctx context.Context, _ *v1.QueryConfig) (*v1.QueryConfigResponse, error) { + cfg, err := a.Config.Get(ctx) + if err != nil { + return nil, err + } + + members := []*v1.Member{} + err = a.Members.Walk(ctx, nil, func(addr []byte, weight uint64) (stop bool, err error) { + addrStr, err := a.addrCodec.BytesToString(addr) + if err != nil { + return true, err + } + members = append(members, &v1.Member{Address: addrStr, Weight: weight}) + return false, nil + }) + if err != nil { + return nil, err + } + + return &v1.QueryConfigResponse{Config: &cfg, Members: members}, nil +} + +// RegisterExecuteHandlers implements implementation.Account. +func (a *Account) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder) { + accountstd.RegisterExecuteHandler(builder, a.Vote) + accountstd.RegisterExecuteHandler(builder, a.CreateProposal) + accountstd.RegisterExecuteHandler(builder, a.ExecuteProposal) + accountstd.RegisterExecuteHandler(builder, a.UpdateConfig) +} + +// RegisterInitHandler implements implementation.Account. +func (a *Account) RegisterInitHandler(builder *accountstd.InitBuilder) { + accountstd.RegisterInitHandler(builder, a.Init) +} + +// RegisterQueryHandlers implements implementation.Account. +func (a *Account) RegisterQueryHandlers(builder *accountstd.QueryBuilder) { + accountstd.RegisterQueryHandler(builder, a.QuerySequence) + accountstd.RegisterQueryHandler(builder, a.QueryProposal) + accountstd.RegisterQueryHandler(builder, a.QueryConfig) +} diff --git a/x/accounts/defaults/multisig/account_test.go b/x/accounts/defaults/multisig/account_test.go new file mode 100644 index 000000000000..9da906ffbe81 --- /dev/null +++ b/x/accounts/defaults/multisig/account_test.go @@ -0,0 +1,580 @@ +package multisig + +import ( + "context" + "testing" + "time" + + types "github.com/cosmos/gogoproto/types/any" + "github.com/stretchr/testify/require" + + "cosmossdk.io/core/store" + "cosmossdk.io/x/accounts/accountstd" + v1 "cosmossdk.io/x/accounts/defaults/multisig/v1" +) + +func setup(t *testing.T, ctx context.Context, ss store.KVStoreService, timefn func() time.Time) *Account { + t.Helper() + deps := makeMockDependencies(ss, timefn) + + multisig := NewAccount("multisig") + _, acc, err := multisig(deps) + require.NoError(t, err) + + return acc.(*Account) +} + +func TestInit(t *testing.T) { + ctx, ss := newMockContext(t) + acc := setup(t, ctx, ss, nil) + + testcases := []struct { + name string + msg *v1.MsgInit + expErr string + }{ + { + "success", + &v1.MsgInit{ + Config: &v1.Config{ + Threshold: 666, + Quorum: 400, + VotingPeriod: 60, + }, + Members: []*v1.Member{ + { + Address: "addr1", + Weight: 500, + }, + { + Address: "addr2", + Weight: 1000, + }, + }, + }, + "", + }, + { + "no members", + &v1.MsgInit{ + Config: &v1.Config{ + Threshold: 666, + Quorum: 400, + VotingPeriod: 60, + }, + Members: []*v1.Member{}, + }, + "members must be specified", + }, + { + "no config", + &v1.MsgInit{ + Config: nil, + Members: []*v1.Member{ + { + Address: "addr1", + Weight: 500, + }, + }, + }, + "config must be specified", + }, + { + "member weight zero", + &v1.MsgInit{ + Config: &v1.Config{ + Threshold: 666, + Quorum: 400, + VotingPeriod: 60, + }, + Members: []*v1.Member{ + { + Address: "addr1", + Weight: 0, + }, + }, + }, + "member weight must be greater than zero", + }, + { + "threshold is zero", + &v1.MsgInit{ + Config: &v1.Config{ + Threshold: 0, + Quorum: 400, + VotingPeriod: 60, + }, + Members: []*v1.Member{ + { + Address: "addr1", + Weight: 500, + }, + }, + }, + "threshold, quorum and voting period must be greater than zero", + }, + { + "threshold greater than total weight", + &v1.MsgInit{ + Config: &v1.Config{ + Threshold: 2000, + Quorum: 400, + VotingPeriod: 60, + }, + Members: []*v1.Member{ + { + Address: "addr1", + Weight: 500, + }, + { + Address: "addr2", + Weight: 1000, + }, + }, + }, + "threshold must be less than or equal to the total weight", + }, + { + "quorum greater than total weight", + &v1.MsgInit{ + Config: &v1.Config{ + Threshold: 666, + Quorum: 2000, + VotingPeriod: 60, + }, + Members: []*v1.Member{ + { + Address: "addr1", + Weight: 500, + }, + { + Address: "addr2", + Weight: 1000, + }, + }, + }, + "quorum must be less than or equal to the total weight", + }, + } + + for _, tc := range testcases { + t.Run(tc.name, func(t *testing.T) { + _, err := acc.Init(ctx, tc.msg) + if tc.expErr != "" { + require.EqualError(t, err, tc.expErr) + return + } + require.NoError(t, err) + }) + } +} + +func TestUpdateConfig(t *testing.T) { + // all test cases start from the same initial state + startAcc := &v1.MsgInit{ + Config: &v1.Config{ + Threshold: 2640, + Quorum: 2000, + VotingPeriod: 60, + }, + Members: []*v1.Member{ + { + Address: "addr1", + Weight: 1000, + }, + { + Address: "addr2", + Weight: 1000, + }, + { + Address: "addr3", + Weight: 1000, + }, + { + Address: "addr4", + Weight: 1000, + }, + }, + } + + testcases := []struct { + name string + msg *v1.MsgUpdateConfig + expErr string + expCfg *v1.Config + expMembers []*v1.Member + }{ + { + "change members", + &v1.MsgUpdateConfig{ + UpdateMembers: []*v1.Member{ + { + Address: "addr1", + Weight: 500, + }, + { + Address: "addr2", + Weight: 700, + }, + }, + Config: &v1.Config{ + Threshold: 666, + Quorum: 400, + VotingPeriod: 60, + }, + }, + "", + &v1.Config{ + Threshold: 666, + Quorum: 400, + VotingPeriod: 60, + }, + []*v1.Member{ + { + Address: "addr1", + Weight: 500, + }, + { + Address: "addr2", + Weight: 700, + }, + { + Address: "addr3", + Weight: 1000, + }, + { + Address: "addr4", + Weight: 1000, + }, + }, + }, + { + "remove member", + &v1.MsgUpdateConfig{ + UpdateMembers: []*v1.Member{ + { + Address: "addr1", + Weight: 0, + }, + }, + Config: nil, + }, + "", + nil, + []*v1.Member{ + { + Address: "addr2", + Weight: 1000, + }, + { + Address: "addr3", + Weight: 1000, + }, + { + Address: "addr4", + Weight: 1000, + }, + }, + }, + { + "add member", + &v1.MsgUpdateConfig{ + UpdateMembers: []*v1.Member{ + { + Address: "addr5", + Weight: 200, + }, + }, + Config: nil, + }, + "", + nil, + []*v1.Member{ + { + Address: "addr1", + Weight: 1000, + }, + { + Address: "addr2", + Weight: 1000, + }, + { + Address: "addr3", + Weight: 1000, + }, + { + Address: "addr4", + Weight: 1000, + }, + { + Address: "addr5", + Weight: 200, + }, + }, + }, + } + + for _, tc := range testcases { + t.Run(tc.name, func(t *testing.T) { + ctx, ss := newMockContext(t) + acc := setup(t, ctx, ss, nil) + _, err := acc.Init(ctx, startAcc) + require.NoError(t, err) + + _, err = acc.UpdateConfig(ctx, tc.msg) + if tc.expErr != "" { + require.EqualError(t, err, tc.expErr) + return + } + require.NoError(t, err) + + cfg, err := acc.QueryConfig(ctx, &v1.QueryConfig{}) + require.NoError(t, err) + + // if we are not changing the config, we expect the same config as init + if tc.expCfg == nil { + require.Equal(t, startAcc.Config, cfg.Config) + } else { + require.Equal(t, tc.expCfg, cfg.Config) + } + require.Equal(t, tc.expMembers, cfg.Members) + }) + } +} + +func TestProposal_NotPassing(t *testing.T) { + // all test cases start from the same initial state + startAcc := &v1.MsgInit{ + Config: &v1.Config{ + Threshold: 2640, + Quorum: 2000, + VotingPeriod: 60, + }, + Members: []*v1.Member{ + { + Address: "addr1", + Weight: 1000, + }, + { + Address: "addr2", + Weight: 1000, + }, + { + Address: "addr3", + Weight: 1000, + }, + { + Address: "addr4", + Weight: 1000, + }, + }, + } + + ctx, ss := accountstd.NewMockContext( + 0, []byte("multisig_acc"), []byte("addr1"), TestFunds, func(ctx context.Context, sender []byte, msg, msgResp ProtoMsg) error { + return nil + }, func(ctx context.Context, sender []byte, msg ProtoMsg) (ProtoMsg, error) { + if _, ok := msg.(*v1.MsgUpdateConfig); ok { + return &v1.MsgUpdateConfigResponse{}, nil + } + return nil, nil + }, func(ctx context.Context, req, resp ProtoMsg) error { + return nil + }, + ) + + currentTime := time.Now() + + acc := setup(t, ctx, ss, func() time.Time { + return currentTime + }) + _, err := acc.Init(ctx, startAcc) + require.NoError(t, err) + + msg := &v1.MsgUpdateConfig{ + UpdateMembers: []*v1.Member{ + { + Address: "addr1", + Weight: 500, + }, + }, + } + anymsg, err := accountstd.PackAny(msg) + require.NoError(t, err) + + // create a proposal + createRes, err := acc.CreateProposal(ctx, &v1.MsgCreateProposal{ + Proposal: &v1.Proposal{ + Title: "test", + Summary: "test", + Messages: []*types.Any{anymsg}, + }, + }) + require.NoError(t, err) + + propId := createRes.ProposalId + + _, err = acc.Vote(ctx, &v1.MsgVote{ + ProposalId: propId, + Vote: v1.VoteOption_VOTE_OPTION_YES, + }) + require.NoError(t, err) + + _, err = acc.Vote(ctx, &v1.MsgVote{ + ProposalId: propId, + Vote: v1.VoteOption_VOTE_OPTION_YES, + }) + require.ErrorContains(t, err, "voter has already voted, can't change its vote per config") + + ctx = accountstd.SetSender(ctx, []byte("addr2")) + _, err = acc.Vote(ctx, &v1.MsgVote{ + ProposalId: propId, + Vote: v1.VoteOption_VOTE_OPTION_YES, + }) + require.NoError(t, err) + + // try to execute the proposal + _, err = acc.ExecuteProposal(ctx, &v1.MsgExecuteProposal{ + ProposalId: propId, + }) + require.ErrorContains(t, err, "voting period has not ended yet") + + // fast forward time + currentTime = currentTime.Add(61 * time.Second) + _, err = acc.ExecuteProposal(ctx, &v1.MsgExecuteProposal{ + ProposalId: propId, + }) + require.NoError(t, err) + + // check proposal status + prop, err := acc.QueryProposal(ctx, &v1.QueryProposal{ + ProposalId: propId, + }) + require.NoError(t, err) + require.Equal(t, v1.ProposalStatus_PROPOSAL_STATUS_REJECTED, prop.Proposal.Status) + + // vote with addr3 + ctx = accountstd.SetSender(ctx, []byte("addr3")) + _, err = acc.Vote(ctx, &v1.MsgVote{ + ProposalId: propId, + Vote: v1.VoteOption_VOTE_OPTION_YES, + }) + require.ErrorContains(t, err, "voting period has ended") +} + +func TestProposalPassing(t *testing.T) { + // all test cases start from the same initial state + startAcc := &v1.MsgInit{ + Config: &v1.Config{ + Threshold: 2640, + Quorum: 2000, + VotingPeriod: 60, + }, + Members: []*v1.Member{ + { + Address: "addr1", + Weight: 1000, + }, + { + Address: "addr2", + Weight: 1000, + }, + { + Address: "addr3", + Weight: 1000, + }, + { + Address: "addr4", + Weight: 1000, + }, + }, + } + + var acc *Account + ctx, ss := accountstd.NewMockContext( + 0, []byte("multisig_acc"), []byte("addr1"), TestFunds, func(ctx context.Context, sender []byte, msg, msgResp ProtoMsg) error { + return nil + }, func(ctx context.Context, sender []byte, msg ProtoMsg) (ProtoMsg, error) { + if _, ok := msg.(*v1.MsgUpdateConfig); ok { + return acc.UpdateConfig(ctx, msg.(*v1.MsgUpdateConfig)) + } + return nil, nil + }, func(ctx context.Context, req, resp ProtoMsg) error { + return nil + }, + ) + + currentTime := time.Now() + + acc = setup(t, ctx, ss, func() time.Time { + return currentTime + }) + _, err := acc.Init(ctx, startAcc) + require.NoError(t, err) + + msg := &v1.MsgUpdateConfig{ + UpdateMembers: []*v1.Member{ + { + Address: "addr1", + Weight: 500, + }, + }, + } + anymsg, err := accountstd.PackAny(msg) + require.NoError(t, err) + + // create a proposal + createRes, err := acc.CreateProposal(ctx, &v1.MsgCreateProposal{ + Proposal: &v1.Proposal{ + Title: "test", + Summary: "test", + Messages: []*types.Any{anymsg}, + }, + }) + require.NoError(t, err) + + propId := createRes.ProposalId + + _, err = acc.Vote(ctx, &v1.MsgVote{ + ProposalId: propId, + Vote: v1.VoteOption_VOTE_OPTION_YES, + }) + require.NoError(t, err) + + _, err = acc.Vote(ctx, &v1.MsgVote{ + ProposalId: propId, + Vote: v1.VoteOption_VOTE_OPTION_YES, + }) + require.ErrorContains(t, err, "voter has already voted, can't change its vote per config") + + ctx = accountstd.SetSender(ctx, []byte("addr2")) + _, err = acc.Vote(ctx, &v1.MsgVote{ + ProposalId: propId, + Vote: v1.VoteOption_VOTE_OPTION_YES, + }) + require.NoError(t, err) + + // vote with addr3 + ctx = accountstd.SetSender(ctx, []byte("addr3")) + _, err = acc.Vote(ctx, &v1.MsgVote{ + ProposalId: propId, + Vote: v1.VoteOption_VOTE_OPTION_YES, + }) + require.NoError(t, err) + + // fast forward time + currentTime = currentTime.Add(61 * time.Second) + _, err = acc.ExecuteProposal(ctx, &v1.MsgExecuteProposal{ + ProposalId: propId, + }) + require.NoError(t, err) + + // check if addr1's weight changed + cfg, err := acc.QueryConfig(ctx, &v1.QueryConfig{}) + require.NoError(t, err) + for _, v := range cfg.Members { + if v.Address == "addr1" { + require.Equal(t, uint64(500), v.Weight) + } + } +} diff --git a/x/accounts/defaults/multisig/update_config.go b/x/accounts/defaults/multisig/update_config.go new file mode 100644 index 000000000000..8a88abc605d6 --- /dev/null +++ b/x/accounts/defaults/multisig/update_config.go @@ -0,0 +1,78 @@ +package multisig + +import ( + "context" + "errors" + + v1 "cosmossdk.io/x/accounts/defaults/multisig/v1" +) + +// UpdateConfig updates the configuration of the multisig account. +func (a Account) UpdateConfig(ctx context.Context, msg *v1.MsgUpdateConfig) (*v1.MsgUpdateConfigResponse, error) { + // set members + for i := range msg.UpdateMembers { + addrBz, err := a.addrCodec.StringToBytes(msg.UpdateMembers[i].Address) + if err != nil { + return nil, err + } + + if msg.UpdateMembers[i].Weight == 0 { + if err := a.Members.Remove(ctx, addrBz); err != nil { + return nil, err + } + continue + } + if err := a.Members.Set(ctx, addrBz, msg.UpdateMembers[i].Weight); err != nil { + return nil, err + } + } + + if msg.Config != nil { + // set config + if err := a.Config.Set(ctx, *msg.Config); err != nil { + return nil, err + } + } + + // verify that the new set of members and config are valid + // get the weight from the stored members + totalWeight := uint64(0) + err := a.Members.Walk(ctx, nil, func(_ []byte, value uint64) (stop bool, err error) { + totalWeight += value + return false, nil + }) + if err != nil { + return nil, err + } + + // get the config from state given that we might not have it in the message + config, err := a.Config.Get(ctx) + if err != nil { + return nil, err + } + + if err := validateConfig(config, totalWeight); err != nil { + return nil, err + } + + return &v1.MsgUpdateConfigResponse{}, nil +} + +func validateConfig(cfg v1.Config, totalWeight uint64) error { + // check for zero values + if cfg.Threshold <= 0 || cfg.Quorum <= 0 || cfg.VotingPeriod <= 0 { + return errors.New("threshold, quorum and voting period must be greater than zero") + } + + // threshold must be less than or equal to the total weight + if totalWeight < uint64(cfg.Threshold) { + return errors.New("threshold must be less than or equal to the total weight") + } + + // quota must be less than or equal to the total weight + if totalWeight < uint64(cfg.Quorum) { + return errors.New("quorum must be less than or equal to the total weight") + } + + return nil +} diff --git a/x/accounts/defaults/multisig/utils_test.go b/x/accounts/defaults/multisig/utils_test.go new file mode 100644 index 000000000000..32df0f1bb895 --- /dev/null +++ b/x/accounts/defaults/multisig/utils_test.go @@ -0,0 +1,213 @@ +package multisig + +import ( + "context" + "testing" + "time" + + gogoproto "github.com/cosmos/gogoproto/proto" + types "github.com/cosmos/gogoproto/types/any" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/runtime/protoiface" + + "cosmossdk.io/collections" + "cosmossdk.io/core/appmodule/v2" + "cosmossdk.io/core/event" + "cosmossdk.io/core/header" + "cosmossdk.io/core/store" + "cosmossdk.io/math" + "cosmossdk.io/x/accounts/accountstd" + banktypes "cosmossdk.io/x/bank/types" + + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/runtime" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type ProtoMsg = protoiface.MessageV1 + +var TestFunds = sdk.NewCoins(sdk.NewCoin("test", math.NewInt(10))) + +// mock statecodec +type mockStateCodec struct { + codec.Codec +} + +// GetMsgAnySigners implements codec.Codec. +func (mockStateCodec) GetMsgAnySigners(msg *types.Any) ([][]byte, protoreflect.ProtoMessage, error) { + panic("unimplemented") +} + +// GetMsgV1Signers implements codec.Codec. +func (mockStateCodec) GetMsgV1Signers(msg gogoproto.Message) ([][]byte, protoreflect.ProtoMessage, error) { + panic("unimplemented") +} + +// GetMsgV2Signers implements codec.Codec. +func (mockStateCodec) GetMsgV2Signers(msg protoreflect.ProtoMessage) ([][]byte, error) { + panic("unimplemented") +} + +// InterfaceRegistry implements codec.Codec. +func (mockStateCodec) InterfaceRegistry() codectypes.InterfaceRegistry { + panic("unimplemented") +} + +// MarshalInterface implements codec.Codec. +func (mockStateCodec) MarshalInterface(i gogoproto.Message) ([]byte, error) { + panic("unimplemented") +} + +// MarshalInterfaceJSON implements codec.Codec. +func (mockStateCodec) MarshalInterfaceJSON(i gogoproto.Message) ([]byte, error) { + panic("unimplemented") +} + +// MarshalJSON implements codec.Codec. +func (mockStateCodec) MarshalJSON(o gogoproto.Message) ([]byte, error) { + panic("unimplemented") +} + +// MarshalLengthPrefixed implements codec.Codec. +func (mockStateCodec) MarshalLengthPrefixed(o gogoproto.Message) ([]byte, error) { + panic("unimplemented") +} + +// MustMarshal implements codec.Codec. +func (mockStateCodec) MustMarshal(o gogoproto.Message) []byte { + panic("unimplemented") +} + +// MustMarshalJSON implements codec.Codec. +func (mockStateCodec) MustMarshalJSON(o gogoproto.Message) []byte { + panic("unimplemented") +} + +// MustMarshalLengthPrefixed implements codec.Codec. +func (mockStateCodec) MustMarshalLengthPrefixed(o gogoproto.Message) []byte { + panic("unimplemented") +} + +// MustUnmarshal implements codec.Codec. +func (mockStateCodec) MustUnmarshal(bz []byte, ptr gogoproto.Message) { + panic("unimplemented") +} + +// MustUnmarshalJSON implements codec.Codec. +func (mockStateCodec) MustUnmarshalJSON(bz []byte, ptr gogoproto.Message) { + panic("unimplemented") +} + +// MustUnmarshalLengthPrefixed implements codec.Codec. +func (mockStateCodec) MustUnmarshalLengthPrefixed(bz []byte, ptr gogoproto.Message) { + panic("unimplemented") +} + +// UnmarshalInterface implements codec.Codec. +func (mockStateCodec) UnmarshalInterface(bz []byte, ptr interface{}) error { + panic("unimplemented") +} + +// UnmarshalInterfaceJSON implements codec.Codec. +func (mockStateCodec) UnmarshalInterfaceJSON(bz []byte, ptr interface{}) error { + panic("unimplemented") +} + +// UnmarshalJSON implements codec.Codec. +func (mockStateCodec) UnmarshalJSON(bz []byte, ptr gogoproto.Message) error { + panic("unimplemented") +} + +// UnmarshalLengthPrefixed implements codec.Codec. +func (mockStateCodec) UnmarshalLengthPrefixed(bz []byte, ptr gogoproto.Message) error { + panic("unimplemented") +} + +// UnpackAny implements codec.Codec. +func (mockStateCodec) UnpackAny(any *types.Any, iface interface{}) error { + panic("unimplemented") +} + +var _ codec.Codec = mockStateCodec{} + +func (c mockStateCodec) Marshal(m gogoproto.Message) ([]byte, error) { + // Size() check can catch the typed nil value. + if m == nil || gogoproto.Size(m) == 0 { + // return empty bytes instead of nil, because nil has special meaning in places like store.Set + return []byte{}, nil + } + + return gogoproto.Marshal(m) +} + +func (c mockStateCodec) Unmarshal(bz []byte, ptr gogoproto.Message) error { + err := gogoproto.Unmarshal(bz, ptr) + + return err +} + +type ( + ModuleExecUntypedFunc = func(ctx context.Context, sender []byte, msg ProtoMsg) (ProtoMsg, error) + ModuleExecFunc = func(ctx context.Context, sender []byte, msg, msgResp ProtoMsg) error + ModuleQueryFunc = func(ctx context.Context, queryReq, queryResp ProtoMsg) error +) + +// mock address codec +type addressCodec struct{} + +func (a addressCodec) StringToBytes(text string) ([]byte, error) { return []byte(text), nil } +func (a addressCodec) BytesToString(bz []byte) (string, error) { return string(bz), nil } + +func newMockContext(t *testing.T) (context.Context, store.KVStoreService) { + t.Helper() + return accountstd.NewMockContext( + 0, []byte("multisig_account"), []byte("sender"), TestFunds, func(ctx context.Context, sender []byte, msg, msgResp ProtoMsg) error { + return nil + }, func(ctx context.Context, sender []byte, msg ProtoMsg) (ProtoMsg, error) { + return nil, nil + }, func(ctx context.Context, req, resp ProtoMsg) error { + _, ok := req.(*banktypes.QueryBalanceRequest) + require.True(t, ok) + gogoproto.Merge(resp.(gogoproto.Message), &banktypes.QueryBalanceResponse{ + Balance: &sdk.Coin{ + Denom: "test", + Amount: math.NewInt(5), + }, + }) + return nil + }, + ) +} + +func makeMockDependencies(storeservice store.KVStoreService, timefn func() time.Time) accountstd.Dependencies { + sb := collections.NewSchemaBuilder(storeservice) + + return accountstd.Dependencies{ + SchemaBuilder: sb, + AddressCodec: addressCodec{}, + LegacyStateCodec: mockStateCodec{}, + Environment: appmodule.Environment{ + HeaderService: headerService{timefn}, + EventService: eventService{}, + }, + } +} + +type headerService struct { + timefn func() time.Time +} + +func (h headerService) HeaderInfo(context.Context) header.Info { + return header.Info{ + Time: h.timefn(), + } +} + +type eventService struct{} + +// EventManager implements event.Service. +func (eventService) EventManager(context.Context) event.Manager { + return runtime.EventService{Events: runtime.Events{EventManagerI: sdk.NewEventManager()}} +} diff --git a/x/accounts/defaults/multisig/v1/multisig.pb.go b/x/accounts/defaults/multisig/v1/multisig.pb.go new file mode 100644 index 000000000000..552d78de4c9b --- /dev/null +++ b/x/accounts/defaults/multisig/v1/multisig.pb.go @@ -0,0 +1,3807 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/accounts/defaults/multisig/v1/multisig.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + proto "github.com/cosmos/gogoproto/proto" + any "github.com/cosmos/gogoproto/types/any" + 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 + +// ProposalStatus enumerates the valid proposal statuses. +type ProposalStatus int32 + +const ( + // PROPOSAL_STATUS_UNSPECIFIED defines a no-op proposal status. + ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED ProposalStatus = 0 + // PROPOSAL_STATUS_VOTING_PERIOD defines the proposal status during the voting period. + ProposalStatus_PROPOSAL_STATUS_VOTING_PERIOD ProposalStatus = 1 + // PROPOSAL_STATUS_PASSED defines the proposal status when the proposal passed. + ProposalStatus_PROPOSAL_STATUS_PASSED ProposalStatus = 2 + // PROPOSAL_STATUS_REJECTED defines the proposal status when the proposal was rejected. + ProposalStatus_PROPOSAL_STATUS_REJECTED ProposalStatus = 3 +) + +var ProposalStatus_name = map[int32]string{ + 0: "PROPOSAL_STATUS_UNSPECIFIED", + 1: "PROPOSAL_STATUS_VOTING_PERIOD", + 2: "PROPOSAL_STATUS_PASSED", + 3: "PROPOSAL_STATUS_REJECTED", +} + +var ProposalStatus_value = map[string]int32{ + "PROPOSAL_STATUS_UNSPECIFIED": 0, + "PROPOSAL_STATUS_VOTING_PERIOD": 1, + "PROPOSAL_STATUS_PASSED": 2, + "PROPOSAL_STATUS_REJECTED": 3, +} + +func (x ProposalStatus) String() string { + return proto.EnumName(ProposalStatus_name, int32(x)) +} + +func (ProposalStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{0} +} + +// VoteOption enumerates the valid vote options for a given proposal. +type VoteOption int32 + +const ( + // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + VoteOption_VOTE_OPTION_UNSPECIFIED VoteOption = 0 + // VOTE_OPTION_YES defines the yes proposal vote option. + VoteOption_VOTE_OPTION_YES VoteOption = 1 + // VOTE_OPTION_ABSTAIN defines the abstain proposal vote option. + VoteOption_VOTE_OPTION_ABSTAIN VoteOption = 2 + // VOTE_OPTION_NO defines the no proposal vote option. + VoteOption_VOTE_OPTION_NO VoteOption = 3 +) + +var VoteOption_name = map[int32]string{ + 0: "VOTE_OPTION_UNSPECIFIED", + 1: "VOTE_OPTION_YES", + 2: "VOTE_OPTION_ABSTAIN", + 3: "VOTE_OPTION_NO", +} + +var VoteOption_value = map[string]int32{ + "VOTE_OPTION_UNSPECIFIED": 0, + "VOTE_OPTION_YES": 1, + "VOTE_OPTION_ABSTAIN": 2, + "VOTE_OPTION_NO": 3, +} + +func (x VoteOption) String() string { + return proto.EnumName(VoteOption_name, int32(x)) +} + +func (VoteOption) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{1} +} + +// MsgInit is used to initialize a multisig account. +type MsgInit struct { + Members []*Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` + Config *Config `protobuf:"bytes,2,opt,name=Config,proto3" json:"Config,omitempty"` +} + +func (m *MsgInit) Reset() { *m = MsgInit{} } +func (m *MsgInit) String() string { return proto.CompactTextString(m) } +func (*MsgInit) ProtoMessage() {} +func (*MsgInit) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{0} +} +func (m *MsgInit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInit.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 *MsgInit) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInit.Merge(m, src) +} +func (m *MsgInit) XXX_Size() int { + return m.Size() +} +func (m *MsgInit) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInit.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInit proto.InternalMessageInfo + +func (m *MsgInit) GetMembers() []*Member { + if m != nil { + return m.Members + } + return nil +} + +func (m *MsgInit) GetConfig() *Config { + if m != nil { + return m.Config + } + return nil +} + +// MsgInitResponse is the response returned after account initialization. +type MsgInitResponse struct { +} + +func (m *MsgInitResponse) Reset() { *m = MsgInitResponse{} } +func (m *MsgInitResponse) String() string { return proto.CompactTextString(m) } +func (*MsgInitResponse) ProtoMessage() {} +func (*MsgInitResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{1} +} +func (m *MsgInitResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInitResponse.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 *MsgInitResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInitResponse.Merge(m, src) +} +func (m *MsgInitResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgInitResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInitResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInitResponse proto.InternalMessageInfo + +type MsgCreateProposal struct { + Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` +} + +func (m *MsgCreateProposal) Reset() { *m = MsgCreateProposal{} } +func (m *MsgCreateProposal) String() string { return proto.CompactTextString(m) } +func (*MsgCreateProposal) ProtoMessage() {} +func (*MsgCreateProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{2} +} +func (m *MsgCreateProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateProposal.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 *MsgCreateProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateProposal.Merge(m, src) +} +func (m *MsgCreateProposal) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateProposal) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateProposal proto.InternalMessageInfo + +func (m *MsgCreateProposal) GetProposal() *Proposal { + if m != nil { + return m.Proposal + } + return nil +} + +type MsgCreateProposalResponse struct { + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` +} + +func (m *MsgCreateProposalResponse) Reset() { *m = MsgCreateProposalResponse{} } +func (m *MsgCreateProposalResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateProposalResponse) ProtoMessage() {} +func (*MsgCreateProposalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{3} +} +func (m *MsgCreateProposalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateProposalResponse.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 *MsgCreateProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateProposalResponse.Merge(m, src) +} +func (m *MsgCreateProposalResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateProposalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateProposalResponse proto.InternalMessageInfo + +func (m *MsgCreateProposalResponse) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +type MsgVote struct { + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + Vote VoteOption `protobuf:"varint,2,opt,name=vote,proto3,enum=cosmos.accounts.defaults.multisig.v1.VoteOption" json:"vote,omitempty"` +} + +func (m *MsgVote) Reset() { *m = MsgVote{} } +func (m *MsgVote) String() string { return proto.CompactTextString(m) } +func (*MsgVote) ProtoMessage() {} +func (*MsgVote) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{4} +} +func (m *MsgVote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVote.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 *MsgVote) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVote.Merge(m, src) +} +func (m *MsgVote) XXX_Size() int { + return m.Size() +} +func (m *MsgVote) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVote.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVote proto.InternalMessageInfo + +func (m *MsgVote) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +func (m *MsgVote) GetVote() VoteOption { + if m != nil { + return m.Vote + } + return VoteOption_VOTE_OPTION_UNSPECIFIED +} + +type MsgVoteResponse struct { +} + +func (m *MsgVoteResponse) Reset() { *m = MsgVoteResponse{} } +func (m *MsgVoteResponse) String() string { return proto.CompactTextString(m) } +func (*MsgVoteResponse) ProtoMessage() {} +func (*MsgVoteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{5} +} +func (m *MsgVoteResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVoteResponse.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 *MsgVoteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteResponse.Merge(m, src) +} +func (m *MsgVoteResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgVoteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVoteResponse proto.InternalMessageInfo + +type MsgExecuteProposal struct { + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` +} + +func (m *MsgExecuteProposal) Reset() { *m = MsgExecuteProposal{} } +func (m *MsgExecuteProposal) String() string { return proto.CompactTextString(m) } +func (*MsgExecuteProposal) ProtoMessage() {} +func (*MsgExecuteProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{6} +} +func (m *MsgExecuteProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExecuteProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExecuteProposal.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 *MsgExecuteProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExecuteProposal.Merge(m, src) +} +func (m *MsgExecuteProposal) XXX_Size() int { + return m.Size() +} +func (m *MsgExecuteProposal) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExecuteProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExecuteProposal proto.InternalMessageInfo + +func (m *MsgExecuteProposal) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +type MsgExecuteProposalResponse struct { + Responses []*any.Any `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` +} + +func (m *MsgExecuteProposalResponse) Reset() { *m = MsgExecuteProposalResponse{} } +func (m *MsgExecuteProposalResponse) String() string { return proto.CompactTextString(m) } +func (*MsgExecuteProposalResponse) ProtoMessage() {} +func (*MsgExecuteProposalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{7} +} +func (m *MsgExecuteProposalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExecuteProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExecuteProposalResponse.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 *MsgExecuteProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExecuteProposalResponse.Merge(m, src) +} +func (m *MsgExecuteProposalResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgExecuteProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExecuteProposalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExecuteProposalResponse proto.InternalMessageInfo + +func (m *MsgExecuteProposalResponse) GetResponses() []*any.Any { + if m != nil { + return m.Responses + } + return nil +} + +// MsgUpdateConfig is used to change the config or members. +type MsgUpdateConfig struct { + // only the members that are changing are required, if their weight is 0, they are removed. + UpdateMembers []*Member `protobuf:"bytes,1,rep,name=update_members,json=updateMembers,proto3" json:"update_members,omitempty"` + // not all fields from Config can be changed + Config *Config `protobuf:"bytes,2,opt,name=Config,proto3" json:"Config,omitempty"` +} + +func (m *MsgUpdateConfig) Reset() { *m = MsgUpdateConfig{} } +func (m *MsgUpdateConfig) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateConfig) ProtoMessage() {} +func (*MsgUpdateConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{8} +} +func (m *MsgUpdateConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateConfig.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 *MsgUpdateConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateConfig.Merge(m, src) +} +func (m *MsgUpdateConfig) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateConfig) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateConfig proto.InternalMessageInfo + +func (m *MsgUpdateConfig) GetUpdateMembers() []*Member { + if m != nil { + return m.UpdateMembers + } + return nil +} + +func (m *MsgUpdateConfig) GetConfig() *Config { + if m != nil { + return m.Config + } + return nil +} + +type MsgUpdateConfigResponse struct { +} + +func (m *MsgUpdateConfigResponse) Reset() { *m = MsgUpdateConfigResponse{} } +func (m *MsgUpdateConfigResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateConfigResponse) ProtoMessage() {} +func (*MsgUpdateConfigResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{9} +} +func (m *MsgUpdateConfigResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateConfigResponse.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 *MsgUpdateConfigResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateConfigResponse.Merge(m, src) +} +func (m *MsgUpdateConfigResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateConfigResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateConfigResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateConfigResponse proto.InternalMessageInfo + +type Member struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Weight uint64 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` +} + +func (m *Member) Reset() { *m = Member{} } +func (m *Member) String() string { return proto.CompactTextString(m) } +func (*Member) ProtoMessage() {} +func (*Member) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{10} +} +func (m *Member) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Member) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Member.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 *Member) XXX_Merge(src proto.Message) { + xxx_messageInfo_Member.Merge(m, src) +} +func (m *Member) XXX_Size() int { + return m.Size() +} +func (m *Member) XXX_DiscardUnknown() { + xxx_messageInfo_Member.DiscardUnknown(m) +} + +var xxx_messageInfo_Member proto.InternalMessageInfo + +func (m *Member) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *Member) GetWeight() uint64 { + if m != nil { + return m.Weight + } + return 0 +} + +type Config struct { + Threshold int64 `protobuf:"varint,1,opt,name=threshold,proto3" json:"threshold,omitempty"` + Quorum int64 `protobuf:"varint,2,opt,name=quorum,proto3" json:"quorum,omitempty"` + // voting_period is the duration in seconds for the voting period. + VotingPeriod int64 `protobuf:"varint,3,opt,name=voting_period,json=votingPeriod,proto3" json:"voting_period,omitempty"` + // revote defines if members can change their vote. + Revote bool `protobuf:"varint,4,opt,name=revote,proto3" json:"revote,omitempty"` + // early_execution defines if the multisig can be executed before the voting period ends. + EarlyExecution bool `protobuf:"varint,5,opt,name=early_execution,json=earlyExecution,proto3" json:"early_execution,omitempty"` +} + +func (m *Config) Reset() { *m = Config{} } +func (m *Config) String() string { return proto.CompactTextString(m) } +func (*Config) ProtoMessage() {} +func (*Config) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{11} +} +func (m *Config) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Config.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 *Config) XXX_Merge(src proto.Message) { + xxx_messageInfo_Config.Merge(m, src) +} +func (m *Config) XXX_Size() int { + return m.Size() +} +func (m *Config) XXX_DiscardUnknown() { + xxx_messageInfo_Config.DiscardUnknown(m) +} + +var xxx_messageInfo_Config proto.InternalMessageInfo + +func (m *Config) GetThreshold() int64 { + if m != nil { + return m.Threshold + } + return 0 +} + +func (m *Config) GetQuorum() int64 { + if m != nil { + return m.Quorum + } + return 0 +} + +func (m *Config) GetVotingPeriod() int64 { + if m != nil { + return m.VotingPeriod + } + return 0 +} + +func (m *Config) GetRevote() bool { + if m != nil { + return m.Revote + } + return false +} + +func (m *Config) GetEarlyExecution() bool { + if m != nil { + return m.EarlyExecution + } + return false +} + +type Proposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` + Messages []*any.Any `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` + // voting_period_end will be set by the account when the proposal is created. + VotingPeriodEnd int64 `protobuf:"varint,4,opt,name=voting_period_end,json=votingPeriodEnd,proto3" json:"voting_period_end,omitempty"` + Status ProposalStatus `protobuf:"varint,5,opt,name=status,proto3,enum=cosmos.accounts.defaults.multisig.v1.ProposalStatus" json:"status,omitempty"` +} + +func (m *Proposal) Reset() { *m = Proposal{} } +func (m *Proposal) String() string { return proto.CompactTextString(m) } +func (*Proposal) ProtoMessage() {} +func (*Proposal) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{12} +} +func (m *Proposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Proposal.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 *Proposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_Proposal.Merge(m, src) +} +func (m *Proposal) XXX_Size() int { + return m.Size() +} +func (m *Proposal) XXX_DiscardUnknown() { + xxx_messageInfo_Proposal.DiscardUnknown(m) +} + +var xxx_messageInfo_Proposal proto.InternalMessageInfo + +func (m *Proposal) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *Proposal) GetSummary() string { + if m != nil { + return m.Summary + } + return "" +} + +func (m *Proposal) GetMessages() []*any.Any { + if m != nil { + return m.Messages + } + return nil +} + +func (m *Proposal) GetVotingPeriodEnd() int64 { + if m != nil { + return m.VotingPeriodEnd + } + return 0 +} + +func (m *Proposal) GetStatus() ProposalStatus { + if m != nil { + return m.Status + } + return ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED +} + +// QuerySequence is the request for the account sequence. +type QuerySequence struct { +} + +func (m *QuerySequence) Reset() { *m = QuerySequence{} } +func (m *QuerySequence) String() string { return proto.CompactTextString(m) } +func (*QuerySequence) ProtoMessage() {} +func (*QuerySequence) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{13} +} +func (m *QuerySequence) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySequence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySequence.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 *QuerySequence) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySequence.Merge(m, src) +} +func (m *QuerySequence) XXX_Size() int { + return m.Size() +} +func (m *QuerySequence) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySequence.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySequence proto.InternalMessageInfo + +// QuerySequenceResponse returns the sequence of the account. +type QuerySequenceResponse struct { + // sequence is the current sequence of the account. + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (m *QuerySequenceResponse) Reset() { *m = QuerySequenceResponse{} } +func (m *QuerySequenceResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySequenceResponse) ProtoMessage() {} +func (*QuerySequenceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{14} +} +func (m *QuerySequenceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySequenceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySequenceResponse.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 *QuerySequenceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySequenceResponse.Merge(m, src) +} +func (m *QuerySequenceResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySequenceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySequenceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySequenceResponse proto.InternalMessageInfo + +func (m *QuerySequenceResponse) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + +type QueryConfig struct { +} + +func (m *QueryConfig) Reset() { *m = QueryConfig{} } +func (m *QueryConfig) String() string { return proto.CompactTextString(m) } +func (*QueryConfig) ProtoMessage() {} +func (*QueryConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{15} +} +func (m *QueryConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryConfig.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 *QueryConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryConfig.Merge(m, src) +} +func (m *QueryConfig) XXX_Size() int { + return m.Size() +} +func (m *QueryConfig) XXX_DiscardUnknown() { + xxx_messageInfo_QueryConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryConfig proto.InternalMessageInfo + +// QuerySequenceResponse returns the sequence of the account. +type QueryConfigResponse struct { + Members []*Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` + Config *Config `protobuf:"bytes,2,opt,name=Config,proto3" json:"Config,omitempty"` +} + +func (m *QueryConfigResponse) Reset() { *m = QueryConfigResponse{} } +func (m *QueryConfigResponse) String() string { return proto.CompactTextString(m) } +func (*QueryConfigResponse) ProtoMessage() {} +func (*QueryConfigResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{16} +} +func (m *QueryConfigResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryConfigResponse.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 *QueryConfigResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryConfigResponse.Merge(m, src) +} +func (m *QueryConfigResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryConfigResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryConfigResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryConfigResponse proto.InternalMessageInfo + +func (m *QueryConfigResponse) GetMembers() []*Member { + if m != nil { + return m.Members + } + return nil +} + +func (m *QueryConfigResponse) GetConfig() *Config { + if m != nil { + return m.Config + } + return nil +} + +type QueryProposal struct { + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` +} + +func (m *QueryProposal) Reset() { *m = QueryProposal{} } +func (m *QueryProposal) String() string { return proto.CompactTextString(m) } +func (*QueryProposal) ProtoMessage() {} +func (*QueryProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{17} +} +func (m *QueryProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProposal.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 *QueryProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProposal.Merge(m, src) +} +func (m *QueryProposal) XXX_Size() int { + return m.Size() +} +func (m *QueryProposal) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProposal proto.InternalMessageInfo + +func (m *QueryProposal) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +type QueryProposalResponse struct { + Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` +} + +func (m *QueryProposalResponse) Reset() { *m = QueryProposalResponse{} } +func (m *QueryProposalResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProposalResponse) ProtoMessage() {} +func (*QueryProposalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e6da8796717704d7, []int{18} +} +func (m *QueryProposalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProposalResponse.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 *QueryProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProposalResponse.Merge(m, src) +} +func (m *QueryProposalResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProposalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProposalResponse proto.InternalMessageInfo + +func (m *QueryProposalResponse) GetProposal() *Proposal { + if m != nil { + return m.Proposal + } + return nil +} + +func init() { + proto.RegisterEnum("cosmos.accounts.defaults.multisig.v1.ProposalStatus", ProposalStatus_name, ProposalStatus_value) + proto.RegisterEnum("cosmos.accounts.defaults.multisig.v1.VoteOption", VoteOption_name, VoteOption_value) + proto.RegisterType((*MsgInit)(nil), "cosmos.accounts.defaults.multisig.v1.MsgInit") + proto.RegisterType((*MsgInitResponse)(nil), "cosmos.accounts.defaults.multisig.v1.MsgInitResponse") + proto.RegisterType((*MsgCreateProposal)(nil), "cosmos.accounts.defaults.multisig.v1.MsgCreateProposal") + proto.RegisterType((*MsgCreateProposalResponse)(nil), "cosmos.accounts.defaults.multisig.v1.MsgCreateProposalResponse") + proto.RegisterType((*MsgVote)(nil), "cosmos.accounts.defaults.multisig.v1.MsgVote") + proto.RegisterType((*MsgVoteResponse)(nil), "cosmos.accounts.defaults.multisig.v1.MsgVoteResponse") + proto.RegisterType((*MsgExecuteProposal)(nil), "cosmos.accounts.defaults.multisig.v1.MsgExecuteProposal") + proto.RegisterType((*MsgExecuteProposalResponse)(nil), "cosmos.accounts.defaults.multisig.v1.MsgExecuteProposalResponse") + proto.RegisterType((*MsgUpdateConfig)(nil), "cosmos.accounts.defaults.multisig.v1.MsgUpdateConfig") + proto.RegisterType((*MsgUpdateConfigResponse)(nil), "cosmos.accounts.defaults.multisig.v1.MsgUpdateConfigResponse") + proto.RegisterType((*Member)(nil), "cosmos.accounts.defaults.multisig.v1.Member") + proto.RegisterType((*Config)(nil), "cosmos.accounts.defaults.multisig.v1.Config") + proto.RegisterType((*Proposal)(nil), "cosmos.accounts.defaults.multisig.v1.Proposal") + proto.RegisterType((*QuerySequence)(nil), "cosmos.accounts.defaults.multisig.v1.QuerySequence") + proto.RegisterType((*QuerySequenceResponse)(nil), "cosmos.accounts.defaults.multisig.v1.QuerySequenceResponse") + proto.RegisterType((*QueryConfig)(nil), "cosmos.accounts.defaults.multisig.v1.QueryConfig") + proto.RegisterType((*QueryConfigResponse)(nil), "cosmos.accounts.defaults.multisig.v1.QueryConfigResponse") + proto.RegisterType((*QueryProposal)(nil), "cosmos.accounts.defaults.multisig.v1.QueryProposal") + proto.RegisterType((*QueryProposalResponse)(nil), "cosmos.accounts.defaults.multisig.v1.QueryProposalResponse") +} + +func init() { + proto.RegisterFile("cosmos/accounts/defaults/multisig/v1/multisig.proto", fileDescriptor_e6da8796717704d7) +} + +var fileDescriptor_e6da8796717704d7 = []byte{ + // 865 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0xaf, 0x9b, 0x6e, 0x9a, 0xbe, 0xd2, 0x24, 0x9d, 0x96, 0xad, 0x9b, 0x5d, 0xb2, 0xc5, 0x20, + 0xb1, 0xaa, 0x16, 0xa7, 0x9b, 0xc2, 0x8d, 0x4b, 0xda, 0xb8, 0x28, 0xab, 0x4d, 0x6c, 0xc6, 0x69, + 0x25, 0xb8, 0x58, 0x6e, 0x3c, 0x75, 0xad, 0x8d, 0x3d, 0x5e, 0xcf, 0xb8, 0x6c, 0xbe, 0x04, 0xe2, + 0xc6, 0x07, 0x80, 0x23, 0x47, 0x3e, 0x04, 0xc7, 0x15, 0x27, 0x8e, 0xa8, 0x95, 0xf8, 0x1c, 0xa8, + 0xe3, 0xb1, 0x9b, 0xa6, 0xd2, 0x6e, 0x10, 0x3d, 0x70, 0xf3, 0xfb, 0xf3, 0xfb, 0xbd, 0xdf, 0xbc, + 0x79, 0xf3, 0x64, 0xd8, 0x1f, 0x51, 0x16, 0x52, 0xd6, 0x72, 0x47, 0x23, 0x9a, 0x46, 0x9c, 0xb5, + 0x3c, 0x72, 0xe6, 0xa6, 0x63, 0xce, 0x5a, 0x61, 0x3a, 0xe6, 0x01, 0x0b, 0xfc, 0xd6, 0xc5, 0xf3, + 0xe2, 0x5b, 0x8f, 0x13, 0xca, 0x29, 0xfa, 0x34, 0x03, 0xe9, 0x39, 0x48, 0xcf, 0x41, 0x7a, 0x91, + 0x78, 0xf1, 0xbc, 0xb1, 0xed, 0x53, 0xea, 0x8f, 0x49, 0x4b, 0x60, 0x4e, 0xd3, 0xb3, 0x96, 0x1b, + 0x4d, 0x32, 0x82, 0xc6, 0x96, 0xac, 0x1a, 0xb2, 0x8c, 0x9e, 0x49, 0xe6, 0xc6, 0x76, 0x16, 0x70, + 0x84, 0xd5, 0x92, 0x65, 0x84, 0xa1, 0xfd, 0xa4, 0xc0, 0x72, 0x9f, 0xf9, 0xbd, 0x28, 0xe0, 0xe8, + 0x08, 0x96, 0x43, 0x12, 0x9e, 0x92, 0x84, 0xa9, 0xca, 0x4e, 0xe9, 0xe9, 0x6a, 0xfb, 0x99, 0x3e, + 0x8f, 0x24, 0xbd, 0x2f, 0x40, 0x38, 0x07, 0xa3, 0x2e, 0x94, 0x0f, 0x69, 0x74, 0x16, 0xf8, 0xea, + 0xe2, 0x8e, 0x32, 0x3f, 0x4d, 0x86, 0xc1, 0x12, 0xab, 0xad, 0x43, 0x4d, 0x0a, 0xc3, 0x84, 0xc5, + 0x34, 0x62, 0x44, 0x73, 0x60, 0xbd, 0xcf, 0xfc, 0xc3, 0x84, 0xb8, 0x9c, 0x58, 0x09, 0x8d, 0x29, + 0x73, 0xc7, 0xe8, 0x05, 0x54, 0x62, 0xf9, 0xad, 0x2a, 0xa2, 0x9e, 0x3e, 0x5f, 0xbd, 0x9c, 0x01, + 0x17, 0x78, 0xed, 0x2b, 0xd8, 0xbe, 0x53, 0x20, 0xaf, 0x8e, 0x9e, 0xc0, 0x6a, 0x9e, 0xe8, 0x04, + 0x9e, 0xa8, 0xb5, 0x84, 0x21, 0x77, 0xf5, 0x3c, 0x2d, 0x16, 0xad, 0x3c, 0xa1, 0xfc, 0xfd, 0xb9, + 0xa8, 0x0b, 0x4b, 0x17, 0x94, 0x13, 0xd1, 0xa1, 0x6a, 0x7b, 0x6f, 0x3e, 0xc5, 0xd7, 0xd4, 0x66, + 0xcc, 0x03, 0x1a, 0x61, 0x81, 0x96, 0x3d, 0xba, 0x76, 0x17, 0x3d, 0xfa, 0x12, 0x50, 0x9f, 0xf9, + 0xc6, 0x1b, 0x32, 0x4a, 0xa7, 0x9a, 0xf4, 0x5e, 0xed, 0x16, 0x34, 0xee, 0xc2, 0x8a, 0xa3, 0xb7, + 0x61, 0x25, 0x91, 0xdf, 0xf9, 0x6c, 0x6c, 0xea, 0xd9, 0x20, 0xea, 0xf9, 0x20, 0xea, 0x9d, 0x68, + 0x82, 0x6f, 0xd2, 0xb4, 0x5f, 0x15, 0x21, 0xee, 0x38, 0xf6, 0x5c, 0x4e, 0xb2, 0x3b, 0x45, 0x36, + 0x54, 0x53, 0x61, 0x3b, 0xff, 0x65, 0xd0, 0xd6, 0x32, 0x8e, 0xfe, 0xbd, 0x8e, 0xdb, 0x36, 0x6c, + 0xcd, 0xa8, 0x2d, 0x5a, 0x3a, 0x84, 0x72, 0x56, 0x0b, 0xb5, 0x61, 0xd9, 0xf5, 0xbc, 0x84, 0x30, + 0x26, 0x5a, 0xb8, 0x72, 0xa0, 0xfe, 0xf1, 0xdb, 0xe7, 0x9b, 0xb2, 0x5c, 0x27, 0x8b, 0xd8, 0x3c, + 0x09, 0x22, 0x1f, 0xe7, 0x89, 0xe8, 0x21, 0x94, 0xbf, 0x27, 0x81, 0x7f, 0xce, 0x85, 0xbc, 0x25, + 0x2c, 0x2d, 0xed, 0x17, 0x25, 0xd7, 0x8d, 0x1e, 0xc3, 0x0a, 0x3f, 0x4f, 0x08, 0x3b, 0xa7, 0xe3, + 0xec, 0x6e, 0x4a, 0xf8, 0xc6, 0x71, 0x4d, 0xf0, 0x3a, 0xa5, 0x49, 0x1a, 0x0a, 0x82, 0x12, 0x96, + 0x16, 0xfa, 0x04, 0xd6, 0x2e, 0x28, 0x0f, 0x22, 0xdf, 0x89, 0x49, 0x12, 0x50, 0x4f, 0x2d, 0x89, + 0xf0, 0x07, 0x99, 0xd3, 0x12, 0xbe, 0x6b, 0x70, 0x42, 0xc4, 0xa4, 0x2d, 0xed, 0x28, 0x4f, 0x2b, + 0x58, 0x5a, 0xe8, 0x33, 0xa8, 0x11, 0x37, 0x19, 0x4f, 0x1c, 0x22, 0xae, 0x3c, 0xa0, 0x91, 0xfa, + 0x40, 0x24, 0x54, 0x85, 0xdb, 0xc8, 0xbd, 0xda, 0xdf, 0x0a, 0x54, 0x8a, 0x31, 0xda, 0x84, 0x07, + 0x3c, 0xe0, 0x63, 0x92, 0x9d, 0x1e, 0x67, 0x06, 0x52, 0x61, 0x99, 0xa5, 0x61, 0xe8, 0x26, 0x13, + 0xa1, 0x70, 0x05, 0xe7, 0x26, 0xda, 0x83, 0x4a, 0x48, 0x18, 0x73, 0x7d, 0xc2, 0xd4, 0xd2, 0x3b, + 0xc6, 0xa6, 0xc8, 0x42, 0xbb, 0xb0, 0x7e, 0xeb, 0x50, 0x0e, 0x89, 0x3c, 0x21, 0xbd, 0x84, 0x6b, + 0xd3, 0x07, 0x33, 0x22, 0x0f, 0xbd, 0x84, 0x32, 0xe3, 0x2e, 0x4f, 0x99, 0x90, 0x5e, 0x6d, 0x7f, + 0xf1, 0xef, 0xde, 0xbd, 0x2d, 0xb0, 0x58, 0x72, 0x68, 0x35, 0x58, 0xfb, 0x26, 0x25, 0xc9, 0xc4, + 0x26, 0xaf, 0x53, 0x12, 0x8d, 0x88, 0xb6, 0x0f, 0x1f, 0xde, 0x72, 0x14, 0xaf, 0xa1, 0x01, 0x15, + 0x26, 0x7d, 0xf2, 0x25, 0x15, 0xb6, 0xb6, 0x06, 0xab, 0x02, 0x24, 0xa7, 0xea, 0x67, 0x05, 0x36, + 0xa6, 0xec, 0x82, 0xe2, 0xff, 0xb5, 0x6a, 0xf7, 0xe4, 0xd1, 0xe7, 0x5f, 0x17, 0x23, 0xd9, 0x9b, + 0x3b, 0x9b, 0xe2, 0x1e, 0xb7, 0xf1, 0xee, 0x0f, 0x0a, 0x54, 0x6f, 0x5f, 0x16, 0x7a, 0x02, 0x8f, + 0x2c, 0x6c, 0x5a, 0xa6, 0xdd, 0x79, 0xe9, 0xd8, 0xc3, 0xce, 0xf0, 0xd8, 0x76, 0x8e, 0x07, 0xb6, + 0x65, 0x1c, 0xf6, 0x8e, 0x7a, 0x46, 0xb7, 0xbe, 0x80, 0x3e, 0x86, 0x8f, 0x66, 0x13, 0x4e, 0xcc, + 0x61, 0x6f, 0xf0, 0xb5, 0x63, 0x19, 0xb8, 0x67, 0x76, 0xeb, 0x0a, 0x6a, 0xc0, 0xc3, 0xd9, 0x14, + 0xab, 0x63, 0xdb, 0x46, 0xb7, 0xbe, 0x88, 0x1e, 0x83, 0x3a, 0x1b, 0xc3, 0xc6, 0x0b, 0xe3, 0x70, + 0x68, 0x74, 0xeb, 0xa5, 0xdd, 0x57, 0x00, 0x37, 0x2b, 0x18, 0x3d, 0x82, 0xad, 0x13, 0x73, 0x68, + 0x38, 0xa6, 0x35, 0xec, 0x99, 0x83, 0x19, 0x1d, 0x1b, 0x50, 0x9b, 0x0e, 0x7e, 0x6b, 0xd8, 0x75, + 0x05, 0x6d, 0xc1, 0xc6, 0xb4, 0xb3, 0x73, 0x60, 0x0f, 0x3b, 0xbd, 0x41, 0x7d, 0x11, 0x21, 0xa8, + 0x4e, 0x07, 0x06, 0x66, 0xbd, 0x74, 0x70, 0xf4, 0xfb, 0x65, 0x53, 0x79, 0x7b, 0xd9, 0x54, 0xfe, + 0xba, 0x6c, 0x2a, 0x3f, 0x5e, 0x35, 0x17, 0xde, 0x5e, 0x35, 0x17, 0xfe, 0xbc, 0x6a, 0x2e, 0x7c, + 0xf7, 0x2c, 0x6b, 0x28, 0xf3, 0x5e, 0xe9, 0x01, 0x6d, 0xbd, 0x79, 0xf7, 0x5f, 0xc6, 0x69, 0x59, + 0xbc, 0xb4, 0xfd, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x2c, 0xe6, 0x8e, 0x70, 0x94, 0x08, 0x00, + 0x00, +} + +func (m *MsgInit) 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 *MsgInit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Config != nil { + { + size, err := m.Config.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMultisig(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMultisig(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgInitResponse) 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 *MsgInitResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCreateProposal) 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 *MsgCreateProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Proposal != nil { + { + size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMultisig(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateProposalResponse) 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 *MsgCreateProposalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProposalId != 0 { + i = encodeVarintMultisig(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgVote) 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 *MsgVote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Vote != 0 { + i = encodeVarintMultisig(dAtA, i, uint64(m.Vote)) + i-- + dAtA[i] = 0x10 + } + if m.ProposalId != 0 { + i = encodeVarintMultisig(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgVoteResponse) 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 *MsgVoteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgExecuteProposal) 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 *MsgExecuteProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExecuteProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProposalId != 0 { + i = encodeVarintMultisig(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgExecuteProposalResponse) 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 *MsgExecuteProposalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExecuteProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Responses) > 0 { + for iNdEx := len(m.Responses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Responses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMultisig(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateConfig) 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 *MsgUpdateConfig) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Config != nil { + { + size, err := m.Config.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMultisig(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.UpdateMembers) > 0 { + for iNdEx := len(m.UpdateMembers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UpdateMembers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMultisig(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateConfigResponse) 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 *MsgUpdateConfigResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateConfigResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *Member) 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 *Member) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Member) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Weight != 0 { + i = encodeVarintMultisig(dAtA, i, uint64(m.Weight)) + i-- + dAtA[i] = 0x10 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintMultisig(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Config) 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 *Config) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Config) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.EarlyExecution { + i-- + if m.EarlyExecution { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.Revote { + i-- + if m.Revote { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.VotingPeriod != 0 { + i = encodeVarintMultisig(dAtA, i, uint64(m.VotingPeriod)) + i-- + dAtA[i] = 0x18 + } + if m.Quorum != 0 { + i = encodeVarintMultisig(dAtA, i, uint64(m.Quorum)) + i-- + dAtA[i] = 0x10 + } + if m.Threshold != 0 { + i = encodeVarintMultisig(dAtA, i, uint64(m.Threshold)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Proposal) 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 *Proposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Status != 0 { + i = encodeVarintMultisig(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x28 + } + if m.VotingPeriodEnd != 0 { + i = encodeVarintMultisig(dAtA, i, uint64(m.VotingPeriodEnd)) + i-- + dAtA[i] = 0x20 + } + if len(m.Messages) > 0 { + for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Messages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMultisig(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Summary) > 0 { + i -= len(m.Summary) + copy(dAtA[i:], m.Summary) + i = encodeVarintMultisig(dAtA, i, uint64(len(m.Summary))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintMultisig(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySequence) 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 *QuerySequence) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySequence) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QuerySequenceResponse) 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 *QuerySequenceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySequenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Sequence != 0 { + i = encodeVarintMultisig(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryConfig) 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 *QueryConfig) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryConfigResponse) 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 *QueryConfigResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryConfigResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Config != nil { + { + size, err := m.Config.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMultisig(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMultisig(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryProposal) 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 *QueryProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProposalId != 0 { + i = encodeVarintMultisig(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryProposalResponse) 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 *QueryProposalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Proposal != nil { + { + size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMultisig(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintMultisig(dAtA []byte, offset int, v uint64) int { + offset -= sovMultisig(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgInit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovMultisig(uint64(l)) + } + } + if m.Config != nil { + l = m.Config.Size() + n += 1 + l + sovMultisig(uint64(l)) + } + return n +} + +func (m *MsgInitResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCreateProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Proposal != nil { + l = m.Proposal.Size() + n += 1 + l + sovMultisig(uint64(l)) + } + return n +} + +func (m *MsgCreateProposalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovMultisig(uint64(m.ProposalId)) + } + return n +} + +func (m *MsgVote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovMultisig(uint64(m.ProposalId)) + } + if m.Vote != 0 { + n += 1 + sovMultisig(uint64(m.Vote)) + } + return n +} + +func (m *MsgVoteResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgExecuteProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovMultisig(uint64(m.ProposalId)) + } + return n +} + +func (m *MsgExecuteProposalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Responses) > 0 { + for _, e := range m.Responses { + l = e.Size() + n += 1 + l + sovMultisig(uint64(l)) + } + } + return n +} + +func (m *MsgUpdateConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.UpdateMembers) > 0 { + for _, e := range m.UpdateMembers { + l = e.Size() + n += 1 + l + sovMultisig(uint64(l)) + } + } + if m.Config != nil { + l = m.Config.Size() + n += 1 + l + sovMultisig(uint64(l)) + } + return n +} + +func (m *MsgUpdateConfigResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *Member) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovMultisig(uint64(l)) + } + if m.Weight != 0 { + n += 1 + sovMultisig(uint64(m.Weight)) + } + return n +} + +func (m *Config) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Threshold != 0 { + n += 1 + sovMultisig(uint64(m.Threshold)) + } + if m.Quorum != 0 { + n += 1 + sovMultisig(uint64(m.Quorum)) + } + if m.VotingPeriod != 0 { + n += 1 + sovMultisig(uint64(m.VotingPeriod)) + } + if m.Revote { + n += 2 + } + if m.EarlyExecution { + n += 2 + } + return n +} + +func (m *Proposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovMultisig(uint64(l)) + } + l = len(m.Summary) + if l > 0 { + n += 1 + l + sovMultisig(uint64(l)) + } + if len(m.Messages) > 0 { + for _, e := range m.Messages { + l = e.Size() + n += 1 + l + sovMultisig(uint64(l)) + } + } + if m.VotingPeriodEnd != 0 { + n += 1 + sovMultisig(uint64(m.VotingPeriodEnd)) + } + if m.Status != 0 { + n += 1 + sovMultisig(uint64(m.Status)) + } + return n +} + +func (m *QuerySequence) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QuerySequenceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Sequence != 0 { + n += 1 + sovMultisig(uint64(m.Sequence)) + } + return n +} + +func (m *QueryConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryConfigResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovMultisig(uint64(l)) + } + } + if m.Config != nil { + l = m.Config.Size() + n += 1 + l + sovMultisig(uint64(l)) + } + return n +} + +func (m *QueryProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovMultisig(uint64(m.ProposalId)) + } + return n +} + +func (m *QueryProposalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Proposal != nil { + l = m.Proposal.Size() + n += 1 + l + sovMultisig(uint64(l)) + } + return n +} + +func sovMultisig(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMultisig(x uint64) (n int) { + return sovMultisig(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgInit) 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 ErrIntOverflowMultisig + } + 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: MsgInit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMultisig + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMultisig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, &Member{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMultisig + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMultisig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Config == nil { + m.Config = &Config{} + } + if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInitResponse) 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 ErrIntOverflowMultisig + } + 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: MsgInitResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInitResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateProposal) 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 ErrIntOverflowMultisig + } + 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: MsgCreateProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMultisig + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMultisig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proposal == nil { + m.Proposal = &Proposal{} + } + if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateProposalResponse) 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 ErrIntOverflowMultisig + } + 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: MsgCreateProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + m.ProposalId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgVote) 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 ErrIntOverflowMultisig + } + 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: MsgVote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + m.ProposalId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) + } + m.Vote = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Vote |= VoteOption(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgVoteResponse) 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 ErrIntOverflowMultisig + } + 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: MsgVoteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExecuteProposal) 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 ErrIntOverflowMultisig + } + 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: MsgExecuteProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExecuteProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + m.ProposalId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExecuteProposalResponse) 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 ErrIntOverflowMultisig + } + 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: MsgExecuteProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExecuteProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Responses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMultisig + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMultisig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Responses = append(m.Responses, &any.Any{}) + if err := m.Responses[len(m.Responses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateConfig) 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 ErrIntOverflowMultisig + } + 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: MsgUpdateConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateMembers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMultisig + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMultisig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UpdateMembers = append(m.UpdateMembers, &Member{}) + if err := m.UpdateMembers[len(m.UpdateMembers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMultisig + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMultisig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Config == nil { + m.Config = &Config{} + } + if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateConfigResponse) 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 ErrIntOverflowMultisig + } + 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: MsgUpdateConfigResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateConfigResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Member) 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 ErrIntOverflowMultisig + } + 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: Member: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Member: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + 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 ErrInvalidLengthMultisig + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMultisig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + m.Weight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Weight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Config) 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 ErrIntOverflowMultisig + } + 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: Config: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Config: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) + } + m.Threshold = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Threshold |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Quorum", wireType) + } + m.Quorum = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Quorum |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VotingPeriod", wireType) + } + m.VotingPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VotingPeriod |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Revote", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Revote = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EarlyExecution", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EarlyExecution = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Proposal) 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 ErrIntOverflowMultisig + } + 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: Proposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + 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 ErrInvalidLengthMultisig + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMultisig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Summary", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + 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 ErrInvalidLengthMultisig + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMultisig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Summary = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMultisig + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMultisig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Messages = append(m.Messages, &any.Any{}) + if err := m.Messages[len(m.Messages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VotingPeriodEnd", wireType) + } + m.VotingPeriodEnd = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VotingPeriodEnd |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= ProposalStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySequence) 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 ErrIntOverflowMultisig + } + 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: QuerySequence: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySequence: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySequenceResponse) 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 ErrIntOverflowMultisig + } + 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: QuerySequenceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySequenceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryConfig) 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 ErrIntOverflowMultisig + } + 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: QueryConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryConfigResponse) 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 ErrIntOverflowMultisig + } + 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: QueryConfigResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryConfigResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMultisig + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMultisig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, &Member{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMultisig + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMultisig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Config == nil { + m.Config = &Config{} + } + if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryProposal) 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 ErrIntOverflowMultisig + } + 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: QueryProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + m.ProposalId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryProposalResponse) 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 ErrIntOverflowMultisig + } + 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: QueryProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMultisig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMultisig + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMultisig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proposal == nil { + m.Proposal = &Proposal{} + } + if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMultisig(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMultisig + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMultisig(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, ErrIntOverflowMultisig + } + 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, ErrIntOverflowMultisig + } + 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, ErrIntOverflowMultisig + } + 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, ErrInvalidLengthMultisig + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMultisig + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMultisig + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMultisig = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMultisig = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMultisig = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/accounts/internal/implementation/context.go b/x/accounts/internal/implementation/context.go index 4ab8d2d7cc1c..64ba2820d6cd 100644 --- a/x/accounts/internal/implementation/context.go +++ b/x/accounts/internal/implementation/context.go @@ -70,6 +70,12 @@ func MakeAccountContext( }) } +func SetSender(ctx context.Context, sender []byte) context.Context { + v := getCtx(ctx) + v.sender = sender + return addCtx(v.parentContext, v) +} + // makeAccountStore creates the prefixed store for the account. // It uses the number of the account, this gives constant size // bytes prefixes for the account state. diff --git a/x/accounts/proto/cosmos/accounts/defaults/multisig/v1/multisig.proto b/x/accounts/proto/cosmos/accounts/defaults/multisig/v1/multisig.proto new file mode 100644 index 000000000000..a4ff7840cfa7 --- /dev/null +++ b/x/accounts/proto/cosmos/accounts/defaults/multisig/v1/multisig.proto @@ -0,0 +1,136 @@ +syntax = "proto3"; + +package cosmos.accounts.defaults.multisig.v1; + +import "google/protobuf/any.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "cosmossdk.io/x/accounts/defaults/multisig/v1"; + +// MsgInit is used to initialize a multisig account. +message MsgInit { + repeated Member members = 1; + Config Config = 2; +} + +// MsgInitResponse is the response returned after account initialization. +message MsgInitResponse {} + +message MsgCreateProposal { + Proposal proposal = 1; +} + +message MsgCreateProposalResponse { + uint64 proposal_id = 1; +} + +message MsgVote { + uint64 proposal_id = 1; + VoteOption vote = 2; +} + +message MsgVoteResponse {} + +message MsgExecuteProposal { + uint64 proposal_id = 1; +} + +message MsgExecuteProposalResponse { + repeated google.protobuf.Any responses = 1; +} + +// MsgUpdateConfig is used to change the config or members. +message MsgUpdateConfig { + // only the members that are changing are required, if their weight is 0, they are removed. + repeated Member update_members = 1; + + // not all fields from Config can be changed + Config Config = 2; +} + +message MsgUpdateConfigResponse {} + +message Member { + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + uint64 weight = 2; +} + +// when aggregating on-chain I can only use the address +// off-chain would send a tx directly, won't create a proposal. + +message Config { + int64 threshold = 1; + + int64 quorum = 2; + + // voting_period is the duration in seconds for the voting period. + int64 voting_period = 3; + + // revote defines if members can change their vote. + bool revote = 4; + + // early_execution defines if the multisig can be executed before the voting period ends. + bool early_execution = 5; +} + +message Proposal { + string title = 1; + string summary = 2; + repeated google.protobuf.Any messages = 3; + + // voting_period_end will be set by the account when the proposal is created. + int64 voting_period_end = 4; + + ProposalStatus status = 5; +} + +// QuerySequence is the request for the account sequence. +message QuerySequence {} + +// QuerySequenceResponse returns the sequence of the account. +message QuerySequenceResponse { + // sequence is the current sequence of the account. + uint64 sequence = 1; +} + +message QueryConfig {} + +// QuerySequenceResponse returns the sequence of the account. +message QueryConfigResponse { + repeated Member members = 1; + + Config Config = 2; +} + +message QueryProposal { + uint64 proposal_id = 1; +} + +message QueryProposalResponse { + Proposal proposal = 1; +} + +// ProposalStatus enumerates the valid proposal statuses. +enum ProposalStatus { + // PROPOSAL_STATUS_UNSPECIFIED defines a no-op proposal status. + PROPOSAL_STATUS_UNSPECIFIED = 0; + // PROPOSAL_STATUS_VOTING_PERIOD defines the proposal status during the voting period. + PROPOSAL_STATUS_VOTING_PERIOD = 1; + // PROPOSAL_STATUS_PASSED defines the proposal status when the proposal passed. + PROPOSAL_STATUS_PASSED = 2; + // PROPOSAL_STATUS_REJECTED defines the proposal status when the proposal was rejected. + PROPOSAL_STATUS_REJECTED = 3; +} + +// VoteOption enumerates the valid vote options for a given proposal. +enum VoteOption { + // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + VOTE_OPTION_UNSPECIFIED = 0; + // VOTE_OPTION_YES defines the yes proposal vote option. + VOTE_OPTION_YES = 1; + // VOTE_OPTION_ABSTAIN defines the abstain proposal vote option. + VOTE_OPTION_ABSTAIN = 2; + // VOTE_OPTION_NO defines the no proposal vote option. + VOTE_OPTION_NO = 3; +} diff --git a/x/accounts/testing/counter/counter.go b/x/accounts/testing/counter/counter.go index ec96c0884fb6..028f1b40832c 100644 --- a/x/accounts/testing/counter/counter.go +++ b/x/accounts/testing/counter/counter.go @@ -30,6 +30,8 @@ func NewAccount(d accountstd.Dependencies) (Account, error) { Counter: collections.NewItem(d.SchemaBuilder, CounterPrefix, "counter", collections.Uint64Value), TestStateCodec: collections.NewItem(d.SchemaBuilder, TestStateCodecPrefix, "test_state_codec", codec.CollValue[counterv1.MsgTestDependencies](d.LegacyStateCodec)), addressCodec: d.AddressCodec, + hs: d.Environment.HeaderService, + gs: d.Environment.GasService, }, nil }