feat(group): add group event tally result (#16191)

Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
Jeancarlo Barrios
2023-05-26 09:43:17 +00:00
committed by GitHub
co-authored by Julien Robert
parent 3d15f9edf2
commit be2003e581
13 changed files with 1054 additions and 58 deletions
+635 -21
View File
@@ -3857,6 +3857,537 @@ func (x *fastReflection_EventLeaveGroup) ProtoMethods() *protoiface.Methods {
}
}
var (
md_EventProposalPruned protoreflect.MessageDescriptor
fd_EventProposalPruned_proposal_id protoreflect.FieldDescriptor
fd_EventProposalPruned_status protoreflect.FieldDescriptor
fd_EventProposalPruned_tally_result protoreflect.FieldDescriptor
)
func init() {
file_cosmos_group_v1_events_proto_init()
md_EventProposalPruned = File_cosmos_group_v1_events_proto.Messages().ByName("EventProposalPruned")
fd_EventProposalPruned_proposal_id = md_EventProposalPruned.Fields().ByName("proposal_id")
fd_EventProposalPruned_status = md_EventProposalPruned.Fields().ByName("status")
fd_EventProposalPruned_tally_result = md_EventProposalPruned.Fields().ByName("tally_result")
}
var _ protoreflect.Message = (*fastReflection_EventProposalPruned)(nil)
type fastReflection_EventProposalPruned EventProposalPruned
func (x *EventProposalPruned) ProtoReflect() protoreflect.Message {
return (*fastReflection_EventProposalPruned)(x)
}
func (x *EventProposalPruned) slowProtoReflect() protoreflect.Message {
mi := &file_cosmos_group_v1_events_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var _fastReflection_EventProposalPruned_messageType fastReflection_EventProposalPruned_messageType
var _ protoreflect.MessageType = fastReflection_EventProposalPruned_messageType{}
type fastReflection_EventProposalPruned_messageType struct{}
func (x fastReflection_EventProposalPruned_messageType) Zero() protoreflect.Message {
return (*fastReflection_EventProposalPruned)(nil)
}
func (x fastReflection_EventProposalPruned_messageType) New() protoreflect.Message {
return new(fastReflection_EventProposalPruned)
}
func (x fastReflection_EventProposalPruned_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_EventProposalPruned
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_EventProposalPruned) Descriptor() protoreflect.MessageDescriptor {
return md_EventProposalPruned
}
// 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_EventProposalPruned) Type() protoreflect.MessageType {
return _fastReflection_EventProposalPruned_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_EventProposalPruned) New() protoreflect.Message {
return new(fastReflection_EventProposalPruned)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_EventProposalPruned) Interface() protoreflect.ProtoMessage {
return (*EventProposalPruned)(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_EventProposalPruned) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.ProposalId != uint64(0) {
value := protoreflect.ValueOfUint64(x.ProposalId)
if !f(fd_EventProposalPruned_proposal_id, value) {
return
}
}
if x.Status != 0 {
value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status))
if !f(fd_EventProposalPruned_status, value) {
return
}
}
if x.TallyResult != nil {
value := protoreflect.ValueOfMessage(x.TallyResult.ProtoReflect())
if !f(fd_EventProposalPruned_tally_result, 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_EventProposalPruned) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "cosmos.group.v1.EventProposalPruned.proposal_id":
return x.ProposalId != uint64(0)
case "cosmos.group.v1.EventProposalPruned.status":
return x.Status != 0
case "cosmos.group.v1.EventProposalPruned.tally_result":
return x.TallyResult != nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventProposalPruned"))
}
panic(fmt.Errorf("message cosmos.group.v1.EventProposalPruned 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_EventProposalPruned) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "cosmos.group.v1.EventProposalPruned.proposal_id":
x.ProposalId = uint64(0)
case "cosmos.group.v1.EventProposalPruned.status":
x.Status = 0
case "cosmos.group.v1.EventProposalPruned.tally_result":
x.TallyResult = nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventProposalPruned"))
}
panic(fmt.Errorf("message cosmos.group.v1.EventProposalPruned 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_EventProposalPruned) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "cosmos.group.v1.EventProposalPruned.proposal_id":
value := x.ProposalId
return protoreflect.ValueOfUint64(value)
case "cosmos.group.v1.EventProposalPruned.status":
value := x.Status
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value))
case "cosmos.group.v1.EventProposalPruned.tally_result":
value := x.TallyResult
return protoreflect.ValueOfMessage(value.ProtoReflect())
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventProposalPruned"))
}
panic(fmt.Errorf("message cosmos.group.v1.EventProposalPruned 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_EventProposalPruned) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "cosmos.group.v1.EventProposalPruned.proposal_id":
x.ProposalId = value.Uint()
case "cosmos.group.v1.EventProposalPruned.status":
x.Status = (ProposalStatus)(value.Enum())
case "cosmos.group.v1.EventProposalPruned.tally_result":
x.TallyResult = value.Message().Interface().(*TallyResult)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventProposalPruned"))
}
panic(fmt.Errorf("message cosmos.group.v1.EventProposalPruned 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_EventProposalPruned) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "cosmos.group.v1.EventProposalPruned.tally_result":
if x.TallyResult == nil {
x.TallyResult = new(TallyResult)
}
return protoreflect.ValueOfMessage(x.TallyResult.ProtoReflect())
case "cosmos.group.v1.EventProposalPruned.proposal_id":
panic(fmt.Errorf("field proposal_id of message cosmos.group.v1.EventProposalPruned is not mutable"))
case "cosmos.group.v1.EventProposalPruned.status":
panic(fmt.Errorf("field status of message cosmos.group.v1.EventProposalPruned is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventProposalPruned"))
}
panic(fmt.Errorf("message cosmos.group.v1.EventProposalPruned 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_EventProposalPruned) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "cosmos.group.v1.EventProposalPruned.proposal_id":
return protoreflect.ValueOfUint64(uint64(0))
case "cosmos.group.v1.EventProposalPruned.status":
return protoreflect.ValueOfEnum(0)
case "cosmos.group.v1.EventProposalPruned.tally_result":
m := new(TallyResult)
return protoreflect.ValueOfMessage(m.ProtoReflect())
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventProposalPruned"))
}
panic(fmt.Errorf("message cosmos.group.v1.EventProposalPruned 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_EventProposalPruned) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.EventProposalPruned", 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_EventProposalPruned) 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_EventProposalPruned) 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_EventProposalPruned) 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_EventProposalPruned) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*EventProposalPruned)
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.Status != 0 {
n += 1 + runtime.Sov(uint64(x.Status))
}
if x.TallyResult != nil {
l = options.Size(x.TallyResult)
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().(*EventProposalPruned)
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.TallyResult != nil {
encoded, err := options.Marshal(x.TallyResult)
if err != nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
i--
dAtA[i] = 0x1a
}
if x.Status != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.Status))
i--
dAtA[i] = 0x10
}
if x.ProposalId != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId))
i--
dAtA[i] = 0x8
}
if input.Buf != nil {
input.Buf = append(input.Buf, dAtA...)
} else {
input.Buf = dAtA
}
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
x := input.Message.Interface().(*EventProposalPruned)
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: EventProposalPruned: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventProposalPruned: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType)
}
x.ProposalId = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
x.ProposalId |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
}
x.Status = 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.Status |= ProposalStatus(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TallyResult", 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.TallyResult == nil {
x.TallyResult = &TallyResult{}
}
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TallyResult); 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.
@@ -4232,6 +4763,61 @@ func (x *EventLeaveGroup) GetAddress() string {
return ""
}
// EventProposalTallyFinalized is an event emitted when a proposal tally is finalized.
type EventProposalPruned struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// proposal_id is the unique ID of the proposal.
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
// status is the proposal status (UNSPECIFIED, SUBMITTED, ACCEPTED, REJECTED, ABORTED, WITHDRAWN).
Status ProposalStatus `protobuf:"varint,2,opt,name=status,proto3,enum=cosmos.group.v1.ProposalStatus" json:"status,omitempty"`
// tally_result is the proposal tally result.
TallyResult *TallyResult `protobuf:"bytes,3,opt,name=tally_result,json=tallyResult,proto3" json:"tally_result,omitempty"`
}
func (x *EventProposalPruned) Reset() {
*x = EventProposalPruned{}
if protoimpl.UnsafeEnabled {
mi := &file_cosmos_group_v1_events_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EventProposalPruned) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EventProposalPruned) ProtoMessage() {}
// Deprecated: Use EventProposalPruned.ProtoReflect.Descriptor instead.
func (*EventProposalPruned) Descriptor() ([]byte, []int) {
return file_cosmos_group_v1_events_proto_rawDescGZIP(), []int{9}
}
func (x *EventProposalPruned) GetProposalId() uint64 {
if x != nil {
return x.ProposalId
}
return 0
}
func (x *EventProposalPruned) GetStatus() ProposalStatus {
if x != nil {
return x.Status
}
return ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED
}
func (x *EventProposalPruned) GetTallyResult() *TallyResult {
if x != nil {
return x.TallyResult
}
return nil
}
var File_cosmos_group_v1_events_proto protoreflect.FileDescriptor
var file_cosmos_group_v1_events_proto_rawDesc = []byte{
@@ -4281,18 +4867,29 @@ var file_cosmos_group_v1_events_proto_rawDesc = []byte{
0x70, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 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, 0x07,
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0xaa, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e,
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x42,
0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x28,
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, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31,
0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02,
0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31,
0xca, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c,
0x56, 0x31, 0xe2, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75,
0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0xea, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xb0, 0x01, 0x0a, 0x13, 0x45, 0x76, 0x65, 0x6e,
0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x64, 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, 0x37, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e,
0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75,
0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x61, 0x6c,
0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76,
0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0b, 0x74,
0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0xaa, 0x01, 0x0a, 0x13, 0x63,
0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e,
0x76, 0x31, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
0x01, 0x5a, 0x28, 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, 0x72, 0x6f, 0x75, 0x70,
0x2f, 0x76, 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47,
0x58, 0xaa, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f,
0x75, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47,
0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72,
0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -4307,7 +4904,7 @@ func file_cosmos_group_v1_events_proto_rawDescGZIP() []byte {
return file_cosmos_group_v1_events_proto_rawDescData
}
var file_cosmos_group_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_cosmos_group_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_cosmos_group_v1_events_proto_goTypes = []interface{}{
(*EventCreateGroup)(nil), // 0: cosmos.group.v1.EventCreateGroup
(*EventUpdateGroup)(nil), // 1: cosmos.group.v1.EventUpdateGroup
@@ -4318,15 +4915,20 @@ var file_cosmos_group_v1_events_proto_goTypes = []interface{}{
(*EventVote)(nil), // 6: cosmos.group.v1.EventVote
(*EventExec)(nil), // 7: cosmos.group.v1.EventExec
(*EventLeaveGroup)(nil), // 8: cosmos.group.v1.EventLeaveGroup
(ProposalExecutorResult)(0), // 9: cosmos.group.v1.ProposalExecutorResult
(*EventProposalPruned)(nil), // 9: cosmos.group.v1.EventProposalPruned
(ProposalExecutorResult)(0), // 10: cosmos.group.v1.ProposalExecutorResult
(ProposalStatus)(0), // 11: cosmos.group.v1.ProposalStatus
(*TallyResult)(nil), // 12: cosmos.group.v1.TallyResult
}
var file_cosmos_group_v1_events_proto_depIdxs = []int32{
9, // 0: cosmos.group.v1.EventExec.result:type_name -> cosmos.group.v1.ProposalExecutorResult
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
10, // 0: cosmos.group.v1.EventExec.result:type_name -> cosmos.group.v1.ProposalExecutorResult
11, // 1: cosmos.group.v1.EventProposalPruned.status:type_name -> cosmos.group.v1.ProposalStatus
12, // 2: cosmos.group.v1.EventProposalPruned.tally_result:type_name -> cosmos.group.v1.TallyResult
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_cosmos_group_v1_events_proto_init() }
@@ -4444,6 +5046,18 @@ func file_cosmos_group_v1_events_proto_init() {
return nil
}
}
file_cosmos_group_v1_events_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EventProposalPruned); 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{
@@ -4451,7 +5065,7 @@ func file_cosmos_group_v1_events_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_cosmos_group_v1_events_proto_rawDesc,
NumEnums: 0,
NumMessages: 9,
NumMessages: 10,
NumExtensions: 0,
NumServices: 0,
},
+4 -2
View File
@@ -7966,7 +7966,8 @@ type GroupPolicyInfo struct {
// admin is the account address of the group admin.
Admin string `protobuf:"bytes,3,opt,name=admin,proto3" json:"admin,omitempty"`
// metadata is any arbitrary metadata attached to the group policy.
// the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#decision-policy-1
// the recommended format of the metadata is to be found here:
// https://docs.cosmos.network/v0.47/modules/group#decision-policy-1
Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
// version is used to track changes to a group's GroupPolicyInfo structure that
// would create a different result on a running proposal.
@@ -8060,7 +8061,8 @@ type Proposal struct {
// group_policy_address is the account address of group policy.
GroupPolicyAddress string `protobuf:"bytes,2,opt,name=group_policy_address,json=groupPolicyAddress,proto3" json:"group_policy_address,omitempty"`
// metadata is any arbitrary metadata attached to the proposal.
// the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#proposal-4
// the recommended format of the metadata is to be found here:
// https://docs.cosmos.network/v0.47/modules/group#proposal-4
Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
// proposers are the account addresses of the proposers.
Proposers []string `protobuf:"bytes,4,rep,name=proposers,proto3" json:"proposers,omitempty"`