feat: add `MsgWithdrawProposal` to group module (#10893)
## Description Closes: #9660 --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable)
This commit is contained in:
parent
37ae08d92a
commit
b9c7fd11d3
|
@ -2065,6 +2065,410 @@ func (x *fastReflection_EventCreateProposal) ProtoMethods() *protoiface.Methods
|
|||
}
|
||||
}
|
||||
|
||||
var (
|
||||
md_EventWithdrawProposal protoreflect.MessageDescriptor
|
||||
fd_EventWithdrawProposal_proposal_id protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_cosmos_group_v1beta1_events_proto_init()
|
||||
md_EventWithdrawProposal = File_cosmos_group_v1beta1_events_proto.Messages().ByName("EventWithdrawProposal")
|
||||
fd_EventWithdrawProposal_proposal_id = md_EventWithdrawProposal.Fields().ByName("proposal_id")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_EventWithdrawProposal)(nil)
|
||||
|
||||
type fastReflection_EventWithdrawProposal EventWithdrawProposal
|
||||
|
||||
func (x *EventWithdrawProposal) ProtoReflect() protoreflect.Message {
|
||||
return (*fastReflection_EventWithdrawProposal)(x)
|
||||
}
|
||||
|
||||
func (x *EventWithdrawProposal) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_cosmos_group_v1beta1_events_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
var _fastReflection_EventWithdrawProposal_messageType fastReflection_EventWithdrawProposal_messageType
|
||||
var _ protoreflect.MessageType = fastReflection_EventWithdrawProposal_messageType{}
|
||||
|
||||
type fastReflection_EventWithdrawProposal_messageType struct{}
|
||||
|
||||
func (x fastReflection_EventWithdrawProposal_messageType) Zero() protoreflect.Message {
|
||||
return (*fastReflection_EventWithdrawProposal)(nil)
|
||||
}
|
||||
func (x fastReflection_EventWithdrawProposal_messageType) New() protoreflect.Message {
|
||||
return new(fastReflection_EventWithdrawProposal)
|
||||
}
|
||||
func (x fastReflection_EventWithdrawProposal_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_EventWithdrawProposal
|
||||
}
|
||||
|
||||
// Descriptor returns message descriptor, which contains only the protobuf
|
||||
// type information for the message.
|
||||
func (x *fastReflection_EventWithdrawProposal) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_EventWithdrawProposal
|
||||
}
|
||||
|
||||
// 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_EventWithdrawProposal) Type() protoreflect.MessageType {
|
||||
return _fastReflection_EventWithdrawProposal_messageType
|
||||
}
|
||||
|
||||
// New returns a newly allocated and mutable empty message.
|
||||
func (x *fastReflection_EventWithdrawProposal) New() protoreflect.Message {
|
||||
return new(fastReflection_EventWithdrawProposal)
|
||||
}
|
||||
|
||||
// Interface unwraps the message reflection interface and
|
||||
// returns the underlying ProtoMessage interface.
|
||||
func (x *fastReflection_EventWithdrawProposal) Interface() protoreflect.ProtoMessage {
|
||||
return (*EventWithdrawProposal)(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_EventWithdrawProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||
if x.ProposalId != uint64(0) {
|
||||
value := protoreflect.ValueOfUint64(x.ProposalId)
|
||||
if !f(fd_EventWithdrawProposal_proposal_id, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Has reports whether a field is populated.
|
||||
//
|
||||
// Some fields have the property of nullability where it is possible to
|
||||
// distinguish between the default value of a field and whether the field
|
||||
// was explicitly populated with the default value. Singular message fields,
|
||||
// member fields of a oneof, and proto2 scalar fields are nullable. Such
|
||||
// fields are populated only if explicitly set.
|
||||
//
|
||||
// In other cases (aside from the nullable cases above),
|
||||
// a proto3 scalar field is populated if it contains a non-zero value, and
|
||||
// a repeated field is populated if it is non-empty.
|
||||
func (x *fastReflection_EventWithdrawProposal) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.group.v1beta1.EventWithdrawProposal.proposal_id":
|
||||
return x.ProposalId != uint64(0)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventWithdrawProposal"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.group.v1beta1.EventWithdrawProposal 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_EventWithdrawProposal) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.group.v1beta1.EventWithdrawProposal.proposal_id":
|
||||
x.ProposalId = uint64(0)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventWithdrawProposal"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.group.v1beta1.EventWithdrawProposal 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_EventWithdrawProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
case "cosmos.group.v1beta1.EventWithdrawProposal.proposal_id":
|
||||
value := x.ProposalId
|
||||
return protoreflect.ValueOfUint64(value)
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventWithdrawProposal"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.group.v1beta1.EventWithdrawProposal 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_EventWithdrawProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.group.v1beta1.EventWithdrawProposal.proposal_id":
|
||||
x.ProposalId = value.Uint()
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventWithdrawProposal"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.group.v1beta1.EventWithdrawProposal 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_EventWithdrawProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.group.v1beta1.EventWithdrawProposal.proposal_id":
|
||||
panic(fmt.Errorf("field proposal_id of message cosmos.group.v1beta1.EventWithdrawProposal is not mutable"))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventWithdrawProposal"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.group.v1beta1.EventWithdrawProposal 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_EventWithdrawProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.group.v1beta1.EventWithdrawProposal.proposal_id":
|
||||
return protoreflect.ValueOfUint64(uint64(0))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventWithdrawProposal"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.group.v1beta1.EventWithdrawProposal 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_EventWithdrawProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1beta1.EventWithdrawProposal", 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_EventWithdrawProposal) 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_EventWithdrawProposal) 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_EventWithdrawProposal) 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_EventWithdrawProposal) ProtoMethods() *protoiface.Methods {
|
||||
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||
x := input.Message.Interface().(*EventWithdrawProposal)
|
||||
if x == nil {
|
||||
return protoiface.SizeOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Size: 0,
|
||||
}
|
||||
}
|
||||
options := runtime.SizeInputToOptions(input)
|
||||
_ = options
|
||||
var n int
|
||||
var l int
|
||||
_ = l
|
||||
if x.ProposalId != 0 {
|
||||
n += 1 + runtime.Sov(uint64(x.ProposalId))
|
||||
}
|
||||
if x.unknownFields != nil {
|
||||
n += len(x.unknownFields)
|
||||
}
|
||||
return protoiface.SizeOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Size: n,
|
||||
}
|
||||
}
|
||||
|
||||
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
|
||||
x := input.Message.Interface().(*EventWithdrawProposal)
|
||||
if x == nil {
|
||||
return protoiface.MarshalOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Buf: input.Buf,
|
||||
}, nil
|
||||
}
|
||||
options := runtime.MarshalInputToOptions(input)
|
||||
_ = options
|
||||
size := options.Size(x)
|
||||
dAtA := make([]byte, size)
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if x.unknownFields != nil {
|
||||
i -= len(x.unknownFields)
|
||||
copy(dAtA[i:], x.unknownFields)
|
||||
}
|
||||
if x.ProposalId != 0 {
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId))
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
if input.Buf != nil {
|
||||
input.Buf = append(input.Buf, dAtA...)
|
||||
} else {
|
||||
input.Buf = dAtA
|
||||
}
|
||||
return protoiface.MarshalOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Buf: input.Buf,
|
||||
}, nil
|
||||
}
|
||||
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
|
||||
x := input.Message.Interface().(*EventWithdrawProposal)
|
||||
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: EventWithdrawProposal: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventWithdrawProposal: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType)
|
||||
}
|
||||
x.ProposalId = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
x.ProposalId |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
if !options.DiscardUnknown {
|
||||
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
||||
}
|
||||
return &protoiface.Methods{
|
||||
NoUnkeyedLiterals: struct{}{},
|
||||
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
||||
Size: size,
|
||||
Marshal: marshal,
|
||||
Unmarshal: unmarshal,
|
||||
Merge: nil,
|
||||
CheckInitialized: nil,
|
||||
}
|
||||
}
|
||||
|
||||
var (
|
||||
md_EventVote protoreflect.MessageDescriptor
|
||||
fd_EventVote_proposal_id protoreflect.FieldDescriptor
|
||||
|
@ -2085,7 +2489,7 @@ func (x *EventVote) ProtoReflect() protoreflect.Message {
|
|||
}
|
||||
|
||||
func (x *EventVote) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_cosmos_group_v1beta1_events_proto_msgTypes[5]
|
||||
mi := &file_cosmos_group_v1beta1_events_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -2489,7 +2893,7 @@ func (x *EventExec) ProtoReflect() protoreflect.Message {
|
|||
}
|
||||
|
||||
func (x *EventExec) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_cosmos_group_v1beta1_events_proto_msgTypes[6]
|
||||
mi := &file_cosmos_group_v1beta1_events_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -3071,6 +3475,43 @@ func (x *EventCreateProposal) GetProposalId() uint64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
// EventWithdrawProposal is an event emitted when a proposal is withdrawn.
|
||||
type EventWithdrawProposal struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// proposal_id is the unique ID of the proposal.
|
||||
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *EventWithdrawProposal) Reset() {
|
||||
*x = EventWithdrawProposal{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_cosmos_group_v1beta1_events_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *EventWithdrawProposal) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EventWithdrawProposal) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use EventWithdrawProposal.ProtoReflect.Descriptor instead.
|
||||
func (*EventWithdrawProposal) Descriptor() ([]byte, []int) {
|
||||
return file_cosmos_group_v1beta1_events_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *EventWithdrawProposal) GetProposalId() uint64 {
|
||||
if x != nil {
|
||||
return x.ProposalId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// EventVote is an event emitted when a voter votes on a proposal.
|
||||
type EventVote struct {
|
||||
state protoimpl.MessageState
|
||||
|
@ -3084,7 +3525,7 @@ type EventVote struct {
|
|||
func (x *EventVote) Reset() {
|
||||
*x = EventVote{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_cosmos_group_v1beta1_events_proto_msgTypes[5]
|
||||
mi := &file_cosmos_group_v1beta1_events_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -3098,7 +3539,7 @@ func (*EventVote) ProtoMessage() {}
|
|||
|
||||
// Deprecated: Use EventVote.ProtoReflect.Descriptor instead.
|
||||
func (*EventVote) Descriptor() ([]byte, []int) {
|
||||
return file_cosmos_group_v1beta1_events_proto_rawDescGZIP(), []int{5}
|
||||
return file_cosmos_group_v1beta1_events_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *EventVote) GetProposalId() uint64 {
|
||||
|
@ -3121,7 +3562,7 @@ type EventExec struct {
|
|||
func (x *EventExec) Reset() {
|
||||
*x = EventExec{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_cosmos_group_v1beta1_events_proto_msgTypes[6]
|
||||
mi := &file_cosmos_group_v1beta1_events_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -3135,7 +3576,7 @@ func (*EventExec) ProtoMessage() {}
|
|||
|
||||
// Deprecated: Use EventExec.ProtoReflect.Descriptor instead.
|
||||
func (*EventExec) Descriptor() ([]byte, []int) {
|
||||
return file_cosmos_group_v1beta1_events_proto_rawDescGZIP(), []int{6}
|
||||
return file_cosmos_group_v1beta1_events_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *EventExec) GetProposalId() uint64 {
|
||||
|
@ -3172,27 +3613,31 @@ var file_cosmos_group_v1beta1_events_proto_rawDesc = []byte{
|
|||
0x0a, 0x13, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f,
|
||||
0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61,
|
||||
0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70,
|
||||
0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x2c, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 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, 0x22, 0x2c, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 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, 0x42, 0xdd, 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,
|
||||
0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 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,
|
||||
0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x15, 0x45, 0x76, 0x65, 0x6e, 0x74, 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,
|
||||
0x22, 0x2c, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 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, 0x22, 0x2c,
|
||||
0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 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, 0x42, 0xdd, 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, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74,
|
||||
0x73, 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 (
|
||||
|
@ -3207,15 +3652,16 @@ func file_cosmos_group_v1beta1_events_proto_rawDescGZIP() []byte {
|
|||
return file_cosmos_group_v1beta1_events_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_cosmos_group_v1beta1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_cosmos_group_v1beta1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_cosmos_group_v1beta1_events_proto_goTypes = []interface{}{
|
||||
(*EventCreateGroup)(nil), // 0: cosmos.group.v1beta1.EventCreateGroup
|
||||
(*EventUpdateGroup)(nil), // 1: cosmos.group.v1beta1.EventUpdateGroup
|
||||
(*EventCreateGroupPolicy)(nil), // 2: cosmos.group.v1beta1.EventCreateGroupPolicy
|
||||
(*EventUpdateGroupPolicy)(nil), // 3: cosmos.group.v1beta1.EventUpdateGroupPolicy
|
||||
(*EventCreateProposal)(nil), // 4: cosmos.group.v1beta1.EventCreateProposal
|
||||
(*EventVote)(nil), // 5: cosmos.group.v1beta1.EventVote
|
||||
(*EventExec)(nil), // 6: cosmos.group.v1beta1.EventExec
|
||||
(*EventWithdrawProposal)(nil), // 5: cosmos.group.v1beta1.EventWithdrawProposal
|
||||
(*EventVote)(nil), // 6: cosmos.group.v1beta1.EventVote
|
||||
(*EventExec)(nil), // 7: cosmos.group.v1beta1.EventExec
|
||||
}
|
||||
var file_cosmos_group_v1beta1_events_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
|
@ -3292,7 +3738,7 @@ func file_cosmos_group_v1beta1_events_proto_init() {
|
|||
}
|
||||
}
|
||||
file_cosmos_group_v1beta1_events_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*EventVote); i {
|
||||
switch v := v.(*EventWithdrawProposal); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -3304,6 +3750,18 @@ func file_cosmos_group_v1beta1_events_proto_init() {
|
|||
}
|
||||
}
|
||||
file_cosmos_group_v1beta1_events_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*EventVote); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_cosmos_group_v1beta1_events_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*EventExec); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3322,7 +3780,7 @@ func file_cosmos_group_v1beta1_events_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_cosmos_group_v1beta1_events_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumMessages: 8,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -40,6 +40,8 @@ type MsgClient interface {
|
|||
UpdateGroupPolicyMetadata(ctx context.Context, in *MsgUpdateGroupPolicyMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyMetadataResponse, error)
|
||||
// CreateProposal submits a new proposal.
|
||||
CreateProposal(ctx context.Context, in *MsgCreateProposal, opts ...grpc.CallOption) (*MsgCreateProposalResponse, error)
|
||||
// WithdrawProposal aborts a proposal.
|
||||
WithdrawProposal(ctx context.Context, in *MsgWithdrawProposal, opts ...grpc.CallOption) (*MsgWithdrawProposalResponse, error)
|
||||
// Vote allows a voter to vote on a proposal.
|
||||
Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error)
|
||||
// Exec executes a proposal.
|
||||
|
@ -135,6 +137,15 @@ func (c *msgClient) CreateProposal(ctx context.Context, in *MsgCreateProposal, o
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) WithdrawProposal(ctx context.Context, in *MsgWithdrawProposal, opts ...grpc.CallOption) (*MsgWithdrawProposalResponse, error) {
|
||||
out := new(MsgWithdrawProposalResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/WithdrawProposal", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) {
|
||||
out := new(MsgVoteResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/Vote", in, out, opts...)
|
||||
|
@ -175,6 +186,8 @@ type MsgServer interface {
|
|||
UpdateGroupPolicyMetadata(context.Context, *MsgUpdateGroupPolicyMetadata) (*MsgUpdateGroupPolicyMetadataResponse, error)
|
||||
// CreateProposal submits a new proposal.
|
||||
CreateProposal(context.Context, *MsgCreateProposal) (*MsgCreateProposalResponse, error)
|
||||
// WithdrawProposal aborts a proposal.
|
||||
WithdrawProposal(context.Context, *MsgWithdrawProposal) (*MsgWithdrawProposalResponse, error)
|
||||
// Vote allows a voter to vote on a proposal.
|
||||
Vote(context.Context, *MsgVote) (*MsgVoteResponse, error)
|
||||
// Exec executes a proposal.
|
||||
|
@ -213,6 +226,9 @@ func (UnimplementedMsgServer) UpdateGroupPolicyMetadata(context.Context, *MsgUpd
|
|||
func (UnimplementedMsgServer) CreateProposal(context.Context, *MsgCreateProposal) (*MsgCreateProposalResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateProposal not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) WithdrawProposal(context.Context, *MsgWithdrawProposal) (*MsgWithdrawProposalResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WithdrawProposal not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented")
|
||||
}
|
||||
|
@ -394,6 +410,24 @@ func _Msg_CreateProposal_Handler(srv interface{}, ctx context.Context, dec func(
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_WithdrawProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgWithdrawProposal)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).WithdrawProposal(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/cosmos.group.v1beta1.Msg/WithdrawProposal",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).WithdrawProposal(ctx, req.(*MsgWithdrawProposal))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgVote)
|
||||
if err := dec(in); err != nil {
|
||||
|
@ -473,6 +507,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
|
|||
MethodName: "CreateProposal",
|
||||
Handler: _Msg_CreateProposal_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WithdrawProposal",
|
||||
Handler: _Msg_WithdrawProposal_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Vote",
|
||||
Handler: _Msg_Vote_Handler,
|
||||
|
|
|
@ -6283,6 +6283,9 @@ const (
|
|||
Proposal_STATUS_CLOSED Proposal_Status = 2
|
||||
// Final status of a proposal when the group was modified before the final tally.
|
||||
Proposal_STATUS_ABORTED Proposal_Status = 3
|
||||
// A proposal can be deleted before the voting start time by the owner. When this happens the final status
|
||||
// is Withdrawn.
|
||||
Proposal_STATUS_WITHDRAWN Proposal_Status = 4
|
||||
)
|
||||
|
||||
// Enum value maps for Proposal_Status.
|
||||
|
@ -6292,12 +6295,14 @@ var (
|
|||
1: "STATUS_SUBMITTED",
|
||||
2: "STATUS_CLOSED",
|
||||
3: "STATUS_ABORTED",
|
||||
4: "STATUS_WITHDRAWN",
|
||||
}
|
||||
Proposal_Status_value = map[string]int32{
|
||||
"STATUS_UNSPECIFIED": 0,
|
||||
"STATUS_SUBMITTED": 1,
|
||||
"STATUS_CLOSED": 2,
|
||||
"STATUS_ABORTED": 3,
|
||||
"STATUS_WITHDRAWN": 4,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -7188,7 +7193,7 @@ var file_cosmos_group_v1beta1_types_proto_rawDesc = []byte{
|
|||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
|
||||
0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x63, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f,
|
||||
0x01, 0x22, 0xa7, 0x0b, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x1f,
|
||||
0x01, 0x22, 0xda, 0x0b, 0x0a, 0x08, 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,
|
||||
|
@ -7233,7 +7238,7 @@ var file_cosmos_group_v1beta1_types_proto_rawDesc = []byte{
|
|||
0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12,
|
||||
0x28, 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x18, 0x0d, 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, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x22, 0xd0, 0x01, 0x0a, 0x06, 0x53, 0x74,
|
||||
0x41, 0x6e, 0x79, 0x52, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x22, 0x83, 0x02, 0x0a, 0x06, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55,
|
||||
0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x19, 0x8a, 0x9d,
|
||||
0x20, 0x15, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
|
@ -7246,84 +7251,87 @@ var file_cosmos_group_v1beta1_types_proto_rawDesc = []byte{
|
|||
0x73, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x2d, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55,
|
||||
0x53, 0x5f, 0x41, 0x42, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x03, 0x1a, 0x19, 0x8a, 0x9d, 0x20,
|
||||
0x15, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41,
|
||||
0x62, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x22, 0xda, 0x01, 0x0a,
|
||||
0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x31, 0x0a, 0x12, 0x52, 0x45, 0x53, 0x55, 0x4c,
|
||||
0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a,
|
||||
0x19, 0x8a, 0x9d, 0x20, 0x15, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73,
|
||||
0x75, 0x6c, 0x74, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x12, 0x52, 0x45,
|
||||
0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44,
|
||||
0x10, 0x01, 0x1a, 0x1d, 0x8a, 0x9d, 0x20, 0x19, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c,
|
||||
0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x55, 0x6e, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65,
|
||||
0x64, 0x12, 0x2f, 0x0a, 0x0f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x41, 0x43, 0x43, 0x45,
|
||||
0x50, 0x54, 0x45, 0x44, 0x10, 0x02, 0x1a, 0x1a, 0x8a, 0x9d, 0x20, 0x16, 0x50, 0x72, 0x6f, 0x70,
|
||||
0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74,
|
||||
0x65, 0x64, 0x12, 0x2f, 0x0a, 0x0f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x52, 0x45, 0x4a,
|
||||
0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x1a, 0x1a, 0x8a, 0x9d, 0x20, 0x16, 0x50, 0x72, 0x6f,
|
||||
0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x6a, 0x65, 0x63,
|
||||
0x74, 0x65, 0x64, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x22, 0x99, 0x02, 0x0a, 0x0e, 0x45, 0x78,
|
||||
0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x42, 0x0a, 0x1b,
|
||||
0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f,
|
||||
0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x21, 0x8a,
|
||||
0x9d, 0x20, 0x1d, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x78, 0x65, 0x63, 0x75,
|
||||
0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64,
|
||||
0x12, 0x3d, 0x0a, 0x17, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53,
|
||||
0x55, 0x4c, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x55, 0x4e, 0x10, 0x01, 0x1a, 0x20, 0x8a,
|
||||
0x9d, 0x20, 0x1c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x78, 0x65, 0x63, 0x75,
|
||||
0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x4e, 0x6f, 0x74, 0x52, 0x75, 0x6e, 0x12,
|
||||
0x3e, 0x0a, 0x17, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55,
|
||||
0x4c, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x1a, 0x21, 0x8a, 0x9d,
|
||||
0x20, 0x1d, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
|
||||
0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12,
|
||||
0x3e, 0x0a, 0x17, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55,
|
||||
0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x03, 0x1a, 0x21, 0x8a, 0x9d,
|
||||
0x20, 0x1d, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
|
||||
0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x1a,
|
||||
0x04, 0x88, 0xa3, 0x1e, 0x00, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0x89, 0x01, 0x0a, 0x05,
|
||||
0x54, 0x61, 0x6c, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x79, 0x65, 0x73, 0x43, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a,
|
||||
0x0d, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x65, 0x74, 0x6f, 0x43, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0xf2, 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65,
|
||||
0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49,
|
||||
0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64,
|
||||
0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65,
|
||||
0x72, 0x12, 0x34, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70,
|
||||
0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x52,
|
||||
0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 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, 0x47, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64,
|
||||
0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52,
|
||||
0x0b, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x41, 0x74, 0x2a, 0x64, 0x0a, 0x06,
|
||||
0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x48, 0x4f, 0x49, 0x43, 0x45,
|
||||
0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d,
|
||||
0x0a, 0x09, 0x43, 0x48, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x4e, 0x4f, 0x10, 0x01, 0x12, 0x0e, 0x0a,
|
||||
0x0a, 0x43, 0x48, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x02, 0x12, 0x12, 0x0a,
|
||||
0x0e, 0x43, 0x48, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10,
|
||||
0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x48, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x56, 0x45, 0x54, 0x4f,
|
||||
0x10, 0x04, 0x42, 0xdc, 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,
|
||||
0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 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,
|
||||
0x62, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53,
|
||||
0x5f, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x4e, 0x10, 0x04, 0x1a, 0x1b, 0x8a, 0x9d,
|
||||
0x20, 0x17, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x22,
|
||||
0xda, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x31, 0x0a, 0x12, 0x52, 0x45,
|
||||
0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
|
||||
0x10, 0x00, 0x1a, 0x19, 0x8a, 0x9d, 0x20, 0x15, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c,
|
||||
0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x35, 0x0a,
|
||||
0x12, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49,
|
||||
0x5a, 0x45, 0x44, 0x10, 0x01, 0x1a, 0x1d, 0x8a, 0x9d, 0x20, 0x19, 0x50, 0x72, 0x6f, 0x70, 0x6f,
|
||||
0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x55, 0x6e, 0x66, 0x69, 0x6e, 0x61, 0x6c,
|
||||
0x69, 0x7a, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x0f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x41,
|
||||
0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x02, 0x1a, 0x1a, 0x8a, 0x9d, 0x20, 0x16, 0x50,
|
||||
0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x63,
|
||||
0x65, 0x70, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x0f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f,
|
||||
0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x1a, 0x1a, 0x8a, 0x9d, 0x20, 0x16,
|
||||
0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65,
|
||||
0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x22, 0x99, 0x02, 0x0a,
|
||||
0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12,
|
||||
0x42, 0x0a, 0x1b, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55,
|
||||
0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
|
||||
0x1a, 0x21, 0x8a, 0x9d, 0x20, 0x1d, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x78,
|
||||
0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x76, 0x61,
|
||||
0x6c, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x17, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f,
|
||||
0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x55, 0x4e, 0x10, 0x01,
|
||||
0x1a, 0x20, 0x8a, 0x9d, 0x20, 0x1c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x78,
|
||||
0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x4e, 0x6f, 0x74, 0x52,
|
||||
0x75, 0x6e, 0x12, 0x3e, 0x0a, 0x17, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52,
|
||||
0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x1a,
|
||||
0x21, 0x8a, 0x9d, 0x20, 0x1d, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x78, 0x65,
|
||||
0x63, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65,
|
||||
0x73, 0x73, 0x12, 0x3e, 0x0a, 0x17, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52,
|
||||
0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x03, 0x1a,
|
||||
0x21, 0x8a, 0x9d, 0x20, 0x1d, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x78, 0x65,
|
||||
0x63, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75,
|
||||
0x72, 0x65, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0x89,
|
||||
0x01, 0x0a, 0x05, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x79, 0x65, 0x73, 0x5f,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x79, 0x65, 0x73,
|
||||
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x12, 0x23, 0x0a, 0x0d, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e,
|
||||
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x65, 0x74, 0x6f, 0x43,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0xf2, 0x01, 0x0a, 0x04, 0x56,
|
||||
0x6f, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73,
|
||||
0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76,
|
||||
0x6f, 0x74, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72,
|
||||
0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x6f, 0x69,
|
||||
0x63, 0x65, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 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, 0x47, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74,
|
||||
0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
|
||||
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf,
|
||||
0x1f, 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x41, 0x74, 0x2a,
|
||||
0x64, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x48, 0x4f,
|
||||
0x49, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
|
||||
0x00, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x48, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x4e, 0x4f, 0x10, 0x01,
|
||||
0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x48, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x02,
|
||||
0x12, 0x12, 0x0a, 0x0e, 0x43, 0x48, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41,
|
||||
0x49, 0x4e, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x48, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x56,
|
||||
0x45, 0x54, 0x4f, 0x10, 0x04, 0x42, 0xdc, 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, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 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 (
|
||||
|
|
|
@ -41,6 +41,13 @@ message EventCreateProposal {
|
|||
uint64 proposal_id = 1;
|
||||
}
|
||||
|
||||
// EventWithdrawProposal is an event emitted when a proposal is withdrawn.
|
||||
message EventWithdrawProposal {
|
||||
|
||||
// proposal_id is the unique ID of the proposal.
|
||||
uint64 proposal_id = 1;
|
||||
}
|
||||
|
||||
// EventVote is an event emitted when a voter votes on a proposal.
|
||||
message EventVote {
|
||||
|
||||
|
|
|
@ -42,6 +42,9 @@ service Msg {
|
|||
// CreateProposal submits a new proposal.
|
||||
rpc CreateProposal(MsgCreateProposal) returns (MsgCreateProposalResponse);
|
||||
|
||||
// WithdrawProposal aborts a proposal.
|
||||
rpc WithdrawProposal(MsgWithdrawProposal) returns (MsgWithdrawProposalResponse);
|
||||
|
||||
// Vote allows a voter to vote on a proposal.
|
||||
rpc Vote(MsgVote) returns (MsgVoteResponse);
|
||||
|
||||
|
@ -258,6 +261,18 @@ message MsgCreateProposalResponse {
|
|||
uint64 proposal_id = 1;
|
||||
}
|
||||
|
||||
// MsgWithdrawProposal is the Msg/WithdrawProposal request type.
|
||||
message MsgWithdrawProposal {
|
||||
// proposal is the unique ID of the proposal.
|
||||
uint64 proposal_id = 1;
|
||||
|
||||
// address is the admin of the group policy or one of the proposer of the proposal.
|
||||
string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
}
|
||||
|
||||
// MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type.
|
||||
message MsgWithdrawProposalResponse {}
|
||||
|
||||
// MsgVote is the Msg/Vote request type.
|
||||
message MsgVote {
|
||||
option (cosmos.msg.v1.signer) = "voter";
|
||||
|
|
|
@ -178,10 +178,9 @@ message Proposal {
|
|||
// Final status of a proposal when the group was modified before the final tally.
|
||||
STATUS_ABORTED = 3 [(gogoproto.enumvalue_customname) = "ProposalStatusAborted"];
|
||||
|
||||
// TODO: do we want to support a withdrawn operation?
|
||||
// A proposal can be deleted before the voting start time by the owner. When this happens the final status
|
||||
// is Withdrawn.
|
||||
// STATUS_WITHDRAWN = 4 [(gogoproto.enumvalue_customname) = "Withdrawn"];
|
||||
STATUS_WITHDRAWN = 4 [(gogoproto.enumvalue_customname) = "ProposalStatusWithdrawn"];
|
||||
}
|
||||
|
||||
// Status represents the high level position in the life cycle of the proposal. Initial value is Submitted.
|
||||
|
|
|
@ -539,6 +539,57 @@ Parameters:
|
|||
return cmd
|
||||
}
|
||||
|
||||
// MsgWithdrawProposalCmd creates a CLI command for Msg/WithdrawProposal.
|
||||
func MsgWithdrawProposalCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "withdraw-proposal [proposal-id] [group-policy-admin-or-proposer]",
|
||||
Short: "Withdraw a submitted proposal",
|
||||
Long: `Withdraw a submitted proposal.
|
||||
|
||||
Parameters:
|
||||
proposal-id: unique ID of the proposal.
|
||||
group-policy-admin-or-proposer: either admin of the group policy or one the proposer of the proposal.
|
||||
(note: --from flag will be ignored here)
|
||||
`,
|
||||
Args: cobra.ExactArgs(2),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
err := cmd.Flags().Set(flags.FlagFrom, args[1])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
clientCtx, err := client.GetClientTxContext(cmd)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
proposalID, err := strconv.ParseUint(args[0], 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
msg := &group.MsgWithdrawProposal{
|
||||
ProposalId: proposalID,
|
||||
Address: clientCtx.GetFromAddress().String(),
|
||||
}
|
||||
|
||||
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)
|
||||
},
|
||||
}
|
||||
|
||||
flags.AddTxFlagsToCmd(cmd)
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// MsgVoteCmd creates a CLI command for Msg/Vote.
|
||||
func MsgVoteCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
|
|
|
@ -76,11 +76,16 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
|||
}
|
||||
|
||||
// create a group
|
||||
validMembers := fmt.Sprintf(`{"members": [{
|
||||
"address": "%s",
|
||||
"weight": "3",
|
||||
"metadata": "%s"
|
||||
}]}`, val.Address.String(), validMetadata)
|
||||
validMembers := fmt.Sprintf(`
|
||||
{
|
||||
"members": [
|
||||
{
|
||||
"address": "%s",
|
||||
"weight": "3",
|
||||
"metadata": "%s"
|
||||
}
|
||||
]
|
||||
}`, val.Address.String(), validMetadata)
|
||||
validMembersFile := testutil.WriteToNewTempFile(s.T(), validMembers)
|
||||
out, err := cli.ExecTestCLICmd(val.ClientCtx, client.MsgCreateGroupCmd(),
|
||||
append(
|
||||
|
@ -1505,6 +1510,155 @@ func (s *IntegrationTestSuite) TestTxVote() {
|
|||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxWithdrawProposal() {
|
||||
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()),
|
||||
}
|
||||
|
||||
ids := make([]string, 2)
|
||||
|
||||
validTxFileName := getTxSendFileName(s, s.groupPolicies[1].Address, val.Address.String())
|
||||
for i := 0; i < 2; i++ {
|
||||
out, err := cli.ExecTestCLICmd(val.ClientCtx, client.MsgCreateProposalCmd(),
|
||||
append(
|
||||
[]string{
|
||||
s.groupPolicies[1].Address,
|
||||
val.Address.String(),
|
||||
validTxFileName,
|
||||
"",
|
||||
fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()),
|
||||
},
|
||||
commonFlags...,
|
||||
),
|
||||
)
|
||||
s.Require().NoError(err, out.String())
|
||||
|
||||
var txResp sdk.TxResponse
|
||||
s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String())
|
||||
s.Require().Equal(uint32(0), txResp.Code, out.String())
|
||||
ids[i] = s.getProposalIdFromTxResponse(txResp)
|
||||
}
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
args []string
|
||||
expectErr bool
|
||||
expectErrMsg string
|
||||
respType proto.Message
|
||||
expectedCode uint32
|
||||
}{
|
||||
{
|
||||
"correct data",
|
||||
append(
|
||||
[]string{
|
||||
ids[0],
|
||||
val.Address.String(),
|
||||
},
|
||||
commonFlags...,
|
||||
),
|
||||
false,
|
||||
"",
|
||||
&sdk.TxResponse{},
|
||||
0,
|
||||
},
|
||||
{
|
||||
"already withdrawn proposal",
|
||||
append(
|
||||
[]string{
|
||||
ids[0],
|
||||
val.Address.String(),
|
||||
},
|
||||
commonFlags...,
|
||||
),
|
||||
true,
|
||||
"cannot withdraw a proposal with the status of STATUS_WITHDRAWN",
|
||||
&sdk.TxResponse{},
|
||||
0,
|
||||
},
|
||||
{
|
||||
"proposal not found",
|
||||
append(
|
||||
[]string{
|
||||
"222",
|
||||
"wrongAdmin",
|
||||
},
|
||||
commonFlags...,
|
||||
),
|
||||
true,
|
||||
"not found",
|
||||
&sdk.TxResponse{},
|
||||
0,
|
||||
},
|
||||
{
|
||||
"invalid proposal",
|
||||
append(
|
||||
[]string{
|
||||
"abc",
|
||||
val.Address.String(),
|
||||
},
|
||||
commonFlags...,
|
||||
),
|
||||
true,
|
||||
"invalid syntax",
|
||||
&sdk.TxResponse{},
|
||||
0,
|
||||
},
|
||||
{
|
||||
"wrong admin",
|
||||
append(
|
||||
[]string{
|
||||
ids[1],
|
||||
"wrongAdmin",
|
||||
},
|
||||
commonFlags...,
|
||||
),
|
||||
true,
|
||||
"key not found",
|
||||
&sdk.TxResponse{},
|
||||
0,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
|
||||
s.Run(tc.name, func() {
|
||||
cmd := client.MsgWithdrawProposalCmd()
|
||||
|
||||
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) getProposalIdFromTxResponse(txResp sdk.TxResponse) string {
|
||||
s.Require().Greater(len(txResp.Logs), 0)
|
||||
s.Require().NotNil(txResp.Logs[0].Events)
|
||||
events := txResp.Logs[0].Events
|
||||
createProposalEvent, _ := sdk.TypedEventToEvent(&group.EventCreateProposal{})
|
||||
|
||||
for _, e := range events {
|
||||
if e.Type == createProposalEvent.Type {
|
||||
return strings.ReplaceAll(e.Attributes[0].Value, "\"", "")
|
||||
}
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxExec() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
|
|
@ -22,6 +22,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
|
|||
cdc.RegisterConcrete(&MsgUpdateGroupPolicyDecisionPolicy{}, "cosmos-sdk/MsgUpdateGroupPolicyDecisionPolicy", nil)
|
||||
cdc.RegisterConcrete(&MsgUpdateGroupPolicyMetadata{}, "cosmos-sdk/MsgUpdateGroupPolicyMetadata", nil)
|
||||
cdc.RegisterConcrete(&MsgCreateProposal{}, "cosmos-sdk/group/MsgCreateProposal", nil)
|
||||
cdc.RegisterConcrete(&MsgWithdrawProposal{}, "cosmos-sdk/group/MsgWithdrawProposal", nil)
|
||||
cdc.RegisterConcrete(&MsgVote{}, "cosmos-sdk/group/MsgVote", nil)
|
||||
cdc.RegisterConcrete(&MsgExec{}, "cosmos-sdk/group/MsgExec", nil)
|
||||
}
|
||||
|
@ -37,6 +38,7 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
|
|||
&MsgUpdateGroupPolicyDecisionPolicy{},
|
||||
&MsgUpdateGroupPolicyMetadata{},
|
||||
&MsgCreateProposal{},
|
||||
&MsgWithdrawProposal{},
|
||||
&MsgVote{},
|
||||
&MsgExec{},
|
||||
)
|
||||
|
|
|
@ -253,6 +253,52 @@ func (m *EventCreateProposal) GetProposalId() uint64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
// EventWithdrawProposal is an event emitted when a proposal is withdrawn.
|
||||
type EventWithdrawProposal struct {
|
||||
// proposal_id is the unique ID of the proposal.
|
||||
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
|
||||
}
|
||||
|
||||
func (m *EventWithdrawProposal) Reset() { *m = EventWithdrawProposal{} }
|
||||
func (m *EventWithdrawProposal) String() string { return proto.CompactTextString(m) }
|
||||
func (*EventWithdrawProposal) ProtoMessage() {}
|
||||
func (*EventWithdrawProposal) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7879e051fb126fc0, []int{5}
|
||||
}
|
||||
func (m *EventWithdrawProposal) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *EventWithdrawProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_EventWithdrawProposal.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 *EventWithdrawProposal) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_EventWithdrawProposal.Merge(m, src)
|
||||
}
|
||||
func (m *EventWithdrawProposal) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *EventWithdrawProposal) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_EventWithdrawProposal.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_EventWithdrawProposal proto.InternalMessageInfo
|
||||
|
||||
func (m *EventWithdrawProposal) GetProposalId() uint64 {
|
||||
if m != nil {
|
||||
return m.ProposalId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// EventVote is an event emitted when a voter votes on a proposal.
|
||||
type EventVote struct {
|
||||
// proposal_id is the unique ID of the proposal.
|
||||
|
@ -263,7 +309,7 @@ func (m *EventVote) Reset() { *m = EventVote{} }
|
|||
func (m *EventVote) String() string { return proto.CompactTextString(m) }
|
||||
func (*EventVote) ProtoMessage() {}
|
||||
func (*EventVote) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7879e051fb126fc0, []int{5}
|
||||
return fileDescriptor_7879e051fb126fc0, []int{6}
|
||||
}
|
||||
func (m *EventVote) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
|
@ -309,7 +355,7 @@ func (m *EventExec) Reset() { *m = EventExec{} }
|
|||
func (m *EventExec) String() string { return proto.CompactTextString(m) }
|
||||
func (*EventExec) ProtoMessage() {}
|
||||
func (*EventExec) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7879e051fb126fc0, []int{6}
|
||||
return fileDescriptor_7879e051fb126fc0, []int{7}
|
||||
}
|
||||
func (m *EventExec) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
|
@ -351,6 +397,7 @@ func init() {
|
|||
proto.RegisterType((*EventCreateGroupPolicy)(nil), "cosmos.group.v1beta1.EventCreateGroupPolicy")
|
||||
proto.RegisterType((*EventUpdateGroupPolicy)(nil), "cosmos.group.v1beta1.EventUpdateGroupPolicy")
|
||||
proto.RegisterType((*EventCreateProposal)(nil), "cosmos.group.v1beta1.EventCreateProposal")
|
||||
proto.RegisterType((*EventWithdrawProposal)(nil), "cosmos.group.v1beta1.EventWithdrawProposal")
|
||||
proto.RegisterType((*EventVote)(nil), "cosmos.group.v1beta1.EventVote")
|
||||
proto.RegisterType((*EventExec)(nil), "cosmos.group.v1beta1.EventExec")
|
||||
}
|
||||
|
@ -358,7 +405,7 @@ func init() {
|
|||
func init() { proto.RegisterFile("cosmos/group/v1beta1/events.proto", fileDescriptor_7879e051fb126fc0) }
|
||||
|
||||
var fileDescriptor_7879e051fb126fc0 = []byte{
|
||||
// 280 bytes of a gzipped FileDescriptorProto
|
||||
// 295 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xce, 0x2f, 0xce,
|
||||
0xcd, 0x2f, 0xd6, 0x4f, 0x2f, 0xca, 0x2f, 0x2d, 0xd0, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34,
|
||||
0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x81,
|
||||
|
@ -370,13 +417,14 @@ var fileDescriptor_7879e051fb126fc0 = []byte{
|
|||
0x92, 0x52, 0x94, 0x5a, 0x5c, 0x0c, 0xd6, 0xc3, 0xe9, 0x24, 0x71, 0x69, 0x8b, 0x2e, 0xcc, 0xf5,
|
||||
0x8e, 0x10, 0x99, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0xf4, 0x20, 0x98, 0x42, 0xb8, 0x69, 0x48, 0x96,
|
||||
0x53, 0x60, 0x9a, 0x19, 0x97, 0x30, 0x92, 0xdb, 0x02, 0x8a, 0xf2, 0x0b, 0xf2, 0x8b, 0x13, 0x73,
|
||||
0x84, 0xe4, 0xb9, 0xb8, 0x0b, 0xa0, 0x6c, 0x84, 0x87, 0xb8, 0x60, 0x42, 0x9e, 0x29, 0x4a, 0x3a,
|
||||
0x5c, 0x9c, 0x60, 0x7d, 0x61, 0xf9, 0x25, 0xa9, 0xc4, 0xab, 0x76, 0xad, 0x48, 0x4d, 0x26, 0xa8,
|
||||
0xda, 0xc9, 0xee, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c,
|
||||
0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x54, 0xd2, 0x33,
|
||||
0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xa1, 0x11, 0x08, 0xa5, 0x74, 0x8b, 0x53, 0xb2,
|
||||
0xf5, 0x2b, 0x20, 0x69, 0x22, 0x89, 0x0d, 0x1c, 0xa9, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff,
|
||||
0x78, 0x22, 0x27, 0x30, 0x2a, 0x02, 0x00, 0x00,
|
||||
0x84, 0xe4, 0xb9, 0xb8, 0x0b, 0xa0, 0x6c, 0x84, 0x87, 0xb8, 0x60, 0x42, 0x9e, 0x29, 0x4a, 0x16,
|
||||
0x5c, 0xa2, 0x60, 0x7d, 0xe1, 0x99, 0x25, 0x19, 0x29, 0x45, 0x89, 0xe5, 0xc4, 0xeb, 0xd4, 0xe1,
|
||||
0xe2, 0x04, 0xeb, 0x0c, 0xcb, 0x2f, 0x49, 0x25, 0x5e, 0xb5, 0x6b, 0x45, 0x6a, 0x32, 0x41, 0xd5,
|
||||
0x4e, 0x76, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84,
|
||||
0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x92, 0x9e, 0x59,
|
||||
0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0x0b, 0x8d, 0x7a, 0x28, 0xa5, 0x5b, 0x9c, 0x92, 0xad,
|
||||
0x5f, 0x01, 0x49, 0x4d, 0x49, 0x6c, 0xe0, 0xe4, 0x60, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xcc,
|
||||
0x13, 0x16, 0xd0, 0x64, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *EventCreateGroup) Marshal() (dAtA []byte, err error) {
|
||||
|
@ -523,6 +571,34 @@ func (m *EventCreateProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *EventWithdrawProposal) 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 *EventWithdrawProposal) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *EventWithdrawProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.ProposalId != 0 {
|
||||
i = encodeVarintEvents(dAtA, i, uint64(m.ProposalId))
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *EventVote) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
|
@ -652,6 +728,18 @@ func (m *EventCreateProposal) Size() (n int) {
|
|||
return n
|
||||
}
|
||||
|
||||
func (m *EventWithdrawProposal) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.ProposalId != 0 {
|
||||
n += 1 + sovEvents(uint64(m.ProposalId))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *EventVote) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
|
@ -1053,6 +1141,75 @@ func (m *EventCreateProposal) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
func (m *EventWithdrawProposal) 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 ErrIntOverflowEvents
|
||||
}
|
||||
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: EventWithdrawProposal: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: EventWithdrawProposal: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType)
|
||||
}
|
||||
m.ProposalId = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowEvents
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.ProposalId |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipEvents(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthEvents
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *EventVote) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
|
|
@ -1370,6 +1370,94 @@ func (s *TestSuite) TestCreateProposal() {
|
|||
}
|
||||
}
|
||||
|
||||
func (s *TestSuite) TestWithdrawProposal() {
|
||||
addrs := s.addrs
|
||||
addr2 := addrs[1]
|
||||
addr5 := addrs[4]
|
||||
groupPolicy := s.groupPolicyAddr
|
||||
|
||||
msgSend := &banktypes.MsgSend{
|
||||
FromAddress: s.groupPolicyAddr.String(),
|
||||
ToAddress: addr2.String(),
|
||||
Amount: sdk.Coins{sdk.NewInt64Coin("test", 100)},
|
||||
}
|
||||
|
||||
proposers := []string{addr2.String()}
|
||||
proposalID := createProposal(s.ctx, s, []sdk.Msg{msgSend}, proposers)
|
||||
|
||||
specs := map[string]struct {
|
||||
preRun func(sdkCtx sdk.Context) uint64
|
||||
proposalId uint64
|
||||
admin string
|
||||
expErrMsg string
|
||||
}{
|
||||
"wrong admin": {
|
||||
preRun: func(sdkCtx sdk.Context) uint64 {
|
||||
return createProposal(s.ctx, s, []sdk.Msg{msgSend}, proposers)
|
||||
},
|
||||
admin: addr5.String(),
|
||||
expErrMsg: "unauthorized",
|
||||
},
|
||||
"wrong proposalId": {
|
||||
preRun: func(sdkCtx sdk.Context) uint64 {
|
||||
return 1111
|
||||
},
|
||||
admin: proposers[0],
|
||||
expErrMsg: "not found",
|
||||
},
|
||||
"happy case with proposer": {
|
||||
preRun: func(sdkCtx sdk.Context) uint64 {
|
||||
return createProposal(s.ctx, s, []sdk.Msg{msgSend}, proposers)
|
||||
},
|
||||
proposalId: proposalID,
|
||||
admin: proposers[0],
|
||||
},
|
||||
"already closed proposal": {
|
||||
preRun: func(sdkCtx sdk.Context) uint64 {
|
||||
pId := createProposal(s.ctx, s, []sdk.Msg{msgSend}, proposers)
|
||||
_, err := s.keeper.WithdrawProposal(s.ctx, &group.MsgWithdrawProposal{
|
||||
ProposalId: pId,
|
||||
Address: proposers[0],
|
||||
})
|
||||
s.Require().NoError(err)
|
||||
return pId
|
||||
},
|
||||
proposalId: proposalID,
|
||||
admin: proposers[0],
|
||||
expErrMsg: "cannot withdraw a proposal with the status of STATUS_WITHDRAWN",
|
||||
},
|
||||
"happy case with group admin address": {
|
||||
preRun: func(sdkCtx sdk.Context) uint64 {
|
||||
return createProposal(s.ctx, s, []sdk.Msg{msgSend}, proposers)
|
||||
},
|
||||
proposalId: proposalID,
|
||||
admin: groupPolicy.String(),
|
||||
},
|
||||
}
|
||||
for msg, spec := range specs {
|
||||
spec := spec
|
||||
s.Run(msg, func() {
|
||||
pId := spec.preRun(s.sdkCtx)
|
||||
|
||||
_, err := s.keeper.WithdrawProposal(s.ctx, &group.MsgWithdrawProposal{
|
||||
ProposalId: pId,
|
||||
Address: spec.admin,
|
||||
})
|
||||
|
||||
if spec.expErrMsg != "" {
|
||||
s.Require().Error(err)
|
||||
s.Require().Contains(err.Error(), spec.expErrMsg)
|
||||
return
|
||||
}
|
||||
|
||||
s.Require().NoError(err)
|
||||
resp, err := s.keeper.Proposal(s.ctx, &group.QueryProposalRequest{ProposalId: pId})
|
||||
s.Require().NoError(err)
|
||||
s.Require().Equal(resp.GetProposal().Status, group.ProposalStatusWithdrawn)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func (s *TestSuite) TestVote() {
|
||||
addrs := s.addrs
|
||||
addr1 := addrs[0]
|
||||
|
|
|
@ -485,6 +485,68 @@ func (k Keeper) CreateProposal(goCtx context.Context, req *group.MsgCreatePropos
|
|||
return &group.MsgCreateProposalResponse{ProposalId: id}, nil
|
||||
}
|
||||
|
||||
func (k Keeper) WithdrawProposal(goCtx context.Context, req *group.MsgWithdrawProposal) (*group.MsgWithdrawProposalResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
id := req.ProposalId
|
||||
address := req.Address
|
||||
|
||||
proposal, err := k.getProposal(ctx, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Ensure the proposal can be withdrawn.
|
||||
if proposal.Status != group.ProposalStatusSubmitted {
|
||||
return nil, sdkerrors.Wrapf(errors.ErrInvalid, "cannot withdraw a proposal with the status of %s", proposal.Status.String())
|
||||
}
|
||||
|
||||
var policyInfo group.GroupPolicyInfo
|
||||
if policyInfo, err = k.getGroupPolicyInfo(ctx, proposal.Address); err != nil {
|
||||
return nil, sdkerrors.Wrap(err, "load group policy")
|
||||
}
|
||||
|
||||
storeUpdates := func() (*group.MsgWithdrawProposalResponse, error) {
|
||||
if err := k.proposalTable.Update(ctx.KVStore(k.key), id, &proposal); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &group.MsgWithdrawProposalResponse{}, nil
|
||||
}
|
||||
|
||||
// check address is the group policy admin.
|
||||
if address == policyInfo.Address {
|
||||
err = ctx.EventManager().EmitTypedEvent(&group.EventWithdrawProposal{ProposalId: id})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
proposal.Result = group.ProposalResultUnfinalized
|
||||
proposal.Status = group.ProposalStatusWithdrawn
|
||||
return storeUpdates()
|
||||
}
|
||||
|
||||
// if address is not group policy admin then check whether he is in proposers list.
|
||||
validProposer := false
|
||||
for _, proposer := range proposal.Proposers {
|
||||
if proposer == address {
|
||||
validProposer = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if !validProposer {
|
||||
return nil, sdkerrors.Wrapf(errors.ErrUnauthorized, "given address is neither group policy admin nor in proposers: %s", address)
|
||||
}
|
||||
|
||||
err = ctx.EventManager().EmitTypedEvent(&group.EventWithdrawProposal{ProposalId: id})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
proposal.Result = group.ProposalResultUnfinalized
|
||||
proposal.Status = group.ProposalStatusWithdrawn
|
||||
return storeUpdates()
|
||||
}
|
||||
|
||||
func (k Keeper) Vote(goCtx context.Context, req *group.MsgVote) (*group.MsgVoteResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
id := req.ProposalId
|
||||
|
|
|
@ -599,6 +599,42 @@ func (m MsgCreateProposal) UnpackInterfaces(unpacker types.AnyUnpacker) error {
|
|||
return tx.UnpackInterfaces(unpacker, m.Msgs)
|
||||
}
|
||||
|
||||
var _ sdk.Msg = &MsgWithdrawProposal{}
|
||||
|
||||
// Route Implements Msg.
|
||||
func (m MsgWithdrawProposal) Route() string { return sdk.MsgTypeURL(&m) }
|
||||
|
||||
// Type Implements Msg.
|
||||
func (m MsgWithdrawProposal) Type() string { return sdk.MsgTypeURL(&m) }
|
||||
|
||||
// GetSignBytes Implements Msg.
|
||||
func (m MsgWithdrawProposal) GetSignBytes() []byte {
|
||||
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
|
||||
}
|
||||
|
||||
// GetSigners returns the expected signers for a MsgWithdrawProposal.
|
||||
func (m MsgWithdrawProposal) GetSigners() []sdk.AccAddress {
|
||||
admin, err := sdk.AccAddressFromBech32(m.Address)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return []sdk.AccAddress{admin}
|
||||
}
|
||||
|
||||
// ValidateBasic does a sanity check on the provided data
|
||||
func (m MsgWithdrawProposal) ValidateBasic() error {
|
||||
_, err := sdk.AccAddressFromBech32(m.Address)
|
||||
if err != nil {
|
||||
return sdkerrors.Wrap(err, "admin")
|
||||
}
|
||||
|
||||
if m.ProposalId == 0 {
|
||||
return sdkerrors.Wrap(errors.ErrEmpty, "proposal id")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var _ sdk.Msg = &MsgVote{}
|
||||
|
||||
// Route Implements Msg.
|
||||
|
|
|
@ -721,6 +721,55 @@ func TestMsgVote(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestMsgWithdrawProposal(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
msg *group.MsgWithdrawProposal
|
||||
expErr bool
|
||||
errMsg string
|
||||
}{
|
||||
{
|
||||
"invalid address",
|
||||
&group.MsgWithdrawProposal{
|
||||
Address: "address",
|
||||
},
|
||||
true,
|
||||
"decoding bech32 failed",
|
||||
},
|
||||
{
|
||||
"proposal id is required",
|
||||
&group.MsgWithdrawProposal{
|
||||
Address: member1.String(),
|
||||
},
|
||||
true,
|
||||
"proposal id: value is empty",
|
||||
},
|
||||
{
|
||||
"valid msg",
|
||||
&group.MsgWithdrawProposal{
|
||||
Address: member1.String(),
|
||||
ProposalId: 1,
|
||||
},
|
||||
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.MsgWithdrawProposal{}))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestMsgExec(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
|
|
|
@ -34,6 +34,7 @@ var (
|
|||
TypeMsgUpdateGroupPolicyDecisionPolicy = sdk.MsgTypeURL(&group.MsgUpdateGroupPolicyDecisionPolicy{})
|
||||
TypeMsgUpdateGroupPolicyMetadata = sdk.MsgTypeURL(&group.MsgUpdateGroupPolicyMetadata{})
|
||||
TypeMsgCreateProposal = sdk.MsgTypeURL(&group.MsgCreateProposal{})
|
||||
TypeMsgWithdrawProposal = sdk.MsgTypeURL(&group.MsgWithdrawProposal{})
|
||||
TypeMsgVote = sdk.MsgTypeURL(&group.MsgVote{})
|
||||
TypeMsgExec = sdk.MsgTypeURL(&group.MsgExec{})
|
||||
)
|
||||
|
@ -44,17 +45,18 @@ 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_account"
|
||||
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"
|
||||
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"
|
||||
OpMsgCreateProposal = "op_weight_msg_create_proposal"
|
||||
OpMsgWithdrawProposal = "op_weight_msg_withdraw_proposal"
|
||||
OpMsgVote = "op_weight_msg_vote"
|
||||
OpMsgExec = "ops_weight_msg_exec"
|
||||
OpMsgExec = "op_weight_msg_exec"
|
||||
)
|
||||
|
||||
// If update group or group account txn's executed, `SimulateMsgVote` & `SimulateMsgExec` txn's returns `noOp`.
|
||||
// That's why we have less weight for update group & group-account txn's.
|
||||
// If update group or group policy txn's executed, `SimulateMsgVote` & `SimulateMsgExec` txn's returns `noOp`.
|
||||
// That's why we have less weight for update group & group-policy txn's.
|
||||
const (
|
||||
WeightMsgCreateGroup = 100
|
||||
WeightMsgCreateGroupPolicy = 100
|
||||
|
@ -67,6 +69,7 @@ const (
|
|||
WeightMsgUpdateGroupPolicyAdmin = 5
|
||||
WeightMsgUpdateGroupPolicyDecisionPolicy = 5
|
||||
WeightMsgUpdateGroupPolicyMetadata = 5
|
||||
WeightMsgWithdrawProposal = 20
|
||||
)
|
||||
|
||||
const GroupMemberWeight = 40
|
||||
|
@ -87,6 +90,7 @@ func WeightedOperations(
|
|||
weightMsgCreateProposal int
|
||||
weightMsgVote int
|
||||
weightMsgExec int
|
||||
weightMsgWithdrawProposal int
|
||||
)
|
||||
|
||||
appParams.GetOrGenerate(cdc, OpMsgCreateGroup, &weightMsgCreateGroup, nil,
|
||||
|
@ -144,8 +148,22 @@ func WeightedOperations(
|
|||
weightMsgUpdateGroupPolicyMetadata = WeightMsgUpdateGroupPolicyMetadata
|
||||
},
|
||||
)
|
||||
appParams.GetOrGenerate(cdc, OpMsgWithdrawProposal, &weightMsgWithdrawProposal, nil,
|
||||
func(_ *rand.Rand) {
|
||||
weightMsgWithdrawProposal = WeightMsgWithdrawProposal
|
||||
},
|
||||
)
|
||||
|
||||
return simulation.WeightedOperations{
|
||||
// create two proposals for weightedOperations
|
||||
var createProposalOps simulation.WeightedOperations
|
||||
for i := 0; i < 2; i++ {
|
||||
createProposalOps = append(createProposalOps, simulation.NewWeightedOperation(
|
||||
weightMsgCreateProposal,
|
||||
SimulateMsgCreateProposal(ak, bk, k),
|
||||
))
|
||||
}
|
||||
|
||||
wPreCreateProposalOps := simulation.WeightedOperations{
|
||||
simulation.NewWeightedOperation(
|
||||
weightMsgCreateGroup,
|
||||
SimulateMsgCreateGroup(ak, bk),
|
||||
|
@ -154,9 +172,12 @@ func WeightedOperations(
|
|||
weightMsgCreateGroupPolicy,
|
||||
SimulateMsgCreateGroupPolicy(ak, bk, k),
|
||||
),
|
||||
}
|
||||
|
||||
wPostCreateProposalOps := simulation.WeightedOperations{
|
||||
simulation.NewWeightedOperation(
|
||||
weightMsgCreateProposal,
|
||||
SimulateMsgCreateProposal(ak, bk, k),
|
||||
WeightMsgWithdrawProposal,
|
||||
SimulateMsgWithdrawProposal(ak, bk, k),
|
||||
),
|
||||
simulation.NewWeightedOperation(
|
||||
weightMsgVote,
|
||||
|
@ -191,6 +212,8 @@ func WeightedOperations(
|
|||
SimulateMsgUpdateGroupPolicyMetadata(ak, bk, k),
|
||||
),
|
||||
}
|
||||
|
||||
return append(wPreCreateProposalOps, append(createProposalOps, wPostCreateProposalOps...)...)
|
||||
}
|
||||
|
||||
// SimulateMsgCreateGroup generates a MsgCreateGroup with random values
|
||||
|
@ -699,6 +722,118 @@ func SimulateMsgUpdateGroupPolicyMetadata(ak group.AccountKeeper,
|
|||
}
|
||||
}
|
||||
|
||||
// SimulateMsgWithdrawProposal generates a MsgWithdrawProposal with random values
|
||||
func SimulateMsgWithdrawProposal(ak group.AccountKeeper,
|
||||
bk group.BankKeeper, k keeper.Keeper) simtypes.Operation {
|
||||
return func(
|
||||
r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) {
|
||||
g, groupPolicy, _, _, err := randomGroupPolicy(r, k, ak, sdkCtx, accounts)
|
||||
if err != nil {
|
||||
return simtypes.NoOpMsg(group.ModuleName, TypeMsgWithdrawProposal, ""), nil, err
|
||||
}
|
||||
if g == nil {
|
||||
return simtypes.NoOpMsg(group.ModuleName, TypeMsgWithdrawProposal, "no group found"), nil, nil
|
||||
}
|
||||
if groupPolicy == nil {
|
||||
return simtypes.NoOpMsg(group.ModuleName, TypeMsgWithdrawProposal, "no group policy found"), nil, nil
|
||||
}
|
||||
|
||||
groupPolicyAddr := groupPolicy.Address
|
||||
ctx := sdk.WrapSDKContext(sdkCtx)
|
||||
|
||||
policy := groupPolicy.GetDecisionPolicy()
|
||||
err = policy.Validate(*g)
|
||||
if err != nil {
|
||||
return simtypes.NoOpMsg(group.ModuleName, TypeMsgWithdrawProposal, err.Error()), nil, nil
|
||||
}
|
||||
|
||||
proposalsResult, err := k.ProposalsByGroupPolicy(ctx, &group.QueryProposalsByGroupPolicyRequest{Address: groupPolicyAddr})
|
||||
if err != nil {
|
||||
return simtypes.NoOpMsg(group.ModuleName, TypeMsgWithdrawProposal, "fail to query group info"), nil, err
|
||||
}
|
||||
|
||||
proposals := proposalsResult.GetProposals()
|
||||
if len(proposals) == 0 {
|
||||
return simtypes.NoOpMsg(group.ModuleName, TypeMsgWithdrawProposal, "no proposals found"), nil, nil
|
||||
}
|
||||
|
||||
var proposal *group.Proposal
|
||||
proposalID := -1
|
||||
|
||||
for _, p := range proposals {
|
||||
if p.Status == group.ProposalStatusSubmitted {
|
||||
timeout := p.Timeout
|
||||
proposal = p
|
||||
proposalID = int(p.ProposalId)
|
||||
if timeout.Before(sdkCtx.BlockTime()) || timeout.Equal(sdkCtx.BlockTime()) {
|
||||
return simtypes.NoOpMsg(group.ModuleName, TypeMsgWithdrawProposal, "voting period ended: skipping"), nil, nil
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// return no-op if no proposal found
|
||||
if proposalID == -1 {
|
||||
return simtypes.NoOpMsg(group.ModuleName, TypeMsgWithdrawProposal, "no proposals found"), nil, nil
|
||||
}
|
||||
|
||||
// Ensure that group and group policy haven't been modified since the proposal submission.
|
||||
if proposal.GroupPolicyVersion != groupPolicy.Version {
|
||||
return simtypes.NoOpMsg(group.ModuleName, TypeMsgWithdrawProposal, "group policy has been modified"), nil, nil
|
||||
}
|
||||
|
||||
// Ensure the group hasn't been modified.
|
||||
if proposal.GroupVersion != g.Version {
|
||||
return simtypes.NoOpMsg(group.ModuleName, TypeMsgWithdrawProposal, "group has been modified"), nil, nil
|
||||
}
|
||||
|
||||
// select a random proposer
|
||||
proposers := proposal.Proposers
|
||||
n := randIntInRange(r, len(proposers))
|
||||
proposerIdx := findAccount(accounts, proposers[n])
|
||||
proposer := accounts[proposerIdx]
|
||||
proposerAcc := ak.GetAccount(sdkCtx, proposer.Address)
|
||||
|
||||
spendableCoins := bk.SpendableCoins(sdkCtx, proposer.Address)
|
||||
fees, err := simtypes.RandomFees(r, sdkCtx, spendableCoins)
|
||||
if err != nil {
|
||||
return simtypes.NoOpMsg(group.ModuleName, TypeMsgWithdrawProposal, "fee error"), nil, err
|
||||
}
|
||||
|
||||
msg := group.MsgWithdrawProposal{
|
||||
ProposalId: uint64(proposalID),
|
||||
Address: proposer.Address.String(),
|
||||
}
|
||||
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
tx, err := helpers.GenTx(
|
||||
txGen,
|
||||
[]sdk.Msg{&msg},
|
||||
fees,
|
||||
helpers.DefaultGenTxGas,
|
||||
chainID,
|
||||
[]uint64{proposerAcc.GetAccountNumber()},
|
||||
[]uint64{proposerAcc.GetSequence()},
|
||||
proposer.PrivKey,
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return simtypes.NoOpMsg(group.ModuleName, TypeMsgUpdateGroupPolicyMetadata, "unable to generate mock tx"), nil, err
|
||||
}
|
||||
|
||||
_, _, err = app.SimDeliver(txGen.TxEncoder(), tx)
|
||||
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "group was modified") || strings.Contains(err.Error(), "group policy was modified") {
|
||||
return simtypes.NoOpMsg(group.ModuleName, msg.Type(), "no-op:group/group-policy was modified"), nil, nil
|
||||
}
|
||||
return simtypes.NoOpMsg(group.ModuleName, msg.Type(), "unable to deliver tx"), nil, err
|
||||
}
|
||||
|
||||
return simtypes.NewOperationMsg(&msg, true, "", nil), nil, err
|
||||
}
|
||||
}
|
||||
|
||||
// SimulateMsgVote generates a MsgVote with random values
|
||||
func SimulateMsgVote(ak group.AccountKeeper,
|
||||
bk group.BankKeeper, k keeper.Keeper) simtypes.Operation {
|
||||
|
@ -802,8 +937,8 @@ func SimulateMsgVote(ak group.AccountKeeper,
|
|||
_, _, err = app.SimDeliver(txGen.TxEncoder(), tx)
|
||||
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "group was modified") || strings.Contains(err.Error(), "group account was modified") {
|
||||
return simtypes.NoOpMsg(group.ModuleName, msg.Type(), "no-op:group/group-account was modified"), nil, nil
|
||||
if strings.Contains(err.Error(), "group was modified") || strings.Contains(err.Error(), "group policy was modified") {
|
||||
return simtypes.NoOpMsg(group.ModuleName, msg.Type(), "no-op:group/group-policy was modified"), nil, nil
|
||||
}
|
||||
return simtypes.NoOpMsg(group.ModuleName, msg.Type(), "unable to deliver tx"), nil, err
|
||||
}
|
||||
|
@ -877,8 +1012,8 @@ func SimulateMsgExec(ak group.AccountKeeper,
|
|||
|
||||
_, _, err = app.SimDeliver(txGen.TxEncoder(), tx)
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "group was modified") || strings.Contains(err.Error(), "group account was modified") {
|
||||
return simtypes.NoOpMsg(group.ModuleName, msg.Type(), "no-op:group/group-account was modified"), nil, nil
|
||||
if strings.Contains(err.Error(), "group was modified") || strings.Contains(err.Error(), "group policy was modified") {
|
||||
return simtypes.NoOpMsg(group.ModuleName, msg.Type(), "no-op:group/group-policy was modified"), nil, nil
|
||||
}
|
||||
return simtypes.NoOpMsg(group.ModuleName, msg.Type(), "unable to deliver tx"), nil, err
|
||||
}
|
||||
|
|
|
@ -52,6 +52,8 @@ func (suite *SimTestSuite) TestWeightedOperations() {
|
|||
{simulation.WeightMsgCreateGroup, group.MsgCreateGroup{}.Route(), simulation.TypeMsgCreateGroup},
|
||||
{simulation.WeightMsgCreateGroupPolicy, group.MsgCreateGroupPolicy{}.Route(), simulation.TypeMsgCreateGroupPolicy},
|
||||
{simulation.WeightMsgCreateProposal, group.MsgCreateProposal{}.Route(), simulation.TypeMsgCreateProposal},
|
||||
{simulation.WeightMsgCreateProposal, group.MsgCreateProposal{}.Route(), simulation.TypeMsgCreateProposal},
|
||||
{simulation.WeightMsgWithdrawProposal, group.MsgWithdrawProposal{}.Route(), simulation.TypeMsgWithdrawProposal},
|
||||
{simulation.WeightMsgVote, group.MsgVote{}.Route(), simulation.TypeMsgVote},
|
||||
{simulation.WeightMsgExec, group.MsgExec{}.Route(), simulation.TypeMsgExec},
|
||||
{simulation.WeightMsgUpdateGroupMetadata, group.MsgUpdateGroupMetadata{}.Route(), simulation.TypeMsgUpdateGroupMetadata},
|
||||
|
@ -67,7 +69,6 @@ func (suite *SimTestSuite) TestWeightedOperations() {
|
|||
// the following checks are very much dependent from the ordering of the output given
|
||||
// by WeightedOperations. if the ordering in WeightedOperations changes some tests
|
||||
// will fail
|
||||
// fmt.Printf("%v %v\n", operationMsg, w.Weight())
|
||||
suite.Require().Equal(expected[i].weight, w.Weight(), "weight should be the same")
|
||||
suite.Require().Equal(expected[i].opMsgRoute, operationMsg.Route, "route should be the same")
|
||||
suite.Require().Equal(expected[i].opMsgName, operationMsg.Name, "operation Msg name should be the same")
|
||||
|
@ -215,6 +216,73 @@ func (suite *SimTestSuite) TestSimulateCreateProposal() {
|
|||
suite.Require().Len(futureOperations, 0)
|
||||
}
|
||||
|
||||
func (suite *SimTestSuite) TestWithdrawProposal() {
|
||||
// setup 1 account
|
||||
s := rand.NewSource(1)
|
||||
r := rand.New(s)
|
||||
accounts := suite.getTestingAccounts(r, 3)
|
||||
acc := accounts[0]
|
||||
|
||||
// setup a group
|
||||
ctx := sdk.WrapSDKContext(suite.ctx)
|
||||
addr := acc.Address.String()
|
||||
groupRes, err := suite.app.GroupKeeper.CreateGroup(ctx,
|
||||
&group.MsgCreateGroup{
|
||||
Admin: addr,
|
||||
Members: []group.Member{
|
||||
{
|
||||
Address: addr,
|
||||
Weight: "1",
|
||||
},
|
||||
},
|
||||
},
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
// setup a group account
|
||||
accountReq := &group.MsgCreateGroupPolicy{
|
||||
Admin: addr,
|
||||
GroupId: groupRes.GroupId,
|
||||
Metadata: nil,
|
||||
}
|
||||
err = accountReq.SetDecisionPolicy(group.NewThresholdDecisionPolicy("1", time.Hour))
|
||||
suite.Require().NoError(err)
|
||||
groupPolicyRes, err := suite.app.GroupKeeper.CreateGroupPolicy(ctx, accountReq)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
// setup a proposal
|
||||
proposalReq, err := group.NewMsgCreateProposalRequest(groupPolicyRes.Address, []string{addr}, []sdk.Msg{
|
||||
&banktypes.MsgSend{
|
||||
FromAddress: groupPolicyRes.Address,
|
||||
ToAddress: addr,
|
||||
Amount: sdk.Coins{sdk.NewInt64Coin("token", 100)},
|
||||
},
|
||||
}, []byte{}, 0)
|
||||
suite.Require().NoError(err)
|
||||
_, err = suite.app.GroupKeeper.CreateProposal(ctx, proposalReq)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
// begin a new block
|
||||
suite.app.BeginBlock(abci.RequestBeginBlock{
|
||||
Header: tmproto.Header{
|
||||
Height: suite.app.LastBlockHeight() + 1,
|
||||
AppHash: suite.app.LastCommitID().Hash,
|
||||
},
|
||||
})
|
||||
|
||||
// execute operation
|
||||
op := simulation.SimulateMsgWithdrawProposal(suite.app.AccountKeeper, suite.app.BankKeeper, suite.app.GroupKeeper)
|
||||
operationMsg, futureOperations, err := op(r, suite.app.BaseApp, suite.ctx, accounts, "")
|
||||
suite.Require().NoError(err)
|
||||
|
||||
var msg group.MsgWithdrawProposal
|
||||
err = group.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg)
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().True(operationMsg.OK)
|
||||
suite.Require().Equal(addr, msg.Address)
|
||||
suite.Require().Len(futureOperations, 0)
|
||||
}
|
||||
|
||||
func (suite *SimTestSuite) TestSimulateVote() {
|
||||
// setup 1 account
|
||||
s := rand.NewSource(1)
|
||||
|
|
|
@ -86,6 +86,16 @@ An optional `Exec` value can be provided to try to execute the proposal immediat
|
|||
|
||||
It's expecting to fail if metadata length is greater than `MaxMetadataLen` config.
|
||||
|
||||
## Msg/WithdrawProposal
|
||||
|
||||
A proposal can be withdrawn using `MsgWithdrawProposal` which has a `address` (can be either proposer or policy admin) and a `proposal_id` (which has to be withdrawn).
|
||||
|
||||
+++ https://github.com/cosmos/cosmos-sdk/blob/f2d6f0e4bb1a9bd7f7ae3cdc4702c9d3d1fc0329/proto/cosmos/group/v1beta1/tx.proto#L251-L258
|
||||
|
||||
It's expecting to fail if:
|
||||
- the signer is neither policy address nor proposer of the proposal.
|
||||
- the proposal is already closed or aborted.
|
||||
|
||||
## Msg/Vote
|
||||
|
||||
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.
|
||||
|
|
|
@ -41,6 +41,13 @@ The group module emits the following events:
|
|||
| message | action | /cosmos.group.v1beta1.Msg/CreateProposal |
|
||||
| cosmos.group.v1beta1.EventCreateProposal | proposal_id | {proposalId} |
|
||||
|
||||
## EventWithdrawProposal
|
||||
|
||||
| Type | Attribute Key | Attribute Value |
|
||||
|--------------------------------------------|---------------|--------------------------------------------|
|
||||
| message | action | /cosmos.group.v1beta1.Msg/WithdrawProposal |
|
||||
| cosmos.group.v1beta1.EventWithdrawProposal | proposal_id | {proposalId} |
|
||||
|
||||
## EventVote
|
||||
|
||||
| Type | Attribute Key | Attribute Value |
|
||||
|
|
|
@ -523,6 +523,20 @@ Example:
|
|||
simd tx group create-proposal cosmos1.. cosmos1.. msg_tx.json "AQ=="
|
||||
```
|
||||
|
||||
#### withdraw-proposal
|
||||
|
||||
The `withdraw-proposal` command allows users to withdraw a proposal.
|
||||
|
||||
```bash
|
||||
simd tx group withdraw-proposal [proposal-id] [group-policy-admin-or-proposer]
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
simd tx group withdraw-proposal 1 cosmos1..
|
||||
```
|
||||
|
||||
#### vote
|
||||
|
||||
The `vote` command allows users to vote on a proposal.
|
||||
|
|
|
@ -38,6 +38,7 @@ This module allows the creation and management of on-chain multisig accounts and
|
|||
- [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)**
|
||||
|
@ -46,6 +47,7 @@ This module allows the creation and management of on-chain multisig accounts and
|
|||
- [EventCreateGroupPolicy](04_events.md#eventcreategrouppolicy)
|
||||
- [EventUpdateGroupPolicy](04_events.md#eventupdategrouppolicy)
|
||||
- [EventCreateProposal](04_events.md#eventcreateproposal)
|
||||
- [EventWithdrawProposal](04_events.md#eventwithdrawproposal)
|
||||
- [EventVote](04_events.md#eventvote)
|
||||
- [EventExec](04_events.md#eventexec)
|
||||
5. **[Client](05_client.md)**
|
||||
|
|
509
x/group/tx.pb.go
509
x/group/tx.pb.go
|
@ -950,6 +950,98 @@ func (m *MsgCreateProposalResponse) GetProposalId() uint64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
// MsgWithdrawProposal is the Msg/WithdrawProposal request type.
|
||||
type MsgWithdrawProposal struct {
|
||||
// proposal is the unique ID of the proposal.
|
||||
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
|
||||
// address is the admin of the group policy or one of the proposer of the proposal.
|
||||
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
|
||||
}
|
||||
|
||||
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}
|
||||
}
|
||||
func (m *MsgWithdrawProposal) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgWithdrawProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgWithdrawProposal.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 *MsgWithdrawProposal) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgWithdrawProposal.Merge(m, src)
|
||||
}
|
||||
func (m *MsgWithdrawProposal) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgWithdrawProposal) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgWithdrawProposal.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgWithdrawProposal proto.InternalMessageInfo
|
||||
|
||||
func (m *MsgWithdrawProposal) GetProposalId() uint64 {
|
||||
if m != nil {
|
||||
return m.ProposalId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *MsgWithdrawProposal) GetAddress() string {
|
||||
if m != nil {
|
||||
return m.Address
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type.
|
||||
type MsgWithdrawProposalResponse struct {
|
||||
}
|
||||
|
||||
func (m *MsgWithdrawProposalResponse) Reset() { *m = MsgWithdrawProposalResponse{} }
|
||||
func (m *MsgWithdrawProposalResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgWithdrawProposalResponse) ProtoMessage() {}
|
||||
func (*MsgWithdrawProposalResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_da0de9d603d844fb, []int{19}
|
||||
}
|
||||
func (m *MsgWithdrawProposalResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgWithdrawProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgWithdrawProposalResponse.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 *MsgWithdrawProposalResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgWithdrawProposalResponse.Merge(m, src)
|
||||
}
|
||||
func (m *MsgWithdrawProposalResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgWithdrawProposalResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgWithdrawProposalResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgWithdrawProposalResponse proto.InternalMessageInfo
|
||||
|
||||
// MsgVote is the Msg/Vote request type.
|
||||
type MsgVote struct {
|
||||
// proposal is the unique ID of the proposal.
|
||||
|
@ -969,7 +1061,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{18}
|
||||
return fileDescriptor_da0de9d603d844fb, []int{20}
|
||||
}
|
||||
func (m *MsgVote) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
|
@ -1041,7 +1133,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{19}
|
||||
return fileDescriptor_da0de9d603d844fb, []int{21}
|
||||
}
|
||||
func (m *MsgVoteResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
|
@ -1082,7 +1174,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{20}
|
||||
return fileDescriptor_da0de9d603d844fb, []int{22}
|
||||
}
|
||||
func (m *MsgExec) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
|
@ -1133,7 +1225,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{21}
|
||||
return fileDescriptor_da0de9d603d844fb, []int{23}
|
||||
}
|
||||
func (m *MsgExecResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
|
@ -1182,6 +1274,8 @@ func init() {
|
|||
proto.RegisterType((*MsgUpdateGroupPolicyMetadataResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadataResponse")
|
||||
proto.RegisterType((*MsgCreateProposal)(nil), "cosmos.group.v1beta1.MsgCreateProposal")
|
||||
proto.RegisterType((*MsgCreateProposalResponse)(nil), "cosmos.group.v1beta1.MsgCreateProposalResponse")
|
||||
proto.RegisterType((*MsgWithdrawProposal)(nil), "cosmos.group.v1beta1.MsgWithdrawProposal")
|
||||
proto.RegisterType((*MsgWithdrawProposalResponse)(nil), "cosmos.group.v1beta1.MsgWithdrawProposalResponse")
|
||||
proto.RegisterType((*MsgVote)(nil), "cosmos.group.v1beta1.MsgVote")
|
||||
proto.RegisterType((*MsgVoteResponse)(nil), "cosmos.group.v1beta1.MsgVoteResponse")
|
||||
proto.RegisterType((*MsgExec)(nil), "cosmos.group.v1beta1.MsgExec")
|
||||
|
@ -1191,72 +1285,75 @@ func init() {
|
|||
func init() { proto.RegisterFile("cosmos/group/v1beta1/tx.proto", fileDescriptor_da0de9d603d844fb) }
|
||||
|
||||
var fileDescriptor_da0de9d603d844fb = []byte{
|
||||
// 1039 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x41, 0x6f, 0x1b, 0x45,
|
||||
0x14, 0xf6, 0xd4, 0xdb, 0x24, 0x7e, 0x2e, 0x6e, 0xb2, 0x35, 0xc5, 0x59, 0x12, 0xdb, 0x2c, 0x01,
|
||||
0x8c, 0x49, 0x76, 0x89, 0x53, 0x04, 0xb2, 0x2a, 0x44, 0x92, 0x1a, 0x64, 0x09, 0xa3, 0xb0, 0xa5,
|
||||
0x08, 0xb8, 0x58, 0x6b, 0xef, 0xb0, 0x5d, 0x88, 0x77, 0x56, 0x9e, 0x4d, 0x1a, 0x5f, 0x7b, 0x42,
|
||||
0xea, 0x85, 0x3f, 0x80, 0x84, 0x84, 0xc4, 0x81, 0x13, 0x87, 0x5e, 0xb8, 0x72, 0xaa, 0x38, 0x55,
|
||||
0x9c, 0x38, 0xa1, 0x2a, 0x39, 0x80, 0xc4, 0x81, 0x5f, 0x80, 0x84, 0x3c, 0xb3, 0x3b, 0xf1, 0x36,
|
||||
0xeb, 0x78, 0x6d, 0x45, 0x3d, 0x25, 0xb3, 0xef, 0x7b, 0xef, 0x7d, 0xdf,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 0x54, 0xc9, 0xd6, 0xf2, 0x1a, 0xbf, 0x1f, 0xb4, 0xf0, 0x7e,
|
||||
0xd0, 0xb6, 0xdd, 0xc1, 0x8e, 0xfc, 0xdb, 0xc3, 0x8d, 0xdc, 0xad, 0xc0, 0x81, 0x33, 0x35, 0x72,
|
||||
0x56, 0x64, 0x5d, 0xcf, 0x7d, 0xf3, 0x7d, 0x29, 0x35, 0x52, 0x04, 0x03, 0x56, 0xe2, 0x14, 0x8a,
|
||||
0xf3, 0x56, 0x83, 0x79, 0x93, 0x2b, 0x9a, 0xa8, 0x35, 0x04, 0xaa, 0xbf, 0x22, 0x58, 0x8e, 0x56,
|
||||
0x96, 0x07, 0x9d, 0xad, 0x63, 0x47, 0x18, 0x5c, 0x4a, 0xc8, 0xe0, 0x22, 0x5a, 0xf9, 0x65, 0x78,
|
||||
0x69, 0xac, 0x06, 0xd1, 0x20, 0xff, 0x20, 0x50, 0xe3, 0x50, 0xd1, 0x4d, 0x78, 0x26, 0x92, 0x63,
|
||||
0x7a, 0x25, 0x7d, 0xc1, 0xbd, 0xb2, 0x0e, 0xd5, 0xc9, 0x62, 0x45, 0x6d, 0x7e, 0x42, 0xac, 0xb5,
|
||||
0xce, 0xc0, 0x67, 0x3e, 0xf2, 0xb3, 0x54, 0x25, 0xe9, 0x5d, 0xf0, 0x2a, 0xac, 0x9d, 0xc7, 0x55,
|
||||
0x88, 0xfa, 0x17, 0xc1, 0x92, 0x38, 0x2f, 0x7b, 0x7d, 0xe2, 0x11, 0x6a, 0xee, 0xcf, 0x72, 0x48,
|
||||
0xe4, 0x15, 0xc8, 0x78, 0xcc, 0x3f, 0x1c, 0xa5, 0x19, 0xe3, 0xf4, 0xc3, 0xb9, 0xb7, 0x42, 0x05,
|
||||
0xa4, 0x1e, 0xb5, 0x69, 0x41, 0x62, 0x83, 0x27, 0x76, 0x7b, 0x0d, 0x86, 0x90, 0x35, 0x90, 0xf0,
|
||||
0x11, 0xee, 0x16, 0x2e, 0x97, 0x51, 0x25, 0x57, 0x53, 0xe2, 0x47, 0x54, 0xe3, 0x08, 0x77, 0x0d,
|
||||
0x86, 0xab, 0xcb, 0xe1, 0x86, 0x9f, 0x32, 0x51, 0x6f, 0xb2, 0xb3, 0x1c, 0x15, 0x2c, 0x6e, 0x87,
|
||||
0x12, 0x64, 0xbd, 0xe0, 0xdb, 0xe9, 0x40, 0x86, 0xf0, 0x53, 0xd3, 0x52, 0xff, 0x46, 0x30, 0xdf,
|
||||
0xa2, 0xf6, 0xa7, 0xc4, 0x9f, 0x0c, 0x1e, 0x36, 0xc4, 0x21, 0xf1, 0x71, 0x7f, 0xe2, 0xf6, 0x72,
|
||||
0x98, 0x7c, 0x03, 0xe6, 0xba, 0x77, 0x89, 0xd3, 0xc5, 0xac, 0x44, 0xb9, 0x71, 0x33, 0x78, 0x97,
|
||||
0x61, 0x8c, 0x00, 0x1b, 0x29, 0xad, 0xf4, 0x54, 0x69, 0xa7, 0x2d, 0x18, 0x6f, 0x21, 0xc6, 0x46,
|
||||
0x5d, 0x82, 0xab, 0x81, 0x52, 0xd1, 0x2d, 0x0e, 0x13, 0x3f, 0xc4, 0x4f, 0x16, 0xff, 0x26, 0xcc,
|
||||
0x51, 0xc7, 0x76, 0x13, 0xa8, 0x0f, 0x70, 0xf5, 0xec, 0x30, 0x79, 0xb0, 0x08, 0xb2, 0x33, 0x6a,
|
||||
0x41, 0xf6, 0x6a, 0x15, 0x24, 0x96, 0x3a, 0x0f, 0x8b, 0x8d, 0xcf, 0x1a, 0xbb, 0xed, 0x3b, 0x1f,
|
||||
0xdd, 0xde, 0x6b, 0xec, 0x36, 0xdf, 0x6f, 0x36, 0x6e, 0x2d, 0xa6, 0xe4, 0x2b, 0xb0, 0xc0, 0xbe,
|
||||
0x7e, 0x62, 0x7c, 0xbe, 0x88, 0x6a, 0xff, 0x65, 0x20, 0xdd, 0xa2, 0xb6, 0x6c, 0x42, 0x76, 0xf4,
|
||||
0x75, 0xb8, 0x36, 0xe6, 0x55, 0x13, 0x99, 0x18, 0xca, 0x7a, 0x12, 0x94, 0xe8, 0x99, 0x43, 0x90,
|
||||
0x63, 0x9e, 0x68, 0x6f, 0x8c, 0x8d, 0x71, 0x16, 0xac, 0x6c, 0x4d, 0x01, 0x16, 0x79, 0x3d, 0x58,
|
||||
0x3c, 0xf3, 0x7a, 0x7a, 0x3d, 0x49, 0x20, 0x06, 0x55, 0x36, 0x13, 0x43, 0x45, 0xc6, 0x01, 0x5c,
|
||||
0x8b, 0x7b, 0xea, 0xac, 0x27, 0x63, 0xcf, 0xd1, 0xca, 0x8d, 0x69, 0xd0, 0x22, 0x35, 0x85, 0xa5,
|
||||
0xb3, 0xaf, 0x96, 0x6a, 0x92, 0x7d, 0xe2, 0x58, 0xa5, 0x96, 0x1c, 0x2b, 0x92, 0xde, 0x47, 0x70,
|
||||
0x7d, 0xcc, 0xd0, 0xd7, 0x93, 0xa8, 0x18, 0x71, 0x50, 0xde, 0x9e, 0xd2, 0x41, 0x90, 0xf8, 0x0e,
|
||||
0x41, 0x69, 0xd2, 0x3c, 0x7e, 0x27, 0x79, 0xf0, 0xa8, 0xa7, 0xf2, 0xde, 0xac, 0x9e, 0x82, 0xdf,
|
||||
0x03, 0x04, 0xcb, 0xe3, 0x67, 0x62, 0x2d, 0x79, 0x7c, 0xd1, 0x21, 0xf5, 0xe9, 0x7d, 0x04, 0x9b,
|
||||
0xaf, 0x20, 0xf7, 0xd4, 0x2c, 0x7b, 0x6d, 0xc2, 0xc6, 0x87, 0x40, 0x45, 0x4f, 0x08, 0x14, 0xb9,
|
||||
0x3e, 0x04, 0x89, 0xcd, 0x81, 0xd5, 0xb1, 0x8e, 0x43, 0xb3, 0xf2, 0xca, 0xb9, 0xe6, 0xd1, 0x68,
|
||||
0xec, 0x76, 0x1b, 0x1f, 0x6d, 0x68, 0x3e, 0x27, 0xda, 0xe8, 0x5d, 0xb9, 0xf3, 0xee, 0xa3, 0xe3,
|
||||
0x22, 0x7a, 0x7c, 0x5c, 0x44, 0x4f, 0x8e, 0x8b, 0xe8, 0xdb, 0x93, 0x62, 0xea, 0xf1, 0x49, 0x31,
|
||||
0xf5, 0xc7, 0x49, 0x31, 0xf5, 0xc5, 0x9a, 0xed, 0xf8, 0x77, 0x0f, 0x3a, 0x5a, 0x97, 0xf4, 0x82,
|
||||
0x9f, 0xe8, 0xc1, 0x9f, 0x0d, 0x6a, 0x7d, 0xad, 0x1f, 0xf1, 0x9f, 0xe1, 0x9d, 0x39, 0x36, 0x7d,
|
||||
0xb7, 0xfe, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x20, 0xc7, 0x27, 0xc7, 0x1e, 0x10, 0x00, 0x00,
|
||||
// 1077 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0x1b, 0x45,
|
||||
0x14, 0xf7, 0xc4, 0x6e, 0x3e, 0x9e, 0x8b, 0x9b, 0x6c, 0x4d, 0x71, 0x96, 0xc4, 0x36, 0x26, 0x80,
|
||||
0x31, 0xc9, 0x2e, 0x71, 0x8a, 0x40, 0x56, 0x85, 0x48, 0x52, 0x83, 0x2c, 0x61, 0x14, 0xb6, 0x94,
|
||||
0xaf, 0x8b, 0xb5, 0xf6, 0x0e, 0x9b, 0x2d, 0xb1, 0x67, 0xe5, 0xd9, 0x7c, 0xf8, 0xda, 0x13, 0x52,
|
||||
0x2f, 0xfc, 0x03, 0x48, 0x48, 0x48, 0x1c, 0x38, 0x71, 0xe8, 0x85, 0x2b, 0xa7, 0x8a, 0x53, 0xc5,
|
||||
0x89, 0x13, 0xaa, 0x92, 0x03, 0x48, 0x1c, 0xfa, 0x2f, 0x20, 0xcf, 0xec, 0x4e, 0xbc, 0xf1, 0xae,
|
||||
0xbd, 0xb6, 0xa2, 0x9c, 0x92, 0xd9, 0xf9, 0xbd, 0xf7, 0x7e, 0xbf, 0x79, 0x6f, 0xe6, 0x3d,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e5, 0xb4, 0xc2, 0xdf, 0x07, 0xc5,
|
||||
0x7b, 0x1f, 0x94, 0xed, 0x4e, 0x6f, 0x47, 0xfa, 0xe3, 0xf1, 0x46, 0xea, 0xae, 0x6b, 0xc0, 0x99,
|
||||
0x6a, 0x29, 0xc3, 0xb7, 0xae, 0xa4, 0xbe, 0xfb, 0x31, 0x17, 0x1b, 0x38, 0x04, 0x0d, 0x56, 0x82,
|
||||
0x14, 0x8a, 0xfb, 0x56, 0x86, 0x39, 0x9d, 0x2b, 0x1a, 0xab, 0xd5, 0x03, 0x16, 0x7e, 0x47, 0xb0,
|
||||
0xec, 0x3f, 0x59, 0xee, 0x74, 0xba, 0x8a, 0x1d, 0x60, 0x30, 0x13, 0x91, 0xc1, 0x65, 0x94, 0xf2,
|
||||
0xab, 0xf0, 0x4a, 0xa8, 0x06, 0x51, 0x20, 0xff, 0x21, 0x28, 0x04, 0xa1, 0xfc, 0x49, 0xb8, 0x12,
|
||||
0xc9, 0x01, 0xb5, 0x12, 0xbf, 0xe4, 0x5a, 0x59, 0x87, 0xd2, 0x78, 0xb1, 0xe2, 0x6c, 0x7e, 0x41,
|
||||
0xac, 0xb4, 0x86, 0xe0, 0x53, 0x5f, 0xf9, 0x69, 0x4e, 0x25, 0xea, 0x5b, 0xf0, 0x3a, 0xac, 0x8d,
|
||||
0xe2, 0x2a, 0x44, 0x3d, 0x47, 0xb0, 0x24, 0xee, 0xcb, 0x5e, 0x97, 0xd8, 0x84, 0xea, 0x07, 0xd3,
|
||||
0x5c, 0x12, 0x69, 0x05, 0x16, 0x6c, 0x66, 0xef, 0xb5, 0xd2, 0x05, 0xed, 0xfc, 0xc3, 0xc8, 0x57,
|
||||
0xa1, 0x08, 0x89, 0x36, 0x35, 0x69, 0x26, 0xc1, 0x1a, 0x4f, 0x60, 0x7a, 0x35, 0x86, 0x90, 0x14,
|
||||
0x48, 0xe0, 0x13, 0xdc, 0xca, 0x5c, 0xcb, 0xa3, 0x62, 0xaa, 0x2c,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 0xcf, 0xbe, 0x7e, 0xa6, 0x7d, 0xb5, 0x88, 0xca,
|
||||
0xcf, 0x01, 0xe2, 0x75, 0x6a, 0x4a, 0x3a, 0x24, 0x07, 0x07, 0xd5, 0xb5, 0x90, 0x01, 0xcb, 0xd7,
|
||||
0xbc, 0xe4, 0xf5, 0x28, 0x28, 0x51, 0xbe, 0x47, 0x20, 0x05, 0x4c, 0x8b, 0x6f, 0x85, 0xfa, 0x18,
|
||||
0x06, 0xcb, 0x5b, 0x13, 0x80, 0x45, 0x5c, 0x1b, 0x16, 0x87, 0x06, 0xb9, 0x37, 0xa3, 0x38, 0x62,
|
||||
0x50, 0x79, 0x33, 0x32, 0x54, 0x44, 0xec, 0xc1, 0xcd, 0xa0, 0xa9, 0x6b, 0x3d, 0x1a, 0x7b, 0x8e,
|
||||
0x96, 0x6f, 0x4f, 0x82, 0x16, 0xa1, 0x29, 0x2c, 0x0d, 0x0f, 0x50, 0xa5, 0x28, 0x79, 0xe2, 0x58,
|
||||
0xb9, 0x1c, 0x1d, 0x2b, 0x82, 0x3e, 0x44, 0x70, 0x2b, 0x64, 0xfe, 0x50, 0xa3, 0xa8, 0x18, 0x30,
|
||||
0x90, 0xdf, 0x9d, 0xd0, 0x40, 0x90, 0xf8, 0x01, 0x41, 0x6e, 0xdc, 0x68, 0xf0, 0x5e, 0x74, 0xe7,
|
||||
0x7e, 0x4b, 0xf9, 0x83, 0x69, 0x2d, 0x05, 0xbf, 0x47, 0x08, 0x96, 0xc3, 0xdb, 0x73, 0x39, 0xba,
|
||||
0x7f, 0x51, 0x21, 0x95, 0xc9, 0x6d, 0x04, 0x9b, 0x07, 0x90, 0xba, 0xd0, 0x56, 0xdf, 0x18, 0x93,
|
||||
0x78, 0x0f, 0x28, 0xab, 0x11, 0x81, 0x83, 0x17, 0x70, 0xa8, 0x27, 0x85, 0x5f, 0xc0, 0x8b, 0xd0,
|
||||
0x11, 0x17, 0x30, 0xac, 0xfb, 0x48, 0x1f, 0x43, 0x82, 0x75, 0x9e, 0xd5, 0x50, 0xd3, 0xfe, 0xb6,
|
||||
0xfc, 0xda, 0xc8, 0xed, 0x41, 0x6f, 0xec, 0x3d, 0x0d, 0xf7, 0xd6, 0xdf, 0x1e, 0xe1, 0x6d, 0xf0,
|
||||
0x75, 0xde, 0x79, 0xff, 0xc9, 0x69, 0x16, 0x3d, 0x3d, 0xcd, 0xa2, 0x67, 0xa7, 0x59, 0xf4, 0xfd,
|
||||
0x59, 0x36, 0xf6, 0xf4, 0x2c, 0x1b, 0xfb, 0xeb, 0x2c, 0x1b, 0xfb, 0x7a, 0xcd, 0xb4, 0x9c, 0xfd,
|
||||
0xc3, 0xa6, 0xd2, 0x22, 0x6d, 0xf7, 0xf7, 0x09, 0xf7, 0xcf, 0x06, 0x35, 0xbe, 0x55, 0x4f, 0xf8,
|
||||
0x6f, 0x10, 0xcd, 0x59, 0x36, 0x7a, 0x6c, 0xfd, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x1d, 0x8e,
|
||||
0x60, 0x1b, 0x11, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@ -1289,6 +1386,8 @@ type MsgClient interface {
|
|||
UpdateGroupPolicyMetadata(ctx context.Context, in *MsgUpdateGroupPolicyMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyMetadataResponse, error)
|
||||
// CreateProposal submits a new proposal.
|
||||
CreateProposal(ctx context.Context, in *MsgCreateProposal, opts ...grpc.CallOption) (*MsgCreateProposalResponse, error)
|
||||
// WithdrawProposal aborts a proposal.
|
||||
WithdrawProposal(ctx context.Context, in *MsgWithdrawProposal, opts ...grpc.CallOption) (*MsgWithdrawProposalResponse, error)
|
||||
// Vote allows a voter to vote on a proposal.
|
||||
Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error)
|
||||
// Exec executes a proposal.
|
||||
|
@ -1384,6 +1483,15 @@ func (c *msgClient) CreateProposal(ctx context.Context, in *MsgCreateProposal, o
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) WithdrawProposal(ctx context.Context, in *MsgWithdrawProposal, opts ...grpc.CallOption) (*MsgWithdrawProposalResponse, error) {
|
||||
out := new(MsgWithdrawProposalResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/WithdrawProposal", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) {
|
||||
out := new(MsgVoteResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/Vote", in, out, opts...)
|
||||
|
@ -1422,6 +1530,8 @@ type MsgServer interface {
|
|||
UpdateGroupPolicyMetadata(context.Context, *MsgUpdateGroupPolicyMetadata) (*MsgUpdateGroupPolicyMetadataResponse, error)
|
||||
// CreateProposal submits a new proposal.
|
||||
CreateProposal(context.Context, *MsgCreateProposal) (*MsgCreateProposalResponse, error)
|
||||
// WithdrawProposal aborts a proposal.
|
||||
WithdrawProposal(context.Context, *MsgWithdrawProposal) (*MsgWithdrawProposalResponse, error)
|
||||
// Vote allows a voter to vote on a proposal.
|
||||
Vote(context.Context, *MsgVote) (*MsgVoteResponse, error)
|
||||
// Exec executes a proposal.
|
||||
|
@ -1459,6 +1569,9 @@ func (*UnimplementedMsgServer) UpdateGroupPolicyMetadata(ctx context.Context, re
|
|||
func (*UnimplementedMsgServer) CreateProposal(ctx context.Context, req *MsgCreateProposal) (*MsgCreateProposalResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateProposal not implemented")
|
||||
}
|
||||
func (*UnimplementedMsgServer) WithdrawProposal(ctx context.Context, req *MsgWithdrawProposal) (*MsgWithdrawProposalResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WithdrawProposal not implemented")
|
||||
}
|
||||
func (*UnimplementedMsgServer) Vote(ctx context.Context, req *MsgVote) (*MsgVoteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented")
|
||||
}
|
||||
|
@ -1632,6 +1745,24 @@ func _Msg_CreateProposal_Handler(srv interface{}, ctx context.Context, dec func(
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_WithdrawProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgWithdrawProposal)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).WithdrawProposal(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/cosmos.group.v1beta1.Msg/WithdrawProposal",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).WithdrawProposal(ctx, req.(*MsgWithdrawProposal))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgVote)
|
||||
if err := dec(in); err != nil {
|
||||
|
@ -1708,6 +1839,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
|
|||
MethodName: "CreateProposal",
|
||||
Handler: _Msg_CreateProposal_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WithdrawProposal",
|
||||
Handler: _Msg_WithdrawProposal_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Vote",
|
||||
Handler: _Msg_Vote_Handler,
|
||||
|
@ -2385,6 +2520,64 @@ func (m *MsgCreateProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro
|
|||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgWithdrawProposal) 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 *MsgWithdrawProposal) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgWithdrawProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Address) > 0 {
|
||||
i -= len(m.Address)
|
||||
copy(dAtA[i:], m.Address)
|
||||
i = encodeVarintTx(dAtA, i, uint64(len(m.Address)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if m.ProposalId != 0 {
|
||||
i = encodeVarintTx(dAtA, i, uint64(m.ProposalId))
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgWithdrawProposalResponse) 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 *MsgWithdrawProposalResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgWithdrawProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgVote) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
|
@ -2824,6 +3017,31 @@ func (m *MsgCreateProposalResponse) Size() (n int) {
|
|||
return n
|
||||
}
|
||||
|
||||
func (m *MsgWithdrawProposal) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.ProposalId != 0 {
|
||||
n += 1 + sovTx(uint64(m.ProposalId))
|
||||
}
|
||||
l = len(m.Address)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *MsgWithdrawProposalResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *MsgVote) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
|
@ -4779,6 +4997,157 @@ func (m *MsgCreateProposalResponse) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgWithdrawProposal) 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: MsgWithdrawProposal: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgWithdrawProposal: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType)
|
||||
}
|
||||
m.ProposalId = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.ProposalId |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 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.Address = 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 *MsgWithdrawProposalResponse) 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: MsgWithdrawProposalResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgWithdrawProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipTx(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgVote) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
|
|
@ -83,6 +83,9 @@ const (
|
|||
ProposalStatusClosed Proposal_Status = 2
|
||||
// Final status of a proposal when the group was modified before the final tally.
|
||||
ProposalStatusAborted Proposal_Status = 3
|
||||
// A proposal can be deleted before the voting start time by the owner. When this happens the final status
|
||||
// is Withdrawn.
|
||||
ProposalStatusWithdrawn Proposal_Status = 4
|
||||
)
|
||||
|
||||
var Proposal_Status_name = map[int32]string{
|
||||
|
@ -90,6 +93,7 @@ var Proposal_Status_name = map[int32]string{
|
|||
1: "STATUS_SUBMITTED",
|
||||
2: "STATUS_CLOSED",
|
||||
3: "STATUS_ABORTED",
|
||||
4: "STATUS_WITHDRAWN",
|
||||
}
|
||||
|
||||
var Proposal_Status_value = map[string]int32{
|
||||
|
@ -97,6 +101,7 @@ var Proposal_Status_value = map[string]int32{
|
|||
"STATUS_SUBMITTED": 1,
|
||||
"STATUS_CLOSED": 2,
|
||||
"STATUS_ABORTED": 3,
|
||||
"STATUS_WITHDRAWN": 4,
|
||||
}
|
||||
|
||||
func (x Proposal_Status) String() string {
|
||||
|
@ -773,90 +778,92 @@ func init() {
|
|||
func init() { proto.RegisterFile("cosmos/group/v1beta1/types.proto", fileDescriptor_e091dfce5c49c8b6) }
|
||||
|
||||
var fileDescriptor_e091dfce5c49c8b6 = []byte{
|
||||
// 1321 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4d, 0x6f, 0xdb, 0xc6,
|
||||
0x16, 0x15, 0x25, 0x59, 0x1f, 0x57, 0xb6, 0x2c, 0x0c, 0xfc, 0x12, 0x59, 0x4e, 0x64, 0x46, 0x79,
|
||||
0x0f, 0x30, 0xde, 0x83, 0xa5, 0x67, 0xf7, 0x63, 0x11, 0x34, 0x69, 0x29, 0x9a, 0x4e, 0x55, 0x38,
|
||||
0x92, 0x4b, 0x4a, 0x6e, 0x9b, 0x45, 0x05, 0x8a, 0x9c, 0xc8, 0x6c, 0x25, 0x8e, 0x40, 0x8e, 0xdc,
|
||||
0xa8, 0xbf, 0x20, 0xd5, 0x2a, 0xcb, 0x76, 0x21, 0x20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0x30, 0x05, 0x5d, 0x87, 0xef, 0x9e, 0xd4, 0xd3, 0x6c, 0xdc, 0xb0, 0x51,
|
||||
0x15, 0x96, 0x4c, 0x7b, 0xe8, 0xb8, 0xbc, 0xe4, 0x0b, 0x5c, 0xe2, 0xb0, 0x85, 0x5e, 0x14, 0x21,
|
||||
0x7d, 0x82, 0xbd, 0x20, 0x0b, 0x66, 0x45, 0x52, 0x0f, 0x87, 0xe8, 0x12, 0x2c, 0x53, 0x42, 0xcd,
|
||||
0x41, 0x57, 0xf8, 0xbb, 0xc4, 0x4a, 0x90, 0x63, 0x73, 0x9f, 0x70, 0x93, 0x55, 0x00, 0xcb, 0xc3,
|
||||
0x26, 0xe5, 0x56, 0xa6, 0xce, 0x60, 0x65, 0x56, 0xf0, 0x14, 0x5a, 0xf9, 0x1c, 0x72, 0x4c, 0xb5,
|
||||
0x68, 0xc2, 0x05, 0xba, 0xdf, 0x86, 0x14, 0x37, 0x4e, 0x94, 0x7c, 0xa1, 0xd5, 0xba, 0xc0, 0x56,
|
||||
0x9e, 0xc4, 0x61, 0x95, 0x6d, 0xc0, 0xcb, 0xcc, 0x8a, 0xfb, 0x26, 0x9d, 0xfe, 0x6c, 0x62, 0xf1,
|
||||
0x97, 0x18, 0x92, 0x38, 0xbb, 0x21, 0xc9, 0x97, 0x1b, 0xb2, 0x14, 0x35, 0xe4, 0x63, 0x58, 0xb5,
|
||||
0x45, 0xc7, 0x74, 0x47, 0x4c, 0x8b, 0x28, 0xf9, 0xda, 0x0b, 0x25, 0x57, 0xdc, 0x49, 0x7d, 0x4e,
|
||||
0x8b, 0xe9, 0x79, 0x3b, 0xda, 0xe3, 0x51, 0x03, 0xd3, 0x6f, 0x64, 0xe0, 0x95, 0xcc, 0x9d, 0x7b,
|
||||
0x9b, 0xb1, 0x27, 0xf7, 0x36, 0xa5, 0xca, 0x0f, 0x39, 0xc8, 0x1c, 0x7a, 0x64, 0x44, 0x7c, 0x73,
|
||||
0x80, 0x36, 0x21, 0x37, 0x12, 0xdf, 0xa7, 0x5e, 0x42, 0x38, 0xd5, 0xb0, 0x9f, 0x35, 0x21, 0xfe,
|
||||
0xba, 0x26, 0x2c, 0x6a, 0xe5, 0x77, 0x21, 0xcb, 0xa3, 0x07, 0x87, 0x41, 0x52, 0x4e, 0x2c, 0x8c,
|
||||
0x78, 0x0a, 0x45, 0xd7, 0x61, 0xd9, 0x1f, 0xf7, 0x86, 0x0e, 0x15, 0x65, 0x58, 0x3a, 0x43, 0x19,
|
||||
0x72, 0x4f, 0x99, 0x0a, 0x45, 0x97, 0x61, 0x85, 0x77, 0x48, 0x68, 0x60, 0x8a, 0x69, 0x5e, 0x66,
|
||||
0x93, 0x47, 0xc2, 0xc5, 0xff, 0xc3, 0x1a, 0x07, 0x71, 0x0b, 0x9f, 0x62, 0xd3, 0x0c, 0x8b, 0xfa,
|
||||
0xa7, 0x9d, 0x1a, 0x32, 0xae, 0x42, 0xca, 0xa7, 0x26, 0x1d, 0xfb, 0xc5, 0x8c, 0x2c, 0x6d, 0xe5,
|
||||
0x77, 0xff, 0x33, 0xbf, 0xed, 0xc3, 0xc2, 0x57, 0x0d, 0x06, 0xd6, 0x05, 0x29, 0xa0, 0x7b, 0xd8,
|
||||
0x1f, 0x0f, 0x68, 0x31, 0xfb, 0x5a, 0x74, 0x9d, 0x81, 0x75, 0x41, 0x42, 0x1f, 0x00, 0x9c, 0x10,
|
||||
0x8a, 0xbb, 0x41, 0x34, 0x5c, 0x04, 0x56, 0x9b, 0x8d, 0xf9, 0x21, 0xda, 0xe6, 0x60, 0x30, 0x11,
|
||||
0x47, 0x6c, 0x36, 0x20, 0x05, 0x99, 0x60, 0x74, 0xed, 0xf4, 0xa8, 0xcc, 0x9d, 0xe5, 0xb4, 0x17,
|
||||
0x24, 0x74, 0x04, 0xab, 0xf8, 0x36, 0xb6, 0xc6, 0x94, 0x78, 0x5d, 0xa1, 0x64, 0x99, 0x29, 0xd9,
|
||||
0x7e, 0x85, 0x12, 0x4d, 0x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 0x6c, 0xfb, 0xf6,
|
||||
0x97, 0xb5, 0xdb, 0xfc, 0x37, 0x4d, 0x2f, 0xc5, 0x04, 0xbd, 0xf5, 0x77, 0x00, 0x00, 0x00, 0xff,
|
||||
0xff, 0xa5, 0xd8, 0x7b, 0xb8, 0xea, 0x0c, 0x00, 0x00,
|
||||
// 1345 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4f, 0x6f, 0x13, 0xc7,
|
||||
0x1b, 0xce, 0x3a, 0x8e, 0xff, 0xbc, 0x4e, 0x1c, 0x6b, 0x94, 0x1f, 0x38, 0x0e, 0x38, 0x8b, 0xf9,
|
||||
0x55, 0x8a, 0x5a, 0xc5, 0x6e, 0xd2, 0x3f, 0x07, 0x54, 0x68, 0xd7, 0x9b, 0x0d, 0xb8, 0x0a, 0x76,
|
||||
0xba, 0xbb, 0x4e, 0x5a, 0x0e, 0xb5, 0xd6, 0xbb, 0x83, 0xb3, 0xad, 0xbd, 0x63, 0xed, 0x8e, 0x03,
|
||||
0xee, 0xb5, 0x17, 0xea, 0x13, 0xc7, 0xf6, 0x60, 0x09, 0xa9, 0x9f, 0xa0, 0x12, 0x1f, 0x02, 0xf5,
|
||||
0x84, 0x7a, 0xaa, 0x38, 0xb4, 0x15, 0x5c, 0x38, 0x57, 0xfd, 0x00, 0xd5, 0xce, 0xcc, 0x12, 0x0c,
|
||||
0xc6, 0x10, 0xd4, 0x53, 0x76, 0x66, 0x9e, 0xe7, 0x9d, 0xf7, 0x7d, 0x9e, 0x37, 0x33, 0x63, 0x90,
|
||||
0x6d, 0x12, 0xf4, 0x48, 0x50, 0xe9, 0xf8, 0x64, 0xd0, 0xaf, 0x1c, 0x6f, 0xb5, 0x31, 0xb5, 0xb6,
|
||||
0x2a, 0x74, 0xd8, 0xc7, 0x41, 0xb9, 0xef, 0x13, 0x4a, 0xd0, 0x0a, 0x47, 0x94, 0x19, 0xa2, 0x2c,
|
||||
0x10, 0x85, 0x95, 0x0e, 0xe9, 0x10, 0x06, 0xa8, 0x84, 0x5f, 0x1c, 0x5b, 0x28, 0x76, 0x08, 0xe9,
|
||||
0x74, 0x71, 0x85, 0x8d, 0xda, 0x83, 0x9b, 0x15, 0x67, 0xe0, 0x5b, 0xd4, 0x25, 0x9e, 0x58, 0x5f,
|
||||
0x7f, 0x71, 0x9d, 0xba, 0x3d, 0x1c, 0x50, 0xab, 0xd7, 0x17, 0x80, 0x55, 0xbe, 0x59, 0x8b, 0x47,
|
||||
0x16, 0x3b, 0x8b, 0xa5, 0x17, 0xb9, 0x96, 0x37, 0xe4, 0x4b, 0xa5, 0x5f, 0x24, 0x48, 0x5c, 0xc7,
|
||||
0xbd, 0x36, 0xf6, 0xd1, 0x36, 0x24, 0x2d, 0xc7, 0xf1, 0x71, 0x10, 0xe4, 0x25, 0x59, 0xda, 0x48,
|
||||
0x57, 0xf3, 0xbf, 0xdd, 0xdf, 0x8c, 0x4a, 0x50, 0xf8, 0x8a, 0x41, 0x7d, 0xd7, 0xeb, 0xe8, 0x11,
|
||||
0x10, 0x9d, 0x81, 0xc4, 0x2d, 0xec, 0x76, 0x8e, 0x68, 0x3e, 0x16, 0x52, 0x74, 0x31, 0x42, 0x05,
|
||||
0x48, 0xf5, 0x30, 0xb5, 0x1c, 0x8b, 0x5a, 0xf9, 0x79, 0x59, 0xda, 0x58, 0xd4, 0x9f, 0x8d, 0xd1,
|
||||
0xa7, 0x90, 0xb2, 0x1c, 0x07, 0x3b, 0x2d, 0x8b, 0xe6, 0xe3, 0xb2, 0xb4, 0x91, 0xd9, 0x2e, 0x94,
|
||||
0x79, 0x82, 0xe5, 0x28, 0xc1, 0xb2, 0x19, 0x15, 0x57, 0x4d, 0x3d, 0xf8, 0x63, 0x7d, 0xee, 0xee,
|
||||
0x9f, 0xeb, 0x12, 0xdb, 0x14, 0x3b, 0x0a, 0x2d, 0x5d, 0x85, 0x24, 0x4f, 0x39, 0x40, 0x9f, 0x40,
|
||||
0xb2, 0xc7, 0x3f, 0xf3, 0x92, 0x3c, 0xbf, 0x91, 0xd9, 0x3e, 0x57, 0x9e, 0xa6, 0x79, 0x99, 0xe3,
|
||||
0xab, 0xf1, 0x30, 0x98, 0x1e, 0x51, 0x4a, 0x23, 0x09, 0xce, 0x9a, 0x47, 0x3e, 0x0e, 0x8e, 0x48,
|
||||
0xd7, 0xd9, 0xc1, 0xb6, 0x1b, 0xb8, 0xc4, 0xdb, 0x27, 0x5d, 0xd7, 0x1e, 0xa2, 0x73, 0x90, 0xa6,
|
||||
0xd1, 0x12, 0xd7, 0x43, 0x3f, 0x99, 0x40, 0x97, 0x21, 0x19, 0xea, 0x4f, 0x06, 0xbc, 0xf0, 0xcc,
|
||||
0xf6, 0xea, 0x4b, 0x25, 0xec, 0x08, 0xff, 0x78, 0x05, 0x3f, 0xb2, 0x0a, 0x04, 0xe7, 0x12, 0xfa,
|
||||
0xf5, 0xfe, 0x66, 0x76, 0x72, 0xc3, 0xd2, 0x3f, 0x12, 0xa4, 0xaf, 0x86, 0x49, 0xd7, 0xbc, 0x9b,
|
||||
0x04, 0xad, 0x42, 0x8a, 0x55, 0xd0, 0x72, 0xf9, 0xee, 0x71, 0x3d, 0xc9, 0xc6, 0x35, 0x07, 0x95,
|
||||
0x61, 0xc1, 0x72, 0x7a, 0xae, 0xc7, 0x25, 0x9f, 0xe1, 0x12, 0x87, 0xcd, 0xf4, 0x22, 0x0f, 0xc9,
|
||||
0x63, 0xec, 0x87, 0x59, 0x30, 0x2b, 0xe2, 0x7a, 0x34, 0x44, 0x17, 0x60, 0x91, 0x12, 0x6a, 0x75,
|
||||
0x5b, 0xc2, 0xdf, 0x05, 0x26, 0x41, 0x86, 0xcd, 0x1d, 0x72, 0x93, 0x55, 0x00, 0xdb, 0xc7, 0x16,
|
||||
0xe5, 0x56, 0x26, 0x4e, 0x61, 0x65, 0x5a, 0xf0, 0x14, 0x5a, 0xfa, 0x1a, 0x32, 0xac, 0x6a, 0xd1,
|
||||
0x84, 0x33, 0xea, 0xfe, 0x10, 0x12, 0xdc, 0x38, 0x21, 0xf9, 0x4c, 0xab, 0x75, 0x81, 0x2d, 0x3d,
|
||||
0x8d, 0xc1, 0x32, 0xdb, 0x80, 0xcb, 0xcc, 0xc4, 0x7d, 0x9b, 0x4e, 0x7f, 0x3e, 0xb1, 0xd8, 0x2b,
|
||||
0x0c, 0x99, 0x3f, 0xbd, 0x21, 0xf1, 0x57, 0x1b, 0xb2, 0x30, 0x69, 0xc8, 0x17, 0xb0, 0xec, 0x88,
|
||||
0x8e, 0x69, 0xf5, 0x59, 0x2d, 0x42, 0xf2, 0x95, 0x97, 0x24, 0x57, 0xbc, 0x61, 0x75, 0x4a, 0x8b,
|
||||
0xe9, 0x59, 0x67, 0xb2, 0xc7, 0x27, 0x0d, 0x4c, 0xbe, 0x95, 0x81, 0x97, 0x52, 0x77, 0xee, 0xad,
|
||||
0xcf, 0x3d, 0xbd, 0xb7, 0x2e, 0x95, 0x1e, 0x65, 0x20, 0xb5, 0xef, 0x93, 0x3e, 0x09, 0xac, 0x2e,
|
||||
0x5a, 0x87, 0x4c, 0x5f, 0x7c, 0x9f, 0x78, 0x09, 0xd1, 0x54, 0xcd, 0x79, 0xde, 0x84, 0xd8, 0x9b,
|
||||
0x9a, 0x30, 0xab, 0x95, 0x3f, 0x86, 0x34, 0x8f, 0x1e, 0x1e, 0x06, 0x71, 0x79, 0x7e, 0x66, 0xc4,
|
||||
0x13, 0x28, 0xba, 0x0a, 0x8b, 0xc1, 0xa0, 0xdd, 0x73, 0xa9, 0x90, 0x61, 0xe1, 0x14, 0x32, 0x64,
|
||||
0x9e, 0x31, 0x15, 0x8a, 0x2e, 0xc2, 0x12, 0xef, 0x90, 0xc8, 0xc0, 0x04, 0xab, 0x79, 0x91, 0x4d,
|
||||
0x1e, 0x08, 0x17, 0xdf, 0x87, 0x15, 0x0e, 0xe2, 0x16, 0x3e, 0xc3, 0x26, 0x19, 0x16, 0x75, 0x4e,
|
||||
0x3a, 0x35, 0x62, 0x5c, 0x86, 0x44, 0x40, 0x2d, 0x3a, 0x08, 0xf2, 0x29, 0x59, 0xda, 0xc8, 0x6e,
|
||||
0xbf, 0x33, 0xbd, 0xed, 0x23, 0xe1, 0xcb, 0x06, 0x03, 0xeb, 0x82, 0x14, 0xd2, 0x7d, 0x1c, 0x0c,
|
||||
0xba, 0x34, 0x9f, 0x7e, 0x23, 0xba, 0xce, 0xc0, 0xba, 0x20, 0xa1, 0xcf, 0x00, 0x8e, 0x09, 0xc5,
|
||||
0xad, 0x30, 0x1a, 0xce, 0x03, 0xd3, 0x66, 0x6d, 0x7a, 0x08, 0xd3, 0xea, 0x76, 0x87, 0xe2, 0x88,
|
||||
0x4d, 0x87, 0xa4, 0x30, 0x13, 0x8c, 0xae, 0x9c, 0x1c, 0x95, 0x99, 0xd3, 0x9c, 0xf6, 0x82, 0x84,
|
||||
0x0e, 0x60, 0x19, 0xdf, 0xc6, 0xf6, 0x80, 0x12, 0xbf, 0x25, 0x2a, 0x59, 0x64, 0x95, 0x6c, 0xbe,
|
||||
0xa6, 0x12, 0x4d, 0xb0, 0x44, 0x45, 0x59, 0x3c, 0x31, 0x46, 0x1b, 0x10, 0xef, 0x05, 0x9d, 0x20,
|
||||
0xbf, 0xc4, 0xee, 0x8d, 0xa9, 0xff, 0x44, 0x3a, 0x43, 0x94, 0xbe, 0x8f, 0x41, 0x82, 0xab, 0x8a,
|
||||
0xb6, 0x00, 0x19, 0xa6, 0x62, 0x36, 0x8d, 0x56, 0xb3, 0x6e, 0xec, 0x6b, 0x6a, 0x6d, 0xb7, 0xa6,
|
||||
0xed, 0xe4, 0xe6, 0x0a, 0xab, 0xa3, 0xb1, 0xfc, 0xbf, 0x68, 0x67, 0x8e, 0xad, 0x79, 0xc7, 0x56,
|
||||
0xd7, 0x75, 0xd0, 0x16, 0xe4, 0x04, 0xc5, 0x68, 0x56, 0xaf, 0xd7, 0x4c, 0x53, 0xdb, 0xc9, 0x49,
|
||||
0x85, 0xb5, 0xd1, 0x58, 0x3e, 0x3b, 0x49, 0x30, 0xa2, 0x5e, 0x42, 0xef, 0xc1, 0x92, 0xa0, 0xa8,
|
||||
0x7b, 0x0d, 0x43, 0xdb, 0xc9, 0xc5, 0x0a, 0xf9, 0xd1, 0x58, 0x5e, 0x99, 0xc4, 0xab, 0x5d, 0x12,
|
||||
0x60, 0x07, 0x6d, 0x42, 0x56, 0x80, 0x95, 0x6a, 0x43, 0x0f, 0xa3, 0xcf, 0x4f, 0x4b, 0x47, 0x69,
|
||||
0x13, 0x3f, 0x8c, 0x7d, 0x92, 0xce, 0x61, 0xcd, 0xbc, 0xb6, 0xa3, 0x2b, 0x87, 0xf5, 0x5c, 0x7c,
|
||||
0x5a, 0x3a, 0x87, 0x2e, 0x3d, 0x72, 0x7c, 0xeb, 0x96, 0x57, 0x88, 0xdf, 0xf9, 0xb9, 0x38, 0x57,
|
||||
0x7a, 0x24, 0x41, 0x42, 0x48, 0xb7, 0x05, 0x48, 0xd7, 0x8c, 0xe6, 0x9e, 0x39, 0x4b, 0x05, 0x8e,
|
||||
0x8d, 0x54, 0xf8, 0xe8, 0x39, 0xca, 0x6e, 0xad, 0xae, 0xec, 0xd5, 0x6e, 0x30, 0x1d, 0xce, 0x8f,
|
||||
0xc6, 0xf2, 0xea, 0x24, 0xa5, 0xe9, 0xdd, 0x74, 0x3d, 0xab, 0xeb, 0x7e, 0x87, 0x1d, 0x54, 0x81,
|
||||
0x65, 0x41, 0x53, 0x54, 0x55, 0xdb, 0x37, 0x99, 0x16, 0x85, 0xd1, 0x58, 0x3e, 0x33, 0xc9, 0x51,
|
||||
0x6c, 0x1b, 0xf7, 0xe9, 0x04, 0x41, 0xd7, 0x3e, 0xd7, 0x54, 0x2e, 0xc7, 0x14, 0x82, 0x8e, 0xbf,
|
||||
0xc1, 0x36, 0xc5, 0x8e, 0x28, 0xee, 0xa7, 0x18, 0x64, 0x27, 0xfb, 0x05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ff, 0xf5, 0x6f, 0x25, 0x06, 0x0b, 0xdf,
|
||||
0x18, 0xf6, 0x11, 0x71, 0x6d, 0xcc, 0x92, 0xcb, 0xbe, 0xea, 0x8d, 0xa1, 0x32, 0x8c, 0x2e, 0xb0,
|
||||
0x33, 0x2f, 0xf4, 0xff, 0xea, 0x7a, 0x79, 0xd7, 0x81, 0x04, 0xdf, 0x16, 0x9d, 0x01, 0xa4, 0x5e,
|
||||
0x6b, 0xd4, 0x54, 0x6d, 0xb2, 0x21, 0xd1, 0x12, 0xa4, 0xc5, 0x7c, 0xbd, 0x91, 0x93, 0x50, 0x16,
|
||||
0x40, 0x0c, 0xbf, 0xd2, 0x8c, 0x5c, 0x0c, 0x21, 0xc8, 0x8a, 0xb1, 0x52, 0x35, 0x4c, 0xa5, 0x56,
|
||||
0xcf, 0xcd, 0xa3, 0x65, 0xc8, 0x88, 0xb9, 0x03, 0xcd, 0x6c, 0xe4, 0xe2, 0xd5, 0x2b, 0x0f, 0x1e,
|
||||
0x17, 0xa5, 0x87, 0x8f, 0x8b, 0xd2, 0x5f, 0x8f, 0x8b, 0xd2, 0xdd, 0x27, 0xc5, 0xb9, 0x87, 0x4f,
|
||||
0x8a, 0x73, 0xbf, 0x3f, 0x29, 0xce, 0xdd, 0xf8, 0x7f, 0xc7, 0xa5, 0x47, 0x83, 0x76, 0xd9, 0x26,
|
||||
0x3d, 0xf1, 0xeb, 0x42, 0xfc, 0xd9, 0x0c, 0x9c, 0x6f, 0x2b, 0xb7, 0xf9, 0xcf, 0xa0, 0x76, 0x82,
|
||||
0x15, 0xf4, 0xc1, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6d, 0xca, 0xed, 0x16, 0x1d, 0x0d, 0x00,
|
||||
0x00,
|
||||
}
|
||||
|
||||
func (this *GroupPolicyInfo) Equal(that interface{}) bool {
|
||||
|
|
Loading…
Reference in New Issue