diff --git a/api/cosmos/group/v1beta1/tx.pulsar.go b/api/cosmos/group/v1beta1/tx.pulsar.go index 5b03bbf75e..b5fd018699 100644 --- a/api/cosmos/group/v1beta1/tx.pulsar.go +++ b/api/cosmos/group/v1beta1/tx.pulsar.go @@ -5365,6 +5365,1297 @@ func (x *fastReflection_MsgUpdateGroupPolicyAdmin) ProtoMethods() *protoiface.Me } } +var _ protoreflect.List = (*_MsgCreateGroupWithPolicy_2_list)(nil) + +type _MsgCreateGroupWithPolicy_2_list struct { + list *[]*Member +} + +func (x *_MsgCreateGroupWithPolicy_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgCreateGroupWithPolicy_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgCreateGroupWithPolicy_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Member) + (*x.list)[i] = concreteValue +} + +func (x *_MsgCreateGroupWithPolicy_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Member) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgCreateGroupWithPolicy_2_list) AppendMutable() protoreflect.Value { + v := new(Member) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCreateGroupWithPolicy_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgCreateGroupWithPolicy_2_list) NewElement() protoreflect.Value { + v := new(Member) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCreateGroupWithPolicy_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgCreateGroupWithPolicy protoreflect.MessageDescriptor + fd_MsgCreateGroupWithPolicy_admin protoreflect.FieldDescriptor + fd_MsgCreateGroupWithPolicy_members protoreflect.FieldDescriptor + fd_MsgCreateGroupWithPolicy_group_metadata protoreflect.FieldDescriptor + fd_MsgCreateGroupWithPolicy_group_policy_metadata protoreflect.FieldDescriptor + fd_MsgCreateGroupWithPolicy_group_policy_as_admin protoreflect.FieldDescriptor + fd_MsgCreateGroupWithPolicy_decision_policy protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_group_v1beta1_tx_proto_init() + md_MsgCreateGroupWithPolicy = File_cosmos_group_v1beta1_tx_proto.Messages().ByName("MsgCreateGroupWithPolicy") + fd_MsgCreateGroupWithPolicy_admin = md_MsgCreateGroupWithPolicy.Fields().ByName("admin") + fd_MsgCreateGroupWithPolicy_members = md_MsgCreateGroupWithPolicy.Fields().ByName("members") + fd_MsgCreateGroupWithPolicy_group_metadata = md_MsgCreateGroupWithPolicy.Fields().ByName("group_metadata") + fd_MsgCreateGroupWithPolicy_group_policy_metadata = md_MsgCreateGroupWithPolicy.Fields().ByName("group_policy_metadata") + fd_MsgCreateGroupWithPolicy_group_policy_as_admin = md_MsgCreateGroupWithPolicy.Fields().ByName("group_policy_as_admin") + fd_MsgCreateGroupWithPolicy_decision_policy = md_MsgCreateGroupWithPolicy.Fields().ByName("decision_policy") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateGroupWithPolicy)(nil) + +type fastReflection_MsgCreateGroupWithPolicy MsgCreateGroupWithPolicy + +func (x *MsgCreateGroupWithPolicy) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateGroupWithPolicy)(x) +} + +func (x *MsgCreateGroupWithPolicy) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCreateGroupWithPolicy_messageType fastReflection_MsgCreateGroupWithPolicy_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateGroupWithPolicy_messageType{} + +type fastReflection_MsgCreateGroupWithPolicy_messageType struct{} + +func (x fastReflection_MsgCreateGroupWithPolicy_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateGroupWithPolicy)(nil) +} +func (x fastReflection_MsgCreateGroupWithPolicy_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateGroupWithPolicy) +} +func (x fastReflection_MsgCreateGroupWithPolicy_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateGroupWithPolicy +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateGroupWithPolicy) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateGroupWithPolicy +} + +// 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_MsgCreateGroupWithPolicy) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateGroupWithPolicy_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateGroupWithPolicy) New() protoreflect.Message { + return new(fastReflection_MsgCreateGroupWithPolicy) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateGroupWithPolicy) Interface() protoreflect.ProtoMessage { + return (*MsgCreateGroupWithPolicy)(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_MsgCreateGroupWithPolicy) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Admin != "" { + value := protoreflect.ValueOfString(x.Admin) + if !f(fd_MsgCreateGroupWithPolicy_admin, value) { + return + } + } + if len(x.Members) != 0 { + value := protoreflect.ValueOfList(&_MsgCreateGroupWithPolicy_2_list{list: &x.Members}) + if !f(fd_MsgCreateGroupWithPolicy_members, value) { + return + } + } + if len(x.GroupMetadata) != 0 { + value := protoreflect.ValueOfBytes(x.GroupMetadata) + if !f(fd_MsgCreateGroupWithPolicy_group_metadata, value) { + return + } + } + if len(x.GroupPolicyMetadata) != 0 { + value := protoreflect.ValueOfBytes(x.GroupPolicyMetadata) + if !f(fd_MsgCreateGroupWithPolicy_group_policy_metadata, value) { + return + } + } + if x.GroupPolicyAsAdmin != false { + value := protoreflect.ValueOfBool(x.GroupPolicyAsAdmin) + if !f(fd_MsgCreateGroupWithPolicy_group_policy_as_admin, value) { + return + } + } + if x.DecisionPolicy != nil { + value := protoreflect.ValueOfMessage(x.DecisionPolicy.ProtoReflect()) + if !f(fd_MsgCreateGroupWithPolicy_decision_policy, 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_MsgCreateGroupWithPolicy) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.admin": + return x.Admin != "" + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.members": + return len(x.Members) != 0 + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_metadata": + return len(x.GroupMetadata) != 0 + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_policy_metadata": + return len(x.GroupPolicyMetadata) != 0 + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_policy_as_admin": + return x.GroupPolicyAsAdmin != false + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.decision_policy": + return x.DecisionPolicy != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgCreateGroupWithPolicy")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgCreateGroupWithPolicy 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_MsgCreateGroupWithPolicy) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.admin": + x.Admin = "" + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.members": + x.Members = nil + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_metadata": + x.GroupMetadata = nil + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_policy_metadata": + x.GroupPolicyMetadata = nil + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_policy_as_admin": + x.GroupPolicyAsAdmin = false + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.decision_policy": + x.DecisionPolicy = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgCreateGroupWithPolicy")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgCreateGroupWithPolicy 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_MsgCreateGroupWithPolicy) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.admin": + value := x.Admin + return protoreflect.ValueOfString(value) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.members": + if len(x.Members) == 0 { + return protoreflect.ValueOfList(&_MsgCreateGroupWithPolicy_2_list{}) + } + listValue := &_MsgCreateGroupWithPolicy_2_list{list: &x.Members} + return protoreflect.ValueOfList(listValue) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_metadata": + value := x.GroupMetadata + return protoreflect.ValueOfBytes(value) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_policy_metadata": + value := x.GroupPolicyMetadata + return protoreflect.ValueOfBytes(value) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_policy_as_admin": + value := x.GroupPolicyAsAdmin + return protoreflect.ValueOfBool(value) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.decision_policy": + value := x.DecisionPolicy + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgCreateGroupWithPolicy")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgCreateGroupWithPolicy 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_MsgCreateGroupWithPolicy) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.admin": + x.Admin = value.Interface().(string) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.members": + lv := value.List() + clv := lv.(*_MsgCreateGroupWithPolicy_2_list) + x.Members = *clv.list + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_metadata": + x.GroupMetadata = value.Bytes() + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_policy_metadata": + x.GroupPolicyMetadata = value.Bytes() + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_policy_as_admin": + x.GroupPolicyAsAdmin = value.Bool() + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.decision_policy": + x.DecisionPolicy = value.Message().Interface().(*anypb.Any) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgCreateGroupWithPolicy")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgCreateGroupWithPolicy 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_MsgCreateGroupWithPolicy) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.members": + if x.Members == nil { + x.Members = []*Member{} + } + value := &_MsgCreateGroupWithPolicy_2_list{list: &x.Members} + return protoreflect.ValueOfList(value) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.decision_policy": + if x.DecisionPolicy == nil { + x.DecisionPolicy = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.DecisionPolicy.ProtoReflect()) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.admin": + panic(fmt.Errorf("field admin of message cosmos.group.v1beta1.MsgCreateGroupWithPolicy is not mutable")) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_metadata": + panic(fmt.Errorf("field group_metadata of message cosmos.group.v1beta1.MsgCreateGroupWithPolicy is not mutable")) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_policy_metadata": + panic(fmt.Errorf("field group_policy_metadata of message cosmos.group.v1beta1.MsgCreateGroupWithPolicy is not mutable")) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_policy_as_admin": + panic(fmt.Errorf("field group_policy_as_admin of message cosmos.group.v1beta1.MsgCreateGroupWithPolicy is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgCreateGroupWithPolicy")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgCreateGroupWithPolicy 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_MsgCreateGroupWithPolicy) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.admin": + return protoreflect.ValueOfString("") + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.members": + list := []*Member{} + return protoreflect.ValueOfList(&_MsgCreateGroupWithPolicy_2_list{list: &list}) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_metadata": + return protoreflect.ValueOfBytes(nil) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_policy_metadata": + return protoreflect.ValueOfBytes(nil) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.group_policy_as_admin": + return protoreflect.ValueOfBool(false) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicy.decision_policy": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgCreateGroupWithPolicy")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgCreateGroupWithPolicy 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_MsgCreateGroupWithPolicy) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1beta1.MsgCreateGroupWithPolicy", 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_MsgCreateGroupWithPolicy) 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_MsgCreateGroupWithPolicy) 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_MsgCreateGroupWithPolicy) 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_MsgCreateGroupWithPolicy) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateGroupWithPolicy) + 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.Admin) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Members) > 0 { + for _, e := range x.Members { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.GroupMetadata) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.GroupPolicyMetadata) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.GroupPolicyAsAdmin { + n += 2 + } + if x.DecisionPolicy != nil { + l = options.Size(x.DecisionPolicy) + 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().(*MsgCreateGroupWithPolicy) + 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.DecisionPolicy != nil { + encoded, err := options.Marshal(x.DecisionPolicy) + 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 x.GroupPolicyAsAdmin { + i-- + if x.GroupPolicyAsAdmin { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(x.GroupPolicyMetadata) > 0 { + i -= len(x.GroupPolicyMetadata) + copy(dAtA[i:], x.GroupPolicyMetadata) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GroupPolicyMetadata))) + i-- + dAtA[i] = 0x22 + } + if len(x.GroupMetadata) > 0 { + i -= len(x.GroupMetadata) + copy(dAtA[i:], x.GroupMetadata) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GroupMetadata))) + i-- + dAtA[i] = 0x1a + } + if len(x.Members) > 0 { + for iNdEx := len(x.Members) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Members[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Admin) > 0 { + i -= len(x.Admin) + copy(dAtA[i:], x.Admin) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) + 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().(*MsgCreateGroupWithPolicy) + 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: MsgCreateGroupWithPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateGroupWithPolicy: 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 Admin", 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.Admin = 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 Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Members = append(x.Members, &Member{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Members[len(x.Members)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupMetadata", wireType) + } + var byteLen 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++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + 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.GroupMetadata = append(x.GroupMetadata[:0], dAtA[iNdEx:postIndex]...) + if x.GroupMetadata == nil { + x.GroupMetadata = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupPolicyMetadata", wireType) + } + var byteLen 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++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + 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.GroupPolicyMetadata = append(x.GroupPolicyMetadata[:0], dAtA[iNdEx:postIndex]...) + if x.GroupPolicyMetadata == nil { + x.GroupPolicyMetadata = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupPolicyAsAdmin", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.GroupPolicyAsAdmin = bool(v != 0) + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", 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.DecisionPolicy == nil { + x.DecisionPolicy = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DecisionPolicy); 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_MsgCreateGroupWithPolicyResponse protoreflect.MessageDescriptor + fd_MsgCreateGroupWithPolicyResponse_group_id protoreflect.FieldDescriptor + fd_MsgCreateGroupWithPolicyResponse_group_policy_address protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_group_v1beta1_tx_proto_init() + md_MsgCreateGroupWithPolicyResponse = File_cosmos_group_v1beta1_tx_proto.Messages().ByName("MsgCreateGroupWithPolicyResponse") + fd_MsgCreateGroupWithPolicyResponse_group_id = md_MsgCreateGroupWithPolicyResponse.Fields().ByName("group_id") + fd_MsgCreateGroupWithPolicyResponse_group_policy_address = md_MsgCreateGroupWithPolicyResponse.Fields().ByName("group_policy_address") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateGroupWithPolicyResponse)(nil) + +type fastReflection_MsgCreateGroupWithPolicyResponse MsgCreateGroupWithPolicyResponse + +func (x *MsgCreateGroupWithPolicyResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateGroupWithPolicyResponse)(x) +} + +func (x *MsgCreateGroupWithPolicyResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCreateGroupWithPolicyResponse_messageType fastReflection_MsgCreateGroupWithPolicyResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateGroupWithPolicyResponse_messageType{} + +type fastReflection_MsgCreateGroupWithPolicyResponse_messageType struct{} + +func (x fastReflection_MsgCreateGroupWithPolicyResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateGroupWithPolicyResponse)(nil) +} +func (x fastReflection_MsgCreateGroupWithPolicyResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateGroupWithPolicyResponse) +} +func (x fastReflection_MsgCreateGroupWithPolicyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateGroupWithPolicyResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateGroupWithPolicyResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateGroupWithPolicyResponse +} + +// 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_MsgCreateGroupWithPolicyResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateGroupWithPolicyResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateGroupWithPolicyResponse) New() protoreflect.Message { + return new(fastReflection_MsgCreateGroupWithPolicyResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateGroupWithPolicyResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCreateGroupWithPolicyResponse)(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_MsgCreateGroupWithPolicyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.GroupId != uint64(0) { + value := protoreflect.ValueOfUint64(x.GroupId) + if !f(fd_MsgCreateGroupWithPolicyResponse_group_id, value) { + return + } + } + if x.GroupPolicyAddress != "" { + value := protoreflect.ValueOfString(x.GroupPolicyAddress) + if !f(fd_MsgCreateGroupWithPolicyResponse_group_policy_address, 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_MsgCreateGroupWithPolicyResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse.group_id": + return x.GroupId != uint64(0) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse.group_policy_address": + return x.GroupPolicyAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse 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_MsgCreateGroupWithPolicyResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse.group_id": + x.GroupId = uint64(0) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse.group_policy_address": + x.GroupPolicyAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse 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_MsgCreateGroupWithPolicyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse.group_id": + value := x.GroupId + return protoreflect.ValueOfUint64(value) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse.group_policy_address": + value := x.GroupPolicyAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse 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_MsgCreateGroupWithPolicyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse.group_id": + x.GroupId = value.Uint() + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse.group_policy_address": + x.GroupPolicyAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse 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_MsgCreateGroupWithPolicyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse.group_id": + panic(fmt.Errorf("field group_id of message cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse is not mutable")) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse.group_policy_address": + panic(fmt.Errorf("field group_policy_address of message cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse 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_MsgCreateGroupWithPolicyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse.group_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse.group_policy_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse 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_MsgCreateGroupWithPolicyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse", 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_MsgCreateGroupWithPolicyResponse) 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_MsgCreateGroupWithPolicyResponse) 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_MsgCreateGroupWithPolicyResponse) 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_MsgCreateGroupWithPolicyResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateGroupWithPolicyResponse) + 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.GroupId != 0 { + n += 1 + runtime.Sov(uint64(x.GroupId)) + } + l = len(x.GroupPolicyAddress) + 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().(*MsgCreateGroupWithPolicyResponse) + 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.GroupPolicyAddress) > 0 { + i -= len(x.GroupPolicyAddress) + copy(dAtA[i:], x.GroupPolicyAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GroupPolicyAddress))) + i-- + dAtA[i] = 0x12 + } + if x.GroupId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) + 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().(*MsgCreateGroupWithPolicyResponse) + 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: MsgCreateGroupWithPolicyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateGroupWithPolicyResponse: 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 GroupId", wireType) + } + x.GroupId = 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.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupPolicyAddress", 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.GroupPolicyAddress = 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_MsgUpdateGroupPolicyAdminResponse protoreflect.MessageDescriptor ) @@ -5383,7 +6674,7 @@ func (x *MsgUpdateGroupPolicyAdminResponse) ProtoReflect() protoreflect.Message } func (x *MsgUpdateGroupPolicyAdminResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[11] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5745,7 +7036,7 @@ func (x *MsgUpdateGroupPolicyDecisionPolicy) ProtoReflect() protoreflect.Message } func (x *MsgUpdateGroupPolicyDecisionPolicy) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[12] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6302,7 +7593,7 @@ func (x *MsgUpdateGroupPolicyDecisionPolicyResponse) ProtoReflect() protoreflect } func (x *MsgUpdateGroupPolicyDecisionPolicyResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[13] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6664,7 +7955,7 @@ func (x *MsgUpdateGroupPolicyMetadata) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateGroupPolicyMetadata) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[14] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7208,7 +8499,7 @@ func (x *MsgUpdateGroupPolicyMetadataResponse) ProtoReflect() protoreflect.Messa } func (x *MsgUpdateGroupPolicyMetadataResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[15] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7671,7 +8962,7 @@ func (x *MsgSubmitProposal) ProtoReflect() protoreflect.Message { } func (x *MsgSubmitProposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[16] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8362,7 +9653,7 @@ func (x *MsgSubmitProposalResponse) ProtoReflect() protoreflect.Message { } func (x *MsgSubmitProposalResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[17] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8768,7 +10059,7 @@ func (x *MsgWithdrawProposal) ProtoReflect() protoreflect.Message { } func (x *MsgWithdrawProposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[18] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9232,7 +10523,7 @@ func (x *MsgWithdrawProposalResponse) ProtoReflect() protoreflect.Message { } func (x *MsgWithdrawProposalResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[19] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9598,7 +10889,7 @@ func (x *MsgVote) ProtoReflect() protoreflect.Message { } func (x *MsgVote) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[20] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10218,7 +11509,7 @@ func (x *MsgVoteResponse) ProtoReflect() protoreflect.Message { } func (x *MsgVoteResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[21] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10578,7 +11869,7 @@ func (x *MsgExec) ProtoReflect() protoreflect.Message { } func (x *MsgExec) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[22] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11042,7 +12333,7 @@ func (x *MsgExecResponse) ProtoReflect() protoreflect.Message { } func (x *MsgExecResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[23] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11941,6 +13232,134 @@ func (x *MsgUpdateGroupPolicyAdmin) GetNewAdmin() string { return "" } +// MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. +type MsgCreateGroupWithPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // admin is the account address of the group and group policy admin. + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + // members defines the group members. + Members []*Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"` + // group_metadata is any arbitrary metadata attached to the group. + GroupMetadata []byte `protobuf:"bytes,3,opt,name=group_metadata,json=groupMetadata,proto3" json:"group_metadata,omitempty"` + // group_policy_metadata is any arbitrary metadata attached to the group policy. + GroupPolicyMetadata []byte `protobuf:"bytes,4,opt,name=group_policy_metadata,json=groupPolicyMetadata,proto3" json:"group_policy_metadata,omitempty"` + // group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group and group policy admin. + GroupPolicyAsAdmin bool `protobuf:"varint,5,opt,name=group_policy_as_admin,json=groupPolicyAsAdmin,proto3" json:"group_policy_as_admin,omitempty"` + // decision_policy specifies the group policy's decision policy. + DecisionPolicy *anypb.Any `protobuf:"bytes,6,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` +} + +func (x *MsgCreateGroupWithPolicy) Reset() { + *x = MsgCreateGroupWithPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateGroupWithPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateGroupWithPolicy) ProtoMessage() {} + +// Deprecated: Use MsgCreateGroupWithPolicy.ProtoReflect.Descriptor instead. +func (*MsgCreateGroupWithPolicy) Descriptor() ([]byte, []int) { + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{11} +} + +func (x *MsgCreateGroupWithPolicy) GetAdmin() string { + if x != nil { + return x.Admin + } + return "" +} + +func (x *MsgCreateGroupWithPolicy) GetMembers() []*Member { + if x != nil { + return x.Members + } + return nil +} + +func (x *MsgCreateGroupWithPolicy) GetGroupMetadata() []byte { + if x != nil { + return x.GroupMetadata + } + return nil +} + +func (x *MsgCreateGroupWithPolicy) GetGroupPolicyMetadata() []byte { + if x != nil { + return x.GroupPolicyMetadata + } + return nil +} + +func (x *MsgCreateGroupWithPolicy) GetGroupPolicyAsAdmin() bool { + if x != nil { + return x.GroupPolicyAsAdmin + } + return false +} + +func (x *MsgCreateGroupWithPolicy) GetDecisionPolicy() *anypb.Any { + if x != nil { + return x.DecisionPolicy + } + return nil +} + +// MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. +type MsgCreateGroupWithPolicyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // group_id is the unique ID of the newly created group with policy. + GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // group_policy_address is the account address of the newly created group policy. + GroupPolicyAddress string `protobuf:"bytes,2,opt,name=group_policy_address,json=groupPolicyAddress,proto3" json:"group_policy_address,omitempty"` +} + +func (x *MsgCreateGroupWithPolicyResponse) Reset() { + *x = MsgCreateGroupWithPolicyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateGroupWithPolicyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateGroupWithPolicyResponse) ProtoMessage() {} + +// Deprecated: Use MsgCreateGroupWithPolicyResponse.ProtoReflect.Descriptor instead. +func (*MsgCreateGroupWithPolicyResponse) Descriptor() ([]byte, []int) { + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{12} +} + +func (x *MsgCreateGroupWithPolicyResponse) GetGroupId() uint64 { + if x != nil { + return x.GroupId + } + return 0 +} + +func (x *MsgCreateGroupWithPolicyResponse) GetGroupPolicyAddress() string { + if x != nil { + return x.GroupPolicyAddress + } + return "" +} + // MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. type MsgUpdateGroupPolicyAdminResponse struct { state protoimpl.MessageState @@ -11951,7 +13370,7 @@ type MsgUpdateGroupPolicyAdminResponse struct { func (x *MsgUpdateGroupPolicyAdminResponse) Reset() { *x = MsgUpdateGroupPolicyAdminResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[11] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11965,7 +13384,7 @@ func (*MsgUpdateGroupPolicyAdminResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateGroupPolicyAdminResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateGroupPolicyAdminResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{11} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{13} } // MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. @@ -11985,7 +13404,7 @@ type MsgUpdateGroupPolicyDecisionPolicy struct { func (x *MsgUpdateGroupPolicyDecisionPolicy) Reset() { *x = MsgUpdateGroupPolicyDecisionPolicy{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[12] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11999,7 +13418,7 @@ func (*MsgUpdateGroupPolicyDecisionPolicy) ProtoMessage() {} // Deprecated: Use MsgUpdateGroupPolicyDecisionPolicy.ProtoReflect.Descriptor instead. func (*MsgUpdateGroupPolicyDecisionPolicy) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{12} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{14} } func (x *MsgUpdateGroupPolicyDecisionPolicy) GetAdmin() string { @@ -12033,7 +13452,7 @@ type MsgUpdateGroupPolicyDecisionPolicyResponse struct { func (x *MsgUpdateGroupPolicyDecisionPolicyResponse) Reset() { *x = MsgUpdateGroupPolicyDecisionPolicyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[13] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12047,7 +13466,7 @@ func (*MsgUpdateGroupPolicyDecisionPolicyResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateGroupPolicyDecisionPolicyResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateGroupPolicyDecisionPolicyResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{13} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{15} } // MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. @@ -12067,7 +13486,7 @@ type MsgUpdateGroupPolicyMetadata struct { func (x *MsgUpdateGroupPolicyMetadata) Reset() { *x = MsgUpdateGroupPolicyMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[14] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12081,7 +13500,7 @@ func (*MsgUpdateGroupPolicyMetadata) ProtoMessage() {} // Deprecated: Use MsgUpdateGroupPolicyMetadata.ProtoReflect.Descriptor instead. func (*MsgUpdateGroupPolicyMetadata) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{14} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{16} } func (x *MsgUpdateGroupPolicyMetadata) GetAdmin() string { @@ -12115,7 +13534,7 @@ type MsgUpdateGroupPolicyMetadataResponse struct { func (x *MsgUpdateGroupPolicyMetadataResponse) Reset() { *x = MsgUpdateGroupPolicyMetadataResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[15] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12129,7 +13548,7 @@ func (*MsgUpdateGroupPolicyMetadataResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateGroupPolicyMetadataResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateGroupPolicyMetadataResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{15} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{17} } // MsgSubmitProposal is the Msg/SubmitProposal request type. @@ -12156,7 +13575,7 @@ type MsgSubmitProposal struct { func (x *MsgSubmitProposal) Reset() { *x = MsgSubmitProposal{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[16] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12170,7 +13589,7 @@ func (*MsgSubmitProposal) ProtoMessage() {} // Deprecated: Use MsgSubmitProposal.ProtoReflect.Descriptor instead. func (*MsgSubmitProposal) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{16} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{18} } func (x *MsgSubmitProposal) GetAddress() string { @@ -12221,7 +13640,7 @@ type MsgSubmitProposalResponse struct { func (x *MsgSubmitProposalResponse) Reset() { *x = MsgSubmitProposalResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[17] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12235,7 +13654,7 @@ func (*MsgSubmitProposalResponse) ProtoMessage() {} // Deprecated: Use MsgSubmitProposalResponse.ProtoReflect.Descriptor instead. func (*MsgSubmitProposalResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{17} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{19} } func (x *MsgSubmitProposalResponse) GetProposalId() uint64 { @@ -12260,7 +13679,7 @@ type MsgWithdrawProposal struct { func (x *MsgWithdrawProposal) Reset() { *x = MsgWithdrawProposal{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[18] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12274,7 +13693,7 @@ func (*MsgWithdrawProposal) ProtoMessage() {} // Deprecated: Use MsgWithdrawProposal.ProtoReflect.Descriptor instead. func (*MsgWithdrawProposal) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{18} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{20} } func (x *MsgWithdrawProposal) GetProposalId() uint64 { @@ -12301,7 +13720,7 @@ type MsgWithdrawProposalResponse struct { func (x *MsgWithdrawProposalResponse) Reset() { *x = MsgWithdrawProposalResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[19] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12315,7 +13734,7 @@ func (*MsgWithdrawProposalResponse) ProtoMessage() {} // Deprecated: Use MsgWithdrawProposalResponse.ProtoReflect.Descriptor instead. func (*MsgWithdrawProposalResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{19} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{21} } // MsgVote is the Msg/Vote request type. @@ -12340,7 +13759,7 @@ type MsgVote struct { func (x *MsgVote) Reset() { *x = MsgVote{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[20] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12354,7 +13773,7 @@ func (*MsgVote) ProtoMessage() {} // Deprecated: Use MsgVote.ProtoReflect.Descriptor instead. func (*MsgVote) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{20} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{22} } func (x *MsgVote) GetProposalId() uint64 { @@ -12402,7 +13821,7 @@ type MsgVoteResponse struct { func (x *MsgVoteResponse) Reset() { *x = MsgVoteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[21] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12416,7 +13835,7 @@ func (*MsgVoteResponse) ProtoMessage() {} // Deprecated: Use MsgVoteResponse.ProtoReflect.Descriptor instead. func (*MsgVoteResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{21} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{23} } // MsgExec is the Msg/Exec request type. @@ -12434,7 +13853,7 @@ type MsgExec struct { func (x *MsgExec) Reset() { *x = MsgExec{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[22] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12448,7 +13867,7 @@ func (*MsgExec) ProtoMessage() {} // Deprecated: Use MsgExec.ProtoReflect.Descriptor instead. func (*MsgExec) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{22} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{24} } func (x *MsgExec) GetProposalId() uint64 { @@ -12475,7 +13894,7 @@ type MsgExecResponse struct { func (x *MsgExecResponse) Reset() { *x = MsgExecResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[23] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12489,7 +13908,7 @@ func (*MsgExecResponse) ProtoMessage() {} // Deprecated: Use MsgExecResponse.ProtoReflect.Descriptor instead. func (*MsgExecResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{23} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{25} } var File_cosmos_group_v1beta1_tx_proto protoreflect.FileDescriptor @@ -12589,197 +14008,237 @@ var file_cosmos_group_v1beta1_tx_proto_rawDesc = []byte{ 0x69, 0x6e, 0x18, 0x03, 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, 0x6e, 0x65, 0x77, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x0a, 0x82, 0xe7, - 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x23, 0x0a, 0x21, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xeb, 0x01, - 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, + 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xef, 0x02, 0x0a, 0x18, 0x4d, 0x73, 0x67, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, 0x69, 0x74, 0x68, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x3c, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x15, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, + 0x0a, 0x15, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x61, + 0x73, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 0x73, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x42, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0x89, 0x01, 0x0a, 0x20, 0x4d, + 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, 0x69, 0x74, + 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x14, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 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, 0x12, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x23, 0x0a, 0x21, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xeb, 0x01, 0x0a, 0x22, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 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, 0x05, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 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, 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x44, 0x65, 0x63, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x64, 0x65, 0x63, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x0e, 0x88, 0xa0, 0x1f, - 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x2c, 0x0a, 0x2a, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x1c, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 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, 0x12, 0x1a, - 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, - 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x26, 0x0a, 0x24, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf7, - 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x04, 0x65, 0x78, 0x65, 0x63, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x52, 0x04, - 0x65, 0x78, 0x65, 0x63, 0x3a, 0x12, 0x88, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3c, 0x0a, 0x19, 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, 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, 0x6a, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x1f, 0x0a, - 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 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, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xec, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 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, 0x38, - 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x04, 0x65, 0x78, 0x65, 0x63, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x52, 0x04, - 0x65, 0x78, 0x65, 0x63, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, - 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x69, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 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, - 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 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, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, - 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x11, - 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2a, 0x2a, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x58, 0x45, - 0x43, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x45, 0x43, 0x5f, 0x54, 0x52, 0x59, 0x10, 0x01, 0x32, 0xef, 0x0a, - 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x61, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2b, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x70, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, - 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, - 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x79, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, - 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x32, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x2f, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x37, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9d, 0x01, 0x0a, 0x1f, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x38, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x40, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x44, 0x65, 0x63, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x0e, 0x88, 0xa0, 0x1f, 0x00, 0x82, + 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x2c, 0x0a, 0x2a, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 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, 0x12, 0x1a, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x26, 0x0a, 0x24, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf7, 0x01, 0x0a, + 0x11, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x04, 0x65, 0x78, 0x65, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x52, 0x04, 0x65, 0x78, + 0x65, 0x63, 0x3a, 0x12, 0x88, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3c, 0x0a, 0x19, 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, 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, 0x6a, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 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, + 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xec, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 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, 0x38, 0x0a, 0x06, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x04, 0x65, 0x78, 0x65, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x52, 0x04, 0x65, 0x78, + 0x65, 0x63, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x11, + 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x69, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 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, 0x30, 0x0a, + 0x06, 0x73, 0x69, 0x67, 0x6e, 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, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, + 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x11, 0x0a, 0x0f, + 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, + 0x2a, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x58, 0x45, 0x43, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, + 0x08, 0x45, 0x58, 0x45, 0x43, 0x5f, 0x54, 0x52, 0x59, 0x10, 0x01, 0x32, 0xf0, 0x0b, 0x0a, 0x03, + 0x4d, 0x73, 0x67, 0x12, 0x61, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0xd9, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 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, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, - 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, - 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, + 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x31, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x79, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x11, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x32, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x7f, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, + 0x69, 0x74, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, + 0x69, 0x74, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, + 0x69, 0x74, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x82, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x2f, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x37, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9d, 0x01, 0x0a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x40, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, + 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, + 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xd9, + 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 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, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, + 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, + 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -12795,7 +14254,7 @@ func file_cosmos_group_v1beta1_tx_proto_rawDescGZIP() []byte { } var file_cosmos_group_v1beta1_tx_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_cosmos_group_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_cosmos_group_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 26) var file_cosmos_group_v1beta1_tx_proto_goTypes = []interface{}{ (Exec)(0), // 0: cosmos.group.v1beta1.Exec (*MsgCreateGroup)(nil), // 1: cosmos.group.v1beta1.MsgCreateGroup @@ -12809,61 +14268,67 @@ var file_cosmos_group_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgCreateGroupPolicy)(nil), // 9: cosmos.group.v1beta1.MsgCreateGroupPolicy (*MsgCreateGroupPolicyResponse)(nil), // 10: cosmos.group.v1beta1.MsgCreateGroupPolicyResponse (*MsgUpdateGroupPolicyAdmin)(nil), // 11: cosmos.group.v1beta1.MsgUpdateGroupPolicyAdmin - (*MsgUpdateGroupPolicyAdminResponse)(nil), // 12: cosmos.group.v1beta1.MsgUpdateGroupPolicyAdminResponse - (*MsgUpdateGroupPolicyDecisionPolicy)(nil), // 13: cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicy - (*MsgUpdateGroupPolicyDecisionPolicyResponse)(nil), // 14: cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicyResponse - (*MsgUpdateGroupPolicyMetadata)(nil), // 15: cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadata - (*MsgUpdateGroupPolicyMetadataResponse)(nil), // 16: cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadataResponse - (*MsgSubmitProposal)(nil), // 17: cosmos.group.v1beta1.MsgSubmitProposal - (*MsgSubmitProposalResponse)(nil), // 18: cosmos.group.v1beta1.MsgSubmitProposalResponse - (*MsgWithdrawProposal)(nil), // 19: cosmos.group.v1beta1.MsgWithdrawProposal - (*MsgWithdrawProposalResponse)(nil), // 20: cosmos.group.v1beta1.MsgWithdrawProposalResponse - (*MsgVote)(nil), // 21: cosmos.group.v1beta1.MsgVote - (*MsgVoteResponse)(nil), // 22: cosmos.group.v1beta1.MsgVoteResponse - (*MsgExec)(nil), // 23: cosmos.group.v1beta1.MsgExec - (*MsgExecResponse)(nil), // 24: cosmos.group.v1beta1.MsgExecResponse - (*Member)(nil), // 25: cosmos.group.v1beta1.Member - (*anypb.Any)(nil), // 26: google.protobuf.Any - (VoteOption)(0), // 27: cosmos.group.v1beta1.VoteOption + (*MsgCreateGroupWithPolicy)(nil), // 12: cosmos.group.v1beta1.MsgCreateGroupWithPolicy + (*MsgCreateGroupWithPolicyResponse)(nil), // 13: cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse + (*MsgUpdateGroupPolicyAdminResponse)(nil), // 14: cosmos.group.v1beta1.MsgUpdateGroupPolicyAdminResponse + (*MsgUpdateGroupPolicyDecisionPolicy)(nil), // 15: cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicy + (*MsgUpdateGroupPolicyDecisionPolicyResponse)(nil), // 16: cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicyResponse + (*MsgUpdateGroupPolicyMetadata)(nil), // 17: cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadata + (*MsgUpdateGroupPolicyMetadataResponse)(nil), // 18: cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadataResponse + (*MsgSubmitProposal)(nil), // 19: cosmos.group.v1beta1.MsgSubmitProposal + (*MsgSubmitProposalResponse)(nil), // 20: cosmos.group.v1beta1.MsgSubmitProposalResponse + (*MsgWithdrawProposal)(nil), // 21: cosmos.group.v1beta1.MsgWithdrawProposal + (*MsgWithdrawProposalResponse)(nil), // 22: cosmos.group.v1beta1.MsgWithdrawProposalResponse + (*MsgVote)(nil), // 23: cosmos.group.v1beta1.MsgVote + (*MsgVoteResponse)(nil), // 24: cosmos.group.v1beta1.MsgVoteResponse + (*MsgExec)(nil), // 25: cosmos.group.v1beta1.MsgExec + (*MsgExecResponse)(nil), // 26: cosmos.group.v1beta1.MsgExecResponse + (*Member)(nil), // 27: cosmos.group.v1beta1.Member + (*anypb.Any)(nil), // 28: google.protobuf.Any + (VoteOption)(0), // 29: cosmos.group.v1beta1.VoteOption } var file_cosmos_group_v1beta1_tx_proto_depIdxs = []int32{ - 25, // 0: cosmos.group.v1beta1.MsgCreateGroup.members:type_name -> cosmos.group.v1beta1.Member - 25, // 1: cosmos.group.v1beta1.MsgUpdateGroupMembers.member_updates:type_name -> cosmos.group.v1beta1.Member - 26, // 2: cosmos.group.v1beta1.MsgCreateGroupPolicy.decision_policy:type_name -> google.protobuf.Any - 26, // 3: cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy:type_name -> google.protobuf.Any - 26, // 4: cosmos.group.v1beta1.MsgSubmitProposal.messages:type_name -> google.protobuf.Any - 0, // 5: cosmos.group.v1beta1.MsgSubmitProposal.exec:type_name -> cosmos.group.v1beta1.Exec - 27, // 6: cosmos.group.v1beta1.MsgVote.option:type_name -> cosmos.group.v1beta1.VoteOption - 0, // 7: cosmos.group.v1beta1.MsgVote.exec:type_name -> cosmos.group.v1beta1.Exec - 1, // 8: cosmos.group.v1beta1.Msg.CreateGroup:input_type -> cosmos.group.v1beta1.MsgCreateGroup - 3, // 9: cosmos.group.v1beta1.Msg.UpdateGroupMembers:input_type -> cosmos.group.v1beta1.MsgUpdateGroupMembers - 5, // 10: cosmos.group.v1beta1.Msg.UpdateGroupAdmin:input_type -> cosmos.group.v1beta1.MsgUpdateGroupAdmin - 7, // 11: cosmos.group.v1beta1.Msg.UpdateGroupMetadata:input_type -> cosmos.group.v1beta1.MsgUpdateGroupMetadata - 9, // 12: cosmos.group.v1beta1.Msg.CreateGroupPolicy:input_type -> cosmos.group.v1beta1.MsgCreateGroupPolicy - 11, // 13: cosmos.group.v1beta1.Msg.UpdateGroupPolicyAdmin:input_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyAdmin - 13, // 14: cosmos.group.v1beta1.Msg.UpdateGroupPolicyDecisionPolicy:input_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicy - 15, // 15: cosmos.group.v1beta1.Msg.UpdateGroupPolicyMetadata:input_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadata - 17, // 16: cosmos.group.v1beta1.Msg.SubmitProposal:input_type -> cosmos.group.v1beta1.MsgSubmitProposal - 19, // 17: cosmos.group.v1beta1.Msg.WithdrawProposal:input_type -> cosmos.group.v1beta1.MsgWithdrawProposal - 21, // 18: cosmos.group.v1beta1.Msg.Vote:input_type -> cosmos.group.v1beta1.MsgVote - 23, // 19: cosmos.group.v1beta1.Msg.Exec:input_type -> cosmos.group.v1beta1.MsgExec - 2, // 20: cosmos.group.v1beta1.Msg.CreateGroup:output_type -> cosmos.group.v1beta1.MsgCreateGroupResponse - 4, // 21: cosmos.group.v1beta1.Msg.UpdateGroupMembers:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMembersResponse - 6, // 22: cosmos.group.v1beta1.Msg.UpdateGroupAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupAdminResponse - 8, // 23: cosmos.group.v1beta1.Msg.UpdateGroupMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMetadataResponse - 10, // 24: cosmos.group.v1beta1.Msg.CreateGroupPolicy:output_type -> cosmos.group.v1beta1.MsgCreateGroupPolicyResponse - 12, // 25: cosmos.group.v1beta1.Msg.UpdateGroupPolicyAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyAdminResponse - 14, // 26: cosmos.group.v1beta1.Msg.UpdateGroupPolicyDecisionPolicy:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicyResponse - 16, // 27: cosmos.group.v1beta1.Msg.UpdateGroupPolicyMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadataResponse - 18, // 28: cosmos.group.v1beta1.Msg.SubmitProposal:output_type -> cosmos.group.v1beta1.MsgSubmitProposalResponse - 20, // 29: cosmos.group.v1beta1.Msg.WithdrawProposal:output_type -> cosmos.group.v1beta1.MsgWithdrawProposalResponse - 22, // 30: cosmos.group.v1beta1.Msg.Vote:output_type -> cosmos.group.v1beta1.MsgVoteResponse - 24, // 31: cosmos.group.v1beta1.Msg.Exec:output_type -> cosmos.group.v1beta1.MsgExecResponse - 20, // [20:32] is the sub-list for method output_type - 8, // [8:20] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 27, // 0: cosmos.group.v1beta1.MsgCreateGroup.members:type_name -> cosmos.group.v1beta1.Member + 27, // 1: cosmos.group.v1beta1.MsgUpdateGroupMembers.member_updates:type_name -> cosmos.group.v1beta1.Member + 28, // 2: cosmos.group.v1beta1.MsgCreateGroupPolicy.decision_policy:type_name -> google.protobuf.Any + 27, // 3: cosmos.group.v1beta1.MsgCreateGroupWithPolicy.members:type_name -> cosmos.group.v1beta1.Member + 28, // 4: cosmos.group.v1beta1.MsgCreateGroupWithPolicy.decision_policy:type_name -> google.protobuf.Any + 28, // 5: cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy:type_name -> google.protobuf.Any + 28, // 6: cosmos.group.v1beta1.MsgSubmitProposal.messages:type_name -> google.protobuf.Any + 0, // 7: cosmos.group.v1beta1.MsgSubmitProposal.exec:type_name -> cosmos.group.v1beta1.Exec + 29, // 8: cosmos.group.v1beta1.MsgVote.option:type_name -> cosmos.group.v1beta1.VoteOption + 0, // 9: cosmos.group.v1beta1.MsgVote.exec:type_name -> cosmos.group.v1beta1.Exec + 1, // 10: cosmos.group.v1beta1.Msg.CreateGroup:input_type -> cosmos.group.v1beta1.MsgCreateGroup + 3, // 11: cosmos.group.v1beta1.Msg.UpdateGroupMembers:input_type -> cosmos.group.v1beta1.MsgUpdateGroupMembers + 5, // 12: cosmos.group.v1beta1.Msg.UpdateGroupAdmin:input_type -> cosmos.group.v1beta1.MsgUpdateGroupAdmin + 7, // 13: cosmos.group.v1beta1.Msg.UpdateGroupMetadata:input_type -> cosmos.group.v1beta1.MsgUpdateGroupMetadata + 9, // 14: cosmos.group.v1beta1.Msg.CreateGroupPolicy:input_type -> cosmos.group.v1beta1.MsgCreateGroupPolicy + 12, // 15: cosmos.group.v1beta1.Msg.CreateGroupWithPolicy:input_type -> cosmos.group.v1beta1.MsgCreateGroupWithPolicy + 11, // 16: cosmos.group.v1beta1.Msg.UpdateGroupPolicyAdmin:input_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyAdmin + 15, // 17: cosmos.group.v1beta1.Msg.UpdateGroupPolicyDecisionPolicy:input_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicy + 17, // 18: cosmos.group.v1beta1.Msg.UpdateGroupPolicyMetadata:input_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadata + 19, // 19: cosmos.group.v1beta1.Msg.SubmitProposal:input_type -> cosmos.group.v1beta1.MsgSubmitProposal + 21, // 20: cosmos.group.v1beta1.Msg.WithdrawProposal:input_type -> cosmos.group.v1beta1.MsgWithdrawProposal + 23, // 21: cosmos.group.v1beta1.Msg.Vote:input_type -> cosmos.group.v1beta1.MsgVote + 25, // 22: cosmos.group.v1beta1.Msg.Exec:input_type -> cosmos.group.v1beta1.MsgExec + 2, // 23: cosmos.group.v1beta1.Msg.CreateGroup:output_type -> cosmos.group.v1beta1.MsgCreateGroupResponse + 4, // 24: cosmos.group.v1beta1.Msg.UpdateGroupMembers:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMembersResponse + 6, // 25: cosmos.group.v1beta1.Msg.UpdateGroupAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupAdminResponse + 8, // 26: cosmos.group.v1beta1.Msg.UpdateGroupMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMetadataResponse + 10, // 27: cosmos.group.v1beta1.Msg.CreateGroupPolicy:output_type -> cosmos.group.v1beta1.MsgCreateGroupPolicyResponse + 13, // 28: cosmos.group.v1beta1.Msg.CreateGroupWithPolicy:output_type -> cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse + 14, // 29: cosmos.group.v1beta1.Msg.UpdateGroupPolicyAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyAdminResponse + 16, // 30: cosmos.group.v1beta1.Msg.UpdateGroupPolicyDecisionPolicy:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicyResponse + 18, // 31: cosmos.group.v1beta1.Msg.UpdateGroupPolicyMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadataResponse + 20, // 32: cosmos.group.v1beta1.Msg.SubmitProposal:output_type -> cosmos.group.v1beta1.MsgSubmitProposalResponse + 22, // 33: cosmos.group.v1beta1.Msg.WithdrawProposal:output_type -> cosmos.group.v1beta1.MsgWithdrawProposalResponse + 24, // 34: cosmos.group.v1beta1.Msg.Vote:output_type -> cosmos.group.v1beta1.MsgVoteResponse + 26, // 35: cosmos.group.v1beta1.Msg.Exec:output_type -> cosmos.group.v1beta1.MsgExecResponse + 23, // [23:36] is the sub-list for method output_type + 10, // [10:23] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_cosmos_group_v1beta1_tx_proto_init() } @@ -13006,7 +14471,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { } } file_cosmos_group_v1beta1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupPolicyAdminResponse); i { + switch v := v.(*MsgCreateGroupWithPolicy); i { case 0: return &v.state case 1: @@ -13018,7 +14483,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { } } file_cosmos_group_v1beta1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupPolicyDecisionPolicy); i { + switch v := v.(*MsgCreateGroupWithPolicyResponse); i { case 0: return &v.state case 1: @@ -13030,7 +14495,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { } } file_cosmos_group_v1beta1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupPolicyDecisionPolicyResponse); i { + switch v := v.(*MsgUpdateGroupPolicyAdminResponse); i { case 0: return &v.state case 1: @@ -13042,7 +14507,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { } } file_cosmos_group_v1beta1_tx_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupPolicyMetadata); i { + switch v := v.(*MsgUpdateGroupPolicyDecisionPolicy); i { case 0: return &v.state case 1: @@ -13054,7 +14519,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { } } file_cosmos_group_v1beta1_tx_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupPolicyMetadataResponse); i { + switch v := v.(*MsgUpdateGroupPolicyDecisionPolicyResponse); i { case 0: return &v.state case 1: @@ -13066,7 +14531,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { } } file_cosmos_group_v1beta1_tx_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitProposal); i { + switch v := v.(*MsgUpdateGroupPolicyMetadata); i { case 0: return &v.state case 1: @@ -13078,7 +14543,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { } } file_cosmos_group_v1beta1_tx_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitProposalResponse); i { + switch v := v.(*MsgUpdateGroupPolicyMetadataResponse); i { case 0: return &v.state case 1: @@ -13090,7 +14555,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { } } file_cosmos_group_v1beta1_tx_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgWithdrawProposal); i { + switch v := v.(*MsgSubmitProposal); i { case 0: return &v.state case 1: @@ -13102,7 +14567,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { } } file_cosmos_group_v1beta1_tx_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgWithdrawProposalResponse); i { + switch v := v.(*MsgSubmitProposalResponse); i { case 0: return &v.state case 1: @@ -13114,7 +14579,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { } } file_cosmos_group_v1beta1_tx_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVote); i { + switch v := v.(*MsgWithdrawProposal); i { case 0: return &v.state case 1: @@ -13126,7 +14591,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { } } file_cosmos_group_v1beta1_tx_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVoteResponse); i { + switch v := v.(*MsgWithdrawProposalResponse); i { case 0: return &v.state case 1: @@ -13138,7 +14603,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { } } file_cosmos_group_v1beta1_tx_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExec); i { + switch v := v.(*MsgVote); i { case 0: return &v.state case 1: @@ -13150,6 +14615,30 @@ func file_cosmos_group_v1beta1_tx_proto_init() { } } file_cosmos_group_v1beta1_tx_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgVoteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_group_v1beta1_tx_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgExec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_group_v1beta1_tx_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgExecResponse); i { case 0: return &v.state @@ -13168,7 +14657,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_group_v1beta1_tx_proto_rawDesc, NumEnums: 1, - NumMessages: 24, + NumMessages: 26, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/group/v1beta1/tx_grpc.pb.go b/api/cosmos/group/v1beta1/tx_grpc.pb.go index b8e401c9c3..6afde371ca 100644 --- a/api/cosmos/group/v1beta1/tx_grpc.pb.go +++ b/api/cosmos/group/v1beta1/tx_grpc.pb.go @@ -32,6 +32,8 @@ type MsgClient interface { UpdateGroupMetadata(ctx context.Context, in *MsgUpdateGroupMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupMetadataResponse, error) // CreateGroupPolicy creates a new group policy using given DecisionPolicy. CreateGroupPolicy(ctx context.Context, in *MsgCreateGroupPolicy, opts ...grpc.CallOption) (*MsgCreateGroupPolicyResponse, error) + // CreateGroupWithPolicy creates a new group with policy. + CreateGroupWithPolicy(ctx context.Context, in *MsgCreateGroupWithPolicy, opts ...grpc.CallOption) (*MsgCreateGroupWithPolicyResponse, error) // UpdateGroupPolicyAdmin updates a group policy admin. UpdateGroupPolicyAdmin(ctx context.Context, in *MsgUpdateGroupPolicyAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyAdminResponse, error) // UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated. @@ -101,6 +103,15 @@ func (c *msgClient) CreateGroupPolicy(ctx context.Context, in *MsgCreateGroupPol return out, nil } +func (c *msgClient) CreateGroupWithPolicy(ctx context.Context, in *MsgCreateGroupWithPolicy, opts ...grpc.CallOption) (*MsgCreateGroupWithPolicyResponse, error) { + out := new(MsgCreateGroupWithPolicyResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/CreateGroupWithPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) UpdateGroupPolicyAdmin(ctx context.Context, in *MsgUpdateGroupPolicyAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyAdminResponse, error) { out := new(MsgUpdateGroupPolicyAdminResponse) err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/UpdateGroupPolicyAdmin", in, out, opts...) @@ -178,6 +189,8 @@ type MsgServer interface { UpdateGroupMetadata(context.Context, *MsgUpdateGroupMetadata) (*MsgUpdateGroupMetadataResponse, error) // CreateGroupPolicy creates a new group policy using given DecisionPolicy. CreateGroupPolicy(context.Context, *MsgCreateGroupPolicy) (*MsgCreateGroupPolicyResponse, error) + // CreateGroupWithPolicy creates a new group with policy. + CreateGroupWithPolicy(context.Context, *MsgCreateGroupWithPolicy) (*MsgCreateGroupWithPolicyResponse, error) // UpdateGroupPolicyAdmin updates a group policy admin. UpdateGroupPolicyAdmin(context.Context, *MsgUpdateGroupPolicyAdmin) (*MsgUpdateGroupPolicyAdminResponse, error) // UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated. @@ -214,6 +227,9 @@ func (UnimplementedMsgServer) UpdateGroupMetadata(context.Context, *MsgUpdateGro func (UnimplementedMsgServer) CreateGroupPolicy(context.Context, *MsgCreateGroupPolicy) (*MsgCreateGroupPolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateGroupPolicy not implemented") } +func (UnimplementedMsgServer) CreateGroupWithPolicy(context.Context, *MsgCreateGroupWithPolicy) (*MsgCreateGroupWithPolicyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateGroupWithPolicy not implemented") +} func (UnimplementedMsgServer) UpdateGroupPolicyAdmin(context.Context, *MsgUpdateGroupPolicyAdmin) (*MsgUpdateGroupPolicyAdminResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupPolicyAdmin not implemented") } @@ -338,6 +354,24 @@ func _Msg_CreateGroupPolicy_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Msg_CreateGroupWithPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateGroupWithPolicy) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateGroupWithPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Msg/CreateGroupWithPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateGroupWithPolicy(ctx, req.(*MsgCreateGroupWithPolicy)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_UpdateGroupPolicyAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateGroupPolicyAdmin) if err := dec(in); err != nil { @@ -491,6 +525,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "CreateGroupPolicy", Handler: _Msg_CreateGroupPolicy_Handler, }, + { + MethodName: "CreateGroupWithPolicy", + Handler: _Msg_CreateGroupWithPolicy_Handler, + }, { MethodName: "UpdateGroupPolicyAdmin", Handler: _Msg_UpdateGroupPolicyAdmin_Handler, diff --git a/proto/cosmos/group/v1beta1/tx.proto b/proto/cosmos/group/v1beta1/tx.proto index d1ac8694a0..813c6c4244 100644 --- a/proto/cosmos/group/v1beta1/tx.proto +++ b/proto/cosmos/group/v1beta1/tx.proto @@ -29,6 +29,9 @@ service Msg { // CreateGroupPolicy creates a new group policy using given DecisionPolicy. rpc CreateGroupPolicy(MsgCreateGroupPolicy) returns (MsgCreateGroupPolicyResponse); + // CreateGroupWithPolicy creates a new group with policy. + rpc CreateGroupWithPolicy(MsgCreateGroupWithPolicy) returns (MsgCreateGroupWithPolicyResponse); + // UpdateGroupPolicyAdmin updates a group policy admin. rpc UpdateGroupPolicyAdmin(MsgUpdateGroupPolicyAdmin) returns (MsgUpdateGroupPolicyAdminResponse); @@ -172,6 +175,39 @@ message MsgUpdateGroupPolicyAdmin { string new_admin = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } +// MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. +message MsgCreateGroupWithPolicy { + option (gogoproto.goproto_getters) = false; + + // admin is the account address of the group and group policy admin. + string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // members defines the group members. + repeated Member members = 2 [(gogoproto.nullable) = false]; + + // group_metadata is any arbitrary metadata attached to the group. + bytes group_metadata = 3; + + // group_policy_metadata is any arbitrary metadata attached to the group policy. + bytes group_policy_metadata = 4; + + // group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group and group policy admin. + bool group_policy_as_admin = 5; + + // decision_policy specifies the group policy's decision policy. + google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; +} + +// MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. +message MsgCreateGroupWithPolicyResponse { + + // group_id is the unique ID of the newly created group with policy. + uint64 group_id = 1; + + // group_policy_address is the account address of the newly created group policy. + string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + // MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. message MsgUpdateGroupPolicyAdminResponse {} diff --git a/x/group/client/cli/tx.go b/x/group/client/cli/tx.go index af10a10aea..1c29ebf518 100644 --- a/x/group/client/cli/tx.go +++ b/x/group/client/cli/tx.go @@ -18,8 +18,9 @@ import ( ) const ( - FlagExec = "exec" - ExecTry = "try" + FlagExec = "exec" + ExecTry = "try" + FlagGroupPolicyAsAdmin = "group-policy-as-admin" ) // TxCmd returns a root CLI command handler for all x/group transaction commands. @@ -37,6 +38,7 @@ func TxCmd(name string) *cobra.Command { MsgUpdateGroupAdminCmd(), MsgUpdateGroupMetadataCmd(), MsgUpdateGroupMembersCmd(), + MsgCreateGroupWithPolicyCmd(), MsgCreateGroupPolicyCmd(), MsgUpdateGroupPolicyAdminCmd(), MsgUpdateGroupPolicyDecisionPolicyCmd(), @@ -283,6 +285,106 @@ func MsgUpdateGroupMetadataCmd() *cobra.Command { return cmd } +// MsgCreateGroupWithPolicyCmd creates a CLI command for Msg/CreateGroupWithPolicy. +func MsgCreateGroupWithPolicyCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "create-group-with-policy [admin] [group-metadata] [group-policy-metadata] [members-json-file] [decision-policy]", + Short: "Create a group with policy which is an aggregation " + + "of member accounts with associated weights, " + + "an administrator account and a decision policy. Note, the '--from' flag is " + + "ignored as it is implied from [admin].", + Long: strings.TrimSpace( + fmt.Sprintf(`Create a group with policy which is an aggregation of member accounts with associated weights, +an administrator account and decision policy. Note, the '--from' flag is ignored as it is implied from [admin]. +Members accounts can be given through a members JSON file that contains an array of members. +If group-policy-as-admin flag is set to true, the admin of the newly created group and group policy is set with the group policy address itself. + +Example: +$ %s tx group create-group-with-policy [admin] [group-metadata] [group-policy-metadata] [members-json-file] \ +'{"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy", "threshold":"1", "timeout":"1s"}' + +where members.json contains: + +{ + "members": [ + { + "address": "addr1", + "weight": "1", + "metadata": "some metadata" + }, + { + "address": "addr2", + "weight": "1", + "metadata": "some metadata" + } + ] +} +`, + version.AppName, + ), + ), + Args: cobra.MinimumNArgs(5), + RunE: func(cmd *cobra.Command, args []string) error { + err := cmd.Flags().Set(flags.FlagFrom, args[0]) + if err != nil { + return err + } + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + groupPolicyAsAdmin, err := cmd.Flags().GetBool(FlagGroupPolicyAsAdmin) + if err != nil { + return err + } + + members, err := parseMembers(clientCtx, args[3]) + if err != nil { + return err + } + + groupMetadata, err := base64.StdEncoding.DecodeString(args[1]) + if err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "group metadata is malformed, proper base64 string is required") + } + + groupPolicyMetadata, err := base64.StdEncoding.DecodeString(args[2]) + if err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "group policy metadata is malformed, proper base64 string is required") + } + + var policy group.DecisionPolicy + if err := clientCtx.Codec.UnmarshalInterfaceJSON([]byte(args[4]), &policy); err != nil { + return err + } + + msg, err := group.NewMsgCreateGroupWithPolicy( + clientCtx.GetFromAddress().String(), + members, + groupMetadata, + groupPolicyMetadata, + groupPolicyAsAdmin, + policy, + ) + if err != nil { + return err + } + + if err = msg.ValidateBasic(); err != nil { + return fmt.Errorf("message validation failed: %w", err) + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + cmd.Flags().Bool(FlagGroupPolicyAsAdmin, false, "Sets admin of the newly created group and group policy with group policy address itself when true") + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + // MsgCreateGroupPolicyCmd creates a CLI command for Msg/CreateGroupPolicy. func MsgCreateGroupPolicyCmd() *cobra.Command { cmd := &cobra.Command{ diff --git a/x/group/client/testutil/tx.go b/x/group/client/testutil/tx.go index a9681f3474..bee52e27b0 100644 --- a/x/group/client/testutil/tx.go +++ b/x/group/client/testutil/tx.go @@ -694,6 +694,216 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMembers() { } } +func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + var commonFlags = []string{ + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + } + + validMembers := fmt.Sprintf(`{"members": [{ + "address": "%s", + "weight": "1", + "metadata": "%s" + }]}`, val.Address.String(), validMetadata) + validMembersFile := testutil.WriteToNewTempFile(s.T(), validMembers) + + invalidMembersAddress := `{"members": [{ + "address": "", + "weight": "1" + }]}` + invalidMembersAddressFile := testutil.WriteToNewTempFile(s.T(), invalidMembersAddress) + + invalidMembersWeight := fmt.Sprintf(`{"members": [{ + "address": "%s", + "weight": "0" + }]}`, val.Address.String()) + invalidMembersWeightFile := testutil.WriteToNewTempFile(s.T(), invalidMembersWeight) + + invalidMembersMetadata := fmt.Sprintf(`{"members": [{ + "address": "%s", + "weight": "1", + "metadata": "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ==" + }]}`, val.Address.String()) + invalidMembersMetadataFile := testutil.WriteToNewTempFile(s.T(), invalidMembersMetadata) + + testCases := []struct { + name string + args []string + expectErr bool + expectErrMsg string + respType proto.Message + expectedCode uint32 + }{ + { + "correct data", + append( + []string{ + val.Address.String(), + validMetadata, + validMetadata, + validMembersFile.Name(), + "{\"@type\":\"/cosmos.group.v1beta1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"timeout\":\"1s\"}", + fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), + }, + commonFlags..., + ), + false, + "", + &sdk.TxResponse{}, + 0, + }, + { + "group-policy-as-admin is true", + append( + []string{ + val.Address.String(), + validMetadata, + validMetadata, + validMembersFile.Name(), + "{\"@type\":\"/cosmos.group.v1beta1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"timeout\":\"1s\"}", + fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, true), + }, + commonFlags..., + ), + false, + "", + &sdk.TxResponse{}, + 0, + }, + { + "with amino-json", + append( + []string{ + val.Address.String(), + validMetadata, + validMetadata, + validMembersFile.Name(), + "{\"@type\":\"/cosmos.group.v1beta1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"timeout\":\"1s\"}", + fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), + }, + commonFlags..., + ), + false, + "", + &sdk.TxResponse{}, + 0, + }, + { + "group metadata too long", + append( + []string{ + val.Address.String(), + "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ==", + validMetadata, + validMembersFile.Name(), + "{\"@type\":\"/cosmos.group.v1beta1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"timeout\":\"1s\"}", + fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), + }, + commonFlags..., + ), + true, + "group metadata: limit exceeded", + nil, + 0, + }, + { + "group policy metadata too long", + append( + []string{ + val.Address.String(), + validMetadata, + "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ==", + validMembersFile.Name(), + "{\"@type\":\"/cosmos.group.v1beta1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"timeout\":\"1s\"}", + fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), + }, + commonFlags..., + ), + true, + "group policy metadata: limit exceeded", + nil, + 0, + }, + { + "invalid members address", + append( + []string{ + val.Address.String(), + validMetadata, + validMetadata, + invalidMembersAddressFile.Name(), + "{\"@type\":\"/cosmos.group.v1beta1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"timeout\":\"1s\"}", + fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), + }, + commonFlags..., + ), + true, + "message validation failed: address: empty address string is not allowed", + nil, + 0, + }, + { + "invalid members weight", + append( + []string{ + val.Address.String(), + validMetadata, + validMetadata, + invalidMembersWeightFile.Name(), + "{\"@type\":\"/cosmos.group.v1beta1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"timeout\":\"1s\"}", + fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), + }, + commonFlags..., + ), + true, + "expected a positive decimal, got 0: invalid decimal string", + nil, + 0, + }, + { + "members metadata too long", + append( + []string{ + val.Address.String(), + validMetadata, + validMetadata, + invalidMembersMetadataFile.Name(), + "{\"@type\":\"/cosmos.group.v1beta1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"timeout\":\"1s\"}", + fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), + }, + commonFlags..., + ), + true, + "member metadata: limit exceeded", + nil, + 0, + }, + } + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := client.MsgCreateGroupWithPolicyCmd() + + out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Contains(out.String(), tc.expectErrMsg) + } else { + s.Require().NoError(err, out.String()) + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) + + txResp := tc.respType.(*sdk.TxResponse) + s.Require().Equal(tc.expectedCode, txResp.Code, out.String()) + } + }) + } +} + func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { val := s.network.Validators[0] wrongAdmin := s.network.Validators[1].Address diff --git a/x/group/codec.go b/x/group/codec.go index 7778fa02eb..6e2cb6d40f 100644 --- a/x/group/codec.go +++ b/x/group/codec.go @@ -18,6 +18,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgUpdateGroupMembers{}, "cosmos-sdk/MsgUpdateGroupMembers", nil) cdc.RegisterConcrete(&MsgUpdateGroupAdmin{}, "cosmos-sdk/MsgUpdateGroupAdmin", nil) cdc.RegisterConcrete(&MsgUpdateGroupMetadata{}, "cosmos-sdk/MsgUpdateGroupMetadata", nil) + cdc.RegisterConcrete(&MsgCreateGroupWithPolicy{}, "cosmos-sdk/MsgCreateGroupWithPolicy", nil) cdc.RegisterConcrete(&MsgCreateGroupPolicy{}, "cosmos-sdk/MsgCreateGroupPolicy", nil) cdc.RegisterConcrete(&MsgUpdateGroupPolicyAdmin{}, "cosmos-sdk/MsgUpdateGroupPolicyAdmin", nil) cdc.RegisterConcrete(&MsgUpdateGroupPolicyDecisionPolicy{}, "cosmos-sdk/MsgUpdateGroupPolicyDecisionPolicy", nil) @@ -34,6 +35,7 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgUpdateGroupMembers{}, &MsgUpdateGroupAdmin{}, &MsgUpdateGroupMetadata{}, + &MsgCreateGroupWithPolicy{}, &MsgCreateGroupPolicy{}, &MsgUpdateGroupPolicyAdmin{}, &MsgUpdateGroupPolicyDecisionPolicy{}, diff --git a/x/group/keeper/grpc_query.go b/x/group/keeper/grpc_query.go index 5027c14f59..4c037f3f52 100644 --- a/x/group/keeper/grpc_query.go +++ b/x/group/keeper/grpc_query.go @@ -269,7 +269,6 @@ func (q Keeper) GroupsByMember(goCtx context.Context, request *group.QueryGroups if err != nil { return nil, err } - defer iter.Close() var members []*group.GroupMember pageRes, err := orm.Paginate(iter, request.Pagination, &members) diff --git a/x/group/keeper/invariants.go b/x/group/keeper/invariants.go index e36ecbbc37..2212573485 100644 --- a/x/group/keeper/invariants.go +++ b/x/group/keeper/invariants.go @@ -167,7 +167,6 @@ func GroupTotalWeightInvariantHelper(ctx sdk.Context, key storetypes.StoreKey, g msg += fmt.Sprintf("error while returning group member iterator for group with ID %d\n%v\n", groupInfo.Id, err) return msg, broken } - defer memIt.Close() for { _, err = memIt.LoadNext(&groupMember) @@ -185,6 +184,8 @@ func GroupTotalWeightInvariantHelper(ctx sdk.Context, key storetypes.StoreKey, g return msg, broken } } + memIt.Close() + groupWeight, err := groupmath.NewNonNegativeDecFromString(groupInfo.GetTotalWeight()) if err != nil { msg += fmt.Sprintf("error while parsing non-nengative decimal for group with ID %d\n%v\n", groupInfo.Id, err) @@ -278,7 +279,6 @@ func TallyVotesSumInvariantHelper(ctx sdk.Context, key storetypes.StoreKey, grou msg += fmt.Sprintf("error while returning vote iterator for proposal with ID %d\n%v\n", proposal.Id, err) return msg, broken } - defer voteIt.Close() for { _, err := voteIt.LoadNext(&vote) @@ -330,6 +330,7 @@ func TallyVotesSumInvariantHelper(ctx sdk.Context, key storetypes.StoreKey, grou } } } + voteIt.Close() totalProposalVotes, err := proposal.FinalTallyResult.TotalCounts() if err != nil { diff --git a/x/group/keeper/keeper_test.go b/x/group/keeper/keeper_test.go index 25ba262079..c32b3551b2 100644 --- a/x/group/keeper/keeper_test.go +++ b/x/group/keeper/keeper_test.go @@ -705,6 +705,210 @@ func (s *TestSuite) TestUpdateGroupMembers() { } } +func (s *TestSuite) TestCreateGroupWithPolicy() { + addrs := s.addrs + addr1 := addrs[0] + addr3 := addrs[2] + addr5 := addrs[4] + addr6 := addrs[5] + + members := []group.Member{{ + Address: addr5.String(), + Weight: "1", + Metadata: nil, + AddedAt: s.blockTime, + }, { + Address: addr6.String(), + Weight: "2", + Metadata: nil, + AddedAt: s.blockTime, + }} + + specs := map[string]struct { + req *group.MsgCreateGroupWithPolicy + policy group.DecisionPolicy + expErr bool + expErrMsg string + }{ + "all good": { + req: &group.MsgCreateGroupWithPolicy{ + Admin: addr1.String(), + Members: members, + GroupMetadata: nil, + GroupPolicyMetadata: nil, + GroupPolicyAsAdmin: false, + }, + policy: group.NewThresholdDecisionPolicy( + "1", + time.Second, + ), + }, + "group policy as admin is true": { + req: &group.MsgCreateGroupWithPolicy{ + Admin: addr1.String(), + Members: members, + GroupMetadata: nil, + GroupPolicyMetadata: nil, + GroupPolicyAsAdmin: true, + }, + policy: group.NewThresholdDecisionPolicy( + "1", + time.Second, + ), + }, + "group metadata too long": { + req: &group.MsgCreateGroupWithPolicy{ + Admin: addr1.String(), + Members: members, + GroupMetadata: bytes.Repeat([]byte{1}, 256), + GroupPolicyMetadata: nil, + GroupPolicyAsAdmin: false, + }, + policy: group.NewThresholdDecisionPolicy( + "1", + time.Second, + ), + expErr: true, + expErrMsg: "limit exceeded", + }, + "group policy metadata too long": { + req: &group.MsgCreateGroupWithPolicy{ + Admin: addr1.String(), + Members: members, + GroupMetadata: nil, + GroupPolicyMetadata: bytes.Repeat([]byte{1}, 256), + GroupPolicyAsAdmin: false, + }, + policy: group.NewThresholdDecisionPolicy( + "1", + time.Second, + ), + expErr: true, + expErrMsg: "limit exceeded", + }, + "member metadata too long": { + req: &group.MsgCreateGroupWithPolicy{ + Admin: addr1.String(), + Members: []group.Member{{ + Address: addr3.String(), + Weight: "1", + Metadata: bytes.Repeat([]byte{1}, 256), + }}, + GroupMetadata: nil, + GroupPolicyMetadata: nil, + GroupPolicyAsAdmin: false, + }, + policy: group.NewThresholdDecisionPolicy( + "1", + time.Second, + ), + expErr: true, + expErrMsg: "limit exceeded", + }, + "zero member weight": { + req: &group.MsgCreateGroupWithPolicy{ + Admin: addr1.String(), + Members: []group.Member{{ + Address: addr3.String(), + Weight: "0", + Metadata: nil, + }}, + GroupMetadata: nil, + GroupPolicyMetadata: nil, + GroupPolicyAsAdmin: false, + }, + policy: group.NewThresholdDecisionPolicy( + "1", + time.Second, + ), + expErr: true, + expErrMsg: "expected a positive decimal", + }, + "decision policy threshold > total group weight": { + req: &group.MsgCreateGroupWithPolicy{ + Admin: addr1.String(), + Members: members, + GroupMetadata: nil, + GroupPolicyMetadata: nil, + GroupPolicyAsAdmin: false, + }, + policy: group.NewThresholdDecisionPolicy( + "10", + time.Second, + ), + expErr: false, + }, + } + + for msg, spec := range specs { + spec := spec + s.Run(msg, func() { + err := spec.req.SetDecisionPolicy(spec.policy) + s.Require().NoError(err) + + res, err := s.keeper.CreateGroupWithPolicy(s.ctx, spec.req) + if spec.expErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), spec.expErrMsg) + return + } + s.Require().NoError(err) + id := res.GroupId + groupPolicyAddr := res.GroupPolicyAddress + + // then all data persisted in group + loadedGroupRes, err := s.keeper.GroupInfo(s.ctx, &group.QueryGroupInfoRequest{GroupId: id}) + s.Require().NoError(err) + s.Assert().Equal(spec.req.GroupMetadata, loadedGroupRes.Info.Metadata) + s.Assert().Equal(id, loadedGroupRes.Info.Id) + if spec.req.GroupPolicyAsAdmin { + s.Assert().NotEqual(spec.req.Admin, loadedGroupRes.Info.Admin) + s.Assert().Equal(groupPolicyAddr, loadedGroupRes.Info.Admin) + } else { + s.Assert().Equal(spec.req.Admin, loadedGroupRes.Info.Admin) + } + + // and members are stored as well + membersRes, err := s.keeper.GroupMembers(s.ctx, &group.QueryGroupMembersRequest{GroupId: id}) + s.Require().NoError(err) + loadedMembers := membersRes.Members + s.Require().Equal(len(members), len(loadedMembers)) + // we reorder members by address to be able to compare them + sort.Slice(members, func(i, j int) bool { + addri, err := sdk.AccAddressFromBech32(members[i].Address) + s.Require().NoError(err) + addrj, err := sdk.AccAddressFromBech32(members[j].Address) + s.Require().NoError(err) + return bytes.Compare(addri, addrj) < 0 + }) + for i := range loadedMembers { + s.Assert().Equal(members[i].Metadata, loadedMembers[i].Member.Metadata) + s.Assert().Equal(members[i].Address, loadedMembers[i].Member.Address) + s.Assert().Equal(members[i].Weight, loadedMembers[i].Member.Weight) + s.Assert().Equal(members[i].AddedAt, loadedMembers[i].Member.AddedAt) + s.Assert().Equal(id, loadedMembers[i].GroupId) + } + + // then all data persisted in group policy + groupPolicyRes, err := s.keeper.GroupPolicyInfo(s.ctx, &group.QueryGroupPolicyInfoRequest{Address: groupPolicyAddr}) + s.Require().NoError(err) + + groupPolicy := groupPolicyRes.Info + s.Assert().Equal(groupPolicyAddr, groupPolicy.Address) + s.Assert().Equal(id, groupPolicy.GroupId) + s.Assert().Equal(spec.req.GroupPolicyMetadata, groupPolicy.Metadata) + s.Assert().Equal(spec.policy.(*group.ThresholdDecisionPolicy), groupPolicy.GetDecisionPolicy()) + if spec.req.GroupPolicyAsAdmin { + s.Assert().NotEqual(spec.req.Admin, groupPolicy.Admin) + s.Assert().Equal(groupPolicyAddr, groupPolicy.Admin) + } else { + s.Assert().Equal(spec.req.Admin, groupPolicy.Admin) + } + }) + } + +} + func (s *TestSuite) TestCreateGroupPolicy() { addrs := s.addrs addr1 := addrs[0] diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index a8206e3464..7d3b2172cf 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -233,6 +233,60 @@ func (k Keeper) UpdateGroupMetadata(goCtx context.Context, req *group.MsgUpdateG return &group.MsgUpdateGroupMetadataResponse{}, nil } +func (k Keeper) CreateGroupWithPolicy(goCtx context.Context, req *group.MsgCreateGroupWithPolicy) (*group.MsgCreateGroupWithPolicyResponse, error) { + groupRes, err := k.CreateGroup(goCtx, &group.MsgCreateGroup{ + Admin: req.Admin, + Members: req.Members, + Metadata: req.GroupMetadata, + }) + if err != nil { + return nil, sdkerrors.Wrap(err, "group response") + } + groupId := groupRes.GroupId + + var groupPolicyAddr sdk.AccAddress + groupPolicyRes, err := k.CreateGroupPolicy(goCtx, &group.MsgCreateGroupPolicy{ + Admin: req.Admin, + GroupId: groupId, + Metadata: req.GroupPolicyMetadata, + DecisionPolicy: req.DecisionPolicy, + }) + if err != nil { + return nil, sdkerrors.Wrap(err, "group policy response") + } + policyAddr := groupPolicyRes.Address + + groupPolicyAddr, err = sdk.AccAddressFromBech32(policyAddr) + if err != nil { + return nil, sdkerrors.Wrap(err, "group policy address") + } + groupPolicyAddress := groupPolicyAddr.String() + + if req.GroupPolicyAsAdmin { + updateAdminReq := &group.MsgUpdateGroupAdmin{ + GroupId: groupId, + Admin: req.Admin, + NewAdmin: groupPolicyAddress, + } + _, err = k.UpdateGroupAdmin(goCtx, updateAdminReq) + if err != nil { + return nil, err + } + + updatePolicyAddressReq := &group.MsgUpdateGroupPolicyAdmin{ + Admin: req.Admin, + Address: groupPolicyAddress, + NewAdmin: groupPolicyAddress, + } + _, err = k.UpdateGroupPolicyAdmin(goCtx, updatePolicyAddressReq) + if err != nil { + return nil, err + } + } + + return &group.MsgCreateGroupWithPolicyResponse{GroupId: groupId, GroupPolicyAddress: groupPolicyAddress}, nil +} + func (k Keeper) CreateGroupPolicy(goCtx context.Context, req *group.MsgCreateGroupPolicy) (*group.MsgCreateGroupPolicyResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) admin, err := sdk.AccAddressFromBech32(req.GetAdmin()) diff --git a/x/group/msgs.go b/x/group/msgs.go index 98bcc4ee0c..d97340f2ff 100644 --- a/x/group/msgs.go +++ b/x/group/msgs.go @@ -46,25 +46,11 @@ func (m MsgCreateGroup) ValidateBasic() error { } func (m MsgCreateGroup) validateMembers() error { - index := make(map[string]struct{}, len(m.Members)) - for i := range m.Members { - member := m.Members[i] - _, err := sdk.AccAddressFromBech32(member.Address) - if err != nil { - return sdkerrors.Wrap(err, "address") - } - if _, err := math.NewPositiveDecFromString(member.Weight); err != nil { - return sdkerrors.Wrap(err, "weight") - } - - addr := member.Address - if _, exists := index[addr]; exists { - return sdkerrors.Wrapf(errors.ErrDuplicate, "address: %s", addr) - } - index[addr] = struct{}{} + err := validateMembers(m.Members) + if err != nil { + return err } - return nil } @@ -224,6 +210,102 @@ func (m *MsgUpdateGroupMembers) GetGroupID() uint64 { return m.GroupId } +var _ sdk.Msg = &MsgCreateGroupWithPolicy{} +var _ types.UnpackInterfacesMessage = MsgCreateGroupWithPolicy{} + +// NewMsgCreateGroupWithPolicy creates a new MsgCreateGroupWithPolicy. +func NewMsgCreateGroupWithPolicy(admin string, members []Member, group_metadata []byte, group_policy_metadata []byte, groupPolicyAsAdmin bool, decisionPolicy DecisionPolicy) (*MsgCreateGroupWithPolicy, error) { + m := &MsgCreateGroupWithPolicy{ + Admin: admin, + Members: members, + GroupMetadata: group_metadata, + GroupPolicyMetadata: group_policy_metadata, + GroupPolicyAsAdmin: groupPolicyAsAdmin, + } + err := m.SetDecisionPolicy(decisionPolicy) + if err != nil { + return nil, err + } + return m, nil +} + +func (m *MsgCreateGroupWithPolicy) GetDecisionPolicy() DecisionPolicy { + decisionPolicy, ok := m.DecisionPolicy.GetCachedValue().(DecisionPolicy) + if !ok { + return nil + } + return decisionPolicy +} + +func (m *MsgCreateGroupWithPolicy) SetDecisionPolicy(decisionPolicy DecisionPolicy) error { + msg, ok := decisionPolicy.(proto.Message) + if !ok { + return sdkerrors.ErrInvalidType.Wrapf("can't proto marshal %T", msg) + } + any, err := types.NewAnyWithValue(msg) + if err != nil { + return err + } + m.DecisionPolicy = any + return nil +} + +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (m MsgCreateGroupWithPolicy) UnpackInterfaces(unpacker types.AnyUnpacker) error { + var decisionPolicy DecisionPolicy + return unpacker.UnpackAny(m.DecisionPolicy, &decisionPolicy) +} + +// Route Implements Msg. +func (m MsgCreateGroupWithPolicy) Route() string { + return sdk.MsgTypeURL(&m) +} + +// Type Implements Msg. +func (m MsgCreateGroupWithPolicy) Type() string { + return sdk.MsgTypeURL(&m) +} + +// GetSignBytes Implements Msg. +func (m MsgCreateGroupWithPolicy) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners returns the expected signers for a MsgCreateGroupWithPolicy. +func (m MsgCreateGroupWithPolicy) GetSigners() []sdk.AccAddress { + admin, err := sdk.AccAddressFromBech32(m.Admin) + if err != nil { + panic(err) + } + return []sdk.AccAddress{admin} +} + +// ValidateBasic does a sanity check on the provided data +func (m MsgCreateGroupWithPolicy) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(m.Admin) + if err != nil { + return sdkerrors.Wrap(err, "admin") + } + policy := m.GetDecisionPolicy() + if policy == nil { + return sdkerrors.Wrap(errors.ErrEmpty, "decision policy") + } + if err := policy.ValidateBasic(); err != nil { + return sdkerrors.Wrap(err, "decision policy") + } + + return m.validateMembers() +} + +func (m MsgCreateGroupWithPolicy) validateMembers() error { + + err := validateMembers(m.Members) + if err != nil { + return err + } + return nil +} + var _ sdk.Msg = &MsgCreateGroupPolicy{} // Route Implements Msg. @@ -712,3 +794,26 @@ func (m MsgExec) ValidateBasic() error { } return nil } + +func validateMembers(members []Member) error { + index := make(map[string]struct{}, len(members)) + for i := range members { + member := members[i] + _, err := sdk.AccAddressFromBech32(member.Address) + if err != nil { + return sdkerrors.Wrap(err, "address") + } + + if _, err := math.NewPositiveDecFromString(member.Weight); err != nil { + return sdkerrors.Wrap(err, "weight") + } + + addr := member.Address + if _, exists := index[addr]; exists { + return sdkerrors.Wrapf(errors.ErrDuplicate, "address: %s", addr) + } + index[addr] = struct{}{} + } + + return nil +} diff --git a/x/group/msgs_test.go b/x/group/msgs_test.go index 5dcfeb514a..db8583d941 100644 --- a/x/group/msgs_test.go +++ b/x/group/msgs_test.go @@ -39,7 +39,7 @@ func TestMsgCreateGroup(t *testing.T) { &group.MsgCreateGroup{ Admin: admin.String(), Members: []group.Member{ - group.Member{ + { Address: "invalid address", }, }, @@ -52,7 +52,7 @@ func TestMsgCreateGroup(t *testing.T) { &group.MsgCreateGroup{ Admin: admin.String(), Members: []group.Member{ - group.Member{ + { Address: member1.String(), Weight: "-1", }, @@ -66,7 +66,7 @@ func TestMsgCreateGroup(t *testing.T) { &group.MsgCreateGroup{ Admin: admin.String(), Members: []group.Member{ - group.Member{ + { Address: member1.String(), Weight: "0", }, @@ -80,12 +80,12 @@ func TestMsgCreateGroup(t *testing.T) { &group.MsgCreateGroup{ Admin: admin.String(), Members: []group.Member{ - group.Member{ + { Address: member1.String(), Weight: "1", Metadata: []byte("metadata"), }, - group.Member{ + { Address: member1.String(), Weight: "1", Metadata: []byte("metadata"), @@ -100,7 +100,7 @@ func TestMsgCreateGroup(t *testing.T) { &group.MsgCreateGroup{ Admin: admin.String(), Members: []group.Member{ - group.Member{ + { Address: member1.String(), Weight: "1", Metadata: []byte("metadata"), @@ -124,12 +124,12 @@ func TestMsgCreateGroup(t *testing.T) { &group.MsgCreateGroup{ Admin: admin.String(), Members: []group.Member{ - group.Member{ + { Address: member1.String(), Weight: "1", Metadata: []byte("metadata"), }, - group.Member{ + { Address: member2.String(), Weight: "1", Metadata: []byte("metadata"), @@ -314,7 +314,7 @@ func TestMsgUpdateGroupMembers(t *testing.T) { GroupId: 1, Admin: admin.String(), MemberUpdates: []group.Member{ - group.Member{ + { Address: member1.String(), Weight: "1", Metadata: []byte("metadata"), @@ -330,7 +330,7 @@ func TestMsgUpdateGroupMembers(t *testing.T) { GroupId: 1, Admin: admin.String(), MemberUpdates: []group.Member{ - group.Member{ + { Address: member1.String(), Weight: "0", Metadata: []byte("metadata"), @@ -356,6 +356,185 @@ func TestMsgUpdateGroupMembers(t *testing.T) { } } +func TestMsgCreateGroupWithPolicy(t *testing.T) { + testCases := []struct { + name string + msg func() *group.MsgCreateGroupWithPolicy + expErr bool + errMsg string + }{ + { + "invalid admin address", + func() *group.MsgCreateGroupWithPolicy { + admin := "admin" + policy := group.NewThresholdDecisionPolicy("1", time.Second) + members := []group.Member{ + { + Address: member1.String(), + Weight: "1", + Metadata: []byte("metadata"), + }, + } + req, err := group.NewMsgCreateGroupWithPolicy(admin, members, []byte("group_metadata"), []byte("group_policy_metadata"), false, policy) + require.NoError(t, err) + return req + }, + true, + "admin: decoding bech32 failed", + }, + { + "invalid member address", + func() *group.MsgCreateGroupWithPolicy { + policy := group.NewThresholdDecisionPolicy("1", time.Second) + members := []group.Member{ + { + Address: "invalid_address", + Weight: "1", + Metadata: []byte("metadata"), + }, + } + req, err := group.NewMsgCreateGroupWithPolicy(admin.String(), members, []byte("group_metadata"), []byte("group_policy_metadata"), false, policy) + require.NoError(t, err) + return req + }, + true, + "address: decoding bech32 failed", + }, + { + "negative member's weight not allowed", + func() *group.MsgCreateGroupWithPolicy { + policy := group.NewThresholdDecisionPolicy("1", time.Second) + members := []group.Member{ + { + Address: member1.String(), + Weight: "-1", + Metadata: []byte("metadata"), + }, + } + req, err := group.NewMsgCreateGroupWithPolicy(admin.String(), members, []byte("group_metadata"), []byte("group_policy_metadata"), false, policy) + require.NoError(t, err) + return req + }, + true, + "expected a positive decimal", + }, + { + "zero member's weight not allowed", + func() *group.MsgCreateGroupWithPolicy { + policy := group.NewThresholdDecisionPolicy("1", time.Second) + members := []group.Member{ + { + Address: member1.String(), + Weight: "0", + Metadata: []byte("metadata"), + }, + } + req, err := group.NewMsgCreateGroupWithPolicy(admin.String(), members, []byte("group_metadata"), []byte("group_policy_metadata"), false, policy) + require.NoError(t, err) + return req + }, + true, + "expected a positive decimal", + }, + { + "duplicate member not allowed", + func() *group.MsgCreateGroupWithPolicy { + policy := group.NewThresholdDecisionPolicy("1", time.Second) + members := []group.Member{ + { + Address: member1.String(), + Weight: "1", + Metadata: []byte("metadata"), + }, + { + Address: member1.String(), + Weight: "1", + Metadata: []byte("metadata"), + }, + } + req, err := group.NewMsgCreateGroupWithPolicy(admin.String(), members, []byte("group_metadata"), []byte("group_policy_metadata"), false, policy) + require.NoError(t, err) + return req + }, + true, + "duplicate value", + }, + { + "invalid threshold policy", + func() *group.MsgCreateGroupWithPolicy { + policy := group.NewThresholdDecisionPolicy("-1", time.Second) + members := []group.Member{ + { + Address: member1.String(), + Weight: "1", + Metadata: []byte("metadata"), + }, + } + req, err := group.NewMsgCreateGroupWithPolicy(admin.String(), members, []byte("group_metadata"), []byte("group_policy_metadata"), false, policy) + require.NoError(t, err) + return req + }, + true, + "expected a positive decimal", + }, + { + "valid test case with single member", + func() *group.MsgCreateGroupWithPolicy { + policy := group.NewThresholdDecisionPolicy("1", time.Second) + members := []group.Member{ + { + Address: member1.String(), + Weight: "1", + Metadata: []byte("metadata"), + }, + } + req, err := group.NewMsgCreateGroupWithPolicy(admin.String(), members, []byte("group_metadata"), []byte("group_policy_metadata"), false, policy) + require.NoError(t, err) + return req + }, + false, + "", + }, + { + "valid test case with multiple members", + func() *group.MsgCreateGroupWithPolicy { + policy := group.NewThresholdDecisionPolicy("1", time.Second) + members := []group.Member{ + { + Address: member1.String(), + Weight: "1", + Metadata: []byte("metadata"), + }, + { + Address: member2.String(), + Weight: "1", + Metadata: []byte("metadata"), + }, + } + req, err := group.NewMsgCreateGroupWithPolicy(admin.String(), members, []byte("group_metadata"), []byte("group_policy_metadata"), false, policy) + require.NoError(t, err) + return req + }, + false, + "", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + msg := tc.msg() + err := msg.ValidateBasic() + if tc.expErr { + require.Error(t, err) + require.Contains(t, err.Error(), tc.errMsg) + } else { + require.NoError(t, err) + require.Equal(t, msg.Type(), sdk.MsgTypeURL(&group.MsgCreateGroupWithPolicy{})) + } + }) + } +} + func TestMsgCreateGroupPolicy(t *testing.T) { testCases := []struct { name string diff --git a/x/group/simulation/operations.go b/x/group/simulation/operations.go index f24c4008b2..b57eca40f6 100644 --- a/x/group/simulation/operations.go +++ b/x/group/simulation/operations.go @@ -29,6 +29,7 @@ var ( TypeMsgUpdateGroupMembers = sdk.MsgTypeURL(&group.MsgUpdateGroupMembers{}) TypeMsgUpdateGroupAdmin = sdk.MsgTypeURL(&group.MsgUpdateGroupAdmin{}) TypeMsgUpdateGroupMetadata = sdk.MsgTypeURL(&group.MsgUpdateGroupMetadata{}) + TypeMsgCreateGroupWithPolicy = sdk.MsgTypeURL(&group.MsgCreateGroupWithPolicy{}) TypeMsgCreateGroupPolicy = sdk.MsgTypeURL(&group.MsgCreateGroupPolicy{}) TypeMsgUpdateGroupPolicyAdmin = sdk.MsgTypeURL(&group.MsgUpdateGroupPolicyAdmin{}) TypeMsgUpdateGroupPolicyDecisionPolicy = sdk.MsgTypeURL(&group.MsgUpdateGroupPolicyDecisionPolicy{}) @@ -45,10 +46,11 @@ const ( OpMsgUpdateGroupAdmin = "op_weight_msg_update_group_admin" OpMsgUpdateGroupMetadata = "op_wieght_msg_update_group_metadata" OpMsgUpdateGroupMembers = "op_weight_msg_update_group_members" - OpMsgCreateGroupPolicy = "op_weight_msg_create_group_policy" - OpMsgUpdateGroupPolicyAdmin = "op_weight_msg_update_group_policy_admin" - OpMsgUpdateGroupPolicyDecisionPolicy = "op_weight_msg_update_group_policy_decision_policy" - OpMsgUpdateGroupPolicyMetaData = "op_weight_msg_update_group_policy_metadata" + OpMsgCreateGroupPolicy = "op_weight_msg_create_group_account" + OpMsgCreateGroupWithPolicy = "op_weight_msg_create_group_with_policy" + OpMsgUpdateGroupPolicyAdmin = "op_weight_msg_update_group_account_admin" + OpMsgUpdateGroupPolicyDecisionPolicy = "op_weight_msg_update_group_account_decision_policy" + OpMsgUpdateGroupPolicyMetaData = "op_weight_msg_update_group_account_metadata" OpMsgSubmitProposal = "op_weight_msg_submit_proposal" OpMsgWithdrawProposal = "op_weight_msg_withdraw_proposal" OpMsgVote = "op_weight_msg_vote" @@ -59,7 +61,7 @@ const ( // That's why we have less weight for update group & group-policy txn's. const ( WeightMsgCreateGroup = 100 - WeightMsgCreateGroupPolicy = 100 + WeightMsgCreateGroupPolicy = 50 WeightMsgSubmitProposal = 90 WeightMsgVote = 90 WeightMsgExec = 90 @@ -70,10 +72,9 @@ const ( WeightMsgUpdateGroupPolicyDecisionPolicy = 5 WeightMsgUpdateGroupPolicyMetadata = 5 WeightMsgWithdrawProposal = 20 + WeightMsgCreateGroupWithPolicy = 100 ) -const GroupMemberWeight = 40 - // WeightedOperations returns all the operations from the module with their respective weights func WeightedOperations( appParams simtypes.AppParams, cdc codec.JSONCodec, ak group.AccountKeeper, @@ -91,6 +92,7 @@ func WeightedOperations( weightMsgVote int weightMsgExec int weightMsgWithdrawProposal int + weightMsgCreateGroupWithPolicy int ) appParams.GetOrGenerate(cdc, OpMsgCreateGroup, &weightMsgCreateGroup, nil, @@ -103,6 +105,11 @@ func WeightedOperations( weightMsgCreateGroupPolicy = WeightMsgCreateGroupPolicy }, ) + appParams.GetOrGenerate(cdc, OpMsgCreateGroupWithPolicy, &weightMsgCreateGroupWithPolicy, nil, + func(_ *rand.Rand) { + weightMsgCreateGroupWithPolicy = WeightMsgCreateGroupWithPolicy + }, + ) appParams.GetOrGenerate(cdc, OpMsgSubmitProposal, &weightMsgSubmitProposal, nil, func(_ *rand.Rand) { weightMsgSubmitProposal = WeightMsgSubmitProposal @@ -172,6 +179,10 @@ func WeightedOperations( weightMsgCreateGroupPolicy, SimulateMsgCreateGroupPolicy(ak, bk, k), ), + // simulation.NewWeightedOperation( + // weightMsgCreateGroupWithPolicy, + // SimulateMsgCreateGroupWithPolicy(ak, bk), + // ), } wPostCreateProposalOps := simulation.WeightedOperations{ @@ -230,14 +241,7 @@ func SimulateMsgCreateGroup(ak group.AccountKeeper, bk group.BankKeeper) simtype return simtypes.NoOpMsg(group.ModuleName, TypeMsgCreateGroup, "fee error"), nil, err } - members := []group.Member{ - { - Address: accAddr, - Weight: fmt.Sprintf("%d", GroupMemberWeight), - Metadata: []byte(simtypes.RandStringOfLength(r, 10)), - }, - } - + members := genGroupMembers(r, accounts) msg := &group.MsgCreateGroup{Admin: accAddr, Members: members, Metadata: []byte(simtypes.RandStringOfLength(r, 10))} txGen := simappparams.MakeTestEncodingConfig().TxConfig @@ -264,6 +268,62 @@ func SimulateMsgCreateGroup(ak group.AccountKeeper, bk group.BankKeeper) simtype } } +// SimulateMsgCreateGroupWithPolicy generates a MsgCreateGroupWithPolicy with random values +func SimulateMsgCreateGroupWithPolicy(ak group.AccountKeeper, bk group.BankKeeper) simtypes.Operation { + return func( + r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + acc, _ := simtypes.RandomAcc(r, accounts) + account := ak.GetAccount(ctx, acc.Address) + accAddr := acc.Address.String() + + spendableCoins := bk.SpendableCoins(ctx, account.GetAddress()) + fees, err := simtypes.RandomFees(r, ctx, spendableCoins) + if err != nil { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgCreateGroup, "fee error"), nil, err + } + + members := genGroupMembers(r, accounts) + decisionPolicy := &group.ThresholdDecisionPolicy{ + Threshold: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 10)), + Timeout: time.Second * time.Duration(30*24*60*60), + } + + msg := &group.MsgCreateGroupWithPolicy{ + Admin: accAddr, + Members: members, + GroupMetadata: []byte(simtypes.RandStringOfLength(r, 10)), + GroupPolicyMetadata: []byte(simtypes.RandStringOfLength(r, 10)), + GroupPolicyAsAdmin: r.Float32() < 0.5, + } + msg.SetDecisionPolicy(decisionPolicy) + if err != nil { + return simtypes.NoOpMsg(group.ModuleName, msg.Type(), "unable to set decision policy"), nil, err + } + + txGen := simappparams.MakeTestEncodingConfig().TxConfig + tx, err := helpers.GenTx( + txGen, + []sdk.Msg{msg}, + fees, + helpers.DefaultGenTxGas, + chainID, + []uint64{account.GetAccountNumber()}, + []uint64{account.GetSequence()}, + acc.PrivKey, + ) + if err != nil { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgCreateGroupWithPolicy, "unable to generate mock tx"), nil, err + } + + _, _, err = app.SimDeliver(txGen.TxEncoder(), tx) + if err != nil { + return simtypes.NoOpMsg(group.ModuleName, msg.Type(), "unable to deliver tx"), nil, err + } + + return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil + } +} + // SimulateMsgCreateGroupPolicy generates a NewMsgCreateGroupPolicy with random values func SimulateMsgCreateGroupPolicy(ak group.AccountKeeper, bk group.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( @@ -288,7 +348,7 @@ func SimulateMsgCreateGroupPolicy(ak group.AccountKeeper, bk group.BankKeeper, k groupID, []byte(simtypes.RandStringOfLength(r, 10)), &group.ThresholdDecisionPolicy{ - Threshold: "20", + Threshold: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 10)), Timeout: time.Second * time.Duration(30*24*60*60), }, ) @@ -518,14 +578,32 @@ func SimulateMsgUpdateGroupMembers(ak group.AccountKeeper, return simtypes.NoOpMsg(group.ModuleName, TypeMsgUpdateGroupMembers, "fee error"), nil, err } - member, _ := simtypes.RandomAcc(r, accounts) + members := genGroupMembers(r, accounts) - members := []group.Member{ - { - Address: member.Address.String(), - Weight: fmt.Sprintf("%d", GroupMemberWeight), - Metadata: []byte(simtypes.RandStringOfLength(r, 10)), - }, + ctx := sdk.UnwrapSDKContext(sdkCtx) + res, err := k.GroupMembers(ctx, &group.QueryGroupMembersRequest{GroupId: groupID}) + if err != nil { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgUpdateGroupMembers, "group members"), nil, err + } + + // set existing radnom group member weight to zero to remove from the group + existigMembers := res.Members + if len(existigMembers) > 0 { + memberToRemove := existigMembers[r.Intn(len(existigMembers))] + var isDuplicateMember bool + for idx, m := range members { + if m.Address == memberToRemove.Member.Address { + members[idx].Weight = "0" + isDuplicateMember = true + break + } + } + + if !isDuplicateMember { + m := memberToRemove.Member + m.Weight = "0" + members = append(members, *m) + } } msg := group.MsgUpdateGroupMembers{ @@ -642,7 +720,7 @@ func SimulateMsgUpdateGroupPolicyDecisionPolicy(ak group.AccountKeeper, } msg, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest(acc.Address, groupPolicyBech32, &group.ThresholdDecisionPolicy{ - Threshold: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 20)), + Threshold: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 10)), Timeout: time.Second * time.Duration(simtypes.RandIntBetween(r, 100, 1000)), }) if err != nil { @@ -1132,3 +1210,33 @@ func findAccount(accounts []simtypes.Account, addr string) (idx int) { } return idx } + +func genGroupMembers(r *rand.Rand, accounts []simtypes.Account) []group.Member { + if len(accounts) == 1 { + return []group.Member{ + { + Address: accounts[0].Address.String(), + Weight: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 5)), + Metadata: []byte(simtypes.RandStringOfLength(r, 10)), + }, + } + } + + max := 5 + if len(accounts) < max { + max = len(accounts) + } + + membersLen := simtypes.RandIntBetween(r, 1, max) + members := make([]group.Member, membersLen) + + for i := 0; i < membersLen; i++ { + members[i] = group.Member{ + Address: accounts[i].Address.String(), + Weight: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 5)), + Metadata: []byte(simtypes.RandStringOfLength(r, 10)), + } + } + + return members +} diff --git a/x/group/simulation/operations_test.go b/x/group/simulation/operations_test.go index b178ba6930..48aea7d519 100644 --- a/x/group/simulation/operations_test.go +++ b/x/group/simulation/operations_test.go @@ -40,7 +40,7 @@ func (suite *SimTestSuite) TestWeightedOperations() { suite.app.BankKeeper, suite.app.GroupKeeper, cdc, ) - s := rand.NewSource(1) + s := rand.NewSource(2) r := rand.New(s) accs := suite.getTestingAccounts(r, 3) @@ -51,6 +51,7 @@ func (suite *SimTestSuite) TestWeightedOperations() { }{ {simulation.WeightMsgCreateGroup, group.MsgCreateGroup{}.Route(), simulation.TypeMsgCreateGroup}, {simulation.WeightMsgCreateGroupPolicy, group.MsgCreateGroupPolicy{}.Route(), simulation.TypeMsgCreateGroupPolicy}, + // {simulation.WeightMsgCreateGroupWithPolicy, group.MsgCreateGroupWithPolicy{}.Route(), simulation.TypeMsgCreateGroupWithPolicy}, {simulation.WeightMsgSubmitProposal, group.MsgSubmitProposal{}.Route(), simulation.TypeMsgSubmitProposal}, {simulation.WeightMsgSubmitProposal, group.MsgSubmitProposal{}.Route(), simulation.TypeMsgSubmitProposal}, {simulation.WeightMsgWithdrawProposal, group.MsgWithdrawProposal{}.Route(), simulation.TypeMsgWithdrawProposal}, @@ -120,6 +121,35 @@ func (suite *SimTestSuite) TestSimulateCreateGroup() { suite.Require().Len(futureOperations, 0) } +func (suite *SimTestSuite) TestSimulateCreateGroupWithPolicy() { + // setup 1 account + s := rand.NewSource(1) + r := rand.New(s) + accounts := suite.getTestingAccounts(r, 1) + + // begin a new block + suite.app.BeginBlock(abci.RequestBeginBlock{ + Header: tmproto.Header{ + Height: suite.app.LastBlockHeight() + 1, + AppHash: suite.app.LastCommitID().Hash, + }, + }) + + acc := accounts[0] + + // execute operation + op := simulation.SimulateMsgCreateGroupWithPolicy(suite.app.AccountKeeper, suite.app.BankKeeper) + operationMsg, futureOperations, err := op(r, suite.app.BaseApp, suite.ctx, accounts, "") + suite.Require().NoError(err) + + var msg group.MsgCreateGroupWithPolicy + err = group.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) + suite.Require().NoError(err) + suite.Require().True(operationMsg.OK) + suite.Require().Equal(acc.Address.String(), msg.Admin) + suite.Require().Len(futureOperations, 0) +} + func (suite *SimTestSuite) TestSimulateCreateGroupPolicy() { // setup 1 account s := rand.NewSource(1) diff --git a/x/group/spec/03_messages.md b/x/group/spec/03_messages.md index ca20eeaeaf..736943c807 100644 --- a/x/group/spec/03_messages.md +++ b/x/group/spec/03_messages.md @@ -19,7 +19,7 @@ It's expecting to fail if metadata length is greater than `MaxMetadataLen` confi Group members can be updated with the `UpdateGroupMembers`. -+++ https://github.com/cosmos/cosmos-sdk/blob/6f58963e7f6ce820e9b33f02f06f7b96f6d2e347/proto/cosmos/group/v1beta1/tx.proto#L74-L86 ++++https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L74-L86 In the list of `MemberUpdates`, an existing member can be removed by setting its weight to 0. @@ -29,7 +29,7 @@ It's expecting to fail if the signer is not the admin of the group. The `UpdateGroupAdmin` can be used to update a group admin. -+++ https://github.com/cosmos/cosmos-sdk/blob/6f58963e7f6ce820e9b33f02f06f7b96f6d2e347/proto/cosmos/group/v1beta1/tx.proto#L91-L102 ++++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L91-L102 It's expecting to fail if the signer is not the admin of the group. @@ -37,7 +37,7 @@ It's expecting to fail if the signer is not the admin of the group. The `UpdateGroupMetadata` can be used to update a group metadata. -+++ https://github.com/cosmos/cosmos-sdk/blob/6f58963e7f6ce820e9b33f02f06f7b96f6d2e347/proto/cosmos/group/v1beta1/tx.proto#L107-L118 ++++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L107-L118 It's expecting to fail if: @@ -48,15 +48,23 @@ It's expecting to fail if: A new group policy can be created with the `MsgCreateGroupPolicy`, which has an admin address, a group id, a decision policy and some optional metadata bytes. -+++ https://github.com/cosmos/cosmos-sdk/blob/6f58963e7f6ce820e9b33f02f06f7b96f6d2e347/proto/cosmos/group/v1beta1/tx.proto#L121-L142 ++++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L127-L142 It's expecting to fail if metadata length is greater than `MaxMetadataLen` config. +## Msg/CreateGroupWithPolicy + +A new group with policy can be created with the `MsgCreateGroupWithPolicy`, which has an admin address, a list of members, a decision policy, a group policy as admin field to optionally set group and group policy admin with group policy address and some optional metadata bytes for group and group policy. + ++++ https://github.com/cosmos/cosmos-sdk/blob/likhita/MsgCreateGroupWithPolicy/proto/cosmos/group/v1beta1/tx.proto#L167-L188 + +It's expecting to fail if group metadata or group policy metadata length is greater than some `MaxMetadataLength`. + ## Msg/UpdateGroupPolicyAdmin The `UpdateGroupPolicyAdmin` can be used to update a group policy admin. -+++ https://github.com/cosmos/cosmos-sdk/blob/6f58963e7f6ce820e9b33f02f06f7b96f6d2e347/proto/cosmos/group/v1beta1/tx.proto#L151-L162 ++++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L151-L162 It's expecting to fail if the signer is not the admin of the group policy. @@ -64,7 +72,7 @@ It's expecting to fail if the signer is not the admin of the group policy. The `UpdateGroupPolicyDecisionPolicy` can be used to update a decision policy. -+++ https://github.com/cosmos/cosmos-sdk/blob/6f58963e7f6ce820e9b33f02f06f7b96f6d2e347/proto/cosmos/group/v1beta1/tx.proto#L167-L179 ++++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L167-L179 It's expecting to fail if the signer is not the admin of the group policy. @@ -72,7 +80,7 @@ It's expecting to fail if the signer is not the admin of the group policy. The `UpdateGroupPolicyMetadata` can be used to update a group policy metadata. -+++ https://github.com/cosmos/cosmos-sdk/blob/6f58963e7f6ce820e9b33f02f06f7b96f6d2e347/proto/cosmos/group/v1beta1/tx.proto#L184-L195 ++++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L184-L195 It's expecting to fail if: @@ -84,7 +92,7 @@ It's expecting to fail if: A new proposal can be created with the `MsgCreateProposal`, which has a group policy account address, a list of proposers addresses, a list of messages to execute if the proposal is accepted and some optional metadata bytes. An optional `Exec` value can be provided to try to execute the proposal immediately after proposal creation. Proposers signatures are considered as yes votes in this case. -+++ https://github.com/cosmos/cosmos-sdk/blob/6f58963e7f6ce820e9b33f02f06f7b96f6d2e347/proto/cosmos/group/v1beta1/tx.proto#L218-L239 ++++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L218-L239 It's expecting to fail if metadata length is greater than `MaxMetadataLen` config. @@ -104,7 +112,7 @@ It's expecting to fail if: A new vote can be created with the `MsgVote`, given a proposal id, a voter address, a choice (yes, no, veto or abstain) and some optional metadata bytes. An optional `Exec` value can be provided to try to execute the proposal immediately after voting. -+++ https://github.com/cosmos/cosmos-sdk/blob/6f58963e7f6ce820e9b33f02f06f7b96f6d2e347/proto/cosmos/group/v1beta1/tx.proto#L248-L265 ++++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L248-L265 It's expecting to fail if metadata length is greater than `MaxMetadataLen` config. @@ -112,7 +120,7 @@ It's expecting to fail if metadata length is greater than `MaxMetadataLen` confi A proposal can be executed with the `MsgExec`. -+++ https://github.com/cosmos/cosmos-sdk/blob/6f58963e7f6ce820e9b33f02f06f7b96f6d2e347/proto/cosmos/group/v1beta1/tx.proto#L270-L278 ++++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L270-L278 The messages that are part of this proposal won't be executed if: diff --git a/x/group/spec/05_client.md b/x/group/spec/05_client.md index b4831376c8..6ff27cff81 100644 --- a/x/group/spec/05_client.md +++ b/x/group/spec/05_client.md @@ -467,6 +467,21 @@ Example: simd tx group create-group-policy cosmos1.. 1 "AQ==" '{"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy", "threshold":"1", "timeout":"600s"}' ``` + +#### create-group-with-policy + +The `create-group-with-policy` command allows users to create a group which is an aggregation of member accounts with associated weights and an administrator account with decision policy. If the `--group-policy-as-admin` flag is set to `true`, the group policy address becomes the group and group policy admin. + +```bash +simd tx group create-group-with-policy [admin] [group-metadata] [group-policy-metadata] [members-json-file] [decision-policy] [flags] +``` + +Example: + +```bash +simd tx group create-group-with-policy cosmos1.. "AQ==" "AQ==" members.json '{"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy", "threshold":"1", "timeout":"600s"}' +``` + #### update-group-policy-admin The `update-group-policy-admin` command allows users to update a group policy admin. diff --git a/x/group/spec/README.md b/x/group/spec/README.md index a8e69b5596..a97a12fe72 100644 --- a/x/group/spec/README.md +++ b/x/group/spec/README.md @@ -16,12 +16,13 @@ This module allows the creation and management of on-chain multisig accounts and ## Contents 1. **[Concepts](01_concepts.md)** - * [Group](01_concepts.md#group) - * [Group Policy](01_concepts.md#group-policy) - * [Decision Policy](01_concepts.md#decision-policy) - * [Proposal](01_concepts.md#proposal) - * [Voting](01_concepts.md#voting) - * [Executing Proposals](01_concepts.md#executing-proposals) + - [Group](01_concepts.md#group) + - [Group Policy](01_concepts.md#group-policy) + - [Group With Policy](01_concepts.md#group-with-policy) + - [Decision Policy](01_concepts.md#decision-policy) + - [Proposal](01_concepts.md#proposal) + - [Voting](01_concepts.md#voting) + - [Executing Proposals](01_concepts.md#executing-proposals) 2. **[State](02_state.md)** * [Group Table](02_state.md#group-table) * [Group Member Table](02_state.md#group-member-table) @@ -29,18 +30,19 @@ This module allows the creation and management of on-chain multisig accounts and * [Proposal](02_state.md#proposal-table) * [Vote Table](02_state.md#vote-table) 3. **[Msg Service](03_messages.md)** - * [Msg/CreateGroup](03_messages.md#msgcreategroup) - * [Msg/UpdateGroupMembers](03_messages.md#msgupdategroupmembers) - * [Msg/UpdateGroupAdmin](03_messages.md#msgupdategroupadmin) - * [Msg/UpdateGroupMetadata](03_messages.md#msgupdategroupmetadata) - * [Msg/CreateGroupPolicy](03_messages.md#msgcreategrouppolicy) - * [Msg/UpdateGroupPolicyAdmin](03_messages.md#msgupdategrouppolicyadmin) - * [Msg/UpdateGroupPolicyDecisionPolicy](03_messages.md#msgupdategrouppolicydecisionpolicy) - * [Msg/UpdateGroupPolicyMetadata](03_messages.md#msgupdategrouppolicymetadata) - * [Msg/CreateProposal](03_messages.md#msgcreateproposal) - * [Msg/WithdrawProposal](03_messages.md#msgwithdrawproposal) - * [Msg/Vote](03_messages.md#msgvote) - * [Msg/Exec](03_messages.md#msgexec) + - [Msg/CreateGroup](03_messages.md#msgcreategroup) + - [Msg/UpdateGroupMembers](03_messages.md#msgupdategroupmembers) + - [Msg/UpdateGroupAdmin](03_messages.md#msgupdategroupadmin) + - [Msg/UpdateGroupMetadata](03_messages.md#msgupdategroupmetadata) + - [Msg/CreateGroupPolicy](03_messages.md#msgcreategrouppolicy) + - [Msg/CreateGroupWithPolicy](03_messages.md#msgcreategroupwithpolicy) + - [Msg/UpdateGroupPolicyAdmin](03_messages.md#msgupdategrouppolicyadmin) + - [Msg/UpdateGroupPolicyDecisionPolicy](03_messages.md#msgupdategrouppolicydecisionpolicy) + - [Msg/UpdateGroupPolicyMetadata](03_messages.md#msgupdategrouppolicymetadata) + - [Msg/CreateProposal](03_messages.md#msgcreateproposal) + - [Msg/WithdrawProposal](03_messages.md#msgwithdrawproposal) + - [Msg/Vote](03_messages.md#msgvote) + - [Msg/Exec](03_messages.md#msgexec) 4. **[Events](04_events.md)** * [EventCreateGroup](04_events.md#eventcreategroup) * [EventUpdateGroup](04_events.md#eventupdategroup) diff --git a/x/group/tx.pb.go b/x/group/tx.pb.go index 2ee4783312..377615274d 100644 --- a/x/group/tx.pb.go +++ b/x/group/tx.pb.go @@ -632,6 +632,110 @@ func (m *MsgUpdateGroupPolicyAdmin) GetNewAdmin() string { return "" } +// MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. +type MsgCreateGroupWithPolicy struct { + // admin is the account address of the group and group policy admin. + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + // members defines the group members. + Members []Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members"` + // group_metadata is any arbitrary metadata attached to the group. + GroupMetadata []byte `protobuf:"bytes,3,opt,name=group_metadata,json=groupMetadata,proto3" json:"group_metadata,omitempty"` + // group_policy_metadata is any arbitrary metadata attached to the group policy. + GroupPolicyMetadata []byte `protobuf:"bytes,4,opt,name=group_policy_metadata,json=groupPolicyMetadata,proto3" json:"group_policy_metadata,omitempty"` + // group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group and group policy admin. + GroupPolicyAsAdmin bool `protobuf:"varint,5,opt,name=group_policy_as_admin,json=groupPolicyAsAdmin,proto3" json:"group_policy_as_admin,omitempty"` + // decision_policy specifies the group policy's decision policy. + DecisionPolicy *types.Any `protobuf:"bytes,6,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` +} + +func (m *MsgCreateGroupWithPolicy) Reset() { *m = MsgCreateGroupWithPolicy{} } +func (m *MsgCreateGroupWithPolicy) String() string { return proto.CompactTextString(m) } +func (*MsgCreateGroupWithPolicy) ProtoMessage() {} +func (*MsgCreateGroupWithPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{11} +} +func (m *MsgCreateGroupWithPolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateGroupWithPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateGroupWithPolicy.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 *MsgCreateGroupWithPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateGroupWithPolicy.Merge(m, src) +} +func (m *MsgCreateGroupWithPolicy) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateGroupWithPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateGroupWithPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateGroupWithPolicy proto.InternalMessageInfo + +// MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. +type MsgCreateGroupWithPolicyResponse struct { + // group_id is the unique ID of the newly created group with policy. + GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // group_policy_address is the account address of the newly created group policy. + GroupPolicyAddress string `protobuf:"bytes,2,opt,name=group_policy_address,json=groupPolicyAddress,proto3" json:"group_policy_address,omitempty"` +} + +func (m *MsgCreateGroupWithPolicyResponse) Reset() { *m = MsgCreateGroupWithPolicyResponse{} } +func (m *MsgCreateGroupWithPolicyResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateGroupWithPolicyResponse) ProtoMessage() {} +func (*MsgCreateGroupWithPolicyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{12} +} +func (m *MsgCreateGroupWithPolicyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateGroupWithPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateGroupWithPolicyResponse.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 *MsgCreateGroupWithPolicyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateGroupWithPolicyResponse.Merge(m, src) +} +func (m *MsgCreateGroupWithPolicyResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateGroupWithPolicyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateGroupWithPolicyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateGroupWithPolicyResponse proto.InternalMessageInfo + +func (m *MsgCreateGroupWithPolicyResponse) GetGroupId() uint64 { + if m != nil { + return m.GroupId + } + return 0 +} + +func (m *MsgCreateGroupWithPolicyResponse) GetGroupPolicyAddress() string { + if m != nil { + return m.GroupPolicyAddress + } + return "" +} + // MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. type MsgUpdateGroupPolicyAdminResponse struct { } @@ -640,7 +744,7 @@ func (m *MsgUpdateGroupPolicyAdminResponse) Reset() { *m = MsgUpdateGrou func (m *MsgUpdateGroupPolicyAdminResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateGroupPolicyAdminResponse) ProtoMessage() {} func (*MsgUpdateGroupPolicyAdminResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{11} + return fileDescriptor_da0de9d603d844fb, []int{13} } func (m *MsgUpdateGroupPolicyAdminResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -683,7 +787,7 @@ func (m *MsgUpdateGroupPolicyDecisionPolicy) Reset() { *m = MsgUpdateGro func (m *MsgUpdateGroupPolicyDecisionPolicy) String() string { return proto.CompactTextString(m) } func (*MsgUpdateGroupPolicyDecisionPolicy) ProtoMessage() {} func (*MsgUpdateGroupPolicyDecisionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{12} + return fileDescriptor_da0de9d603d844fb, []int{14} } func (m *MsgUpdateGroupPolicyDecisionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -724,7 +828,7 @@ func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) String() string { } func (*MsgUpdateGroupPolicyDecisionPolicyResponse) ProtoMessage() {} func (*MsgUpdateGroupPolicyDecisionPolicyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{13} + return fileDescriptor_da0de9d603d844fb, []int{15} } func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -767,7 +871,7 @@ func (m *MsgUpdateGroupPolicyMetadata) Reset() { *m = MsgUpdateGroupPoli func (m *MsgUpdateGroupPolicyMetadata) String() string { return proto.CompactTextString(m) } func (*MsgUpdateGroupPolicyMetadata) ProtoMessage() {} func (*MsgUpdateGroupPolicyMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{14} + return fileDescriptor_da0de9d603d844fb, []int{16} } func (m *MsgUpdateGroupPolicyMetadata) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -825,7 +929,7 @@ func (m *MsgUpdateGroupPolicyMetadataResponse) Reset() { *m = MsgUpdateG func (m *MsgUpdateGroupPolicyMetadataResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateGroupPolicyMetadataResponse) ProtoMessage() {} func (*MsgUpdateGroupPolicyMetadataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{15} + return fileDescriptor_da0de9d603d844fb, []int{17} } func (m *MsgUpdateGroupPolicyMetadataResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -875,7 +979,7 @@ func (m *MsgSubmitProposal) Reset() { *m = MsgSubmitProposal{} } func (m *MsgSubmitProposal) String() string { return proto.CompactTextString(m) } func (*MsgSubmitProposal) ProtoMessage() {} func (*MsgSubmitProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{16} + return fileDescriptor_da0de9d603d844fb, []int{18} } func (m *MsgSubmitProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -914,7 +1018,7 @@ func (m *MsgSubmitProposalResponse) Reset() { *m = MsgSubmitProposalResp func (m *MsgSubmitProposalResponse) String() string { return proto.CompactTextString(m) } func (*MsgSubmitProposalResponse) ProtoMessage() {} func (*MsgSubmitProposalResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{17} + return fileDescriptor_da0de9d603d844fb, []int{19} } func (m *MsgSubmitProposalResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -962,7 +1066,7 @@ func (m *MsgWithdrawProposal) Reset() { *m = MsgWithdrawProposal{} } func (m *MsgWithdrawProposal) String() string { return proto.CompactTextString(m) } func (*MsgWithdrawProposal) ProtoMessage() {} func (*MsgWithdrawProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{18} + return fileDescriptor_da0de9d603d844fb, []int{20} } func (m *MsgWithdrawProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1013,7 +1117,7 @@ func (m *MsgWithdrawProposalResponse) Reset() { *m = MsgWithdrawProposal func (m *MsgWithdrawProposalResponse) String() string { return proto.CompactTextString(m) } func (*MsgWithdrawProposalResponse) ProtoMessage() {} func (*MsgWithdrawProposalResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{19} + return fileDescriptor_da0de9d603d844fb, []int{21} } func (m *MsgWithdrawProposalResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1061,7 +1165,7 @@ func (m *MsgVote) Reset() { *m = MsgVote{} } func (m *MsgVote) String() string { return proto.CompactTextString(m) } func (*MsgVote) ProtoMessage() {} func (*MsgVote) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{20} + return fileDescriptor_da0de9d603d844fb, []int{22} } func (m *MsgVote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1133,7 +1237,7 @@ func (m *MsgVoteResponse) Reset() { *m = MsgVoteResponse{} } func (m *MsgVoteResponse) String() string { return proto.CompactTextString(m) } func (*MsgVoteResponse) ProtoMessage() {} func (*MsgVoteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{21} + return fileDescriptor_da0de9d603d844fb, []int{23} } func (m *MsgVoteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1174,7 +1278,7 @@ func (m *MsgExec) Reset() { *m = MsgExec{} } func (m *MsgExec) String() string { return proto.CompactTextString(m) } func (*MsgExec) ProtoMessage() {} func (*MsgExec) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{22} + return fileDescriptor_da0de9d603d844fb, []int{24} } func (m *MsgExec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1225,7 +1329,7 @@ func (m *MsgExecResponse) Reset() { *m = MsgExecResponse{} } func (m *MsgExecResponse) String() string { return proto.CompactTextString(m) } func (*MsgExecResponse) ProtoMessage() {} func (*MsgExecResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{23} + return fileDescriptor_da0de9d603d844fb, []int{25} } func (m *MsgExecResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1267,6 +1371,8 @@ func init() { proto.RegisterType((*MsgCreateGroupPolicy)(nil), "cosmos.group.v1beta1.MsgCreateGroupPolicy") proto.RegisterType((*MsgCreateGroupPolicyResponse)(nil), "cosmos.group.v1beta1.MsgCreateGroupPolicyResponse") proto.RegisterType((*MsgUpdateGroupPolicyAdmin)(nil), "cosmos.group.v1beta1.MsgUpdateGroupPolicyAdmin") + proto.RegisterType((*MsgCreateGroupWithPolicy)(nil), "cosmos.group.v1beta1.MsgCreateGroupWithPolicy") + proto.RegisterType((*MsgCreateGroupWithPolicyResponse)(nil), "cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse") proto.RegisterType((*MsgUpdateGroupPolicyAdminResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupPolicyAdminResponse") proto.RegisterType((*MsgUpdateGroupPolicyDecisionPolicy)(nil), "cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicy") proto.RegisterType((*MsgUpdateGroupPolicyDecisionPolicyResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicyResponse") @@ -1285,76 +1391,82 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1beta1/tx.proto", fileDescriptor_da0de9d603d844fb) } var fileDescriptor_da0de9d603d844fb = []byte{ - // 1089 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0xc4, 0x6e, 0x7e, 0xbc, 0x14, 0x37, 0xd9, 0x86, 0xe2, 0x2c, 0x89, 0x63, 0x4c, 0x00, - 0x63, 0x92, 0xdd, 0xc6, 0x01, 0x51, 0x59, 0x15, 0x22, 0x49, 0x0d, 0xb2, 0x84, 0x21, 0x6c, 0x28, - 0xbf, 0x2e, 0xd6, 0xda, 0x3b, 0x6c, 0xb7, 0xc4, 0x9e, 0x95, 0x67, 0x9d, 0xc4, 0xd7, 0x9e, 0x90, - 0x7a, 0xe1, 0x1f, 0x40, 0x42, 0x42, 0xe2, 0xc0, 0x89, 0x43, 0x2f, 0x5c, 0x39, 0x55, 0x9c, 0x2a, - 0x4e, 0x9c, 0x50, 0x95, 0x1c, 0x38, 0x80, 0xc4, 0x91, 0x2b, 0xda, 0x99, 0xdd, 0x89, 0x37, 0xde, - 0xb5, 0xd7, 0x56, 0xd4, 0x53, 0x32, 0x3b, 0xdf, 0x7b, 0xef, 0xfb, 0xde, 0x7b, 0x33, 0x6f, 0x64, - 0x58, 0x6d, 0x12, 0xda, 0x22, 0x54, 0x35, 0x3b, 0xa4, 0x6b, 0xab, 0x47, 0x5b, 0x0d, 0xec, 0xe8, - 0x5b, 0xaa, 0x73, 0xa2, 0xd8, 0x1d, 0xe2, 0x10, 0x69, 0x89, 0x6f, 0x2b, 0x6c, 0x5b, 0xf1, 0xb6, - 0xe5, 0x25, 0x93, 0x98, 0x84, 0x01, 0x54, 0xf7, 0x3f, 0x8e, 0x95, 0x97, 0x39, 0xb6, 0xce, 0x37, - 0x3c, 0x43, 0x6f, 0xcb, 0x24, 0xc4, 0x3c, 0xc4, 0x2a, 0x5b, 0x35, 0xba, 0x5f, 0xa9, 0x7a, 0xbb, - 0xe7, 0x6d, 0xe5, 0xc2, 0x09, 0xf4, 0x6c, 0xec, 0x1b, 0xbf, 0xe0, 0x21, 0x5a, 0xd4, 0x54, 0x8f, - 0xb6, 0xdc, 0x3f, 0x7c, 0x23, 0xff, 0x23, 0x82, 0x74, 0x8d, 0x9a, 0x7b, 0x1d, 0xac, 0x3b, 0xf8, - 0x7d, 0xd7, 0x5e, 0x52, 0xe0, 0x8a, 0x6e, 0xb4, 0xac, 0x76, 0x06, 0xe5, 0x50, 0x61, 0x6e, 0x37, - 0xf3, 0xfb, 0xa3, 0x4d, 0x5f, 0xc2, 0x8e, 0x61, 0x74, 0x30, 0xa5, 0x07, 0x4e, 0xc7, 0x6a, 0x9b, - 0x1a, 0x87, 0x49, 0xb7, 0x61, 0xa6, 0x85, 0x5b, 0x0d, 0xdc, 0xa1, 0x99, 0xa9, 0x5c, 0xb2, 0x30, - 0x5f, 0x5a, 0x51, 0xc2, 0x14, 0x2b, 0x35, 0x06, 0xda, 0x4d, 0x3d, 0xfe, 0x73, 0x2d, 0xa1, 0xf9, - 0x26, 0x92, 0x0c, 0xb3, 0x2d, 0xec, 0xe8, 0x86, 0xee, 0xe8, 0x99, 0x64, 0x0e, 0x15, 0xae, 0x6a, - 0x62, 0x5d, 0x86, 0x07, 0x7f, 0xfd, 0x5c, 0xe4, 0x51, 0xf2, 0xdb, 0x70, 0x23, 0xc8, 0x53, 0xc3, - 0xd4, 0x26, 0x6d, 0x8a, 0xa5, 0x65, 0x98, 0x65, 0x81, 0xea, 0x96, 0xc1, 0x28, 0xa7, 0xb4, 0x19, - 0xb6, 0xae, 0x1a, 0xf9, 0x5f, 0x10, 0x3c, 0x5f, 0xa3, 0xe6, 0x5d, 0xdb, 0xf0, 0xad, 0x6a, 0x5e, - 0xd8, 0x71, 0x45, 0xf6, 0x07, 0x99, 0x0a, 0x04, 0x91, 0xaa, 0x90, 0xe6, 0x62, 0xea, 0x5d, 0x16, - 0x87, 0x66, 0x92, 0xb1, 0xd3, 0xf0, 0x1c, 0xb7, 0xe4, 0x04, 0x69, 0x40, 0xf0, 0x1a, 0xac, 0x86, - 0x52, 0xf7, 0x75, 0xe7, 0x7f, 0x40, 0x70, 0x3d, 0x88, 0xd8, 0x61, 0x54, 0x2f, 0x51, 0xda, 0x5b, - 0x30, 0xd7, 0xc6, 0xc7, 0x75, 0xee, 0x2e, 0x39, 0xc2, 0xdd, 0x6c, 0x1b, 0x1f, 0x33, 0x06, 0x01, - 0x19, 0xab, 0xf0, 0x62, 0x08, 0x49, 0x21, 0xe2, 0x21, 0x62, 0x75, 0x0d, 0xc8, 0xe4, 0xd5, 0xbf, - 0x4c, 0x1d, 0x71, 0x9b, 0x2c, 0x07, 0xd9, 0x70, 0x32, 0x82, 0xef, 0x53, 0x04, 0x4b, 0xc1, 0x3e, - 0xdc, 0x27, 0x87, 0x56, 0xb3, 0xf7, 0x8c, 0xd8, 0x4a, 0x1f, 0xc3, 0x35, 0x03, 0x37, 0x2d, 0x6a, - 0x91, 0x76, 0xdd, 0x66, 0x91, 0x33, 0xa9, 0x1c, 0x2a, 0xcc, 0x97, 0x96, 0x14, 0x7e, 0x3f, 0x28, - 0xfe, 0xfd, 0xa0, 0xec, 0xb4, 0x7b, 0xbb, 0xd2, 0x6f, 0x8f, 0x36, 0xd3, 0x77, 0x3c, 0x03, 0xce, - 0x54, 0x4b, 0x1b, 0x81, 0x75, 0x39, 0xfd, 0xcd, 0xf7, 0x6b, 0x89, 0xbe, 0x24, 0x68, 0xb0, 0x12, - 0xa6, 0x50, 0x9c, 0xb7, 0x12, 0xcc, 0xe8, 0x5c, 0xd1, 0x48, 0xad, 0x3e, 0x30, 0xff, 0x2b, 0x82, - 0xe5, 0x60, 0x66, 0xb9, 0xd3, 0xc9, 0x3a, 0xb6, 0x8f, 0xc1, 0x54, 0x4c, 0x06, 0x97, 0xd1, 0xca, - 0x2f, 0xc3, 0x4b, 0x91, 0x1a, 0x44, 0x83, 0xfc, 0x8d, 0x20, 0x1f, 0x86, 0x0a, 0x16, 0xe1, 0x99, - 0x48, 0x0e, 0xe9, 0x95, 0xe4, 0x25, 0xf7, 0xca, 0x06, 0x14, 0x47, 0x8b, 0x15, 0xb9, 0xf9, 0x09, - 0xb1, 0xd6, 0x1a, 0x80, 0x4f, 0x7c, 0xe4, 0x27, 0xc9, 0x4a, 0xdc, 0xbb, 0xe0, 0x55, 0x58, 0x1f, - 0xc6, 0x55, 0x88, 0xfa, 0x0f, 0xc1, 0x62, 0x8d, 0x9a, 0x07, 0xdd, 0x46, 0xcb, 0x72, 0xf6, 0x3b, - 0xc4, 0x26, 0x54, 0x3f, 0x9c, 0xe4, 0x90, 0x48, 0x2b, 0x30, 0x67, 0x33, 0x7b, 0x7f, 0x94, 0xce, - 0x69, 0xe7, 0x1f, 0x86, 0xde, 0x0a, 0x37, 0xdd, 0x3d, 0x4a, 0x75, 0x13, 0xd3, 0x4c, 0x8a, 0x0d, - 0x9f, 0xd0, 0x12, 0x6b, 0x02, 0x25, 0x29, 0x90, 0xc2, 0x27, 0xb8, 0x99, 0xb9, 0x92, 0x43, 0x85, - 0x74, 0x49, 0x0e, 0x1f, 0x55, 0x95, 0x13, 0xdc, 0xd4, 0x18, 0xae, 0x2c, 0xf9, 0x85, 0x3f, 0x67, - 0x94, 0xbf, 0xcd, 0xce, 0x74, 0x50, 0xb8, 0xb8, 0x25, 0xd6, 0x60, 0xde, 0xf6, 0xbe, 0x9d, 0x0f, - 0x66, 0xf0, 0x3f, 0x55, 0x8d, 0xfc, 0x7d, 0x36, 0xbd, 0x3e, 0xb3, 0x9c, 0x7b, 0x46, 0x47, 0x3f, - 0x16, 0x89, 0x1b, 0x65, 0x37, 0x49, 0xcd, 0xbd, 0x21, 0x74, 0x31, 0x96, 0x28, 0xe1, 0x3f, 0x08, - 0x66, 0x6a, 0xd4, 0xfc, 0x94, 0x38, 0xa3, 0x79, 0xbb, 0x3d, 0x7a, 0x44, 0x1c, 0xdc, 0x19, 0x19, - 0x9d, 0xc3, 0xa4, 0x5b, 0x30, 0x4d, 0x6c, 0xc7, 0x22, 0xfc, 0xd6, 0x49, 0x97, 0x72, 0xe1, 0xb9, - 0x76, 0x83, 0x7f, 0xc4, 0x70, 0x9a, 0x87, 0x0f, 0x54, 0x3c, 0x75, 0xa1, 0xe2, 0xe3, 0xd6, 0x8f, - 0x77, 0x36, 0x63, 0x94, 0x5f, 0x84, 0x6b, 0x9e, 0x5a, 0x91, 0x01, 0x8b, 0x25, 0xc0, 0xc5, 0x8f, - 0x4e, 0xc0, 0x4d, 0x98, 0xa6, 0x96, 0xd9, 0x8e, 0x91, 0x01, 0x0f, 0x57, 0x9e, 0x77, 0x83, 0x7b, - 0x0b, 0x2f, 0x3a, 0xa3, 0xe6, 0x45, 0x2f, 0x16, 0x21, 0xc5, 0x42, 0x2f, 0xc1, 0x42, 0xe5, 0xf3, - 0xca, 0x5e, 0xfd, 0xee, 0x87, 0x07, 0xfb, 0x95, 0xbd, 0xea, 0x7b, 0xd5, 0xca, 0x9d, 0x85, 0x84, - 0x74, 0x15, 0x66, 0xd9, 0xd7, 0x4f, 0xb4, 0x2f, 0x16, 0x50, 0xe9, 0x5f, 0x80, 0x64, 0x8d, 0x9a, - 0x92, 0x0e, 0xf3, 0xfd, 0x8f, 0xd6, 0xf5, 0x88, 0xc7, 0x56, 0x60, 0x90, 0xc9, 0x1b, 0x71, 0x50, - 0xa2, 0x85, 0x8f, 0x40, 0x0a, 0x79, 0x39, 0xbe, 0x11, 0xe9, 0x63, 0x10, 0x2c, 0x6f, 0x8f, 0x01, - 0x16, 0x71, 0x6d, 0x58, 0x18, 0x78, 0xd4, 0xbd, 0x1e, 0xc7, 0x11, 0x83, 0xca, 0x5b, 0xb1, 0xa1, - 0x22, 0x62, 0x0f, 0xae, 0x87, 0xbd, 0xc0, 0x36, 0xe2, 0xb1, 0xe7, 0x68, 0xf9, 0xcd, 0x71, 0xd0, - 0x22, 0x34, 0x85, 0xc5, 0xc1, 0xc7, 0x54, 0x31, 0x4e, 0x9d, 0x38, 0x56, 0x2e, 0xc5, 0xc7, 0x8a, - 0xa0, 0x0f, 0x10, 0xdc, 0x88, 0x78, 0x8b, 0xa8, 0x71, 0x54, 0xf4, 0x19, 0xc8, 0x6f, 0x8f, 0x69, - 0x20, 0x48, 0x7c, 0x87, 0x60, 0x6d, 0xd4, 0x33, 0xe1, 0x56, 0x7c, 0xe7, 0x41, 0x4b, 0xf9, 0xdd, - 0x49, 0x2d, 0x05, 0xbf, 0x87, 0x08, 0x96, 0xa3, 0x47, 0x75, 0x29, 0xbe, 0x7f, 0xd1, 0x21, 0xe5, - 0xf1, 0x6d, 0x04, 0x9b, 0xfb, 0x90, 0xbe, 0x30, 0x62, 0x5f, 0x8b, 0xf4, 0x16, 0x04, 0xca, 0x6a, - 0x4c, 0x60, 0xff, 0x01, 0x1c, 0x98, 0x4b, 0xd1, 0x07, 0xf0, 0x22, 0x74, 0xc8, 0x01, 0x8c, 0x9a, - 0x40, 0xd2, 0x07, 0x90, 0x62, 0xd3, 0x67, 0x35, 0xd2, 0xd4, 0xdd, 0x96, 0x5f, 0x19, 0xba, 0xdd, - 0xef, 0x8d, 0xdd, 0xa7, 0xd1, 0xde, 0xdc, 0xed, 0x21, 0xde, 0xfa, 0x6f, 0xe7, 0xdd, 0x77, 0x1e, - 0x9f, 0x66, 0xd1, 0x93, 0xd3, 0x2c, 0x7a, 0x7a, 0x9a, 0x45, 0xdf, 0x9e, 0x65, 0x13, 0x4f, 0xce, - 0xb2, 0x89, 0x3f, 0xce, 0xb2, 0x89, 0x2f, 0xd7, 0x4d, 0xcb, 0xb9, 0xd7, 0x6d, 0x28, 0x4d, 0xd2, - 0xf2, 0x7e, 0xab, 0xf0, 0xfe, 0x6c, 0x52, 0xe3, 0x6b, 0xf5, 0x84, 0xff, 0x1e, 0xd1, 0x98, 0x66, - 0x4f, 0x90, 0xed, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x9f, 0x5f, 0xcd, 0x27, 0x11, 0x00, - 0x00, + // 1199 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0xe3, 0x44, + 0x14, 0xcf, 0x34, 0xde, 0x7e, 0xbc, 0xec, 0x66, 0xbb, 0x6e, 0xba, 0xa4, 0xa6, 0x4d, 0x83, 0xe9, + 0x42, 0x29, 0xad, 0xbd, 0x4d, 0xf9, 0x58, 0x55, 0x2b, 0x44, 0xdb, 0x0d, 0x28, 0x88, 0x40, 0x71, + 0x59, 0xbe, 0x2e, 0x91, 0x13, 0x1b, 0xaf, 0x97, 0x26, 0xb6, 0x32, 0x4e, 0xdb, 0x9c, 0x90, 0xf6, + 0x04, 0xda, 0x0b, 0xff, 0x00, 0x12, 0x12, 0x12, 0x07, 0x4e, 0x1c, 0xf6, 0xc2, 0x95, 0xd3, 0x8a, + 0xd3, 0x8a, 0x13, 0x27, 0xb4, 0x6a, 0x0f, 0x1c, 0x40, 0x82, 0x1b, 0x57, 0xe4, 0x19, 0x7b, 0x12, + 0x27, 0x76, 0xe2, 0x64, 0xab, 0x3d, 0x25, 0xf6, 0xfc, 0xde, 0x7b, 0xbf, 0xdf, 0x7b, 0x6f, 0xde, + 0x4c, 0x02, 0x4b, 0x35, 0x0b, 0xd7, 0x2d, 0x2c, 0x1b, 0x4d, 0xab, 0x65, 0xcb, 0x47, 0x9b, 0x55, + 0xdd, 0x51, 0x37, 0x65, 0xe7, 0x44, 0xb2, 0x9b, 0x96, 0x63, 0xf1, 0x19, 0xba, 0x2c, 0x91, 0x65, + 0xc9, 0x5b, 0x16, 0x32, 0x86, 0x65, 0x58, 0x04, 0x20, 0xbb, 0xdf, 0x28, 0x56, 0x58, 0xa0, 0xd8, + 0x0a, 0x5d, 0xf0, 0x0c, 0xbd, 0x25, 0xc3, 0xb2, 0x8c, 0x43, 0x5d, 0x26, 0x4f, 0xd5, 0xd6, 0xe7, + 0xb2, 0xda, 0x68, 0x7b, 0x4b, 0xf9, 0x70, 0x02, 0x6d, 0x5b, 0xf7, 0x8d, 0x9f, 0xf1, 0x10, 0x75, + 0x6c, 0xc8, 0x47, 0x9b, 0xee, 0x07, 0x5d, 0x10, 0x7f, 0x40, 0x90, 0x2e, 0x63, 0x63, 0xaf, 0xa9, + 0xab, 0x8e, 0xfe, 0xb6, 0x6b, 0xcf, 0x4b, 0x70, 0x41, 0xd5, 0xea, 0x66, 0x23, 0x8b, 0xf2, 0x68, + 0x75, 0x66, 0x37, 0xfb, 0xdb, 0x83, 0x0d, 0x5f, 0xc2, 0x8e, 0xa6, 0x35, 0x75, 0x8c, 0x0f, 0x9c, + 0xa6, 0xd9, 0x30, 0x14, 0x0a, 0xe3, 0x6f, 0xc2, 0x54, 0x5d, 0xaf, 0x57, 0xf5, 0x26, 0xce, 0x4e, + 0xe4, 0x93, 0xab, 0xa9, 0xc2, 0xa2, 0x14, 0xa6, 0x58, 0x2a, 0x13, 0xd0, 0x2e, 0xf7, 0xf0, 0x8f, + 0xe5, 0x84, 0xe2, 0x9b, 0xf0, 0x02, 0x4c, 0xd7, 0x75, 0x47, 0xd5, 0x54, 0x47, 0xcd, 0x26, 0xf3, + 0x68, 0xf5, 0xa2, 0xc2, 0x9e, 0xb7, 0xe1, 0xde, 0x9f, 0x3f, 0xad, 0xd1, 0x28, 0xe2, 0x16, 0x5c, + 0x0d, 0xf2, 0x54, 0x74, 0x6c, 0x5b, 0x0d, 0xac, 0xf3, 0x0b, 0x30, 0x4d, 0x02, 0x55, 0x4c, 0x8d, + 0x50, 0xe6, 0x94, 0x29, 0xf2, 0x5c, 0xd2, 0xc4, 0x9f, 0x11, 0xcc, 0x97, 0xb1, 0x71, 0xdb, 0xd6, + 0x7c, 0xab, 0xb2, 0x17, 0x76, 0x54, 0x91, 0xdd, 0x41, 0x26, 0x02, 0x41, 0xf8, 0x12, 0xa4, 0xa9, + 0x98, 0x4a, 0x8b, 0xc4, 0xc1, 0xd9, 0x64, 0xec, 0x34, 0x5c, 0xa2, 0x96, 0x94, 0x20, 0x0e, 0x08, + 0x5e, 0x86, 0xa5, 0x50, 0xea, 0xbe, 0x6e, 0xf1, 0x7b, 0x04, 0x73, 0x41, 0xc4, 0x0e, 0xa1, 0x7a, + 0x8e, 0xd2, 0x5e, 0x85, 0x99, 0x86, 0x7e, 0x5c, 0xa1, 0xee, 0x92, 0x43, 0xdc, 0x4d, 0x37, 0xf4, + 0x63, 0xc2, 0x20, 0x20, 0x63, 0x09, 0x9e, 0x0d, 0x21, 0xc9, 0x44, 0xdc, 0x47, 0xa4, 0xae, 0x01, + 0x99, 0xb4, 0xfa, 0xe7, 0xa9, 0x23, 0x6e, 0x93, 0xe5, 0x21, 0x17, 0x4e, 0x86, 0xf1, 0x7d, 0x8c, + 0x20, 0x13, 0xec, 0xc3, 0x7d, 0xeb, 0xd0, 0xac, 0xb5, 0x9f, 0x12, 0x5b, 0xfe, 0x03, 0xb8, 0xac, + 0xe9, 0x35, 0x13, 0x9b, 0x56, 0xa3, 0x62, 0x93, 0xc8, 0x59, 0x2e, 0x8f, 0x56, 0x53, 0x85, 0x8c, + 0x44, 0xe7, 0x83, 0xe4, 0xcf, 0x07, 0x69, 0xa7, 0xd1, 0xde, 0xe5, 0x7f, 0x7d, 0xb0, 0x91, 0xbe, + 0xe5, 0x19, 0x50, 0xa6, 0x4a, 0x5a, 0x0b, 0x3c, 0x6f, 0xa7, 0xbf, 0xfa, 0x6e, 0x39, 0xd1, 0x95, + 0x04, 0x05, 0x16, 0xc3, 0x14, 0xb2, 0xfd, 0x56, 0x80, 0x29, 0x95, 0x2a, 0x1a, 0xaa, 0xd5, 0x07, + 0x8a, 0xbf, 0x20, 0x58, 0x08, 0x66, 0x96, 0x3a, 0x1d, 0xaf, 0x63, 0xbb, 0x18, 0x4c, 0xc4, 0x64, + 0x70, 0x1e, 0xad, 0xfc, 0xcf, 0x04, 0x64, 0x83, 0x99, 0xf9, 0xd8, 0x74, 0xee, 0x8c, 0x59, 0xff, + 0x27, 0x9b, 0x9a, 0xd7, 0x20, 0x4d, 0xbb, 0xa7, 0xa7, 0x51, 0x2e, 0x19, 0x81, 0x2d, 0x54, 0x80, + 0x79, 0x0a, 0xa3, 0xad, 0xd2, 0x41, 0x73, 0x04, 0x3d, 0x67, 0x74, 0x2a, 0xc1, 0x6c, 0x36, 0x7b, + 0x6c, 0x54, 0xec, 0x25, 0xed, 0x42, 0x1e, 0xad, 0x4e, 0x2b, 0x7c, 0x97, 0xcd, 0x0e, 0xa6, 0xf5, + 0x0b, 0x69, 0xca, 0xc9, 0x27, 0x6c, 0x4a, 0xce, 0x6d, 0x4a, 0xf1, 0x6b, 0x04, 0xf9, 0xa8, 0x8c, + 0xc7, 0x98, 0xff, 0xfc, 0x3b, 0x90, 0x09, 0x6a, 0x89, 0xd9, 0x35, 0x01, 0x91, 0x5e, 0x0b, 0x3f, + 0x0f, 0xcf, 0x45, 0x76, 0x30, 0x1b, 0x0f, 0x7f, 0x21, 0x10, 0xc3, 0x50, 0x41, 0xb5, 0x4f, 0xa5, + 0xe1, 0x43, 0x8a, 0x92, 0x3c, 0xe7, 0x49, 0xb1, 0x0e, 0x6b, 0xc3, 0xc5, 0xb2, 0xdc, 0xfc, 0x88, + 0xc8, 0x60, 0xe9, 0x83, 0x8f, 0x3d, 0xf0, 0xc7, 0xc9, 0x4a, 0xdc, 0x93, 0xe0, 0x05, 0x58, 0x19, + 0xc4, 0x95, 0x89, 0xfa, 0x0f, 0xc1, 0x95, 0x32, 0x36, 0x0e, 0x5a, 0xd5, 0xba, 0xe9, 0xec, 0x37, + 0x2d, 0xdb, 0xc2, 0xea, 0xe1, 0x38, 0x23, 0x92, 0x5f, 0x84, 0x19, 0x9b, 0xd8, 0xfb, 0x23, 0x61, + 0x46, 0xe9, 0xbc, 0x18, 0x78, 0x26, 0x5c, 0x77, 0xd7, 0x30, 0x56, 0x0d, 0x1d, 0x67, 0x39, 0x32, + 0x4b, 0x42, 0x4b, 0xac, 0x30, 0x14, 0x2f, 0x01, 0xa7, 0x9f, 0xe8, 0x35, 0xb2, 0xa5, 0xd3, 0x05, + 0x21, 0x7c, 0xf2, 0x14, 0x4f, 0xf4, 0x9a, 0x42, 0x70, 0xdb, 0xbc, 0x5f, 0xf8, 0x0e, 0x23, 0xf1, + 0x26, 0x99, 0xe8, 0x41, 0xe1, 0x6c, 0x4f, 0x2e, 0x43, 0xca, 0xf6, 0xde, 0x75, 0xb6, 0x25, 0xf8, + 0xaf, 0x4a, 0x9a, 0x78, 0x97, 0xdc, 0x5d, 0xdc, 0xdd, 0xac, 0x35, 0xd5, 0x63, 0x96, 0xb8, 0x61, + 0x76, 0xe3, 0xd4, 0xdc, 0xbb, 0x82, 0xf4, 0xc6, 0x62, 0x25, 0xfc, 0x1b, 0xc1, 0x54, 0x19, 0x1b, + 0x1f, 0x59, 0xce, 0x70, 0xde, 0x6e, 0x8f, 0x1e, 0x59, 0x8e, 0xde, 0x1c, 0x1a, 0x9d, 0xc2, 0xf8, + 0x1b, 0x30, 0x69, 0xd9, 0x8e, 0x69, 0xd1, 0x33, 0x27, 0x5d, 0xc8, 0x87, 0xe7, 0xda, 0x0d, 0xfe, + 0x3e, 0xc1, 0x29, 0x1e, 0x3e, 0x50, 0x71, 0xae, 0xa7, 0xe2, 0xa3, 0xd6, 0x8f, 0x76, 0x36, 0x61, + 0x24, 0x5e, 0x81, 0xcb, 0x9e, 0x5a, 0x96, 0x01, 0x93, 0x24, 0xc0, 0xc5, 0x0f, 0x4f, 0xc0, 0x75, + 0x98, 0xc4, 0xa6, 0xd1, 0x88, 0x91, 0x01, 0x0f, 0xb7, 0x9d, 0x72, 0x83, 0x7b, 0x0f, 0x5e, 0x74, + 0x42, 0xcd, 0x8b, 0xbe, 0xb6, 0x06, 0x1c, 0x09, 0x9d, 0x81, 0xd9, 0xe2, 0x27, 0xc5, 0xbd, 0xca, + 0xed, 0xf7, 0x0e, 0xf6, 0x8b, 0x7b, 0xa5, 0xb7, 0x4a, 0xc5, 0x5b, 0xb3, 0x09, 0xfe, 0x22, 0x4c, + 0x93, 0xb7, 0x1f, 0x2a, 0x9f, 0xce, 0xa2, 0xc2, 0xbf, 0x29, 0x48, 0x96, 0xb1, 0xc1, 0xab, 0x90, + 0xea, 0xfe, 0xc9, 0xb2, 0x12, 0x71, 0x76, 0x06, 0x8e, 0x0e, 0x61, 0x3d, 0x0e, 0x8a, 0xb5, 0xf0, + 0x11, 0xf0, 0x21, 0xbf, 0x1b, 0x5e, 0x8e, 0xf4, 0xd1, 0x0f, 0x16, 0xb6, 0x46, 0x00, 0xb3, 0xb8, + 0x36, 0xcc, 0xf6, 0x5d, 0xe9, 0x5f, 0x8a, 0xe3, 0x88, 0x40, 0x85, 0xcd, 0xd8, 0x50, 0x16, 0xb1, + 0x0d, 0x73, 0x61, 0xf7, 0xef, 0xf5, 0x78, 0xec, 0x29, 0x5a, 0x78, 0x65, 0x14, 0x34, 0x0b, 0x8d, + 0xe1, 0x4a, 0xff, 0x55, 0x7a, 0x2d, 0x4e, 0x9d, 0x28, 0x56, 0x28, 0xc4, 0xc7, 0xb2, 0xa0, 0x5f, + 0xc2, 0x7c, 0xc4, 0x1d, 0x2e, 0x8e, 0xb3, 0x0e, 0x5e, 0x78, 0x6d, 0x34, 0x3c, 0x23, 0x70, 0x0f, + 0xc1, 0xd5, 0x88, 0xab, 0xb0, 0x1c, 0x27, 0x8d, 0x5d, 0x06, 0xc2, 0xeb, 0x23, 0x1a, 0x30, 0x12, + 0xdf, 0x22, 0x58, 0x1e, 0x76, 0x4f, 0xb9, 0x11, 0xdf, 0x79, 0xd0, 0x52, 0x78, 0x73, 0x5c, 0x4b, + 0xc6, 0xef, 0x3e, 0x82, 0x85, 0xe8, 0xbb, 0x42, 0x21, 0xbe, 0x7f, 0xd6, 0xa2, 0xdb, 0xa3, 0xdb, + 0x30, 0x36, 0x77, 0x21, 0xdd, 0x73, 0xc6, 0xbf, 0x18, 0xe9, 0x2d, 0x08, 0x14, 0xe4, 0x98, 0xc0, + 0xee, 0x09, 0xd0, 0x77, 0x30, 0x46, 0x4f, 0x80, 0x5e, 0xe8, 0x80, 0x09, 0x10, 0x75, 0x04, 0xf2, + 0xef, 0x02, 0x47, 0x8e, 0xbf, 0xa5, 0x48, 0x53, 0x77, 0x59, 0xb8, 0x36, 0x70, 0xb9, 0xdb, 0x1b, + 0x19, 0xe8, 0xd1, 0xde, 0xdc, 0xe5, 0x01, 0xde, 0xba, 0x8f, 0x87, 0xdd, 0x37, 0x1e, 0x9e, 0xe6, + 0xd0, 0xa3, 0xd3, 0x1c, 0x7a, 0x7c, 0x9a, 0x43, 0xdf, 0x9c, 0xe5, 0x12, 0x8f, 0xce, 0x72, 0x89, + 0xdf, 0xcf, 0x72, 0x89, 0xcf, 0x56, 0x0c, 0xd3, 0xb9, 0xd3, 0xaa, 0x4a, 0x35, 0xab, 0xee, 0xfd, + 0x55, 0xe6, 0x7d, 0x6c, 0x60, 0xed, 0x0b, 0xf9, 0x84, 0xfe, 0x1d, 0x56, 0x9d, 0x24, 0x77, 0xa0, + 0xad, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x4c, 0xbd, 0x11, 0x36, 0xa6, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1379,6 +1491,8 @@ type MsgClient interface { UpdateGroupMetadata(ctx context.Context, in *MsgUpdateGroupMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupMetadataResponse, error) // CreateGroupPolicy creates a new group policy using given DecisionPolicy. CreateGroupPolicy(ctx context.Context, in *MsgCreateGroupPolicy, opts ...grpc.CallOption) (*MsgCreateGroupPolicyResponse, error) + // CreateGroupWithPolicy creates a new group with policy. + CreateGroupWithPolicy(ctx context.Context, in *MsgCreateGroupWithPolicy, opts ...grpc.CallOption) (*MsgCreateGroupWithPolicyResponse, error) // UpdateGroupPolicyAdmin updates a group policy admin. UpdateGroupPolicyAdmin(ctx context.Context, in *MsgUpdateGroupPolicyAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyAdminResponse, error) // UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated. @@ -1448,6 +1562,15 @@ func (c *msgClient) CreateGroupPolicy(ctx context.Context, in *MsgCreateGroupPol return out, nil } +func (c *msgClient) CreateGroupWithPolicy(ctx context.Context, in *MsgCreateGroupWithPolicy, opts ...grpc.CallOption) (*MsgCreateGroupWithPolicyResponse, error) { + out := new(MsgCreateGroupWithPolicyResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/CreateGroupWithPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) UpdateGroupPolicyAdmin(ctx context.Context, in *MsgUpdateGroupPolicyAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyAdminResponse, error) { out := new(MsgUpdateGroupPolicyAdminResponse) err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/UpdateGroupPolicyAdmin", in, out, opts...) @@ -1523,6 +1646,8 @@ type MsgServer interface { UpdateGroupMetadata(context.Context, *MsgUpdateGroupMetadata) (*MsgUpdateGroupMetadataResponse, error) // CreateGroupPolicy creates a new group policy using given DecisionPolicy. CreateGroupPolicy(context.Context, *MsgCreateGroupPolicy) (*MsgCreateGroupPolicyResponse, error) + // CreateGroupWithPolicy creates a new group with policy. + CreateGroupWithPolicy(context.Context, *MsgCreateGroupWithPolicy) (*MsgCreateGroupWithPolicyResponse, error) // UpdateGroupPolicyAdmin updates a group policy admin. UpdateGroupPolicyAdmin(context.Context, *MsgUpdateGroupPolicyAdmin) (*MsgUpdateGroupPolicyAdminResponse, error) // UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated. @@ -1558,6 +1683,9 @@ func (*UnimplementedMsgServer) UpdateGroupMetadata(ctx context.Context, req *Msg func (*UnimplementedMsgServer) CreateGroupPolicy(ctx context.Context, req *MsgCreateGroupPolicy) (*MsgCreateGroupPolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateGroupPolicy not implemented") } +func (*UnimplementedMsgServer) CreateGroupWithPolicy(ctx context.Context, req *MsgCreateGroupWithPolicy) (*MsgCreateGroupWithPolicyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateGroupWithPolicy not implemented") +} func (*UnimplementedMsgServer) UpdateGroupPolicyAdmin(ctx context.Context, req *MsgUpdateGroupPolicyAdmin) (*MsgUpdateGroupPolicyAdminResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupPolicyAdmin not implemented") } @@ -1674,6 +1802,24 @@ func _Msg_CreateGroupPolicy_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Msg_CreateGroupWithPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateGroupWithPolicy) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateGroupWithPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Msg/CreateGroupWithPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateGroupWithPolicy(ctx, req.(*MsgCreateGroupWithPolicy)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_UpdateGroupPolicyAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateGroupPolicyAdmin) if err := dec(in); err != nil { @@ -1824,6 +1970,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "CreateGroupPolicy", Handler: _Msg_CreateGroupPolicy_Handler, }, + { + MethodName: "CreateGroupWithPolicy", + Handler: _Msg_CreateGroupWithPolicy_Handler, + }, { MethodName: "UpdateGroupPolicyAdmin", Handler: _Msg_UpdateGroupPolicyAdmin_Handler, @@ -2266,6 +2416,121 @@ func (m *MsgUpdateGroupPolicyAdmin) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } +func (m *MsgCreateGroupWithPolicy) 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 *MsgCreateGroupWithPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateGroupWithPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DecisionPolicy != nil { + { + size, err := m.DecisionPolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.GroupPolicyAsAdmin { + i-- + if m.GroupPolicyAsAdmin { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.GroupPolicyMetadata) > 0 { + i -= len(m.GroupPolicyMetadata) + copy(dAtA[i:], m.GroupPolicyMetadata) + i = encodeVarintTx(dAtA, i, uint64(len(m.GroupPolicyMetadata))) + i-- + dAtA[i] = 0x22 + } + if len(m.GroupMetadata) > 0 { + i -= len(m.GroupMetadata) + copy(dAtA[i:], m.GroupMetadata) + i = encodeVarintTx(dAtA, i, uint64(len(m.GroupMetadata))) + i-- + dAtA[i] = 0x1a + } + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateGroupWithPolicyResponse) 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 *MsgCreateGroupWithPolicyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateGroupWithPolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupPolicyAddress) > 0 { + i -= len(m.GroupPolicyAddress) + copy(dAtA[i:], m.GroupPolicyAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.GroupPolicyAddress))) + i-- + dAtA[i] = 0x12 + } + if m.GroupId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GroupId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *MsgUpdateGroupPolicyAdminResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2905,6 +3170,56 @@ func (m *MsgUpdateGroupPolicyAdmin) Size() (n int) { return n } +func (m *MsgCreateGroupWithPolicy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.GroupMetadata) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.GroupPolicyMetadata) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GroupPolicyAsAdmin { + n += 2 + } + if m.DecisionPolicy != nil { + l = m.DecisionPolicy.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateGroupWithPolicyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GroupId != 0 { + n += 1 + sovTx(uint64(m.GroupId)) + } + l = len(m.GroupPolicyAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + func (m *MsgUpdateGroupPolicyAdminResponse) Size() (n int) { if m == nil { return 0 @@ -4280,6 +4595,347 @@ func (m *MsgUpdateGroupPolicyAdmin) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgCreateGroupWithPolicy) 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: MsgCreateGroupWithPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateGroupWithPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", 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.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.Members = append(m.Members, Member{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupMetadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupMetadata = append(m.GroupMetadata[:0], dAtA[iNdEx:postIndex]...) + if m.GroupMetadata == nil { + m.GroupMetadata = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupPolicyMetadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupPolicyMetadata = append(m.GroupPolicyMetadata[:0], dAtA[iNdEx:postIndex]...) + if m.GroupPolicyMetadata == nil { + m.GroupPolicyMetadata = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupPolicyAsAdmin", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.GroupPolicyAsAdmin = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", 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.DecisionPolicy == nil { + m.DecisionPolicy = &types.Any{} + } + if err := m.DecisionPolicy.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 *MsgCreateGroupWithPolicyResponse) 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: MsgCreateGroupWithPolicyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateGroupWithPolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + m.GroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupPolicyAddress", 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.GroupPolicyAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *MsgUpdateGroupPolicyAdminResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0