From 9c87da273def4ff7d26a001928db5e8c9ef430fc Mon Sep 17 00:00:00 2001 From: kien6034 Date: Wed, 24 Apr 2024 00:01:45 +0700 Subject: [PATCH 01/15] feat: proto definition for msg revoke all --- api/cosmos/authz/v1beta1/tx.pulsar.go | 1101 +++++++++++++++++-- api/cosmos/authz/v1beta1/tx_grpc.pb.go | 39 + x/authz/proto/cosmos/authz/v1beta1/tx.proto | 15 + x/authz/tx.pb.go | 451 +++++++- 4 files changed, 1492 insertions(+), 114 deletions(-) diff --git a/api/cosmos/authz/v1beta1/tx.pulsar.go b/api/cosmos/authz/v1beta1/tx.pulsar.go index d3fc8a353b74..4bbf459576ec 100644 --- a/api/cosmos/authz/v1beta1/tx.pulsar.go +++ b/api/cosmos/authz/v1beta1/tx.pulsar.go @@ -2878,6 +2878,846 @@ func (x *fastReflection_MsgRevokeResponse) ProtoMethods() *protoiface.Methods { } } +var ( + md_MsgRevokeAll protoreflect.MessageDescriptor + fd_MsgRevokeAll_granter protoreflect.FieldDescriptor + fd_MsgRevokeAll_msg_type_url protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_authz_v1beta1_tx_proto_init() + md_MsgRevokeAll = File_cosmos_authz_v1beta1_tx_proto.Messages().ByName("MsgRevokeAll") + fd_MsgRevokeAll_granter = md_MsgRevokeAll.Fields().ByName("granter") + fd_MsgRevokeAll_msg_type_url = md_MsgRevokeAll.Fields().ByName("msg_type_url") +} + +var _ protoreflect.Message = (*fastReflection_MsgRevokeAll)(nil) + +type fastReflection_MsgRevokeAll MsgRevokeAll + +func (x *MsgRevokeAll) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRevokeAll)(x) +} + +func (x *MsgRevokeAll) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRevokeAll_messageType fastReflection_MsgRevokeAll_messageType +var _ protoreflect.MessageType = fastReflection_MsgRevokeAll_messageType{} + +type fastReflection_MsgRevokeAll_messageType struct{} + +func (x fastReflection_MsgRevokeAll_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRevokeAll)(nil) +} +func (x fastReflection_MsgRevokeAll_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRevokeAll) +} +func (x fastReflection_MsgRevokeAll_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRevokeAll +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRevokeAll) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRevokeAll +} + +// 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_MsgRevokeAll) Type() protoreflect.MessageType { + return _fastReflection_MsgRevokeAll_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRevokeAll) New() protoreflect.Message { + return new(fastReflection_MsgRevokeAll) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRevokeAll) Interface() protoreflect.ProtoMessage { + return (*MsgRevokeAll)(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_MsgRevokeAll) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Granter != "" { + value := protoreflect.ValueOfString(x.Granter) + if !f(fd_MsgRevokeAll_granter, value) { + return + } + } + if x.MsgTypeUrl != "" { + value := protoreflect.ValueOfString(x.MsgTypeUrl) + if !f(fd_MsgRevokeAll_msg_type_url, 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_MsgRevokeAll) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgRevokeAll.granter": + return x.Granter != "" + case "cosmos.authz.v1beta1.MsgRevokeAll.msg_type_url": + return x.MsgTypeUrl != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAll")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeAll 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_MsgRevokeAll) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgRevokeAll.granter": + x.Granter = "" + case "cosmos.authz.v1beta1.MsgRevokeAll.msg_type_url": + x.MsgTypeUrl = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAll")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeAll 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_MsgRevokeAll) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.authz.v1beta1.MsgRevokeAll.granter": + value := x.Granter + return protoreflect.ValueOfString(value) + case "cosmos.authz.v1beta1.MsgRevokeAll.msg_type_url": + value := x.MsgTypeUrl + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAll")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeAll 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_MsgRevokeAll) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgRevokeAll.granter": + x.Granter = value.Interface().(string) + case "cosmos.authz.v1beta1.MsgRevokeAll.msg_type_url": + x.MsgTypeUrl = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAll")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeAll 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_MsgRevokeAll) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgRevokeAll.granter": + panic(fmt.Errorf("field granter of message cosmos.authz.v1beta1.MsgRevokeAll is not mutable")) + case "cosmos.authz.v1beta1.MsgRevokeAll.msg_type_url": + panic(fmt.Errorf("field msg_type_url of message cosmos.authz.v1beta1.MsgRevokeAll is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAll")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeAll 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_MsgRevokeAll) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgRevokeAll.granter": + return protoreflect.ValueOfString("") + case "cosmos.authz.v1beta1.MsgRevokeAll.msg_type_url": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAll")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeAll 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_MsgRevokeAll) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.MsgRevokeAll", 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_MsgRevokeAll) 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_MsgRevokeAll) 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_MsgRevokeAll) 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_MsgRevokeAll) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRevokeAll) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Granter) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.MsgTypeUrl) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRevokeAll) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.MsgTypeUrl) > 0 { + i -= len(x.MsgTypeUrl) + copy(dAtA[i:], x.MsgTypeUrl) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MsgTypeUrl))) + i-- + dAtA[i] = 0x12 + } + if len(x.Granter) > 0 { + i -= len(x.Granter) + copy(dAtA[i:], x.Granter) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRevokeAll) + 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: MsgRevokeAll: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRevokeAll: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.MsgTypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgRevokeAllResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_authz_v1beta1_tx_proto_init() + md_MsgRevokeAllResponse = File_cosmos_authz_v1beta1_tx_proto.Messages().ByName("MsgRevokeAllResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgRevokeAllResponse)(nil) + +type fastReflection_MsgRevokeAllResponse MsgRevokeAllResponse + +func (x *MsgRevokeAllResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRevokeAllResponse)(x) +} + +func (x *MsgRevokeAllResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRevokeAllResponse_messageType fastReflection_MsgRevokeAllResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRevokeAllResponse_messageType{} + +type fastReflection_MsgRevokeAllResponse_messageType struct{} + +func (x fastReflection_MsgRevokeAllResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRevokeAllResponse)(nil) +} +func (x fastReflection_MsgRevokeAllResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRevokeAllResponse) +} +func (x fastReflection_MsgRevokeAllResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRevokeAllResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRevokeAllResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRevokeAllResponse +} + +// 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_MsgRevokeAllResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRevokeAllResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRevokeAllResponse) New() protoreflect.Message { + return new(fastReflection_MsgRevokeAllResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRevokeAllResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRevokeAllResponse)(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_MsgRevokeAllResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRevokeAllResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAllResponse")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeAllResponse 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_MsgRevokeAllResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAllResponse")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeAllResponse 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_MsgRevokeAllResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAllResponse")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeAllResponse 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_MsgRevokeAllResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAllResponse")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeAllResponse 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_MsgRevokeAllResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAllResponse")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeAllResponse 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_MsgRevokeAllResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAllResponse")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeAllResponse 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_MsgRevokeAllResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.MsgRevokeAllResponse", 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_MsgRevokeAllResponse) 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_MsgRevokeAllResponse) 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_MsgRevokeAllResponse) 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_MsgRevokeAllResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRevokeAllResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRevokeAllResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRevokeAllResponse) + 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: MsgRevokeAllResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRevokeAllResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var ( md_MsgPruneExpiredGrants protoreflect.MessageDescriptor fd_MsgPruneExpiredGrants_pruner protoreflect.FieldDescriptor @@ -2898,7 +3738,7 @@ func (x *MsgPruneExpiredGrants) ProtoReflect() protoreflect.Message { } func (x *MsgPruneExpiredGrants) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[6] + mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3316,7 +4156,7 @@ func (x *MsgPruneExpiredGrantsResponse) ProtoReflect() protoreflect.Message { } func (x *MsgPruneExpiredGrantsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[7] + mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3914,6 +4754,77 @@ func (*MsgRevokeResponse) Descriptor() ([]byte, []int) { return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{5} } +// MsgRevokeAll revokes all grants issued by the specified granter. +type MsgRevokeAll struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` + MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` +} + +func (x *MsgRevokeAll) Reset() { + *x = MsgRevokeAll{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRevokeAll) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRevokeAll) ProtoMessage() {} + +// Deprecated: Use MsgRevokeAll.ProtoReflect.Descriptor instead. +func (*MsgRevokeAll) Descriptor() ([]byte, []int) { + return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgRevokeAll) GetGranter() string { + if x != nil { + return x.Granter + } + return "" +} + +func (x *MsgRevokeAll) GetMsgTypeUrl() string { + if x != nil { + return x.MsgTypeUrl + } + return "" +} + +// MsgRevokeAllResponse defines the Msg/MsgRevokeAllResponse response type. +type MsgRevokeAllResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgRevokeAllResponse) Reset() { + *x = MsgRevokeAllResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRevokeAllResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRevokeAllResponse) ProtoMessage() {} + +// Deprecated: Use MsgRevokeAllResponse.ProtoReflect.Descriptor instead. +func (*MsgRevokeAllResponse) Descriptor() ([]byte, []int) { + return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{7} +} + // MsgPruneExpiredGrants prunes the expired grants. // // Since x/authz v1.0.0 @@ -3928,7 +4839,7 @@ type MsgPruneExpiredGrants struct { func (x *MsgPruneExpiredGrants) Reset() { *x = MsgPruneExpiredGrants{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[6] + mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3942,7 +4853,7 @@ func (*MsgPruneExpiredGrants) ProtoMessage() {} // Deprecated: Use MsgPruneExpiredGrants.ProtoReflect.Descriptor instead. func (*MsgPruneExpiredGrants) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{6} + return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{8} } func (x *MsgPruneExpiredGrants) GetPruner() string { @@ -3964,7 +4875,7 @@ type MsgPruneExpiredGrantsResponse struct { func (x *MsgPruneExpiredGrantsResponse) Reset() { *x = MsgPruneExpiredGrantsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[7] + mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3978,7 +4889,7 @@ func (*MsgPruneExpiredGrantsResponse) ProtoMessage() {} // Deprecated: Use MsgPruneExpiredGrantsResponse.ProtoReflect.Descriptor instead. func (*MsgPruneExpiredGrantsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{7} + return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{9} } var File_cosmos_authz_v1beta1_tx_proto protoreflect.FileDescriptor @@ -4038,52 +4949,68 @@ var file_cosmos_authz_v1beta1_tx_proto_rawDesc = []byte{ 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x0a, 0x15, 0x4d, 0x73, 0x67, - 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, - 0x74, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x72, - 0x75, 0x6e, 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, - 0x72, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, - 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0xf7, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4f, 0x0a, 0x05, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, - 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, - 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, - 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x06, 0x52, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x0c, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x20, + 0x0a, 0x0c, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, + 0x3a, 0x28, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, + 0xb0, 0x2a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x22, 0x16, 0x0a, 0x14, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x56, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x70, + 0x72, 0x75, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x3a, 0x0b, 0x82, + 0xe7, 0xb0, 0x2a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, + 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd4, 0x03, 0x0a, 0x03, + 0x4d, 0x73, 0x67, 0x12, 0x4f, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x1a, 0x26, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x52, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x1f, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x1a, 0x27, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x09, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, + 0x41, 0x6c, 0x6c, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, - 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, - 0x12, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, - 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, - 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xcd, 0x01, 0x0a, - 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, - 0x7a, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, - 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, - 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 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, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x12, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, + 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, + 0x2a, 0x01, 0x42, 0xcd, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, + 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, + 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, + 0x74, 0x68, 0x7a, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, + 0x7a, 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, + 0x41, 0x75, 0x74, 0x68, 0x7a, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xc8, 0xe1, + 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4098,7 +5025,7 @@ func file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP() []byte { return file_cosmos_authz_v1beta1_tx_proto_rawDescData } -var file_cosmos_authz_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_cosmos_authz_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_cosmos_authz_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgGrant)(nil), // 0: cosmos.authz.v1beta1.MsgGrant (*MsgGrantResponse)(nil), // 1: cosmos.authz.v1beta1.MsgGrantResponse @@ -4106,27 +5033,31 @@ var file_cosmos_authz_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgExecResponse)(nil), // 3: cosmos.authz.v1beta1.MsgExecResponse (*MsgRevoke)(nil), // 4: cosmos.authz.v1beta1.MsgRevoke (*MsgRevokeResponse)(nil), // 5: cosmos.authz.v1beta1.MsgRevokeResponse - (*MsgPruneExpiredGrants)(nil), // 6: cosmos.authz.v1beta1.MsgPruneExpiredGrants - (*MsgPruneExpiredGrantsResponse)(nil), // 7: cosmos.authz.v1beta1.MsgPruneExpiredGrantsResponse - (*Grant)(nil), // 8: cosmos.authz.v1beta1.Grant - (*anypb.Any)(nil), // 9: google.protobuf.Any + (*MsgRevokeAll)(nil), // 6: cosmos.authz.v1beta1.MsgRevokeAll + (*MsgRevokeAllResponse)(nil), // 7: cosmos.authz.v1beta1.MsgRevokeAllResponse + (*MsgPruneExpiredGrants)(nil), // 8: cosmos.authz.v1beta1.MsgPruneExpiredGrants + (*MsgPruneExpiredGrantsResponse)(nil), // 9: cosmos.authz.v1beta1.MsgPruneExpiredGrantsResponse + (*Grant)(nil), // 10: cosmos.authz.v1beta1.Grant + (*anypb.Any)(nil), // 11: google.protobuf.Any } var file_cosmos_authz_v1beta1_tx_proto_depIdxs = []int32{ - 8, // 0: cosmos.authz.v1beta1.MsgGrant.grant:type_name -> cosmos.authz.v1beta1.Grant - 9, // 1: cosmos.authz.v1beta1.MsgExec.msgs:type_name -> google.protobuf.Any - 0, // 2: cosmos.authz.v1beta1.Msg.Grant:input_type -> cosmos.authz.v1beta1.MsgGrant - 2, // 3: cosmos.authz.v1beta1.Msg.Exec:input_type -> cosmos.authz.v1beta1.MsgExec - 4, // 4: cosmos.authz.v1beta1.Msg.Revoke:input_type -> cosmos.authz.v1beta1.MsgRevoke - 6, // 5: cosmos.authz.v1beta1.Msg.PruneExpiredGrants:input_type -> cosmos.authz.v1beta1.MsgPruneExpiredGrants - 1, // 6: cosmos.authz.v1beta1.Msg.Grant:output_type -> cosmos.authz.v1beta1.MsgGrantResponse - 3, // 7: cosmos.authz.v1beta1.Msg.Exec:output_type -> cosmos.authz.v1beta1.MsgExecResponse - 5, // 8: cosmos.authz.v1beta1.Msg.Revoke:output_type -> cosmos.authz.v1beta1.MsgRevokeResponse - 7, // 9: cosmos.authz.v1beta1.Msg.PruneExpiredGrants:output_type -> cosmos.authz.v1beta1.MsgPruneExpiredGrantsResponse - 6, // [6:10] is the sub-list for method output_type - 2, // [2:6] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 10, // 0: cosmos.authz.v1beta1.MsgGrant.grant:type_name -> cosmos.authz.v1beta1.Grant + 11, // 1: cosmos.authz.v1beta1.MsgExec.msgs:type_name -> google.protobuf.Any + 0, // 2: cosmos.authz.v1beta1.Msg.Grant:input_type -> cosmos.authz.v1beta1.MsgGrant + 2, // 3: cosmos.authz.v1beta1.Msg.Exec:input_type -> cosmos.authz.v1beta1.MsgExec + 4, // 4: cosmos.authz.v1beta1.Msg.Revoke:input_type -> cosmos.authz.v1beta1.MsgRevoke + 6, // 5: cosmos.authz.v1beta1.Msg.RevokeAll:input_type -> cosmos.authz.v1beta1.MsgRevokeAll + 8, // 6: cosmos.authz.v1beta1.Msg.PruneExpiredGrants:input_type -> cosmos.authz.v1beta1.MsgPruneExpiredGrants + 1, // 7: cosmos.authz.v1beta1.Msg.Grant:output_type -> cosmos.authz.v1beta1.MsgGrantResponse + 3, // 8: cosmos.authz.v1beta1.Msg.Exec:output_type -> cosmos.authz.v1beta1.MsgExecResponse + 5, // 9: cosmos.authz.v1beta1.Msg.Revoke:output_type -> cosmos.authz.v1beta1.MsgRevokeResponse + 7, // 10: cosmos.authz.v1beta1.Msg.RevokeAll:output_type -> cosmos.authz.v1beta1.MsgRevokeAllResponse + 9, // 11: cosmos.authz.v1beta1.Msg.PruneExpiredGrants:output_type -> cosmos.authz.v1beta1.MsgPruneExpiredGrantsResponse + 7, // [7:12] is the sub-list for method output_type + 2, // [2:7] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_cosmos_authz_v1beta1_tx_proto_init() } @@ -4209,7 +5140,7 @@ func file_cosmos_authz_v1beta1_tx_proto_init() { } } file_cosmos_authz_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgPruneExpiredGrants); i { + switch v := v.(*MsgRevokeAll); i { case 0: return &v.state case 1: @@ -4221,6 +5152,30 @@ func file_cosmos_authz_v1beta1_tx_proto_init() { } } file_cosmos_authz_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRevokeAllResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_authz_v1beta1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgPruneExpiredGrants); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_authz_v1beta1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgPruneExpiredGrantsResponse); i { case 0: return &v.state @@ -4239,7 +5194,7 @@ func file_cosmos_authz_v1beta1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_authz_v1beta1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/authz/v1beta1/tx_grpc.pb.go b/api/cosmos/authz/v1beta1/tx_grpc.pb.go index 2842eb3f5ddc..a072f0ffad9f 100644 --- a/api/cosmos/authz/v1beta1/tx_grpc.pb.go +++ b/api/cosmos/authz/v1beta1/tx_grpc.pb.go @@ -24,6 +24,7 @@ const ( Msg_Grant_FullMethodName = "/cosmos.authz.v1beta1.Msg/Grant" Msg_Exec_FullMethodName = "/cosmos.authz.v1beta1.Msg/Exec" Msg_Revoke_FullMethodName = "/cosmos.authz.v1beta1.Msg/Revoke" + Msg_RevokeAll_FullMethodName = "/cosmos.authz.v1beta1.Msg/RevokeAll" Msg_PruneExpiredGrants_FullMethodName = "/cosmos.authz.v1beta1.Msg/PruneExpiredGrants" ) @@ -43,6 +44,8 @@ type MsgClient interface { // Revoke revokes any authorization corresponding to the provided method name on the // granter's account that has been granted to the grantee. Revoke(ctx context.Context, in *MsgRevoke, opts ...grpc.CallOption) (*MsgRevokeResponse, error) + // RevokeAll revokes all grants issued by the specified granter. + RevokeAll(ctx context.Context, in *MsgRevokeAll, opts ...grpc.CallOption) (*MsgRevokeAllResponse, error) // PruneExpiredGrants prunes the expired grants. Currently up to 75 at a time. // // Since cosmos-sdk 0.51 @@ -84,6 +87,15 @@ func (c *msgClient) Revoke(ctx context.Context, in *MsgRevoke, opts ...grpc.Call return out, nil } +func (c *msgClient) RevokeAll(ctx context.Context, in *MsgRevokeAll, opts ...grpc.CallOption) (*MsgRevokeAllResponse, error) { + out := new(MsgRevokeAllResponse) + err := c.cc.Invoke(ctx, Msg_RevokeAll_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) PruneExpiredGrants(ctx context.Context, in *MsgPruneExpiredGrants, opts ...grpc.CallOption) (*MsgPruneExpiredGrantsResponse, error) { out := new(MsgPruneExpiredGrantsResponse) err := c.cc.Invoke(ctx, Msg_PruneExpiredGrants_FullMethodName, in, out, opts...) @@ -109,6 +121,8 @@ type MsgServer interface { // Revoke revokes any authorization corresponding to the provided method name on the // granter's account that has been granted to the grantee. Revoke(context.Context, *MsgRevoke) (*MsgRevokeResponse, error) + // RevokeAll revokes all grants issued by the specified granter. + RevokeAll(context.Context, *MsgRevokeAll) (*MsgRevokeAllResponse, error) // PruneExpiredGrants prunes the expired grants. Currently up to 75 at a time. // // Since cosmos-sdk 0.51 @@ -129,6 +143,9 @@ func (UnimplementedMsgServer) Exec(context.Context, *MsgExec) (*MsgExecResponse, func (UnimplementedMsgServer) Revoke(context.Context, *MsgRevoke) (*MsgRevokeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented") } +func (UnimplementedMsgServer) RevokeAll(context.Context, *MsgRevokeAll) (*MsgRevokeAllResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RevokeAll not implemented") +} func (UnimplementedMsgServer) PruneExpiredGrants(context.Context, *MsgPruneExpiredGrants) (*MsgPruneExpiredGrantsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PruneExpiredGrants not implemented") } @@ -199,6 +216,24 @@ func _Msg_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interfac return interceptor(ctx, in, info, handler) } +func _Msg_RevokeAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRevokeAll) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RevokeAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_RevokeAll_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RevokeAll(ctx, req.(*MsgRevokeAll)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_PruneExpiredGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgPruneExpiredGrants) if err := dec(in); err != nil { @@ -236,6 +271,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "Revoke", Handler: _Msg_Revoke_Handler, }, + { + MethodName: "RevokeAll", + Handler: _Msg_RevokeAll_Handler, + }, { MethodName: "PruneExpiredGrants", Handler: _Msg_PruneExpiredGrants_Handler, diff --git a/x/authz/proto/cosmos/authz/v1beta1/tx.proto b/x/authz/proto/cosmos/authz/v1beta1/tx.proto index 66b5803e0282..04c4fed8ac3c 100644 --- a/x/authz/proto/cosmos/authz/v1beta1/tx.proto +++ b/x/authz/proto/cosmos/authz/v1beta1/tx.proto @@ -31,6 +31,9 @@ service Msg { // granter's account that has been granted to the grantee. rpc Revoke(MsgRevoke) returns (MsgRevokeResponse); + // RevokeAll revokes all grants issued by the specified granter. + rpc RevokeAll(MsgRevokeAll) returns (MsgRevokeAllResponse); + // PruneExpiredGrants prunes the expired grants. Currently up to 75 at a time. // // Since cosmos-sdk 0.51 @@ -85,6 +88,18 @@ message MsgRevoke { // MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. message MsgRevokeResponse {} +// MsgRevokeAll revokes all grants issued by the specified granter. +message MsgRevokeAll { + option (cosmos.msg.v1.signer) = "granter"; + option (amino.name) = "cosmos-sdk/MsgRevokeAll"; + + string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string msg_type_url = 2; +} + +// MsgRevokeAllResponse defines the Msg/MsgRevokeAllResponse response type. +message MsgRevokeAllResponse {} + // MsgPruneExpiredGrants prunes the expired grants. // // Since x/authz v1.0.0 diff --git a/x/authz/tx.pb.go b/x/authz/tx.pb.go index 2b52d6c36f10..7a364dce2b0a 100644 --- a/x/authz/tx.pb.go +++ b/x/authz/tx.pb.go @@ -270,6 +270,82 @@ func (m *MsgRevokeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRevokeResponse proto.InternalMessageInfo +// MsgRevokeAll revokes all grants issued by the specified granter. +type MsgRevokeAll struct { + Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` + MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` +} + +func (m *MsgRevokeAll) Reset() { *m = MsgRevokeAll{} } +func (m *MsgRevokeAll) String() string { return proto.CompactTextString(m) } +func (*MsgRevokeAll) ProtoMessage() {} +func (*MsgRevokeAll) Descriptor() ([]byte, []int) { + return fileDescriptor_3ceddab7d8589ad1, []int{6} +} +func (m *MsgRevokeAll) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRevokeAll) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRevokeAll.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 *MsgRevokeAll) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRevokeAll.Merge(m, src) +} +func (m *MsgRevokeAll) XXX_Size() int { + return m.Size() +} +func (m *MsgRevokeAll) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRevokeAll.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRevokeAll proto.InternalMessageInfo + +// MsgRevokeAllResponse defines the Msg/MsgRevokeAllResponse response type. +type MsgRevokeAllResponse struct { +} + +func (m *MsgRevokeAllResponse) Reset() { *m = MsgRevokeAllResponse{} } +func (m *MsgRevokeAllResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRevokeAllResponse) ProtoMessage() {} +func (*MsgRevokeAllResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3ceddab7d8589ad1, []int{7} +} +func (m *MsgRevokeAllResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRevokeAllResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRevokeAllResponse.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 *MsgRevokeAllResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRevokeAllResponse.Merge(m, src) +} +func (m *MsgRevokeAllResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRevokeAllResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRevokeAllResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRevokeAllResponse proto.InternalMessageInfo + // MsgPruneExpiredGrants prunes the expired grants. // // Since x/authz v1.0.0 @@ -281,7 +357,7 @@ func (m *MsgPruneExpiredGrants) Reset() { *m = MsgPruneExpiredGrants{} } func (m *MsgPruneExpiredGrants) String() string { return proto.CompactTextString(m) } func (*MsgPruneExpiredGrants) ProtoMessage() {} func (*MsgPruneExpiredGrants) Descriptor() ([]byte, []int) { - return fileDescriptor_3ceddab7d8589ad1, []int{6} + return fileDescriptor_3ceddab7d8589ad1, []int{8} } func (m *MsgPruneExpiredGrants) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -320,7 +396,7 @@ func (m *MsgPruneExpiredGrantsResponse) Reset() { *m = MsgPruneExpiredGr func (m *MsgPruneExpiredGrantsResponse) String() string { return proto.CompactTextString(m) } func (*MsgPruneExpiredGrantsResponse) ProtoMessage() {} func (*MsgPruneExpiredGrantsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3ceddab7d8589ad1, []int{7} + return fileDescriptor_3ceddab7d8589ad1, []int{9} } func (m *MsgPruneExpiredGrantsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -356,6 +432,8 @@ func init() { proto.RegisterType((*MsgExecResponse)(nil), "cosmos.authz.v1beta1.MsgExecResponse") proto.RegisterType((*MsgRevoke)(nil), "cosmos.authz.v1beta1.MsgRevoke") proto.RegisterType((*MsgRevokeResponse)(nil), "cosmos.authz.v1beta1.MsgRevokeResponse") + proto.RegisterType((*MsgRevokeAll)(nil), "cosmos.authz.v1beta1.MsgRevokeAll") + proto.RegisterType((*MsgRevokeAllResponse)(nil), "cosmos.authz.v1beta1.MsgRevokeAllResponse") proto.RegisterType((*MsgPruneExpiredGrants)(nil), "cosmos.authz.v1beta1.MsgPruneExpiredGrants") proto.RegisterType((*MsgPruneExpiredGrantsResponse)(nil), "cosmos.authz.v1beta1.MsgPruneExpiredGrantsResponse") } @@ -363,45 +441,48 @@ func init() { func init() { proto.RegisterFile("cosmos/authz/v1beta1/tx.proto", fileDescriptor_3ceddab7d8589ad1) } var fileDescriptor_3ceddab7d8589ad1 = []byte{ - // 604 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x4f, 0x6f, 0x12, 0x41, - 0x1c, 0x65, 0x4a, 0x0b, 0x32, 0x34, 0xd1, 0x6e, 0x31, 0x6e, 0xb7, 0x61, 0xd9, 0xac, 0x56, 0x09, - 0x0d, 0xbb, 0x42, 0x6f, 0xc4, 0x4b, 0x49, 0x88, 0x17, 0x89, 0x66, 0xfd, 0x73, 0xf0, 0x42, 0x96, - 0x32, 0x8e, 0x04, 0x76, 0x67, 0xb3, 0xb3, 0x10, 0xf0, 0x64, 0x3c, 0x7a, 0xf2, 0x63, 0xe8, 0x8d, - 0x43, 0x8f, 0x7e, 0x00, 0xe2, 0xa9, 0xf1, 0x60, 0x3c, 0x19, 0x85, 0x03, 0x1f, 0xc1, 0xab, 0xd9, - 0x99, 0xd9, 0xb5, 0x55, 0x68, 0xeb, 0xc5, 0x0b, 0xfc, 0xfe, 0xbc, 0xdf, 0xcc, 0x7b, 0xf3, 0x66, - 0x16, 0xe6, 0x8f, 0x08, 0x75, 0x08, 0x35, 0xed, 0x41, 0xf0, 0xf2, 0x95, 0x39, 0xac, 0xb4, 0x51, - 0x60, 0x57, 0xcc, 0x60, 0x64, 0x78, 0x3e, 0x09, 0x88, 0x94, 0xe3, 0x6d, 0x83, 0xb5, 0x0d, 0xd1, - 0x56, 0x76, 0x78, 0xb5, 0xc5, 0x30, 0xa6, 0x80, 0xb0, 0x44, 0xc9, 0x61, 0x82, 0x09, 0xaf, 0x87, - 0x91, 0xa8, 0xee, 0x60, 0x42, 0x70, 0x1f, 0x99, 0x2c, 0x6b, 0x0f, 0x5e, 0x98, 0xb6, 0x3b, 0x16, - 0x2d, 0x6d, 0x29, 0x01, 0xbe, 0x1f, 0x47, 0xdc, 0x10, 0x08, 0x87, 0x62, 0x73, 0x58, 0x09, 0xff, - 0x44, 0x63, 0xcb, 0x76, 0xba, 0x2e, 0x31, 0xd9, 0x2f, 0x2f, 0xe9, 0x5f, 0x00, 0xbc, 0xd2, 0xa4, - 0xf8, 0xbe, 0x6f, 0xbb, 0x81, 0x54, 0x85, 0x69, 0x1c, 0x06, 0xc8, 0x97, 0x81, 0x06, 0x8a, 0x99, - 0xba, 0xfc, 0xf9, 0xb8, 0x1c, 0x29, 0x3a, 0xec, 0x74, 0x7c, 0x44, 0xe9, 0xe3, 0xc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7, 0x4e, 0xb1, 0xd7, 0x77, 0xf0, 0x2b, - 0x00, 0x00, 0xff, 0xff, 0x06, 0x4f, 0xd8, 0xf8, 0x98, 0x05, 0x00, 0x00, + // 656 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xbd, 0x6f, 0xd3, 0x40, + 0x14, 0xcf, 0x35, 0xfd, 0x20, 0xaf, 0x95, 0xa0, 0x6e, 0xa0, 0xae, 0xab, 0xba, 0x91, 0xa1, 0x10, + 0xa5, 0xaa, 0x4d, 0xd3, 0x2d, 0x62, 0x49, 0xa4, 0x8a, 0x85, 0x08, 0x64, 0x3e, 0x06, 0x18, 0x2a, + 0xa7, 0x39, 0x8e, 0xa8, 0xb6, 0xcf, 0xf2, 0x39, 0x51, 0xc2, 0x84, 0x18, 0x19, 0x10, 0x7f, 0x06, + 0x6c, 0x1d, 0x3a, 0xf2, 0x07, 0x54, 0x4c, 0x15, 0x42, 0x88, 0x09, 0x41, 0x3b, 0xf4, 0xdf, 0x40, + 0xbe, 0x3b, 0xbb, 0x5f, 0x6e, 0x53, 0x18, 0x58, 0x92, 0xf7, 0xf1, 0x7b, 0xef, 0x7e, 0xcf, 0xbf, + 0x77, 0x07, 0x0b, 0x9b, 0x94, 0x79, 0x94, 0x59, 0x4e, 0x37, 0x7a, 0xf5, 0xda, 0xea, 0xad, 0xb6, + 0x70, 0xe4, 0xac, 0x5a, 0x51, 0xdf, 0x0c, 0x42, 0x1a, 0x51, 0xa5, 0x28, 0xd2, 0x26, 0x4f, 0x9b, + 0x32, 0xad, 0xcd, 0x89, 0xe8, 0x06, 0xc7, 0x58, 0x12, 0xc2, 0x1d, 0xad, 0x48, 0x28, 0xa1, 0x22, + 0x1e, 0x5b, 0x32, 0x3a, 0x47, 0x28, 0x25, 0x2e, 0xb6, 0xb8, 0xd7, 0xea, 0xbe, 0xb4, 0x1c, 0x7f, + 0x20, 0x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, + 0xe9, 0xa2, 0x3d, 0x80, 0x51, 0x7e, 0x47, 0x16, 0xce, 0xc5, 0xc7, 0x69, 0x6d, 0xe9, 0xc2, 0x74, + 0xda, 0xcd, 0x86, 0x71, 0xb9, 0x98, 0x8b, 0xe7, 0x16, 0x08, 0x80, 0x76, 0x67, 0x08, 0x20, 0xed, + 0xf9, 0x02, 0x0a, 0x47, 0x8b, 0x61, 0x0c, 0xa9, 0xaa, 0xbb, 0xae, 0x56, 0x19, 0x8e, 0x49, 0x9b, + 0xf7, 0x40, 0xc9, 0x50, 0x73, 0xf9, 0xdc, 0x0e, 0x67, 0xc1, 0xda, 0xda, 0x5f, 0x80, 0x93, 0x73, + 0xb5, 0xb1, 0x37, 0xf1, 0x33, 0xd7, 0xa8, 0xee, 0xfe, 0xd6, 0x73, 0xbb, 0xfb, 0x3a, 0xda, 0xdb, + 0xd7, 0xd1, 0xaf, 0x7d, 0x1d, 0x7d, 0x38, 0xd0, 0x73, 0x7b, 0x07, 0x7a, 0xee, 0xc7, 0x81, 0x9e, + 0x7b, 0x2e, 0x17, 0x88, 0xb5, 0xb7, 0xcc, 0x0e, 0xb5, 0xfa, 0xe2, 0xe1, 0x6f, 0x8d, 0xf3, 0x37, + 0x68, 0xed, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0xd0, 0x2c, 0x5d, 0x9e, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -428,6 +509,8 @@ type MsgClient interface { // Revoke revokes any authorization corresponding to the provided method name on the // granter's account that has been granted to the grantee. Revoke(ctx context.Context, in *MsgRevoke, opts ...grpc.CallOption) (*MsgRevokeResponse, error) + // RevokeAll revokes all grants issued by the specified granter. + RevokeAll(ctx context.Context, in *MsgRevokeAll, opts ...grpc.CallOption) (*MsgRevokeAllResponse, error) // PruneExpiredGrants prunes the expired grants. Currently up to 75 at a time. // // Since cosmos-sdk 0.51 @@ -469,6 +552,15 @@ func (c *msgClient) Revoke(ctx context.Context, in *MsgRevoke, opts ...grpc.Call return out, nil } +func (c *msgClient) RevokeAll(ctx context.Context, in *MsgRevokeAll, opts ...grpc.CallOption) (*MsgRevokeAllResponse, error) { + out := new(MsgRevokeAllResponse) + err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Msg/RevokeAll", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) PruneExpiredGrants(ctx context.Context, in *MsgPruneExpiredGrants, opts ...grpc.CallOption) (*MsgPruneExpiredGrantsResponse, error) { out := new(MsgPruneExpiredGrantsResponse) err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Msg/PruneExpiredGrants", in, out, opts...) @@ -492,6 +584,8 @@ type MsgServer interface { // Revoke revokes any authorization corresponding to the provided method name on the // granter's account that has been granted to the grantee. Revoke(context.Context, *MsgRevoke) (*MsgRevokeResponse, error) + // RevokeAll revokes all grants issued by the specified granter. + RevokeAll(context.Context, *MsgRevokeAll) (*MsgRevokeAllResponse, error) // PruneExpiredGrants prunes the expired grants. Currently up to 75 at a time. // // Since cosmos-sdk 0.51 @@ -511,6 +605,9 @@ func (*UnimplementedMsgServer) Exec(ctx context.Context, req *MsgExec) (*MsgExec func (*UnimplementedMsgServer) Revoke(ctx context.Context, req *MsgRevoke) (*MsgRevokeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented") } +func (*UnimplementedMsgServer) RevokeAll(ctx context.Context, req *MsgRevokeAll) (*MsgRevokeAllResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RevokeAll not implemented") +} func (*UnimplementedMsgServer) PruneExpiredGrants(ctx context.Context, req *MsgPruneExpiredGrants) (*MsgPruneExpiredGrantsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PruneExpiredGrants not implemented") } @@ -573,6 +670,24 @@ func _Msg_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interfac return interceptor(ctx, in, info, handler) } +func _Msg_RevokeAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRevokeAll) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RevokeAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.authz.v1beta1.Msg/RevokeAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RevokeAll(ctx, req.(*MsgRevokeAll)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_PruneExpiredGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgPruneExpiredGrants) if err := dec(in); err != nil { @@ -607,6 +722,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "Revoke", Handler: _Msg_Revoke_Handler, }, + { + MethodName: "RevokeAll", + Handler: _Msg_RevokeAll_Handler, + }, { MethodName: "PruneExpiredGrants", Handler: _Msg_PruneExpiredGrants_Handler, @@ -829,6 +948,66 @@ func (m *MsgRevokeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgRevokeAll) 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 *MsgRevokeAll) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRevokeAll) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MsgTypeUrl) > 0 { + i -= len(m.MsgTypeUrl) + copy(dAtA[i:], m.MsgTypeUrl) + i = encodeVarintTx(dAtA, i, uint64(len(m.MsgTypeUrl))) + i-- + dAtA[i] = 0x12 + } + if len(m.Granter) > 0 { + i -= len(m.Granter) + copy(dAtA[i:], m.Granter) + i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRevokeAllResponse) 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 *MsgRevokeAllResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRevokeAllResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgPruneExpiredGrants) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -985,6 +1164,32 @@ func (m *MsgRevokeResponse) Size() (n int) { return n } +func (m *MsgRevokeAll) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.MsgTypeUrl) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRevokeAllResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgPruneExpiredGrants) Size() (n int) { if m == nil { return 0 @@ -1604,6 +1809,170 @@ func (m *MsgRevokeResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgRevokeAll) 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: MsgRevokeAll: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRevokeAll: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", 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.MsgTypeUrl = 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 *MsgRevokeAllResponse) 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: MsgRevokeAllResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRevokeAllResponse: 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 *MsgPruneExpiredGrants) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From c4f9369a2f4b37202169f85b37a05b1c8c497c0f Mon Sep 17 00:00:00 2001 From: kien6034 Date: Wed, 24 Apr 2024 00:50:16 +0700 Subject: [PATCH 02/15] feat/authz/msgserver: add revoke all msg --- api/cosmos/authz/v1beta1/event.pulsar.go | 602 +++++++++++++++++- api/cosmos/authz/v1beta1/tx.pulsar.go | 194 ++---- x/authz/event.pb.go | 245 ++++++- x/authz/keeper/keeper.go | 18 + x/authz/keeper/keys.go | 6 + x/authz/keeper/msg_server.go | 14 + .../proto/cosmos/authz/v1beta1/event.proto | 10 + x/authz/proto/cosmos/authz/v1beta1/tx.proto | 3 +- x/authz/tx.pb.go | 130 ++-- 9 files changed, 965 insertions(+), 257 deletions(-) diff --git a/api/cosmos/authz/v1beta1/event.pulsar.go b/api/cosmos/authz/v1beta1/event.pulsar.go index 6dd1e92e90d6..59523951a0dd 100644 --- a/api/cosmos/authz/v1beta1/event.pulsar.go +++ b/api/cosmos/authz/v1beta1/event.pulsar.go @@ -1109,6 +1109,490 @@ func (x *fastReflection_EventRevoke) ProtoMethods() *protoiface.Methods { } } +var ( + md_EventRevokeAll protoreflect.MessageDescriptor + fd_EventRevokeAll_msg_type_url protoreflect.FieldDescriptor + fd_EventRevokeAll_granter protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_authz_v1beta1_event_proto_init() + md_EventRevokeAll = File_cosmos_authz_v1beta1_event_proto.Messages().ByName("EventRevokeAll") + fd_EventRevokeAll_msg_type_url = md_EventRevokeAll.Fields().ByName("msg_type_url") + fd_EventRevokeAll_granter = md_EventRevokeAll.Fields().ByName("granter") +} + +var _ protoreflect.Message = (*fastReflection_EventRevokeAll)(nil) + +type fastReflection_EventRevokeAll EventRevokeAll + +func (x *EventRevokeAll) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventRevokeAll)(x) +} + +func (x *EventRevokeAll) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_authz_v1beta1_event_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EventRevokeAll_messageType fastReflection_EventRevokeAll_messageType +var _ protoreflect.MessageType = fastReflection_EventRevokeAll_messageType{} + +type fastReflection_EventRevokeAll_messageType struct{} + +func (x fastReflection_EventRevokeAll_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventRevokeAll)(nil) +} +func (x fastReflection_EventRevokeAll_messageType) New() protoreflect.Message { + return new(fastReflection_EventRevokeAll) +} +func (x fastReflection_EventRevokeAll_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventRevokeAll +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventRevokeAll) Descriptor() protoreflect.MessageDescriptor { + return md_EventRevokeAll +} + +// 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_EventRevokeAll) Type() protoreflect.MessageType { + return _fastReflection_EventRevokeAll_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventRevokeAll) New() protoreflect.Message { + return new(fastReflection_EventRevokeAll) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventRevokeAll) Interface() protoreflect.ProtoMessage { + return (*EventRevokeAll)(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_EventRevokeAll) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.MsgTypeUrl != "" { + value := protoreflect.ValueOfString(x.MsgTypeUrl) + if !f(fd_EventRevokeAll_msg_type_url, value) { + return + } + } + if x.Granter != "" { + value := protoreflect.ValueOfString(x.Granter) + if !f(fd_EventRevokeAll_granter, 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_EventRevokeAll) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.authz.v1beta1.EventRevokeAll.msg_type_url": + return x.MsgTypeUrl != "" + case "cosmos.authz.v1beta1.EventRevokeAll.granter": + return x.Granter != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventRevokeAll")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.EventRevokeAll 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_EventRevokeAll) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.authz.v1beta1.EventRevokeAll.msg_type_url": + x.MsgTypeUrl = "" + case "cosmos.authz.v1beta1.EventRevokeAll.granter": + x.Granter = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventRevokeAll")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.EventRevokeAll 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_EventRevokeAll) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.authz.v1beta1.EventRevokeAll.msg_type_url": + value := x.MsgTypeUrl + return protoreflect.ValueOfString(value) + case "cosmos.authz.v1beta1.EventRevokeAll.granter": + value := x.Granter + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventRevokeAll")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.EventRevokeAll 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_EventRevokeAll) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.authz.v1beta1.EventRevokeAll.msg_type_url": + x.MsgTypeUrl = value.Interface().(string) + case "cosmos.authz.v1beta1.EventRevokeAll.granter": + x.Granter = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventRevokeAll")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.EventRevokeAll 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_EventRevokeAll) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.authz.v1beta1.EventRevokeAll.msg_type_url": + panic(fmt.Errorf("field msg_type_url of message cosmos.authz.v1beta1.EventRevokeAll is not mutable")) + case "cosmos.authz.v1beta1.EventRevokeAll.granter": + panic(fmt.Errorf("field granter of message cosmos.authz.v1beta1.EventRevokeAll is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventRevokeAll")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.EventRevokeAll 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_EventRevokeAll) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.authz.v1beta1.EventRevokeAll.msg_type_url": + return protoreflect.ValueOfString("") + case "cosmos.authz.v1beta1.EventRevokeAll.granter": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventRevokeAll")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.EventRevokeAll 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_EventRevokeAll) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.EventRevokeAll", 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_EventRevokeAll) 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_EventRevokeAll) 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_EventRevokeAll) 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_EventRevokeAll) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventRevokeAll) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.MsgTypeUrl) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Granter) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EventRevokeAll) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Granter) > 0 { + i -= len(x.Granter) + copy(dAtA[i:], x.Granter) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) + i-- + dAtA[i] = 0x1a + } + if len(x.MsgTypeUrl) > 0 { + i -= len(x.MsgTypeUrl) + copy(dAtA[i:], x.MsgTypeUrl) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MsgTypeUrl))) + i-- + dAtA[i] = 0x12 + } + 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().(*EventRevokeAll) + 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: EventRevokeAll: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventRevokeAll: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.MsgTypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var ( md_EventPruneExpiredGrants protoreflect.MessageDescriptor fd_EventPruneExpiredGrants_pruner protoreflect.FieldDescriptor @@ -1129,7 +1613,7 @@ func (x *EventPruneExpiredGrants) ProtoReflect() protoreflect.Message { } func (x *EventPruneExpiredGrants) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_event_proto_msgTypes[2] + mi := &file_cosmos_authz_v1beta1_event_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1656,6 +2140,54 @@ func (x *EventRevoke) GetGrantee() string { return "" } +// EventRevokeAll is emitted on Msg/RevokeAll +// +// Since: cosmos-sdk 0.50 +type EventRevokeAll struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Msg type URL for which all authorizations are revoked + MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` + // Granter account address + Granter string `protobuf:"bytes,3,opt,name=granter,proto3" json:"granter,omitempty"` +} + +func (x *EventRevokeAll) Reset() { + *x = EventRevokeAll{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_authz_v1beta1_event_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventRevokeAll) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventRevokeAll) ProtoMessage() {} + +// Deprecated: Use EventRevokeAll.ProtoReflect.Descriptor instead. +func (*EventRevokeAll) Descriptor() ([]byte, []int) { + return file_cosmos_authz_v1beta1_event_proto_rawDescGZIP(), []int{2} +} + +func (x *EventRevokeAll) GetMsgTypeUrl() string { + if x != nil { + return x.MsgTypeUrl + } + return "" +} + +func (x *EventRevokeAll) GetGranter() string { + if x != nil { + return x.Granter + } + return "" +} + // EventPruneExpiredGrants is emitted on Msg/PruneExpiredGrants // // Since: x/authz 1.0.0 @@ -1671,7 +2203,7 @@ type EventPruneExpiredGrants struct { func (x *EventPruneExpiredGrants) Reset() { *x = EventPruneExpiredGrants{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_event_proto_msgTypes[2] + mi := &file_cosmos_authz_v1beta1_event_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1685,7 +2217,7 @@ func (*EventPruneExpiredGrants) ProtoMessage() {} // Deprecated: Use EventPruneExpiredGrants.ProtoReflect.Descriptor instead. func (*EventPruneExpiredGrants) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_event_proto_rawDescGZIP(), []int{2} + return file_cosmos_authz_v1beta1_event_proto_rawDescGZIP(), []int{3} } func (x *EventPruneExpiredGrants) GetPruner() string { @@ -1722,25 +2254,32 @@ var file_cosmos_authz_v1beta1_event_proto_rawDesc = []byte{ 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x4b, 0x0a, 0x17, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, - 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, - 0x73, 0x12, 0x30, 0x0a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x72, 0x75, - 0x6e, 0x65, 0x72, 0x42, 0xcc, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x42, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, - 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x41, 0x75, 0x74, 0x68, 0x7a, 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, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x66, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x20, 0x0a, 0x0c, 0x6d, 0x73, 0x67, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x4b, + 0x0a, 0x17, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x70, 0x72, 0x75, + 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x42, 0xcc, 0x01, 0x0a, 0x18, + 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, + 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, + 0x74, 0x68, 0x7a, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, + 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x2e, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, + 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 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, 0x41, 0x75, 0x74, 0x68, + 0x7a, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -1755,11 +2294,12 @@ func file_cosmos_authz_v1beta1_event_proto_rawDescGZIP() []byte { return file_cosmos_authz_v1beta1_event_proto_rawDescData } -var file_cosmos_authz_v1beta1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_cosmos_authz_v1beta1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_cosmos_authz_v1beta1_event_proto_goTypes = []interface{}{ (*EventGrant)(nil), // 0: cosmos.authz.v1beta1.EventGrant (*EventRevoke)(nil), // 1: cosmos.authz.v1beta1.EventRevoke - (*EventPruneExpiredGrants)(nil), // 2: cosmos.authz.v1beta1.EventPruneExpiredGrants + (*EventRevokeAll)(nil), // 2: cosmos.authz.v1beta1.EventRevokeAll + (*EventPruneExpiredGrants)(nil), // 3: cosmos.authz.v1beta1.EventPruneExpiredGrants } var file_cosmos_authz_v1beta1_event_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -1800,6 +2340,18 @@ func file_cosmos_authz_v1beta1_event_proto_init() { } } file_cosmos_authz_v1beta1_event_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventRevokeAll); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_authz_v1beta1_event_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventPruneExpiredGrants); i { case 0: return &v.state @@ -1818,7 +2370,7 @@ func file_cosmos_authz_v1beta1_event_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_authz_v1beta1_event_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/api/cosmos/authz/v1beta1/tx.pulsar.go b/api/cosmos/authz/v1beta1/tx.pulsar.go index 4bbf459576ec..86b34b52498b 100644 --- a/api/cosmos/authz/v1beta1/tx.pulsar.go +++ b/api/cosmos/authz/v1beta1/tx.pulsar.go @@ -2879,16 +2879,14 @@ func (x *fastReflection_MsgRevokeResponse) ProtoMethods() *protoiface.Methods { } var ( - md_MsgRevokeAll protoreflect.MessageDescriptor - fd_MsgRevokeAll_granter protoreflect.FieldDescriptor - fd_MsgRevokeAll_msg_type_url protoreflect.FieldDescriptor + md_MsgRevokeAll protoreflect.MessageDescriptor + fd_MsgRevokeAll_granter protoreflect.FieldDescriptor ) func init() { file_cosmos_authz_v1beta1_tx_proto_init() md_MsgRevokeAll = File_cosmos_authz_v1beta1_tx_proto.Messages().ByName("MsgRevokeAll") fd_MsgRevokeAll_granter = md_MsgRevokeAll.Fields().ByName("granter") - fd_MsgRevokeAll_msg_type_url = md_MsgRevokeAll.Fields().ByName("msg_type_url") } var _ protoreflect.Message = (*fastReflection_MsgRevokeAll)(nil) @@ -2962,12 +2960,6 @@ func (x *fastReflection_MsgRevokeAll) Range(f func(protoreflect.FieldDescriptor, return } } - if x.MsgTypeUrl != "" { - value := protoreflect.ValueOfString(x.MsgTypeUrl) - if !f(fd_MsgRevokeAll_msg_type_url, value) { - return - } - } } // Has reports whether a field is populated. @@ -2985,8 +2977,6 @@ func (x *fastReflection_MsgRevokeAll) Has(fd protoreflect.FieldDescriptor) bool switch fd.FullName() { case "cosmos.authz.v1beta1.MsgRevokeAll.granter": return x.Granter != "" - case "cosmos.authz.v1beta1.MsgRevokeAll.msg_type_url": - return x.MsgTypeUrl != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAll")) @@ -3005,8 +2995,6 @@ func (x *fastReflection_MsgRevokeAll) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "cosmos.authz.v1beta1.MsgRevokeAll.granter": x.Granter = "" - case "cosmos.authz.v1beta1.MsgRevokeAll.msg_type_url": - x.MsgTypeUrl = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAll")) @@ -3026,9 +3014,6 @@ func (x *fastReflection_MsgRevokeAll) Get(descriptor protoreflect.FieldDescripto case "cosmos.authz.v1beta1.MsgRevokeAll.granter": value := x.Granter return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.MsgRevokeAll.msg_type_url": - value := x.MsgTypeUrl - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAll")) @@ -3051,8 +3036,6 @@ func (x *fastReflection_MsgRevokeAll) Set(fd protoreflect.FieldDescriptor, value switch fd.FullName() { case "cosmos.authz.v1beta1.MsgRevokeAll.granter": x.Granter = value.Interface().(string) - case "cosmos.authz.v1beta1.MsgRevokeAll.msg_type_url": - x.MsgTypeUrl = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAll")) @@ -3075,8 +3058,6 @@ func (x *fastReflection_MsgRevokeAll) Mutable(fd protoreflect.FieldDescriptor) p switch fd.FullName() { case "cosmos.authz.v1beta1.MsgRevokeAll.granter": panic(fmt.Errorf("field granter of message cosmos.authz.v1beta1.MsgRevokeAll is not mutable")) - case "cosmos.authz.v1beta1.MsgRevokeAll.msg_type_url": - panic(fmt.Errorf("field msg_type_url of message cosmos.authz.v1beta1.MsgRevokeAll is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAll")) @@ -3092,8 +3073,6 @@ func (x *fastReflection_MsgRevokeAll) NewField(fd protoreflect.FieldDescriptor) switch fd.FullName() { case "cosmos.authz.v1beta1.MsgRevokeAll.granter": return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.MsgRevokeAll.msg_type_url": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeAll")) @@ -3167,10 +3146,6 @@ func (x *fastReflection_MsgRevokeAll) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.MsgTypeUrl) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -3200,13 +3175,6 @@ func (x *fastReflection_MsgRevokeAll) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.MsgTypeUrl) > 0 { - i -= len(x.MsgTypeUrl) - copy(dAtA[i:], x.MsgTypeUrl) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MsgTypeUrl))) - i-- - dAtA[i] = 0x12 - } if len(x.Granter) > 0 { i -= len(x.Granter) copy(dAtA[i:], x.Granter) @@ -3295,38 +3263,6 @@ func (x *fastReflection_MsgRevokeAll) ProtoMethods() *protoiface.Methods { } x.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MsgTypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -4760,8 +4696,7 @@ type MsgRevokeAll struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` + Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` } func (x *MsgRevokeAll) Reset() { @@ -4791,13 +4726,6 @@ func (x *MsgRevokeAll) GetGranter() string { return "" } -func (x *MsgRevokeAll) GetMsgTypeUrl() string { - if x != nil { - return x.MsgTypeUrl - } - return "" -} - // MsgRevokeAllResponse defines the Msg/MsgRevokeAllResponse response type. type MsgRevokeAllResponse struct { state protoimpl.MessageState @@ -4949,68 +4877,66 @@ var file_cosmos_authz_v1beta1_tx_proto_rawDesc = []byte{ 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x0c, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, - 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x20, - 0x0a, 0x0c, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, - 0x3a, 0x28, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, - 0xb0, 0x2a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x22, 0x16, 0x0a, 0x14, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x56, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, - 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x70, - 0x72, 0x75, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, - 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x3a, 0x0b, 0x82, - 0xe7, 0xb0, 0x2a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, - 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd4, 0x03, 0x0a, 0x03, - 0x4d, 0x73, 0x67, 0x12, 0x4f, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x1a, 0x26, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x52, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x1f, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x1a, 0x27, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x09, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x41, 0x6c, 0x6c, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x12, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, - 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6c, 0x0a, 0x0c, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x3a, 0x28, 0x82, + 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x22, 0x16, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x56, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x70, 0x72, 0x75, 0x6e, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, + 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x50, 0x72, + 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd4, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, + 0x12, 0x4f, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x52, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x09, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, + 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x41, 0x6c, 0x6c, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, + 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x76, 0x0a, 0x12, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, + 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, - 0x2a, 0x01, 0x42, 0xcd, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, - 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, - 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, - 0x74, 0x68, 0x7a, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, - 0x7a, 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, - 0x41, 0x75, 0x74, 0x68, 0x7a, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xc8, 0xe1, - 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x74, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, + 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, + 0xcd, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, + 0x75, 0x74, 0x68, 0x7a, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, + 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, + 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, + 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 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, 0x41, 0x75, 0x74, + 0x68, 0x7a, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/x/authz/event.pb.go b/x/authz/event.pb.go index 81266f67410d..04e4f20e90cf 100644 --- a/x/authz/event.pb.go +++ b/x/authz/event.pb.go @@ -155,6 +155,63 @@ func (m *EventRevoke) GetGrantee() string { return "" } +// EventRevokeAll is emitted on Msg/RevokeAll +// +// Since: cosmos-sdk 0.50 +type EventRevokeAll struct { + // Msg type URL for which all authorizations are revoked + MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` + // Granter account address + Granter string `protobuf:"bytes,3,opt,name=granter,proto3" json:"granter,omitempty"` +} + +func (m *EventRevokeAll) Reset() { *m = EventRevokeAll{} } +func (m *EventRevokeAll) String() string { return proto.CompactTextString(m) } +func (*EventRevokeAll) ProtoMessage() {} +func (*EventRevokeAll) Descriptor() ([]byte, []int) { + return fileDescriptor_1f88cbc71a8baf1f, []int{2} +} +func (m *EventRevokeAll) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventRevokeAll) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventRevokeAll.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 *EventRevokeAll) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventRevokeAll.Merge(m, src) +} +func (m *EventRevokeAll) XXX_Size() int { + return m.Size() +} +func (m *EventRevokeAll) XXX_DiscardUnknown() { + xxx_messageInfo_EventRevokeAll.DiscardUnknown(m) +} + +var xxx_messageInfo_EventRevokeAll proto.InternalMessageInfo + +func (m *EventRevokeAll) GetMsgTypeUrl() string { + if m != nil { + return m.MsgTypeUrl + } + return "" +} + +func (m *EventRevokeAll) GetGranter() string { + if m != nil { + return m.Granter + } + return "" +} + // EventPruneExpiredGrants is emitted on Msg/PruneExpiredGrants // // Since: x/authz 1.0.0 @@ -167,7 +224,7 @@ func (m *EventPruneExpiredGrants) Reset() { *m = EventPruneExpiredGrants func (m *EventPruneExpiredGrants) String() string { return proto.CompactTextString(m) } func (*EventPruneExpiredGrants) ProtoMessage() {} func (*EventPruneExpiredGrants) Descriptor() ([]byte, []int) { - return fileDescriptor_1f88cbc71a8baf1f, []int{2} + return fileDescriptor_1f88cbc71a8baf1f, []int{3} } func (m *EventPruneExpiredGrants) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -206,13 +263,14 @@ func (m *EventPruneExpiredGrants) GetPruner() string { func init() { proto.RegisterType((*EventGrant)(nil), "cosmos.authz.v1beta1.EventGrant") proto.RegisterType((*EventRevoke)(nil), "cosmos.authz.v1beta1.EventRevoke") + proto.RegisterType((*EventRevokeAll)(nil), "cosmos.authz.v1beta1.EventRevokeAll") proto.RegisterType((*EventPruneExpiredGrants)(nil), "cosmos.authz.v1beta1.EventPruneExpiredGrants") } func init() { proto.RegisterFile("cosmos/authz/v1beta1/event.proto", fileDescriptor_1f88cbc71a8baf1f) } var fileDescriptor_1f88cbc71a8baf1f = []byte{ - // 269 bytes of a gzipped FileDescriptorProto + // 281 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x2c, 0x2d, 0xc9, 0xa8, 0xd2, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x81, 0xa8, @@ -223,13 +281,14 @@ var fileDescriptor_1f88cbc71a8baf1f = []byte{ 0xe5, 0x08, 0x19, 0x71, 0xb1, 0xa7, 0x83, 0x94, 0xa6, 0x16, 0x49, 0x30, 0x83, 0x24, 0x9d, 0x24, 0x2e, 0x6d, 0xd1, 0x85, 0x59, 0xeb, 0x98, 0x92, 0x52, 0x94, 0x5a, 0x5c, 0x1c, 0x5c, 0x52, 0x94, 0x99, 0x97, 0x1e, 0x04, 0x53, 0x88, 0xd0, 0x93, 0x2a, 0xc1, 0x42, 0x9c, 0x9e, 0x54, 0xa5, 0xe9, - 0x8c, 0x5c, 0xdc, 0x60, 0x87, 0x05, 0xa5, 0x96, 0xe5, 0x67, 0xa7, 0x0e, 0x22, 0x97, 0x79, 0x73, - 0x89, 0x83, 0x1d, 0x16, 0x50, 0x54, 0x9a, 0x97, 0xea, 0x5a, 0x51, 0x90, 0x59, 0x94, 0x9a, 0x02, - 0x0e, 0xbd, 0x62, 0x21, 0x03, 0x2e, 0xb6, 0x02, 0x90, 0x68, 0x11, 0xc4, 0x79, 0x78, 0x4c, 0x83, - 0xaa, 0x73, 0xd2, 0x3b, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, - 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xa8, 0xbe, - 0xe2, 0x94, 0x6c, 0xbd, 0xcc, 0x7c, 0xfd, 0x0a, 0x48, 0xa4, 0x27, 0xb1, 0x81, 0xa3, 0xcd, 0x18, - 0x10, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x9f, 0xa5, 0x63, 0x0b, 0x02, 0x00, 0x00, + 0x8c, 0x5c, 0xdc, 0x60, 0x87, 0x05, 0xa5, 0x96, 0xe5, 0x67, 0xa7, 0x0e, 0x22, 0x97, 0xa5, 0x71, + 0xf1, 0x21, 0x39, 0xcc, 0x31, 0x27, 0x87, 0x36, 0x6e, 0x53, 0xf2, 0xe6, 0x12, 0x07, 0xdb, 0x13, + 0x50, 0x54, 0x9a, 0x97, 0xea, 0x5a, 0x51, 0x90, 0x59, 0x94, 0x9a, 0x02, 0x8e, 0xa5, 0x62, 0x21, + 0x03, 0x2e, 0xb6, 0x02, 0x90, 0x68, 0x11, 0xc4, 0x2a, 0x3c, 0xa6, 0x41, 0xd5, 0x39, 0xe9, 0x9d, + 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, + 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x14, 0x54, 0x5f, 0x71, 0x4a, 0xb6, 0x5e, + 0x66, 0xbe, 0x7e, 0x05, 0x24, 0x71, 0x25, 0xb1, 0x81, 0x93, 0x87, 0x31, 0x20, 0x00, 0x00, 0xff, + 0xff, 0x18, 0xac, 0x64, 0xe7, 0x73, 0x02, 0x00, 0x00, } func (m *EventGrant) Marshal() (dAtA []byte, err error) { @@ -320,6 +379,43 @@ func (m *EventRevoke) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *EventRevokeAll) 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 *EventRevokeAll) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventRevokeAll) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Granter) > 0 { + i -= len(m.Granter) + copy(dAtA[i:], m.Granter) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Granter))) + i-- + dAtA[i] = 0x1a + } + if len(m.MsgTypeUrl) > 0 { + i -= len(m.MsgTypeUrl) + copy(dAtA[i:], m.MsgTypeUrl) + i = encodeVarintEvent(dAtA, i, uint64(len(m.MsgTypeUrl))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + func (m *EventPruneExpiredGrants) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -403,6 +499,23 @@ func (m *EventRevoke) Size() (n int) { return n } +func (m *EventRevokeAll) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MsgTypeUrl) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + func (m *EventPruneExpiredGrants) Size() (n int) { if m == nil { return 0 @@ -714,6 +827,120 @@ func (m *EventRevoke) Unmarshal(dAtA []byte) error { } return nil } +func (m *EventRevokeAll) 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 ErrIntOverflowEvent + } + 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: EventRevokeAll: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventRevokeAll: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + 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 ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MsgTypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + 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 ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *EventPruneExpiredGrants) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/authz/keeper/keeper.go b/x/authz/keeper/keeper.go index 0be13bd6d1e5..6ede8c629b45 100644 --- a/x/authz/keeper/keeper.go +++ b/x/authz/keeper/keeper.go @@ -256,6 +256,24 @@ func (k Keeper) DeleteGrant(ctx context.Context, grantee, granter sdk.AccAddress }) } +// DeleteAllGrants revokes all authorizations granted to the grantee by the granter. +func (k Keeper) DeleteAllGrants(ctx context.Context, granter sdk.AccAddress) error { + store := runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx)) + + granterStoreKey := granterStoreKey(granter) + iterator := storetypes.KVStorePrefixIterator(store, granterStoreKey) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + // Directly delete the grant without deserializing, as we're deleting all grants for the msgType. + store.Delete(iterator.Key()) + } + + return k.EventService.EventManager((ctx)).Emit(&authz.EventRevokeAll{ + Granter: granter.String(), + }) +} + // GetAuthorizations Returns list of `Authorizations` granted to the grantee by the granter. func (k Keeper) GetAuthorizations(ctx context.Context, grantee, granter sdk.AccAddress) ([]authz.Authorization, error) { store := runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx)) diff --git a/x/authz/keeper/keys.go b/x/authz/keeper/keys.go index c268a83e6079..e29eb2245d64 100644 --- a/x/authz/keeper/keys.go +++ b/x/authz/keeper/keys.go @@ -39,6 +39,12 @@ func grantStoreKey(grantee, granter sdk.AccAddress, msgType string) []byte { return key } +func granterStoreKey(granter sdk.AccAddress) []byte { + granter = address.MustLengthPrefix(granter) + key := sdk.AppendLengthPrefixedBytes(GrantKey, granter) + return key +} + // parseGrantStoreKey - split granter, grantee address and msg type from the authorization key func parseGrantStoreKey(key []byte) (granterAddr, granteeAddr sdk.AccAddress, msgType string) { // key is of format: diff --git a/x/authz/keeper/msg_server.go b/x/authz/keeper/msg_server.go index 05f73a097d2a..efc53c449ee9 100644 --- a/x/authz/keeper/msg_server.go +++ b/x/authz/keeper/msg_server.go @@ -79,6 +79,20 @@ func (k Keeper) Revoke(ctx context.Context, msg *authz.MsgRevoke) (*authz.MsgRev return &authz.MsgRevokeResponse{}, nil } +// RevokeAll implements the MsgServer.RevokeAll method. +func (k Keeper) RevokeAll(ctx context.Context, msg *authz.MsgRevokeAll) (*authz.MsgRevokeAllResponse, error) { + granter, err := k.authKeeper.AddressCodec().StringToBytes(msg.Granter) + if err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid granter address: %s", err) + } + + if err := k.DeleteAllGrants(ctx, granter); err != nil { + return nil, err + } + + return &authz.MsgRevokeAllResponse{}, nil +} + // Exec implements the MsgServer.Exec method. func (k Keeper) Exec(ctx context.Context, msg *authz.MsgExec) (*authz.MsgExecResponse, error) { if msg.Grantee == "" { diff --git a/x/authz/proto/cosmos/authz/v1beta1/event.proto b/x/authz/proto/cosmos/authz/v1beta1/event.proto index 44abb5645aaf..f4a9d823efc9 100644 --- a/x/authz/proto/cosmos/authz/v1beta1/event.proto +++ b/x/authz/proto/cosmos/authz/v1beta1/event.proto @@ -29,6 +29,16 @@ message EventRevoke { string grantee = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } +// EventRevokeAll is emitted on Msg/RevokeAll +// +// Since: cosmos-sdk 0.50 +message EventRevokeAll { + // Msg type URL for which all authorizations are revoked + string msg_type_url = 2; + // Granter account address + string granter = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + // EventPruneExpiredGrants is emitted on Msg/PruneExpiredGrants // // Since: x/authz 1.0.0 diff --git a/x/authz/proto/cosmos/authz/v1beta1/tx.proto b/x/authz/proto/cosmos/authz/v1beta1/tx.proto index 04c4fed8ac3c..65c7f4d3c698 100644 --- a/x/authz/proto/cosmos/authz/v1beta1/tx.proto +++ b/x/authz/proto/cosmos/authz/v1beta1/tx.proto @@ -93,8 +93,7 @@ message MsgRevokeAll { option (cosmos.msg.v1.signer) = "granter"; option (amino.name) = "cosmos-sdk/MsgRevokeAll"; - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string msg_type_url = 2; + string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgRevokeAllResponse defines the Msg/MsgRevokeAllResponse response type. diff --git a/x/authz/tx.pb.go b/x/authz/tx.pb.go index 7a364dce2b0a..395161609c5d 100644 --- a/x/authz/tx.pb.go +++ b/x/authz/tx.pb.go @@ -272,8 +272,7 @@ var xxx_messageInfo_MsgRevokeResponse proto.InternalMessageInfo // MsgRevokeAll revokes all grants issued by the specified granter. type MsgRevokeAll struct { - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` + Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` } func (m *MsgRevokeAll) Reset() { *m = MsgRevokeAll{} } @@ -441,48 +440,48 @@ func init() { func init() { proto.RegisterFile("cosmos/authz/v1beta1/tx.proto", fileDescriptor_3ceddab7d8589ad1) } var fileDescriptor_3ceddab7d8589ad1 = []byte{ - // 656 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xbd, 0x6f, 0xd3, 0x40, - 0x14, 0xcf, 0x35, 0xfd, 0x20, 0xaf, 0x95, 0xa0, 0x6e, 0xa0, 0xae, 0xab, 0xba, 0x91, 0xa1, 0x10, - 0xa5, 0xaa, 0x4d, 0xd3, 0x2d, 0x62, 0x49, 0xa4, 0x8a, 0x85, 0x08, 0x64, 0x3e, 0x06, 0x18, 0x2a, - 0xa7, 0x39, 0x8e, 0xa8, 0xb6, 0xcf, 0xf2, 0x39, 0x51, 0xc2, 0x84, 0x18, 0x19, 0x10, 0x7f, 0x06, - 0x6c, 0x1d, 0x3a, 0xf2, 0x07, 0x54, 0x4c, 0x15, 0x42, 0x88, 0x09, 0x41, 0x3b, 0xf4, 0xdf, 0x40, - 0xbe, 0x3b, 0xbb, 0x5f, 0x6e, 0x53, 0x18, 0x58, 0x92, 0xf7, 0xf1, 0x7b, 0xef, 0x7e,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f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0xd0, 0x2c, 0x5d, 0x9e, 0x06, 0x00, 0x00, + // 650 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xce, 0x36, 0xfd, 0x21, 0xd3, 0x4a, 0x50, 0x37, 0x50, 0xd7, 0x55, 0xdd, 0xc8, 0x50, 0x88, + 0x52, 0xd5, 0xa6, 0xe9, 0x2d, 0xe2, 0x92, 0x48, 0x15, 0x17, 0x22, 0x90, 0xf9, 0x39, 0xc0, 0xa1, + 0x72, 0x9a, 0x65, 0x89, 0x6a, 0x7b, 0x2d, 0xaf, 0x13, 0x25, 0x9c, 0x10, 0x47, 0x4e, 0x3c, 0x06, + 0xdc, 0x7a, 0xe8, 0x91, 0x07, 0xa8, 0x38, 0x55, 0x08, 0x21, 0x4e, 0x08, 0xda, 0x43, 0x5f, 0x03, + 0x79, 0x77, 0xed, 0xfe, 0xe0, 0x34, 0x85, 0x03, 0x97, 0x64, 0x67, 0xe6, 0x9b, 0x99, 0x6f, 0xfc, + 0xcd, 0x2e, 0x2c, 0x6d, 0x53, 0xe6, 0x51, 0x66, 0x39, 0xdd, 0xe8, 0xd5, 0x6b, 0xab, 0xb7, 0xde, + 0xc2, 0x91, 0xb3, 0x6e, 0x45, 0x7d, 0x33, 0x08, 0x69, 0x44, 0x95, 0xa2, 0x08, 0x9b, 0x3c, 0x6c, + 0xca, 0xb0, 0xb6, 0x20, 0xbc, 0x5b, 0x1c, 0x63, 0x49, 0x08, 0x37, 0xb4, 0x22, 0xa1, 0x84, 0x0a, + 0x7f, 0x7c, 0x92, 0xde, 0x05, 0x42, 0x29, 0x71, 0xb1, 0xc5, 0xad, 0x56, 0xf7, 0xa5, 0xe5, 0xf8, + 0x03, 0x19, 0x2a, 0x65, 0x12, 0x10, 0xfd, 0x04, 0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xf8, 0x38, 0xac, 0xad, 0x5c, 0x18, 0x4e, 0xab, 0xd9, 0x30, 0x29, 0xb7, + 0x6e, 0x79, 0x68, 0x82, 0x00, 0x68, 0x77, 0x46, 0x00, 0xd2, 0x9a, 0x2f, 0xa0, 0x70, 0x22, 0xbb, + 0x31, 0x22, 0xab, 0xee, 0xba, 0x5a, 0x65, 0x34, 0x26, 0x2d, 0xde, 0x03, 0x25, 0x43, 0xcd, 0xd5, + 0xa1, 0x15, 0xfe, 0x04, 0x6b, 0x1b, 0x7f, 0x01, 0x4e, 0xfa, 0x6a, 0x13, 0x6f, 0xe2, 0x37, 0xac, + 0x51, 0xdd, 0xff, 0xa5, 0xe7, 0xf6, 0x0f, 0x75, 0x74, 0x70, 0xa8, 0xa3, 0x9f, 0x87, 0x3a, 0x7a, + 0x7f, 0xa4, 0xe7, 0x0e, 0x8e, 0xf4, 0xdc, 0xf7, 0x23, 0x3d, 0xf7, 0x5c, 0x2e, 0x10, 0x6b, 0xef, + 0x98, 0x1d, 0x6a, 0xf5, 0xc5, 0xab, 0xde, 0x9a, 0xe4, 0x0f, 0xcc, 0xc6, 0xef, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x1f, 0x3a, 0x80, 0x46, 0x7b, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -968,13 +967,6 @@ func (m *MsgRevokeAll) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.MsgTypeUrl) > 0 { - i -= len(m.MsgTypeUrl) - copy(dAtA[i:], m.MsgTypeUrl) - i = encodeVarintTx(dAtA, i, uint64(len(m.MsgTypeUrl))) - i-- - dAtA[i] = 0x12 - } if len(m.Granter) > 0 { i -= len(m.Granter) copy(dAtA[i:], m.Granter) @@ -1174,10 +1166,6 @@ func (m *MsgRevokeAll) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.MsgTypeUrl) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } return n } @@ -1870,38 +1858,6 @@ func (m *MsgRevokeAll) Unmarshal(dAtA []byte) error { } m.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", 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.MsgTypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) From 13bee1e923af6002a769dbbfd97748599c5e49e8 Mon Sep 17 00:00:00 2001 From: kien6034 Date: Wed, 24 Apr 2024 00:51:20 +0700 Subject: [PATCH 03/15] docs: add todo for delete all grants --- x/authz/keeper/keeper.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/authz/keeper/keeper.go b/x/authz/keeper/keeper.go index 6ede8c629b45..18b0be5dc497 100644 --- a/x/authz/keeper/keeper.go +++ b/x/authz/keeper/keeper.go @@ -266,6 +266,7 @@ func (k Keeper) DeleteAllGrants(ctx context.Context, granter sdk.AccAddress) err for ; iterator.Valid(); iterator.Next() { // Directly delete the grant without deserializing, as we're deleting all grants for the msgType. + // TODO: need to test this function store.Delete(iterator.Key()) } From 6083cba58c8096b0ad1890771fbde8e91f8bad44 Mon Sep 17 00:00:00 2001 From: Tuan Tran Date: Wed, 24 Apr 2024 09:11:39 +0700 Subject: [PATCH 04/15] add IterateGranterGrants and update basic keeper test --- x/authz/keeper/keeper.go | 42 +++++++++++++++++++++++------------ x/authz/keeper/keeper_test.go | 38 ++++++++++++++++++++++++++----- 2 files changed, 60 insertions(+), 20 deletions(-) diff --git a/x/authz/keeper/keeper.go b/x/authz/keeper/keeper.go index 18b0be5dc497..e92ce43c97ec 100644 --- a/x/authz/keeper/keeper.go +++ b/x/authz/keeper/keeper.go @@ -258,20 +258,11 @@ func (k Keeper) DeleteGrant(ctx context.Context, grantee, granter sdk.AccAddress // DeleteAllGrants revokes all authorizations granted to the grantee by the granter. func (k Keeper) DeleteAllGrants(ctx context.Context, granter sdk.AccAddress) error { - store := runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx)) - - granterStoreKey := granterStoreKey(granter) - iterator := storetypes.KVStorePrefixIterator(store, granterStoreKey) - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - // Directly delete the grant without deserializing, as we're deleting all grants for the msgType. - // TODO: need to test this function - store.Delete(iterator.Key()) - } - - return k.EventService.EventManager((ctx)).Emit(&authz.EventRevokeAll{ - Granter: granter.String(), + return k.IterateGranterGrants(ctx, granter, func(grantee sdk.AccAddress, msgType string) (stop bool, err error) { + if err := k.DeleteGrant(ctx, grantee, granter, msgType); err != nil { + return false, err + } + return false, nil }) } @@ -344,6 +335,29 @@ func (k Keeper) IterateGrants(ctx context.Context, return nil } +func (k Keeper) IterateGranterGrants(ctx context.Context, granter sdk.AccAddress, + handler func(granteeAddr sdk.AccAddress, msgType string) (stop bool, err error), +) error { + // no-op if handler is nil + if handler == nil { + return nil + } + store := runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx)) + iter := storetypes.KVStorePrefixIterator(store, granterStoreKey(granter)) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + _, granteeAddr, msgType := parseGrantStoreKey(iter.Key()) + ok, err := handler(granteeAddr, msgType) + if err != nil { + return err + } + if ok { + break + } + } + return nil +} + func (k Keeper) getGrantQueueItem(ctx context.Context, expiration time.Time, granter, grantee sdk.AccAddress) (*authz.GrantQueueItem, error) { store := k.KVStoreService.OpenKVStore(ctx) bz, err := store.Get(GrantQueueKey(expiration, granter, grantee)) diff --git a/x/authz/keeper/keeper_test.go b/x/authz/keeper/keeper_test.go index 23d25f2af98b..c49f22ebcbf4 100644 --- a/x/authz/keeper/keeper_test.go +++ b/x/authz/keeper/keeper_test.go @@ -92,27 +92,53 @@ func (s *TestSuite) TestKeeper() { require := s.Require() granterAddr := addrs[0] - granteeAddr := addrs[1] + grantee1Addr := addrs[1] + grantee2Addr := addrs[2] + grantee3Addr := addrs[3] + grantees := []sdk.AccAddress{grantee1Addr, grantee2Addr, grantee3Addr} s.T().Log("verify that no authorization returns nil") authorizations, err := s.authzKeeper.GetAuthorizations(ctx, granteeAddr, granterAddr) require.NoError(err) require.Len(authorizations, 0) - s.T().Log("verify save, get and delete") + s.T().Log("verify save, get and delete work for grants") sendAutz := &banktypes.SendAuthorization{SpendLimit: coins100} expire := now.AddDate(1, 0, 0) - err = s.authzKeeper.SaveGrant(ctx, granteeAddr, granterAddr, sendAutz, &expire) + for _, grantee := range grantees { + err = s.authzKeeper.SaveGrant(ctx, grantee, granterAddr, sendAutz, &expire) + require.NoError(err) + } + + for _, grantee := range grantees { + authorizations, err = s.authzKeeper.GetAuthorizations(ctx, grantee, granterAddr) + require.NoError(err) + require.Len(authorizations, 1) + } + + err = s.authzKeeper.DeleteGrant(ctx, grantee1Addr, granterAddr, sendAutz.MsgTypeURL()) require.NoError(err) - authorizations, err = s.authzKeeper.GetAuthorizations(ctx, granteeAddr, granterAddr) + authorizations, err = s.authzKeeper.GetAuthorizations(ctx, grantee1Addr, granterAddr) + require.NoError(err) + require.Len(authorizations, 0) + authorizations, err = s.authzKeeper.GetAuthorizations(ctx, grantee2Addr, granterAddr) + require.NoError(err) + require.Len(authorizations, 1) + authorizations, err = s.authzKeeper.GetAuthorizations(ctx, grantee3Addr, granterAddr) require.NoError(err) require.Len(authorizations, 1) - err = s.authzKeeper.DeleteGrant(ctx, granteeAddr, granterAddr, sendAutz.MsgTypeURL()) + err = s.authzKeeper.DeleteAllGrants(ctx, granterAddr) require.NoError(err) - authorizations, err = s.authzKeeper.GetAuthorizations(ctx, granteeAddr, granterAddr) + authorizations, err = s.authzKeeper.GetAuthorizations(ctx, grantee1Addr, granterAddr) + require.NoError(err) + require.Len(authorizations, 0) + authorizations, err = s.authzKeeper.GetAuthorizations(ctx, grantee2Addr, granterAddr) + require.NoError(err) + require.Len(authorizations, 0) + authorizations, err = s.authzKeeper.GetAuthorizations(ctx, grantee3Addr, granterAddr) require.NoError(err) require.Len(authorizations, 0) From 417956b51d713cbfc044f0c9845c9e6f06c18c71 Mon Sep 17 00:00:00 2001 From: Tuan Tran Date: Wed, 24 Apr 2024 17:21:40 +0700 Subject: [PATCH 05/15] add check when revoke nothing --- x/authz/keeper/keeper.go | 13 ++++++- x/authz/keeper/keeper_test.go | 37 ++++++++++++++++++ x/authz/keeper/msg_server_test.go | 64 +++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 1 deletion(-) diff --git a/x/authz/keeper/keeper.go b/x/authz/keeper/keeper.go index e92ce43c97ec..e2db0db44be9 100644 --- a/x/authz/keeper/keeper.go +++ b/x/authz/keeper/keeper.go @@ -258,12 +258,23 @@ func (k Keeper) DeleteGrant(ctx context.Context, grantee, granter sdk.AccAddress // DeleteAllGrants revokes all authorizations granted to the grantee by the granter. func (k Keeper) DeleteAllGrants(ctx context.Context, granter sdk.AccAddress) error { - return k.IterateGranterGrants(ctx, granter, func(grantee sdk.AccAddress, msgType string) (stop bool, err error) { + count := 0 + err := k.IterateGranterGrants(ctx, granter, func(grantee sdk.AccAddress, msgType string) (stop bool, err error) { + count++ if err := k.DeleteGrant(ctx, grantee, granter, msgType); err != nil { return false, err } return false, nil }) + if err != nil { + return err + } + if count == 0 { + return errorsmod.Wrapf(authz.ErrNoAuthorizationFound, "no grants found for granter %s", granter) + } + return k.EventService.EventManager(ctx).Emit(&authz.EventRevokeAll{ + Granter: granter.String(), + }) } // GetAuthorizations Returns list of `Authorizations` granted to the grantee by the granter. diff --git a/x/authz/keeper/keeper_test.go b/x/authz/keeper/keeper_test.go index c49f22ebcbf4..5fdb1e1b96e5 100644 --- a/x/authz/keeper/keeper_test.go +++ b/x/authz/keeper/keeper_test.go @@ -142,6 +142,10 @@ func (s *TestSuite) TestKeeper() { require.NoError(err) require.Len(authorizations, 0) + // test delete all grants for granter with no grants, should error + err = s.authzKeeper.DeleteAllGrants(ctx, granterAddr) + require.Error(err) + s.T().Log("verify granting same authorization overwrite existing authorization") err = s.authzKeeper.SaveGrant(ctx, granteeAddr, granterAddr, sendAutz, &expire) require.NoError(err) @@ -188,6 +192,39 @@ func (s *TestSuite) TestKeeperIter() { }) } +func (s *TestSuite) TestKeeperGranterGrantsIter() { + ctx, addrs := s.ctx, s.addrs + + granterAddr := addrs[0] + granter2Addr := addrs[1] + granteeAddr := addrs[2] + grantee2Addr := addrs[3] + grantee3Addr := addrs[4] + e := ctx.HeaderInfo().Time.AddDate(1, 0, 0) + sendAuthz := banktypes.NewSendAuthorization(coins100, nil, s.accountKeeper.AddressCodec()) + + err := s.authzKeeper.SaveGrant(ctx, granteeAddr, granterAddr, sendAuthz, &e) + s.Require().NoError(err) + + err = s.authzKeeper.SaveGrant(ctx, grantee2Addr, granterAddr, sendAuthz, &e) + s.Require().NoError(err) + + err = s.authzKeeper.SaveGrant(ctx, grantee3Addr, granter2Addr, sendAuthz, &e) + s.Require().NoError(err) + + _ = s.authzKeeper.IterateGranterGrants(ctx, granterAddr, func(grantee sdk.AccAddress, msgType string) (bool, error) { + s.Require().Contains([]sdk.AccAddress{granteeAddr, grantee2Addr}, grantee) + s.Require().NotContains([]sdk.AccAddress{grantee3Addr}, grantee) + return true, nil + }) + + _ = s.authzKeeper.IterateGranterGrants(ctx, granter2Addr, func(grantee sdk.AccAddress, msgType string) (bool, error) { + s.Require().Equal(grantee3Addr, grantee) + s.Require().NotContains([]sdk.AccAddress{granteeAddr, grantee2Addr}, grantee) + return true, nil + }) +} + func (s *TestSuite) TestDispatchAction() { addrs := s.addrs require := s.Require() diff --git a/x/authz/keeper/msg_server_test.go b/x/authz/keeper/msg_server_test.go index 5e4a25279b87..6313f8a3f8fc 100644 --- a/x/authz/keeper/msg_server_test.go +++ b/x/authz/keeper/msg_server_test.go @@ -435,3 +435,67 @@ func (suite *TestSuite) TestPruneExpiredGrants() { }) suite.Require().Equal(0, totalGrants) } + +func (suite *TestSuite) TestRevokeAllGrants() { + addrs := simtestutil.CreateIncrementalAccounts(3) + + grantee, grantee2, granter := addrs[0], addrs[1], addrs[2] + granterStrAddr, err := suite.accountKeeper.AddressCodec().BytesToString(granter) + suite.Require().NoError(err) + + testCases := []struct { + name string + malleate func() *authz.MsgRevokeAll + expErr bool + errMsg string + }{ + { + name: "invalid granter", + malleate: func() *authz.MsgRevokeAll { + return &authz.MsgRevokeAll{ + Granter: "invalid", + } + }, + expErr: true, + errMsg: "invalid bech32 string", + }, + { + name: "no existing grant to revoke", + malleate: func() *authz.MsgRevokeAll { + return &authz.MsgRevokeAll{ + Granter: granterStrAddr, + } + }, + expErr: true, + errMsg: "authorization not found", + }, + { + name: "valid grant", + malleate: func() *authz.MsgRevokeAll { + suite.createSendAuthorization(grantee, granter) + suite.createSendAuthorization(grantee2, granter) + return &authz.MsgRevokeAll{ + Granter: granterStrAddr, + } + }, + }, + } + + for _, tc := range testCases { + suite.Run(tc.name, func() { + _, err := suite.msgSrvr.RevokeAll(suite.ctx, tc.malleate()) + if tc.expErr { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.errMsg) + } else { + suite.Require().NoError(err) + totalGrants := 0 + _ = suite.authzKeeper.IterateGranterGrants(suite.ctx, granter, func(sdk.AccAddress, string) (bool, error) { + totalGrants++ + return false, nil + }) + suite.Require().Equal(0, totalGrants) + } + }) + } +} From 8845c44c8891c3bd8b07eac84d22bacd81641488 Mon Sep 17 00:00:00 2001 From: kien6034 Date: Wed, 24 Apr 2024 18:48:23 +0700 Subject: [PATCH 06/15] docs: add new feature to authz changelog --- x/authz/CHANGELOG.md | 26 ++++++++++++++------------ x/authz/keeper/keeper_test.go | 4 +++- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/x/authz/CHANGELOG.md b/x/authz/CHANGELOG.md index 85d73845efe5..222357d96fb7 100644 --- a/x/authz/CHANGELOG.md +++ b/x/authz/CHANGELOG.md @@ -27,23 +27,25 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Features -* [#18737](https://github.com/cosmos/cosmos-sdk/pull/18737) Added a limit of 200 grants pruned per `BeginBlock` and the `PruneExpiredGrants` message that prunes 75 expired grants on every run. +- [#18737](https://github.com/cosmos/cosmos-sdk/pull/18737) Added a limit of 200 grants pruned per `BeginBlock` and the `PruneExpiredGrants` message that prunes 75 expired grants on every run. +- [#20161](https://github.com/cosmos/cosmos-sdk/pull/20161) Added `RevokeAll` method to to revoke all grants at once. ### API Breaking Changes -* [#19783](https://github.com/cosmos/cosmos-sdk/pull/19783) Removes the use of Accouts String() method - * `NewMsgExec`, `NewMsgGrant` and `NewMsgRevoke` now takes strings as arguments instead of `sdk.AccAddress`. - * `ExportGenesis` also returns an error. - * `IterateGrants` returns an error, its handler function also returns an error. -* [#19637](https://github.com/cosmos/cosmos-sdk/pull/19637) `NewKeeper` doesn't take a message router anymore. Set the message router in the `appmodule.Environment` instead. -* [#19490](https://github.com/cosmos/cosmos-sdk/pull/19490) `appmodule.Environment` is received on the Keeper to get access to different application services. -* [#18737](https://github.com/cosmos/cosmos-sdk/pull/18737) Update the keeper method `DequeueAndDeleteExpiredGrants` to take a limit argument for the number of grants to prune. -* [#16509](https://github.com/cosmos/cosmos-sdk/pull/16509) `AcceptResponse` has been moved to sdk/types/authz and the `Updated` field is now of the type `sdk.Msg` instead of `authz.Authorization`. -* [#19740](https://github.com/cosmos/cosmos-sdk/pull/19740) `InitGenesis` and `ExportGenesis` module code and keeper code do not panic but return errors. +- [#19783](https://github.com/cosmos/cosmos-sdk/pull/19783) Removes the use of Accouts String() method + - `NewMsgExec`, `NewMsgGrant` and `NewMsgRevoke` now takes strings as arguments instead of `sdk.AccAddress`. + - `ExportGenesis` also returns an error. + - `IterateGrants` returns an error, its handler function also returns an error. +- [#19637](https://github.com/cosmos/cosmos-sdk/pull/19637) `NewKeeper` doesn't take a message router anymore. Set the message router in the `appmodule.Environment` instead. +- [#19490](https://github.com/cosmos/cosmos-sdk/pull/19490) `appmodule.Environment` is received on the Keeper to get access to different application services. +- [#18737](https://github.com/cosmos/cosmos-sdk/pull/18737) Update the keeper method `DequeueAndDeleteExpiredGrants` to take a limit argument for the number of grants to prune. +- [#16509](https://github.com/cosmos/cosmos-sdk/pull/16509) `AcceptResponse` has been moved to sdk/types/authz and the `Updated` field is now of the type `sdk.Msg` instead of `authz.Authorization`. +- [#19740](https://github.com/cosmos/cosmos-sdk/pull/19740) `InitGenesis` and `ExportGenesis` module code and keeper code do not panic but return errors. + ### Consensus Breaking Changes -* [#19188](https://github.com/cosmos/cosmos-sdk/pull/19188) Remove creation of `BaseAccount` when sending a message to an account that does not exist. +- [#19188](https://github.com/cosmos/cosmos-sdk/pull/19188) Remove creation of `BaseAccount` when sending a message to an account that does not exist. ### Bug Fixes -* [#19874](https://github.com/cosmos/cosmos-sdk/pull/19923) Now when querying transaction events (cosmos.tx.v1beta1.Service/GetTxsEvent) the response will contains only UTF-8 characters \ No newline at end of file +- [#19874](https://github.com/cosmos/cosmos-sdk/pull/19923) Now when querying transaction events (cosmos.tx.v1beta1.Service/GetTxsEvent) the response will contains only UTF-8 characters diff --git a/x/authz/keeper/keeper_test.go b/x/authz/keeper/keeper_test.go index 5fdb1e1b96e5..c1e18ea48a79 100644 --- a/x/authz/keeper/keeper_test.go +++ b/x/authz/keeper/keeper_test.go @@ -116,6 +116,7 @@ func (s *TestSuite) TestKeeper() { require.Len(authorizations, 1) } + // Delete a single grant err = s.authzKeeper.DeleteGrant(ctx, grantee1Addr, granterAddr, sendAutz.MsgTypeURL()) require.NoError(err) @@ -129,6 +130,7 @@ func (s *TestSuite) TestKeeper() { require.NoError(err) require.Len(authorizations, 1) + // Delete all grants for a granter err = s.authzKeeper.DeleteAllGrants(ctx, granterAddr) require.NoError(err) @@ -142,7 +144,7 @@ func (s *TestSuite) TestKeeper() { require.NoError(err) require.Len(authorizations, 0) - // test delete all grants for granter with no grants, should error + // Delete all grants for a granter with no grants, should error err = s.authzKeeper.DeleteAllGrants(ctx, granterAddr) require.Error(err) From 6cafbdd09046a3af38458e2c1ad404c8a59572fa Mon Sep 17 00:00:00 2001 From: kien6034 Date: Wed, 24 Apr 2024 18:51:14 +0700 Subject: [PATCH 07/15] chore: save changelog without formatting --- x/authz/CHANGELOG.md | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/x/authz/CHANGELOG.md b/x/authz/CHANGELOG.md index 222357d96fb7..af47e76b40bc 100644 --- a/x/authz/CHANGELOG.md +++ b/x/authz/CHANGELOG.md @@ -27,25 +27,24 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Features -- [#18737](https://github.com/cosmos/cosmos-sdk/pull/18737) Added a limit of 200 grants pruned per `BeginBlock` and the `PruneExpiredGrants` message that prunes 75 expired grants on every run. -- [#20161](https://github.com/cosmos/cosmos-sdk/pull/20161) Added `RevokeAll` method to to revoke all grants at once. +* [#18737](https://github.com/cosmos/cosmos-sdk/pull/18737) Added a limit of 200 grants pruned per `BeginBlock` and the `PruneExpiredGrants` message that prunes 75 expired grants on every run. +* [#20161](https://github.com/cosmos/cosmos-sdk/pull/20161) Added `RevokeAll` methodto to revoke all grants at once. ### API Breaking Changes -- [#19783](https://github.com/cosmos/cosmos-sdk/pull/19783) Removes the use of Accouts String() method - - `NewMsgExec`, `NewMsgGrant` and `NewMsgRevoke` now takes strings as arguments instead of `sdk.AccAddress`. - - `ExportGenesis` also returns an error. - - `IterateGrants` returns an error, its handler function also returns an error. -- [#19637](https://github.com/cosmos/cosmos-sdk/pull/19637) `NewKeeper` doesn't take a message router anymore. Set the message router in the `appmodule.Environment` instead. -- [#19490](https://github.com/cosmos/cosmos-sdk/pull/19490) `appmodule.Environment` is received on the Keeper to get access to different application services. -- [#18737](https://github.com/cosmos/cosmos-sdk/pull/18737) Update the keeper method `DequeueAndDeleteExpiredGrants` to take a limit argument for the number of grants to prune. -- [#16509](https://github.com/cosmos/cosmos-sdk/pull/16509) `AcceptResponse` has been moved to sdk/types/authz and the `Updated` field is now of the type `sdk.Msg` instead of `authz.Authorization`. -- [#19740](https://github.com/cosmos/cosmos-sdk/pull/19740) `InitGenesis` and `ExportGenesis` module code and keeper code do not panic but return errors. - +* [#19783](https://github.com/cosmos/cosmos-sdk/pull/19783) Removes the use of Accouts String() method + * `NewMsgExec`, `NewMsgGrant` and `NewMsgRevoke` now takes strings as arguments instead of `sdk.AccAddress`. + * `ExportGenesis` also returns an error. + * `IterateGrants` returns an error, its handler function also returns an error. +* [#19637](https://github.com/cosmos/cosmos-sdk/pull/19637) `NewKeeper` doesn't take a message router anymore. Set the message router in the `appmodule.Environment` instead. +* [#19490](https://github.com/cosmos/cosmos-sdk/pull/19490) `appmodule.Environment` is received on the Keeper to get access to different application services. +* [#18737](https://github.com/cosmos/cosmos-sdk/pull/18737) Update the keeper method `DequeueAndDeleteExpiredGrants` to take a limit argument for the number of grants to prune. +* [#16509](https://github.com/cosmos/cosmos-sdk/pull/16509) `AcceptResponse` has been moved to sdk/types/authz and the `Updated` field is now of the type `sdk.Msg` instead of `authz.Authorization`. +* [#19740](https://github.com/cosmos/cosmos-sdk/pull/19740) `InitGenesis` and `ExportGenesis` module code and keeper code do not panic but return errors. ### Consensus Breaking Changes -- [#19188](https://github.com/cosmos/cosmos-sdk/pull/19188) Remove creation of `BaseAccount` when sending a message to an account that does not exist. +* [#19188](https://github.com/cosmos/cosmos-sdk/pull/19188) Remove creation of `BaseAccount` when sending a message to an account that does not exist. ### Bug Fixes -- [#19874](https://github.com/cosmos/cosmos-sdk/pull/19923) Now when querying transaction events (cosmos.tx.v1beta1.Service/GetTxsEvent) the response will contains only UTF-8 characters +* [#19874](https://github.com/cosmos/cosmos-sdk/pull/19923) Now when querying transaction events (cosmos.tx.v1beta1.Service/GetTxsEvent) the response will contains only UTF-8 characters \ No newline at end of file From e3dd404ad6f257e6980c73dad2090a384f2b2e40 Mon Sep 17 00:00:00 2001 From: kien6034 Date: Wed, 24 Apr 2024 18:59:04 +0700 Subject: [PATCH 08/15] style: fix typo changelog --- x/authz/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/authz/CHANGELOG.md b/x/authz/CHANGELOG.md index af47e76b40bc..360eaaa11cf1 100644 --- a/x/authz/CHANGELOG.md +++ b/x/authz/CHANGELOG.md @@ -28,7 +28,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Features * [#18737](https://github.com/cosmos/cosmos-sdk/pull/18737) Added a limit of 200 grants pruned per `BeginBlock` and the `PruneExpiredGrants` message that prunes 75 expired grants on every run. -* [#20161](https://github.com/cosmos/cosmos-sdk/pull/20161) Added `RevokeAll` methodto to revoke all grants at once. +* [#20161](https://github.com/cosmos/cosmos-sdk/pull/20161) Added `RevokeAll` method to revoke all grants at once. ### API Breaking Changes From 1ed952dba005c23b09076dc846b47e9a9998e4ed Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Wed, 24 Apr 2024 20:27:07 +0700 Subject: [PATCH 09/15] docs: add MsgRevokeAll --- x/authz/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/x/authz/README.md b/x/authz/README.md index 755bfa59c174..5c40338f4714 100644 --- a/x/authz/README.md +++ b/x/authz/README.md @@ -21,6 +21,7 @@ granting arbitrary privileges from one account (the granter) to another account * [Messages](#messages) * [MsgGrant](#msggrant) * [MsgRevoke](#msgrevoke) + * [MsgRevokeAll](#msgrevokeall) * [MsgExec](#msgexec) * [MsgPruneExpiredGrants](#msgpruneexpiredgrants) * [Events](#events) @@ -168,6 +169,19 @@ The message handling should fail if: NOTE: The `MsgExec` message removes a grant if the grant has expired. +### MsgRevokeAll + +The `MsgRevokeAll` message revokes all grants issued by the specified granter. This is useful for quickly removing all authorizations granted by a single granter without specifying individual message types or grantees. + +```protobuf reference +https://github.com/cosmos/cosmos-sdk/tree/main/proto/cosmos/authz/v1beta1/tx.proto#L91-L97 +``` + +The message handling should fail if: + +* the `granter` address is not provided or invalid. +* the `granter` does not have any active grants. + ### MsgExec When a grantee wants to execute a transaction on behalf of a granter, they must send `MsgExec`. From 226ce4c95362ba855416a5451d8a8ac37a06b6d8 Mon Sep 17 00:00:00 2001 From: kien6034 Date: Thu, 25 Apr 2024 11:59:06 +0700 Subject: [PATCH 10/15] perf: add message addin option --- api/cosmos/authz/v1beta1/event.pulsar.go | 45 ++++--- api/cosmos/authz/v1beta1/tx.pulsar.go | 114 +++++++++--------- x/authz/event.pb.go | 21 ++-- x/authz/proto/buf.lock | 4 +- .../proto/cosmos/authz/v1beta1/event.proto | 3 +- x/authz/proto/cosmos/authz/v1beta1/tx.proto | 13 +- x/authz/tx.pb.go | 86 ++++++------- 7 files changed, 147 insertions(+), 139 deletions(-) diff --git a/api/cosmos/authz/v1beta1/event.pulsar.go b/api/cosmos/authz/v1beta1/event.pulsar.go index 59523951a0dd..80dd0234b133 100644 --- a/api/cosmos/authz/v1beta1/event.pulsar.go +++ b/api/cosmos/authz/v1beta1/event.pulsar.go @@ -2141,8 +2141,6 @@ func (x *EventRevoke) GetGrantee() string { } // EventRevokeAll is emitted on Msg/RevokeAll -// -// Since: cosmos-sdk 0.50 type EventRevokeAll struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2254,32 +2252,33 @@ var file_cosmos_authz_v1beta1_event_proto_rawDesc = []byte{ 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x66, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, + 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x7b, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x20, 0x0a, 0x0c, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x4b, - 0x0a, 0x17, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, - 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x70, 0x72, 0x75, - 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x42, 0xcc, 0x01, 0x0a, 0x18, - 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, - 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, - 0x74, 0x68, 0x7a, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, - 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x2e, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, - 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 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, 0x41, 0x75, 0x74, 0x68, - 0x7a, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x3a, 0x13, + 0xd2, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, + 0x2e, 0x35, 0x31, 0x22, 0x4b, 0x0a, 0x17, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x75, 0x6e, + 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x30, + 0x0a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, + 0x42, 0xcc, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, + 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, + 0x68, 0x7a, 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, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/authz/v1beta1/tx.pulsar.go b/api/cosmos/authz/v1beta1/tx.pulsar.go index 86b34b52498b..49c8e39a3891 100644 --- a/api/cosmos/authz/v1beta1/tx.pulsar.go +++ b/api/cosmos/authz/v1beta1/tx.pulsar.go @@ -4877,66 +4877,70 @@ var file_cosmos_authz_v1beta1_tx_proto_rawDesc = []byte{ 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6c, 0x0a, 0x0c, 0x4d, 0x73, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7e, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x3a, 0x28, 0x82, - 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x22, 0x16, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x56, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, - 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x70, 0x72, 0x75, 0x6e, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, - 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x50, 0x72, - 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd4, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, - 0x12, 0x4f, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x52, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x09, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, - 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x3a, 0x3a, 0xd2, + 0xb4, 0x2d, 0x0e, 0x78, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x20, 0x76, 0x31, 0x2e, 0x30, 0x2e, + 0x30, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, + 0x2a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x22, 0x2a, 0x0a, 0x14, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x3a, 0x12, 0xd2, 0xb4, 0x2d, 0x0e, 0x78, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x20, 0x76, + 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x22, 0x56, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, + 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x30, + 0x0a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, + 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x22, 0x1f, 0x0a, + 0x1d, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, + 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe9, + 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4f, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, + 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x1a, + 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, + 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, + 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, + 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x41, 0x6c, 0x6c, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, - 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x76, 0x0a, 0x12, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x09, 0x52, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, - 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, - 0xcd, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, - 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, - 0x75, 0x74, 0x68, 0x7a, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, - 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, - 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 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, 0x41, 0x75, 0x74, - 0x68, 0x7a, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0xca, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x35, 0x31, 0x12, 0x76, 0x0a, 0x12, 0x50, + 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, + 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, + 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x1a, 0x33, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xcd, 0x01, 0x0a, 0x18, 0x63, + 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x14, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, + 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 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, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/x/authz/event.pb.go b/x/authz/event.pb.go index 04e4f20e90cf..fe1c92d27a29 100644 --- a/x/authz/event.pb.go +++ b/x/authz/event.pb.go @@ -156,8 +156,6 @@ func (m *EventRevoke) GetGrantee() string { } // EventRevokeAll is emitted on Msg/RevokeAll -// -// Since: cosmos-sdk 0.50 type EventRevokeAll struct { // Msg type URL for which all authorizations are revoked MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` @@ -270,7 +268,7 @@ func init() { func init() { proto.RegisterFile("cosmos/authz/v1beta1/event.proto", fileDescriptor_1f88cbc71a8baf1f) } var fileDescriptor_1f88cbc71a8baf1f = []byte{ - // 281 bytes of a gzipped FileDescriptorProto + // 299 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x2c, 0x2d, 0xc9, 0xa8, 0xd2, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x81, 0xa8, @@ -281,14 +279,15 @@ var fileDescriptor_1f88cbc71a8baf1f = []byte{ 0xe5, 0x08, 0x19, 0x71, 0xb1, 0xa7, 0x83, 0x94, 0xa6, 0x16, 0x49, 0x30, 0x83, 0x24, 0x9d, 0x24, 0x2e, 0x6d, 0xd1, 0x85, 0x59, 0xeb, 0x98, 0x92, 0x52, 0x94, 0x5a, 0x5c, 0x1c, 0x5c, 0x52, 0x94, 0x99, 0x97, 0x1e, 0x04, 0x53, 0x88, 0xd0, 0x93, 0x2a, 0xc1, 0x42, 0x9c, 0x9e, 0x54, 0xa5, 0xe9, - 0x8c, 0x5c, 0xdc, 0x60, 0x87, 0x05, 0xa5, 0x96, 0xe5, 0x67, 0xa7, 0x0e, 0x22, 0x97, 0xa5, 0x71, - 0xf1, 0x21, 0x39, 0xcc, 0x31, 0x27, 0x87, 0x36, 0x6e, 0x53, 0xf2, 0xe6, 0x12, 0x07, 0xdb, 0x13, - 0x50, 0x54, 0x9a, 0x97, 0xea, 0x5a, 0x51, 0x90, 0x59, 0x94, 0x9a, 0x02, 0x8e, 0xa5, 0x62, 0x21, - 0x03, 0x2e, 0xb6, 0x02, 0x90, 0x68, 0x11, 0xc4, 0x2a, 0x3c, 0xa6, 0x41, 0xd5, 0x39, 0xe9, 0x9d, - 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, - 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x14, 0x54, 0x5f, 0x71, 0x4a, 0xb6, 0x5e, - 0x66, 0xbe, 0x7e, 0x05, 0x24, 0x71, 0x25, 0xb1, 0x81, 0x93, 0x87, 0x31, 0x20, 0x00, 0x00, 0xff, - 0xff, 0x18, 0xac, 0x64, 0xe7, 0x73, 0x02, 0x00, 0x00, + 0x8c, 0x5c, 0xdc, 0x60, 0x87, 0x05, 0xa5, 0x96, 0xe5, 0x67, 0xa7, 0x0e, 0x22, 0x97, 0x55, 0x73, + 0xf1, 0x21, 0x39, 0xcc, 0x31, 0x27, 0x87, 0x36, 0x6e, 0xb3, 0x12, 0xbe, 0xb4, 0x45, 0x97, 0x1f, + 0xa2, 0x44, 0xb7, 0x38, 0x25, 0x5b, 0xc1, 0x40, 0xcf, 0xd4, 0x50, 0xc9, 0x9b, 0x4b, 0x1c, 0x6c, + 0x79, 0x40, 0x51, 0x69, 0x5e, 0xaa, 0x6b, 0x45, 0x41, 0x66, 0x51, 0x6a, 0x0a, 0x38, 0xea, 0x8a, + 0x85, 0x0c, 0xb8, 0xd8, 0x0a, 0x40, 0xa2, 0x45, 0x10, 0xfb, 0xf1, 0x58, 0x01, 0x55, 0xe7, 0xa4, + 0x77, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, + 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x50, 0x7d, 0xc5, 0x29, 0xd9, + 0x7a, 0x99, 0xf9, 0xfa, 0x15, 0x90, 0x14, 0x97, 0xc4, 0x06, 0x4e, 0x33, 0xc6, 0x80, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x7d, 0x61, 0x73, 0xd1, 0x88, 0x02, 0x00, 0x00, } func (m *EventGrant) Marshal() (dAtA []byte, err error) { diff --git a/x/authz/proto/buf.lock b/x/authz/proto/buf.lock index 08b5c2ec08aa..28c135cc08bb 100644 --- a/x/authz/proto/buf.lock +++ b/x/authz/proto/buf.lock @@ -4,8 +4,8 @@ deps: - remote: buf.build owner: cosmos repository: cosmos-proto - commit: 1935555c206d4afb9e94615dfd0fad31 - digest: shake256:c74d91a3ac7ae07d579e90eee33abf9b29664047ac8816500cf22c081fec0d72d62c89ce0bebafc1f6fec7aa5315be72606717740ca95007248425102c365377 + commit: 04467658e59e44bbb22fe568206e1f70 + digest: shake256:73a640bd60e0c523b0f8237ff34eab67c45a38b64bbbde1d80224819d272dbf316ac183526bd245f994af6608b025f5130483d0133c5edd385531326b5990466 - remote: buf.build owner: cosmos repository: cosmos-sdk diff --git a/x/authz/proto/cosmos/authz/v1beta1/event.proto b/x/authz/proto/cosmos/authz/v1beta1/event.proto index f4a9d823efc9..95550af39e67 100644 --- a/x/authz/proto/cosmos/authz/v1beta1/event.proto +++ b/x/authz/proto/cosmos/authz/v1beta1/event.proto @@ -30,9 +30,8 @@ message EventRevoke { } // EventRevokeAll is emitted on Msg/RevokeAll -// -// Since: cosmos-sdk 0.50 message EventRevokeAll { + option (cosmos_proto.message_added_in) = "cosmos-sdk 0.51"; // Msg type URL for which all authorizations are revoked string msg_type_url = 2; // Granter account address diff --git a/x/authz/proto/cosmos/authz/v1beta1/tx.proto b/x/authz/proto/cosmos/authz/v1beta1/tx.proto index 65c7f4d3c698..2913f33cae83 100644 --- a/x/authz/proto/cosmos/authz/v1beta1/tx.proto +++ b/x/authz/proto/cosmos/authz/v1beta1/tx.proto @@ -32,7 +32,9 @@ service Msg { rpc Revoke(MsgRevoke) returns (MsgRevokeResponse); // RevokeAll revokes all grants issued by the specified granter. - rpc RevokeAll(MsgRevokeAll) returns (MsgRevokeAllResponse); + rpc RevokeAll(MsgRevokeAll) returns (MsgRevokeAllResponse) { + option (cosmos_proto.method_added_in) = "cosmos-sdk 0.51"; + } // PruneExpiredGrants prunes the expired grants. Currently up to 75 at a time. // @@ -90,14 +92,17 @@ message MsgRevokeResponse {} // MsgRevokeAll revokes all grants issued by the specified granter. message MsgRevokeAll { - option (cosmos.msg.v1.signer) = "granter"; - option (amino.name) = "cosmos-sdk/MsgRevokeAll"; + option (cosmos_proto.message_added_in) = "x/authz v1.0.0"; + option (cosmos.msg.v1.signer) = "granter"; + option (amino.name) = "cosmos-sdk/MsgRevokeAll"; string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgRevokeAllResponse defines the Msg/MsgRevokeAllResponse response type. -message MsgRevokeAllResponse {} +message MsgRevokeAllResponse { + option (cosmos_proto.message_added_in) = "x/authz v1.0.0"; +} // MsgPruneExpiredGrants prunes the expired grants. // diff --git a/x/authz/tx.pb.go b/x/authz/tx.pb.go index 395161609c5d..3bb060be0884 100644 --- a/x/authz/tx.pb.go +++ b/x/authz/tx.pb.go @@ -440,48 +440,50 @@ func init() { func init() { proto.RegisterFile("cosmos/authz/v1beta1/tx.proto", fileDescriptor_3ceddab7d8589ad1) } var fileDescriptor_3ceddab7d8589ad1 = []byte{ - // 650 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xce, 0x36, 0xfd, 0x21, 0xd3, 0x4a, 0x50, 0x37, 0x50, 0xd7, 0x55, 0xdd, 0xc8, 0x50, 0x88, - 0x52, 0xd5, 0xa6, 0xe9, 0x2d, 0xe2, 0x92, 0x48, 0x15, 0x17, 0x22, 0x90, 0xf9, 0x39, 0xc0, 0xa1, - 0x72, 0x9a, 0x65, 0x89, 0x6a, 0x7b, 0x2d, 0xaf, 0x13, 0x25, 0x9c, 0x10, 0x47, 0x4e, 0x3c, 0x06, - 0xdc, 0x7a, 0xe8, 0x91, 0x07, 0xa8, 0x38, 0x55, 0x08, 0x21, 0x4e, 0x08, 0xda, 0x43, 0x5f, 0x03, - 0x79, 0x77, 0xed, 0xfe, 0xe0, 0x34, 0x85, 0x03, 0x97, 0x64, 0x67, 0xe6, 0x9b, 0x99, 0x6f, 0xfc, - 0xcd, 0x2e, 0x2c, 0x6d, 0x53, 0xe6, 0x51, 0x66, 0x39, 0xdd, 0xe8, 0xd5, 0x6b, 0xab, 0xb7, 0xde, - 0xc2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0x57, 0x8a, 0x29, - 0x77, 0x61, 0x32, 0x88, 0xbd, 0xa3, 0xd9, 0x48, 0x5c, 0x6d, 0x3a, 0x26, 0x23, 0x0d, 0x63, 0x19, - 0x96, 0x32, 0xeb, 0x26, 0x8d, 0xab, 0x5f, 0xf3, 0x90, 0x6f, 0x32, 0xa2, 0x3c, 0x84, 0x09, 0x71, - 0x39, 0xf5, 0xec, 0x5b, 0x92, 0x2c, 0xb9, 0x76, 0xfb, 0xe2, 0x78, 0xba, 0x45, 0x0f, 0x60, 0x9c, - 0x5f, 0x80, 0xa5, 0xa1, 0xf8, 0x38, 0xac, 0xad, 0x5c, 0x18, 0x4e, 0xab, 0xd9, 0x30, 0x29, 0xb7, - 0x6e, 0x79, 0x68, 0x82, 0x00, 0x68, 0x77, 0x46, 0x00, 0xd2, 0x9a, 0x2f, 0xa0, 0x70, 0x22, 0xbb, - 0x31, 0x22, 0xab, 0xee, 0xba, 0x5a, 0x65, 0x34, 0x26, 0x2d, 0xde, 0x03, 0x25, 0x43, 0xcd, 0xd5, - 0xa1, 0x15, 0xfe, 0x04, 0x6b, 0x1b, 0x7f, 0x01, 0x4e, 0xfa, 0x6a, 0x13, 0x6f, 0xe2, 0x37, 0xac, - 0x51, 0xdd, 0xff, 0xa5, 0xe7, 0xf6, 0x0f, 0x75, 0x74, 0x70, 0xa8, 0xa3, 0x9f, 0x87, 0x3a, 0x7a, - 0x7f, 0xa4, 0xe7, 0x0e, 0x8e, 0xf4, 0xdc, 0xf7, 0x23, 0x3d, 0xf7, 0x5c, 0x2e, 0x10, 0x6b, 0xef, - 0x98, 0x1d, 0x6a, 0xf5, 0xc5, 0xab, 0xde, 0x9a, 0xe4, 0x0f, 0xcc, 0xc6, 0xef, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x1f, 0x3a, 0x80, 0x46, 0x7b, 0x06, 0x00, 0x00, + // 679 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0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 0x99, 0x4e, 0xba, 0xd9, 0x30, + 0xc9, 0xb5, 0xb9, 0x72, 0x69, 0x01, 0x03, 0xa8, 0xf7, 0x47, 0x00, 0x92, 0x9e, 0x3e, 0x64, 0x4e, + 0xc4, 0x61, 0x8c, 0xa8, 0xaa, 0x38, 0x8e, 0x9a, 0x1f, 0x8d, 0x49, 0xc4, 0x37, 0xbf, 0x37, 0x28, + 0xcc, 0x9e, 0x28, 0x43, 0x2f, 0xa2, 0x07, 0x25, 0xb9, 0x0b, 0xf2, 0x90, 0x15, 0xaf, 0x5d, 0xda, + 0xf6, 0x22, 0x58, 0x5d, 0xff, 0x0b, 0xb0, 0x20, 0xa3, 0x4e, 0xbc, 0x8f, 0x3e, 0x7f, 0xd5, 0xf2, + 0xee, 0x2f, 0x2d, 0xb5, 0x7b, 0xa8, 0x49, 0xfb, 0x87, 0x9a, 0xf4, 0xf3, 0x50, 0x93, 0x3e, 0x1d, + 0x69, 0xa9, 0xfd, 0x23, 0x2d, 0xf5, 0xfd, 0x48, 0x4b, 0xbd, 0xe2, 0xaa, 0xa2, 0xcd, 0x6d, 0xd4, + 0xf2, 0x4c, 0xae, 0xcf, 0xc6, 0x64, 0xfc, 0x6d, 0x5a, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x84, + 0x05, 0x38, 0xd7, 0xb6, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From cbfc8c9e861a2dd81a45d46eb095cc145ffbea38 Mon Sep 17 00:00:00 2001 From: kien6034 Date: Thu, 25 Apr 2024 16:09:54 +0700 Subject: [PATCH 11/15] feat: update msg added in to 0.51 --- api/cosmos/authz/v1beta1/tx.pulsar.go | 122 ++++++++++---------- x/authz/proto/cosmos/authz/v1beta1/tx.proto | 4 +- x/authz/tx.pb.go | 87 +++++++------- 3 files changed, 106 insertions(+), 107 deletions(-) diff --git a/api/cosmos/authz/v1beta1/tx.pulsar.go b/api/cosmos/authz/v1beta1/tx.pulsar.go index 49c8e39a3891..215377b29a65 100644 --- a/api/cosmos/authz/v1beta1/tx.pulsar.go +++ b/api/cosmos/authz/v1beta1/tx.pulsar.go @@ -4877,70 +4877,70 @@ var file_cosmos_authz_v1beta1_tx_proto_rawDesc = []byte{ 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7e, 0x0a, 0x0c, 0x4d, 0x73, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7f, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x3a, 0x3a, 0xd2, - 0xb4, 0x2d, 0x0e, 0x78, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x20, 0x76, 0x31, 0x2e, 0x30, 0x2e, - 0x30, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, - 0x2a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x22, 0x2a, 0x0a, 0x14, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x3a, 0x12, 0xd2, 0xb4, 0x2d, 0x0e, 0x78, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x20, 0x76, - 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x22, 0x56, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, - 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x30, - 0x0a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, - 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x22, 0x1f, 0x0a, - 0x1d, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe9, - 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4f, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, - 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x1a, - 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, - 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, - 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x09, 0x52, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0xca, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x35, 0x31, 0x12, 0x76, 0x0a, 0x12, 0x50, - 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, - 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, - 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x1a, 0x33, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, - 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xcd, 0x01, 0x0a, 0x18, 0x63, - 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, - 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x14, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, - 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 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, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x3a, 0x3b, 0xd2, + 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, + 0x35, 0x31, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, + 0xb0, 0x2a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x22, 0x2b, 0x0a, 0x14, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x3a, 0x13, 0xd2, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, + 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x35, 0x31, 0x22, 0x56, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x50, 0x72, + 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, + 0x12, 0x30, 0x0a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x72, 0x75, 0x6e, + 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x22, + 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0xe9, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4f, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, + 0x74, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, + 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, + 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, + 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, + 0x6b, 0x65, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x09, 0x52, + 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x1a, 0x2a, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0xca, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x35, 0x31, 0x12, 0x76, 0x0a, + 0x12, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, + 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, + 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, + 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, + 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xcd, 0x01, 0x0a, + 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, + 0x7a, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, + 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, + 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 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, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/x/authz/proto/cosmos/authz/v1beta1/tx.proto b/x/authz/proto/cosmos/authz/v1beta1/tx.proto index 2913f33cae83..84f9d4017a5f 100644 --- a/x/authz/proto/cosmos/authz/v1beta1/tx.proto +++ b/x/authz/proto/cosmos/authz/v1beta1/tx.proto @@ -92,7 +92,7 @@ message MsgRevokeResponse {} // MsgRevokeAll revokes all grants issued by the specified granter. message MsgRevokeAll { - option (cosmos_proto.message_added_in) = "x/authz v1.0.0"; + option (cosmos_proto.message_added_in) = "cosmos-sdk 0.51"; option (cosmos.msg.v1.signer) = "granter"; option (amino.name) = "cosmos-sdk/MsgRevokeAll"; @@ -101,7 +101,7 @@ message MsgRevokeAll { // MsgRevokeAllResponse defines the Msg/MsgRevokeAllResponse response type. message MsgRevokeAllResponse { - option (cosmos_proto.message_added_in) = "x/authz v1.0.0"; + option (cosmos_proto.message_added_in) = "cosmos-sdk 0.51"; } // MsgPruneExpiredGrants prunes the expired grants. diff --git a/x/authz/tx.pb.go b/x/authz/tx.pb.go index 3bb060be0884..4a5d15a99ccd 100644 --- a/x/authz/tx.pb.go +++ b/x/authz/tx.pb.go @@ -440,50 +440,49 @@ func init() { func init() { proto.RegisterFile("cosmos/authz/v1beta1/tx.proto", fileDescriptor_3ceddab7d8589ad1) } var fileDescriptor_3ceddab7d8589ad1 = []byte{ - // 679 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x3b, 0x6f, 0xd3, 0x50, - 0x14, 0x8e, 0x9b, 0x3e, 0xc8, 0x69, 0x45, 0xa9, 0x1b, 0x54, 0xd7, 0x55, 0x5d, 0xcb, 0x50, 0x88, - 0x52, 0xe5, 0x3a, 0x49, 0xc5, 0x62, 0xb1, 0x24, 0x52, 0xc5, 0x42, 0x04, 0x32, 0x8f, 0x81, 0xa5, - 0x4a, 0x9a, 0xcb, 0x25, 0xaa, 0x63, 0x5b, 0xbe, 0x4e, 0x94, 0x30, 0x20, 0xc4, 0xc8, 0xc4, 0xcf, - 0x80, 0xad, 0x43, 0x46, 0x7e, 0x40, 0xd5, 0xa9, 0xea, 0x80, 0x98, 0x10, 0xb4, 0x43, 0xc5, 0xbf, - 0x40, 0xf6, 0xbd, 0xd7, 0x7d, 0xa5, 0x4d, 0x61, 0x60, 0x49, 0xce, 0xe3, 0x3b, 0xc7, 0xdf, 0xf1, - 0xf9, 0x8e, 0x61, 0x79, 0xcb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0x48, 0x4b, 0xbd, 0xe2, 0xaa, 0xa2, 0xcd, 0x6d, 0xd4, - 0xf2, 0x4c, 0xae, 0xcf, 0xc6, 0x64, 0xfc, 0x6d, 0x5a, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x84, - 0x05, 0x38, 0xd7, 0xb6, 0x06, 0x00, 0x00, + // 671 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x3b, 0x6f, 0xd3, 0x50, + 0x14, 0x8e, 0x9b, 0x3e, 0xc8, 0x69, 0xa5, 0x52, 0x27, 0xa8, 0xae, 0xab, 0xba, 0x96, 0xa1, 0x10, + 0xa5, 0x8a, 0xdd, 0xa4, 0x62, 0x09, 0x2c, 0x89, 0x54, 0xb1, 0x10, 0x81, 0xcc, 0x63, 0x60, 0xa9, + 0x92, 0xe6, 0x72, 0x89, 0xea, 0xd8, 0x96, 0xaf, 0x13, 0x25, 0x2c, 0x20, 0x46, 0x26, 0x7e, 0x06, + 0x6c, 0x1d, 0x3a, 0xf2, 0x03, 0xaa, 0x4e, 0x55, 0x07, 0xc4, 0x84, 0xa0, 0x1d, 0x2a, 0xfe, 0x05, + 0xf2, 0x7d, 0xb8, 0x2f, 0xa7, 0x29, 0x0c, 0x2c, 0xc9, 0x79, 0x7c, 0xe7, 0xdc, 0xef, 0xe4, 0x3b, + 0xf7, 0x06, 0x96, 0xb6, 0x3c, 0xd2, 0xf1, 0x88, 0xd5, 0xe8, 0x86, 0x6f, 0xde, 0x5a, 0xbd, 0x52, + 0x13, 0x85, 0x8d, 0x92, 0x15, 0xf6, 0x4d, 0x3f, 0xf0, 0x42, 0x4f, 0xce, 0xb1, 0xb4, 0x49, 0xd3, + 0x26, 0x4f, 0xab, 0x0b, 0x2c, 0xba, 0x49, 0x31, 0x16, 0x87, 0x50, 0x47, 0xcd, 0x61, 0x0f, 0x7b, + 0x2c, 0x1e, 0x59, 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x96, 0x12, 0xfb, 0x0a, 0x36, 0xe5, 0xdf, 0x69, 0x48, 0xd7, 0x09, 0x96, 0x9f, 0xc0, 0x04, 0xbb, + 0xc4, 0x5a, 0xf2, 0x6d, 0x12, 0x97, 0x41, 0xbd, 0x7b, 0x75, 0x3e, 0xde, 0xb6, 0xc7, 0x30, 0x4e, + 0x2f, 0xca, 0xd2, 0x50, 0x7c, 0x94, 0x56, 0x57, 0xae, 0x4c, 0xc7, 0xdd, 0x6c, 0x98, 0xe4, 0xdb, + 0xb9, 0x3c, 0xb4, 0x80, 0x01, 0xd4, 0x7b, 0x23, 0x00, 0x71, 0x4f, 0x1f, 0x32, 0xa7, 0xeb, 0x61, + 0x8c, 0xa8, 0xaa, 0x3a, 0x8e, 0x5a, 0x18, 0x8d, 0x89, 0xd7, 0x2f, 0xbb, 0x7f, 0x59, 0x65, 0xb9, + 0x07, 0x72, 0x82, 0xc4, 0xab, 0x43, 0xdb, 0x5e, 0x06, 0xab, 0xeb, 0x7f, 0x01, 0x16, 0x64, 0xd4, + 0x89, 0xf7, 0xd1, 0x03, 0x58, 0x2b, 0xef, 0xfd, 0xd2, 0x52, 0x7b, 0x47, 0x9a, 0x74, 0x70, 0xa4, + 0x49, 0x3f, 0x8f, 0x34, 0xe9, 0xd3, 0xb1, 0x96, 0x3a, 0x38, 0xd6, 0x52, 0xdf, 0x8f, 0xb5, 0xd4, + 0x2b, 0xbe, 0x55, 0xa4, 0xb5, 0x6d, 0xb6, 0x3d, 0xab, 0xcf, 0xfe, 0x12, 0x9a, 0x93, 0xf4, 0x75, + 0x5a, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x9c, 0xe3, 0x6e, 0xfe, 0xb8, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From d5d4ec2a8b09580ab2560bcb5e860f020c80173e Mon Sep 17 00:00:00 2001 From: kien6034 Date: Thu, 25 Apr 2024 16:15:14 +0700 Subject: [PATCH 12/15] feat: add auto cli method --- x/authz/module/autocli.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/x/authz/module/autocli.go b/x/authz/module/autocli.go index 0ce9d4968e6d..9ead5006c1aa 100644 --- a/x/authz/module/autocli.go +++ b/x/authz/module/autocli.go @@ -70,6 +70,12 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { {ProtoField: "msg_type_url"}, }, }, + { + RpcMethod: "RevokeAll", + Use: "revoke-all --from [signer]", + Short: "Revoke all authorizations from the signer", + Example: fmt.Sprintf("%s tx authz revoke-all --from=cosmos1skj..", version.AppName), + }, { RpcMethod: "PruneExpiredGrants", Use: "prune-grants --from [granter]", From 78386da3bbb657cbe3ac8523170aee85a3cea365 Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Thu, 25 Apr 2024 19:34:21 +0700 Subject: [PATCH 13/15] improve DeleteAllGrants --- x/authz/keeper/keeper.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/x/authz/keeper/keeper.go b/x/authz/keeper/keeper.go index e2db0db44be9..a0a60e73d62d 100644 --- a/x/authz/keeper/keeper.go +++ b/x/authz/keeper/keeper.go @@ -258,18 +258,22 @@ func (k Keeper) DeleteGrant(ctx context.Context, grantee, granter sdk.AccAddress // DeleteAllGrants revokes all authorizations granted to the grantee by the granter. func (k Keeper) DeleteAllGrants(ctx context.Context, granter sdk.AccAddress) error { - count := 0 + var keysToDelete []string + err := k.IterateGranterGrants(ctx, granter, func(grantee sdk.AccAddress, msgType string) (stop bool, err error) { - count++ - if err := k.DeleteGrant(ctx, grantee, granter, msgType); err != nil { - return false, err - } + keysToDelete = append(keysToDelete, string(grantStoreKey(grantee, granter, msgType))) return false, nil }) if err != nil { return err } - if count == 0 { + for _, key := range keysToDelete { + _, granteeAddr, msgType := parseGrantStoreKey([]byte(key)) + if err := k.DeleteGrant(ctx, granteeAddr, granter, msgType); err != nil { + return err + } + } + if len(keysToDelete) == 0 { return errorsmod.Wrapf(authz.ErrNoAuthorizationFound, "no grants found for granter %s", granter) } return k.EventService.EventManager(ctx).Emit(&authz.EventRevokeAll{ From 754bab8674ef3650572d3eb39e0976fb519066cf Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Thu, 25 Apr 2024 20:02:58 +0700 Subject: [PATCH 14/15] refactor --- x/authz/keeper/keeper.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x/authz/keeper/keeper.go b/x/authz/keeper/keeper.go index a0a60e73d62d..396209cf611f 100644 --- a/x/authz/keeper/keeper.go +++ b/x/authz/keeper/keeper.go @@ -267,15 +267,15 @@ func (k Keeper) DeleteAllGrants(ctx context.Context, granter sdk.AccAddress) err if err != nil { return err } + if len(keysToDelete) == 0 { + return errorsmod.Wrapf(authz.ErrNoAuthorizationFound, "no grants found for granter %s", granter) + } for _, key := range keysToDelete { _, granteeAddr, msgType := parseGrantStoreKey([]byte(key)) if err := k.DeleteGrant(ctx, granteeAddr, granter, msgType); err != nil { return err } } - if len(keysToDelete) == 0 { - return errorsmod.Wrapf(authz.ErrNoAuthorizationFound, "no grants found for granter %s", granter) - } return k.EventService.EventManager(ctx).Emit(&authz.EventRevokeAll{ Granter: granter.String(), }) From 02448881fb313249afceeaf8ffcf93d0d59879dc Mon Sep 17 00:00:00 2001 From: kien6034 Date: Fri, 26 Apr 2024 09:24:14 +0700 Subject: [PATCH 15/15] perf: use byte array for grant's keys --- x/authz/keeper/keeper.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x/authz/keeper/keeper.go b/x/authz/keeper/keeper.go index 396209cf611f..3c8cae7ec45a 100644 --- a/x/authz/keeper/keeper.go +++ b/x/authz/keeper/keeper.go @@ -258,10 +258,10 @@ func (k Keeper) DeleteGrant(ctx context.Context, grantee, granter sdk.AccAddress // DeleteAllGrants revokes all authorizations granted to the grantee by the granter. func (k Keeper) DeleteAllGrants(ctx context.Context, granter sdk.AccAddress) error { - var keysToDelete []string + var keysToDelete [][]byte err := k.IterateGranterGrants(ctx, granter, func(grantee sdk.AccAddress, msgType string) (stop bool, err error) { - keysToDelete = append(keysToDelete, string(grantStoreKey(grantee, granter, msgType))) + keysToDelete = append(keysToDelete, grantStoreKey(grantee, granter, msgType)) return false, nil }) if err != nil { @@ -271,7 +271,7 @@ func (k Keeper) DeleteAllGrants(ctx context.Context, granter sdk.AccAddress) err return errorsmod.Wrapf(authz.ErrNoAuthorizationFound, "no grants found for granter %s", granter) } for _, key := range keysToDelete { - _, granteeAddr, msgType := parseGrantStoreKey([]byte(key)) + _, granteeAddr, msgType := parseGrantStoreKey(key) if err := k.DeleteGrant(ctx, granteeAddr, granter, msgType); err != nil { return err }