From 41c84d61908a1ba42e7d881170bc668b82494fba Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 8 Jan 2024 12:55:37 +0100 Subject: [PATCH] feat(x/gov): multiple choice proposals (#18762) --- api/cosmos/gov/v1/gov.pulsar.go | 1257 ++++++++++--- api/cosmos/gov/v1/query.pulsar.go | 1284 +++++++++++-- api/cosmos/gov/v1/query_grpc.pb.go | 57 +- api/cosmos/gov/v1/tx.pulsar.go | 1624 ++++++++++++++++- api/cosmos/gov/v1/tx_grpc.pb.go | 57 +- docs/architecture/adr-069-gov-improvements.md | 2 +- proto/cosmos/gov/v1/gov.proto | 25 +- proto/cosmos/gov/v1/query.proto | 17 + proto/cosmos/gov/v1/tx.proto | 45 +- x/gov/CHANGELOG.md | 1 + x/gov/README.md | 13 +- x/gov/keeper/deposit.go | 74 +- x/gov/keeper/grpc_query.go | 56 +- x/gov/keeper/grpc_query_test.go | 290 ++- x/gov/keeper/keeper.go | 15 +- x/gov/keeper/keeper_test.go | 2 +- x/gov/keeper/msg_server.go | 39 + x/gov/keeper/msg_server_test.go | 77 + x/gov/keeper/proposal.go | 72 +- x/gov/keeper/proposal_test.go | 14 +- x/gov/keeper/tally.go | 65 +- x/gov/keeper/tally_test.go | 326 ++++ x/gov/keeper/vote.go | 43 +- x/gov/keeper/vote_test.go | 34 +- x/gov/types/keys.go | 1 + x/gov/types/v1/codec.go | 2 + x/gov/types/v1/gov.pb.go | 614 +++++-- x/gov/types/v1/msgs.go | 28 +- x/gov/types/v1/query.pb.go | 509 +++++- x/gov/types/v1/query.pb.gw.go | 101 + x/gov/types/v1/tx.pb.go | 870 +++++++-- x/gov/types/v1/vote.go | 8 +- 32 files changed, 6637 insertions(+), 985 deletions(-) diff --git a/api/cosmos/gov/v1/gov.pulsar.go b/api/cosmos/gov/v1/gov.pulsar.go index 0854c35199d2..0147fb34ade2 100644 --- a/api/cosmos/gov/v1/gov.pulsar.go +++ b/api/cosmos/gov/v1/gov.pulsar.go @@ -2640,6 +2640,682 @@ func (x *fastReflection_Proposal) ProtoMethods() *protoiface.Methods { } } +var ( + md_ProposalVoteOptions protoreflect.MessageDescriptor + fd_ProposalVoteOptions_option_one protoreflect.FieldDescriptor + fd_ProposalVoteOptions_option_two protoreflect.FieldDescriptor + fd_ProposalVoteOptions_option_three protoreflect.FieldDescriptor + fd_ProposalVoteOptions_option_four protoreflect.FieldDescriptor + fd_ProposalVoteOptions_option_spam protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_gov_v1_gov_proto_init() + md_ProposalVoteOptions = File_cosmos_gov_v1_gov_proto.Messages().ByName("ProposalVoteOptions") + fd_ProposalVoteOptions_option_one = md_ProposalVoteOptions.Fields().ByName("option_one") + fd_ProposalVoteOptions_option_two = md_ProposalVoteOptions.Fields().ByName("option_two") + fd_ProposalVoteOptions_option_three = md_ProposalVoteOptions.Fields().ByName("option_three") + fd_ProposalVoteOptions_option_four = md_ProposalVoteOptions.Fields().ByName("option_four") + fd_ProposalVoteOptions_option_spam = md_ProposalVoteOptions.Fields().ByName("option_spam") +} + +var _ protoreflect.Message = (*fastReflection_ProposalVoteOptions)(nil) + +type fastReflection_ProposalVoteOptions ProposalVoteOptions + +func (x *ProposalVoteOptions) ProtoReflect() protoreflect.Message { + return (*fastReflection_ProposalVoteOptions)(x) +} + +func (x *ProposalVoteOptions) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_gov_v1_gov_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_ProposalVoteOptions_messageType fastReflection_ProposalVoteOptions_messageType +var _ protoreflect.MessageType = fastReflection_ProposalVoteOptions_messageType{} + +type fastReflection_ProposalVoteOptions_messageType struct{} + +func (x fastReflection_ProposalVoteOptions_messageType) Zero() protoreflect.Message { + return (*fastReflection_ProposalVoteOptions)(nil) +} +func (x fastReflection_ProposalVoteOptions_messageType) New() protoreflect.Message { + return new(fastReflection_ProposalVoteOptions) +} +func (x fastReflection_ProposalVoteOptions_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ProposalVoteOptions +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ProposalVoteOptions) Descriptor() protoreflect.MessageDescriptor { + return md_ProposalVoteOptions +} + +// 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_ProposalVoteOptions) Type() protoreflect.MessageType { + return _fastReflection_ProposalVoteOptions_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ProposalVoteOptions) New() protoreflect.Message { + return new(fastReflection_ProposalVoteOptions) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ProposalVoteOptions) Interface() protoreflect.ProtoMessage { + return (*ProposalVoteOptions)(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_ProposalVoteOptions) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.OptionOne != "" { + value := protoreflect.ValueOfString(x.OptionOne) + if !f(fd_ProposalVoteOptions_option_one, value) { + return + } + } + if x.OptionTwo != "" { + value := protoreflect.ValueOfString(x.OptionTwo) + if !f(fd_ProposalVoteOptions_option_two, value) { + return + } + } + if x.OptionThree != "" { + value := protoreflect.ValueOfString(x.OptionThree) + if !f(fd_ProposalVoteOptions_option_three, value) { + return + } + } + if x.OptionFour != "" { + value := protoreflect.ValueOfString(x.OptionFour) + if !f(fd_ProposalVoteOptions_option_four, value) { + return + } + } + if x.OptionSpam != "" { + value := protoreflect.ValueOfString(x.OptionSpam) + if !f(fd_ProposalVoteOptions_option_spam, 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_ProposalVoteOptions) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.gov.v1.ProposalVoteOptions.option_one": + return x.OptionOne != "" + case "cosmos.gov.v1.ProposalVoteOptions.option_two": + return x.OptionTwo != "" + case "cosmos.gov.v1.ProposalVoteOptions.option_three": + return x.OptionThree != "" + case "cosmos.gov.v1.ProposalVoteOptions.option_four": + return x.OptionFour != "" + case "cosmos.gov.v1.ProposalVoteOptions.option_spam": + return x.OptionSpam != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.ProposalVoteOptions")) + } + panic(fmt.Errorf("message cosmos.gov.v1.ProposalVoteOptions 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_ProposalVoteOptions) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.gov.v1.ProposalVoteOptions.option_one": + x.OptionOne = "" + case "cosmos.gov.v1.ProposalVoteOptions.option_two": + x.OptionTwo = "" + case "cosmos.gov.v1.ProposalVoteOptions.option_three": + x.OptionThree = "" + case "cosmos.gov.v1.ProposalVoteOptions.option_four": + x.OptionFour = "" + case "cosmos.gov.v1.ProposalVoteOptions.option_spam": + x.OptionSpam = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.ProposalVoteOptions")) + } + panic(fmt.Errorf("message cosmos.gov.v1.ProposalVoteOptions 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_ProposalVoteOptions) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.gov.v1.ProposalVoteOptions.option_one": + value := x.OptionOne + return protoreflect.ValueOfString(value) + case "cosmos.gov.v1.ProposalVoteOptions.option_two": + value := x.OptionTwo + return protoreflect.ValueOfString(value) + case "cosmos.gov.v1.ProposalVoteOptions.option_three": + value := x.OptionThree + return protoreflect.ValueOfString(value) + case "cosmos.gov.v1.ProposalVoteOptions.option_four": + value := x.OptionFour + return protoreflect.ValueOfString(value) + case "cosmos.gov.v1.ProposalVoteOptions.option_spam": + value := x.OptionSpam + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.ProposalVoteOptions")) + } + panic(fmt.Errorf("message cosmos.gov.v1.ProposalVoteOptions 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_ProposalVoteOptions) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.gov.v1.ProposalVoteOptions.option_one": + x.OptionOne = value.Interface().(string) + case "cosmos.gov.v1.ProposalVoteOptions.option_two": + x.OptionTwo = value.Interface().(string) + case "cosmos.gov.v1.ProposalVoteOptions.option_three": + x.OptionThree = value.Interface().(string) + case "cosmos.gov.v1.ProposalVoteOptions.option_four": + x.OptionFour = value.Interface().(string) + case "cosmos.gov.v1.ProposalVoteOptions.option_spam": + x.OptionSpam = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.ProposalVoteOptions")) + } + panic(fmt.Errorf("message cosmos.gov.v1.ProposalVoteOptions 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_ProposalVoteOptions) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.ProposalVoteOptions.option_one": + panic(fmt.Errorf("field option_one of message cosmos.gov.v1.ProposalVoteOptions is not mutable")) + case "cosmos.gov.v1.ProposalVoteOptions.option_two": + panic(fmt.Errorf("field option_two of message cosmos.gov.v1.ProposalVoteOptions is not mutable")) + case "cosmos.gov.v1.ProposalVoteOptions.option_three": + panic(fmt.Errorf("field option_three of message cosmos.gov.v1.ProposalVoteOptions is not mutable")) + case "cosmos.gov.v1.ProposalVoteOptions.option_four": + panic(fmt.Errorf("field option_four of message cosmos.gov.v1.ProposalVoteOptions is not mutable")) + case "cosmos.gov.v1.ProposalVoteOptions.option_spam": + panic(fmt.Errorf("field option_spam of message cosmos.gov.v1.ProposalVoteOptions is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.ProposalVoteOptions")) + } + panic(fmt.Errorf("message cosmos.gov.v1.ProposalVoteOptions 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_ProposalVoteOptions) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.ProposalVoteOptions.option_one": + return protoreflect.ValueOfString("") + case "cosmos.gov.v1.ProposalVoteOptions.option_two": + return protoreflect.ValueOfString("") + case "cosmos.gov.v1.ProposalVoteOptions.option_three": + return protoreflect.ValueOfString("") + case "cosmos.gov.v1.ProposalVoteOptions.option_four": + return protoreflect.ValueOfString("") + case "cosmos.gov.v1.ProposalVoteOptions.option_spam": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.ProposalVoteOptions")) + } + panic(fmt.Errorf("message cosmos.gov.v1.ProposalVoteOptions 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_ProposalVoteOptions) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.ProposalVoteOptions", 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_ProposalVoteOptions) 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_ProposalVoteOptions) 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_ProposalVoteOptions) 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_ProposalVoteOptions) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ProposalVoteOptions) + 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.OptionOne) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OptionTwo) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OptionThree) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OptionFour) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OptionSpam) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ProposalVoteOptions) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.OptionSpam) > 0 { + i -= len(x.OptionSpam) + copy(dAtA[i:], x.OptionSpam) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OptionSpam))) + i-- + dAtA[i] = 0x2a + } + if len(x.OptionFour) > 0 { + i -= len(x.OptionFour) + copy(dAtA[i:], x.OptionFour) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OptionFour))) + i-- + dAtA[i] = 0x22 + } + if len(x.OptionThree) > 0 { + i -= len(x.OptionThree) + copy(dAtA[i:], x.OptionThree) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OptionThree))) + i-- + dAtA[i] = 0x1a + } + if len(x.OptionTwo) > 0 { + i -= len(x.OptionTwo) + copy(dAtA[i:], x.OptionTwo) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OptionTwo))) + i-- + dAtA[i] = 0x12 + } + if len(x.OptionOne) > 0 { + i -= len(x.OptionOne) + copy(dAtA[i:], x.OptionOne) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OptionOne))) + 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().(*ProposalVoteOptions) + 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: ProposalVoteOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ProposalVoteOptions: 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 OptionOne", 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.OptionOne = 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 OptionTwo", 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.OptionTwo = 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 OptionThree", 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.OptionThree = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OptionFour", 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.OptionFour = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OptionSpam", 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.OptionSpam = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var ( md_TallyResult protoreflect.MessageDescriptor fd_TallyResult_yes_count protoreflect.FieldDescriptor @@ -2668,7 +3344,7 @@ func (x *TallyResult) ProtoReflect() protoreflect.Message { } func (x *TallyResult) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[3] + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3393,7 +4069,7 @@ func (x *Vote) ProtoReflect() protoreflect.Message { } func (x *Vote) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[4] + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4059,7 +4735,7 @@ func (x *DepositParams) ProtoReflect() protoreflect.Message { } func (x *DepositParams) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[5] + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4579,7 +5255,7 @@ func (x *VotingParams) ProtoReflect() protoreflect.Message { } func (x *VotingParams) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[6] + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5018,7 +5694,7 @@ func (x *TallyParams) ProtoReflect() protoreflect.Message { } func (x *TallyParams) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[7] + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5746,7 +6422,7 @@ func (x *Params) ProtoReflect() protoreflect.Message { } func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[8] + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7730,7 +8406,7 @@ type Proposal struct { FailedReason string `protobuf:"bytes,15,opt,name=failed_reason,json=failedReason,proto3" json:"failed_reason,omitempty"` // proposal_type defines the type of the proposal // - // Since: cosmos-sdk 0.51 + // Since: x/gov v1.0.0 ProposalType ProposalType `protobuf:"varint,16,opt,name=proposal_type,json=proposalType,proto3,enum=cosmos.gov.v1.ProposalType" json:"proposal_type,omitempty"` } @@ -7867,6 +8543,82 @@ func (x *Proposal) GetProposalType() ProposalType { return ProposalType_PROPOSAL_TYPE_UNSPECIFIED } +// ProposalVoteOptions defines the stringified vote options for proposals. +// This allows to support multiple choice options for a given proposal. +// +// Since: x/gov v1.0.0 +type ProposalVoteOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // option_one is the first option of the proposal + OptionOne string `protobuf:"bytes,1,opt,name=option_one,json=optionOne,proto3" json:"option_one,omitempty"` + // option_two is the second option of the proposal + OptionTwo string `protobuf:"bytes,2,opt,name=option_two,json=optionTwo,proto3" json:"option_two,omitempty"` + // option_three is the third option of the proposal + OptionThree string `protobuf:"bytes,3,opt,name=option_three,json=optionThree,proto3" json:"option_three,omitempty"` + // option_four is the fourth option of the proposal + OptionFour string `protobuf:"bytes,4,opt,name=option_four,json=optionFour,proto3" json:"option_four,omitempty"` + // option_spam is always present for all proposals. + OptionSpam string `protobuf:"bytes,5,opt,name=option_spam,json=optionSpam,proto3" json:"option_spam,omitempty"` +} + +func (x *ProposalVoteOptions) Reset() { + *x = ProposalVoteOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProposalVoteOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProposalVoteOptions) ProtoMessage() {} + +// Deprecated: Use ProposalVoteOptions.ProtoReflect.Descriptor instead. +func (*ProposalVoteOptions) Descriptor() ([]byte, []int) { + return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{3} +} + +func (x *ProposalVoteOptions) GetOptionOne() string { + if x != nil { + return x.OptionOne + } + return "" +} + +func (x *ProposalVoteOptions) GetOptionTwo() string { + if x != nil { + return x.OptionTwo + } + return "" +} + +func (x *ProposalVoteOptions) GetOptionThree() string { + if x != nil { + return x.OptionThree + } + return "" +} + +func (x *ProposalVoteOptions) GetOptionFour() string { + if x != nil { + return x.OptionFour + } + return "" +} + +func (x *ProposalVoteOptions) GetOptionSpam() string { + if x != nil { + return x.OptionSpam + } + return "" +} + // TallyResult defines a standard tally for a governance proposal. type TallyResult struct { state protoimpl.MessageState @@ -7888,7 +8640,7 @@ type TallyResult struct { func (x *TallyResult) Reset() { *x = TallyResult{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[3] + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7902,7 +8654,7 @@ func (*TallyResult) ProtoMessage() {} // Deprecated: Use TallyResult.ProtoReflect.Descriptor instead. func (*TallyResult) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{3} + return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{4} } func (x *TallyResult) GetYesCount() string { @@ -7961,7 +8713,7 @@ type Vote struct { func (x *Vote) Reset() { *x = Vote{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[4] + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7975,7 +8727,7 @@ func (*Vote) ProtoMessage() {} // Deprecated: Use Vote.ProtoReflect.Descriptor instead. func (*Vote) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{4} + return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{5} } func (x *Vote) GetProposalId() uint64 { @@ -8024,7 +8776,7 @@ type DepositParams struct { func (x *DepositParams) Reset() { *x = DepositParams{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[5] + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8038,7 +8790,7 @@ func (*DepositParams) ProtoMessage() {} // Deprecated: Use DepositParams.ProtoReflect.Descriptor instead. func (*DepositParams) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{5} + return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{6} } func (x *DepositParams) GetMinDeposit() []*v1beta1.Coin { @@ -8070,7 +8822,7 @@ type VotingParams struct { func (x *VotingParams) Reset() { *x = VotingParams{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[6] + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8084,7 +8836,7 @@ func (*VotingParams) ProtoMessage() {} // Deprecated: Use VotingParams.ProtoReflect.Descriptor instead. func (*VotingParams) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{6} + return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{7} } func (x *VotingParams) GetVotingPeriod() *durationpb.Duration { @@ -8115,7 +8867,7 @@ type TallyParams struct { func (x *TallyParams) Reset() { *x = TallyParams{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[7] + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8129,7 +8881,7 @@ func (*TallyParams) ProtoMessage() {} // Deprecated: Use TallyParams.ProtoReflect.Descriptor instead. func (*TallyParams) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{7} + return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{8} } func (x *TallyParams) GetQuorum() string { @@ -8219,6 +8971,8 @@ type Params struct { // If the proposal is cancelled before the max cancel period, the deposit will be returned/burn to the // depositors, according to the proposal_cancel_ratio and proposal_cancel_dest parameters. // After the max cancel period, the proposal cannot be cancelled anymore. + // + // Since: x/gov v1.0.0 ProposalCancelMaxPeriod string `protobuf:"bytes,17,opt,name=proposal_cancel_max_period,json=proposalCancelMaxPeriod,proto3" json:"proposal_cancel_max_period,omitempty"` // optimistic_authorized_addresses is an optional governance parameter that limits the authorized accounts than can // submit optimistic proposals @@ -8235,7 +8989,7 @@ type Params struct { func (x *Params) Reset() { *x = Params{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[8] + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8249,7 +9003,7 @@ func (*Params) ProtoMessage() {} // Deprecated: Use Params.ProtoReflect.Descriptor instead. func (*Params) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{8} + return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{9} } func (x *Params) GetMinDeposit() []*v1beta1.Coin { @@ -8472,196 +9226,208 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ 0x73, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22, 0x86, 0x02, 0x0a, 0x0b, 0x54, 0x61, - 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2b, 0x0a, 0x09, 0x79, 0x65, 0x73, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, - 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x08, 0x79, 0x65, - 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x0d, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, - 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, - 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0c, 0x61, - 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x08, 0x6e, - 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, - 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x07, 0x6e, - 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x12, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, - 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22, 0xb8, 0x01, 0x0a, 0x13, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x6e, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x6e, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x77, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x77, 0x6f, 0x12, + 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, + 0x65, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x75, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, + 0x6f, 0x75, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, + 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x70, 0x61, 0x6d, 0x22, 0x86, 0x02, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2b, 0x0a, 0x09, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x08, 0x79, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x33, 0x0a, 0x0d, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0c, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, + 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x07, 0x6e, 0x6f, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x3b, 0x0a, 0x12, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, + 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0f, 0x6e, + 0x6f, 0x57, 0x69, 0x74, 0x68, 0x56, 0x65, 0x74, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2d, + 0x0a, 0x0a, 0x73, 0x70, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, - 0x6e, 0x74, 0x52, 0x0f, 0x6e, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x56, 0x65, 0x74, 0x6f, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x73, 0x70, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x09, 0x73, 0x70, 0x61, 0x6d, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0xb6, 0x01, 0x0a, 0x04, 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, 0x2e, 0x0a, 0x05, - 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 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, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xdd, 0x01, 0x0a, 0x0d, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x59, 0x0a, - 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x1d, 0xc8, - 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x15, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0a, 0x6d, 0x69, - 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x6d, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x24, 0xea, 0xde, 0x1f, 0x1c, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, - 0x79, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x58, 0x0a, 0x0c, 0x56, - 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x76, - 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, - 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2c, 0x0a, - 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x6e, 0x74, 0x52, 0x09, 0x73, 0x70, 0x61, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb6, 0x01, + 0x0a, 0x04, 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, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, + 0x18, 0x02, 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, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, + 0x64, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xdd, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x59, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, + 0x1f, 0x15, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2c, 0x6f, 0x6d, + 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x12, 0x6d, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x24, 0xea, 0xde, 0x1f, 0x1c, + 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, + 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x58, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, + 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, + 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x3a, 0x02, 0x18, 0x01, + 0x22, 0x9e, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, - 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x76, - 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, + 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, + 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, + 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, + 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x3a, 0x02, 0x18, + 0x01, 0x22, 0x92, 0x0a, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x45, 0x0a, 0x0b, + 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, + 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x12, 0x4d, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, + 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, + 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, + 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, + 0x12, 0x2c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, - 0x6c, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x92, 0x0a, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x6d, 0x69, - 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x4d, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, - 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, - 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x26, 0x0a, - 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, - 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, - 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, - 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, - 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x49, 0x0a, 0x19, 0x6d, 0x69, - 0x6e, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, - 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x16, 0x6d, - 0x69, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x42, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x44, 0x65, 0x63, 0x52, 0x13, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x4a, 0x0a, 0x14, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x64, 0x65, 0x73, - 0x74, 0x18, 0x09, 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, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x43, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x44, 0x65, 0x73, 0x74, 0x12, 0x57, 0x0a, 0x17, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, - 0x65, 0x64, 0x5f, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x15, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, - 0x65, 0x64, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x3f, - 0x0a, 0x13, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x12, 0x65, 0x78, 0x70, - 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, - 0x58, 0x0a, 0x15, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x69, 0x6e, - 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x13, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x4d, - 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x62, 0x75, 0x72, - 0x6e, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0e, 0x62, 0x75, 0x72, 0x6e, 0x56, 0x6f, 0x74, 0x65, 0x51, 0x75, 0x6f, - 0x72, 0x75, 0x6d, 0x12, 0x41, 0x0a, 0x1d, 0x62, 0x75, 0x72, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x65, - 0x76, 0x6f, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x62, 0x75, 0x72, 0x6e, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, - 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x75, 0x72, 0x6e, 0x5f, 0x76, - 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, - 0x62, 0x75, 0x72, 0x6e, 0x56, 0x6f, 0x74, 0x65, 0x56, 0x65, 0x74, 0x6f, 0x12, 0x3a, 0x0a, 0x11, - 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0f, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x4b, 0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x6d, 0x61, 0x78, 0x5f, - 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, - 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x17, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x61, 0x78, 0x50, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x60, 0x0a, 0x1f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, - 0x74, 0x69, 0x63, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x12, 0x20, 0x03, 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, 0x1d, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, - 0x73, 0x74, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x1d, 0x6f, 0x70, 0x74, 0x69, 0x6d, - 0x69, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x74, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1b, - 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2a, 0xa7, 0x01, 0x0a, 0x0c, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, - 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, - 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, - 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, - 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x50, 0x4c, - 0x45, 0x5f, 0x43, 0x48, 0x4f, 0x49, 0x43, 0x45, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, - 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, - 0x4d, 0x49, 0x53, 0x54, 0x49, 0x43, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x52, 0x4f, 0x50, - 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x50, 0x45, 0x44, 0x49, - 0x54, 0x45, 0x44, 0x10, 0x04, 0x2a, 0xfa, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, - 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x56, - 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x57, 0x4f, 0x10, 0x02, - 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x4f, 0x54, - 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x48, 0x52, 0x45, 0x45, 0x10, 0x03, - 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x4e, 0x4f, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x55, 0x52, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, - 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, - 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x4f, 0x54, 0x45, - 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x50, 0x41, 0x4d, 0x10, 0x05, 0x1a, 0x02, - 0x10, 0x01, 0x2a, 0xce, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, - 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, - 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, - 0x54, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, - 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, - 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, - 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, - 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, - 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, - 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, - 0x44, 0x10, 0x05, 0x42, 0x99, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, - 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, - 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, + 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x49, 0x0a, 0x19, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x16, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, + 0x12, 0x42, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, + 0x13, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, + 0x61, 0x74, 0x69, 0x6f, 0x12, 0x4a, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x18, 0x09, 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, 0x12, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, + 0x12, 0x57, 0x0a, 0x17, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x6f, + 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, + 0x1f, 0x01, 0x52, 0x15, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, + 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x78, 0x70, + 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x12, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, + 0x64, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x58, 0x0a, 0x15, 0x65, 0x78, + 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x13, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x4d, 0x69, 0x6e, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x62, 0x75, 0x72, 0x6e, 0x5f, 0x76, 0x6f, 0x74, + 0x65, 0x5f, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, + 0x62, 0x75, 0x72, 0x6e, 0x56, 0x6f, 0x74, 0x65, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x41, + 0x0a, 0x1d, 0x62, 0x75, 0x72, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x62, 0x75, 0x72, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, + 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x75, 0x72, 0x6e, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x76, + 0x65, 0x74, 0x6f, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x62, 0x75, 0x72, 0x6e, 0x56, + 0x6f, 0x74, 0x65, 0x56, 0x65, 0x74, 0x6f, 0x12, 0x3a, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x5f, 0x64, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0x52, 0x0f, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x61, + 0x74, 0x69, 0x6f, 0x12, 0x4b, 0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, + 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x17, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x61, 0x78, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x12, 0x60, 0x0a, 0x1f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x73, 0x18, 0x12, 0x20, 0x03, 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, 0x1d, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x65, 0x73, 0x12, 0x52, 0x0a, 0x1d, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, + 0x5f, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1b, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x54, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2a, 0xa7, 0x01, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, 0x4f, + 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, + 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, + 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x4f, + 0x49, 0x43, 0x45, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, + 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4d, 0x49, 0x53, 0x54, 0x49, + 0x43, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x50, 0x45, 0x44, 0x49, 0x54, 0x45, 0x44, 0x10, 0x04, + 0x2a, 0xfa, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, + 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x4e, 0x45, 0x10, + 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, + 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x57, 0x4f, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x56, + 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, + 0x49, 0x4e, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x48, 0x52, 0x45, 0x45, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x56, + 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x12, + 0x14, 0x0a, 0x10, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, + 0x4f, 0x55, 0x52, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, + 0x4f, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x53, 0x50, 0x41, 0x4d, 0x10, 0x05, 0x1a, 0x02, 0x10, 0x01, 0x2a, 0xce, 0x01, + 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, 0x50, 0x45, 0x52, + 0x49, 0x4f, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, + 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x49, 0x4e, 0x47, 0x5f, + 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, + 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x53, 0x53, + 0x45, 0x44, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, + 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x42, 0x99, + 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, + 0x76, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, + 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -8677,7 +9443,7 @@ func file_cosmos_gov_v1_gov_proto_rawDescGZIP() []byte { } var file_cosmos_gov_v1_gov_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_cosmos_gov_v1_gov_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_cosmos_gov_v1_gov_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_cosmos_gov_v1_gov_proto_goTypes = []interface{}{ (ProposalType)(0), // 0: cosmos.gov.v1.ProposalType (VoteOption)(0), // 1: cosmos.gov.v1.VoteOption @@ -8685,38 +9451,39 @@ var file_cosmos_gov_v1_gov_proto_goTypes = []interface{}{ (*WeightedVoteOption)(nil), // 3: cosmos.gov.v1.WeightedVoteOption (*Deposit)(nil), // 4: cosmos.gov.v1.Deposit (*Proposal)(nil), // 5: cosmos.gov.v1.Proposal - (*TallyResult)(nil), // 6: cosmos.gov.v1.TallyResult - (*Vote)(nil), // 7: cosmos.gov.v1.Vote - (*DepositParams)(nil), // 8: cosmos.gov.v1.DepositParams - (*VotingParams)(nil), // 9: cosmos.gov.v1.VotingParams - (*TallyParams)(nil), // 10: cosmos.gov.v1.TallyParams - (*Params)(nil), // 11: cosmos.gov.v1.Params - (*v1beta1.Coin)(nil), // 12: cosmos.base.v1beta1.Coin - (*anypb.Any)(nil), // 13: google.protobuf.Any - (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 15: google.protobuf.Duration + (*ProposalVoteOptions)(nil), // 6: cosmos.gov.v1.ProposalVoteOptions + (*TallyResult)(nil), // 7: cosmos.gov.v1.TallyResult + (*Vote)(nil), // 8: cosmos.gov.v1.Vote + (*DepositParams)(nil), // 9: cosmos.gov.v1.DepositParams + (*VotingParams)(nil), // 10: cosmos.gov.v1.VotingParams + (*TallyParams)(nil), // 11: cosmos.gov.v1.TallyParams + (*Params)(nil), // 12: cosmos.gov.v1.Params + (*v1beta1.Coin)(nil), // 13: cosmos.base.v1beta1.Coin + (*anypb.Any)(nil), // 14: google.protobuf.Any + (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 16: google.protobuf.Duration } var file_cosmos_gov_v1_gov_proto_depIdxs = []int32{ 1, // 0: cosmos.gov.v1.WeightedVoteOption.option:type_name -> cosmos.gov.v1.VoteOption - 12, // 1: cosmos.gov.v1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin - 13, // 2: cosmos.gov.v1.Proposal.messages:type_name -> google.protobuf.Any + 13, // 1: cosmos.gov.v1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin + 14, // 2: cosmos.gov.v1.Proposal.messages:type_name -> google.protobuf.Any 2, // 3: cosmos.gov.v1.Proposal.status:type_name -> cosmos.gov.v1.ProposalStatus - 6, // 4: cosmos.gov.v1.Proposal.final_tally_result:type_name -> cosmos.gov.v1.TallyResult - 14, // 5: cosmos.gov.v1.Proposal.submit_time:type_name -> google.protobuf.Timestamp - 14, // 6: cosmos.gov.v1.Proposal.deposit_end_time:type_name -> google.protobuf.Timestamp - 12, // 7: cosmos.gov.v1.Proposal.total_deposit:type_name -> cosmos.base.v1beta1.Coin - 14, // 8: cosmos.gov.v1.Proposal.voting_start_time:type_name -> google.protobuf.Timestamp - 14, // 9: cosmos.gov.v1.Proposal.voting_end_time:type_name -> google.protobuf.Timestamp + 7, // 4: cosmos.gov.v1.Proposal.final_tally_result:type_name -> cosmos.gov.v1.TallyResult + 15, // 5: cosmos.gov.v1.Proposal.submit_time:type_name -> google.protobuf.Timestamp + 15, // 6: cosmos.gov.v1.Proposal.deposit_end_time:type_name -> google.protobuf.Timestamp + 13, // 7: cosmos.gov.v1.Proposal.total_deposit:type_name -> cosmos.base.v1beta1.Coin + 15, // 8: cosmos.gov.v1.Proposal.voting_start_time:type_name -> google.protobuf.Timestamp + 15, // 9: cosmos.gov.v1.Proposal.voting_end_time:type_name -> google.protobuf.Timestamp 0, // 10: cosmos.gov.v1.Proposal.proposal_type:type_name -> cosmos.gov.v1.ProposalType 3, // 11: cosmos.gov.v1.Vote.options:type_name -> cosmos.gov.v1.WeightedVoteOption - 12, // 12: cosmos.gov.v1.DepositParams.min_deposit:type_name -> cosmos.base.v1beta1.Coin - 15, // 13: cosmos.gov.v1.DepositParams.max_deposit_period:type_name -> google.protobuf.Duration - 15, // 14: cosmos.gov.v1.VotingParams.voting_period:type_name -> google.protobuf.Duration - 12, // 15: cosmos.gov.v1.Params.min_deposit:type_name -> cosmos.base.v1beta1.Coin - 15, // 16: cosmos.gov.v1.Params.max_deposit_period:type_name -> google.protobuf.Duration - 15, // 17: cosmos.gov.v1.Params.voting_period:type_name -> google.protobuf.Duration - 15, // 18: cosmos.gov.v1.Params.expedited_voting_period:type_name -> google.protobuf.Duration - 12, // 19: cosmos.gov.v1.Params.expedited_min_deposit:type_name -> cosmos.base.v1beta1.Coin + 13, // 12: cosmos.gov.v1.DepositParams.min_deposit:type_name -> cosmos.base.v1beta1.Coin + 16, // 13: cosmos.gov.v1.DepositParams.max_deposit_period:type_name -> google.protobuf.Duration + 16, // 14: cosmos.gov.v1.VotingParams.voting_period:type_name -> google.protobuf.Duration + 13, // 15: cosmos.gov.v1.Params.min_deposit:type_name -> cosmos.base.v1beta1.Coin + 16, // 16: cosmos.gov.v1.Params.max_deposit_period:type_name -> google.protobuf.Duration + 16, // 17: cosmos.gov.v1.Params.voting_period:type_name -> google.protobuf.Duration + 16, // 18: cosmos.gov.v1.Params.expedited_voting_period:type_name -> google.protobuf.Duration + 13, // 19: cosmos.gov.v1.Params.expedited_min_deposit:type_name -> cosmos.base.v1beta1.Coin 20, // [20:20] is the sub-list for method output_type 20, // [20:20] is the sub-list for method input_type 20, // [20:20] is the sub-list for extension type_name @@ -8767,7 +9534,7 @@ func file_cosmos_gov_v1_gov_proto_init() { } } file_cosmos_gov_v1_gov_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TallyResult); i { + switch v := v.(*ProposalVoteOptions); i { case 0: return &v.state case 1: @@ -8779,7 +9546,7 @@ func file_cosmos_gov_v1_gov_proto_init() { } } file_cosmos_gov_v1_gov_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Vote); i { + switch v := v.(*TallyResult); i { case 0: return &v.state case 1: @@ -8791,7 +9558,7 @@ func file_cosmos_gov_v1_gov_proto_init() { } } file_cosmos_gov_v1_gov_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DepositParams); i { + switch v := v.(*Vote); i { case 0: return &v.state case 1: @@ -8803,7 +9570,7 @@ func file_cosmos_gov_v1_gov_proto_init() { } } file_cosmos_gov_v1_gov_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VotingParams); i { + switch v := v.(*DepositParams); i { case 0: return &v.state case 1: @@ -8815,7 +9582,7 @@ func file_cosmos_gov_v1_gov_proto_init() { } } file_cosmos_gov_v1_gov_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TallyParams); i { + switch v := v.(*VotingParams); i { case 0: return &v.state case 1: @@ -8827,6 +9594,18 @@ func file_cosmos_gov_v1_gov_proto_init() { } } file_cosmos_gov_v1_gov_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TallyParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_gov_v1_gov_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Params); i { case 0: return &v.state @@ -8845,7 +9624,7 @@ func file_cosmos_gov_v1_gov_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_gov_v1_gov_proto_rawDesc, NumEnums: 3, - NumMessages: 9, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, diff --git a/api/cosmos/gov/v1/query.pulsar.go b/api/cosmos/gov/v1/query.pulsar.go index dbf8a2df0028..1ba87ca34953 100644 --- a/api/cosmos/gov/v1/query.pulsar.go +++ b/api/cosmos/gov/v1/query.pulsar.go @@ -8663,6 +8663,845 @@ func (x *fastReflection_QueryTallyResultResponse) ProtoMethods() *protoiface.Met } } +var ( + md_QueryProposalVoteOptionsRequest protoreflect.MessageDescriptor + fd_QueryProposalVoteOptionsRequest_proposal_id protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_gov_v1_query_proto_init() + md_QueryProposalVoteOptionsRequest = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryProposalVoteOptionsRequest") + fd_QueryProposalVoteOptionsRequest_proposal_id = md_QueryProposalVoteOptionsRequest.Fields().ByName("proposal_id") +} + +var _ protoreflect.Message = (*fastReflection_QueryProposalVoteOptionsRequest)(nil) + +type fastReflection_QueryProposalVoteOptionsRequest QueryProposalVoteOptionsRequest + +func (x *QueryProposalVoteOptionsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryProposalVoteOptionsRequest)(x) +} + +func (x *QueryProposalVoteOptionsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_gov_v1_query_proto_msgTypes[18] + 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_QueryProposalVoteOptionsRequest_messageType fastReflection_QueryProposalVoteOptionsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryProposalVoteOptionsRequest_messageType{} + +type fastReflection_QueryProposalVoteOptionsRequest_messageType struct{} + +func (x fastReflection_QueryProposalVoteOptionsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryProposalVoteOptionsRequest)(nil) +} +func (x fastReflection_QueryProposalVoteOptionsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryProposalVoteOptionsRequest) +} +func (x fastReflection_QueryProposalVoteOptionsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryProposalVoteOptionsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryProposalVoteOptionsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryProposalVoteOptionsRequest +} + +// 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_QueryProposalVoteOptionsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryProposalVoteOptionsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryProposalVoteOptionsRequest) New() protoreflect.Message { + return new(fastReflection_QueryProposalVoteOptionsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryProposalVoteOptionsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryProposalVoteOptionsRequest)(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_QueryProposalVoteOptionsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ProposalId != uint64(0) { + value := protoreflect.ValueOfUint64(x.ProposalId) + if !f(fd_QueryProposalVoteOptionsRequest_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_QueryProposalVoteOptionsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.gov.v1.QueryProposalVoteOptionsRequest.proposal_id": + return x.ProposalId != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalVoteOptionsRequest")) + } + panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalVoteOptionsRequest 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_QueryProposalVoteOptionsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.gov.v1.QueryProposalVoteOptionsRequest.proposal_id": + x.ProposalId = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalVoteOptionsRequest")) + } + panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalVoteOptionsRequest 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_QueryProposalVoteOptionsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.gov.v1.QueryProposalVoteOptionsRequest.proposal_id": + value := x.ProposalId + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalVoteOptionsRequest")) + } + panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalVoteOptionsRequest 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_QueryProposalVoteOptionsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.gov.v1.QueryProposalVoteOptionsRequest.proposal_id": + x.ProposalId = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalVoteOptionsRequest")) + } + panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalVoteOptionsRequest 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_QueryProposalVoteOptionsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.QueryProposalVoteOptionsRequest.proposal_id": + panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1.QueryProposalVoteOptionsRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalVoteOptionsRequest")) + } + panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalVoteOptionsRequest 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_QueryProposalVoteOptionsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.QueryProposalVoteOptionsRequest.proposal_id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalVoteOptionsRequest")) + } + panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalVoteOptionsRequest 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_QueryProposalVoteOptionsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryProposalVoteOptionsRequest", 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_QueryProposalVoteOptionsRequest) 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_QueryProposalVoteOptionsRequest) 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_QueryProposalVoteOptionsRequest) 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_QueryProposalVoteOptionsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryProposalVoteOptionsRequest) + 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().(*QueryProposalVoteOptionsRequest) + 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().(*QueryProposalVoteOptionsRequest) + 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: QueryProposalVoteOptionsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProposalVoteOptionsRequest: 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_QueryProposalVoteOptionsResponse protoreflect.MessageDescriptor + fd_QueryProposalVoteOptionsResponse_vote_options protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_gov_v1_query_proto_init() + md_QueryProposalVoteOptionsResponse = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryProposalVoteOptionsResponse") + fd_QueryProposalVoteOptionsResponse_vote_options = md_QueryProposalVoteOptionsResponse.Fields().ByName("vote_options") +} + +var _ protoreflect.Message = (*fastReflection_QueryProposalVoteOptionsResponse)(nil) + +type fastReflection_QueryProposalVoteOptionsResponse QueryProposalVoteOptionsResponse + +func (x *QueryProposalVoteOptionsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryProposalVoteOptionsResponse)(x) +} + +func (x *QueryProposalVoteOptionsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_gov_v1_query_proto_msgTypes[19] + 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_QueryProposalVoteOptionsResponse_messageType fastReflection_QueryProposalVoteOptionsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryProposalVoteOptionsResponse_messageType{} + +type fastReflection_QueryProposalVoteOptionsResponse_messageType struct{} + +func (x fastReflection_QueryProposalVoteOptionsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryProposalVoteOptionsResponse)(nil) +} +func (x fastReflection_QueryProposalVoteOptionsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryProposalVoteOptionsResponse) +} +func (x fastReflection_QueryProposalVoteOptionsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryProposalVoteOptionsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryProposalVoteOptionsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryProposalVoteOptionsResponse +} + +// 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_QueryProposalVoteOptionsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryProposalVoteOptionsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryProposalVoteOptionsResponse) New() protoreflect.Message { + return new(fastReflection_QueryProposalVoteOptionsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryProposalVoteOptionsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryProposalVoteOptionsResponse)(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_QueryProposalVoteOptionsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.VoteOptions != nil { + value := protoreflect.ValueOfMessage(x.VoteOptions.ProtoReflect()) + if !f(fd_QueryProposalVoteOptionsResponse_vote_options, 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_QueryProposalVoteOptionsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.gov.v1.QueryProposalVoteOptionsResponse.vote_options": + return x.VoteOptions != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalVoteOptionsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalVoteOptionsResponse 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_QueryProposalVoteOptionsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.gov.v1.QueryProposalVoteOptionsResponse.vote_options": + x.VoteOptions = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalVoteOptionsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalVoteOptionsResponse 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_QueryProposalVoteOptionsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.gov.v1.QueryProposalVoteOptionsResponse.vote_options": + value := x.VoteOptions + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalVoteOptionsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalVoteOptionsResponse 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_QueryProposalVoteOptionsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.gov.v1.QueryProposalVoteOptionsResponse.vote_options": + x.VoteOptions = value.Message().Interface().(*ProposalVoteOptions) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalVoteOptionsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalVoteOptionsResponse 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_QueryProposalVoteOptionsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.QueryProposalVoteOptionsResponse.vote_options": + if x.VoteOptions == nil { + x.VoteOptions = new(ProposalVoteOptions) + } + return protoreflect.ValueOfMessage(x.VoteOptions.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalVoteOptionsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalVoteOptionsResponse 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_QueryProposalVoteOptionsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.QueryProposalVoteOptionsResponse.vote_options": + m := new(ProposalVoteOptions) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalVoteOptionsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalVoteOptionsResponse 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_QueryProposalVoteOptionsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryProposalVoteOptionsResponse", 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_QueryProposalVoteOptionsResponse) 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_QueryProposalVoteOptionsResponse) 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_QueryProposalVoteOptionsResponse) 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_QueryProposalVoteOptionsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryProposalVoteOptionsResponse) + 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.VoteOptions != nil { + l = options.Size(x.VoteOptions) + 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().(*QueryProposalVoteOptionsResponse) + 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.VoteOptions != nil { + encoded, err := options.Marshal(x.VoteOptions) + 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().(*QueryProposalVoteOptionsResponse) + 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: QueryProposalVoteOptionsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProposalVoteOptionsResponse: 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 VoteOptions", 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.VoteOptions == nil { + x.VoteOptions = &ProposalVoteOptions{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VoteOptions); 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, + } +} + // Since: cosmos-sdk 0.46 // Code generated by protoc-gen-go. DO NOT EDIT. @@ -9466,6 +10305,80 @@ func (x *QueryTallyResultResponse) GetTally() *TallyResult { return nil } +// QueryProposalVoteOptionsRequest is the request type for the Query/ProposalVoteOptions RPC method. +type QueryProposalVoteOptionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // proposal_id defines the unique id of the proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` +} + +func (x *QueryProposalVoteOptionsRequest) Reset() { + *x = QueryProposalVoteOptionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_gov_v1_query_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryProposalVoteOptionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryProposalVoteOptionsRequest) ProtoMessage() {} + +// Deprecated: Use QueryProposalVoteOptionsRequest.ProtoReflect.Descriptor instead. +func (*QueryProposalVoteOptionsRequest) Descriptor() ([]byte, []int) { + return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{18} +} + +func (x *QueryProposalVoteOptionsRequest) GetProposalId() uint64 { + if x != nil { + return x.ProposalId + } + return 0 +} + +// QueryProposalVoteOptionsResponse is the response type for the Query/ProposalVoteOptions RPC method. +type QueryProposalVoteOptionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // vote_options defines the valid voting options for a proposal. + VoteOptions *ProposalVoteOptions `protobuf:"bytes,1,opt,name=vote_options,json=voteOptions,proto3" json:"vote_options,omitempty"` +} + +func (x *QueryProposalVoteOptionsResponse) Reset() { + *x = QueryProposalVoteOptionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_gov_v1_query_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryProposalVoteOptionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryProposalVoteOptionsResponse) ProtoMessage() {} + +// Deprecated: Use QueryProposalVoteOptionsResponse.ProtoReflect.Descriptor instead. +func (*QueryProposalVoteOptionsResponse) Descriptor() ([]byte, []int) { + return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{19} +} + +func (x *QueryProposalVoteOptionsResponse) GetVoteOptions() *ProposalVoteOptions { + if x != nil { + return x.VoteOptions + } + return nil +} + var File_cosmos_gov_v1_query_proto protoreflect.FileDescriptor var file_cosmos_gov_v1_query_proto_rawDesc = []byte{ @@ -9606,95 +10519,118 @@ var file_cosmos_gov_v1_query_proto_rawDesc = []byte{ 0x30, 0x0a, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x74, 0x61, 0x6c, 0x6c, - 0x79, 0x32, 0xe3, 0x09, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x86, 0x01, 0x0a, 0x0c, - 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, - 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x85, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, - 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x7a, 0x0a, 0x09, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, + 0x79, 0x22, 0x42, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 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, 0x69, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x76, 0x6f, 0x74, + 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x76, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x32, 0x99, 0x0b, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x86, 0x01, 0x0a, 0x0c, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, + 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x69, + 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x85, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, + 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x7a, 0x0a, 0x09, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, + 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, + 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x76, 0x6f, 0x74, 0x65, 0x72, + 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x05, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, + 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x7c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, + 0x23, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, + 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x3d, 0x12, 0x3b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, + 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x7d, 0x12, 0x8e, + 0x01, 0x0a, 0x08, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, - 0x65, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x76, 0x6f, 0x74, 0x65, - 0x72, 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x05, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, + 0x94, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, + 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, + 0x2f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x12, 0xb3, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, - 0x7d, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x7c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, - 0x12, 0x23, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, - 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, - 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x7d, 0x12, - 0x8e, 0x01, 0x0a, 0x08, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, - 0x2f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, - 0x12, 0x94, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, - 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, - 0x7d, 0x2f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x42, 0x9b, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, - 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, + 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x9b, 0x01, 0x0a, + 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, + 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, + 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -9709,80 +10645,86 @@ func file_cosmos_gov_v1_query_proto_rawDescGZIP() []byte { return file_cosmos_gov_v1_query_proto_rawDescData } -var file_cosmos_gov_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_cosmos_gov_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_cosmos_gov_v1_query_proto_goTypes = []interface{}{ - (*QueryConstitutionRequest)(nil), // 0: cosmos.gov.v1.QueryConstitutionRequest - (*QueryConstitutionResponse)(nil), // 1: cosmos.gov.v1.QueryConstitutionResponse - (*QueryProposalRequest)(nil), // 2: cosmos.gov.v1.QueryProposalRequest - (*QueryProposalResponse)(nil), // 3: cosmos.gov.v1.QueryProposalResponse - (*QueryProposalsRequest)(nil), // 4: cosmos.gov.v1.QueryProposalsRequest - (*QueryProposalsResponse)(nil), // 5: cosmos.gov.v1.QueryProposalsResponse - (*QueryVoteRequest)(nil), // 6: cosmos.gov.v1.QueryVoteRequest - (*QueryVoteResponse)(nil), // 7: cosmos.gov.v1.QueryVoteResponse - (*QueryVotesRequest)(nil), // 8: cosmos.gov.v1.QueryVotesRequest - (*QueryVotesResponse)(nil), // 9: cosmos.gov.v1.QueryVotesResponse - (*QueryParamsRequest)(nil), // 10: cosmos.gov.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 11: cosmos.gov.v1.QueryParamsResponse - (*QueryDepositRequest)(nil), // 12: cosmos.gov.v1.QueryDepositRequest - (*QueryDepositResponse)(nil), // 13: cosmos.gov.v1.QueryDepositResponse - (*QueryDepositsRequest)(nil), // 14: cosmos.gov.v1.QueryDepositsRequest - (*QueryDepositsResponse)(nil), // 15: cosmos.gov.v1.QueryDepositsResponse - (*QueryTallyResultRequest)(nil), // 16: cosmos.gov.v1.QueryTallyResultRequest - (*QueryTallyResultResponse)(nil), // 17: cosmos.gov.v1.QueryTallyResultResponse - (*Proposal)(nil), // 18: cosmos.gov.v1.Proposal - (ProposalStatus)(0), // 19: cosmos.gov.v1.ProposalStatus - (*v1beta1.PageRequest)(nil), // 20: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 21: cosmos.base.query.v1beta1.PageResponse - (*Vote)(nil), // 22: cosmos.gov.v1.Vote - (*VotingParams)(nil), // 23: cosmos.gov.v1.VotingParams - (*DepositParams)(nil), // 24: cosmos.gov.v1.DepositParams - (*TallyParams)(nil), // 25: cosmos.gov.v1.TallyParams - (*Params)(nil), // 26: cosmos.gov.v1.Params - (*Deposit)(nil), // 27: cosmos.gov.v1.Deposit - (*TallyResult)(nil), // 28: cosmos.gov.v1.TallyResult + (*QueryConstitutionRequest)(nil), // 0: cosmos.gov.v1.QueryConstitutionRequest + (*QueryConstitutionResponse)(nil), // 1: cosmos.gov.v1.QueryConstitutionResponse + (*QueryProposalRequest)(nil), // 2: cosmos.gov.v1.QueryProposalRequest + (*QueryProposalResponse)(nil), // 3: cosmos.gov.v1.QueryProposalResponse + (*QueryProposalsRequest)(nil), // 4: cosmos.gov.v1.QueryProposalsRequest + (*QueryProposalsResponse)(nil), // 5: cosmos.gov.v1.QueryProposalsResponse + (*QueryVoteRequest)(nil), // 6: cosmos.gov.v1.QueryVoteRequest + (*QueryVoteResponse)(nil), // 7: cosmos.gov.v1.QueryVoteResponse + (*QueryVotesRequest)(nil), // 8: cosmos.gov.v1.QueryVotesRequest + (*QueryVotesResponse)(nil), // 9: cosmos.gov.v1.QueryVotesResponse + (*QueryParamsRequest)(nil), // 10: cosmos.gov.v1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 11: cosmos.gov.v1.QueryParamsResponse + (*QueryDepositRequest)(nil), // 12: cosmos.gov.v1.QueryDepositRequest + (*QueryDepositResponse)(nil), // 13: cosmos.gov.v1.QueryDepositResponse + (*QueryDepositsRequest)(nil), // 14: cosmos.gov.v1.QueryDepositsRequest + (*QueryDepositsResponse)(nil), // 15: cosmos.gov.v1.QueryDepositsResponse + (*QueryTallyResultRequest)(nil), // 16: cosmos.gov.v1.QueryTallyResultRequest + (*QueryTallyResultResponse)(nil), // 17: cosmos.gov.v1.QueryTallyResultResponse + (*QueryProposalVoteOptionsRequest)(nil), // 18: cosmos.gov.v1.QueryProposalVoteOptionsRequest + (*QueryProposalVoteOptionsResponse)(nil), // 19: cosmos.gov.v1.QueryProposalVoteOptionsResponse + (*Proposal)(nil), // 20: cosmos.gov.v1.Proposal + (ProposalStatus)(0), // 21: cosmos.gov.v1.ProposalStatus + (*v1beta1.PageRequest)(nil), // 22: cosmos.base.query.v1beta1.PageRequest + (*v1beta1.PageResponse)(nil), // 23: cosmos.base.query.v1beta1.PageResponse + (*Vote)(nil), // 24: cosmos.gov.v1.Vote + (*VotingParams)(nil), // 25: cosmos.gov.v1.VotingParams + (*DepositParams)(nil), // 26: cosmos.gov.v1.DepositParams + (*TallyParams)(nil), // 27: cosmos.gov.v1.TallyParams + (*Params)(nil), // 28: cosmos.gov.v1.Params + (*Deposit)(nil), // 29: cosmos.gov.v1.Deposit + (*TallyResult)(nil), // 30: cosmos.gov.v1.TallyResult + (*ProposalVoteOptions)(nil), // 31: cosmos.gov.v1.ProposalVoteOptions } var file_cosmos_gov_v1_query_proto_depIdxs = []int32{ - 18, // 0: cosmos.gov.v1.QueryProposalResponse.proposal:type_name -> cosmos.gov.v1.Proposal - 19, // 1: cosmos.gov.v1.QueryProposalsRequest.proposal_status:type_name -> cosmos.gov.v1.ProposalStatus - 20, // 2: cosmos.gov.v1.QueryProposalsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 18, // 3: cosmos.gov.v1.QueryProposalsResponse.proposals:type_name -> cosmos.gov.v1.Proposal - 21, // 4: cosmos.gov.v1.QueryProposalsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 22, // 5: cosmos.gov.v1.QueryVoteResponse.vote:type_name -> cosmos.gov.v1.Vote - 20, // 6: cosmos.gov.v1.QueryVotesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 22, // 7: cosmos.gov.v1.QueryVotesResponse.votes:type_name -> cosmos.gov.v1.Vote - 21, // 8: cosmos.gov.v1.QueryVotesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 23, // 9: cosmos.gov.v1.QueryParamsResponse.voting_params:type_name -> cosmos.gov.v1.VotingParams - 24, // 10: cosmos.gov.v1.QueryParamsResponse.deposit_params:type_name -> cosmos.gov.v1.DepositParams - 25, // 11: cosmos.gov.v1.QueryParamsResponse.tally_params:type_name -> cosmos.gov.v1.TallyParams - 26, // 12: cosmos.gov.v1.QueryParamsResponse.params:type_name -> cosmos.gov.v1.Params - 27, // 13: cosmos.gov.v1.QueryDepositResponse.deposit:type_name -> cosmos.gov.v1.Deposit - 20, // 14: cosmos.gov.v1.QueryDepositsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 27, // 15: cosmos.gov.v1.QueryDepositsResponse.deposits:type_name -> cosmos.gov.v1.Deposit - 21, // 16: cosmos.gov.v1.QueryDepositsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 28, // 17: cosmos.gov.v1.QueryTallyResultResponse.tally:type_name -> cosmos.gov.v1.TallyResult - 0, // 18: cosmos.gov.v1.Query.Constitution:input_type -> cosmos.gov.v1.QueryConstitutionRequest - 2, // 19: cosmos.gov.v1.Query.Proposal:input_type -> cosmos.gov.v1.QueryProposalRequest - 4, // 20: cosmos.gov.v1.Query.Proposals:input_type -> cosmos.gov.v1.QueryProposalsRequest - 6, // 21: cosmos.gov.v1.Query.Vote:input_type -> cosmos.gov.v1.QueryVoteRequest - 8, // 22: cosmos.gov.v1.Query.Votes:input_type -> cosmos.gov.v1.QueryVotesRequest - 10, // 23: cosmos.gov.v1.Query.Params:input_type -> cosmos.gov.v1.QueryParamsRequest - 12, // 24: cosmos.gov.v1.Query.Deposit:input_type -> cosmos.gov.v1.QueryDepositRequest - 14, // 25: cosmos.gov.v1.Query.Deposits:input_type -> cosmos.gov.v1.QueryDepositsRequest - 16, // 26: cosmos.gov.v1.Query.TallyResult:input_type -> cosmos.gov.v1.QueryTallyResultRequest - 1, // 27: cosmos.gov.v1.Query.Constitution:output_type -> cosmos.gov.v1.QueryConstitutionResponse - 3, // 28: cosmos.gov.v1.Query.Proposal:output_type -> cosmos.gov.v1.QueryProposalResponse - 5, // 29: cosmos.gov.v1.Query.Proposals:output_type -> cosmos.gov.v1.QueryProposalsResponse - 7, // 30: cosmos.gov.v1.Query.Vote:output_type -> cosmos.gov.v1.QueryVoteResponse - 9, // 31: cosmos.gov.v1.Query.Votes:output_type -> cosmos.gov.v1.QueryVotesResponse - 11, // 32: cosmos.gov.v1.Query.Params:output_type -> cosmos.gov.v1.QueryParamsResponse - 13, // 33: cosmos.gov.v1.Query.Deposit:output_type -> cosmos.gov.v1.QueryDepositResponse - 15, // 34: cosmos.gov.v1.Query.Deposits:output_type -> cosmos.gov.v1.QueryDepositsResponse - 17, // 35: cosmos.gov.v1.Query.TallyResult:output_type -> cosmos.gov.v1.QueryTallyResultResponse - 27, // [27:36] is the sub-list for method output_type - 18, // [18:27] is the sub-list for method input_type - 18, // [18:18] is the sub-list for extension type_name - 18, // [18:18] is the sub-list for extension extendee - 0, // [0:18] is the sub-list for field type_name + 20, // 0: cosmos.gov.v1.QueryProposalResponse.proposal:type_name -> cosmos.gov.v1.Proposal + 21, // 1: cosmos.gov.v1.QueryProposalsRequest.proposal_status:type_name -> cosmos.gov.v1.ProposalStatus + 22, // 2: cosmos.gov.v1.QueryProposalsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 20, // 3: cosmos.gov.v1.QueryProposalsResponse.proposals:type_name -> cosmos.gov.v1.Proposal + 23, // 4: cosmos.gov.v1.QueryProposalsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 24, // 5: cosmos.gov.v1.QueryVoteResponse.vote:type_name -> cosmos.gov.v1.Vote + 22, // 6: cosmos.gov.v1.QueryVotesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 24, // 7: cosmos.gov.v1.QueryVotesResponse.votes:type_name -> cosmos.gov.v1.Vote + 23, // 8: cosmos.gov.v1.QueryVotesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 25, // 9: cosmos.gov.v1.QueryParamsResponse.voting_params:type_name -> cosmos.gov.v1.VotingParams + 26, // 10: cosmos.gov.v1.QueryParamsResponse.deposit_params:type_name -> cosmos.gov.v1.DepositParams + 27, // 11: cosmos.gov.v1.QueryParamsResponse.tally_params:type_name -> cosmos.gov.v1.TallyParams + 28, // 12: cosmos.gov.v1.QueryParamsResponse.params:type_name -> cosmos.gov.v1.Params + 29, // 13: cosmos.gov.v1.QueryDepositResponse.deposit:type_name -> cosmos.gov.v1.Deposit + 22, // 14: cosmos.gov.v1.QueryDepositsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 29, // 15: cosmos.gov.v1.QueryDepositsResponse.deposits:type_name -> cosmos.gov.v1.Deposit + 23, // 16: cosmos.gov.v1.QueryDepositsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 30, // 17: cosmos.gov.v1.QueryTallyResultResponse.tally:type_name -> cosmos.gov.v1.TallyResult + 31, // 18: cosmos.gov.v1.QueryProposalVoteOptionsResponse.vote_options:type_name -> cosmos.gov.v1.ProposalVoteOptions + 0, // 19: cosmos.gov.v1.Query.Constitution:input_type -> cosmos.gov.v1.QueryConstitutionRequest + 2, // 20: cosmos.gov.v1.Query.Proposal:input_type -> cosmos.gov.v1.QueryProposalRequest + 4, // 21: cosmos.gov.v1.Query.Proposals:input_type -> cosmos.gov.v1.QueryProposalsRequest + 6, // 22: cosmos.gov.v1.Query.Vote:input_type -> cosmos.gov.v1.QueryVoteRequest + 8, // 23: cosmos.gov.v1.Query.Votes:input_type -> cosmos.gov.v1.QueryVotesRequest + 10, // 24: cosmos.gov.v1.Query.Params:input_type -> cosmos.gov.v1.QueryParamsRequest + 12, // 25: cosmos.gov.v1.Query.Deposit:input_type -> cosmos.gov.v1.QueryDepositRequest + 14, // 26: cosmos.gov.v1.Query.Deposits:input_type -> cosmos.gov.v1.QueryDepositsRequest + 16, // 27: cosmos.gov.v1.Query.TallyResult:input_type -> cosmos.gov.v1.QueryTallyResultRequest + 18, // 28: cosmos.gov.v1.Query.ProposalVoteOptions:input_type -> cosmos.gov.v1.QueryProposalVoteOptionsRequest + 1, // 29: cosmos.gov.v1.Query.Constitution:output_type -> cosmos.gov.v1.QueryConstitutionResponse + 3, // 30: cosmos.gov.v1.Query.Proposal:output_type -> cosmos.gov.v1.QueryProposalResponse + 5, // 31: cosmos.gov.v1.Query.Proposals:output_type -> cosmos.gov.v1.QueryProposalsResponse + 7, // 32: cosmos.gov.v1.Query.Vote:output_type -> cosmos.gov.v1.QueryVoteResponse + 9, // 33: cosmos.gov.v1.Query.Votes:output_type -> cosmos.gov.v1.QueryVotesResponse + 11, // 34: cosmos.gov.v1.Query.Params:output_type -> cosmos.gov.v1.QueryParamsResponse + 13, // 35: cosmos.gov.v1.Query.Deposit:output_type -> cosmos.gov.v1.QueryDepositResponse + 15, // 36: cosmos.gov.v1.Query.Deposits:output_type -> cosmos.gov.v1.QueryDepositsResponse + 17, // 37: cosmos.gov.v1.Query.TallyResult:output_type -> cosmos.gov.v1.QueryTallyResultResponse + 19, // 38: cosmos.gov.v1.Query.ProposalVoteOptions:output_type -> cosmos.gov.v1.QueryProposalVoteOptionsResponse + 29, // [29:39] is the sub-list for method output_type + 19, // [19:29] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name } func init() { file_cosmos_gov_v1_query_proto_init() } @@ -10008,6 +10950,30 @@ func file_cosmos_gov_v1_query_proto_init() { return nil } } + file_cosmos_gov_v1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryProposalVoteOptionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_gov_v1_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryProposalVoteOptionsResponse); 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{ @@ -10015,7 +10981,7 @@ func file_cosmos_gov_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_gov_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 18, + NumMessages: 20, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/gov/v1/query_grpc.pb.go b/api/cosmos/gov/v1/query_grpc.pb.go index 9ca690fcf0ed..22025298870c 100644 --- a/api/cosmos/gov/v1/query_grpc.pb.go +++ b/api/cosmos/gov/v1/query_grpc.pb.go @@ -21,15 +21,16 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Constitution_FullMethodName = "/cosmos.gov.v1.Query/Constitution" - Query_Proposal_FullMethodName = "/cosmos.gov.v1.Query/Proposal" - Query_Proposals_FullMethodName = "/cosmos.gov.v1.Query/Proposals" - Query_Vote_FullMethodName = "/cosmos.gov.v1.Query/Vote" - Query_Votes_FullMethodName = "/cosmos.gov.v1.Query/Votes" - Query_Params_FullMethodName = "/cosmos.gov.v1.Query/Params" - Query_Deposit_FullMethodName = "/cosmos.gov.v1.Query/Deposit" - Query_Deposits_FullMethodName = "/cosmos.gov.v1.Query/Deposits" - Query_TallyResult_FullMethodName = "/cosmos.gov.v1.Query/TallyResult" + Query_Constitution_FullMethodName = "/cosmos.gov.v1.Query/Constitution" + Query_Proposal_FullMethodName = "/cosmos.gov.v1.Query/Proposal" + Query_Proposals_FullMethodName = "/cosmos.gov.v1.Query/Proposals" + Query_Vote_FullMethodName = "/cosmos.gov.v1.Query/Vote" + Query_Votes_FullMethodName = "/cosmos.gov.v1.Query/Votes" + Query_Params_FullMethodName = "/cosmos.gov.v1.Query/Params" + Query_Deposit_FullMethodName = "/cosmos.gov.v1.Query/Deposit" + Query_Deposits_FullMethodName = "/cosmos.gov.v1.Query/Deposits" + Query_TallyResult_FullMethodName = "/cosmos.gov.v1.Query/TallyResult" + Query_ProposalVoteOptions_FullMethodName = "/cosmos.gov.v1.Query/ProposalVoteOptions" ) // QueryClient is the client API for Query service. @@ -54,6 +55,8 @@ type QueryClient interface { Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) // TallyResult queries the tally of a proposal vote. TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error) + // ProposalVoteOptions queries the valid voting options for a proposal. + ProposalVoteOptions(ctx context.Context, in *QueryProposalVoteOptionsRequest, opts ...grpc.CallOption) (*QueryProposalVoteOptionsResponse, error) } type queryClient struct { @@ -145,6 +148,15 @@ func (c *queryClient) TallyResult(ctx context.Context, in *QueryTallyResultReque return out, nil } +func (c *queryClient) ProposalVoteOptions(ctx context.Context, in *QueryProposalVoteOptionsRequest, opts ...grpc.CallOption) (*QueryProposalVoteOptionsResponse, error) { + out := new(QueryProposalVoteOptionsResponse) + err := c.cc.Invoke(ctx, Query_ProposalVoteOptions_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility @@ -167,6 +179,8 @@ type QueryServer interface { Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) // TallyResult queries the tally of a proposal vote. TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error) + // ProposalVoteOptions queries the valid voting options for a proposal. + ProposalVoteOptions(context.Context, *QueryProposalVoteOptionsRequest) (*QueryProposalVoteOptionsResponse, error) mustEmbedUnimplementedQueryServer() } @@ -201,6 +215,9 @@ func (UnimplementedQueryServer) Deposits(context.Context, *QueryDepositsRequest) func (UnimplementedQueryServer) TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TallyResult not implemented") } +func (UnimplementedQueryServer) ProposalVoteOptions(context.Context, *QueryProposalVoteOptionsRequest) (*QueryProposalVoteOptionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProposalVoteOptions not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -376,6 +393,24 @@ func _Query_TallyResult_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Query_ProposalVoteOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProposalVoteOptionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ProposalVoteOptions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ProposalVoteOptions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ProposalVoteOptions(ctx, req.(*QueryProposalVoteOptionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -419,6 +454,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "TallyResult", Handler: _Query_TallyResult_Handler, }, + { + MethodName: "ProposalVoteOptions", + Handler: _Query_ProposalVoteOptions_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/gov/v1/query.proto", diff --git a/api/cosmos/gov/v1/tx.pulsar.go b/api/cosmos/gov/v1/tx.pulsar.go index 89d043090cbf..1d065cac4421 100644 --- a/api/cosmos/gov/v1/tx.pulsar.go +++ b/api/cosmos/gov/v1/tx.pulsar.go @@ -7046,6 +7046,1239 @@ func (x *fastReflection_MsgCancelProposalResponse) ProtoMethods() *protoiface.Me } } +var _ protoreflect.List = (*_MsgSubmitMultipleChoiceProposal_1_list)(nil) + +type _MsgSubmitMultipleChoiceProposal_1_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgSubmitMultipleChoiceProposal_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgSubmitMultipleChoiceProposal_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgSubmitMultipleChoiceProposal_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgSubmitMultipleChoiceProposal_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgSubmitMultipleChoiceProposal_1_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgSubmitMultipleChoiceProposal_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgSubmitMultipleChoiceProposal_1_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgSubmitMultipleChoiceProposal_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgSubmitMultipleChoiceProposal protoreflect.MessageDescriptor + fd_MsgSubmitMultipleChoiceProposal_initial_deposit protoreflect.FieldDescriptor + fd_MsgSubmitMultipleChoiceProposal_proposer protoreflect.FieldDescriptor + fd_MsgSubmitMultipleChoiceProposal_metadata protoreflect.FieldDescriptor + fd_MsgSubmitMultipleChoiceProposal_title protoreflect.FieldDescriptor + fd_MsgSubmitMultipleChoiceProposal_summary protoreflect.FieldDescriptor + fd_MsgSubmitMultipleChoiceProposal_vote_options protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_gov_v1_tx_proto_init() + md_MsgSubmitMultipleChoiceProposal = File_cosmos_gov_v1_tx_proto.Messages().ByName("MsgSubmitMultipleChoiceProposal") + fd_MsgSubmitMultipleChoiceProposal_initial_deposit = md_MsgSubmitMultipleChoiceProposal.Fields().ByName("initial_deposit") + fd_MsgSubmitMultipleChoiceProposal_proposer = md_MsgSubmitMultipleChoiceProposal.Fields().ByName("proposer") + fd_MsgSubmitMultipleChoiceProposal_metadata = md_MsgSubmitMultipleChoiceProposal.Fields().ByName("metadata") + fd_MsgSubmitMultipleChoiceProposal_title = md_MsgSubmitMultipleChoiceProposal.Fields().ByName("title") + fd_MsgSubmitMultipleChoiceProposal_summary = md_MsgSubmitMultipleChoiceProposal.Fields().ByName("summary") + fd_MsgSubmitMultipleChoiceProposal_vote_options = md_MsgSubmitMultipleChoiceProposal.Fields().ByName("vote_options") +} + +var _ protoreflect.Message = (*fastReflection_MsgSubmitMultipleChoiceProposal)(nil) + +type fastReflection_MsgSubmitMultipleChoiceProposal MsgSubmitMultipleChoiceProposal + +func (x *MsgSubmitMultipleChoiceProposal) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSubmitMultipleChoiceProposal)(x) +} + +func (x *MsgSubmitMultipleChoiceProposal) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_gov_v1_tx_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_MsgSubmitMultipleChoiceProposal_messageType fastReflection_MsgSubmitMultipleChoiceProposal_messageType +var _ protoreflect.MessageType = fastReflection_MsgSubmitMultipleChoiceProposal_messageType{} + +type fastReflection_MsgSubmitMultipleChoiceProposal_messageType struct{} + +func (x fastReflection_MsgSubmitMultipleChoiceProposal_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSubmitMultipleChoiceProposal)(nil) +} +func (x fastReflection_MsgSubmitMultipleChoiceProposal_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSubmitMultipleChoiceProposal) +} +func (x fastReflection_MsgSubmitMultipleChoiceProposal_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSubmitMultipleChoiceProposal +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSubmitMultipleChoiceProposal) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSubmitMultipleChoiceProposal +} + +// 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_MsgSubmitMultipleChoiceProposal) Type() protoreflect.MessageType { + return _fastReflection_MsgSubmitMultipleChoiceProposal_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSubmitMultipleChoiceProposal) New() protoreflect.Message { + return new(fastReflection_MsgSubmitMultipleChoiceProposal) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSubmitMultipleChoiceProposal) Interface() protoreflect.ProtoMessage { + return (*MsgSubmitMultipleChoiceProposal)(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_MsgSubmitMultipleChoiceProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.InitialDeposit) != 0 { + value := protoreflect.ValueOfList(&_MsgSubmitMultipleChoiceProposal_1_list{list: &x.InitialDeposit}) + if !f(fd_MsgSubmitMultipleChoiceProposal_initial_deposit, value) { + return + } + } + if x.Proposer != "" { + value := protoreflect.ValueOfString(x.Proposer) + if !f(fd_MsgSubmitMultipleChoiceProposal_proposer, value) { + return + } + } + if x.Metadata != "" { + value := protoreflect.ValueOfString(x.Metadata) + if !f(fd_MsgSubmitMultipleChoiceProposal_metadata, value) { + return + } + } + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_MsgSubmitMultipleChoiceProposal_title, value) { + return + } + } + if x.Summary != "" { + value := protoreflect.ValueOfString(x.Summary) + if !f(fd_MsgSubmitMultipleChoiceProposal_summary, value) { + return + } + } + if x.VoteOptions != nil { + value := protoreflect.ValueOfMessage(x.VoteOptions.ProtoReflect()) + if !f(fd_MsgSubmitMultipleChoiceProposal_vote_options, 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_MsgSubmitMultipleChoiceProposal) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.initial_deposit": + return len(x.InitialDeposit) != 0 + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.proposer": + return x.Proposer != "" + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.metadata": + return x.Metadata != "" + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.title": + return x.Title != "" + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.summary": + return x.Summary != "" + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.vote_options": + return x.VoteOptions != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitMultipleChoiceProposal")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitMultipleChoiceProposal 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_MsgSubmitMultipleChoiceProposal) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.initial_deposit": + x.InitialDeposit = nil + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.proposer": + x.Proposer = "" + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.metadata": + x.Metadata = "" + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.title": + x.Title = "" + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.summary": + x.Summary = "" + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.vote_options": + x.VoteOptions = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitMultipleChoiceProposal")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitMultipleChoiceProposal 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_MsgSubmitMultipleChoiceProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.initial_deposit": + if len(x.InitialDeposit) == 0 { + return protoreflect.ValueOfList(&_MsgSubmitMultipleChoiceProposal_1_list{}) + } + listValue := &_MsgSubmitMultipleChoiceProposal_1_list{list: &x.InitialDeposit} + return protoreflect.ValueOfList(listValue) + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.proposer": + value := x.Proposer + return protoreflect.ValueOfString(value) + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.metadata": + value := x.Metadata + return protoreflect.ValueOfString(value) + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.summary": + value := x.Summary + return protoreflect.ValueOfString(value) + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.vote_options": + value := x.VoteOptions + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitMultipleChoiceProposal")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitMultipleChoiceProposal 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_MsgSubmitMultipleChoiceProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.initial_deposit": + lv := value.List() + clv := lv.(*_MsgSubmitMultipleChoiceProposal_1_list) + x.InitialDeposit = *clv.list + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.proposer": + x.Proposer = value.Interface().(string) + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.metadata": + x.Metadata = value.Interface().(string) + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.title": + x.Title = value.Interface().(string) + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.summary": + x.Summary = value.Interface().(string) + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.vote_options": + x.VoteOptions = value.Message().Interface().(*ProposalVoteOptions) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitMultipleChoiceProposal")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitMultipleChoiceProposal 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_MsgSubmitMultipleChoiceProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.initial_deposit": + if x.InitialDeposit == nil { + x.InitialDeposit = []*v1beta1.Coin{} + } + value := &_MsgSubmitMultipleChoiceProposal_1_list{list: &x.InitialDeposit} + return protoreflect.ValueOfList(value) + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.vote_options": + if x.VoteOptions == nil { + x.VoteOptions = new(ProposalVoteOptions) + } + return protoreflect.ValueOfMessage(x.VoteOptions.ProtoReflect()) + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.proposer": + panic(fmt.Errorf("field proposer of message cosmos.gov.v1.MsgSubmitMultipleChoiceProposal is not mutable")) + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.metadata": + panic(fmt.Errorf("field metadata of message cosmos.gov.v1.MsgSubmitMultipleChoiceProposal is not mutable")) + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.title": + panic(fmt.Errorf("field title of message cosmos.gov.v1.MsgSubmitMultipleChoiceProposal is not mutable")) + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.summary": + panic(fmt.Errorf("field summary of message cosmos.gov.v1.MsgSubmitMultipleChoiceProposal is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitMultipleChoiceProposal")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitMultipleChoiceProposal 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_MsgSubmitMultipleChoiceProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.initial_deposit": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgSubmitMultipleChoiceProposal_1_list{list: &list}) + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.proposer": + return protoreflect.ValueOfString("") + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.metadata": + return protoreflect.ValueOfString("") + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.title": + return protoreflect.ValueOfString("") + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.summary": + return protoreflect.ValueOfString("") + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.vote_options": + m := new(ProposalVoteOptions) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitMultipleChoiceProposal")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitMultipleChoiceProposal 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_MsgSubmitMultipleChoiceProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MsgSubmitMultipleChoiceProposal", 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_MsgSubmitMultipleChoiceProposal) 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_MsgSubmitMultipleChoiceProposal) 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_MsgSubmitMultipleChoiceProposal) 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_MsgSubmitMultipleChoiceProposal) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSubmitMultipleChoiceProposal) + 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.InitialDeposit) > 0 { + for _, e := range x.InitialDeposit { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Proposer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Metadata) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(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 x.VoteOptions != nil { + l = options.Size(x.VoteOptions) + 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().(*MsgSubmitMultipleChoiceProposal) + 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.VoteOptions != nil { + encoded, err := options.Marshal(x.VoteOptions) + 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] = 0x32 + } + 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] = 0x2a + } + 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] = 0x22 + } + if len(x.Metadata) > 0 { + i -= len(x.Metadata) + copy(dAtA[i:], x.Metadata) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) + i-- + dAtA[i] = 0x1a + } + if len(x.Proposer) > 0 { + i -= len(x.Proposer) + copy(dAtA[i:], x.Proposer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proposer))) + i-- + dAtA[i] = 0x12 + } + if len(x.InitialDeposit) > 0 { + for iNdEx := len(x.InitialDeposit) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.InitialDeposit[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().(*MsgSubmitMultipleChoiceProposal) + 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: MsgSubmitMultipleChoiceProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitMultipleChoiceProposal: 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 InitialDeposit", 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.InitialDeposit = append(x.InitialDeposit, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.InitialDeposit[len(x.InitialDeposit)-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 Proposer", 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.Proposer = 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 Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + 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 5: + 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 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VoteOptions", 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.VoteOptions == nil { + x.VoteOptions = &ProposalVoteOptions{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VoteOptions); 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_MsgSubmitMultipleChoiceProposalResponse protoreflect.MessageDescriptor + fd_MsgSubmitMultipleChoiceProposalResponse_proposal_id protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_gov_v1_tx_proto_init() + md_MsgSubmitMultipleChoiceProposalResponse = File_cosmos_gov_v1_tx_proto.Messages().ByName("MsgSubmitMultipleChoiceProposalResponse") + fd_MsgSubmitMultipleChoiceProposalResponse_proposal_id = md_MsgSubmitMultipleChoiceProposalResponse.Fields().ByName("proposal_id") +} + +var _ protoreflect.Message = (*fastReflection_MsgSubmitMultipleChoiceProposalResponse)(nil) + +type fastReflection_MsgSubmitMultipleChoiceProposalResponse MsgSubmitMultipleChoiceProposalResponse + +func (x *MsgSubmitMultipleChoiceProposalResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSubmitMultipleChoiceProposalResponse)(x) +} + +func (x *MsgSubmitMultipleChoiceProposalResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_gov_v1_tx_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_MsgSubmitMultipleChoiceProposalResponse_messageType fastReflection_MsgSubmitMultipleChoiceProposalResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgSubmitMultipleChoiceProposalResponse_messageType{} + +type fastReflection_MsgSubmitMultipleChoiceProposalResponse_messageType struct{} + +func (x fastReflection_MsgSubmitMultipleChoiceProposalResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSubmitMultipleChoiceProposalResponse)(nil) +} +func (x fastReflection_MsgSubmitMultipleChoiceProposalResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSubmitMultipleChoiceProposalResponse) +} +func (x fastReflection_MsgSubmitMultipleChoiceProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSubmitMultipleChoiceProposalResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSubmitMultipleChoiceProposalResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSubmitMultipleChoiceProposalResponse +} + +// 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_MsgSubmitMultipleChoiceProposalResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgSubmitMultipleChoiceProposalResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSubmitMultipleChoiceProposalResponse) New() protoreflect.Message { + return new(fastReflection_MsgSubmitMultipleChoiceProposalResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSubmitMultipleChoiceProposalResponse) Interface() protoreflect.ProtoMessage { + return (*MsgSubmitMultipleChoiceProposalResponse)(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_MsgSubmitMultipleChoiceProposalResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ProposalId != uint64(0) { + value := protoreflect.ValueOfUint64(x.ProposalId) + if !f(fd_MsgSubmitMultipleChoiceProposalResponse_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_MsgSubmitMultipleChoiceProposalResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse.proposal_id": + return x.ProposalId != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse 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_MsgSubmitMultipleChoiceProposalResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse.proposal_id": + x.ProposalId = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse 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_MsgSubmitMultipleChoiceProposalResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse.proposal_id": + value := x.ProposalId + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse 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_MsgSubmitMultipleChoiceProposalResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse.proposal_id": + x.ProposalId = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse 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_MsgSubmitMultipleChoiceProposalResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse.proposal_id": + panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse 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_MsgSubmitMultipleChoiceProposalResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse.proposal_id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse 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_MsgSubmitMultipleChoiceProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse", 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_MsgSubmitMultipleChoiceProposalResponse) 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_MsgSubmitMultipleChoiceProposalResponse) 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_MsgSubmitMultipleChoiceProposalResponse) 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_MsgSubmitMultipleChoiceProposalResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSubmitMultipleChoiceProposalResponse) + 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().(*MsgSubmitMultipleChoiceProposalResponse) + 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().(*MsgSubmitMultipleChoiceProposalResponse) + 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: MsgSubmitMultipleChoiceProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitMultipleChoiceProposalResponse: 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, + } +} + // Since: cosmos-sdk 0.46 // Code generated by protoc-gen-go. DO NOT EDIT. @@ -7096,7 +8329,7 @@ type MsgSubmitProposal struct { // proposal_type defines the type of proposal // When not set defaults to PROPOSAL_TYPE_STANDARD // - // Since: cosmos-sdk 0.51 + // Since: x/gov v1.0.0 ProposalType ProposalType `protobuf:"varint,8,opt,name=proposal_type,json=proposalType,proto3,enum=cosmos.gov.v1.ProposalType" json:"proposal_type,omitempty"` } @@ -7738,6 +8971,129 @@ func (x *MsgCancelProposalResponse) GetCanceledHeight() uint64 { return 0 } +// MsgSubmitMultipleChoiceProposal defines a message to submit a multiple choice proposal. +// +// Since: x/gov 1.0.0 +type MsgSubmitMultipleChoiceProposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // initial_deposit is the deposit value that must be paid at proposal submission. + InitialDeposit []*v1beta1.Coin `protobuf:"bytes,1,rep,name=initial_deposit,json=initialDeposit,proto3" json:"initial_deposit,omitempty"` + // proposer is the account address of the proposer. + Proposer string `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"` + // metadata is any arbitrary metadata attached to the proposal. + Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + // title is the title of the proposal. + Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` + // summary is the summary of the proposal + Summary string `protobuf:"bytes,5,opt,name=summary,proto3" json:"summary,omitempty"` + // vote_options defines the vote options for the proposal. + VoteOptions *ProposalVoteOptions `protobuf:"bytes,6,opt,name=vote_options,json=voteOptions,proto3" json:"vote_options,omitempty"` +} + +func (x *MsgSubmitMultipleChoiceProposal) Reset() { + *x = MsgSubmitMultipleChoiceProposal{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_gov_v1_tx_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSubmitMultipleChoiceProposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSubmitMultipleChoiceProposal) ProtoMessage() {} + +// Deprecated: Use MsgSubmitMultipleChoiceProposal.ProtoReflect.Descriptor instead. +func (*MsgSubmitMultipleChoiceProposal) Descriptor() ([]byte, []int) { + return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{14} +} + +func (x *MsgSubmitMultipleChoiceProposal) GetInitialDeposit() []*v1beta1.Coin { + if x != nil { + return x.InitialDeposit + } + return nil +} + +func (x *MsgSubmitMultipleChoiceProposal) GetProposer() string { + if x != nil { + return x.Proposer + } + return "" +} + +func (x *MsgSubmitMultipleChoiceProposal) GetMetadata() string { + if x != nil { + return x.Metadata + } + return "" +} + +func (x *MsgSubmitMultipleChoiceProposal) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *MsgSubmitMultipleChoiceProposal) GetSummary() string { + if x != nil { + return x.Summary + } + return "" +} + +func (x *MsgSubmitMultipleChoiceProposal) GetVoteOptions() *ProposalVoteOptions { + if x != nil { + return x.VoteOptions + } + return nil +} + +// MsgSubmitMultipleChoiceProposalResponse defines the Msg/SubmitMultipleChoiceProposal response type. +// +// Since: x/gov 1.0.0 +type MsgSubmitMultipleChoiceProposalResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // proposal_id defines the unique id of the proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` +} + +func (x *MsgSubmitMultipleChoiceProposalResponse) Reset() { + *x = MsgSubmitMultipleChoiceProposalResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_gov_v1_tx_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSubmitMultipleChoiceProposalResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSubmitMultipleChoiceProposalResponse) ProtoMessage() {} + +// Deprecated: Use MsgSubmitMultipleChoiceProposalResponse.ProtoReflect.Descriptor instead. +func (*MsgSubmitMultipleChoiceProposalResponse) Descriptor() ([]byte, []int) { + return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{15} +} + +func (x *MsgSubmitMultipleChoiceProposalResponse) GetProposalId() uint64 { + if x != nil { + return x.ProposalId + } + return 0 +} + var File_cosmos_gov_v1_tx_proto protoreflect.FileDescriptor var file_cosmos_gov_v1_tx_proto_rawDesc = []byte{ @@ -7889,56 +9245,93 @@ var file_cosmos_gov_v1_tx_proto_rawDesc = []byte{ 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x32, 0xe8, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5c, 0x0a, 0x0e, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x20, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x11, 0x45, 0x78, - 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, - 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, + 0x69, 0x67, 0x68, 0x74, 0x22, 0x86, 0x03, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x8a, 0x01, 0x0a, 0x0f, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, + 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, + 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x18, 0x02, 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, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x45, 0x0a, 0x0c, 0x76, 0x6f, 0x74, 0x65, 0x5f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x0b, 0x76, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x0d, + 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x22, 0x4a, 0x0a, + 0x27, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, + 0x6c, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 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, 0x32, 0xf1, 0x05, 0x0a, 0x03, 0x4d, 0x73, + 0x67, 0x12, 0x5c, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x65, 0x0a, 0x11, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, - 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3e, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, - 0x65, 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, - 0x64, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, - 0x64, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x07, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x1a, - 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0e, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x20, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x28, + 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, + 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x16, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, + 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, + 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5c, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x86, 0x01, + 0x0a, 0x1c, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x2e, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, - 0x98, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, - 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x98, 0x01, + 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, + 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, + 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, + 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -7953,59 +9346,66 @@ func file_cosmos_gov_v1_tx_proto_rawDescGZIP() []byte { return file_cosmos_gov_v1_tx_proto_rawDescData } -var file_cosmos_gov_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_cosmos_gov_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_cosmos_gov_v1_tx_proto_goTypes = []interface{}{ - (*MsgSubmitProposal)(nil), // 0: cosmos.gov.v1.MsgSubmitProposal - (*MsgSubmitProposalResponse)(nil), // 1: cosmos.gov.v1.MsgSubmitProposalResponse - (*MsgExecLegacyContent)(nil), // 2: cosmos.gov.v1.MsgExecLegacyContent - (*MsgExecLegacyContentResponse)(nil), // 3: cosmos.gov.v1.MsgExecLegacyContentResponse - (*MsgVote)(nil), // 4: cosmos.gov.v1.MsgVote - (*MsgVoteResponse)(nil), // 5: cosmos.gov.v1.MsgVoteResponse - (*MsgVoteWeighted)(nil), // 6: cosmos.gov.v1.MsgVoteWeighted - (*MsgVoteWeightedResponse)(nil), // 7: cosmos.gov.v1.MsgVoteWeightedResponse - (*MsgDeposit)(nil), // 8: cosmos.gov.v1.MsgDeposit - (*MsgDepositResponse)(nil), // 9: cosmos.gov.v1.MsgDepositResponse - (*MsgUpdateParams)(nil), // 10: cosmos.gov.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 11: cosmos.gov.v1.MsgUpdateParamsResponse - (*MsgCancelProposal)(nil), // 12: cosmos.gov.v1.MsgCancelProposal - (*MsgCancelProposalResponse)(nil), // 13: cosmos.gov.v1.MsgCancelProposalResponse - (*anypb.Any)(nil), // 14: google.protobuf.Any - (*v1beta1.Coin)(nil), // 15: cosmos.base.v1beta1.Coin - (ProposalType)(0), // 16: cosmos.gov.v1.ProposalType - (VoteOption)(0), // 17: cosmos.gov.v1.VoteOption - (*WeightedVoteOption)(nil), // 18: cosmos.gov.v1.WeightedVoteOption - (*Params)(nil), // 19: cosmos.gov.v1.Params - (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp + (*MsgSubmitProposal)(nil), // 0: cosmos.gov.v1.MsgSubmitProposal + (*MsgSubmitProposalResponse)(nil), // 1: cosmos.gov.v1.MsgSubmitProposalResponse + (*MsgExecLegacyContent)(nil), // 2: cosmos.gov.v1.MsgExecLegacyContent + (*MsgExecLegacyContentResponse)(nil), // 3: cosmos.gov.v1.MsgExecLegacyContentResponse + (*MsgVote)(nil), // 4: cosmos.gov.v1.MsgVote + (*MsgVoteResponse)(nil), // 5: cosmos.gov.v1.MsgVoteResponse + (*MsgVoteWeighted)(nil), // 6: cosmos.gov.v1.MsgVoteWeighted + (*MsgVoteWeightedResponse)(nil), // 7: cosmos.gov.v1.MsgVoteWeightedResponse + (*MsgDeposit)(nil), // 8: cosmos.gov.v1.MsgDeposit + (*MsgDepositResponse)(nil), // 9: cosmos.gov.v1.MsgDepositResponse + (*MsgUpdateParams)(nil), // 10: cosmos.gov.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 11: cosmos.gov.v1.MsgUpdateParamsResponse + (*MsgCancelProposal)(nil), // 12: cosmos.gov.v1.MsgCancelProposal + (*MsgCancelProposalResponse)(nil), // 13: cosmos.gov.v1.MsgCancelProposalResponse + (*MsgSubmitMultipleChoiceProposal)(nil), // 14: cosmos.gov.v1.MsgSubmitMultipleChoiceProposal + (*MsgSubmitMultipleChoiceProposalResponse)(nil), // 15: cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse + (*anypb.Any)(nil), // 16: google.protobuf.Any + (*v1beta1.Coin)(nil), // 17: cosmos.base.v1beta1.Coin + (ProposalType)(0), // 18: cosmos.gov.v1.ProposalType + (VoteOption)(0), // 19: cosmos.gov.v1.VoteOption + (*WeightedVoteOption)(nil), // 20: cosmos.gov.v1.WeightedVoteOption + (*Params)(nil), // 21: cosmos.gov.v1.Params + (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp + (*ProposalVoteOptions)(nil), // 23: cosmos.gov.v1.ProposalVoteOptions } var file_cosmos_gov_v1_tx_proto_depIdxs = []int32{ - 14, // 0: cosmos.gov.v1.MsgSubmitProposal.messages:type_name -> google.protobuf.Any - 15, // 1: cosmos.gov.v1.MsgSubmitProposal.initial_deposit:type_name -> cosmos.base.v1beta1.Coin - 16, // 2: cosmos.gov.v1.MsgSubmitProposal.proposal_type:type_name -> cosmos.gov.v1.ProposalType - 14, // 3: cosmos.gov.v1.MsgExecLegacyContent.content:type_name -> google.protobuf.Any - 17, // 4: cosmos.gov.v1.MsgVote.option:type_name -> cosmos.gov.v1.VoteOption - 18, // 5: cosmos.gov.v1.MsgVoteWeighted.options:type_name -> cosmos.gov.v1.WeightedVoteOption - 15, // 6: cosmos.gov.v1.MsgDeposit.amount:type_name -> cosmos.base.v1beta1.Coin - 19, // 7: cosmos.gov.v1.MsgUpdateParams.params:type_name -> cosmos.gov.v1.Params - 20, // 8: cosmos.gov.v1.MsgCancelProposalResponse.canceled_time:type_name -> google.protobuf.Timestamp - 0, // 9: cosmos.gov.v1.Msg.SubmitProposal:input_type -> cosmos.gov.v1.MsgSubmitProposal - 2, // 10: cosmos.gov.v1.Msg.ExecLegacyContent:input_type -> cosmos.gov.v1.MsgExecLegacyContent - 4, // 11: cosmos.gov.v1.Msg.Vote:input_type -> cosmos.gov.v1.MsgVote - 6, // 12: cosmos.gov.v1.Msg.VoteWeighted:input_type -> cosmos.gov.v1.MsgVoteWeighted - 8, // 13: cosmos.gov.v1.Msg.Deposit:input_type -> cosmos.gov.v1.MsgDeposit - 10, // 14: cosmos.gov.v1.Msg.UpdateParams:input_type -> cosmos.gov.v1.MsgUpdateParams - 12, // 15: cosmos.gov.v1.Msg.CancelProposal:input_type -> cosmos.gov.v1.MsgCancelProposal - 1, // 16: cosmos.gov.v1.Msg.SubmitProposal:output_type -> cosmos.gov.v1.MsgSubmitProposalResponse - 3, // 17: cosmos.gov.v1.Msg.ExecLegacyContent:output_type -> cosmos.gov.v1.MsgExecLegacyContentResponse - 5, // 18: cosmos.gov.v1.Msg.Vote:output_type -> cosmos.gov.v1.MsgVoteResponse - 7, // 19: cosmos.gov.v1.Msg.VoteWeighted:output_type -> cosmos.gov.v1.MsgVoteWeightedResponse - 9, // 20: cosmos.gov.v1.Msg.Deposit:output_type -> cosmos.gov.v1.MsgDepositResponse - 11, // 21: cosmos.gov.v1.Msg.UpdateParams:output_type -> cosmos.gov.v1.MsgUpdateParamsResponse - 13, // 22: cosmos.gov.v1.Msg.CancelProposal:output_type -> cosmos.gov.v1.MsgCancelProposalResponse - 16, // [16:23] is the sub-list for method output_type - 9, // [9:16] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 16, // 0: cosmos.gov.v1.MsgSubmitProposal.messages:type_name -> google.protobuf.Any + 17, // 1: cosmos.gov.v1.MsgSubmitProposal.initial_deposit:type_name -> cosmos.base.v1beta1.Coin + 18, // 2: cosmos.gov.v1.MsgSubmitProposal.proposal_type:type_name -> cosmos.gov.v1.ProposalType + 16, // 3: cosmos.gov.v1.MsgExecLegacyContent.content:type_name -> google.protobuf.Any + 19, // 4: cosmos.gov.v1.MsgVote.option:type_name -> cosmos.gov.v1.VoteOption + 20, // 5: cosmos.gov.v1.MsgVoteWeighted.options:type_name -> cosmos.gov.v1.WeightedVoteOption + 17, // 6: cosmos.gov.v1.MsgDeposit.amount:type_name -> cosmos.base.v1beta1.Coin + 21, // 7: cosmos.gov.v1.MsgUpdateParams.params:type_name -> cosmos.gov.v1.Params + 22, // 8: cosmos.gov.v1.MsgCancelProposalResponse.canceled_time:type_name -> google.protobuf.Timestamp + 17, // 9: cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.initial_deposit:type_name -> cosmos.base.v1beta1.Coin + 23, // 10: cosmos.gov.v1.MsgSubmitMultipleChoiceProposal.vote_options:type_name -> cosmos.gov.v1.ProposalVoteOptions + 0, // 11: cosmos.gov.v1.Msg.SubmitProposal:input_type -> cosmos.gov.v1.MsgSubmitProposal + 2, // 12: cosmos.gov.v1.Msg.ExecLegacyContent:input_type -> cosmos.gov.v1.MsgExecLegacyContent + 4, // 13: cosmos.gov.v1.Msg.Vote:input_type -> cosmos.gov.v1.MsgVote + 6, // 14: cosmos.gov.v1.Msg.VoteWeighted:input_type -> cosmos.gov.v1.MsgVoteWeighted + 8, // 15: cosmos.gov.v1.Msg.Deposit:input_type -> cosmos.gov.v1.MsgDeposit + 10, // 16: cosmos.gov.v1.Msg.UpdateParams:input_type -> cosmos.gov.v1.MsgUpdateParams + 12, // 17: cosmos.gov.v1.Msg.CancelProposal:input_type -> cosmos.gov.v1.MsgCancelProposal + 14, // 18: cosmos.gov.v1.Msg.SubmitMultipleChoiceProposal:input_type -> cosmos.gov.v1.MsgSubmitMultipleChoiceProposal + 1, // 19: cosmos.gov.v1.Msg.SubmitProposal:output_type -> cosmos.gov.v1.MsgSubmitProposalResponse + 3, // 20: cosmos.gov.v1.Msg.ExecLegacyContent:output_type -> cosmos.gov.v1.MsgExecLegacyContentResponse + 5, // 21: cosmos.gov.v1.Msg.Vote:output_type -> cosmos.gov.v1.MsgVoteResponse + 7, // 22: cosmos.gov.v1.Msg.VoteWeighted:output_type -> cosmos.gov.v1.MsgVoteWeightedResponse + 9, // 23: cosmos.gov.v1.Msg.Deposit:output_type -> cosmos.gov.v1.MsgDepositResponse + 11, // 24: cosmos.gov.v1.Msg.UpdateParams:output_type -> cosmos.gov.v1.MsgUpdateParamsResponse + 13, // 25: cosmos.gov.v1.Msg.CancelProposal:output_type -> cosmos.gov.v1.MsgCancelProposalResponse + 15, // 26: cosmos.gov.v1.Msg.SubmitMultipleChoiceProposal:output_type -> cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse + 19, // [19:27] is the sub-list for method output_type + 11, // [11:19] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_cosmos_gov_v1_tx_proto_init() } @@ -8183,6 +9583,30 @@ func file_cosmos_gov_v1_tx_proto_init() { return nil } } + file_cosmos_gov_v1_tx_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSubmitMultipleChoiceProposal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_gov_v1_tx_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSubmitMultipleChoiceProposalResponse); 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{ @@ -8190,7 +9614,7 @@ func file_cosmos_gov_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_gov_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/gov/v1/tx_grpc.pb.go b/api/cosmos/gov/v1/tx_grpc.pb.go index 4f77b03d617b..4fb31e17f478 100644 --- a/api/cosmos/gov/v1/tx_grpc.pb.go +++ b/api/cosmos/gov/v1/tx_grpc.pb.go @@ -21,13 +21,14 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_SubmitProposal_FullMethodName = "/cosmos.gov.v1.Msg/SubmitProposal" - Msg_ExecLegacyContent_FullMethodName = "/cosmos.gov.v1.Msg/ExecLegacyContent" - Msg_Vote_FullMethodName = "/cosmos.gov.v1.Msg/Vote" - Msg_VoteWeighted_FullMethodName = "/cosmos.gov.v1.Msg/VoteWeighted" - Msg_Deposit_FullMethodName = "/cosmos.gov.v1.Msg/Deposit" - Msg_UpdateParams_FullMethodName = "/cosmos.gov.v1.Msg/UpdateParams" - Msg_CancelProposal_FullMethodName = "/cosmos.gov.v1.Msg/CancelProposal" + Msg_SubmitProposal_FullMethodName = "/cosmos.gov.v1.Msg/SubmitProposal" + Msg_ExecLegacyContent_FullMethodName = "/cosmos.gov.v1.Msg/ExecLegacyContent" + Msg_Vote_FullMethodName = "/cosmos.gov.v1.Msg/Vote" + Msg_VoteWeighted_FullMethodName = "/cosmos.gov.v1.Msg/VoteWeighted" + Msg_Deposit_FullMethodName = "/cosmos.gov.v1.Msg/Deposit" + Msg_UpdateParams_FullMethodName = "/cosmos.gov.v1.Msg/UpdateParams" + Msg_CancelProposal_FullMethodName = "/cosmos.gov.v1.Msg/CancelProposal" + Msg_SubmitMultipleChoiceProposal_FullMethodName = "/cosmos.gov.v1.Msg/SubmitMultipleChoiceProposal" ) // MsgClient is the client API for Msg service. @@ -54,6 +55,10 @@ type MsgClient interface { // // Since: cosmos-sdk 0.50 CancelProposal(ctx context.Context, in *MsgCancelProposal, opts ...grpc.CallOption) (*MsgCancelProposalResponse, error) + // SubmitMultipleChoiceProposal defines a method to create new multiple choice proposal. + // + // Since: x/gov 1.0.0 + SubmitMultipleChoiceProposal(ctx context.Context, in *MsgSubmitMultipleChoiceProposal, opts ...grpc.CallOption) (*MsgSubmitMultipleChoiceProposalResponse, error) } type msgClient struct { @@ -127,6 +132,15 @@ func (c *msgClient) CancelProposal(ctx context.Context, in *MsgCancelProposal, o return out, nil } +func (c *msgClient) SubmitMultipleChoiceProposal(ctx context.Context, in *MsgSubmitMultipleChoiceProposal, opts ...grpc.CallOption) (*MsgSubmitMultipleChoiceProposalResponse, error) { + out := new(MsgSubmitMultipleChoiceProposalResponse) + err := c.cc.Invoke(ctx, Msg_SubmitMultipleChoiceProposal_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -151,6 +165,10 @@ type MsgServer interface { // // Since: cosmos-sdk 0.50 CancelProposal(context.Context, *MsgCancelProposal) (*MsgCancelProposalResponse, error) + // SubmitMultipleChoiceProposal defines a method to create new multiple choice proposal. + // + // Since: x/gov 1.0.0 + SubmitMultipleChoiceProposal(context.Context, *MsgSubmitMultipleChoiceProposal) (*MsgSubmitMultipleChoiceProposalResponse, error) mustEmbedUnimplementedMsgServer() } @@ -179,6 +197,9 @@ func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (* func (UnimplementedMsgServer) CancelProposal(context.Context, *MsgCancelProposal) (*MsgCancelProposalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelProposal not implemented") } +func (UnimplementedMsgServer) SubmitMultipleChoiceProposal(context.Context, *MsgSubmitMultipleChoiceProposal) (*MsgSubmitMultipleChoiceProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitMultipleChoiceProposal not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -318,6 +339,24 @@ func _Msg_CancelProposal_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _Msg_SubmitMultipleChoiceProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSubmitMultipleChoiceProposal) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SubmitMultipleChoiceProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_SubmitMultipleChoiceProposal_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SubmitMultipleChoiceProposal(ctx, req.(*MsgSubmitMultipleChoiceProposal)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -353,6 +392,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "CancelProposal", Handler: _Msg_CancelProposal_Handler, }, + { + MethodName: "SubmitMultipleChoiceProposal", + Handler: _Msg_SubmitMultipleChoiceProposal_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/gov/v1/tx.proto", diff --git a/docs/architecture/adr-069-gov-improvements.md b/docs/architecture/adr-069-gov-improvements.md index 70ddcc4bd5c4..6e6560df7176 100644 --- a/docs/architecture/adr-069-gov-improvements.md +++ b/docs/architecture/adr-069-gov-improvements.md @@ -87,7 +87,7 @@ Submitting a new multiple choice proposal will use a different message than the ```protobuf message MsgSubmitMultipleChoiceProposal { - repeated cosmos.base.v1beta1.Coin initial_deposit = 1 + repeated cosmos.base.v1beta1.Coin initial_deposit = 1; string proposer = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; string metadata = 3; string title = 4; diff --git a/proto/cosmos/gov/v1/gov.proto b/proto/cosmos/gov/v1/gov.proto index 52f7e7f40570..7753cedd6cd2 100644 --- a/proto/cosmos/gov/v1/gov.proto +++ b/proto/cosmos/gov/v1/gov.proto @@ -139,7 +139,7 @@ message Proposal { // proposal_type defines the type of the proposal // - // Since: cosmos-sdk 0.51 + // Since: x/gov v1.0.0 ProposalType proposal_type = 16; } @@ -164,6 +164,27 @@ enum ProposalStatus { PROPOSAL_STATUS_FAILED = 5; } +// ProposalVoteOptions defines the stringified vote options for proposals. +// This allows to support multiple choice options for a given proposal. +// +// Since: x/gov v1.0.0 +message ProposalVoteOptions { + // option_one is the first option of the proposal + string option_one = 1; + + // option_two is the second option of the proposal + string option_two = 2; + + // option_three is the third option of the proposal + string option_three = 3; + + // option_four is the fourth option of the proposal + string option_four = 4; + + // option_spam is always present for all proposals. + string option_spam = 5; +} + // TallyResult defines a standard tally for a governance proposal. message TallyResult { // yes_count is the number of yes votes on a proposal. @@ -314,6 +335,8 @@ message Params { // If the proposal is cancelled before the max cancel period, the deposit will be returned/burn to the // depositors, according to the proposal_cancel_ratio and proposal_cancel_dest parameters. // After the max cancel period, the proposal cannot be cancelled anymore. + // + // Since: x/gov v1.0.0 string proposal_cancel_max_period = 17 [(cosmos_proto.scalar) = "cosmos.Dec"]; // optimistic_authorized_addresses is an optional governance parameter that limits the authorized accounts than can diff --git a/proto/cosmos/gov/v1/query.proto b/proto/cosmos/gov/v1/query.proto index 2477c8a58a69..44fe3740f36c 100644 --- a/proto/cosmos/gov/v1/query.proto +++ b/proto/cosmos/gov/v1/query.proto @@ -55,6 +55,11 @@ service Query { rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) { option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/tally"; } + + // ProposalVoteOptions queries the valid voting options for a proposal. + rpc ProposalVoteOptions(QueryProposalVoteOptionsRequest) returns (QueryProposalVoteOptionsResponse) { + option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/vote_options"; + } } // QueryConstitutionRequest is the request type for the Query/Constitution RPC method @@ -203,3 +208,15 @@ message QueryTallyResultResponse { // tally defines the requested tally. TallyResult tally = 1; } + +// QueryProposalVoteOptionsRequest is the request type for the Query/ProposalVoteOptions RPC method. +message QueryProposalVoteOptionsRequest { + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; +} + +// QueryProposalVoteOptionsResponse is the response type for the Query/ProposalVoteOptions RPC method. +message QueryProposalVoteOptionsResponse { + // vote_options defines the valid voting options for a proposal. + ProposalVoteOptions vote_options = 1; +} \ No newline at end of file diff --git a/proto/cosmos/gov/v1/tx.proto b/proto/cosmos/gov/v1/tx.proto index 78577d443d21..91f63d6b00f3 100644 --- a/proto/cosmos/gov/v1/tx.proto +++ b/proto/cosmos/gov/v1/tx.proto @@ -43,6 +43,11 @@ service Msg { // // Since: cosmos-sdk 0.50 rpc CancelProposal(MsgCancelProposal) returns (MsgCancelProposalResponse); + + // SubmitMultipleChoiceProposal defines a method to create new multiple choice proposal. + // + // Since: x/gov 1.0.0 + rpc SubmitMultipleChoiceProposal(MsgSubmitMultipleChoiceProposal) returns (MsgSubmitMultipleChoiceProposalResponse); } // MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary @@ -89,7 +94,7 @@ message MsgSubmitProposal { // proposal_type defines the type of proposal // When not set defaults to PROPOSAL_TYPE_STANDARD // - // Since: cosmos-sdk 0.51 + // Since: x/gov v1.0.0 ProposalType proposal_type = 8; } @@ -220,3 +225,41 @@ message MsgCancelProposalResponse { // canceled_height defines the block height at which the proposal is canceled. uint64 canceled_height = 3; } + +// MsgSubmitMultipleChoiceProposal defines a message to submit a multiple choice proposal. +// +// Since: x/gov 1.0.0 +message MsgSubmitMultipleChoiceProposal { + option (cosmos.msg.v1.signer) = "proposer"; + + // initial_deposit is the deposit value that must be paid at proposal submission. + repeated cosmos.base.v1beta1.Coin initial_deposit = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (amino.dont_omitempty) = true, + (amino.encoding) = "legacy_coins" + ]; + + // proposer is the account address of the proposer. + string proposer = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // metadata is any arbitrary metadata attached to the proposal. + string metadata = 3; + + // title is the title of the proposal. + string title = 4; + + // summary is the summary of the proposal + string summary = 5; + + // vote_options defines the vote options for the proposal. + ProposalVoteOptions vote_options = 6; +} + +// MsgSubmitMultipleChoiceProposalResponse defines the Msg/SubmitMultipleChoiceProposal response type. +// +// Since: x/gov 1.0.0 +message MsgSubmitMultipleChoiceProposalResponse { + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; +} diff --git a/x/gov/CHANGELOG.md b/x/gov/CHANGELOG.md index d163d93e6f46..a22fc538d9d4 100644 --- a/x/gov/CHANGELOG.md +++ b/x/gov/CHANGELOG.md @@ -30,6 +30,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#18532](https://github.com/cosmos/cosmos-sdk/pull/18532) Add SPAM vote to proposals. * [#18532](https://github.com/cosmos/cosmos-sdk/pull/18532) Add proposal types to proposals. * [#18620](https://github.com/cosmos/cosmos-sdk/pull/18620) Add optimistic proposals. +* [#18762](https://github.com/cosmos/cosmos-sdk/pull/18762) Add multiple choice proposals. ### Improvements diff --git a/x/gov/README.md b/x/gov/README.md index cef4b35d6904..1f5538746292 100644 --- a/x/gov/README.md +++ b/x/gov/README.md @@ -461,12 +461,21 @@ More information on how to submit proposals in the [client section](#client). ### Proposal Submission -Proposals can be submitted by any account via a `MsgSubmitProposal` transaction. +Proposals can be submitted by any account via a `MsgSubmitProposal` or a `MsgSubmitMultipleChoiceProposal` transaction. ```protobuf reference https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/gov/v1/tx.proto#L42-L69 ``` +:::note +A multiple choice proposal is a proposal where the voting options can be defined by the proposer. +It cannot have messages to execute. It is only a text proposal. +::: + +:::warning +Submitting a multiple choice proposal using `MsgSubmitProposal` is invalid, as vote options cannot be defined. +::: + All `sdk.Msgs` passed into the `messages` field of a `MsgSubmitProposal` message must be registered in the app's `MsgServiceRouter`. Each of these messages must have one signer, namely the gov module account. And finally, the metadata length @@ -540,7 +549,7 @@ The governance module emits the following events: ### Handlers -#### MsgSubmitProposal +#### MsgSubmitProposal, MsgSubmitMultipleChoiceProposal | Type | Attribute Key | Attribute Value | | ------------------- | ------------------- | --------------- | diff --git a/x/gov/keeper/deposit.go b/x/gov/keeper/deposit.go index 196fe346e590..b0c6ed7926bf 100644 --- a/x/gov/keeper/deposit.go +++ b/x/gov/keeper/deposit.go @@ -17,17 +17,17 @@ import ( ) // SetDeposit sets a Deposit to the gov store -func (keeper Keeper) SetDeposit(ctx context.Context, deposit v1.Deposit) error { - depositor, err := keeper.authKeeper.AddressCodec().StringToBytes(deposit.Depositor) +func (k Keeper) SetDeposit(ctx context.Context, deposit v1.Deposit) error { + depositor, err := k.authKeeper.AddressCodec().StringToBytes(deposit.Depositor) if err != nil { return err } - return keeper.Deposits.Set(ctx, collections.Join(deposit.ProposalId, sdk.AccAddress(depositor)), deposit) + return k.Deposits.Set(ctx, collections.Join(deposit.ProposalId, sdk.AccAddress(depositor)), deposit) } // GetDeposits returns all the deposits of a proposal -func (keeper Keeper) GetDeposits(ctx context.Context, proposalID uint64) (deposits v1.Deposits, err error) { - err = keeper.IterateDeposits(ctx, proposalID, func(_ collections.Pair[uint64, sdk.AccAddress], deposit v1.Deposit) (bool, error) { +func (k Keeper) GetDeposits(ctx context.Context, proposalID uint64) (deposits v1.Deposits, err error) { + err = k.IterateDeposits(ctx, proposalID, func(_ collections.Pair[uint64, sdk.AccAddress], deposit v1.Deposit) (bool, error) { deposits = append(deposits, &deposit) return false, nil }) @@ -35,23 +35,23 @@ func (keeper Keeper) GetDeposits(ctx context.Context, proposalID uint64) (deposi } // DeleteAndBurnDeposits deletes and burns all the deposits on a specific proposal. -func (keeper Keeper) DeleteAndBurnDeposits(ctx context.Context, proposalID uint64) error { +func (k Keeper) DeleteAndBurnDeposits(ctx context.Context, proposalID uint64) error { coinsToBurn := sdk.NewCoins() - err := keeper.IterateDeposits(ctx, proposalID, func(key collections.Pair[uint64, sdk.AccAddress], deposit v1.Deposit) (stop bool, err error) { + err := k.IterateDeposits(ctx, proposalID, func(key collections.Pair[uint64, sdk.AccAddress], deposit v1.Deposit) (stop bool, err error) { coinsToBurn = coinsToBurn.Add(deposit.Amount...) - return false, keeper.Deposits.Remove(ctx, key) + return false, k.Deposits.Remove(ctx, key) }) if err != nil { return err } - return keeper.bankKeeper.BurnCoins(ctx, keeper.authKeeper.GetModuleAddress(types.ModuleName), coinsToBurn) + return k.bankKeeper.BurnCoins(ctx, k.authKeeper.GetModuleAddress(types.ModuleName), coinsToBurn) } // IterateDeposits iterates over all the proposals deposits and performs a callback function -func (keeper Keeper) IterateDeposits(ctx context.Context, proposalID uint64, cb func(key collections.Pair[uint64, sdk.AccAddress], value v1.Deposit) (bool, error)) error { +func (k Keeper) IterateDeposits(ctx context.Context, proposalID uint64, cb func(key collections.Pair[uint64, sdk.AccAddress], value v1.Deposit) (bool, error)) error { rng := collections.NewPrefixedPairRange[uint64, sdk.AccAddress](proposalID) - if err := keeper.Deposits.Walk(ctx, rng, cb); err != nil { + if err := k.Deposits.Walk(ctx, rng, cb); err != nil { return err } @@ -60,9 +60,9 @@ func (keeper Keeper) IterateDeposits(ctx context.Context, proposalID uint64, cb // AddDeposit adds or updates a deposit of a specific depositor on a specific proposal. // Activates voting period when appropriate and returns true in that case, else returns false. -func (keeper Keeper) AddDeposit(ctx context.Context, proposalID uint64, depositorAddr sdk.AccAddress, depositAmount sdk.Coins) (bool, error) { +func (k Keeper) AddDeposit(ctx context.Context, proposalID uint64, depositorAddr sdk.AccAddress, depositAmount sdk.Coins) (bool, error) { // Checks to see if proposal exists - proposal, err := keeper.Proposals.Get(ctx, proposalID) + proposal, err := k.Proposals.Get(ctx, proposalID) if err != nil { return false, err } @@ -73,7 +73,7 @@ func (keeper Keeper) AddDeposit(ctx context.Context, proposalID uint64, deposito } // Check coins to be deposited match the proposal's deposit params - params, err := keeper.Params.Get(ctx) + params, err := k.Params.Get(ctx) if err != nil { return false, err } @@ -85,7 +85,7 @@ func (keeper Keeper) AddDeposit(ctx context.Context, proposalID uint64, deposito } // the deposit must only contain valid denoms (listed in the min deposit param) - if err := keeper.validateDepositDenom(ctx, params, depositAmount); err != nil { + if err := k.validateDepositDenom(ctx, params, depositAmount); err != nil { return false, err } @@ -121,14 +121,14 @@ func (keeper Keeper) AddDeposit(ctx context.Context, proposalID uint64, deposito } // update the governance module's account coins pool - err = keeper.bankKeeper.SendCoinsFromAccountToModule(ctx, depositorAddr, types.ModuleName, depositAmount) + err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, depositorAddr, types.ModuleName, depositAmount) if err != nil { return false, err } // Update proposal proposal.TotalDeposit = sdk.NewCoins(proposal.TotalDeposit...).Add(depositAmount...) - err = keeper.SetProposal(ctx, proposal) + err = k.SetProposal(ctx, proposal) if err != nil { return false, err } @@ -136,7 +136,7 @@ func (keeper Keeper) AddDeposit(ctx context.Context, proposalID uint64, deposito // Check if deposit has provided sufficient total funds to transition the proposal into the voting period activatedVotingPeriod := false if proposal.Status == v1.StatusDepositPeriod && sdk.NewCoins(proposal.TotalDeposit...).IsAllGTE(minDepositAmount) { - err = keeper.ActivateVotingPeriod(ctx, proposal) + err = k.ActivateVotingPeriod(ctx, proposal) if err != nil { return false, err } @@ -145,7 +145,7 @@ func (keeper Keeper) AddDeposit(ctx context.Context, proposalID uint64, deposito } // Add or update deposit object - deposit, err := keeper.Deposits.Get(ctx, collections.Join(proposalID, depositorAddr)) + deposit, err := k.Deposits.Get(ctx, collections.Join(proposalID, depositorAddr)) switch { case err == nil: // deposit exists @@ -159,7 +159,7 @@ func (keeper Keeper) AddDeposit(ctx context.Context, proposalID uint64, deposito } // called when deposit has been added to a proposal, however the proposal may not be active - err = keeper.Hooks().AfterProposalDeposit(ctx, proposalID, depositorAddr) + err = k.Hooks().AfterProposalDeposit(ctx, proposalID, depositorAddr) if err != nil { return false, err } @@ -173,7 +173,7 @@ func (keeper Keeper) AddDeposit(ctx context.Context, proposalID uint64, deposito ), ) - err = keeper.SetDeposit(ctx, deposit) + err = k.SetDeposit(ctx, deposit) if err != nil { return false, err } @@ -184,17 +184,17 @@ func (keeper Keeper) AddDeposit(ctx context.Context, proposalID uint64, deposito // ChargeDeposit will charge proposal cancellation fee (deposits * proposal_cancel_burn_rate) and // send to a destAddress if defined or burn otherwise. // Remaining funds are send back to the depositor. -func (keeper Keeper) ChargeDeposit(ctx context.Context, proposalID uint64, destAddress, proposalCancelRate string) error { +func (k Keeper) ChargeDeposit(ctx context.Context, proposalID uint64, destAddress, proposalCancelRate string) error { rate := sdkmath.LegacyMustNewDecFromStr(proposalCancelRate) var cancellationCharges sdk.Coins - deposits, err := keeper.GetDeposits(ctx, proposalID) + deposits, err := k.GetDeposits(ctx, proposalID) if err != nil { return err } for _, deposit := range deposits { - depositerAddress, err := keeper.authKeeper.AddressCodec().StringToBytes(deposit.Depositor) + depositerAddress, err := k.authKeeper.AddressCodec().StringToBytes(deposit.Depositor) if err != nil { return err } @@ -219,14 +219,14 @@ func (keeper Keeper) ChargeDeposit(ctx context.Context, proposalID uint64, destA } if !remainingAmount.IsZero() { - err := keeper.bankKeeper.SendCoinsFromModuleToAccount( + err := k.bankKeeper.SendCoinsFromModuleToAccount( ctx, types.ModuleName, depositerAddress, remainingAmount, ) if err != nil { return err } } - err = keeper.Deposits.Remove(ctx, collections.Join(deposit.ProposalId, sdk.AccAddress(depositerAddress))) + err = k.Deposits.Remove(ctx, collections.Join(deposit.ProposalId, sdk.AccAddress(depositerAddress))) if err != nil { return err } @@ -235,25 +235,25 @@ func (keeper Keeper) ChargeDeposit(ctx context.Context, proposalID uint64, destA // burn the cancellation fee or send the cancellation charges to destination address. if !cancellationCharges.IsZero() { // get the pool module account address - poolAddress := keeper.authKeeper.GetModuleAddress(pooltypes.ModuleName) + poolAddress := k.authKeeper.GetModuleAddress(pooltypes.ModuleName) switch { case destAddress == "": // burn the cancellation charges from deposits - err := keeper.bankKeeper.BurnCoins(ctx, keeper.authKeeper.GetModuleAddress(types.ModuleName), cancellationCharges) + err := k.bankKeeper.BurnCoins(ctx, k.authKeeper.GetModuleAddress(types.ModuleName), cancellationCharges) if err != nil { return err } case poolAddress.String() == destAddress: - err := keeper.poolKeeper.FundCommunityPool(ctx, cancellationCharges, keeper.ModuleAccountAddress()) + err := k.poolKeeper.FundCommunityPool(ctx, cancellationCharges, k.ModuleAccountAddress()) if err != nil { return err } default: - destAccAddress, err := keeper.authKeeper.AddressCodec().StringToBytes(destAddress) + destAccAddress, err := k.authKeeper.AddressCodec().StringToBytes(destAddress) if err != nil { return err } - err = keeper.bankKeeper.SendCoinsFromModuleToAccount( + err = k.bankKeeper.SendCoinsFromModuleToAccount( ctx, types.ModuleName, destAccAddress, cancellationCharges, ) if err != nil { @@ -266,14 +266,14 @@ func (keeper Keeper) ChargeDeposit(ctx context.Context, proposalID uint64, destA } // RefundAndDeleteDeposits refunds and deletes all the deposits on a specific proposal. -func (keeper Keeper) RefundAndDeleteDeposits(ctx context.Context, proposalID uint64) error { - return keeper.IterateDeposits(ctx, proposalID, func(key collections.Pair[uint64, sdk.AccAddress], deposit v1.Deposit) (bool, error) { +func (k Keeper) RefundAndDeleteDeposits(ctx context.Context, proposalID uint64) error { + return k.IterateDeposits(ctx, proposalID, func(key collections.Pair[uint64, sdk.AccAddress], deposit v1.Deposit) (bool, error) { depositor := key.K2() - err := keeper.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, depositor, deposit.Amount) + err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, depositor, deposit.Amount) if err != nil { return false, err } - err = keeper.Deposits.Remove(ctx, key) + err = k.Deposits.Remove(ctx, key) return false, err }) } @@ -281,7 +281,7 @@ func (keeper Keeper) RefundAndDeleteDeposits(ctx context.Context, proposalID uin // validateInitialDeposit validates if initial deposit is greater than or equal to the minimum // required at the time of proposal submission. This threshold amount is determined by // the deposit parameters. Returns nil on success, error otherwise. -func (keeper Keeper) validateInitialDeposit(ctx context.Context, params v1.Params, initialDeposit sdk.Coins, proposalType v1.ProposalType) error { +func (k Keeper) validateInitialDeposit(ctx context.Context, params v1.Params, initialDeposit sdk.Coins, proposalType v1.ProposalType) error { if !initialDeposit.IsValid() || initialDeposit.IsAnyNegative() { return errors.Wrap(sdkerrors.ErrInvalidCoins, initialDeposit.String()) } @@ -312,7 +312,7 @@ func (keeper Keeper) validateInitialDeposit(ctx context.Context, params v1.Param } // validateDepositDenom validates if the deposit denom is accepted by the governance module. -func (keeper Keeper) validateDepositDenom(ctx context.Context, params v1.Params, depositAmount sdk.Coins) error { +func (k Keeper) validateDepositDenom(ctx context.Context, params v1.Params, depositAmount sdk.Coins) error { denoms := []string{} acceptedDenoms := make(map[string]bool, len(params.MinDeposit)) for _, coin := range params.MinDeposit { diff --git a/x/gov/keeper/grpc_query.go b/x/gov/keeper/grpc_query.go index 936657930ee7..32421f8800aa 100644 --- a/x/gov/keeper/grpc_query.go +++ b/x/gov/keeper/grpc_query.go @@ -2,6 +2,7 @@ package keeper import ( "context" + stderrors "errors" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -17,7 +18,17 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" ) -var _ v1.QueryServer = queryServer{} +var ( + _ v1.QueryServer = queryServer{} + + defaultVoteOptions = &v1.ProposalVoteOptions{ + OptionOne: "yes", + OptionTwo: "abstain", + OptionThree: "no", + OptionFour: "no_with_veto", + OptionSpam: "spam", + } +) type queryServer struct{ k *Keeper } @@ -53,6 +64,49 @@ func (q queryServer) Proposal(ctx context.Context, req *v1.QueryProposalRequest) return nil, status.Error(codes.Internal, err.Error()) } +// ProposalVoteOptions returns the proposal votes options +// It returns the stringified vote options if the proposal is a multiple choice proposal +// Otherwise it returns the generic vote options +func (q queryServer) ProposalVoteOptions(ctx context.Context, req *v1.QueryProposalVoteOptionsRequest) (*v1.QueryProposalVoteOptionsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + if req.ProposalId == 0 { + return nil, status.Error(codes.InvalidArgument, "proposal id can not be 0") + } + + ok, err := q.k.Proposals.Has(ctx, req.ProposalId) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + if !ok { + return nil, status.Errorf(codes.NotFound, "proposal %d doesn't exist", req.ProposalId) + } + + voteOptions, err := q.k.ProposalVoteOptions.Get(ctx, req.ProposalId) + if err != nil { + if stderrors.Is(err, collections.ErrNotFound) { // fallback to generic vote options + return &v1.QueryProposalVoteOptionsResponse{ + VoteOptions: defaultVoteOptions, + }, nil + } + + return nil, status.Error(codes.Internal, err.Error()) + } + + return &v1.QueryProposalVoteOptionsResponse{ + VoteOptions: &v1.ProposalVoteOptions{ + OptionOne: voteOptions.OptionOne, + OptionTwo: voteOptions.OptionTwo, + OptionThree: voteOptions.OptionThree, + OptionFour: voteOptions.OptionFour, + OptionSpam: defaultVoteOptions.OptionSpam, + }, + }, nil +} + // Proposals implements the Query/Proposals gRPC method func (q queryServer) Proposals(ctx context.Context, req *v1.QueryProposalsRequest) (*v1.QueryProposalsResponse, error) { filteredProposals, pageRes, err := query.CollectionFilteredPaginate(ctx, q.k.Proposals, req.Pagination, func(key uint64, p v1.Proposal) (include bool, err error) { diff --git a/x/gov/keeper/grpc_query_test.go b/x/gov/keeper/grpc_query_test.go index e92700dc2a23..f204a1048c0e 100644 --- a/x/gov/keeper/grpc_query_test.go +++ b/x/gov/keeper/grpc_query_test.go @@ -68,13 +68,15 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposal() { }, } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + if tc.malleate != nil { + tc.malleate() + } proposalRes, err := queryClient.Proposal(gocontext.Background(), req) - if testCase.expPass { + if tc.expPass { suite.Require().NoError(err) suite.Require().NotEmpty(proposalRes.Proposal.String()) suite.Require().Equal(proposalRes.Proposal.String(), expProposal.String()) @@ -166,13 +168,15 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposal() { }, } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + if tc.malleate != nil { + tc.malleate() + } proposalRes, err := queryClient.Proposal(gocontext.Background(), req) - if testCase.expPass { + if tc.expPass { suite.Require().NoError(err) suite.Require().NotEmpty(proposalRes.Proposal.String()) suite.Require().Equal(proposalRes.Proposal.String(), expProposal.String()) @@ -373,13 +377,15 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() { }, } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + if tc.malleate != nil { + tc.malleate() + } proposals, err := queryClient.Proposals(gocontext.Background(), req) - if testCase.expPass { + if tc.expPass { suite.Require().NoError(err) suite.Require().Len(proposals.GetProposals(), len(expRes.GetProposals())) @@ -423,13 +429,15 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposals() { }, } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + if tc.malleate != nil { + tc.malleate() + } proposalRes, err := queryClient.Proposals(gocontext.Background(), req) - if testCase.expPass { + if tc.expPass { suite.Require().NoError(err) suite.Require().NotNil(proposalRes.Proposals) suite.Require().Equal(len(proposalRes.Proposals), 1) @@ -539,13 +547,15 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() { }, } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + if tc.malleate != nil { + tc.malleate() + } vote, err := queryClient.Vote(gocontext.Background(), req) - if testCase.expPass { + if tc.expPass { suite.Require().NoError(err) suite.Require().Equal(expRes, vote) } else { @@ -654,13 +664,15 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVote() { }, } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + if tc.malleate != nil { + tc.malleate() + } vote, err := queryClient.Vote(gocontext.Background(), req) - if testCase.expPass { + if tc.expPass { suite.Require().NoError(err) suite.Require().Equal(expRes, vote) } else { @@ -758,13 +770,15 @@ func (suite *KeeperTestSuite) TestGRPCQueryVotes() { }, } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + if tc.malleate != nil { + tc.malleate() + } votes, err := queryClient.Votes(gocontext.Background(), req) - if testCase.expPass { + if tc.expPass { suite.Require().NoError(err) suite.Require().Equal(expRes.GetVotes(), votes.GetVotes()) } else { @@ -863,13 +877,15 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVotes() { }, } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + if tc.malleate != nil { + tc.malleate() + } votes, err := queryClient.Votes(gocontext.Background(), req) - if testCase.expPass { + if tc.expPass { suite.Require().NoError(err) suite.Require().Equal(expRes.GetVotes(), votes.GetVotes()) } else { @@ -945,13 +961,15 @@ func (suite *KeeperTestSuite) TestGRPCQueryParams() { }, } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + if tc.malleate != nil { + tc.malleate() + } params, err := queryClient.Params(gocontext.Background(), req) - if testCase.expPass { + if tc.expPass { suite.Require().NoError(err) suite.Require().Equal(expRes.GetDepositParams(), params.GetDepositParams()) //nolint:staticcheck // SA1019: params.MinDeposit is deprecated: Use MinInitialDeposit instead. suite.Require().Equal(expRes.GetVotingParams(), params.GetVotingParams()) //nolint:staticcheck // SA1019: params.VotingPeriod is deprecated: Use VotingPeriod instead. @@ -1035,13 +1053,15 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryParams() { }, } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + if tc.malleate != nil { + tc.malleate() + } params, err := queryClient.Params(gocontext.Background(), req) - if testCase.expPass { + if tc.expPass { suite.Require().NoError(err) suite.Require().Equal(expRes.GetDepositParams(), params.GetDepositParams()) suite.Require().Equal(expRes.GetVotingParams(), params.GetVotingParams()) @@ -1140,13 +1160,15 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { }, } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + if tc.malleate != nil { + tc.malleate() + } deposit, err := queryClient.Deposit(gocontext.Background(), req) - if testCase.expPass { + if tc.expPass { suite.Require().NoError(err) suite.Require().Equal(deposit.GetDeposit(), expRes.GetDeposit()) } else { @@ -1243,13 +1265,15 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposit() { }, } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + if tc.malleate != nil { + tc.malleate() + } deposit, err := queryClient.Deposit(gocontext.Background(), req) - if testCase.expPass { + if tc.expPass { suite.Require().NoError(err) suite.Require().Equal(deposit.GetDeposit(), expRes.GetDeposit()) } else { @@ -1339,13 +1363,15 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposits() { }, } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + if tc.malleate != nil { + tc.malleate() + } deposits, err := queryClient.Deposits(gocontext.Background(), req) - if testCase.expPass { + if tc.expPass { suite.Require().NoError(err) suite.Require().Equal(expRes.GetDeposits(), deposits.GetDeposits()) } else { @@ -1438,13 +1464,15 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposits() { }, } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + if tc.malleate != nil { + tc.malleate() + } deposits, err := queryClient.Deposits(gocontext.Background(), req) - if testCase.expPass { + if tc.expPass { suite.Require().NoError(err) suite.Require().Equal(expRes.GetDeposits(), deposits.GetDeposits()) } else { @@ -1580,13 +1608,15 @@ func (suite *KeeperTestSuite) TestGRPCQueryTallyResult() { }, } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + if tc.malleate != nil { + tc.malleate() + } tallyRes, err := queryClient.TallyResult(gocontext.Background(), req) - if testCase.expPass { + if tc.expPass { suite.Require().NoError(err) suite.Require().NotEmpty(tallyRes.Tally.String()) suite.Require().Equal(expTally.String(), tallyRes.Tally.String()) @@ -1719,13 +1749,15 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryTallyResult() { }, } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + if tc.malleate != nil { + tc.malleate() + } tallyRes, err := queryClient.TallyResult(gocontext.Background(), req) - if testCase.expPass { + if tc.expPass { suite.Require().NoError(err) suite.Require().NotEmpty(tallyRes.Tally.String()) suite.Require().Equal(expTally.String(), tallyRes.Tally.String()) @@ -1736,3 +1768,133 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryTallyResult() { }) } } + +func (suite *KeeperTestSuite) TestProposalVoteOptions() { + suite.reset() + + testCases := []struct { + name string + malleate func() + req *v1.QueryProposalVoteOptionsRequest + expResp *v1.QueryProposalVoteOptionsResponse + errStr string + }{ + { + name: "invalid proposal id", + req: &v1.QueryProposalVoteOptionsRequest{}, + errStr: "proposal id can not be 0", + }, + { + name: "proposal not found", + req: &v1.QueryProposalVoteOptionsRequest{ProposalId: 1}, + errStr: "proposal 1 doesn't exist", + }, + { + name: "non multiple choice proposal", + malleate: func() { + propTime := time.Now() + proposal := v1.Proposal{ + Id: 1, + Status: v1.StatusVotingPeriod, + SubmitTime: &propTime, + VotingStartTime: &propTime, + VotingEndTime: &propTime, + Metadata: "proposal metadata", + ProposalType: v1.ProposalType_PROPOSAL_TYPE_STANDARD, + } + err := suite.govKeeper.SetProposal(suite.ctx, proposal) + suite.Require().NoError(err) + }, + req: &v1.QueryProposalVoteOptionsRequest{ProposalId: 1}, + expResp: &v1.QueryProposalVoteOptionsResponse{ + VoteOptions: &v1.ProposalVoteOptions{ + OptionOne: "yes", + OptionTwo: "abstain", + OptionThree: "no", + OptionFour: "no_with_veto", + OptionSpam: "spam", + }, + }, + }, + { + name: "invalid multiple choice proposal", + req: &v1.QueryProposalVoteOptionsRequest{ProposalId: 2}, + malleate: func() { + propTime := time.Now() + proposal := v1.Proposal{ + Id: 2, + Status: v1.StatusVotingPeriod, + SubmitTime: &propTime, + VotingStartTime: &propTime, + VotingEndTime: &propTime, + Metadata: "proposal metadata", + ProposalType: v1.ProposalType_PROPOSAL_TYPE_MULTIPLE_CHOICE, + } + err := suite.govKeeper.SetProposal(suite.ctx, proposal) + suite.Require().NoError(err) + + // multiple choice proposal, but no vote options set + // because the query does not check the proposal type, + // it falls back to the default vote options + }, + expResp: &v1.QueryProposalVoteOptionsResponse{ + VoteOptions: &v1.ProposalVoteOptions{ + OptionOne: "yes", + OptionTwo: "abstain", + OptionThree: "no", + OptionFour: "no_with_veto", + OptionSpam: "spam", + }, + }, + }, + { + name: "multiple choice proposal", + req: &v1.QueryProposalVoteOptionsRequest{ProposalId: 3}, + malleate: func() { + propTime := time.Now() + proposal := v1.Proposal{ + Id: 3, + Status: v1.StatusVotingPeriod, + SubmitTime: &propTime, + VotingStartTime: &propTime, + VotingEndTime: &propTime, + Metadata: "proposal metadata", + ProposalType: v1.ProposalType_PROPOSAL_TYPE_MULTIPLE_CHOICE, + } + err := suite.govKeeper.SetProposal(suite.ctx, proposal) + suite.Require().NoError(err) + err = suite.govKeeper.ProposalVoteOptions.Set(suite.ctx, proposal.Id, v1.ProposalVoteOptions{ + OptionOne: "Vote for @tac0turle", + OptionTwo: "Vote for @facudomedica", + OptionThree: "Vote for @alexanderbez", + }) + suite.Require().NoError(err) + }, + expResp: &v1.QueryProposalVoteOptionsResponse{ + VoteOptions: &v1.ProposalVoteOptions{ + OptionOne: "Vote for @tac0turle", + OptionTwo: "Vote for @facudomedica", + OptionThree: "Vote for @alexanderbez", + OptionSpam: "spam", + }, + }, + }, + } + + for _, tc := range testCases { + suite.Run(tc.name, func() { + if tc.malleate != nil { + tc.malleate() + } + + resp, err := suite.queryClient.ProposalVoteOptions(suite.ctx, tc.req) + if tc.errStr != "" { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.errStr) + } else { + suite.Require().NoError(err) + suite.Require().Equal(tc.expResp, resp) + } + }) + } +} diff --git a/x/gov/keeper/keeper.go b/x/gov/keeper/keeper.go index 9cefe1f50853..0e882c7fba83 100644 --- a/x/gov/keeper/keeper.go +++ b/x/gov/keeper/keeper.go @@ -48,16 +48,22 @@ type Keeper struct { // should be the x/gov module account. authority string - Schema collections.Schema + Schema collections.Schema + // Constitution value: constitution Constitution collections.Item[string] - Params collections.Item[v1.Params] + // Params stores the governance parameters + Params collections.Item[v1.Params] // Deposits key: proposalID+depositorAddr | value: Deposit Deposits collections.Map[collections.Pair[uint64, sdk.AccAddress], v1.Deposit] // Votes key: proposalID+voterAddr | value: Vote - Votes collections.Map[collections.Pair[uint64, sdk.AccAddress], v1.Vote] + Votes collections.Map[collections.Pair[uint64, sdk.AccAddress], v1.Vote] + // ProposalID is a counter for proposals. It tracks the next proposal ID to be issued. ProposalID collections.Sequence // Proposals key:proposalID | value: Proposal Proposals collections.Map[uint64, v1.Proposal] + // ProposalVoteOptions key: proposalID | value: + // This is used to store multiple choice vote options + ProposalVoteOptions collections.Map[uint64, v1.ProposalVoteOptions] // ActiveProposalsQueue key: votingEndTime+proposalID | value: proposalID ActiveProposalsQueue collections.Map[collections.Pair[time.Time, uint64], uint64] // TODO(tip): this should be simplified and go into an index. // InactiveProposalsQueue key: depositEndTime+proposalID | value: proposalID @@ -123,6 +129,7 @@ func NewKeeper( Votes: collections.NewMap(sb, types.VotesKeyPrefix, "votes", collections.PairKeyCodec(collections.Uint64Key, sdk.LengthPrefixedAddressKey(sdk.AccAddressKey)), codec.CollValue[v1.Vote](cdc)), //nolint: staticcheck // sdk.LengthPrefixedAddressKey is needed to retain state compatibility ProposalID: collections.NewSequence(sb, types.ProposalIDKey, "proposal_id"), Proposals: collections.NewMap(sb, types.ProposalsKeyPrefix, "proposals", collections.Uint64Key, codec.CollValue[v1.Proposal](cdc)), + ProposalVoteOptions: collections.NewMap(sb, types.ProposalVoteOptionsKeyPrefix, "proposal_vote_options", collections.Uint64Key, codec.CollValue[v1.ProposalVoteOptions](cdc)), ActiveProposalsQueue: collections.NewMap(sb, types.ActiveProposalQueuePrefix, "active_proposals_queue", collections.PairKeyCodec(sdk.TimeKey, collections.Uint64Key), collections.Uint64Value), // sdk.TimeKey is needed to retain state compatibility InactiveProposalsQueue: collections.NewMap(sb, types.InactiveProposalQueuePrefix, "inactive_proposals_queue", collections.PairKeyCodec(sdk.TimeKey, collections.Uint64Key), collections.Uint64Value), // sdk.TimeKey is needed to retain state compatibility VotingPeriodProposals: collections.NewMap(sb, types.VotingPeriodProposalKeyPrefix, "voting_period_proposals", collections.Uint64Key, collections.BytesValue), @@ -135,7 +142,7 @@ func NewKeeper( return k } -// Hooks gets the hooks for governance *Keeper { +// Hooks gets the hooks for governance Keeper func (k *Keeper) Hooks() types.GovHooks { if k.hooks == nil { // return a no-op implementation if no hooks are set diff --git a/x/gov/keeper/keeper_test.go b/x/gov/keeper/keeper_test.go index de8793aa7db2..f24149a42183 100644 --- a/x/gov/keeper/keeper_test.go +++ b/x/gov/keeper/keeper_test.go @@ -49,7 +49,7 @@ func (suite *KeeperTestSuite) reset() { // Populate the gov account with some coins, as the TestProposal we have // is a MsgSend from the gov account. - coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(1000000))) err := bankKeeper.MintCoins(suite.ctx, mintModuleName, coins) suite.NoError(err) err = bankKeeper.SendCoinsFromModuleToModule(ctx, mintModuleName, types.ModuleName, coins) diff --git a/x/gov/keeper/msg_server.go b/x/gov/keeper/msg_server.go index be48b00c5dc3..af910d8b3916 100644 --- a/x/gov/keeper/msg_server.go +++ b/x/gov/keeper/msg_server.go @@ -118,6 +118,45 @@ func (k msgServer) SubmitProposal(goCtx context.Context, msg *v1.MsgSubmitPropos }, nil } +// SubmitMultipleChoiceProposal implements the MsgServer.SubmitMultipleChoiceProposal method. +func (k msgServer) SubmitMultipleChoiceProposal(ctx context.Context, msg *v1.MsgSubmitMultipleChoiceProposal) (*v1.MsgSubmitMultipleChoiceProposalResponse, error) { + resp, err := k.SubmitProposal(ctx, &v1.MsgSubmitProposal{ + InitialDeposit: msg.InitialDeposit, + Proposer: msg.Proposer, + Title: msg.Title, + Summary: msg.Summary, + Metadata: msg.Metadata, + ProposalType: v1.ProposalType_PROPOSAL_TYPE_MULTIPLE_CHOICE, + }) + if err != nil { + return nil, err + } + + if msg.VoteOptions == nil { + return nil, sdkerrors.ErrInvalidRequest.Wrap("vote options cannot be nil") + } + + // check that if a vote option is provided, the previous one is also provided + if (msg.VoteOptions.OptionTwo != "" && msg.VoteOptions.OptionOne == "") || + (msg.VoteOptions.OptionThree != "" && msg.VoteOptions.OptionTwo == "") || + (msg.VoteOptions.OptionFour != "" && msg.VoteOptions.OptionThree == "") { + return nil, sdkerrors.ErrInvalidRequest.Wrap("if a vote option is provided, the previous one must also be provided") + } + + // check that at least two vote options are provided + if msg.VoteOptions.OptionOne == "" && msg.VoteOptions.OptionTwo == "" { + return nil, sdkerrors.ErrInvalidRequest.Wrap("vote options cannot be empty, two or more options must be provided") + } + + if err := k.ProposalVoteOptions.Set(ctx, resp.ProposalId, *msg.VoteOptions); err != nil { + return nil, err + } + + return &v1.MsgSubmitMultipleChoiceProposalResponse{ + ProposalId: resp.ProposalId, + }, nil +} + // CancelProposal implements the MsgServer.CancelProposal method. func (k msgServer) CancelProposal(goCtx context.Context, msg *v1.MsgCancelProposal) (*v1.MsgCancelProposalResponse, error) { _, err := k.authKeeper.AddressCodec().StringToBytes(msg.Proposer) diff --git a/x/gov/keeper/msg_server_test.go b/x/gov/keeper/msg_server_test.go index d7332af8ba2f..af0b4dd9730a 100644 --- a/x/gov/keeper/msg_server_test.go +++ b/x/gov/keeper/msg_server_test.go @@ -298,6 +298,83 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { } } +// TestSubmitMultipleChoiceProposal tests only multiple choice proposal specific logic. +// Internally the message uses MsgSubmitProposal, which is tested above. +func (suite *KeeperTestSuite) TestSubmitMultipleChoiceProposal() { + suite.reset() + addrs := suite.addrs + proposer := addrs[0] + initialDeposit := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) + + cases := map[string]struct { + preRun func() (*v1.MsgSubmitMultipleChoiceProposal, error) + expErr bool + expErrMsg string + }{ + "empty options": { + preRun: func() (*v1.MsgSubmitMultipleChoiceProposal, error) { + return v1.NewMultipleChoiceMsgSubmitProposal( + initialDeposit, + proposer.String(), + "mandatory metadata", + "Proposal", + "description of proposal", + &v1.ProposalVoteOptions{}, + ) + }, + expErr: true, + expErrMsg: "vote options cannot be empty, two or more options must be provided", + }, + "invalid options": { + preRun: func() (*v1.MsgSubmitMultipleChoiceProposal, error) { + return v1.NewMultipleChoiceMsgSubmitProposal( + initialDeposit, + proposer.String(), + "mandatory metadata", + "Proposal", + "description of proposal", + &v1.ProposalVoteOptions{ + OptionOne: "Vote for me", + OptionFour: "Vote for them", + }, + ) + }, + expErr: true, + expErrMsg: "if a vote option is provided, the previous one must also be provided", + }, + "valid proposal": { + preRun: func() (*v1.MsgSubmitMultipleChoiceProposal, error) { + return v1.NewMultipleChoiceMsgSubmitProposal( + initialDeposit, + proposer.String(), + "mandatory metadata", + "Proposal", + "description of proposal", + &v1.ProposalVoteOptions{ + OptionOne: "Vote for me", + OptionTwo: "Vote for them", + }, + ) + }, + }, + } + + for name, tc := range cases { + suite.Run(name, func() { + msg, err := tc.preRun() + suite.Require().NoError(err) + res, err := suite.msgSrvr.SubmitMultipleChoiceProposal(suite.ctx, msg) + if tc.expErr { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expErrMsg) + } else { + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + } + }) + } +} + func (suite *KeeperTestSuite) TestMsgCancelProposal() { govAcct := suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress() addrs := suite.addrs diff --git a/x/gov/keeper/proposal.go b/x/gov/keeper/proposal.go index 24b0b1232005..1adc9cee9c7a 100644 --- a/x/gov/keeper/proposal.go +++ b/x/gov/keeper/proposal.go @@ -19,19 +19,23 @@ import ( ) // SubmitProposal creates a new proposal given an array of messages -func (keeper Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, metadata, title, summary string, proposer sdk.AccAddress, proposalType v1.ProposalType) (v1.Proposal, error) { - params, err := keeper.Params.Get(ctx) +func (k Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, metadata, title, summary string, proposer sdk.AccAddress, proposalType v1.ProposalType) (v1.Proposal, error) { + params, err := k.Params.Get(ctx) if err != nil { return v1.Proposal{}, err } // additional checks per proposal types - if proposalType == v1.ProposalType_PROPOSAL_TYPE_OPTIMISTIC { - proposerStr, _ := keeper.authKeeper.AddressCodec().BytesToString(proposer) - + switch proposalType { + case v1.ProposalType_PROPOSAL_TYPE_OPTIMISTIC: + proposerStr, _ := k.authKeeper.AddressCodec().BytesToString(proposer) if len(params.OptimisticAuthorizedAddresses) > 0 && !slices.Contains(params.OptimisticAuthorizedAddresses, proposerStr) { return v1.Proposal{}, errorsmod.Wrap(types.ErrInvalidProposer, "proposer is not authorized to submit optimistic proposal") } + case v1.ProposalType_PROPOSAL_TYPE_MULTIPLE_CHOICE: + if len(messages) > 0 { // cannot happen, except when the proposal is created via keeper call instead of message server. + return v1.Proposal{}, errorsmod.Wrap(types.ErrInvalidProposalMsg, "multiple choice proposal should not contain any messages") + } } sdkCtx := sdk.UnwrapSDKContext(ctx) @@ -48,7 +52,7 @@ func (keeper Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, met } } - signers, _, err := keeper.cdc.GetMsgV1Signers(msg) + signers, _, err := k.cdc.GetMsgV1Signers(msg) if err != nil { return v1.Proposal{}, err } @@ -57,12 +61,12 @@ func (keeper Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, met } // assert that the governance module account is the only signer of the messages - if !bytes.Equal(signers[0], keeper.GetGovernanceAccount(ctx).GetAddress()) { + if !bytes.Equal(signers[0], k.GetGovernanceAccount(ctx).GetAddress()) { return v1.Proposal{}, errorsmod.Wrapf(types.ErrInvalidSigner, sdk.AccAddress(signers[0]).String()) } // use the msg service router to see that there is a valid route for that message. - handler := keeper.router.Handler(msg) + handler := k.router.Handler(msg) if handler == nil { return v1.Proposal{}, errorsmod.Wrap(types.ErrUnroutableProposalMsg, sdk.MsgTypeURL(msg)) } @@ -86,7 +90,7 @@ func (keeper Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, met } - proposalID, err := keeper.ProposalID.Next(ctx) + proposalID, err := k.ProposalID.Next(ctx) if err != nil { return v1.Proposal{}, err } @@ -97,17 +101,17 @@ func (keeper Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, met return v1.Proposal{}, err } - err = keeper.SetProposal(ctx, proposal) + err = k.SetProposal(ctx, proposal) if err != nil { return v1.Proposal{}, err } - err = keeper.InactiveProposalsQueue.Set(ctx, collections.Join(*proposal.DepositEndTime, proposalID), proposalID) + err = k.InactiveProposalsQueue.Set(ctx, collections.Join(*proposal.DepositEndTime, proposalID), proposalID) if err != nil { return v1.Proposal{}, err } // called right after a proposal is submitted - err = keeper.Hooks().AfterProposalSubmission(ctx, proposalID) + err = k.Hooks().AfterProposalSubmission(ctx, proposalID) if err != nil { return v1.Proposal{}, err } @@ -124,9 +128,9 @@ func (keeper Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, met } // CancelProposal will cancel proposal before the voting period ends -func (keeper Keeper) CancelProposal(ctx context.Context, proposalID uint64, proposer string) error { +func (k Keeper) CancelProposal(ctx context.Context, proposalID uint64, proposer string) error { sdkCtx := sdk.UnwrapSDKContext(ctx) - proposal, err := keeper.Proposals.Get(ctx, proposalID) + proposal, err := k.Proposals.Get(ctx, proposalID) if err != nil { if errors.Is(err, collections.ErrNotFound) { return types.ErrInvalidProposal.Wrapf("proposal %d doesn't exist", proposalID) @@ -134,7 +138,7 @@ func (keeper Keeper) CancelProposal(ctx context.Context, proposalID uint64, prop return err } - params, err := keeper.Params.Get(ctx) + params, err := k.Params.Get(ctx) if err != nil { return err } @@ -171,24 +175,24 @@ func (keeper Keeper) CancelProposal(ctx context.Context, proposalID uint64, prop // burn the (deposits * proposal_cancel_rate) amount or sent to cancellation destination address. // and deposits * (1 - proposal_cancel_rate) will be sent to depositors. - err = keeper.ChargeDeposit(ctx, proposal.Id, params.ProposalCancelDest, params.ProposalCancelRatio) + err = k.ChargeDeposit(ctx, proposal.Id, params.ProposalCancelDest, params.ProposalCancelRatio) if err != nil { return err } if proposal.VotingStartTime != nil { - err = keeper.deleteVotes(ctx, proposal.Id) + err = k.deleteVotes(ctx, proposal.Id) if err != nil { return err } } - err = keeper.DeleteProposal(ctx, proposal.Id) + err = k.DeleteProposal(ctx, proposal.Id) if err != nil { return err } - keeper.Logger(ctx).Info( + k.Logger(ctx).Info( "proposal is canceled by proposer", "proposal", proposal.Id, "proposer", proposal.Proposer, @@ -198,57 +202,57 @@ func (keeper Keeper) CancelProposal(ctx context.Context, proposalID uint64, prop } // SetProposal sets a proposal to store. -func (keeper Keeper) SetProposal(ctx context.Context, proposal v1.Proposal) error { +func (k Keeper) SetProposal(ctx context.Context, proposal v1.Proposal) error { if proposal.Status == v1.StatusVotingPeriod { - err := keeper.VotingPeriodProposals.Set(ctx, proposal.Id, []byte{1}) + err := k.VotingPeriodProposals.Set(ctx, proposal.Id, []byte{1}) if err != nil { return err } } else { - err := keeper.VotingPeriodProposals.Remove(ctx, proposal.Id) + err := k.VotingPeriodProposals.Remove(ctx, proposal.Id) if err != nil { return err } } - return keeper.Proposals.Set(ctx, proposal.Id, proposal) + return k.Proposals.Set(ctx, proposal.Id, proposal) } // DeleteProposal deletes a proposal from store. -func (keeper Keeper) DeleteProposal(ctx context.Context, proposalID uint64) error { - proposal, err := keeper.Proposals.Get(ctx, proposalID) +func (k Keeper) DeleteProposal(ctx context.Context, proposalID uint64) error { + proposal, err := k.Proposals.Get(ctx, proposalID) if err != nil { return err } if proposal.DepositEndTime != nil { - err := keeper.InactiveProposalsQueue.Remove(ctx, collections.Join(*proposal.DepositEndTime, proposalID)) + err := k.InactiveProposalsQueue.Remove(ctx, collections.Join(*proposal.DepositEndTime, proposalID)) if err != nil { return err } } if proposal.VotingEndTime != nil { - err := keeper.ActiveProposalsQueue.Remove(ctx, collections.Join(*proposal.VotingEndTime, proposalID)) + err := k.ActiveProposalsQueue.Remove(ctx, collections.Join(*proposal.VotingEndTime, proposalID)) if err != nil { return err } - err = keeper.VotingPeriodProposals.Remove(ctx, proposalID) + err = k.VotingPeriodProposals.Remove(ctx, proposalID) if err != nil { return err } } - return keeper.Proposals.Remove(ctx, proposalID) + return k.Proposals.Remove(ctx, proposalID) } // ActivateVotingPeriod activates the voting period of a proposal -func (keeper Keeper) ActivateVotingPeriod(ctx context.Context, proposal v1.Proposal) error { +func (k Keeper) ActivateVotingPeriod(ctx context.Context, proposal v1.Proposal) error { sdkCtx := sdk.UnwrapSDKContext(ctx) startTime := sdkCtx.HeaderInfo().Time proposal.VotingStartTime = &startTime var votingPeriod *time.Duration - params, err := keeper.Params.Get(ctx) + params, err := k.Params.Get(ctx) if err != nil { return err } @@ -261,15 +265,15 @@ func (keeper Keeper) ActivateVotingPeriod(ctx context.Context, proposal v1.Propo endTime := proposal.VotingStartTime.Add(*votingPeriod) proposal.VotingEndTime = &endTime proposal.Status = v1.StatusVotingPeriod - err = keeper.SetProposal(ctx, proposal) + err = k.SetProposal(ctx, proposal) if err != nil { return err } - err = keeper.InactiveProposalsQueue.Remove(ctx, collections.Join(*proposal.DepositEndTime, proposal.Id)) + err = k.InactiveProposalsQueue.Remove(ctx, collections.Join(*proposal.DepositEndTime, proposal.Id)) if err != nil { return err } - return keeper.ActiveProposalsQueue.Set(ctx, collections.Join(*proposal.VotingEndTime, proposal.Id), proposal.Id) + return k.ActiveProposalsQueue.Set(ctx, collections.Join(*proposal.VotingEndTime, proposal.Id), proposal.Id) } diff --git a/x/gov/keeper/proposal_test.go b/x/gov/keeper/proposal_test.go index d8e591200c06..6ea453078c9b 100644 --- a/x/gov/keeper/proposal_test.go +++ b/x/gov/keeper/proposal_test.go @@ -167,6 +167,7 @@ func (suite *KeeperTestSuite) TestSubmitProposal() { }{ {&tp, govAcct, "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, nil}, {&tp, govAcct, "", v1.ProposalType_PROPOSAL_TYPE_EXPEDITED, nil}, + {nil, govAcct, "", v1.ProposalType_PROPOSAL_TYPE_MULTIPLE_CHOICE, nil}, // Keeper does not check the validity of title and description, no error {&v1beta1.TextProposal{Title: "", Description: "description"}, govAcct, "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, nil}, {&v1beta1.TextProposal{Title: strings.Repeat("1234567890", 100), Description: "description"}, govAcct, "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, nil}, @@ -176,12 +177,19 @@ func (suite *KeeperTestSuite) TestSubmitProposal() { {&tp, randomAddr.String(), "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, types.ErrInvalidSigner}, // error only when invalid route {&invalidProposalRoute{}, govAcct, "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, types.ErrNoProposalHandlerExists}, + // error invalid multiple choice proposal + {&tp, govAcct, "", v1.ProposalType_PROPOSAL_TYPE_MULTIPLE_CHOICE, types.ErrInvalidProposalMsg}, } for i, tc := range testCases { - prop, err := v1.NewLegacyContent(tc.content, tc.authority) - suite.Require().NoError(err) - _, err = suite.govKeeper.SubmitProposal(suite.ctx, []sdk.Msg{prop}, tc.metadata, "title", "", suite.addrs[0], tc.proposalType) + msg := []sdk.Msg{} + if tc.content != nil { + prop, err := v1.NewLegacyContent(tc.content, tc.authority) + suite.Require().NoError(err) + msg = append(msg, prop) + } + + _, err := suite.govKeeper.SubmitProposal(suite.ctx, msg, tc.metadata, "title", "", suite.addrs[0], tc.proposalType) suite.Require().True(errors.Is(tc.expectedErr, err), "tc #%d; got: %v, expected: %v", i, err, tc.expectedErr) } } diff --git a/x/gov/keeper/tally.go b/x/gov/keeper/tally.go index 95816e772468..7ae43d4132d3 100644 --- a/x/gov/keeper/tally.go +++ b/x/gov/keeper/tally.go @@ -11,25 +11,25 @@ import ( ) // Tally iterates over the votes and updates the tally of a proposal based on the voting power of the voters -func (keeper Keeper) Tally(ctx context.Context, proposal v1.Proposal) (passes, burnDeposits bool, tallyResults v1.TallyResult, err error) { - validators, err := keeper.getCurrentValidators(ctx) +func (k Keeper) Tally(ctx context.Context, proposal v1.Proposal) (passes, burnDeposits bool, tallyResults v1.TallyResult, err error) { + validators, err := k.getCurrentValidators(ctx) if err != nil { return false, false, v1.TallyResult{}, err } - totalVoterPower, results, err := keeper.calculateVoteResultsAndVotingPower(ctx, proposal.Id, validators) + totalVoterPower, results, err := k.calculateVoteResultsAndVotingPower(ctx, proposal.Id, validators) if err != nil { return false, false, v1.TallyResult{}, err } - params, err := keeper.Params.Get(ctx) + params, err := k.Params.Get(ctx) if err != nil { return false, false, v1.TallyResult{}, err } tallyResults = v1.NewTallyResultFromMap(results) // If there is no staked coins, the proposal fails - totalBonded, err := keeper.sk.TotalBondedTokens(ctx) + totalBonded, err := k.sk.TotalBondedTokens(ctx) if err != nil { return false, false, v1.TallyResult{}, err } @@ -47,18 +47,24 @@ func (keeper Keeper) Tally(ctx context.Context, proposal v1.Proposal) (passes, b switch proposal.ProposalType { case v1.ProposalType_PROPOSAL_TYPE_OPTIMISTIC: - return keeper.tallyOptimistic(totalVoterPower, totalBonded, results, params) + return k.tallyOptimistic(totalVoterPower, totalBonded, results, params) case v1.ProposalType_PROPOSAL_TYPE_EXPEDITED: - return keeper.tallyExpedited(totalVoterPower, totalBonded, results, params) + return k.tallyExpedited(totalVoterPower, totalBonded, results, params) case v1.ProposalType_PROPOSAL_TYPE_MULTIPLE_CHOICE: - return keeper.tallyMultipleChoice(totalVoterPower, totalBonded, results, params) // TODO(@julienrbrt): implement in follow up + return k.tallyMultipleChoice(totalVoterPower, totalBonded, results, params) default: - return keeper.tallyStandard(totalVoterPower, totalBonded, results, params) + return k.tallyStandard(totalVoterPower, totalBonded, results, params) } } // tallyStandard tallies the votes of a standard proposal -func (keeper Keeper) tallyStandard(totalVoterPower math.LegacyDec, totalBonded math.Int, results map[v1.VoteOption]math.LegacyDec, params v1.Params) (passes, burnDeposits bool, tallyResults v1.TallyResult, err error) { +// If there is not enough quorum of votes, the proposal fails +// If no one votes (everyone abstains), proposal fails +// If more than 1/3 of voters veto, proposal fails +// If more than 1/2 of non-abstaining voters vote Yes, proposal passes +// If more than 1/2 of non-abstaining voters vote No, proposal fails +// Checking for spam votes is done before calling this function +func (k Keeper) tallyStandard(totalVoterPower math.LegacyDec, totalBonded math.Int, results map[v1.VoteOption]math.LegacyDec, params v1.Params) (passes, burnDeposits bool, tallyResults v1.TallyResult, err error) { tallyResults = v1.NewTallyResultFromMap(results) // If there is not enough quorum of votes, the proposal fails @@ -91,7 +97,13 @@ func (keeper Keeper) tallyStandard(totalVoterPower math.LegacyDec, totalBonded m } // tallyExpedited tallies the votes of an expedited proposal -func (keeper Keeper) tallyExpedited(totalVoterPower math.LegacyDec, totalBonded math.Int, results map[v1.VoteOption]math.LegacyDec, params v1.Params) (passes, burnDeposits bool, tallyResults v1.TallyResult, err error) { +// If there is not enough quorum of votes, the proposal fails +// If no one votes (everyone abstains), proposal fails +// If more than 1/3 of voters veto, proposal fails +// If more than 2/3 of non-abstaining voters vote Yes, proposal passes +// If more than 1/2 of non-abstaining voters vote No, proposal fails +// Checking for spam votes is done before calling this function +func (k Keeper) tallyExpedited(totalVoterPower math.LegacyDec, totalBonded math.Int, results map[v1.VoteOption]math.LegacyDec, params v1.Params) (passes, burnDeposits bool, tallyResults v1.TallyResult, err error) { tallyResults = v1.NewTallyResultFromMap(results) // If there is not enough quorum of votes, the proposal fails @@ -124,7 +136,11 @@ func (keeper Keeper) tallyExpedited(totalVoterPower math.LegacyDec, totalBonded } // tallyOptimistic tallies the votes of an optimistic proposal -func (keeper Keeper) tallyOptimistic(totalVoterPower math.LegacyDec, totalBonded math.Int, results map[v1.VoteOption]math.LegacyDec, params v1.Params) (passes, burnDeposits bool, tallyResults v1.TallyResult, err error) { +// If proposal has no votes, proposal passes +// If the threshold of no is reached, proposal fails +// Any other case, proposal passes +// Checking for spam votes is done before calling this function +func (k Keeper) tallyOptimistic(totalVoterPower math.LegacyDec, totalBonded math.Int, results map[v1.VoteOption]math.LegacyDec, params v1.Params) (passes, burnDeposits bool, tallyResults v1.TallyResult, err error) { tallyResults = v1.NewTallyResultFromMap(results) optimisticNoThreshold, _ := math.LegacyNewDecFromStr(params.OptimisticRejectedThreshold) @@ -142,7 +158,10 @@ func (keeper Keeper) tallyOptimistic(totalVoterPower math.LegacyDec, totalBonded } // tallyMultipleChoice tallies the votes of a multiple choice proposal -func (keeper Keeper) tallyMultipleChoice(totalVoterPower math.LegacyDec, totalBonded math.Int, results map[v1.VoteOption]math.LegacyDec, params v1.Params) (passes, burnDeposits bool, tallyResults v1.TallyResult, err error) { +// If there is not enough quorum of votes, the proposal fails +// Any other case, proposal passes +// Checking for spam votes is done before calling this function +func (k Keeper) tallyMultipleChoice(totalVoterPower math.LegacyDec, totalBonded math.Int, results map[v1.VoteOption]math.LegacyDec, params v1.Params) (passes, burnDeposits bool, tallyResults v1.TallyResult, err error) { tallyResults = v1.NewTallyResultFromMap(results) // If there is not enough quorum of votes, the proposal fails @@ -152,14 +171,16 @@ func (keeper Keeper) tallyMultipleChoice(totalVoterPower math.LegacyDec, totalBo return false, params.BurnVoteQuorum, tallyResults, nil } + // a multiple choice proposal always passes unless it was spam or quorum was not reached. + return true, false, tallyResults, nil } // getCurrentValidators fetches all the bonded validators, insert them into currValidators -func (keeper Keeper) getCurrentValidators(ctx context.Context) (map[string]v1.ValidatorGovInfo, error) { +func (k Keeper) getCurrentValidators(ctx context.Context) (map[string]v1.ValidatorGovInfo, error) { currValidators := make(map[string]v1.ValidatorGovInfo) - if err := keeper.sk.IterateBondedValidatorsByPower(ctx, func(index int64, validator sdk.ValidatorI) (stop bool) { - valBz, err := keeper.sk.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + if err := k.sk.IterateBondedValidatorsByPower(ctx, func(index int64, validator sdk.ValidatorI) (stop bool) { + valBz, err := k.sk.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) if err != nil { return false } @@ -181,7 +202,7 @@ func (keeper Keeper) getCurrentValidators(ctx context.Context) (map[string]v1.Va // calculateVoteResultsAndVotingPower iterate over all votes, tally up the voting power of each validator // and returns the votes results from voters -func (keeper Keeper) calculateVoteResultsAndVotingPower( +func (k Keeper) calculateVoteResultsAndVotingPower( ctx context.Context, proposalID uint64, validators map[string]v1.ValidatorGovInfo, @@ -191,14 +212,14 @@ func (keeper Keeper) calculateVoteResultsAndVotingPower( // iterate over all votes, tally up the voting power of each validator rng := collections.NewPrefixedPairRange[uint64, sdk.AccAddress](proposalID) - if err := keeper.Votes.Walk(ctx, rng, func(key collections.Pair[uint64, sdk.AccAddress], vote v1.Vote) (bool, error) { + if err := k.Votes.Walk(ctx, rng, func(key collections.Pair[uint64, sdk.AccAddress], vote v1.Vote) (bool, error) { // if validator, just record it in the map - voter, err := keeper.authKeeper.AddressCodec().StringToBytes(vote.Voter) + voter, err := k.authKeeper.AddressCodec().StringToBytes(vote.Voter) if err != nil { return false, err } - valAddrStr, err := keeper.sk.ValidatorAddressCodec().BytesToString(voter) + valAddrStr, err := k.sk.ValidatorAddressCodec().BytesToString(voter) if err != nil { return false, err } @@ -209,7 +230,7 @@ func (keeper Keeper) calculateVoteResultsAndVotingPower( } // iterate over all delegations from voter, deduct from any delegated-to validators - err = keeper.sk.IterateDelegations(ctx, voter, func(index int64, delegation sdk.DelegationI) (stop bool) { + err = k.sk.IterateDelegations(ctx, voter, func(index int64, delegation sdk.DelegationI) (stop bool) { valAddrStr := delegation.GetValidatorAddr() if val, ok := validators[valAddrStr]; ok { @@ -236,7 +257,7 @@ func (keeper Keeper) calculateVoteResultsAndVotingPower( return false, err } - return false, keeper.Votes.Remove(ctx, collections.Join(vote.ProposalId, sdk.AccAddress(voter))) + return false, k.Votes.Remove(ctx, collections.Join(vote.ProposalId, sdk.AccAddress(voter))) }); err != nil { return math.LegacyDec{}, nil, err } diff --git a/x/gov/keeper/tally_test.go b/x/gov/keeper/tally_test.go index 01ee4ecd41ec..d5cd1731f5cb 100644 --- a/x/gov/keeper/tally_test.go +++ b/x/gov/keeper/tally_test.go @@ -939,3 +939,329 @@ func TestTally_Optimistic(t *testing.T) { }) } } + +// TODO(@julienrbrt): refactor tally result to fit all proposal types +func TestTally_MultipleChoice(t *testing.T) { + tests := []struct { + name string + setup func(tallyFixture) + expectedPass bool + expectedBurn bool + expectedTally v1.TallyResult + expectedError string + }{ + { + name: "no votes, no bonded tokens: prop fails", + setup: func(s tallyFixture) { + setTotalBonded(s, 0) + }, + expectedPass: false, + expectedBurn: false, + expectedTally: v1.TallyResult{ + YesCount: "0", + AbstainCount: "0", + NoCount: "0", + NoWithVetoCount: "0", + SpamCount: "0", + }, + }, + { + name: "no votes: prop fails/burn deposit", + setup: func(s tallyFixture) { + setTotalBonded(s, 10000000) + }, + expectedPass: false, + expectedBurn: true, // burn because quorum not reached + expectedTally: v1.TallyResult{ + YesCount: "0", + AbstainCount: "0", + NoCount: "0", + NoWithVetoCount: "0", + SpamCount: "0", + }, + }, + { + name: "one validator votes: prop fails/burn deposit", + setup: func(s tallyFixture) { + setTotalBonded(s, 10000000) + validatorVote(s, s.valAddrs[0], v1.VoteOption_VOTE_OPTION_THREE) + }, + expectedPass: false, + expectedBurn: true, // burn because quorum not reached + expectedTally: v1.TallyResult{ + YesCount: "0", + AbstainCount: "0", + NoCount: "1000000", + NoWithVetoCount: "0", + SpamCount: "0", + }, + }, + { + name: "one account votes without delegation: prop fails/burn deposit", + setup: func(s tallyFixture) { + setTotalBonded(s, 10000000) + delegatorVote(s, s.delAddrs[0], nil, v1.VoteOption_VOTE_OPTION_ONE) + }, + expectedPass: false, + expectedBurn: true, // burn because quorum not reached + expectedTally: v1.TallyResult{ + YesCount: "0", + AbstainCount: "0", + NoCount: "0", + NoWithVetoCount: "0", + SpamCount: "0", + }, + }, + { + name: "one delegator votes: prop fails/burn deposit", + setup: func(s tallyFixture) { + setTotalBonded(s, 10000000) + delegations := []stakingtypes.Delegation{{ + DelegatorAddress: s.delAddrs[0].String(), + ValidatorAddress: s.valAddrs[0].String(), + Shares: sdkmath.LegacyNewDec(42), + }} + delegatorVote(s, s.delAddrs[0], delegations, v1.VoteOption_VOTE_OPTION_ONE) + }, + expectedPass: false, + expectedBurn: true, // burn because quorum not reached + expectedTally: v1.TallyResult{ + YesCount: "42", + AbstainCount: "0", + NoCount: "0", + NoWithVetoCount: "0", + SpamCount: "0", + }, + }, + { + name: "one delegator votes yes, validator votes also yes: prop fails/burn deposit", + setup: func(s tallyFixture) { + setTotalBonded(s, 10000000) + delegations := []stakingtypes.Delegation{{ + DelegatorAddress: s.delAddrs[0].String(), + ValidatorAddress: s.valAddrs[0].String(), + Shares: sdkmath.LegacyNewDec(42), + }} + delegatorVote(s, s.delAddrs[0], delegations, v1.VoteOption_VOTE_OPTION_ONE) + validatorVote(s, s.valAddrs[0], v1.VoteOption_VOTE_OPTION_ONE) + }, + expectedPass: false, + expectedBurn: true, // burn because quorum not reached + expectedTally: v1.TallyResult{ + YesCount: "1000000", + AbstainCount: "0", + NoCount: "0", + NoWithVetoCount: "0", + SpamCount: "0", + }, + }, + { + name: "one delegator votes yes, validator votes no: prop fails/burn deposit", + setup: func(s tallyFixture) { + setTotalBonded(s, 10000000) + delegations := []stakingtypes.Delegation{{ + DelegatorAddress: s.delAddrs[0].String(), + ValidatorAddress: s.valAddrs[0].String(), + Shares: sdkmath.LegacyNewDec(42), + }} + delegatorVote(s, s.delAddrs[0], delegations, v1.VoteOption_VOTE_OPTION_ONE) + validatorVote(s, s.valAddrs[0], v1.VoteOption_VOTE_OPTION_THREE) + }, + expectedPass: false, + expectedBurn: true, // burn because quorum not reached + expectedTally: v1.TallyResult{ + YesCount: "42", + AbstainCount: "0", + NoCount: "999958", + NoWithVetoCount: "0", + SpamCount: "0", + }, + }, + { + // one delegator delegates 42 shares to 2 different validators (21 each) + // delegator votes yes + // first validator votes yes + // second validator votes no + // third validator (no delegation) votes abstain + name: "delegator with mixed delegations: prop fails/burn deposit", + setup: func(s tallyFixture) { + setTotalBonded(s, 10000000) + delegations := []stakingtypes.Delegation{ + { + DelegatorAddress: s.delAddrs[0].String(), + ValidatorAddress: s.valAddrs[0].String(), + Shares: sdkmath.LegacyNewDec(21), + }, + { + DelegatorAddress: s.delAddrs[0].String(), + ValidatorAddress: s.valAddrs[1].String(), + Shares: sdkmath.LegacyNewDec(21), + }, + } + delegatorVote(s, s.delAddrs[0], delegations, v1.VoteOption_VOTE_OPTION_ONE) + validatorVote(s, s.valAddrs[0], v1.VoteOption_VOTE_OPTION_THREE) + validatorVote(s, s.valAddrs[1], v1.VoteOption_VOTE_OPTION_ONE) + validatorVote(s, s.valAddrs[2], v1.VoteOption_VOTE_OPTION_TWO) + }, + expectedPass: false, + expectedBurn: true, // burn because quorum not reached + expectedTally: v1.TallyResult{ + YesCount: "1000021", + AbstainCount: "1000000", + NoCount: "999979", + NoWithVetoCount: "0", + SpamCount: "0", + }, + }, + { + name: "quorum reached with only abstain: always passes in multiple choice tally", + setup: func(s tallyFixture) { + setTotalBonded(s, 10000000) + validatorVote(s, s.valAddrs[0], v1.VoteOption_VOTE_OPTION_TWO) + validatorVote(s, s.valAddrs[1], v1.VoteOption_VOTE_OPTION_TWO) + validatorVote(s, s.valAddrs[2], v1.VoteOption_VOTE_OPTION_TWO) + validatorVote(s, s.valAddrs[3], v1.VoteOption_VOTE_OPTION_TWO) + }, + expectedPass: true, + expectedBurn: false, + expectedTally: v1.TallyResult{ + YesCount: "0", + AbstainCount: "4000000", + NoCount: "0", + NoWithVetoCount: "0", + SpamCount: "0", + }, + }, + { + name: "quorum reached with a majority of option 4: always passes in multiple choice tally", + setup: func(s tallyFixture) { + setTotalBonded(s, 10000000) + validatorVote(s, s.valAddrs[0], v1.VoteOption_VOTE_OPTION_ONE) + validatorVote(s, s.valAddrs[1], v1.VoteOption_VOTE_OPTION_ONE) + validatorVote(s, s.valAddrs[2], v1.VoteOption_VOTE_OPTION_ONE) + validatorVote(s, s.valAddrs[3], v1.VoteOption_VOTE_OPTION_ONE) + validatorVote(s, s.valAddrs[4], v1.VoteOption_VOTE_OPTION_FOUR) + validatorVote(s, s.valAddrs[5], v1.VoteOption_VOTE_OPTION_FOUR) + validatorVote(s, s.valAddrs[6], v1.VoteOption_VOTE_OPTION_FOUR) + }, + expectedPass: true, + expectedBurn: false, + expectedTally: v1.TallyResult{ + YesCount: "4000000", + AbstainCount: "0", + NoCount: "0", + NoWithVetoCount: "3000000", + SpamCount: "0", + }, + }, + { + name: "quorum reached, equality: always passes in multiple choice tally", + setup: func(s tallyFixture) { + setTotalBonded(s, 10000000) + validatorVote(s, s.valAddrs[0], v1.VoteOption_VOTE_OPTION_ONE) + validatorVote(s, s.valAddrs[1], v1.VoteOption_VOTE_OPTION_ONE) + validatorVote(s, s.valAddrs[2], v1.VoteOption_VOTE_OPTION_THREE) + validatorVote(s, s.valAddrs[3], v1.VoteOption_VOTE_OPTION_THREE) + }, + expectedPass: true, + expectedBurn: false, + expectedTally: v1.TallyResult{ + YesCount: "2000000", + AbstainCount: "0", + NoCount: "2000000", + NoWithVetoCount: "0", + SpamCount: "0", + }, + }, + { + name: "quorum reached with spam > all other votes: prop fails/burn deposit", + setup: func(s tallyFixture) { + setTotalBonded(s, 10000000) + validatorVote(s, s.valAddrs[0], v1.VoteOption_VOTE_OPTION_ONE) + // spam votes + validatorVote(s, s.valAddrs[1], v1.VoteOption_VOTE_OPTION_SPAM) + validatorVote(s, s.valAddrs[2], v1.VoteOption_VOTE_OPTION_SPAM) + validatorVote(s, s.valAddrs[3], v1.VoteOption_VOTE_OPTION_SPAM) + validatorVote(s, s.valAddrs[4], v1.VoteOption_VOTE_OPTION_SPAM) + validatorVote(s, s.valAddrs[5], v1.VoteOption_VOTE_OPTION_SPAM) + validatorVote(s, s.valAddrs[6], v1.VoteOption_VOTE_OPTION_SPAM) + }, + expectedPass: false, + expectedBurn: true, + expectedTally: v1.TallyResult{ + YesCount: "1000000", + AbstainCount: "0", + NoCount: "0", + NoWithVetoCount: "0", + SpamCount: "6000000", + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + govKeeper, mocks, _, ctx := setupGovKeeper(t, mockAccountKeeperExpectations) + params := v1.DefaultParams() + // Ensure params value are different than false + params.BurnVoteQuorum = true + params.BurnVoteVeto = true + err := govKeeper.Params.Set(ctx, params) + require.NoError(t, err) + var ( + numVals = 10 + numDelegators = 5 + addrs = simtestutil.CreateRandomAccounts(numVals + numDelegators) + valAddrs = simtestutil.ConvertAddrsToValAddrs(addrs[:numVals]) + delAddrs = addrs[numVals:] + ) + // Mocks a bunch of validators + mocks.stakingKeeper.EXPECT(). + IterateBondedValidatorsByPower(ctx, gomock.Any()). + DoAndReturn( + func(ctx context.Context, fn func(index int64, validator sdk.ValidatorI) bool) error { + for i := int64(0); i < int64(numVals); i++ { + fn(i, stakingtypes.Validator{ + OperatorAddress: valAddrs[i].String(), + Status: stakingtypes.Bonded, + Tokens: sdkmath.NewInt(1000000), + DelegatorShares: sdkmath.LegacyNewDec(1000000), + }) + } + return nil + }) + + // Submit and activate a proposal + proposal, err := govKeeper.SubmitProposal(ctx, nil, "", "title", "summary", delAddrs[0], v1.ProposalType_PROPOSAL_TYPE_MULTIPLE_CHOICE) + require.NoError(t, err) + err = govKeeper.ProposalVoteOptions.Set(ctx, proposal.Id, v1.ProposalVoteOptions{ + OptionOne: "Vote Option 1", + OptionTwo: "Vote Option 2", + OptionThree: "Vote Option 3", + OptionFour: "Vote Option 4", + }) + require.NoError(t, err) + err = govKeeper.ActivateVotingPeriod(ctx, proposal) + require.NoError(t, err) + suite := tallyFixture{ + t: t, + proposal: proposal, + valAddrs: valAddrs, + delAddrs: delAddrs, + ctx: ctx, + keeper: govKeeper, + mocks: mocks, + } + tt.setup(suite) + + pass, burn, tally, err := govKeeper.Tally(ctx, proposal) + + require.NoError(t, err) + assert.Equal(t, tt.expectedPass, pass, "wrong pass") + assert.Equal(t, tt.expectedBurn, burn, "wrong burn") + assert.Equal(t, tt.expectedTally, tally) + // Assert votes removal after tally + rng := collections.NewPrefixedPairRange[uint64, sdk.AccAddress](proposal.Id) + _, err = suite.keeper.Votes.Iterate(suite.ctx, rng) + assert.NoError(t, err) + }) + } +} diff --git a/x/gov/keeper/vote.go b/x/gov/keeper/vote.go index f06c3a9101f4..ebd3ae688770 100644 --- a/x/gov/keeper/vote.go +++ b/x/gov/keeper/vote.go @@ -2,6 +2,7 @@ package keeper import ( "context" + stderrors "errors" "fmt" "cosmossdk.io/collections" @@ -13,9 +14,9 @@ import ( ) // AddVote adds a vote on a specific proposal -func (keeper Keeper) AddVote(ctx context.Context, proposalID uint64, voterAddr sdk.AccAddress, options v1.WeightedVoteOptions, metadata string) error { +func (k Keeper) AddVote(ctx context.Context, proposalID uint64, voterAddr sdk.AccAddress, options v1.WeightedVoteOptions, metadata string) error { // Check if proposal is in voting period. - inVotingPeriod, err := keeper.VotingPeriodProposals.Has(ctx, proposalID) + inVotingPeriod, err := k.VotingPeriodProposals.Has(ctx, proposalID) if err != nil { return err } @@ -24,12 +25,12 @@ func (keeper Keeper) AddVote(ctx context.Context, proposalID uint64, voterAddr s return errors.Wrapf(types.ErrInactiveProposal, "%d", proposalID) } - if err := keeper.assertMetadataLength(metadata); err != nil { + if err := k.assertMetadataLength(metadata); err != nil { return err } // get proposal - proposal, err := keeper.Proposals.Get(ctx, proposalID) + proposal, err := k.Proposals.Get(ctx, proposalID) if err != nil { return err } @@ -40,21 +41,41 @@ func (keeper Keeper) AddVote(ctx context.Context, proposalID uint64, voterAddr s if option.Option != v1.OptionNo && option.Option != v1.OptionSpam { return errors.Wrap(types.ErrInvalidVote, "optimistic proposals can only be rejected") } - default: - if !v1.ValidWeightedVoteOption(*option) { - return errors.Wrap(types.ErrInvalidVote, option.String()) + case v1.ProposalType_PROPOSAL_TYPE_MULTIPLE_CHOICE: + proposalOptionsStr, err := k.ProposalVoteOptions.Get(ctx, proposalID) + if err != nil { + if stderrors.Is(err, collections.ErrNotFound) { + return errors.Wrap(types.ErrInvalidProposal, "invalid multiple choice proposal, no options set") + } + + return err + } + + // verify votes only on existing votes + if proposalOptionsStr.OptionOne == "" && option.Option == v1.OptionOne { // should never trigger option one is always mandatory + return errors.Wrap(types.ErrInvalidVote, "invalid vote option") + } else if proposalOptionsStr.OptionTwo == "" && option.Option == v1.OptionTwo { // should never trigger option two is always mandatory + return errors.Wrap(types.ErrInvalidVote, "invalid vote option") + } else if proposalOptionsStr.OptionThree == "" && option.Option == v1.OptionThree { + return errors.Wrap(types.ErrInvalidVote, "invalid vote option") + } else if proposalOptionsStr.OptionFour == "" && option.Option == v1.OptionFour { + return errors.Wrap(types.ErrInvalidVote, "invalid vote option") } } + + if !v1.ValidWeightedVoteOption(*option) { + return errors.Wrap(types.ErrInvalidVote, option.String()) + } } vote := v1.NewVote(proposalID, voterAddr, options, metadata) - err = keeper.Votes.Set(ctx, collections.Join(proposalID, voterAddr), vote) + err = k.Votes.Set(ctx, collections.Join(proposalID, voterAddr), vote) if err != nil { return err } // called after a vote on a proposal is cast - err = keeper.Hooks().AfterProposalVote(ctx, proposalID, voterAddr) + err = k.Hooks().AfterProposalVote(ctx, proposalID, voterAddr) if err != nil { return err } @@ -73,9 +94,9 @@ func (keeper Keeper) AddVote(ctx context.Context, proposalID uint64, voterAddr s } // deleteVotes deletes all the votes from a given proposalID. -func (keeper Keeper) deleteVotes(ctx context.Context, proposalID uint64) error { +func (k Keeper) deleteVotes(ctx context.Context, proposalID uint64) error { rng := collections.NewPrefixedPairRange[uint64, sdk.AccAddress](proposalID) - err := keeper.Votes.Clear(ctx, rng) + err := k.Votes.Clear(ctx, rng) if err != nil { return err } diff --git a/x/gov/keeper/vote_test.go b/x/gov/keeper/vote_test.go index 3220249e2b39..af2c46c1ccfb 100644 --- a/x/gov/keeper/vote_test.go +++ b/x/gov/keeper/vote_test.go @@ -14,6 +14,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) +var invalidOption v1.VoteOption = 0x10 + func TestVotes(t *testing.T) { govKeeper, mocks, _, ctx := setupGovKeeper(t) authKeeper, bankKeeper, stakingKeeper := mocks.acctKeeper, mocks.bankKeeper, mocks.stakingKeeper @@ -26,8 +28,6 @@ func TestVotes(t *testing.T) { proposalID := proposal.Id metadata := "metadata" - var invalidOption v1.VoteOption = 0x10 - require.Error(t, govKeeper.AddVote(ctx, proposalID, addrs[0], v1.NewNonSplitVoteOption(v1.OptionYes), metadata), "proposal not on voting period") require.Error(t, govKeeper.AddVote(ctx, 10, addrs[0], v1.NewNonSplitVoteOption(v1.OptionYes), ""), "invalid proposal ID") @@ -106,3 +106,33 @@ func TestVotes(t *testing.T) { _, err = govKeeper.Votes.Get(ctx, collections.Join(proposalID+100, addrs[1])) require.ErrorIs(t, err, collections.ErrNotFound) } + +func TestVotes_MultipleChoiceProposal(t *testing.T) { + govKeeper, mocks, _, ctx := setupGovKeeper(t) + authKeeper, bankKeeper, stakingKeeper := mocks.acctKeeper, mocks.bankKeeper, mocks.stakingKeeper + addrs := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 2, sdkmath.NewInt(10000000)) + authKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() + + proposal, err := govKeeper.SubmitProposal(ctx, nil, "", "title", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), v1.ProposalType_PROPOSAL_TYPE_MULTIPLE_CHOICE) + require.NoError(t, err) + err = govKeeper.ProposalVoteOptions.Set(ctx, proposal.Id, v1.ProposalVoteOptions{ + OptionOne: "Vote for @tac0turle", + OptionTwo: "Vote for @facudomedica", + OptionThree: "Vote for @alexanderbez", + }) + require.NoError(t, err) + + proposal.Status = v1.StatusVotingPeriod + require.NoError(t, govKeeper.SetProposal(ctx, proposal)) + + proposalID := proposal.Id + + // invalid options + require.Error(t, govKeeper.AddVote(ctx, proposalID, addrs[0], v1.NewNonSplitVoteOption(invalidOption), ""), "invalid option") + require.Error(t, govKeeper.AddVote(ctx, proposalID, addrs[0], v1.NewNonSplitVoteOption(v1.OptionFour), ""), "invalid option") // option four is not defined. + + // valid options + require.NoError(t, govKeeper.AddVote(ctx, proposalID, addrs[0], v1.NewNonSplitVoteOption(v1.OptionOne), "")) + require.NoError(t, govKeeper.AddVote(ctx, proposalID, addrs[1], v1.NewNonSplitVoteOption(v1.OptionTwo), "")) + require.NoError(t, govKeeper.AddVote(ctx, proposalID, addrs[0], v1.NewNonSplitVoteOption(v1.OptionThree), "")) +} diff --git a/x/gov/types/keys.go b/x/gov/types/keys.go index 53ab36928007..2d0b4e869992 100644 --- a/x/gov/types/keys.go +++ b/x/gov/types/keys.go @@ -25,4 +25,5 @@ var ( VotesKeyPrefix = collections.NewPrefix(32) // VotesKeyPrefix stores the votes of proposals. ParamsKey = collections.NewPrefix(48) // ParamsKey stores the module's params. ConstitutionKey = collections.NewPrefix(49) // ConstitutionKey stores a chain's constitution. + ProposalVoteOptionsKeyPrefix = collections.NewPrefix(50) // ProposalVoteOptionsKeyPrefix stores the vote options of proposals. ) diff --git a/x/gov/types/v1/codec.go b/x/gov/types/v1/codec.go index c4b0b2b4956e..3043de58173b 100644 --- a/x/gov/types/v1/codec.go +++ b/x/gov/types/v1/codec.go @@ -12,6 +12,7 @@ import ( // governance module. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgSubmitProposal{}, "cosmos-sdk/v1/MsgSubmitProposal") + legacy.RegisterAminoMsg(cdc, &MsgSubmitMultipleChoiceProposal{}, "gov/MsgSubmitMultipleChoiceProposal") legacy.RegisterAminoMsg(cdc, &MsgDeposit{}, "cosmos-sdk/v1/MsgDeposit") legacy.RegisterAminoMsg(cdc, &MsgVote{}, "cosmos-sdk/v1/MsgVote") legacy.RegisterAminoMsg(cdc, &MsgVoteWeighted{}, "cosmos-sdk/v1/MsgVoteWeighted") @@ -23,6 +24,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgSubmitProposal{}, + &MsgSubmitMultipleChoiceProposal{}, &MsgVote{}, &MsgVoteWeighted{}, &MsgDeposit{}, diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go index 510ad67595ea..189043794942 100644 --- a/x/gov/types/v1/gov.pb.go +++ b/x/gov/types/v1/gov.pb.go @@ -351,7 +351,7 @@ type Proposal struct { FailedReason string `protobuf:"bytes,15,opt,name=failed_reason,json=failedReason,proto3" json:"failed_reason,omitempty"` // proposal_type defines the type of the proposal // - // Since: cosmos-sdk 0.51 + // Since: x/gov v1.0.0 ProposalType ProposalType `protobuf:"varint,16,opt,name=proposal_type,json=proposalType,proto3,enum=cosmos.gov.v1.ProposalType" json:"proposal_type,omitempty"` } @@ -501,6 +501,91 @@ func (m *Proposal) GetProposalType() ProposalType { return ProposalType_PROPOSAL_TYPE_UNSPECIFIED } +// ProposalVoteOptions defines the stringified vote options for proposals. +// This allows to support multiple choice options for a given proposal. +// +// Since: x/gov v1.0.0 +type ProposalVoteOptions struct { + // option_one is the first option of the proposal + OptionOne string `protobuf:"bytes,1,opt,name=option_one,json=optionOne,proto3" json:"option_one,omitempty"` + // option_two is the second option of the proposal + OptionTwo string `protobuf:"bytes,2,opt,name=option_two,json=optionTwo,proto3" json:"option_two,omitempty"` + // option_three is the third option of the proposal + OptionThree string `protobuf:"bytes,3,opt,name=option_three,json=optionThree,proto3" json:"option_three,omitempty"` + // option_four is the fourth option of the proposal + OptionFour string `protobuf:"bytes,4,opt,name=option_four,json=optionFour,proto3" json:"option_four,omitempty"` + // option_spam is always present for all proposals. + OptionSpam string `protobuf:"bytes,5,opt,name=option_spam,json=optionSpam,proto3" json:"option_spam,omitempty"` +} + +func (m *ProposalVoteOptions) Reset() { *m = ProposalVoteOptions{} } +func (m *ProposalVoteOptions) String() string { return proto.CompactTextString(m) } +func (*ProposalVoteOptions) ProtoMessage() {} +func (*ProposalVoteOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_e05cb1c0d030febb, []int{3} +} +func (m *ProposalVoteOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProposalVoteOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProposalVoteOptions.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 *ProposalVoteOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProposalVoteOptions.Merge(m, src) +} +func (m *ProposalVoteOptions) XXX_Size() int { + return m.Size() +} +func (m *ProposalVoteOptions) XXX_DiscardUnknown() { + xxx_messageInfo_ProposalVoteOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_ProposalVoteOptions proto.InternalMessageInfo + +func (m *ProposalVoteOptions) GetOptionOne() string { + if m != nil { + return m.OptionOne + } + return "" +} + +func (m *ProposalVoteOptions) GetOptionTwo() string { + if m != nil { + return m.OptionTwo + } + return "" +} + +func (m *ProposalVoteOptions) GetOptionThree() string { + if m != nil { + return m.OptionThree + } + return "" +} + +func (m *ProposalVoteOptions) GetOptionFour() string { + if m != nil { + return m.OptionFour + } + return "" +} + +func (m *ProposalVoteOptions) GetOptionSpam() string { + if m != nil { + return m.OptionSpam + } + return "" +} + // TallyResult defines a standard tally for a governance proposal. type TallyResult struct { // yes_count is the number of yes votes on a proposal. @@ -519,7 +604,7 @@ func (m *TallyResult) Reset() { *m = TallyResult{} } func (m *TallyResult) String() string { return proto.CompactTextString(m) } func (*TallyResult) ProtoMessage() {} func (*TallyResult) Descriptor() ([]byte, []int) { - return fileDescriptor_e05cb1c0d030febb, []int{3} + return fileDescriptor_e05cb1c0d030febb, []int{4} } func (m *TallyResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -601,7 +686,7 @@ func (m *Vote) Reset() { *m = Vote{} } func (m *Vote) String() string { return proto.CompactTextString(m) } func (*Vote) ProtoMessage() {} func (*Vote) Descriptor() ([]byte, []int) { - return fileDescriptor_e05cb1c0d030febb, []int{4} + return fileDescriptor_e05cb1c0d030febb, []int{5} } func (m *Vote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -673,7 +758,7 @@ func (m *DepositParams) Reset() { *m = DepositParams{} } func (m *DepositParams) String() string { return proto.CompactTextString(m) } func (*DepositParams) ProtoMessage() {} func (*DepositParams) Descriptor() ([]byte, []int) { - return fileDescriptor_e05cb1c0d030febb, []int{5} + return fileDescriptor_e05cb1c0d030febb, []int{6} } func (m *DepositParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -728,7 +813,7 @@ func (m *VotingParams) Reset() { *m = VotingParams{} } func (m *VotingParams) String() string { return proto.CompactTextString(m) } func (*VotingParams) ProtoMessage() {} func (*VotingParams) Descriptor() ([]byte, []int) { - return fileDescriptor_e05cb1c0d030febb, []int{6} + return fileDescriptor_e05cb1c0d030febb, []int{7} } func (m *VotingParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -782,7 +867,7 @@ func (m *TallyParams) Reset() { *m = TallyParams{} } func (m *TallyParams) String() string { return proto.CompactTextString(m) } func (*TallyParams) ProtoMessage() {} func (*TallyParams) Descriptor() ([]byte, []int) { - return fileDescriptor_e05cb1c0d030febb, []int{7} + return fileDescriptor_e05cb1c0d030febb, []int{8} } func (m *TallyParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -894,6 +979,8 @@ type Params struct { // If the proposal is cancelled before the max cancel period, the deposit will be returned/burn to the // depositors, according to the proposal_cancel_ratio and proposal_cancel_dest parameters. // After the max cancel period, the proposal cannot be cancelled anymore. + // + // Since: x/gov v1.0.0 ProposalCancelMaxPeriod string `protobuf:"bytes,17,opt,name=proposal_cancel_max_period,json=proposalCancelMaxPeriod,proto3" json:"proposal_cancel_max_period,omitempty"` // optimistic_authorized_addresses is an optional governance parameter that limits the authorized accounts than can // submit optimistic proposals @@ -911,7 +998,7 @@ func (m *Params) Reset() { *m = Params{} } func (m *Params) String() string { return proto.CompactTextString(m) } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_e05cb1c0d030febb, []int{8} + return fileDescriptor_e05cb1c0d030febb, []int{9} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1080,6 +1167,7 @@ func init() { proto.RegisterType((*WeightedVoteOption)(nil), "cosmos.gov.v1.WeightedVoteOption") proto.RegisterType((*Deposit)(nil), "cosmos.gov.v1.Deposit") proto.RegisterType((*Proposal)(nil), "cosmos.gov.v1.Proposal") + proto.RegisterType((*ProposalVoteOptions)(nil), "cosmos.gov.v1.ProposalVoteOptions") proto.RegisterType((*TallyResult)(nil), "cosmos.gov.v1.TallyResult") proto.RegisterType((*Vote)(nil), "cosmos.gov.v1.Vote") proto.RegisterType((*DepositParams)(nil), "cosmos.gov.v1.DepositParams") @@ -1091,112 +1179,117 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/gov.proto", fileDescriptor_e05cb1c0d030febb) } var fileDescriptor_e05cb1c0d030febb = []byte{ - // 1666 bytes of a gzipped FileDescriptorProto + // 1748 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0x4f, 0x73, 0xe3, 0x48, - 0x15, 0x8f, 0x6c, 0xc7, 0x71, 0x5e, 0x6c, 0x47, 0xe9, 0x64, 0x36, 0x4a, 0xb2, 0x71, 0xb2, 0x61, - 0x6b, 0x2b, 0x0c, 0x3b, 0x36, 0xd9, 0x65, 0x38, 0xec, 0x52, 0x05, 0xfe, 0xa3, 0x21, 0x1a, 0x92, - 0xd8, 0xc8, 0x9a, 0x64, 0x86, 0x8b, 0x50, 0xac, 0x1e, 0x47, 0x60, 0xa9, 0x8d, 0xd4, 0xf6, 0xc6, - 0x7c, 0x00, 0xce, 0x5b, 0x9c, 0x38, 0x51, 0xdc, 0xe0, 0xc8, 0x61, 0x8b, 0xcf, 0xb0, 0xc5, 0x81, - 0xda, 0xda, 0x13, 0x17, 0x06, 0x6a, 0xe6, 0x40, 0xd5, 0x7e, 0x04, 0x4e, 0x54, 0xb7, 0x5a, 0x96, - 0xe4, 0x78, 0x37, 0xc9, 0x5e, 0x12, 0xe9, 0xbd, 0xdf, 0xef, 0xf5, 0xeb, 0xf7, 0x7e, 0xaf, 0xdb, - 0x36, 0x6c, 0xf6, 0x48, 0xe0, 0x92, 0xa0, 0xd6, 0x27, 0xe3, 0xda, 0xf8, 0x88, 0xfd, 0xab, 0x0e, - 0x7d, 0x42, 0x09, 0x2a, 0x85, 0x8e, 0x2a, 0xb3, 0x8c, 0x8f, 0xb6, 0x2b, 0x02, 0x77, 0x69, 0x05, - 0xb8, 0x36, 0x3e, 0xba, 0xc4, 0xd4, 0x3a, 0xaa, 0x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0x1c, 0x5e, 0xff, 0x9b, 0x04, 0x39, 0x56, 0xbb, 0x9b, 0x07, 0x76, + 0x03, 0xe6, 0x2f, 0x09, 0xc5, 0x37, 0x0f, 0xeb, 0x10, 0x86, 0x3e, 0x81, 0x85, 0x30, 0xe1, 0x81, + 0x92, 0xe3, 0x53, 0xe0, 0xfe, 0x94, 0xb2, 0xae, 0x5f, 0x4e, 0x7a, 0xc4, 0x48, 0x75, 0xd9, 0x7c, + 0xba, 0xcb, 0x9e, 0xe4, 0x0a, 0x59, 0x39, 0x57, 0xff, 0xb7, 0x04, 0x15, 0x31, 0x2b, 0xba, 0x96, + 0x6f, 0xb9, 0x01, 0x7a, 0x0e, 0x25, 0xd7, 0xf1, 0x26, 0xa3, 0x47, 0xba, 0x69, 0xf4, 0x6c, 0xb2, + 0xd1, 0xf3, 0xd5, 0xab, 0xad, 0x7b, 0x09, 0xd6, 0x07, 0xc4, 0x75, 0x28, 0x76, 0x87, 0x74, 0xac, + 0x83, 0xeb, 0x78, 0xd1, 0x30, 0x72, 0x01, 0xb9, 0xd6, 0x55, 0x04, 0x32, 0x87, 0xd8, 0x77, 0x88, + 0xcd, 0x13, 0xc1, 0x56, 0x98, 0x9e, 0x20, 0x6d, 0x71, 0x6b, 0xef, 0xbd, 0xf7, 0xd5, 0xab, 0xad, + 0x77, 0xaf, 0x13, 0xe3, 0x45, 0xfe, 0xc0, 0x06, 0x8c, 0xec, 0x5a, 0x57, 0xd1, 0x49, 0xb8, 0xff, + 0xe3, 0x8c, 0x22, 0xd5, 0x9f, 0x41, 0xf9, 0x84, 0x0f, 0x1e, 0x71, 0xba, 0x36, 0x88, 0x41, 0x14, + 0xad, 0x2e, 0xdd, 0xb4, 0x7a, 0x8e, 0x47, 0x2f, 0x87, 0xac, 0x44, 0xe4, 0x3f, 0x4a, 0x42, 0xfb, + 0x22, 0xf2, 0xfb, 0x90, 0xff, 0xcd, 0x88, 0xf8, 0x23, 0x77, 0x86, 0xf0, 0xf9, 0xf5,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, 0xad, 0x23, 0x79, + 0x7e, 0x3d, 0x23, 0x4b, 0x0f, 0xfe, 0x29, 0x41, 0x35, 0xfd, 0xd5, 0x87, 0xb6, 0x60, 0x63, 0x92, + 0xac, 0x9e, 0xd1, 0x32, 0x9e, 0xf6, 0xa6, 0x92, 0x50, 0x87, 0xda, 0x34, 0xa0, 0xad, 0x76, 0x3b, + 0x3d, 0xcd, 0x30, 0xbb, 0xaa, 0xae, 0x75, 0xa6, 0x4b, 0x26, 0x30, 0x27, 0x1d, 0x43, 0x3b, 0xfe, + 0x69, 0x04, 0xc9, 0xa4, 0x2a, 0x2e, 0x20, 0xdd, 0x56, 0xaf, 0xa7, 0xb6, 0xe5, 0x6c, 0xaa, 0x9c, + 0xc2, 0xa7, 0xab, 0x4f, 0xd4, 0x7d, 0x5e, 0xb1, 0x59, 0xcc, 0xc7, 0x2d, 0xed, 0x50, 0x6d, 0xcb, + 0xf3, 0x7b, 0x8f, 0x3e, 0x7f, 0x5d, 0x93, 0xbe, 0x78, 0x5d, 0x93, 0xfe, 0xfb, 0xba, 0x26, 0x7d, + 0xfa, 0xa6, 0x36, 0xf7, 0xc5, 0x9b, 0xda, 0xdc, 0xbf, 0xde, 0xd4, 0xe6, 0x7e, 0xb1, 0x11, 0x4a, + 0x37, 0xb0, 0x7f, 0xdd, 0x70, 0x48, 0xf3, 0x8a, 0xff, 0x3d, 0x85, 0x7d, 0x48, 0x04, 0xcd, 0xcb, + 0xdd, 0xb3, 0x3c, 0x9f, 0xa5, 0x1f, 0x7d, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x38, 0x0a, 0x94, 0x69, + 0x6d, 0x11, 0x00, 0x00, } func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) { @@ -1448,6 +1541,64 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ProposalVoteOptions) 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 *ProposalVoteOptions) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProposalVoteOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OptionSpam) > 0 { + i -= len(m.OptionSpam) + copy(dAtA[i:], m.OptionSpam) + i = encodeVarintGov(dAtA, i, uint64(len(m.OptionSpam))) + i-- + dAtA[i] = 0x2a + } + if len(m.OptionFour) > 0 { + i -= len(m.OptionFour) + copy(dAtA[i:], m.OptionFour) + i = encodeVarintGov(dAtA, i, uint64(len(m.OptionFour))) + i-- + dAtA[i] = 0x22 + } + if len(m.OptionThree) > 0 { + i -= len(m.OptionThree) + copy(dAtA[i:], m.OptionThree) + i = encodeVarintGov(dAtA, i, uint64(len(m.OptionThree))) + i-- + dAtA[i] = 0x1a + } + if len(m.OptionTwo) > 0 { + i -= len(m.OptionTwo) + copy(dAtA[i:], m.OptionTwo) + i = encodeVarintGov(dAtA, i, uint64(len(m.OptionTwo))) + i-- + dAtA[i] = 0x12 + } + if len(m.OptionOne) > 0 { + i -= len(m.OptionOne) + copy(dAtA[i:], m.OptionOne) + i = encodeVarintGov(dAtA, i, uint64(len(m.OptionOne))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *TallyResult) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2006,6 +2157,35 @@ func (m *Proposal) Size() (n int) { return n } +func (m *ProposalVoteOptions) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OptionOne) + if l > 0 { + n += 1 + l + sovGov(uint64(l)) + } + l = len(m.OptionTwo) + if l > 0 { + n += 1 + l + sovGov(uint64(l)) + } + l = len(m.OptionThree) + if l > 0 { + n += 1 + l + sovGov(uint64(l)) + } + l = len(m.OptionFour) + if l > 0 { + n += 1 + l + sovGov(uint64(l)) + } + l = len(m.OptionSpam) + if l > 0 { + n += 1 + l + sovGov(uint64(l)) + } + return n +} + func (m *TallyResult) Size() (n int) { if m == nil { return 0 @@ -2979,6 +3159,216 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } return nil } +func (m *ProposalVoteOptions) 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 ErrIntOverflowGov + } + 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: ProposalVoteOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProposalVoteOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OptionOne", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + 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 ErrInvalidLengthGov + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OptionOne = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OptionTwo", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + 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 ErrInvalidLengthGov + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OptionTwo = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OptionThree", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + 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 ErrInvalidLengthGov + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OptionThree = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OptionFour", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + 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 ErrInvalidLengthGov + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OptionFour = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OptionSpam", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + 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 ErrInvalidLengthGov + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OptionSpam = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGov(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGov + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *TallyResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/gov/types/v1/msgs.go b/x/gov/types/v1/msgs.go index 847f35f75e3a..713d27ca295a 100644 --- a/x/gov/types/v1/msgs.go +++ b/x/gov/types/v1/msgs.go @@ -1,6 +1,8 @@ package v1 import ( + "errors" + "cosmossdk.io/x/gov/types/v1beta1" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -9,8 +11,8 @@ import ( ) var ( - _, _, _, _, _, _, _ sdk.Msg = &MsgSubmitProposal{}, &MsgDeposit{}, &MsgVote{}, &MsgVoteWeighted{}, &MsgExecLegacyContent{}, &MsgUpdateParams{}, &MsgCancelProposal{} - _, _ codectypes.UnpackInterfacesMessage = &MsgSubmitProposal{}, &MsgExecLegacyContent{} + _, _, _, _, _, _, _, _ sdk.Msg = &MsgSubmitProposal{}, &MsgDeposit{}, &MsgVote{}, &MsgVoteWeighted{}, &MsgExecLegacyContent{}, &MsgUpdateParams{}, &MsgCancelProposal{}, &MsgSubmitMultipleChoiceProposal{} + _, _ codectypes.UnpackInterfacesMessage = &MsgSubmitProposal{}, &MsgExecLegacyContent{} ) // NewMsgSubmitProposal creates a new MsgSubmitProposal. @@ -61,6 +63,28 @@ func (m MsgSubmitProposal) UnpackInterfaces(unpacker codectypes.AnyUnpacker) err return sdktx.UnpackInterfaces(unpacker, m.Messages) } +// NewMsgSubmitMultipleChoiceProposal creates a new MsgSubmitMultipleChoiceProposal. +func NewMultipleChoiceMsgSubmitProposal( + initialDeposit sdk.Coins, + proposer, metadata, title, summary string, + votingOptions *ProposalVoteOptions, +) (*MsgSubmitMultipleChoiceProposal, error) { + if votingOptions == nil { + return nil, errors.New("voting options cannot be nil") + } + + m := &MsgSubmitMultipleChoiceProposal{ + InitialDeposit: initialDeposit, + Proposer: proposer, + Metadata: metadata, + Title: title, + Summary: summary, + VoteOptions: votingOptions, + } + + return m, nil +} + // NewMsgDeposit creates a new MsgDeposit instance func NewMsgDeposit(depositor sdk.AccAddress, proposalID uint64, amount sdk.Coins) *MsgDeposit { return &MsgDeposit{proposalID, depositor.String(), amount} diff --git a/x/gov/types/v1/query.pb.go b/x/gov/types/v1/query.pb.go index 4898356b7e7b..6a885cc2c072 100644 --- a/x/gov/types/v1/query.pb.go +++ b/x/gov/types/v1/query.pb.go @@ -975,6 +975,98 @@ func (m *QueryTallyResultResponse) GetTally() *TallyResult { return nil } +// QueryProposalVoteOptionsRequest is the request type for the Query/ProposalVoteOptions RPC method. +type QueryProposalVoteOptionsRequest struct { + // proposal_id defines the unique id of the proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` +} + +func (m *QueryProposalVoteOptionsRequest) Reset() { *m = QueryProposalVoteOptionsRequest{} } +func (m *QueryProposalVoteOptionsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProposalVoteOptionsRequest) ProtoMessage() {} +func (*QueryProposalVoteOptionsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_46a436d1109b50d0, []int{18} +} +func (m *QueryProposalVoteOptionsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProposalVoteOptionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProposalVoteOptionsRequest.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 *QueryProposalVoteOptionsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProposalVoteOptionsRequest.Merge(m, src) +} +func (m *QueryProposalVoteOptionsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProposalVoteOptionsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProposalVoteOptionsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProposalVoteOptionsRequest proto.InternalMessageInfo + +func (m *QueryProposalVoteOptionsRequest) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +// QueryProposalVoteOptionsResponse is the response type for the Query/ProposalVoteOptions RPC method. +type QueryProposalVoteOptionsResponse struct { + // vote_options defines the valid voting options for a proposal. + VoteOptions *ProposalVoteOptions `protobuf:"bytes,1,opt,name=vote_options,json=voteOptions,proto3" json:"vote_options,omitempty"` +} + +func (m *QueryProposalVoteOptionsResponse) Reset() { *m = QueryProposalVoteOptionsResponse{} } +func (m *QueryProposalVoteOptionsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProposalVoteOptionsResponse) ProtoMessage() {} +func (*QueryProposalVoteOptionsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_46a436d1109b50d0, []int{19} +} +func (m *QueryProposalVoteOptionsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProposalVoteOptionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProposalVoteOptionsResponse.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 *QueryProposalVoteOptionsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProposalVoteOptionsResponse.Merge(m, src) +} +func (m *QueryProposalVoteOptionsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProposalVoteOptionsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProposalVoteOptionsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProposalVoteOptionsResponse proto.InternalMessageInfo + +func (m *QueryProposalVoteOptionsResponse) GetVoteOptions() *ProposalVoteOptions { + if m != nil { + return m.VoteOptions + } + return nil +} + func init() { proto.RegisterType((*QueryConstitutionRequest)(nil), "cosmos.gov.v1.QueryConstitutionRequest") proto.RegisterType((*QueryConstitutionResponse)(nil), "cosmos.gov.v1.QueryConstitutionResponse") @@ -994,76 +1086,82 @@ func init() { proto.RegisterType((*QueryDepositsResponse)(nil), "cosmos.gov.v1.QueryDepositsResponse") proto.RegisterType((*QueryTallyResultRequest)(nil), "cosmos.gov.v1.QueryTallyResultRequest") proto.RegisterType((*QueryTallyResultResponse)(nil), "cosmos.gov.v1.QueryTallyResultResponse") + proto.RegisterType((*QueryProposalVoteOptionsRequest)(nil), "cosmos.gov.v1.QueryProposalVoteOptionsRequest") + proto.RegisterType((*QueryProposalVoteOptionsResponse)(nil), "cosmos.gov.v1.QueryProposalVoteOptionsResponse") } func init() { proto.RegisterFile("cosmos/gov/v1/query.proto", fileDescriptor_46a436d1109b50d0) } var fileDescriptor_46a436d1109b50d0 = []byte{ - // 1013 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4b, 0x6f, 0xdc, 0x54, - 0x14, 0x8e, 0x27, 0x8f, 0x66, 0x4e, 0x1e, 0xc0, 0xe9, 0x23, 0xae, 0xd3, 0x4e, 0x83, 0x43, 0x93, - 0xf0, 0xa8, 0xcd, 0xa4, 0x4d, 0x2b, 0x41, 0x11, 0x6a, 0x5a, 0xa5, 0x20, 0xb1, 0x08, 0x6e, 0xc5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0x0d, 0xed, - 0x9f, 0xc3, 0x86, 0xf6, 0xd3, 0x51, 0x63, 0xec, 0xc5, 0x51, 0x63, 0xec, 0xef, 0xa3, 0xc6, 0xd8, - 0xe7, 0x8b, 0x8a, 0x86, 0xb7, 0xbe, 0xb0, 0x02, 0x66, 0x7f, 0x29, 0xe9, 0xe2, 0xaa, 0xf3, 0xf8, - 0xdf, 0xd6, 0x94, 0xfc, 0x33, 0x74, 0xfd, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x87, 0x70, 0x46, - 0xfc, 0xb6, 0x0d, 0x00, 0x00, + // 1086 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x5b, 0x6f, 0xdc, 0xc4, + 0x17, 0x8f, 0x37, 0x97, 0x26, 0x67, 0x93, 0xfc, 0xff, 0x9c, 0xb4, 0xcd, 0xd6, 0x69, 0x37, 0x61, + 0x42, 0x93, 0x70, 0xa9, 0xcd, 0x26, 0x4d, 0x2b, 0xd1, 0x22, 0xd4, 0xb4, 0xa4, 0x20, 0x21, 0x11, + 0xb6, 0x15, 0x0f, 0xbc, 0xac, 0xdc, 0xac, 0xb5, 0xb2, 0xd8, 0x7a, 0xdc, 0x9d, 0xd9, 0x15, 0x21, + 0x8d, 0x90, 0x2a, 0x71, 0x79, 0x02, 0x24, 0x2a, 0x2e, 0x9f, 0x03, 0x3e, 0x04, 0x8f, 0x15, 0xbc, + 0xf0, 0x88, 0x12, 0x3e, 0x08, 0xf2, 0xcc, 0xb1, 0xd7, 0x76, 0xbc, 0xb7, 0xaa, 0xe2, 0xd1, 0x33, + 0xbf, 0xf3, 0x3b, 0xbf, 0x39, 0xe7, 0xcc, 0x39, 0x63, 0xb8, 0xb0, 0xcf, 0xc5, 0x43, 0x2e, 0xec, + 0x06, 0xef, 0xd8, 0x9d, 0x8a, 0xfd, 0xa8, 0xed, 0xb6, 0x0e, 0xac, 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 0xdf, 0xc7, 0x65, 0xe3, 0xfb, 0x93, 0xf2, + 0xd8, 0xb3, 0x93, 0xf2, 0xd8, 0x5f, 0x27, 0xe5, 0xb1, 0x4f, 0x96, 0x34, 0x9b, 0xa8, 0x7f, 0x6a, + 0x79, 0xdc, 0xfe, 0x4c, 0xb1, 0x86, 0xb5, 0x2a, 0xc2, 0x5f, 0xda, 0x29, 0xf5, 0xc7, 0xb9, 0xf5, + 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x41, 0xdd, 0x3f, 0x7e, 0x1b, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1096,6 +1194,8 @@ type QueryClient interface { Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) // TallyResult queries the tally of a proposal vote. TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error) + // ProposalVoteOptions queries the valid voting options for a proposal. + ProposalVoteOptions(ctx context.Context, in *QueryProposalVoteOptionsRequest, opts ...grpc.CallOption) (*QueryProposalVoteOptionsResponse, error) } type queryClient struct { @@ -1187,6 +1287,15 @@ func (c *queryClient) TallyResult(ctx context.Context, in *QueryTallyResultReque return out, nil } +func (c *queryClient) ProposalVoteOptions(ctx context.Context, in *QueryProposalVoteOptionsRequest, opts ...grpc.CallOption) (*QueryProposalVoteOptionsResponse, error) { + out := new(QueryProposalVoteOptionsResponse) + err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Query/ProposalVoteOptions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Constitution queries the chain's constitution. @@ -1207,6 +1316,8 @@ type QueryServer interface { Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) // TallyResult queries the tally of a proposal vote. TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error) + // ProposalVoteOptions queries the valid voting options for a proposal. + ProposalVoteOptions(context.Context, *QueryProposalVoteOptionsRequest) (*QueryProposalVoteOptionsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1240,6 +1351,9 @@ func (*UnimplementedQueryServer) Deposits(ctx context.Context, req *QueryDeposit func (*UnimplementedQueryServer) TallyResult(ctx context.Context, req *QueryTallyResultRequest) (*QueryTallyResultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TallyResult not implemented") } +func (*UnimplementedQueryServer) ProposalVoteOptions(ctx context.Context, req *QueryProposalVoteOptionsRequest) (*QueryProposalVoteOptionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProposalVoteOptions not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1407,6 +1521,24 @@ func _Query_TallyResult_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Query_ProposalVoteOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProposalVoteOptionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ProposalVoteOptions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.gov.v1.Query/ProposalVoteOptions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ProposalVoteOptions(ctx, req.(*QueryProposalVoteOptionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.gov.v1.Query", HandlerType: (*QueryServer)(nil), @@ -1447,6 +1579,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "TallyResult", Handler: _Query_TallyResult_Handler, }, + { + MethodName: "ProposalVoteOptions", + Handler: _Query_ProposalVoteOptions_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/gov/v1/query.proto", @@ -2153,6 +2289,69 @@ func (m *QueryTallyResultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } +func (m *QueryProposalVoteOptionsRequest) 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 *QueryProposalVoteOptionsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProposalVoteOptionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProposalId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryProposalVoteOptionsResponse) 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 *QueryProposalVoteOptionsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProposalVoteOptionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.VoteOptions != nil { + { + size, err := m.VoteOptions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -2445,6 +2644,31 @@ func (m *QueryTallyResultResponse) Size() (n int) { return n } +func (m *QueryProposalVoteOptionsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovQuery(uint64(m.ProposalId)) + } + return n +} + +func (m *QueryProposalVoteOptionsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.VoteOptions != nil { + l = m.VoteOptions.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4282,6 +4506,161 @@ func (m *QueryTallyResultResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryProposalVoteOptionsRequest) 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 ErrIntOverflowQuery + } + 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: QueryProposalVoteOptionsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProposalVoteOptionsRequest: 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 ErrIntOverflowQuery + } + 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 := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryProposalVoteOptionsResponse) 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 ErrIntOverflowQuery + } + 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: QueryProposalVoteOptionsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProposalVoteOptionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VoteOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VoteOptions == nil { + m.VoteOptions = &ProposalVoteOptions{} + } + if err := m.VoteOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/gov/types/v1/query.pb.gw.go b/x/gov/types/v1/query.pb.gw.go index 7babaed36ba0..ff54cda2e588 100644 --- a/x/gov/types/v1/query.pb.gw.go +++ b/x/gov/types/v1/query.pb.gw.go @@ -545,6 +545,60 @@ func local_request_Query_TallyResult_0(ctx context.Context, marshaler runtime.Ma } +func request_Query_ProposalVoteOptions_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProposalVoteOptionsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["proposal_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "proposal_id") + } + + protoReq.ProposalId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) + } + + msg, err := client.ProposalVoteOptions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ProposalVoteOptions_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProposalVoteOptionsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["proposal_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "proposal_id") + } + + protoReq.ProposalId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) + } + + msg, err := server.ProposalVoteOptions(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -758,6 +812,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_ProposalVoteOptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ProposalVoteOptions_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ProposalVoteOptions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -979,6 +1056,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_ProposalVoteOptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ProposalVoteOptions_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ProposalVoteOptions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1000,6 +1097,8 @@ var ( pattern_Query_Deposits_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "gov", "v1", "proposals", "proposal_id", "deposits"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_TallyResult_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "gov", "v1", "proposals", "proposal_id", "tally"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ProposalVoteOptions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "gov", "v1", "proposals", "proposal_id", "vote_options"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1020,4 +1119,6 @@ var ( forward_Query_Deposits_0 = runtime.ForwardResponseMessage forward_Query_TallyResult_0 = runtime.ForwardResponseMessage + + forward_Query_ProposalVoteOptions_0 = runtime.ForwardResponseMessage ) diff --git a/x/gov/types/v1/tx.pb.go b/x/gov/types/v1/tx.pb.go index 143df2acc7f1..5bed6c5517ca 100644 --- a/x/gov/types/v1/tx.pb.go +++ b/x/gov/types/v1/tx.pb.go @@ -67,7 +67,7 @@ type MsgSubmitProposal struct { // proposal_type defines the type of proposal // When not set defaults to PROPOSAL_TYPE_STANDARD // - // Since: cosmos-sdk 0.51 + // Since: x/gov v1.0.0 ProposalType ProposalType `protobuf:"varint,8,opt,name=proposal_type,json=proposalType,proto3,enum=cosmos.gov.v1.ProposalType" json:"proposal_type,omitempty"` } @@ -844,6 +844,149 @@ func (m *MsgCancelProposalResponse) GetCanceledHeight() uint64 { return 0 } +// MsgSubmitMultipleChoiceProposal defines a message to submit a multiple choice proposal. +// +// Since: x/gov 1.0.0 +type MsgSubmitMultipleChoiceProposal struct { + // initial_deposit is the deposit value that must be paid at proposal submission. + InitialDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=initial_deposit,json=initialDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"initial_deposit"` + // proposer is the account address of the proposer. + Proposer string `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"` + // metadata is any arbitrary metadata attached to the proposal. + Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + // title is the title of the proposal. + Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` + // summary is the summary of the proposal + Summary string `protobuf:"bytes,5,opt,name=summary,proto3" json:"summary,omitempty"` + // vote_options defines the vote options for the proposal. + VoteOptions *ProposalVoteOptions `protobuf:"bytes,6,opt,name=vote_options,json=voteOptions,proto3" json:"vote_options,omitempty"` +} + +func (m *MsgSubmitMultipleChoiceProposal) Reset() { *m = MsgSubmitMultipleChoiceProposal{} } +func (m *MsgSubmitMultipleChoiceProposal) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitMultipleChoiceProposal) ProtoMessage() {} +func (*MsgSubmitMultipleChoiceProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_9ff8f4a63b6fc9a9, []int{14} +} +func (m *MsgSubmitMultipleChoiceProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubmitMultipleChoiceProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubmitMultipleChoiceProposal.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 *MsgSubmitMultipleChoiceProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitMultipleChoiceProposal.Merge(m, src) +} +func (m *MsgSubmitMultipleChoiceProposal) XXX_Size() int { + return m.Size() +} +func (m *MsgSubmitMultipleChoiceProposal) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitMultipleChoiceProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubmitMultipleChoiceProposal proto.InternalMessageInfo + +func (m *MsgSubmitMultipleChoiceProposal) GetInitialDeposit() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.InitialDeposit + } + return nil +} + +func (m *MsgSubmitMultipleChoiceProposal) GetProposer() string { + if m != nil { + return m.Proposer + } + return "" +} + +func (m *MsgSubmitMultipleChoiceProposal) GetMetadata() string { + if m != nil { + return m.Metadata + } + return "" +} + +func (m *MsgSubmitMultipleChoiceProposal) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *MsgSubmitMultipleChoiceProposal) GetSummary() string { + if m != nil { + return m.Summary + } + return "" +} + +func (m *MsgSubmitMultipleChoiceProposal) GetVoteOptions() *ProposalVoteOptions { + if m != nil { + return m.VoteOptions + } + return nil +} + +// MsgSubmitMultipleChoiceProposalResponse defines the Msg/SubmitMultipleChoiceProposal response type. +// +// Since: x/gov 1.0.0 +type MsgSubmitMultipleChoiceProposalResponse struct { + // proposal_id defines the unique id of the proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` +} + +func (m *MsgSubmitMultipleChoiceProposalResponse) Reset() { + *m = MsgSubmitMultipleChoiceProposalResponse{} +} +func (m *MsgSubmitMultipleChoiceProposalResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitMultipleChoiceProposalResponse) ProtoMessage() {} +func (*MsgSubmitMultipleChoiceProposalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9ff8f4a63b6fc9a9, []int{15} +} +func (m *MsgSubmitMultipleChoiceProposalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubmitMultipleChoiceProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubmitMultipleChoiceProposalResponse.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 *MsgSubmitMultipleChoiceProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitMultipleChoiceProposalResponse.Merge(m, src) +} +func (m *MsgSubmitMultipleChoiceProposalResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSubmitMultipleChoiceProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitMultipleChoiceProposalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubmitMultipleChoiceProposalResponse proto.InternalMessageInfo + +func (m *MsgSubmitMultipleChoiceProposalResponse) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + func init() { proto.RegisterType((*MsgSubmitProposal)(nil), "cosmos.gov.v1.MsgSubmitProposal") proto.RegisterType((*MsgSubmitProposalResponse)(nil), "cosmos.gov.v1.MsgSubmitProposalResponse") @@ -859,82 +1002,90 @@ func init() { proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.gov.v1.MsgUpdateParamsResponse") proto.RegisterType((*MsgCancelProposal)(nil), "cosmos.gov.v1.MsgCancelProposal") proto.RegisterType((*MsgCancelProposalResponse)(nil), "cosmos.gov.v1.MsgCancelProposalResponse") + proto.RegisterType((*MsgSubmitMultipleChoiceProposal)(nil), "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal") + proto.RegisterType((*MsgSubmitMultipleChoiceProposalResponse)(nil), "cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse") } func init() { proto.RegisterFile("cosmos/gov/v1/tx.proto", fileDescriptor_9ff8f4a63b6fc9a9) } var fileDescriptor_9ff8f4a63b6fc9a9 = []byte{ - // 1114 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcb, 0x6f, 0xdc, 0x44, - 0x18, 0xcf, 0xe4, 0xb5, 0xc9, 0xe4, 0xa5, 0x8c, 0xb6, 0xad, 0xe3, 0x16, 0xef, 0xd6, 0x45, 0xb0, - 0x4a, 0x89,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0x39, 0x70, 0xbd, 0x00, 0xbc, 0x90, 0xa4, 0xae, 0xc1, 0x2b, - 0x65, 0xf2, 0x18, 0xbe, 0xfe, 0x3b, 0x80, 0x95, 0x1d, 0xea, 0xde, 0x27, 0x0c, 0xa3, 0xad, 0x12, - 0x2a, 0xda, 0xd5, 0xbf, 0x9e, 0xd5, 0xd2, 0xe2, 0xa8, 0xf7, 0x52, 0x04, 0x21, 0x03, 0xce, 0x0c, - 0x08, 0xc3, 0xbd, 0x28, 0xe7, 0x31, 0x4d, 0x17, 0x99, 0xa1, 0x26, 0x9c, 0x25, 0x21, 0xf3, 0x48, - 0x20, 0xba, 0x74, 0x79, 0x74, 0x54, 0x64, 0xf1, 0x79, 0x2e, 0x9f, 0x0b, 0x03, 0x4b, 0x1a, 0x8e, - 0x6b, 0xd2, 0xd6, 0xab, 0x9c, 0x98, 0x28, 0x34, 0x27, 0xe5, 0x42, 0x81, 0x14, 0x1e, 0x4f, 0x5f, - 0x85, 0x2b, 0xf2, 0x33, 0x81, 0xfe, 0x0f, 0x48, 0x64, 0x5f, 0x62, 0xcf, 0xdd, 0xe7, 0xfd, 0xf9, - 0x92, 0x28, 0x78, 0x17, 0x56, 0x22, 0x64, 0x54, 0x99, 0x12, 0xe3, 0xe2, 0x6a, 0x8e, 0x83, 0x38, - 0xa1, 0x14, 0x17, 0xb1, 0xc7, 0x58, 0x32, 0xde, 0xc8, 0x92, 0xf1, 0x4a, 0x29, 0x19, 0x71, 0x70, - 0x7d, 0x0d, 0x5e, 0xca, 0x89, 0x12, 0x72, 0xfe, 0x00, 0x10, 0xee, 0x50, 0x37, 0x9e, 0x2d, 0xff, - 0x93, 0x97, 0x1b, 0x70, 0x5e, 0x8e, 0x45, 0x72, 0x3e, 0x37, 0x23, 0x53, 0x74, 0x13, 0xce, 0xda, - 0x3e, 0xe9, 0x07, 0x4c, 0xd2, 0x33, 0x66, 0x9a, 0xce, 0xf3, 0x69, 0x1a, 0xed, 0x2c, 0x7d, 0x5a,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9, 0xe7, 0x44, 0x3d, 0x57, 0xe7, 0xc2, 0x1d, 0xa4, 0x36, 0xce, - 0xb3, 0x48, 0xb8, 0xc0, 0x70, 0xb5, 0x78, 0x01, 0x5d, 0x2b, 0xba, 0x17, 0x8c, 0xd4, 0xeb, 0x2f, - 0x60, 0x94, 0x6c, 0xf3, 0x1e, 0x9c, 0x16, 0x37, 0xc1, 0xc5, 0xa2, 0x13, 0x97, 0xab, 0x5a, 0xb9, - 0x3c, 0xf1, 0xbf, 0x0f, 0x17, 0x33, 0xe3, 0xf4, 0x0c, 0xfb, 0x58, 0xaf, 0xbe, 0x36, 0x5e, 0x9f, - 0xc4, 0xfd, 0x18, 0x56, 0xe2, 0x49, 0xb4, 0x56, 0x74, 0x91, 0x2a, 0xf5, 0xea, 0x99, 0xaa, 0x74, - 0x82, 0x99, 0x33, 0x5d, 0x92, 0x60, 0x5a, 0x5f, 0x96, 0x60, 0xd9, 0xb1, 0xe2, 0xd5, 0xcf, 0x1d, - 0xa9, 0x92, 0xea, 0x67, 0x2d, 0xca, 0xaa, 0x5f, 0x7e, 0x12, 0xd4, 0x99, 0x6f, 0xf9, 0x58, 0x68, - 0x6f, 0x3d, 0x39, 0xd6, 0xc0, 0xd3, 0x63, 0x0d, 0xfc, 0x76, 0xac, 0x81, 0x87, 0x27, 0xda, 0xc4, - 0xd3, 0x13, 0x6d, 0xe2, 0xd7, 0x13, 0x6d, 0xe2, 0xab, 0xcb, 0x51, 0x24, 0xea, 0x3c, 0x30, 0x3c, - 0x22, 0xe7, 0x82, 0x78, 0x40, 0xf2, 0xe7, 0xfa, 0xac, 0x68, 0xfb, 0xb7, 0xfe, 0x0d, 0x00, 0x00, - 0xff, 0xff, 0x46, 0x1f, 0x89, 0xe5, 0xee, 0x0b, 0x00, 0x00, + // 1216 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x6f, 0x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, 0x82, 0x31, 0xa2, 0xce, 0x48, 0x30, 0xaa, 0xcf, 0x4a, 0x30, 0x8b, 0x2b, + 0x59, 0xf7, 0x13, 0x3c, 0x99, 0xd1, 0xfd, 0xb8, 0x45, 0x56, 0xf7, 0x27, 0xd0, 0xdb, 0x43, 0x00, + 0x2f, 0x4d, 0x65, 0x0d, 0x6d, 0xd2, 0x20, 0x65, 0xdb, 0x2b, 0xdb, 0x2f, 0x67, 0x1f, 0x24, 0xa2, + 0xe4, 0xbf, 0x61, 0x3c, 0xd1, 0xda, 0x7a, 0x7a, 0x54, 0x06, 0xcf, 0x8e, 0xca, 0xe0, 0xd7, 0xa3, + 0x32, 0x78, 0x74, 0x5c, 0x9e, 0x79, 0x76, 0x5c, 0x9e, 0xf9, 0xe5, 0xb8, 0x3c, 0xf3, 0xe5, 0x45, + 0x3f, 0x2e, 0x31, 0x1f, 0x68, 0x36, 0x16, 0xb7, 0x0e, 0xe7, 0x1d, 0xf6, 0x63, 0xb0, 0xc0, 0x49, + 0xf5, 0xcd, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x9b, 0x54, 0x57, 0x4c, 0x0e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -969,6 +1120,10 @@ type MsgClient interface { // // Since: cosmos-sdk 0.50 CancelProposal(ctx context.Context, in *MsgCancelProposal, opts ...grpc.CallOption) (*MsgCancelProposalResponse, error) + // SubmitMultipleChoiceProposal defines a method to create new multiple choice proposal. + // + // Since: x/gov 1.0.0 + SubmitMultipleChoiceProposal(ctx context.Context, in *MsgSubmitMultipleChoiceProposal, opts ...grpc.CallOption) (*MsgSubmitMultipleChoiceProposalResponse, error) } type msgClient struct { @@ -1042,6 +1197,15 @@ func (c *msgClient) CancelProposal(ctx context.Context, in *MsgCancelProposal, o return out, nil } +func (c *msgClient) SubmitMultipleChoiceProposal(ctx context.Context, in *MsgSubmitMultipleChoiceProposal, opts ...grpc.CallOption) (*MsgSubmitMultipleChoiceProposalResponse, error) { + out := new(MsgSubmitMultipleChoiceProposalResponse) + err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Msg/SubmitMultipleChoiceProposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // SubmitProposal defines a method to create new proposal given the messages. @@ -1064,6 +1228,10 @@ type MsgServer interface { // // Since: cosmos-sdk 0.50 CancelProposal(context.Context, *MsgCancelProposal) (*MsgCancelProposalResponse, error) + // SubmitMultipleChoiceProposal defines a method to create new multiple choice proposal. + // + // Since: x/gov 1.0.0 + SubmitMultipleChoiceProposal(context.Context, *MsgSubmitMultipleChoiceProposal) (*MsgSubmitMultipleChoiceProposalResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1091,6 +1259,9 @@ func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateP func (*UnimplementedMsgServer) CancelProposal(ctx context.Context, req *MsgCancelProposal) (*MsgCancelProposalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelProposal not implemented") } +func (*UnimplementedMsgServer) SubmitMultipleChoiceProposal(ctx context.Context, req *MsgSubmitMultipleChoiceProposal) (*MsgSubmitMultipleChoiceProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitMultipleChoiceProposal not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1222,6 +1393,24 @@ func _Msg_CancelProposal_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _Msg_SubmitMultipleChoiceProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSubmitMultipleChoiceProposal) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SubmitMultipleChoiceProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.gov.v1.Msg/SubmitMultipleChoiceProposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SubmitMultipleChoiceProposal(ctx, req.(*MsgSubmitMultipleChoiceProposal)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.gov.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -1254,6 +1443,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "CancelProposal", Handler: _Msg_CancelProposal_Handler, }, + { + MethodName: "SubmitMultipleChoiceProposal", + Handler: _Msg_SubmitMultipleChoiceProposal_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/gov/v1/tx.proto", @@ -1806,6 +1999,111 @@ func (m *MsgCancelProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } +func (m *MsgSubmitMultipleChoiceProposal) 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 *MsgSubmitMultipleChoiceProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubmitMultipleChoiceProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.VoteOptions != nil { + { + size, err := m.VoteOptions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if len(m.Summary) > 0 { + i -= len(m.Summary) + copy(dAtA[i:], m.Summary) + i = encodeVarintTx(dAtA, i, uint64(len(m.Summary))) + i-- + dAtA[i] = 0x2a + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintTx(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0x22 + } + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintTx(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x1a + } + if len(m.Proposer) > 0 { + i -= len(m.Proposer) + copy(dAtA[i:], m.Proposer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Proposer))) + i-- + dAtA[i] = 0x12 + } + if len(m.InitialDeposit) > 0 { + for iNdEx := len(m.InitialDeposit) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.InitialDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgSubmitMultipleChoiceProposalResponse) 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 *MsgSubmitMultipleChoiceProposalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubmitMultipleChoiceProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProposalId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -2053,39 +2351,86 @@ func (m *MsgCancelProposalResponse) Size() (n int) { return n } -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitProposal: wiretype end group for non-group") +func (m *MsgSubmitMultipleChoiceProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.InitialDeposit) > 0 { + for _, e := range m.InitialDeposit { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + l = len(m.Proposer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Title) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Summary) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.VoteOptions != nil { + l = m.VoteOptions.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSubmitMultipleChoiceProposalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovTx(uint64(m.ProposalId)) + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubmitProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitProposal: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3572,6 +3917,323 @@ func (m *MsgCancelProposalResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgSubmitMultipleChoiceProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubmitMultipleChoiceProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitMultipleChoiceProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialDeposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InitialDeposit = append(m.InitialDeposit, types1.Coin{}) + if err := m.InitialDeposit[len(m.InitialDeposit)-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 Proposer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proposer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + 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 ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + 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 ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Summary = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VoteOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VoteOptions == nil { + m.VoteOptions = &ProposalVoteOptions{} + } + if err := m.VoteOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubmitMultipleChoiceProposalResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubmitMultipleChoiceProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitMultipleChoiceProposalResponse: 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 ErrIntOverflowTx + } + 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 := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/gov/types/v1/vote.go b/x/gov/types/v1/vote.go index 068952d71099..fcd40a061660 100644 --- a/x/gov/types/v1/vote.go +++ b/x/gov/types/v1/vote.go @@ -18,10 +18,10 @@ const ( OptionFour = VoteOption_VOTE_OPTION_FOUR OptionSpam = VoteOption_VOTE_OPTION_SPAM - OptionYes = OptionOne - OptionNo = OptionThree - OptionNoWithVeto = OptionFour - OptionAbstain = OptionTwo + OptionYes = VoteOption_VOTE_OPTION_YES + OptionNo = VoteOption_VOTE_OPTION_NO + OptionNoWithVeto = VoteOption_VOTE_OPTION_NO_WITH_VETO + OptionAbstain = VoteOption_VOTE_OPTION_ABSTAIN ) // NewVote creates a new Vote instance