From 99f351368feb360ffbf582f06ed7a4b2c805155e Mon Sep 17 00:00:00 2001 From: Facundo Date: Tue, 10 Oct 2023 17:32:49 +0200 Subject: [PATCH 01/32] feat(x/feegrant): Add limits to grant pruning and enable message --- api/cosmos/feegrant/v1beta1/tx.pulsar.go | 958 +++++++++++++++++++++- api/cosmos/feegrant/v1beta1/tx_grpc.pb.go | 39 + proto/cosmos/feegrant/v1beta1/tx.proto | 15 + x/feegrant/keeper/keeper.go | 9 +- x/feegrant/keeper/keeper_test.go | 2 +- x/feegrant/keeper/msg_server.go | 6 + x/feegrant/module/abci.go | 2 +- x/feegrant/tx.pb.go | 351 +++++++- 8 files changed, 1333 insertions(+), 49 deletions(-) diff --git a/api/cosmos/feegrant/v1beta1/tx.pulsar.go b/api/cosmos/feegrant/v1beta1/tx.pulsar.go index 07dbc09fafe6..6a74fcfea8ae 100644 --- a/api/cosmos/feegrant/v1beta1/tx.pulsar.go +++ b/api/cosmos/feegrant/v1beta1/tx.pulsar.go @@ -1775,6 +1775,782 @@ func (x *fastReflection_MsgRevokeAllowanceResponse) ProtoMethods() *protoiface.M } } +var ( + md_MsgPruneAllowances protoreflect.MessageDescriptor + fd_MsgPruneAllowances_pruner protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_feegrant_v1beta1_tx_proto_init() + md_MsgPruneAllowances = File_cosmos_feegrant_v1beta1_tx_proto.Messages().ByName("MsgPruneAllowances") + fd_MsgPruneAllowances_pruner = md_MsgPruneAllowances.Fields().ByName("pruner") +} + +var _ protoreflect.Message = (*fastReflection_MsgPruneAllowances)(nil) + +type fastReflection_MsgPruneAllowances MsgPruneAllowances + +func (x *MsgPruneAllowances) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgPruneAllowances)(x) +} + +func (x *MsgPruneAllowances) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[4] + 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_MsgPruneAllowances_messageType fastReflection_MsgPruneAllowances_messageType +var _ protoreflect.MessageType = fastReflection_MsgPruneAllowances_messageType{} + +type fastReflection_MsgPruneAllowances_messageType struct{} + +func (x fastReflection_MsgPruneAllowances_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgPruneAllowances)(nil) +} +func (x fastReflection_MsgPruneAllowances_messageType) New() protoreflect.Message { + return new(fastReflection_MsgPruneAllowances) +} +func (x fastReflection_MsgPruneAllowances_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgPruneAllowances +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgPruneAllowances) Descriptor() protoreflect.MessageDescriptor { + return md_MsgPruneAllowances +} + +// 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_MsgPruneAllowances) Type() protoreflect.MessageType { + return _fastReflection_MsgPruneAllowances_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgPruneAllowances) New() protoreflect.Message { + return new(fastReflection_MsgPruneAllowances) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgPruneAllowances) Interface() protoreflect.ProtoMessage { + return (*MsgPruneAllowances)(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_MsgPruneAllowances) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Pruner != "" { + value := protoreflect.ValueOfString(x.Pruner) + if !f(fd_MsgPruneAllowances_pruner, 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_MsgPruneAllowances) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.MsgPruneAllowances.pruner": + return x.Pruner != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowances")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowances 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_MsgPruneAllowances) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.MsgPruneAllowances.pruner": + x.Pruner = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowances")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowances 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_MsgPruneAllowances) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.feegrant.v1beta1.MsgPruneAllowances.pruner": + value := x.Pruner + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowances")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowances 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_MsgPruneAllowances) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.MsgPruneAllowances.pruner": + x.Pruner = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowances")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowances 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_MsgPruneAllowances) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.MsgPruneAllowances.pruner": + panic(fmt.Errorf("field pruner of message cosmos.feegrant.v1beta1.MsgPruneAllowances is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowances")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowances 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_MsgPruneAllowances) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.MsgPruneAllowances.pruner": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowances")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowances 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_MsgPruneAllowances) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.MsgPruneAllowances", 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_MsgPruneAllowances) 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_MsgPruneAllowances) 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_MsgPruneAllowances) 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_MsgPruneAllowances) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgPruneAllowances) + 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.Pruner) + 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().(*MsgPruneAllowances) + 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.Pruner) > 0 { + i -= len(x.Pruner) + copy(dAtA[i:], x.Pruner) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Pruner))) + 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().(*MsgPruneAllowances) + 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: MsgPruneAllowances: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgPruneAllowances: 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 Pruner", 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.Pruner = 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_MsgPruneAllowancesResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_feegrant_v1beta1_tx_proto_init() + md_MsgPruneAllowancesResponse = File_cosmos_feegrant_v1beta1_tx_proto.Messages().ByName("MsgPruneAllowancesResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgPruneAllowancesResponse)(nil) + +type fastReflection_MsgPruneAllowancesResponse MsgPruneAllowancesResponse + +func (x *MsgPruneAllowancesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgPruneAllowancesResponse)(x) +} + +func (x *MsgPruneAllowancesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgPruneAllowancesResponse_messageType fastReflection_MsgPruneAllowancesResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgPruneAllowancesResponse_messageType{} + +type fastReflection_MsgPruneAllowancesResponse_messageType struct{} + +func (x fastReflection_MsgPruneAllowancesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgPruneAllowancesResponse)(nil) +} +func (x fastReflection_MsgPruneAllowancesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgPruneAllowancesResponse) +} +func (x fastReflection_MsgPruneAllowancesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgPruneAllowancesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgPruneAllowancesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgPruneAllowancesResponse +} + +// 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_MsgPruneAllowancesResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgPruneAllowancesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgPruneAllowancesResponse) New() protoreflect.Message { + return new(fastReflection_MsgPruneAllowancesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgPruneAllowancesResponse) Interface() protoreflect.ProtoMessage { + return (*MsgPruneAllowancesResponse)(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_MsgPruneAllowancesResponse) 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_MsgPruneAllowancesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse 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_MsgPruneAllowancesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse 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_MsgPruneAllowancesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse 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_MsgPruneAllowancesResponse) 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.feegrant.v1beta1.MsgPruneAllowancesResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse 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_MsgPruneAllowancesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse 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_MsgPruneAllowancesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse 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_MsgPruneAllowancesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse", 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_MsgPruneAllowancesResponse) 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_MsgPruneAllowancesResponse) 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_MsgPruneAllowancesResponse) 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_MsgPruneAllowancesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgPruneAllowancesResponse) + 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().(*MsgPruneAllowancesResponse) + 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().(*MsgPruneAllowancesResponse) + 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: MsgPruneAllowancesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgPruneAllowancesResponse: 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, + } +} + // Since: cosmos-sdk 0.43 // Code generated by protoc-gen-go. DO NOT EDIT. @@ -1946,6 +2722,70 @@ func (*MsgRevokeAllowanceResponse) Descriptor() ([]byte, []int) { return file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{3} } +// MsgPruneAllowances prunes expired fee allowances. +type MsgPruneAllowances struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // pruner is the address of the user pruning expired allowances. + Pruner string `protobuf:"bytes,1,opt,name=pruner,proto3" json:"pruner,omitempty"` +} + +func (x *MsgPruneAllowances) Reset() { + *x = MsgPruneAllowances{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgPruneAllowances) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgPruneAllowances) ProtoMessage() {} + +// Deprecated: Use MsgPruneAllowances.ProtoReflect.Descriptor instead. +func (*MsgPruneAllowances) Descriptor() ([]byte, []int) { + return file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgPruneAllowances) GetPruner() string { + if x != nil { + return x.Pruner + } + return "" +} + +// MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. +type MsgPruneAllowancesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgPruneAllowancesResponse) Reset() { + *x = MsgPruneAllowancesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgPruneAllowancesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgPruneAllowancesResponse) ProtoMessage() {} + +// Deprecated: Use MsgPruneAllowancesResponse.ProtoReflect.Descriptor instead. +func (*MsgPruneAllowancesResponse) Descriptor() ([]byte, []int) { + return file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{5} +} + var File_cosmos_feegrant_v1beta1_tx_proto protoreflect.FileDescriptor var file_cosmos_feegrant_v1beta1_tx_proto_rawDesc = []byte{ @@ -1990,37 +2830,53 @@ var file_cosmos_feegrant_v1beta1_tx_proto_rawDesc = []byte{ 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x32, 0xf3, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x70, 0x0a, 0x0e, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2a, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, - 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6e, 0x73, 0x65, 0x22, 0x75, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, + 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 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, 0x2d, 0x82, 0xe7, 0xb0, + 0x2a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, + 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, + 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe8, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, + 0x12, 0x70, 0x0a, 0x0e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, + 0x63, 0x65, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, + 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x32, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, + 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x73, 0x0a, 0x0f, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, + 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, + 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, + 0x63, 0x65, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, + 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x0f, 0x50, 0x72, 0x75, 0x6e, 0x65, + 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, + 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, + 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, + 0xb0, 0x2a, 0x01, 0x42, 0xde, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, - 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, - 0x0f, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, - 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x33, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xde, 0x01, 0x0a, 0x1b, 0x63, 0x6f, - 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, - 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, - 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, - 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, - 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, + 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, + 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2035,22 +2891,26 @@ func file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP() []byte { return file_cosmos_feegrant_v1beta1_tx_proto_rawDescData } -var file_cosmos_feegrant_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_cosmos_feegrant_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_cosmos_feegrant_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgGrantAllowance)(nil), // 0: cosmos.feegrant.v1beta1.MsgGrantAllowance (*MsgGrantAllowanceResponse)(nil), // 1: cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse (*MsgRevokeAllowance)(nil), // 2: cosmos.feegrant.v1beta1.MsgRevokeAllowance (*MsgRevokeAllowanceResponse)(nil), // 3: cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse - (*anypb.Any)(nil), // 4: google.protobuf.Any + (*MsgPruneAllowances)(nil), // 4: cosmos.feegrant.v1beta1.MsgPruneAllowances + (*MsgPruneAllowancesResponse)(nil), // 5: cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse + (*anypb.Any)(nil), // 6: google.protobuf.Any } var file_cosmos_feegrant_v1beta1_tx_proto_depIdxs = []int32{ - 4, // 0: cosmos.feegrant.v1beta1.MsgGrantAllowance.allowance:type_name -> google.protobuf.Any + 6, // 0: cosmos.feegrant.v1beta1.MsgGrantAllowance.allowance:type_name -> google.protobuf.Any 0, // 1: cosmos.feegrant.v1beta1.Msg.GrantAllowance:input_type -> cosmos.feegrant.v1beta1.MsgGrantAllowance 2, // 2: cosmos.feegrant.v1beta1.Msg.RevokeAllowance:input_type -> cosmos.feegrant.v1beta1.MsgRevokeAllowance - 1, // 3: cosmos.feegrant.v1beta1.Msg.GrantAllowance:output_type -> cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse - 3, // 4: cosmos.feegrant.v1beta1.Msg.RevokeAllowance:output_type -> cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type + 4, // 3: cosmos.feegrant.v1beta1.Msg.PruneAllowances:input_type -> cosmos.feegrant.v1beta1.MsgPruneAllowances + 1, // 4: cosmos.feegrant.v1beta1.Msg.GrantAllowance:output_type -> cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse + 3, // 5: cosmos.feegrant.v1beta1.Msg.RevokeAllowance:output_type -> cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse + 5, // 6: cosmos.feegrant.v1beta1.Msg.PruneAllowances:output_type -> cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name @@ -2110,6 +2970,30 @@ func file_cosmos_feegrant_v1beta1_tx_proto_init() { return nil } } + file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgPruneAllowances); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgPruneAllowancesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2117,7 +3001,7 @@ func file_cosmos_feegrant_v1beta1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_feegrant_v1beta1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go b/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go index 47ddb7a8329b..1bfb94127da1 100644 --- a/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go +++ b/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go @@ -23,6 +23,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( Msg_GrantAllowance_FullMethodName = "/cosmos.feegrant.v1beta1.Msg/GrantAllowance" Msg_RevokeAllowance_FullMethodName = "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance" + Msg_PruneAllowances_FullMethodName = "/cosmos.feegrant.v1beta1.Msg/PruneAllowances" ) // MsgClient is the client API for Msg service. @@ -35,6 +36,8 @@ type MsgClient interface { // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, error) + // PruneAllowances prunes expired fee allowances. + PruneAllowances(ctx context.Context, in *MsgPruneAllowances, opts ...grpc.CallOption) (*MsgPruneAllowancesResponse, error) } type msgClient struct { @@ -63,6 +66,15 @@ func (c *msgClient) RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, return out, nil } +func (c *msgClient) PruneAllowances(ctx context.Context, in *MsgPruneAllowances, opts ...grpc.CallOption) (*MsgPruneAllowancesResponse, error) { + out := new(MsgPruneAllowancesResponse) + err := c.cc.Invoke(ctx, Msg_PruneAllowances_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -73,6 +85,8 @@ type MsgServer interface { // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) + // PruneAllowances prunes expired fee allowances. + PruneAllowances(context.Context, *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) mustEmbedUnimplementedMsgServer() } @@ -86,6 +100,9 @@ func (UnimplementedMsgServer) GrantAllowance(context.Context, *MsgGrantAllowance func (UnimplementedMsgServer) RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RevokeAllowance not implemented") } +func (UnimplementedMsgServer) PruneAllowances(context.Context, *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PruneAllowances not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -135,6 +152,24 @@ func _Msg_RevokeAllowance_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Msg_PruneAllowances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgPruneAllowances) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).PruneAllowances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_PruneAllowances_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).PruneAllowances(ctx, req.(*MsgPruneAllowances)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -150,6 +185,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "RevokeAllowance", Handler: _Msg_RevokeAllowance_Handler, }, + { + MethodName: "PruneAllowances", + Handler: _Msg_PruneAllowances_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/feegrant/v1beta1/tx.proto", diff --git a/proto/cosmos/feegrant/v1beta1/tx.proto b/proto/cosmos/feegrant/v1beta1/tx.proto index 37e505c4e9a2..4f9d69402e3b 100644 --- a/proto/cosmos/feegrant/v1beta1/tx.proto +++ b/proto/cosmos/feegrant/v1beta1/tx.proto @@ -20,6 +20,9 @@ service Msg { // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. rpc RevokeAllowance(MsgRevokeAllowance) returns (MsgRevokeAllowanceResponse); + + // PruneAllowances prunes expired fee allowances. + rpc PruneAllowances(MsgPruneAllowances) returns (MsgPruneAllowancesResponse); } // MsgGrantAllowance adds permission for Grantee to spend up to Allowance @@ -55,3 +58,15 @@ message MsgRevokeAllowance { // MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. message MsgRevokeAllowanceResponse {} + +// MsgPruneAllowances prunes expired fee allowances. +message MsgPruneAllowances { + option (cosmos.msg.v1.signer) = "pruner"; + option (amino.name) = "cosmos-sdk/MsgPruneAllowances"; + + // pruner is the address of the user pruning expired allowances. + string pruner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. +message MsgPruneAllowancesResponse {} \ No newline at end of file diff --git a/x/feegrant/keeper/keeper.go b/x/feegrant/keeper/keeper.go index fa2bbcc94a27..4a5b9570ca26 100644 --- a/x/feegrant/keeper/keeper.go +++ b/x/feegrant/keeper/keeper.go @@ -334,9 +334,10 @@ func (k Keeper) ExportGenesis(ctx context.Context) (*feegrant.GenesisState, erro } // RemoveExpiredAllowances iterates grantsByExpiryQueue and deletes the expired grants. -func (k Keeper) RemoveExpiredAllowances(ctx context.Context) error { +func (k Keeper) RemoveExpiredAllowances(ctx context.Context, limit int) error { exp := sdk.UnwrapSDKContext(ctx).HeaderInfo().Time rng := collections.NewPrefixUntilTripleRange[time.Time, sdk.AccAddress, sdk.AccAddress](exp) + count := 0 err := k.FeeAllowanceQueue.Walk(ctx, rng, func(key collections.Triple[time.Time, sdk.AccAddress, sdk.AccAddress], value bool) (stop bool, err error) { grantee, granter := key.K2(), key.K3() @@ -349,6 +350,12 @@ func (k Keeper) RemoveExpiredAllowances(ctx context.Context) error { return true, err } + // limit the amount of iterations to avoid taking too much time + count++ + if count == limit { + return true, nil + } + return false, nil }) if err != nil { diff --git a/x/feegrant/keeper/keeper_test.go b/x/feegrant/keeper/keeper_test.go index f043a4df8fb5..51895b66ee3a 100644 --- a/x/feegrant/keeper/keeper_test.go +++ b/x/feegrant/keeper/keeper_test.go @@ -416,7 +416,7 @@ func (suite *KeeperTestSuite) TestPruneGrants() { } err := suite.feegrantKeeper.GrantAllowance(suite.ctx, tc.granter, tc.grantee, tc.allowance) suite.NoError(err) - err = suite.feegrantKeeper.RemoveExpiredAllowances(tc.ctx) + err = suite.feegrantKeeper.RemoveExpiredAllowances(tc.ctx, 5) suite.NoError(err) grant, err := suite.feegrantKeeper.GetAllowance(tc.ctx, tc.granter, tc.grantee) diff --git a/x/feegrant/keeper/msg_server.go b/x/feegrant/keeper/msg_server.go index d700d6667cfe..a79902127bcc 100644 --- a/x/feegrant/keeper/msg_server.go +++ b/x/feegrant/keeper/msg_server.go @@ -84,3 +84,9 @@ func (k msgServer) RevokeAllowance(ctx context.Context, msg *feegrant.MsgRevokeA return &feegrant.MsgRevokeAllowanceResponse{}, nil } + +// PruneAllowances removes expired allowances from the store. +func (k msgServer) PruneAllowances(ctx context.Context, _ *feegrant.MsgPruneAllowances) (*feegrant.MsgPruneAllowancesResponse, error) { + err := k.RemoveExpiredAllowances(ctx, 5) + return &feegrant.MsgPruneAllowancesResponse{}, err +} diff --git a/x/feegrant/module/abci.go b/x/feegrant/module/abci.go index 4dbab056a9a3..5897d346f21d 100644 --- a/x/feegrant/module/abci.go +++ b/x/feegrant/module/abci.go @@ -7,7 +7,7 @@ import ( ) func EndBlocker(ctx sdk.Context, k keeper.Keeper) { - err := k.RemoveExpiredAllowances(ctx) + err := k.RemoveExpiredAllowances(ctx, 50) if err != nil { panic(err) } diff --git a/x/feegrant/tx.pb.go b/x/feegrant/tx.pb.go index f0dcf66635f2..4b99ff16a25d 100644 --- a/x/feegrant/tx.pb.go +++ b/x/feegrant/tx.pb.go @@ -225,17 +225,102 @@ func (m *MsgRevokeAllowanceResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRevokeAllowanceResponse proto.InternalMessageInfo +// MsgPruneAllowances prunes expired fee allowances. +type MsgPruneAllowances struct { + // pruner is the address of the user pruning expired allowances. + Pruner string `protobuf:"bytes,1,opt,name=pruner,proto3" json:"pruner,omitempty"` +} + +func (m *MsgPruneAllowances) Reset() { *m = MsgPruneAllowances{} } +func (m *MsgPruneAllowances) String() string { return proto.CompactTextString(m) } +func (*MsgPruneAllowances) ProtoMessage() {} +func (*MsgPruneAllowances) Descriptor() ([]byte, []int) { + return fileDescriptor_dd44ad7946dad783, []int{4} +} +func (m *MsgPruneAllowances) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPruneAllowances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPruneAllowances.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 *MsgPruneAllowances) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPruneAllowances.Merge(m, src) +} +func (m *MsgPruneAllowances) XXX_Size() int { + return m.Size() +} +func (m *MsgPruneAllowances) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPruneAllowances.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPruneAllowances proto.InternalMessageInfo + +func (m *MsgPruneAllowances) GetPruner() string { + if m != nil { + return m.Pruner + } + return "" +} + +// MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. +type MsgPruneAllowancesResponse struct { +} + +func (m *MsgPruneAllowancesResponse) Reset() { *m = MsgPruneAllowancesResponse{} } +func (m *MsgPruneAllowancesResponse) String() string { return proto.CompactTextString(m) } +func (*MsgPruneAllowancesResponse) ProtoMessage() {} +func (*MsgPruneAllowancesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_dd44ad7946dad783, []int{5} +} +func (m *MsgPruneAllowancesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPruneAllowancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPruneAllowancesResponse.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 *MsgPruneAllowancesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPruneAllowancesResponse.Merge(m, src) +} +func (m *MsgPruneAllowancesResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgPruneAllowancesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPruneAllowancesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPruneAllowancesResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgGrantAllowance)(nil), "cosmos.feegrant.v1beta1.MsgGrantAllowance") proto.RegisterType((*MsgGrantAllowanceResponse)(nil), "cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse") proto.RegisterType((*MsgRevokeAllowance)(nil), "cosmos.feegrant.v1beta1.MsgRevokeAllowance") proto.RegisterType((*MsgRevokeAllowanceResponse)(nil), "cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse") + proto.RegisterType((*MsgPruneAllowances)(nil), "cosmos.feegrant.v1beta1.MsgPruneAllowances") + proto.RegisterType((*MsgPruneAllowancesResponse)(nil), "cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse") } func init() { proto.RegisterFile("cosmos/feegrant/v1beta1/tx.proto", fileDescriptor_dd44ad7946dad783) } var fileDescriptor_dd44ad7946dad783 = []byte{ - // 409 bytes of a gzipped FileDescriptorProto + // 458 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, 0x4b, 0x4d, 0x4d, 0x2f, 0x4a, 0xcc, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x87, 0xa8, @@ -254,14 +339,17 @@ var fileDescriptor_dd44ad7946dad783 = []byte{ 0xb2, 0xf5, 0x31, 0x7c, 0xad, 0x24, 0xcd, 0x25, 0x89, 0x21, 0x18, 0x94, 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0xaa, 0xb4, 0x86, 0x91, 0x4b, 0xc8, 0xb7, 0x38, 0x3d, 0x28, 0xb5, 0x2c, 0x3f, 0x3b, 0x95, 0xee, 0x21, 0x65, 0xa5, 0x87, 0xee, 0x15, 0x59, 0x54, 0xaf, 0xa0, 0xb9, 0x4b, 0x49, 0x86, - 0x4b, 0x0a, 0x53, 0x14, 0xe6, 0x19, 0xa3, 0xcf, 0x8c, 0x5c, 0xcc, 0xbe, 0xc5, 0xe9, 0x42, 0x05, - 0x5c, 0x7c, 0x68, 0x31, 0xaf, 0xa5, 0x87, 0x2b, 0x94, 0x31, 0x82, 0x46, 0xca, 0x88, 0x78, 0xb5, - 0x30, 0x9b, 0x85, 0x8a, 0xb9, 0xf8, 0xd1, 0x83, 0x50, 0x1b, 0x9f, 0x31, 0x68, 0x8a, 0xa5, 0x8c, - 0x49, 0x50, 0x0c, 0xb3, 0x54, 0x8a, 0xb5, 0xe1, 0xf9, 0x06, 0x2d, 0x46, 0x27, 0xc3, 0x13, 0x8f, - 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, - 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x82, 0xe6, 0x98, 0xe2, 0x94, 0x6c, 0xbd, 0xcc, - 0x7c, 0xfd, 0x0a, 0x78, 0x56, 0x4d, 0x62, 0x03, 0xa7, 0x42, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x3f, 0x13, 0x6c, 0x2e, 0xc4, 0x03, 0x00, 0x00, + 0x4b, 0x0a, 0x53, 0x14, 0xee, 0x99, 0x52, 0xb0, 0x5f, 0x02, 0x8a, 0x4a, 0xf3, 0x10, 0x92, 0xc5, + 0x42, 0x06, 0x5c, 0x6c, 0x05, 0x20, 0x21, 0xc2, 0x5e, 0x81, 0xaa, 0x83, 0x04, 0x30, 0x94, 0x83, + 0xc5, 0x51, 0x68, 0x16, 0x40, 0x1d, 0x85, 0x26, 0x0a, 0x73, 0x94, 0xd1, 0x0b, 0x26, 0x2e, 0x66, + 0xdf, 0xe2, 0x74, 0xa1, 0x02, 0x2e, 0x3e, 0xb4, 0xe4, 0xa8, 0xa5, 0x87, 0x2b, 0xea, 0x31, 0xe2, + 0x4b, 0xca, 0x88, 0x78, 0xb5, 0x30, 0x9b, 0x85, 0x8a, 0xb9, 0xf8, 0xd1, 0xe3, 0x55, 0x1b, 0x9f, + 0x31, 0x68, 0x8a, 0xa5, 0x8c, 0x49, 0x50, 0x8c, 0x6c, 0x29, 0x7a, 0x04, 0xe0, 0xb5, 0x14, 0x4d, + 0x31, 0x7e, 0x4b, 0x71, 0x84, 0xb1, 0x14, 0x6b, 0xc3, 0xf3, 0x0d, 0x5a, 0x8c, 0x4e, 0x86, 0x27, + 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, + 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x05, 0x2d, 0x3b, 0x8a, 0x53, 0xb2, 0xf5, + 0x32, 0xf3, 0xf5, 0x2b, 0xe0, 0x85, 0x56, 0x12, 0x1b, 0x38, 0x3f, 0x1a, 0x03, 0x02, 0x00, 0x00, + 0xff, 0xff, 0xbf, 0x0a, 0x5b, 0x19, 0xce, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -282,6 +370,8 @@ type MsgClient interface { // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, error) + // PruneAllowances prunes expired fee allowances. + PruneAllowances(ctx context.Context, in *MsgPruneAllowances, opts ...grpc.CallOption) (*MsgPruneAllowancesResponse, error) } type msgClient struct { @@ -310,6 +400,15 @@ func (c *msgClient) RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, return out, nil } +func (c *msgClient) PruneAllowances(ctx context.Context, in *MsgPruneAllowances, opts ...grpc.CallOption) (*MsgPruneAllowancesResponse, error) { + out := new(MsgPruneAllowancesResponse) + err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Msg/PruneAllowances", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // GrantAllowance grants fee allowance to the grantee on the granter's @@ -318,6 +417,8 @@ type MsgServer interface { // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) + // PruneAllowances prunes expired fee allowances. + PruneAllowances(context.Context, *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -330,6 +431,9 @@ func (*UnimplementedMsgServer) GrantAllowance(ctx context.Context, req *MsgGrant func (*UnimplementedMsgServer) RevokeAllowance(ctx context.Context, req *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RevokeAllowance not implemented") } +func (*UnimplementedMsgServer) PruneAllowances(ctx context.Context, req *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PruneAllowances not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -371,6 +475,24 @@ func _Msg_RevokeAllowance_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Msg_PruneAllowances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgPruneAllowances) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).PruneAllowances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.feegrant.v1beta1.Msg/PruneAllowances", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).PruneAllowances(ctx, req.(*MsgPruneAllowances)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.feegrant.v1beta1.Msg", HandlerType: (*MsgServer)(nil), @@ -383,6 +505,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "RevokeAllowance", Handler: _Msg_RevokeAllowance_Handler, }, + { + MethodName: "PruneAllowances", + Handler: _Msg_PruneAllowances_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/feegrant/v1beta1/tx.proto", @@ -520,6 +646,59 @@ func (m *MsgRevokeAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *MsgPruneAllowances) 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 *MsgPruneAllowances) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPruneAllowances) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Pruner) > 0 { + i -= len(m.Pruner) + copy(dAtA[i:], m.Pruner) + i = encodeVarintTx(dAtA, i, uint64(len(m.Pruner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgPruneAllowancesResponse) 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 *MsgPruneAllowancesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPruneAllowancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -587,6 +766,28 @@ func (m *MsgRevokeAllowanceResponse) Size() (n int) { return n } +func (m *MsgPruneAllowances) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Pruner) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgPruneAllowancesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -957,6 +1158,138 @@ func (m *MsgRevokeAllowanceResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgPruneAllowances) 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: MsgPruneAllowances: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPruneAllowances: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pruner", 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.Pruner = 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 *MsgPruneAllowancesResponse) 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: MsgPruneAllowancesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPruneAllowancesResponse: 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 skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From 1b98a8e0536adcf49c610c935c4d79c2101fd697 Mon Sep 17 00:00:00 2001 From: Facundo Date: Tue, 10 Oct 2023 17:43:08 +0200 Subject: [PATCH 02/32] cleanup: remove getGrant --- x/feegrant/keeper/keeper.go | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/x/feegrant/keeper/keeper.go b/x/feegrant/keeper/keeper.go index 4a5b9570ca26..1bb0c9dd264f 100644 --- a/x/feegrant/keeper/keeper.go +++ b/x/feegrant/keeper/keeper.go @@ -128,7 +128,7 @@ func (k Keeper) GrantAllowance(ctx context.Context, granter, grantee sdk.AccAddr // UpdateAllowance updates the existing grant. func (k Keeper) UpdateAllowance(ctx context.Context, granter, grantee sdk.AccAddress, feeAllowance feegrant.FeeAllowanceI) error { - _, err := k.getGrant(ctx, granter, grantee) + _, err := k.GetAllowance(ctx, granter, grantee) if err != nil { return err } @@ -215,16 +215,6 @@ func (k Keeper) GetAllowance(ctx context.Context, granter, grantee sdk.AccAddres return grant.GetGrant() } -// getGrant returns entire grant between both accounts -func (k Keeper) getGrant(ctx context.Context, granter, grantee sdk.AccAddress) (*feegrant.Grant, error) { - feegrant, err := k.FeeAllowance.Get(ctx, collections.Join(grantee, granter)) - if err != nil { - return nil, err - } - - return &feegrant, nil -} - // IterateAllFeeAllowances iterates over all the grants in the store. // Callback to get all data, returns true to stop, false to keep reading // Calling this without pagination is very expensive and only designed for export genesis @@ -245,12 +235,7 @@ func (k Keeper) IterateAllFeeAllowances(ctx context.Context, cb func(grant feegr // UseGrantedFees will try to pay the given fee from the granter's account as requested by the grantee func (k Keeper) UseGrantedFees(ctx context.Context, granter, grantee sdk.AccAddress, fee sdk.Coins, msgs []sdk.Msg) error { - f, err := k.getGrant(ctx, granter, grantee) - if err != nil { - return err - } - - grant, err := f.GetGrant() + grant, err := k.GetAllowance(ctx, granter, grantee) if err != nil { return err } From 620d699f46575dc360ebe7c0737e112d82339630 Mon Sep 17 00:00:00 2001 From: Facundo Date: Tue, 10 Oct 2023 18:03:40 +0200 Subject: [PATCH 03/32] cl++ --- x/feegrant/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/x/feegrant/CHANGELOG.md b/x/feegrant/CHANGELOG.md index 3b671d3bf36d..21dfc8fb40db 100644 --- a/x/feegrant/CHANGELOG.md +++ b/x/feegrant/CHANGELOG.md @@ -27,6 +27,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Features +* [#18047](https://github.com/cosmos/cosmos-sdk/pull/18047) Added a limit of 50 grants pruned per EndBlock and the method PruneAllowances that prunes 5 expired grants on every run. * [#14649](https://github.com/cosmos/cosmos-sdk/pull/14649) The `x/feegrant` module is extracted to have a separate go.mod file which allows it to be a standalone module. ### API Breaking Changes From 8f452bb55182231d961598fce3a837ac70e2dd71 Mon Sep 17 00:00:00 2001 From: Facundo Date: Thu, 12 Oct 2023 10:18:50 +0200 Subject: [PATCH 04/32] add event, autocli tx and test --- api/cosmos/feegrant/v1beta1/tx.pulsar.go | 82 ++++++++++++------------ proto/cosmos/feegrant/v1beta1/tx.proto | 1 - x/feegrant/events.go | 2 + x/feegrant/keeper/keeper_test.go | 9 ++- x/feegrant/keeper/msg_server.go | 17 ++++- x/feegrant/keeper/msg_server_test.go | 51 +++++++++++++++ x/feegrant/module/abci.go | 11 ++-- x/feegrant/module/autocli.go | 7 ++ x/feegrant/module/module.go | 5 +- x/feegrant/tx.pb.go | 24 +++---- 10 files changed, 136 insertions(+), 73 deletions(-) diff --git a/api/cosmos/feegrant/v1beta1/tx.pulsar.go b/api/cosmos/feegrant/v1beta1/tx.pulsar.go index 6a74fcfea8ae..c27b7c8e51c3 100644 --- a/api/cosmos/feegrant/v1beta1/tx.pulsar.go +++ b/api/cosmos/feegrant/v1beta1/tx.pulsar.go @@ -2830,53 +2830,51 @@ var file_cosmos_feegrant_v1beta1_tx_proto_rawDesc = []byte{ 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x75, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, + 0x6e, 0x73, 0x65, 0x22, 0x53, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 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, 0x2d, 0x82, 0xe7, 0xb0, - 0x2a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, - 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, - 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe8, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, - 0x12, 0x70, 0x0a, 0x0e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, - 0x63, 0x65, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x32, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, - 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x73, 0x0a, 0x0f, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, - 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, + 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, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x50, + 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe8, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x70, + 0x0a, 0x0e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, + 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, + 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x32, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, + 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x73, 0x0a, 0x0f, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, + 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, + 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, + 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x0f, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, + 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, - 0x63, 0x65, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x0f, 0x50, 0x72, 0x75, 0x6e, 0x65, - 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, - 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, + 0x01, 0x42, 0xde, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, - 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, - 0xb0, 0x2a, 0x01, 0x42, 0xde, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, - 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, 0x17, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, + 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/cosmos/feegrant/v1beta1/tx.proto b/proto/cosmos/feegrant/v1beta1/tx.proto index 4f9d69402e3b..d71dac092491 100644 --- a/proto/cosmos/feegrant/v1beta1/tx.proto +++ b/proto/cosmos/feegrant/v1beta1/tx.proto @@ -62,7 +62,6 @@ message MsgRevokeAllowanceResponse {} // MsgPruneAllowances prunes expired fee allowances. message MsgPruneAllowances { option (cosmos.msg.v1.signer) = "pruner"; - option (amino.name) = "cosmos-sdk/MsgPruneAllowances"; // pruner is the address of the user pruning expired allowances. string pruner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; diff --git a/x/feegrant/events.go b/x/feegrant/events.go index d5f047612370..70cb6990f0cd 100644 --- a/x/feegrant/events.go +++ b/x/feegrant/events.go @@ -6,7 +6,9 @@ const ( EventTypeRevokeFeeGrant = "revoke_feegrant" EventTypeSetFeeGrant = "set_feegrant" EventTypeUpdateFeeGrant = "update_feegrant" + EventTypePruneFeeGrant = "prune_feegrant" AttributeKeyGranter = "granter" AttributeKeyGrantee = "grantee" + AttributeKeyPruner = "pruner" ) diff --git a/x/feegrant/keeper/keeper_test.go b/x/feegrant/keeper/keeper_test.go index 51895b66ee3a..ec83549dfd54 100644 --- a/x/feegrant/keeper/keeper_test.go +++ b/x/feegrant/keeper/keeper_test.go @@ -40,7 +40,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (suite *KeeperTestSuite) SetupTest() { - suite.addrs = simtestutil.CreateIncrementalAccounts(4) + suite.addrs = simtestutil.CreateIncrementalAccounts(7) key := storetypes.NewKVStoreKey(feegrant.StoreKey) testCtx := testutil.DefaultContextWithDB(suite.T(), key, storetypes.NewTransientStoreKey("transient_test")) encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) @@ -48,10 +48,9 @@ func (suite *KeeperTestSuite) SetupTest() { // setup gomock and initialize some globally expected executions ctrl := gomock.NewController(suite.T()) suite.accountKeeper = feegranttestutil.NewMockAccountKeeper(ctrl) - suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), suite.addrs[0]).Return(authtypes.NewBaseAccountWithAddress(suite.addrs[0])).AnyTimes() - suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), suite.addrs[1]).Return(authtypes.NewBaseAccountWithAddress(suite.addrs[1])).AnyTimes() - suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), suite.addrs[2]).Return(authtypes.NewBaseAccountWithAddress(suite.addrs[2])).AnyTimes() - suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), suite.addrs[3]).Return(authtypes.NewBaseAccountWithAddress(suite.addrs[3])).AnyTimes() + for i := 0; i < len(suite.addrs); i++ { + suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), suite.addrs[i]).Return(authtypes.NewBaseAccountWithAddress(suite.addrs[i])).AnyTimes() + } ac := codecaddress.NewBech32Codec("cosmos") suite.accountKeeper.EXPECT().AddressCodec().Return(ac).AnyTimes() diff --git a/x/feegrant/keeper/msg_server.go b/x/feegrant/keeper/msg_server.go index a79902127bcc..2c6de7b9e160 100644 --- a/x/feegrant/keeper/msg_server.go +++ b/x/feegrant/keeper/msg_server.go @@ -7,6 +7,7 @@ import ( errorsmod "cosmossdk.io/errors" "cosmossdk.io/x/feegrant" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -86,7 +87,19 @@ func (k msgServer) RevokeAllowance(ctx context.Context, msg *feegrant.MsgRevokeA } // PruneAllowances removes expired allowances from the store. -func (k msgServer) PruneAllowances(ctx context.Context, _ *feegrant.MsgPruneAllowances) (*feegrant.MsgPruneAllowancesResponse, error) { +func (k msgServer) PruneAllowances(ctx context.Context, req *feegrant.MsgPruneAllowances) (*feegrant.MsgPruneAllowancesResponse, error) { err := k.RemoveExpiredAllowances(ctx, 5) - return &feegrant.MsgPruneAllowancesResponse{}, err + if err != nil { + return nil, err + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.EventManager().EmitEvent( + sdk.NewEvent( + feegrant.EventTypePruneFeeGrant, + sdk.NewAttribute(feegrant.AttributeKeyPruner, req.Pruner), + ), + ) + + return &feegrant.MsgPruneAllowancesResponse{}, nil } diff --git a/x/feegrant/keeper/msg_server_test.go b/x/feegrant/keeper/msg_server_test.go index 707b4264d80f..cb291196ff31 100644 --- a/x/feegrant/keeper/msg_server_test.go +++ b/x/feegrant/keeper/msg_server_test.go @@ -5,11 +5,13 @@ import ( "github.com/golang/mock/gomock" + "cosmossdk.io/collections" "cosmossdk.io/core/header" "cosmossdk.io/x/feegrant" codecaddress "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) @@ -286,3 +288,52 @@ func (suite *KeeperTestSuite) TestRevokeAllowance() { }) } } + +func (suite *KeeperTestSuite) TestPruneAllowances() { + ctx := suite.ctx.WithHeaderInfo(header.Info{Time: time.Now()}) + oneYear := ctx.HeaderInfo().Time.AddDate(1, 0, 0) + + // We create 6 allowances, all expiring in one year + for i := 0; i < 6; i++ { + any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ + SpendLimit: suite.atom, + Expiration: &oneYear, + }) + suite.Require().NoError(err) + req := &feegrant.MsgGrantAllowance{ + Granter: suite.encodedAddrs[0], + Grantee: suite.encodedAddrs[i+1], + Allowance: any, + } + + _, err = suite.msgSrvr.GrantAllowance(ctx, req) + suite.Require().NoError(err) + + } + + // we have 6 allowances + count := 0 + suite.feegrantKeeper.FeeAllowance.Walk(ctx, nil, func(key collections.Pair[types.AccAddress, types.AccAddress], value feegrant.Grant) (stop bool, err error) { + count++ + return false, nil + }) + suite.Require().Equal(6, count) + + // after a year and one day passes, they are all expired + oneYearAndADay := ctx.HeaderInfo().Time.AddDate(1, 0, 1) + ctx = suite.ctx.WithHeaderInfo(header.Info{Time: oneYearAndADay}) + + // we prune them, but currently only 5 will be pruned + _, err := suite.msgSrvr.PruneAllowances(ctx, &feegrant.MsgPruneAllowances{}) + suite.Require().NoError(err) + + // we have 1 allowance left + count = 0 + suite.feegrantKeeper.FeeAllowance.Walk(ctx, nil, func(key collections.Pair[types.AccAddress, types.AccAddress], value feegrant.Grant) (stop bool, err error) { + count++ + + return false, nil + }) + suite.Require().Equal(1, count) + +} diff --git a/x/feegrant/module/abci.go b/x/feegrant/module/abci.go index 5897d346f21d..533988fb8e30 100644 --- a/x/feegrant/module/abci.go +++ b/x/feegrant/module/abci.go @@ -1,14 +1,11 @@ package module import ( - "cosmossdk.io/x/feegrant/keeper" + "context" - sdk "github.com/cosmos/cosmos-sdk/types" + "cosmossdk.io/x/feegrant/keeper" ) -func EndBlocker(ctx sdk.Context, k keeper.Keeper) { - err := k.RemoveExpiredAllowances(ctx, 50) - if err != nil { - panic(err) - } +func EndBlocker(ctx context.Context, k keeper.Keeper) error { + return k.RemoveExpiredAllowances(ctx, 50) } diff --git a/x/feegrant/module/autocli.go b/x/feegrant/module/autocli.go index 3ba095376ab1..60e3232c5844 100644 --- a/x/feegrant/module/autocli.go +++ b/x/feegrant/module/autocli.go @@ -63,6 +63,13 @@ You can find the fee-grant of a granter and grantee.`), {ProtoField: "grantee"}, }, }, + { + RpcMethod: "PruneAllowances", + Use: "prune", + Short: "Prune expired allowances", + Long: "Prune a limited amount of expired allowances in order to reduce the size of the store when the number of expired allowances is large.", + Example: fmt.Sprintf(`$ %s tx feegrant prune`, version.AppName), + }, }, EnhanceCustomCommand: true, }, diff --git a/x/feegrant/module/module.go b/x/feegrant/module/module.go index 320812aac29a..63a50d76e39e 100644 --- a/x/feegrant/module/module.go +++ b/x/feegrant/module/module.go @@ -22,7 +22,6 @@ import ( sdkclient "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) @@ -162,9 +161,7 @@ func (AppModule) ConsensusVersion() uint64 { return 2 } // EndBlock returns the end blocker for the feegrant module. It returns no validator // updates. func (am AppModule) EndBlock(ctx context.Context) error { - c := sdk.UnwrapSDKContext(ctx) - EndBlocker(c, am.keeper) - return nil + return EndBlocker(ctx, am.keeper) } func init() { diff --git a/x/feegrant/tx.pb.go b/x/feegrant/tx.pb.go index 4b99ff16a25d..7bc84761b388 100644 --- a/x/feegrant/tx.pb.go +++ b/x/feegrant/tx.pb.go @@ -320,7 +320,7 @@ func init() { func init() { proto.RegisterFile("cosmos/feegrant/v1beta1/tx.proto", fileDescriptor_dd44ad7946dad783) } var fileDescriptor_dd44ad7946dad783 = []byte{ - // 458 bytes of a gzipped FileDescriptorProto + // 455 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, 0x4b, 0x4d, 0x4d, 0x2f, 0x4a, 0xcc, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x87, 0xa8, @@ -339,17 +339,17 @@ var fileDescriptor_dd44ad7946dad783 = []byte{ 0xb2, 0xf5, 0x31, 0x7c, 0xad, 0x24, 0xcd, 0x25, 0x89, 0x21, 0x18, 0x94, 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0xaa, 0xb4, 0x86, 0x91, 0x4b, 0xc8, 0xb7, 0x38, 0x3d, 0x28, 0xb5, 0x2c, 0x3f, 0x3b, 0x95, 0xee, 0x21, 0x65, 0xa5, 0x87, 0xee, 0x15, 0x59, 0x54, 0xaf, 0xa0, 0xb9, 0x4b, 0x49, 0x86, - 0x4b, 0x0a, 0x53, 0x14, 0xee, 0x99, 0x52, 0xb0, 0x5f, 0x02, 0x8a, 0x4a, 0xf3, 0x10, 0x92, 0xc5, - 0x42, 0x06, 0x5c, 0x6c, 0x05, 0x20, 0x21, 0xc2, 0x5e, 0x81, 0xaa, 0x83, 0x04, 0x30, 0x94, 0x83, - 0xc5, 0x51, 0x68, 0x16, 0x40, 0x1d, 0x85, 0x26, 0x0a, 0x73, 0x94, 0xd1, 0x0b, 0x26, 0x2e, 0x66, - 0xdf, 0xe2, 0x74, 0xa1, 0x02, 0x2e, 0x3e, 0xb4, 0xe4, 0xa8, 0xa5, 0x87, 0x2b, 0xea, 0x31, 0xe2, - 0x4b, 0xca, 0x88, 0x78, 0xb5, 0x30, 0x9b, 0x85, 0x8a, 0xb9, 0xf8, 0xd1, 0xe3, 0x55, 0x1b, 0x9f, - 0x31, 0x68, 0x8a, 0xa5, 0x8c, 0x49, 0x50, 0x8c, 0x6c, 0x29, 0x7a, 0x04, 0xe0, 0xb5, 0x14, 0x4d, - 0x31, 0x7e, 0x4b, 0x71, 0x84, 0xb1, 0x14, 0x6b, 0xc3, 0xf3, 0x0d, 0x5a, 0x8c, 0x4e, 0x86, 0x27, - 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, - 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x05, 0x2d, 0x3b, 0x8a, 0x53, 0xb2, 0xf5, - 0x32, 0xf3, 0xf5, 0x2b, 0xe0, 0x85, 0x56, 0x12, 0x1b, 0x38, 0x3f, 0x1a, 0x03, 0x02, 0x00, 0x00, - 0xff, 0xff, 0xbf, 0x0a, 0x5b, 0x19, 0xce, 0x04, 0x00, 0x00, + 0x4b, 0x0a, 0x53, 0x14, 0xee, 0x99, 0x60, 0xb0, 0x5f, 0x02, 0x8a, 0x4a, 0xf3, 0x10, 0x92, 0xc5, + 0x42, 0x06, 0x5c, 0x6c, 0x05, 0x20, 0x21, 0xc2, 0x5e, 0x81, 0xaa, 0xb3, 0xe2, 0x06, 0xb9, 0x0a, + 0xca, 0x81, 0x5a, 0x89, 0x66, 0x28, 0xcc, 0x4a, 0xa3, 0x17, 0x4c, 0x5c, 0xcc, 0xbe, 0xc5, 0xe9, + 0x42, 0x05, 0x5c, 0x7c, 0x68, 0x89, 0x4d, 0x4b, 0x0f, 0x57, 0xc4, 0x62, 0xc4, 0x86, 0x94, 0x11, + 0xf1, 0x6a, 0x61, 0x36, 0x0b, 0x15, 0x73, 0xf1, 0xa3, 0xc7, 0x9a, 0x36, 0x3e, 0x63, 0xd0, 0x14, + 0x4b, 0x19, 0x93, 0xa0, 0x18, 0xd9, 0x52, 0xf4, 0xe0, 0xc5, 0x6b, 0x29, 0x9a, 0x62, 0xfc, 0x96, + 0xe2, 0x08, 0x63, 0x29, 0xd6, 0x86, 0xe7, 0x1b, 0xb4, 0x18, 0x9d, 0x0c, 0x4f, 0x3c, 0x92, 0x63, + 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, + 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x0a, 0x5a, 0x32, 0x14, 0xa7, 0x64, 0xeb, 0x65, 0xe6, 0xeb, + 0x57, 0xc0, 0x8b, 0xa4, 0x24, 0x36, 0x70, 0x6e, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8d, + 0x04, 0xdd, 0xf4, 0xac, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From b6da60c6a79ee85cca8a349b19fbd4a199432f48 Mon Sep 17 00:00:00 2001 From: Facundo Date: Thu, 12 Oct 2023 13:33:12 +0200 Subject: [PATCH 05/32] add params and authority --- .../feegrant/module/v1/module.pulsar.go | 116 +- .../feegrant/v1beta1/feegrant.pulsar.go | 576 +++++++- api/cosmos/feegrant/v1beta1/genesis.pulsar.go | 145 +- api/cosmos/feegrant/v1beta1/tx.pulsar.go | 1172 +++++++++++++++-- api/cosmos/feegrant/v1beta1/tx_grpc.pb.go | 39 + proto/cosmos/feegrant/module/v1/module.proto | 3 + proto/cosmos/feegrant/v1beta1/feegrant.proto | 9 + proto/cosmos/feegrant/v1beta1/genesis.proto | 1 + proto/cosmos/feegrant/v1beta1/tx.proto | 23 +- x/feegrant/feegrant.pb.go | 281 +++- x/feegrant/genesis.go | 18 +- x/feegrant/genesis.pb.go | 73 +- x/feegrant/go.mod | 1 + x/feegrant/keeper/keeper.go | 9 +- x/feegrant/keeper/msg_server.go | 19 + x/feegrant/key.go | 2 + x/feegrant/module/autocli.go | 5 + x/feegrant/module/module.go | 16 +- x/feegrant/tx.pb.go | 454 ++++++- 19 files changed, 2705 insertions(+), 257 deletions(-) diff --git a/api/cosmos/feegrant/module/v1/module.pulsar.go b/api/cosmos/feegrant/module/v1/module.pulsar.go index 70a90af5da32..c60310da52e1 100644 --- a/api/cosmos/feegrant/module/v1/module.pulsar.go +++ b/api/cosmos/feegrant/module/v1/module.pulsar.go @@ -14,12 +14,14 @@ import ( ) var ( - md_Module protoreflect.MessageDescriptor + md_Module protoreflect.MessageDescriptor + fd_Module_authority protoreflect.FieldDescriptor ) func init() { file_cosmos_feegrant_module_v1_module_proto_init() md_Module = File_cosmos_feegrant_module_v1_module_proto.Messages().ByName("Module") + fd_Module_authority = md_Module.Fields().ByName("authority") } var _ protoreflect.Message = (*fastReflection_Module)(nil) @@ -87,6 +89,12 @@ func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_Module_authority, value) { + return + } + } } // Has reports whether a field is populated. @@ -102,6 +110,8 @@ func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, proto // a repeated field is populated if it is non-empty. func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "cosmos.feegrant.module.v1.Module.authority": + return x.Authority != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.module.v1.Module")) @@ -118,6 +128,8 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "cosmos.feegrant.module.v1.Module.authority": + x.Authority = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.module.v1.Module")) @@ -134,6 +146,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "cosmos.feegrant.module.v1.Module.authority": + value := x.Authority + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.module.v1.Module")) @@ -154,6 +169,8 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "cosmos.feegrant.module.v1.Module.authority": + x.Authority = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.module.v1.Module")) @@ -174,6 +191,8 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.feegrant.module.v1.Module.authority": + panic(fmt.Errorf("field authority of message cosmos.feegrant.module.v1.Module is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.module.v1.Module")) @@ -187,6 +206,8 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.feegrant.module.v1.Module.authority": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.module.v1.Module")) @@ -256,6 +277,10 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { var n int var l int _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -285,6 +310,13 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -334,6 +366,38 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: 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 Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -387,6 +451,9 @@ type Module struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // authority defines the custom module authority. If not set, defaults to the governance module. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` } func (x *Module) Reset() { @@ -409,6 +476,13 @@ func (*Module) Descriptor() ([]byte, []int) { return file_cosmos_feegrant_module_v1_module_proto_rawDescGZIP(), []int{0} } +func (x *Module) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + var File_cosmos_feegrant_module_v1_module_proto protoreflect.FileDescriptor var file_cosmos_feegrant_module_v1_module_proto_rawDesc = []byte{ @@ -418,25 +492,27 @@ var file_cosmos_feegrant_module_v1_module_proto_rawDesc = []byte{ 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, - 0x1f, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x19, 0x0a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, - 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x78, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x42, 0xe8, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, - 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x33, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x4d, 0xaa, 0x02, 0x19, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, - 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, - 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x47, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x1f, 0xba, + 0xc0, 0x96, 0xda, 0x01, 0x19, 0x0a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, + 0x2e, 0x69, 0x6f, 0x2f, 0x78, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x42, 0xe8, + 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, + 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, + 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x33, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x4d, 0xaa, 0x02, 0x19, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x25, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, + 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go b/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go index fbd2ee96c773..f9aef739f73a 100644 --- a/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go +++ b/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go @@ -2583,6 +2583,458 @@ func (x *fastReflection_Grant) ProtoMethods() *protoiface.Methods { } } +var ( + md_Params protoreflect.MessageDescriptor + fd_Params_endblock_prunes protoreflect.FieldDescriptor + fd_Params_manual_prunes protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_feegrant_v1beta1_feegrant_proto_init() + md_Params = File_cosmos_feegrant_v1beta1_feegrant_proto.Messages().ByName("Params") + fd_Params_endblock_prunes = md_Params.Fields().ByName("endblock_prunes") + fd_Params_manual_prunes = md_Params.Fields().ByName("manual_prunes") +} + +var _ protoreflect.Message = (*fastReflection_Params)(nil) + +type fastReflection_Params Params + +func (x *Params) ProtoReflect() protoreflect.Message { + return (*fastReflection_Params)(x) +} + +func (x *Params) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[4] + 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_Params_messageType fastReflection_Params_messageType +var _ protoreflect.MessageType = fastReflection_Params_messageType{} + +type fastReflection_Params_messageType struct{} + +func (x fastReflection_Params_messageType) Zero() protoreflect.Message { + return (*fastReflection_Params)(nil) +} +func (x fastReflection_Params_messageType) New() protoreflect.Message { + return new(fastReflection_Params) +} +func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// 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_Params) Type() protoreflect.MessageType { + return _fastReflection_Params_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Params) New() protoreflect.Message { + return new(fastReflection_Params) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { + return (*Params)(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_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.EndblockPrunes != uint64(0) { + value := protoreflect.ValueOfUint64(x.EndblockPrunes) + if !f(fd_Params_endblock_prunes, value) { + return + } + } + if x.ManualPrunes != uint64(0) { + value := protoreflect.ValueOfUint64(x.ManualPrunes) + if !f(fd_Params_manual_prunes, 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_Params) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.Params.endblock_prunes": + return x.EndblockPrunes != uint64(0) + case "cosmos.feegrant.v1beta1.Params.manual_prunes": + return x.ManualPrunes != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Params")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Params 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_Params) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.Params.endblock_prunes": + x.EndblockPrunes = uint64(0) + case "cosmos.feegrant.v1beta1.Params.manual_prunes": + x.ManualPrunes = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Params")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Params 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_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.feegrant.v1beta1.Params.endblock_prunes": + value := x.EndblockPrunes + return protoreflect.ValueOfUint64(value) + case "cosmos.feegrant.v1beta1.Params.manual_prunes": + value := x.ManualPrunes + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Params")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Params 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_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.Params.endblock_prunes": + x.EndblockPrunes = value.Uint() + case "cosmos.feegrant.v1beta1.Params.manual_prunes": + x.ManualPrunes = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Params")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Params 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_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.Params.endblock_prunes": + panic(fmt.Errorf("field endblock_prunes of message cosmos.feegrant.v1beta1.Params is not mutable")) + case "cosmos.feegrant.v1beta1.Params.manual_prunes": + panic(fmt.Errorf("field manual_prunes of message cosmos.feegrant.v1beta1.Params is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Params")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Params 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_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.Params.endblock_prunes": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.feegrant.v1beta1.Params.manual_prunes": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Params")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Params 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_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.Params", 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_Params) 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_Params) 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_Params) 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_Params) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Params) + 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.EndblockPrunes != 0 { + n += 1 + runtime.Sov(uint64(x.EndblockPrunes)) + } + if x.ManualPrunes != 0 { + n += 1 + runtime.Sov(uint64(x.ManualPrunes)) + } + 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().(*Params) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ManualPrunes != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ManualPrunes)) + i-- + dAtA[i] = 0x10 + } + if x.EndblockPrunes != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.EndblockPrunes)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Params) + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EndblockPrunes", wireType) + } + x.EndblockPrunes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.EndblockPrunes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ManualPrunes", wireType) + } + x.ManualPrunes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.ManualPrunes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Since: cosmos-sdk 0.43 // Code generated by protoc-gen-go. DO NOT EDIT. @@ -2826,6 +3278,52 @@ func (x *Grant) GetAllowance() *anypb.Any { return nil } +// Params defines the parameters for the x/feegrant module. +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // amount of expired grants to prune at endblock + EndblockPrunes uint64 `protobuf:"varint,1,opt,name=endblock_prunes,json=endblockPrunes,proto3" json:"endblock_prunes,omitempty"` + // amount of expired grants to prune using MsgPruneAllowances + ManualPrunes uint64 `protobuf:"varint,2,opt,name=manual_prunes,json=manualPrunes,proto3" json:"manual_prunes,omitempty"` +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Params) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Params) ProtoMessage() {} + +// Deprecated: Use Params.ProtoReflect.Descriptor instead. +func (*Params) Descriptor() ([]byte, []int) { + return file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescGZIP(), []int{4} +} + +func (x *Params) GetEndblockPrunes() uint64 { + if x != nil { + return x.EndblockPrunes + } + return 0 +} + +func (x *Params) GetManualPrunes() uint64 { + if x != nil { + return x.ManualPrunes + } + return 0 +} + var File_cosmos_feegrant_v1beta1_feegrant_proto protoreflect.FileDescriptor var file_cosmos_feegrant_v1beta1_feegrant_proto_rawDesc = []byte{ @@ -2929,22 +3427,27 @@ var file_cosmos_feegrant_v1beta1_feegrant_proto_rawDesc = []byte{ 0x29, 0xca, 0xb4, 0x2d, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x61, 0x6e, 0x63, 0x65, 0x42, 0xe4, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0d, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, - 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x70, 0x72, 0x75, 0x6e, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x65, 0x6e, 0x64, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x6e, 0x75, + 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x73, 0x42, 0xe4, 0x01, + 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, + 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0d, 0x46, + 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, + 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, + 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2959,27 +3462,28 @@ func file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescGZIP() []byte { return file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescData } -var file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_cosmos_feegrant_v1beta1_feegrant_proto_goTypes = []interface{}{ (*BasicAllowance)(nil), // 0: cosmos.feegrant.v1beta1.BasicAllowance (*PeriodicAllowance)(nil), // 1: cosmos.feegrant.v1beta1.PeriodicAllowance (*AllowedMsgAllowance)(nil), // 2: cosmos.feegrant.v1beta1.AllowedMsgAllowance (*Grant)(nil), // 3: cosmos.feegrant.v1beta1.Grant - (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 6: google.protobuf.Duration - (*anypb.Any)(nil), // 7: google.protobuf.Any + (*Params)(nil), // 4: cosmos.feegrant.v1beta1.Params + (*v1beta1.Coin)(nil), // 5: cosmos.base.v1beta1.Coin + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 7: google.protobuf.Duration + (*anypb.Any)(nil), // 8: google.protobuf.Any } var file_cosmos_feegrant_v1beta1_feegrant_proto_depIdxs = []int32{ - 4, // 0: cosmos.feegrant.v1beta1.BasicAllowance.spend_limit:type_name -> cosmos.base.v1beta1.Coin - 5, // 1: cosmos.feegrant.v1beta1.BasicAllowance.expiration:type_name -> google.protobuf.Timestamp + 5, // 0: cosmos.feegrant.v1beta1.BasicAllowance.spend_limit:type_name -> cosmos.base.v1beta1.Coin + 6, // 1: cosmos.feegrant.v1beta1.BasicAllowance.expiration:type_name -> google.protobuf.Timestamp 0, // 2: cosmos.feegrant.v1beta1.PeriodicAllowance.basic:type_name -> cosmos.feegrant.v1beta1.BasicAllowance - 6, // 3: cosmos.feegrant.v1beta1.PeriodicAllowance.period:type_name -> google.protobuf.Duration - 4, // 4: cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit:type_name -> cosmos.base.v1beta1.Coin - 4, // 5: cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend:type_name -> cosmos.base.v1beta1.Coin - 5, // 6: cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset:type_name -> google.protobuf.Timestamp - 7, // 7: cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance:type_name -> google.protobuf.Any - 7, // 8: cosmos.feegrant.v1beta1.Grant.allowance:type_name -> google.protobuf.Any + 7, // 3: cosmos.feegrant.v1beta1.PeriodicAllowance.period:type_name -> google.protobuf.Duration + 5, // 4: cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit:type_name -> cosmos.base.v1beta1.Coin + 5, // 5: cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend:type_name -> cosmos.base.v1beta1.Coin + 6, // 6: cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset:type_name -> google.protobuf.Timestamp + 8, // 7: cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance:type_name -> google.protobuf.Any + 8, // 8: cosmos.feegrant.v1beta1.Grant.allowance:type_name -> google.protobuf.Any 9, // [9:9] is the sub-list for method output_type 9, // [9:9] is the sub-list for method input_type 9, // [9:9] is the sub-list for extension type_name @@ -3041,6 +3545,18 @@ func file_cosmos_feegrant_v1beta1_feegrant_proto_init() { return nil } } + file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Params); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -3048,7 +3564,7 @@ func file_cosmos_feegrant_v1beta1_feegrant_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_feegrant_v1beta1_feegrant_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/api/cosmos/feegrant/v1beta1/genesis.pulsar.go b/api/cosmos/feegrant/v1beta1/genesis.pulsar.go index 459af1b1511d..83fc5f5eb4c0 100644 --- a/api/cosmos/feegrant/v1beta1/genesis.pulsar.go +++ b/api/cosmos/feegrant/v1beta1/genesis.pulsar.go @@ -68,12 +68,14 @@ func (x *_GenesisState_1_list) IsValid() bool { var ( md_GenesisState protoreflect.MessageDescriptor fd_GenesisState_allowances protoreflect.FieldDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor ) func init() { file_cosmos_feegrant_v1beta1_genesis_proto_init() md_GenesisState = File_cosmos_feegrant_v1beta1_genesis_proto.Messages().ByName("GenesisState") fd_GenesisState_allowances = md_GenesisState.Fields().ByName("allowances") + fd_GenesisState_params = md_GenesisState.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) @@ -147,6 +149,12 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, return } } + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_GenesisState_params, value) { + return + } + } } // Has reports whether a field is populated. @@ -164,6 +172,8 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool switch fd.FullName() { case "cosmos.feegrant.v1beta1.GenesisState.allowances": return len(x.Allowances) != 0 + case "cosmos.feegrant.v1beta1.GenesisState.params": + return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) @@ -182,6 +192,8 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "cosmos.feegrant.v1beta1.GenesisState.allowances": x.Allowances = nil + case "cosmos.feegrant.v1beta1.GenesisState.params": + x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) @@ -204,6 +216,9 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto } listValue := &_GenesisState_1_list{list: &x.Allowances} return protoreflect.ValueOfList(listValue) + case "cosmos.feegrant.v1beta1.GenesisState.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) @@ -228,6 +243,8 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value lv := value.List() clv := lv.(*_GenesisState_1_list) x.Allowances = *clv.list + case "cosmos.feegrant.v1beta1.GenesisState.params": + x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) @@ -254,6 +271,11 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p } value := &_GenesisState_1_list{list: &x.Allowances} return protoreflect.ValueOfList(value) + case "cosmos.feegrant.v1beta1.GenesisState.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) @@ -270,6 +292,9 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) case "cosmos.feegrant.v1beta1.GenesisState.allowances": list := []*Grant{} return protoreflect.ValueOfList(&_GenesisState_1_list{list: &list}) + case "cosmos.feegrant.v1beta1.GenesisState.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) @@ -345,6 +370,10 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -374,6 +403,20 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } if len(x.Allowances) > 0 { for iNdEx := len(x.Allowances) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Allowances[iNdEx]) @@ -473,6 +516,42 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -530,6 +609,7 @@ type GenesisState struct { unknownFields protoimpl.UnknownFields Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` } func (x *GenesisState) Reset() { @@ -559,6 +639,13 @@ func (x *GenesisState) GetAllowances() []*Grant { return nil } +func (x *GenesisState) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + var File_cosmos_feegrant_v1beta1_genesis_proto protoreflect.FileDescriptor var file_cosmos_feegrant_v1beta1_genesis_proto_rawDesc = []byte{ @@ -571,27 +658,31 @@ var file_cosmos_feegrant_v1beta1_genesis_proto_rawDesc = []byte{ 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x59, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, - 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0xe3, 0x01, 0x0a, - 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, 0x17, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, - 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x22, 0x9d, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x42, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, + 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x42, 0xe3, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, + 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, + 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, + 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -610,14 +701,16 @@ var file_cosmos_feegrant_v1beta1_genesis_proto_msgTypes = make([]protoimpl.Messa var file_cosmos_feegrant_v1beta1_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: cosmos.feegrant.v1beta1.GenesisState (*Grant)(nil), // 1: cosmos.feegrant.v1beta1.Grant + (*Params)(nil), // 2: cosmos.feegrant.v1beta1.Params } var file_cosmos_feegrant_v1beta1_genesis_proto_depIdxs = []int32{ 1, // 0: cosmos.feegrant.v1beta1.GenesisState.allowances:type_name -> cosmos.feegrant.v1beta1.Grant - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 2, // 1: cosmos.feegrant.v1beta1.GenesisState.params:type_name -> cosmos.feegrant.v1beta1.Params + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] 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_feegrant_v1beta1_genesis_proto_init() } diff --git a/api/cosmos/feegrant/v1beta1/tx.pulsar.go b/api/cosmos/feegrant/v1beta1/tx.pulsar.go index c27b7c8e51c3..edb6f1705695 100644 --- a/api/cosmos/feegrant/v1beta1/tx.pulsar.go +++ b/api/cosmos/feegrant/v1beta1/tx.pulsar.go @@ -7,6 +7,7 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -2551,6 +2552,861 @@ func (x *fastReflection_MsgPruneAllowancesResponse) ProtoMethods() *protoiface.M } } +var ( + md_MsgUpdateParams protoreflect.MessageDescriptor + fd_MsgUpdateParams_authority protoreflect.FieldDescriptor + fd_MsgUpdateParams_params protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_feegrant_v1beta1_tx_proto_init() + md_MsgUpdateParams = File_cosmos_feegrant_v1beta1_tx_proto.Messages().ByName("MsgUpdateParams") + fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") + fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) + +type fastReflection_MsgUpdateParams MsgUpdateParams + +func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(x) +} + +func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_feegrant_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_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} + +type fastReflection_MsgUpdateParams_messageType struct{} + +func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(nil) +} +func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} +func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// 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_MsgUpdateParams) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParams_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParams)(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_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgUpdateParams_authority, value) { + return + } + } + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_MsgUpdateParams_params, 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_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.MsgUpdateParams.authority": + return x.Authority != "" + case "cosmos.feegrant.v1beta1.MsgUpdateParams.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParams 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_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.MsgUpdateParams.authority": + x.Authority = "" + case "cosmos.feegrant.v1beta1.MsgUpdateParams.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParams 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_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.feegrant.v1beta1.MsgUpdateParams.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "cosmos.feegrant.v1beta1.MsgUpdateParams.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParams 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_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.MsgUpdateParams.authority": + x.Authority = value.Interface().(string) + case "cosmos.feegrant.v1beta1.MsgUpdateParams.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParams 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_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.MsgUpdateParams.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "cosmos.feegrant.v1beta1.MsgUpdateParams.authority": + panic(fmt.Errorf("field authority of message cosmos.feegrant.v1beta1.MsgUpdateParams is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParams 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_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.MsgUpdateParams.authority": + return protoreflect.ValueOfString("") + case "cosmos.feegrant.v1beta1.MsgUpdateParams.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParams 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_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.MsgUpdateParams", 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_MsgUpdateParams) 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_MsgUpdateParams) 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_MsgUpdateParams) 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_MsgUpdateParams) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParams) + 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.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Params != nil { + l = options.Size(x.Params) + 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().(*MsgUpdateParams) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + 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().(*MsgUpdateParams) + 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: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: 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 Authority", 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.Authority = 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 Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateParamsResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_feegrant_v1beta1_tx_proto_init() + md_MsgUpdateParamsResponse = File_cosmos_feegrant_v1beta1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) + +type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse + +func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(x) +} + +func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_feegrant_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_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} + +type fastReflection_MsgUpdateParamsResponse_messageType struct{} + +func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(nil) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// 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_MsgUpdateParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParamsResponse)(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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) 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.feegrant.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.MsgUpdateParamsResponse", 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + 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().(*MsgUpdateParamsResponse) + 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().(*MsgUpdateParamsResponse) + 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: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: 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, + } +} + // Since: cosmos-sdk 0.43 // Code generated by protoc-gen-go. DO NOT EDIT. @@ -2786,95 +3642,192 @@ func (*MsgPruneAllowancesResponse) Descriptor() ([]byte, []int) { return file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{5} } +// MsgUpdateParams is the Msg/UpdateParams request type. +type MsgUpdateParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/feegrant parameters to update. + // + // NOTE: All parameters must be supplied. + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *MsgUpdateParams) Reset() { + *x = MsgUpdateParams{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParams) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgUpdateParams) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgUpdateParams) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +// MsgUpdateParamsResponse defines the response structure of the UpdateParams. +type MsgUpdateParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateParamsResponse) Reset() { + *x = MsgUpdateParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParamsResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{7} +} + var File_cosmos_feegrant_v1beta1_tx_proto protoreflect.FileDescriptor var file_cosmos_feegrant_v1beta1_tx_proto_rawDesc = []byte{ 0x0a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, - 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, - 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x02, - 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, - 0x6e, 0x63, 0x65, 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, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x5d, 0x0a, 0x09, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x29, 0xca, 0xb4, 0x2d, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x52, - 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x2d, 0x82, 0xe7, 0xb0, 0x2a, - 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1c, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, - 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xac, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 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, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, + 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, + 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, + 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x02, 0x0a, 0x11, + 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, + 0x65, 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, 0x65, 0x3a, 0x2e, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, - 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, - 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x53, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, - 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 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, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x50, - 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe8, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x70, - 0x0a, 0x0e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, - 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x32, 0x2e, 0x63, + 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x5d, 0x0a, 0x09, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, + 0x6e, 0x79, 0x42, 0x29, 0xca, 0xb4, 0x2d, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, + 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x52, 0x09, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x2d, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, + 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, + 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x47, 0x72, + 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xac, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, + 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 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, + 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x65, 0x65, 0x3a, 0x2e, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, + 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, + 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, + 0x6e, 0x63, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, + 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x53, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, + 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 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, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, + 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 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, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x12, 0x42, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, + 0xd4, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x70, 0x0a, 0x0e, 0x47, 0x72, 0x61, 0x6e, 0x74, + 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, + 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, + 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x0f, 0x52, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, - 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x73, 0x0a, 0x0f, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, - 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, + 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, + 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, + 0x0a, 0x0f, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, + 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, + 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x33, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, + 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, - 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x0f, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, - 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, - 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, - 0x01, 0x42, 0xde, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, 0x17, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, - 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x30, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, + 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xde, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, + 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, + 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, + 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2889,7 +3842,7 @@ func file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP() []byte { return file_cosmos_feegrant_v1beta1_tx_proto_rawDescData } -var file_cosmos_feegrant_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_cosmos_feegrant_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_cosmos_feegrant_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgGrantAllowance)(nil), // 0: cosmos.feegrant.v1beta1.MsgGrantAllowance (*MsgGrantAllowanceResponse)(nil), // 1: cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse @@ -2897,21 +3850,27 @@ var file_cosmos_feegrant_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgRevokeAllowanceResponse)(nil), // 3: cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse (*MsgPruneAllowances)(nil), // 4: cosmos.feegrant.v1beta1.MsgPruneAllowances (*MsgPruneAllowancesResponse)(nil), // 5: cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse - (*anypb.Any)(nil), // 6: google.protobuf.Any + (*MsgUpdateParams)(nil), // 6: cosmos.feegrant.v1beta1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 7: cosmos.feegrant.v1beta1.MsgUpdateParamsResponse + (*anypb.Any)(nil), // 8: google.protobuf.Any + (*Params)(nil), // 9: cosmos.feegrant.v1beta1.Params } var file_cosmos_feegrant_v1beta1_tx_proto_depIdxs = []int32{ - 6, // 0: cosmos.feegrant.v1beta1.MsgGrantAllowance.allowance:type_name -> google.protobuf.Any - 0, // 1: cosmos.feegrant.v1beta1.Msg.GrantAllowance:input_type -> cosmos.feegrant.v1beta1.MsgGrantAllowance - 2, // 2: cosmos.feegrant.v1beta1.Msg.RevokeAllowance:input_type -> cosmos.feegrant.v1beta1.MsgRevokeAllowance - 4, // 3: cosmos.feegrant.v1beta1.Msg.PruneAllowances:input_type -> cosmos.feegrant.v1beta1.MsgPruneAllowances - 1, // 4: cosmos.feegrant.v1beta1.Msg.GrantAllowance:output_type -> cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse - 3, // 5: cosmos.feegrant.v1beta1.Msg.RevokeAllowance:output_type -> cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse - 5, // 6: cosmos.feegrant.v1beta1.Msg.PruneAllowances:output_type -> cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse - 4, // [4:7] is the sub-list for method output_type - 1, // [1:4] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 8, // 0: cosmos.feegrant.v1beta1.MsgGrantAllowance.allowance:type_name -> google.protobuf.Any + 9, // 1: cosmos.feegrant.v1beta1.MsgUpdateParams.params:type_name -> cosmos.feegrant.v1beta1.Params + 0, // 2: cosmos.feegrant.v1beta1.Msg.GrantAllowance:input_type -> cosmos.feegrant.v1beta1.MsgGrantAllowance + 2, // 3: cosmos.feegrant.v1beta1.Msg.RevokeAllowance:input_type -> cosmos.feegrant.v1beta1.MsgRevokeAllowance + 4, // 4: cosmos.feegrant.v1beta1.Msg.PruneAllowances:input_type -> cosmos.feegrant.v1beta1.MsgPruneAllowances + 6, // 5: cosmos.feegrant.v1beta1.Msg.UpdateParams:input_type -> cosmos.feegrant.v1beta1.MsgUpdateParams + 1, // 6: cosmos.feegrant.v1beta1.Msg.GrantAllowance:output_type -> cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse + 3, // 7: cosmos.feegrant.v1beta1.Msg.RevokeAllowance:output_type -> cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse + 5, // 8: cosmos.feegrant.v1beta1.Msg.PruneAllowances:output_type -> cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse + 7, // 9: cosmos.feegrant.v1beta1.Msg.UpdateParams:output_type -> cosmos.feegrant.v1beta1.MsgUpdateParamsResponse + 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 } func init() { file_cosmos_feegrant_v1beta1_tx_proto_init() } @@ -2919,6 +3878,7 @@ func file_cosmos_feegrant_v1beta1_tx_proto_init() { if File_cosmos_feegrant_v1beta1_tx_proto != nil { return } + file_cosmos_feegrant_v1beta1_feegrant_proto_init() if !protoimpl.UnsafeEnabled { file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgGrantAllowance); i { @@ -2992,6 +3952,30 @@ func file_cosmos_feegrant_v1beta1_tx_proto_init() { return nil } } + file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2999,7 +3983,7 @@ func file_cosmos_feegrant_v1beta1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_feegrant_v1beta1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go b/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go index 1bfb94127da1..9b1a73555429 100644 --- a/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go +++ b/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go @@ -24,6 +24,7 @@ const ( Msg_GrantAllowance_FullMethodName = "/cosmos.feegrant.v1beta1.Msg/GrantAllowance" Msg_RevokeAllowance_FullMethodName = "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance" Msg_PruneAllowances_FullMethodName = "/cosmos.feegrant.v1beta1.Msg/PruneAllowances" + Msg_UpdateParams_FullMethodName = "/cosmos.feegrant.v1beta1.Msg/UpdateParams" ) // MsgClient is the client API for Msg service. @@ -38,6 +39,8 @@ type MsgClient interface { RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, error) // PruneAllowances prunes expired fee allowances. PruneAllowances(ctx context.Context, in *MsgPruneAllowances, opts ...grpc.CallOption) (*MsgPruneAllowancesResponse, error) + // UpdateParams updates the parameters of the feegrant module. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } type msgClient struct { @@ -75,6 +78,15 @@ func (c *msgClient) PruneAllowances(ctx context.Context, in *MsgPruneAllowances, return out, nil } +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -87,6 +99,8 @@ type MsgServer interface { RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) // PruneAllowances prunes expired fee allowances. PruneAllowances(context.Context, *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) + // UpdateParams updates the parameters of the feegrant module. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) mustEmbedUnimplementedMsgServer() } @@ -103,6 +117,9 @@ func (UnimplementedMsgServer) RevokeAllowance(context.Context, *MsgRevokeAllowan func (UnimplementedMsgServer) PruneAllowances(context.Context, *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PruneAllowances not implemented") } +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -170,6 +187,24 @@ func _Msg_PruneAllowances_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -189,6 +224,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "PruneAllowances", Handler: _Msg_PruneAllowances_Handler, }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/feegrant/v1beta1/tx.proto", diff --git a/proto/cosmos/feegrant/module/v1/module.proto b/proto/cosmos/feegrant/module/v1/module.proto index c5d6c24e07c5..b9f1260463df 100644 --- a/proto/cosmos/feegrant/module/v1/module.proto +++ b/proto/cosmos/feegrant/module/v1/module.proto @@ -9,4 +9,7 @@ message Module { option (cosmos.app.v1alpha1.module) = { go_import: "cosmossdk.io/x/feegrant" }; + + // authority defines the custom module authority. If not set, defaults to the governance module. + string authority = 1; } \ No newline at end of file diff --git a/proto/cosmos/feegrant/v1beta1/feegrant.proto b/proto/cosmos/feegrant/v1beta1/feegrant.proto index a1c67eafbd15..b836327a9b79 100644 --- a/proto/cosmos/feegrant/v1beta1/feegrant.proto +++ b/proto/cosmos/feegrant/v1beta1/feegrant.proto @@ -94,3 +94,12 @@ message Grant { // allowance can be any of basic, periodic, allowed fee allowance. google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "cosmos.feegrant.v1beta1.FeeAllowanceI"]; } + +// Params defines the parameters for the x/feegrant module. +message Params { + // amount of expired grants to prune at endblock + uint64 endblock_prunes = 1; + + // amount of expired grants to prune using MsgPruneAllowances + uint64 manual_prunes = 2; +} \ No newline at end of file diff --git a/proto/cosmos/feegrant/v1beta1/genesis.proto b/proto/cosmos/feegrant/v1beta1/genesis.proto index ac7e57e1e44a..4b632da089fc 100644 --- a/proto/cosmos/feegrant/v1beta1/genesis.proto +++ b/proto/cosmos/feegrant/v1beta1/genesis.proto @@ -11,4 +11,5 @@ option go_package = "cosmossdk.io/x/feegrant"; // GenesisState contains a set of fee allowances, persisted from the store message GenesisState { repeated Grant allowances = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } diff --git a/proto/cosmos/feegrant/v1beta1/tx.proto b/proto/cosmos/feegrant/v1beta1/tx.proto index d71dac092491..fcb1058dc54e 100644 --- a/proto/cosmos/feegrant/v1beta1/tx.proto +++ b/proto/cosmos/feegrant/v1beta1/tx.proto @@ -2,10 +2,12 @@ syntax = "proto3"; package cosmos.feegrant.v1beta1; +import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/msg/v1/msg.proto"; import "amino/amino.proto"; +import "cosmos/feegrant/v1beta1/feegrant.proto"; option go_package = "cosmossdk.io/x/feegrant"; @@ -23,6 +25,9 @@ service Msg { // PruneAllowances prunes expired fee allowances. rpc PruneAllowances(MsgPruneAllowances) returns (MsgPruneAllowancesResponse); + + // UpdateParams updates the parameters of the feegrant module. + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); } // MsgGrantAllowance adds permission for Grantee to spend up to Allowance @@ -68,4 +73,20 @@ message MsgPruneAllowances { } // MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. -message MsgPruneAllowancesResponse {} \ No newline at end of file +message MsgPruneAllowancesResponse {} + +// MsgUpdateParams is the Msg/UpdateParams request type. +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the x/feegrant parameters to update. + // + // NOTE: All parameters must be supplied. + Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// MsgUpdateParamsResponse defines the response structure of the UpdateParams. +message MsgUpdateParamsResponse {} diff --git a/x/feegrant/feegrant.pb.go b/x/feegrant/feegrant.pb.go index b30f725c8a7f..3603a427bcb5 100644 --- a/x/feegrant/feegrant.pb.go +++ b/x/feegrant/feegrant.pb.go @@ -283,11 +283,67 @@ func (m *Grant) GetAllowance() *types1.Any { return nil } +// Params defines the parameters for the x/feegrant module. +type Params struct { + // amount of expired grants to prune at endblock + EndblockPrunes uint64 `protobuf:"varint,1,opt,name=endblock_prunes,json=endblockPrunes,proto3" json:"endblock_prunes,omitempty"` + // amount of expired grants to prune using MsgPruneAllowances + ManualPrunes uint64 `protobuf:"varint,2,opt,name=manual_prunes,json=manualPrunes,proto3" json:"manual_prunes,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_7279582900c30aea, []int{4} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetEndblockPrunes() uint64 { + if m != nil { + return m.EndblockPrunes + } + return 0 +} + +func (m *Params) GetManualPrunes() uint64 { + if m != nil { + return m.ManualPrunes + } + return 0 +} + func init() { proto.RegisterType((*BasicAllowance)(nil), "cosmos.feegrant.v1beta1.BasicAllowance") proto.RegisterType((*PeriodicAllowance)(nil), "cosmos.feegrant.v1beta1.PeriodicAllowance") proto.RegisterType((*AllowedMsgAllowance)(nil), "cosmos.feegrant.v1beta1.AllowedMsgAllowance") proto.RegisterType((*Grant)(nil), "cosmos.feegrant.v1beta1.Grant") + proto.RegisterType((*Params)(nil), "cosmos.feegrant.v1beta1.Params") } func init() { @@ -295,49 +351,52 @@ func init() { } var fileDescriptor_7279582900c30aea = []byte{ - // 658 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x4f, 0xd4, 0x4e, - 0x14, 0xdf, 0x61, 0x81, 0x6f, 0x76, 0x96, 0x2f, 0x42, 0x25, 0xb1, 0x4b, 0x4c, 0x4b, 0x36, 0x51, - 0x17, 0x12, 0xda, 0x80, 0x37, 0x4e, 0x50, 0x0c, 0xa8, 0x81, 0x84, 0x14, 0x4f, 0x26, 0xa6, 0x99, - 0xb6, 0x43, 0x9d, 0xb0, 0xed, 0x34, 0x9d, 0xa2, 0xec, 0xd5, 0x93, 0xd1, 0x83, 0x1c, 0x8d, 0x27, - 0x8e, 0xc6, 0x13, 0x07, 0xfe, 0x08, 0xe2, 0xc1, 0x10, 0x4f, 0x7a, 0x11, 0x03, 0x07, 0xce, 0xfe, - 0x07, 0xa6, 0x33, 0xd3, 0x6e, 0x61, 0x25, 0x42, 0x62, 0xb8, 0xec, 0x76, 0xde, 0xbc, 0xf7, 0xf9, - 0xf1, 0xde, 0x6b, 0x0a, 0xef, 0x7a, 0x94, 0x85, 0x94, 0x99, 0x1b, 0x18, 0x07, 0x09, 0x8a, 0x52, - 0xf3, 0xc5, 0x8c, 0x8b, 0x53, 0x34, 0x53, 0x04, 0x8c, 0x38, 0xa1, 0x29, 0x55, 0x6e, 0x89, 0x3c, - 0xa3, 0x08, 0xcb, 0xbc, 0xf1, 0xb1, 0x80, 0x06, 0x94, 0xe7, 0x98, 0xd9, 0x93, 0x48, 0x1f, 0x6f, - 0x04, 0x94, 0x06, 0x6d, 0x6c, 0xf2, 0x93, 0xbb, 0xb5, 0x61, 0xa2, 0xa8, 0x93, 0x5f, 0x09, 0x24, - 0x47, 0xd4, 0x48, 0x58, 0x71, 0xa5, 0x49, 0x31, 0x2e, 0x62, 0xb8, 0x10, 0xe2, 0x51, 0x12, 0xc9, - 0xfb, 0x51, 0x14, 0x92, 0x88, 0x9a, 0xfc, 0x57, 0x86, 0xf4, 0xf3, 0x44, 0x29, 0x09, 0x31, 0x4b, - 0x51, 0x18, 0xe7, 0x98, 0xe7, 0x13, 0xfc, 0xad, 0x04, 0xa5, 0x84, 0x4a, 0xcc, 0xe6, 0x6e, 0x1f, - 0x1c, 0xb6, 0x10, 0x23, 0xde, 0x42, 0xbb, 0x4d, 0x5f, 0xa2, 0xc8, 0xc3, 0xca, 0x2b, 0x00, 0xeb, - 0x2c, 0xc6, 0x91, 0xef, 0xb4, 0x49, 0x48, 0x52, 0x15, 0x4c, 0x54, 0x5b, 0xf5, 0xd9, 0x86, 0x21, - 0xb5, 0x66, 0xea, 0x72, 0xfb, 0xc6, 0x22, 0x25, 0x91, 0xb5, 0x74, 0xf0, 0x43, 0xaf, 0x7c, 0x3a, - 0xd2, 0x5b, 0x01, 0x49, 0x9f, 0x6f, 0xb9, 0x86, 0x47, 0x43, 0x69, 0x4c, 0xfe, 0x4d, 0x33, 0x7f, - 0xd3, 0x4c, 0x3b, 0x31, 0x66, 0xbc, 0x80, 0x7d, 0x38, 0xdd, 0x9b, 0x1a, 0x6a, 0xe3, 0x00, 0x79, - 0x1d, 0x27, 0xf3, 0xc7, 0x3e, 0x9e, 0xee, 0x4d, 0x01, 0x1b, 0x72, 0xd6, 0x95, 0x8c, 0x54, 0x99, - 0x87, 0x10, 0x6f, 0xc7, 0x44, 0x68, 0x55, 0xfb, 0x26, 0x40, 0xab, 0x3e, 0x3b, 0x6e, 0x08, 0x33, - 0x46, 0x6e, 0xc6, 0x78, 0x92, 0xbb, 0xb5, 0xfa, 0x77, 0x8e, 0x74, 0x60, 0x97, 0x6a, 0xe6, 0x96, - 0x3f, 0xef, 0x4f, 0xdf, 0xb9, 0x60, 0x6c, 0xc6, 0x12, 0xc6, 0x85, 0xe1, 0x47, 0x6f, 0x4e, 0xf7, - 0xa6, 0x1a, 0x25, 0xa5, 0x67, 0xfb, 0xd1, 0xfc, 0xde, 0x0f, 0x47, 0xd7, 0x70, 0x42, 0xa8, 0x5f, - 0xee, 0xd2, 0x43, 0x38, 0xe0, 0x66, 0x79, 0x2a, 0xe0, 0xda, 0xee, 0x19, 0x17, 0x51, 0x9d, 0x45, - 0xb3, 0x6a, 0x59, 0xb3, 0x84, 0x5f, 0x01, 0xa0, 0xcc, 0xc3, 0xc1, 0x98, 0xc3, 0x4b, 0x9b, 0x8d, - 0x1e, 0x9b, 0x0f, 0xe4, 0xcc, 0xac, 0xff, 0xb3, 0xe2, 0xf7, 0x47, 0x3a, 0x10, 0x00, 0xb2, 0x4e, - 0x79, 0x07, 0xa0, 0x22, 0x1e, 0x9d, 0xf2, 0xe0, 0xaa, 0xd7, 0x35, 0xb8, 0x11, 0x41, 0xbe, 0xde, - 0x1d, 0xdf, 0x5b, 0x00, 0x65, 0xd0, 0xf1, 0x50, 0x24, 0x54, 0xa9, 0xfd, 0xd7, 0xa5, 0x67, 0x58, - 0x50, 0x2f, 0xa2, 0x88, 0x4b, 0x52, 0x56, 0xe0, 0x90, 0x14, 0x93, 0x60, 0x86, 0x53, 0x75, 0xe0, - 0xaf, 0xeb, 0xc4, 0x1b, 0xbd, 0x53, 0x34, 0xba, 0x2e, 0xca, 0xed, 0xac, 0x7a, 0xee, 0xf1, 0x95, - 0x16, 0xeb, 0x76, 0x49, 0x79, 0xcf, 0x16, 0x35, 0x7f, 0x01, 0x78, 0x93, 0x9f, 0xb0, 0xbf, 0xca, - 0x82, 0xee, 0x76, 0x3d, 0x83, 0x35, 0x94, 0x1f, 0xe4, 0x86, 0x8d, 0xf5, 0xc8, 0x5d, 0x88, 0x3a, - 0xd6, 0xe4, 0xa5, 0xc5, 0xd8, 0x5d, 0x44, 0x65, 0x12, 0x8e, 0x20, 0xc1, 0xea, 0x84, 0x98, 0x31, - 0x14, 0x60, 0xa6, 0xf6, 0x4d, 0x54, 0x5b, 0x35, 0xfb, 0x86, 0x8c, 0xaf, 0xca, 0xf0, 0xdc, 0xda, - 0xeb, 0x5d, 0xbd, 0x72, 0x25, 0xc7, 0x5a, 0xc9, 0xf1, 0x1f, 0xbc, 0x35, 0xbf, 0x00, 0x38, 0xb0, - 0x9c, 0x41, 0x28, 0xb3, 0xf0, 0x3f, 0x8e, 0x85, 0x13, 0xee, 0xb1, 0x66, 0xa9, 0x5f, 0xf7, 0xa7, - 0xc7, 0x24, 0xd1, 0x82, 0xef, 0x27, 0x98, 0xb1, 0xf5, 0x34, 0x21, 0x51, 0x60, 0xe7, 0x89, 0xdd, - 0x1a, 0xcc, 0x5f, 0x97, 0x4b, 0xd4, 0x9c, 0xeb, 0x66, 0xf5, 0x5f, 0x77, 0xd3, 0x9a, 0x39, 0x38, - 0xd6, 0xc0, 0xe1, 0xb1, 0x06, 0x7e, 0x1e, 0x6b, 0x60, 0xe7, 0x44, 0xab, 0x1c, 0x9e, 0x68, 0x95, - 0x6f, 0x27, 0x5a, 0xe5, 0xa9, 0xfc, 0x6c, 0x30, 0x7f, 0xd3, 0x20, 0xd4, 0xdc, 0x2e, 0xbe, 0x2a, - 0xee, 0x20, 0xa7, 0xbd, 0xff, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x0d, 0x76, 0xbd, 0x15, 0x80, 0x06, - 0x00, 0x00, + // 707 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x4f, 0xd4, 0x40, + 0x14, 0xde, 0xd9, 0x5d, 0x30, 0x3b, 0xcb, 0xcf, 0x4a, 0xe2, 0x2e, 0x31, 0x5d, 0xb2, 0x46, 0x59, + 0x48, 0x68, 0x03, 0xde, 0x38, 0x41, 0x31, 0xa0, 0x06, 0x92, 0x4d, 0x31, 0x1e, 0x4c, 0x4c, 0x33, + 0x6d, 0x87, 0xda, 0xd0, 0xce, 0x34, 0x9d, 0xae, 0xb2, 0x57, 0x4f, 0x46, 0x0f, 0x72, 0x34, 0x9e, + 0x38, 0x1a, 0x4f, 0x1c, 0xf8, 0x23, 0x88, 0x07, 0x43, 0x3c, 0xe9, 0x45, 0x0c, 0x1c, 0x38, 0xfb, + 0x1f, 0x98, 0xce, 0x4c, 0x77, 0x17, 0x90, 0x08, 0x89, 0xe1, 0xb2, 0xdb, 0x79, 0xf3, 0xbd, 0xef, + 0x7d, 0xdf, 0x7b, 0xaf, 0x29, 0xbc, 0xe7, 0x50, 0x16, 0x52, 0xa6, 0x6f, 0x60, 0xec, 0xc5, 0x88, + 0x24, 0xfa, 0xcb, 0x59, 0x1b, 0x27, 0x68, 0xb6, 0x13, 0xd0, 0xa2, 0x98, 0x26, 0x54, 0xb9, 0x25, + 0x70, 0x5a, 0x27, 0x2c, 0x71, 0xe3, 0x63, 0x1e, 0xf5, 0x28, 0xc7, 0xe8, 0xe9, 0x93, 0x80, 0x8f, + 0x57, 0x3d, 0x4a, 0xbd, 0x00, 0xeb, 0xfc, 0x64, 0xb7, 0x36, 0x74, 0x44, 0xda, 0xd9, 0x95, 0x60, + 0xb2, 0x44, 0x8e, 0xa4, 0x15, 0x57, 0xaa, 0x14, 0x63, 0x23, 0x86, 0x3b, 0x42, 0x1c, 0xea, 0x13, + 0x79, 0x3f, 0x8a, 0x42, 0x9f, 0x50, 0x9d, 0xff, 0xca, 0x50, 0xed, 0x6c, 0xa1, 0xc4, 0x0f, 0x31, + 0x4b, 0x50, 0x18, 0x65, 0x9c, 0x67, 0x01, 0x6e, 0x2b, 0x46, 0x89, 0x4f, 0x25, 0x67, 0x7d, 0x27, + 0x0f, 0x87, 0x0c, 0xc4, 0x7c, 0x67, 0x31, 0x08, 0xe8, 0x2b, 0x44, 0x1c, 0xac, 0xbc, 0x06, 0xb0, + 0xcc, 0x22, 0x4c, 0x5c, 0x2b, 0xf0, 0x43, 0x3f, 0xa9, 0x80, 0x89, 0x42, 0xa3, 0x3c, 0x57, 0xd5, + 0xa4, 0xd6, 0x54, 0x5d, 0x66, 0x5f, 0x5b, 0xa2, 0x3e, 0x31, 0x96, 0xf7, 0x7f, 0xd6, 0x72, 0x9f, + 0x0f, 0x6b, 0x0d, 0xcf, 0x4f, 0x5e, 0xb4, 0x6c, 0xcd, 0xa1, 0xa1, 0x34, 0x26, 0xff, 0x66, 0x98, + 0xbb, 0xa9, 0x27, 0xed, 0x08, 0x33, 0x9e, 0xc0, 0x3e, 0x9e, 0xec, 0x4e, 0x0f, 0x04, 0xd8, 0x43, + 0x4e, 0xdb, 0x4a, 0xfd, 0xb1, 0x4f, 0x27, 0xbb, 0xd3, 0xc0, 0x84, 0xbc, 0xea, 0x6a, 0x5a, 0x54, + 0x59, 0x80, 0x10, 0x6f, 0x45, 0xbe, 0xd0, 0x5a, 0xc9, 0x4f, 0x80, 0x46, 0x79, 0x6e, 0x5c, 0x13, + 0x66, 0xb4, 0xcc, 0x8c, 0xf6, 0x24, 0x73, 0x6b, 0x14, 0xb7, 0x0f, 0x6b, 0xc0, 0xec, 0xc9, 0x99, + 0x5f, 0xf9, 0xb2, 0x37, 0x73, 0xf7, 0x82, 0xb1, 0x69, 0xcb, 0x18, 0x77, 0x0c, 0x3f, 0x7a, 0x7b, + 0xb2, 0x3b, 0x5d, 0xed, 0x51, 0x7a, 0xba, 0x1f, 0xf5, 0x1f, 0x45, 0x38, 0xda, 0xc4, 0xb1, 0x4f, + 0xdd, 0xde, 0x2e, 0x3d, 0x84, 0x7d, 0x76, 0x8a, 0xab, 0x00, 0xae, 0x6d, 0x52, 0xbb, 0xa8, 0xd4, + 0x69, 0x36, 0xa3, 0x94, 0x36, 0x4b, 0xf8, 0x15, 0x04, 0xca, 0x02, 0xec, 0x8f, 0x38, 0xbd, 0xb4, + 0x59, 0x3d, 0x67, 0xf3, 0x81, 0x9c, 0x99, 0x31, 0x98, 0x26, 0x7f, 0x38, 0xac, 0x01, 0x41, 0x20, + 0xf3, 0x94, 0xf7, 0x00, 0x2a, 0xe2, 0xd1, 0xea, 0x1d, 0x5c, 0xe1, 0xba, 0x06, 0x37, 0x22, 0x8a, + 0xaf, 0x77, 0xc7, 0xf7, 0x0e, 0x40, 0x19, 0xb4, 0x1c, 0x44, 0x84, 0xaa, 0x4a, 0xf1, 0xba, 0xf4, + 0x0c, 0x89, 0xd2, 0x4b, 0x88, 0x70, 0x49, 0xca, 0x2a, 0x1c, 0x90, 0x62, 0x62, 0xcc, 0x70, 0x52, + 0xe9, 0xfb, 0xe7, 0x3a, 0xf1, 0x46, 0x6f, 0x77, 0x1a, 0x5d, 0x16, 0xe9, 0x66, 0x9a, 0x3d, 0xff, + 0xf8, 0x4a, 0x8b, 0x75, 0xbb, 0x47, 0xf9, 0xb9, 0x2d, 0xaa, 0xff, 0x06, 0xf0, 0x26, 0x3f, 0x61, + 0x77, 0x8d, 0x79, 0xdd, 0xed, 0x7a, 0x0e, 0x4b, 0x28, 0x3b, 0xc8, 0x0d, 0x1b, 0x3b, 0x27, 0x77, + 0x91, 0xb4, 0x8d, 0xa9, 0x4b, 0x8b, 0x31, 0xbb, 0x8c, 0xca, 0x14, 0x1c, 0x41, 0xa2, 0xaa, 0x15, + 0x62, 0xc6, 0x90, 0x87, 0x59, 0x25, 0x3f, 0x51, 0x68, 0x94, 0xcc, 0x61, 0x19, 0x5f, 0x93, 0xe1, + 0xf9, 0xe6, 0x9b, 0x9d, 0x5a, 0xee, 0x4a, 0x8e, 0xd5, 0x1e, 0xc7, 0x7f, 0xf1, 0x56, 0xff, 0x0a, + 0x60, 0xdf, 0x4a, 0x4a, 0xa1, 0xcc, 0xc1, 0x1b, 0x9c, 0x0b, 0xc7, 0xdc, 0x63, 0xc9, 0xa8, 0x7c, + 0xdb, 0x9b, 0x19, 0x93, 0x85, 0x16, 0x5d, 0x37, 0xc6, 0x8c, 0xad, 0x27, 0xb1, 0x4f, 0x3c, 0x33, + 0x03, 0x76, 0x73, 0x30, 0x7f, 0x5d, 0x2e, 0x91, 0x73, 0xa6, 0x9b, 0x85, 0xff, 0xdd, 0xcd, 0xfa, + 0x53, 0xd8, 0xdf, 0x44, 0x31, 0x0a, 0x99, 0x32, 0x09, 0x87, 0x31, 0x71, 0xed, 0x80, 0x3a, 0x9b, + 0x56, 0x14, 0xb7, 0x08, 0x66, 0xdc, 0x58, 0xd1, 0x1c, 0xca, 0xc2, 0x4d, 0x1e, 0x55, 0xee, 0xc0, + 0xc1, 0x10, 0x91, 0x16, 0x0a, 0x32, 0x58, 0x9e, 0xc3, 0x06, 0x44, 0x50, 0x80, 0x8c, 0xd9, 0xfd, + 0x23, 0x15, 0x1c, 0x1c, 0xa9, 0xe0, 0xd7, 0x91, 0x0a, 0xb6, 0x8f, 0xd5, 0xdc, 0xc1, 0xb1, 0x9a, + 0xfb, 0x7e, 0xac, 0xe6, 0x9e, 0xc9, 0xcf, 0x11, 0x73, 0x37, 0x35, 0x9f, 0xea, 0x5b, 0x9d, 0xaf, + 0x95, 0xdd, 0xcf, 0xed, 0xdc, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x30, 0xda, 0xfa, 0xa1, 0xd8, + 0x06, 0x00, 0x00, } func (m *BasicAllowance) Marshal() (dAtA []byte, err error) { @@ -557,6 +616,39 @@ func (m *Grant) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ManualPrunes != 0 { + i = encodeVarintFeegrant(dAtA, i, uint64(m.ManualPrunes)) + i-- + dAtA[i] = 0x10 + } + if m.EndblockPrunes != 0 { + i = encodeVarintFeegrant(dAtA, i, uint64(m.EndblockPrunes)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintFeegrant(dAtA []byte, offset int, v uint64) int { offset -= sovFeegrant(v) base := offset @@ -654,6 +746,21 @@ func (m *Grant) Size() (n int) { return n } +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EndblockPrunes != 0 { + n += 1 + sovFeegrant(uint64(m.EndblockPrunes)) + } + if m.ManualPrunes != 0 { + n += 1 + sovFeegrant(uint64(m.ManualPrunes)) + } + return n +} + func sovFeegrant(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1265,6 +1372,94 @@ func (m *Grant) Unmarshal(dAtA []byte) error { } return nil } +func (m *Params) 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 ErrIntOverflowFeegrant + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EndblockPrunes", wireType) + } + m.EndblockPrunes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EndblockPrunes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ManualPrunes", wireType) + } + m.ManualPrunes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ManualPrunes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipFeegrant(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFeegrant + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipFeegrant(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/feegrant/genesis.go b/x/feegrant/genesis.go index 83b29baeb85d..749053dadff6 100644 --- a/x/feegrant/genesis.go +++ b/x/feegrant/genesis.go @@ -1,6 +1,8 @@ package feegrant import ( + "errors" + "github.com/cosmos/cosmos-sdk/codec/types" ) @@ -25,12 +27,19 @@ func ValidateGenesis(data GenesisState) error { return err } } + + if data.Params.EndblockPrunes == 0 || data.Params.ManualPrunes == 0 { + return errors.New("invalid prune params") + } + return nil } // DefaultGenesisState returns default state for feegrant module. func DefaultGenesisState() *GenesisState { - return &GenesisState{} + return &GenesisState{ + Params: DefaultParams(), + } } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces @@ -44,3 +53,10 @@ func (data GenesisState) UnpackInterfaces(unpacker types.AnyUnpacker) error { return nil } + +func DefaultParams() Params { + return Params{ + EndblockPrunes: 50, + ManualPrunes: 5, + } +} diff --git a/x/feegrant/genesis.pb.go b/x/feegrant/genesis.pb.go index bb56184a4751..7ef4fd1224d6 100644 --- a/x/feegrant/genesis.pb.go +++ b/x/feegrant/genesis.pb.go @@ -27,6 +27,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState contains a set of fee allowances, persisted from the store type GenesisState struct { Allowances []Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances"` + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -69,6 +70,13 @@ func (m *GenesisState) GetAllowances() []Grant { return nil } +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + func init() { proto.RegisterType((*GenesisState)(nil), "cosmos.feegrant.v1beta1.GenesisState") } @@ -78,20 +86,22 @@ func init() { } var fileDescriptor_ac719d2d0954d1bf = []byte{ - // 207 bytes of a gzipped FileDescriptorProto + // 236 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x4b, 0x4d, 0x4d, 0x2f, 0x4a, 0xcc, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x87, 0x28, 0xd3, 0x83, 0x29, 0xd3, 0x83, 0x2a, 0x93, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0xa5, 0xd4, 0x70, 0x99, 0x0a, 0xd7, 0x0f, 0x51, - 0x27, 0x98, 0x98, 0x9b, 0x99, 0x97, 0xaf, 0x0f, 0x26, 0x21, 0x42, 0x4a, 0x91, 0x5c, 0x3c, 0xee, - 0x10, 0xab, 0x83, 0x4b, 0x12, 0x4b, 0x52, 0x85, 0x3c, 0xb9, 0xb8, 0x12, 0x73, 0x72, 0xf2, 0xcb, - 0x13, 0xf3, 0x92, 0x53, 0x8b, 0x25, 0x18, 0x15, 0x98, 0x35, 0xb8, 0x8d, 0xe4, 0xf4, 0x70, 0x38, - 0x47, 0xcf, 0x1d, 0xc4, 0x73, 0xe2, 0x3c, 0x71, 0x4f, 0x9e, 0x61, 0xc5, 0xf3, 0x0d, 0x5a, 0x8c, - 0x41, 0x48, 0x9a, 0x9d, 0x0c, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, - 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x0a, - 0xea, 0xbd, 0xe2, 0x94, 0x6c, 0xbd, 0xcc, 0x7c, 0xfd, 0x0a, 0xb8, 0x33, 0x93, 0xd8, 0xc0, 0x8e, - 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x32, 0xdb, 0x7e, 0x13, 0x27, 0x01, 0x00, 0x00, + 0x27, 0x98, 0x98, 0x9b, 0x99, 0x97, 0xaf, 0x0f, 0x26, 0x21, 0x42, 0x4a, 0x73, 0x19, 0xb9, 0x78, + 0xdc, 0x21, 0x76, 0x07, 0x97, 0x24, 0x96, 0xa4, 0x0a, 0x79, 0x72, 0x71, 0x25, 0xe6, 0xe4, 0xe4, + 0x97, 0x27, 0xe6, 0x25, 0xa7, 0x16, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x1b, 0xc9, 0xe9, 0xe1, + 0x70, 0x8f, 0x9e, 0x3b, 0x88, 0xe7, 0xc4, 0x79, 0xe2, 0x9e, 0x3c, 0xc3, 0x8a, 0xe7, 0x1b, 0xb4, + 0x18, 0x83, 0x90, 0x34, 0x0b, 0x39, 0x71, 0xb1, 0x15, 0x24, 0x16, 0x25, 0xe6, 0x16, 0x4b, 0x30, + 0x29, 0x30, 0x6a, 0x70, 0x1b, 0xc9, 0xe3, 0x34, 0x26, 0x00, 0xac, 0x0c, 0xd9, 0x1c, 0xa8, 0x4e, + 0x27, 0xc3, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, + 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x82, 0x86, 0x51, 0x71, + 0x4a, 0xb6, 0x5e, 0x66, 0xbe, 0x7e, 0x05, 0xdc, 0xaf, 0x49, 0x6c, 0x60, 0x9f, 0x19, 0x03, 0x02, + 0x00, 0x00, 0xff, 0xff, 0x13, 0xe3, 0x7b, 0x0a, 0x6c, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -114,6 +124,16 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 if len(m.Allowances) > 0 { for iNdEx := len(m.Allowances) - 1; iNdEx >= 0; iNdEx-- { { @@ -154,6 +174,8 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) return n } @@ -226,6 +248,39 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index cb08125aa944..c893b257be21 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -158,3 +158,4 @@ require ( ) replace github.com/cosmos/cosmos-sdk => ../../. +replace cosmossdk.io/api => ../../api diff --git a/x/feegrant/keeper/keeper.go b/x/feegrant/keeper/keeper.go index 1bb0c9dd264f..5110f3a7639e 100644 --- a/x/feegrant/keeper/keeper.go +++ b/x/feegrant/keeper/keeper.go @@ -25,23 +25,26 @@ type Keeper struct { cdc codec.BinaryCodec storeService store.KVStoreService authKeeper feegrant.AccountKeeper + authority string Schema collections.Schema // FeeAllowance key: grantee+granter | value: Grant FeeAllowance collections.Map[collections.Pair[sdk.AccAddress, sdk.AccAddress], feegrant.Grant] // FeeAllowanceQueue key: expiration time+grantee+granter | value: bool FeeAllowanceQueue collections.Map[collections.Triple[time.Time, sdk.AccAddress, sdk.AccAddress], bool] + Params collections.Item[feegrant.Params] } var _ ante.FeegrantKeeper = &Keeper{} // NewKeeper creates a feegrant Keeper -func NewKeeper(cdc codec.BinaryCodec, storeService store.KVStoreService, ak feegrant.AccountKeeper) Keeper { +func NewKeeper(cdc codec.BinaryCodec, storeService store.KVStoreService, ak feegrant.AccountKeeper, authority string) Keeper { sb := collections.NewSchemaBuilder(storeService) return Keeper{ cdc: cdc, storeService: storeService, authKeeper: ak, + authority: authority, FeeAllowance: collections.NewMap( sb, feegrant.FeeAllowanceKeyPrefix, @@ -56,6 +59,7 @@ func NewKeeper(cdc codec.BinaryCodec, storeService store.KVStoreService, ak feeg collections.TripleKeyCodec(sdk.TimeKey, sdk.LengthPrefixedAddressKey(sdk.AccAddressKey), sdk.LengthPrefixedAddressKey(sdk.AccAddressKey)), //nolint: staticcheck // sdk.LengthPrefixedAddressKey is needed to retain state compatibility collections.BoolValue, ), + Params: collections.NewItem(sb, feegrant.ParamsKey, "params", codec.CollValue[feegrant.Params](cdc)), } } @@ -301,7 +305,8 @@ func (k Keeper) InitGenesis(ctx context.Context, data *feegrant.GenesisState) er return err } } - return nil + + return k.Params.Set(ctx, data.Params) } // ExportGenesis will dump the contents of the keeper into a serializable GenesisState. diff --git a/x/feegrant/keeper/msg_server.go b/x/feegrant/keeper/msg_server.go index 2c6de7b9e160..19ad957fe8a9 100644 --- a/x/feegrant/keeper/msg_server.go +++ b/x/feegrant/keeper/msg_server.go @@ -4,11 +4,13 @@ import ( "context" "strings" + "cosmossdk.io/errors" errorsmod "cosmossdk.io/errors" "cosmossdk.io/x/feegrant" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/bank/types" ) type msgServer struct { @@ -103,3 +105,20 @@ func (k msgServer) PruneAllowances(ctx context.Context, req *feegrant.MsgPruneAl return &feegrant.MsgPruneAllowancesResponse{}, nil } + +// UpdateParams updates the params. +func (k msgServer) UpdateParams(ctx context.Context, msg *feegrant.MsgUpdateParams) (*feegrant.MsgUpdateParamsResponse, error) { + if k.authority != msg.Authority { + return nil, errors.Wrapf(types.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.authority, msg.Authority) + } + + if msg.Params.EndblockPrunes == 0 || msg.Params.ManualPrunes == 0 { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid prune params") + } + + if err := k.Params.Set(ctx, msg.Params); err != nil { + return nil, err + } + + return &feegrant.MsgUpdateParamsResponse{}, nil +} diff --git a/x/feegrant/key.go b/x/feegrant/key.go index 837435128c73..fa6c23ea2d63 100644 --- a/x/feegrant/key.go +++ b/x/feegrant/key.go @@ -26,4 +26,6 @@ var ( // FeeAllowanceQueueKeyPrefix is the set of the kvstore for fee allowance keys data // - 0x01: FeeAllowanceQueueKeyPrefix = collections.NewPrefix(1) + + ParamsKey = collections.NewPrefix(2) ) diff --git a/x/feegrant/module/autocli.go b/x/feegrant/module/autocli.go index 60e3232c5844..ac0e724941e1 100644 --- a/x/feegrant/module/autocli.go +++ b/x/feegrant/module/autocli.go @@ -47,6 +47,11 @@ You can find the fee-grant of a granter and grantee.`), {ProtoField: "granter"}, }, }, + { + RpcMethod: "Params", + Use: "params", + Short: "Query the current parameters", + }, }, }, Tx: &autocliv1.ServiceCommandDescriptor{ diff --git a/x/feegrant/module/module.go b/x/feegrant/module/module.go index 63a50d76e39e..c0503961b2a5 100644 --- a/x/feegrant/module/module.go +++ b/x/feegrant/module/module.go @@ -24,6 +24,8 @@ import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/bank/types" ) var ( @@ -178,10 +180,22 @@ type FeegrantInputs struct { AccountKeeper feegrant.AccountKeeper BankKeeper feegrant.BankKeeper Registry cdctypes.InterfaceRegistry + Config *modulev1.Module } func ProvideModule(in FeegrantInputs) (keeper.Keeper, appmodule.AppModule) { - k := keeper.NewKeeper(in.Cdc, in.StoreService, in.AccountKeeper) + // default to governance authority if not provided + authority := authtypes.NewModuleAddress(types.GovModuleName) + if in.Config.Authority != "" { + authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) + } + + as, err := in.AccountKeeper.AddressCodec().BytesToString(authority) + if err != nil { + panic(err) + } + + k := keeper.NewKeeper(in.Cdc, in.StoreService, in.AccountKeeper, as) m := NewAppModule(in.Cdc, in.AccountKeeper, in.BankKeeper, k, in.Registry) return k, m } diff --git a/x/feegrant/tx.pb.go b/x/feegrant/tx.pb.go index 7bc84761b388..da757a9efccb 100644 --- a/x/feegrant/tx.pb.go +++ b/x/feegrant/tx.pb.go @@ -10,6 +10,7 @@ import ( types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" @@ -308,6 +309,100 @@ func (m *MsgPruneAllowancesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgPruneAllowancesResponse proto.InternalMessageInfo +// MsgUpdateParams is the Msg/UpdateParams request type. +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/feegrant parameters to update. + // + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_dd44ad7946dad783, []int{6} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.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 *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure of the UpdateParams. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_dd44ad7946dad783, []int{7} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.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 *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgGrantAllowance)(nil), "cosmos.feegrant.v1beta1.MsgGrantAllowance") proto.RegisterType((*MsgGrantAllowanceResponse)(nil), "cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse") @@ -315,41 +410,50 @@ func init() { proto.RegisterType((*MsgRevokeAllowanceResponse)(nil), "cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse") proto.RegisterType((*MsgPruneAllowances)(nil), "cosmos.feegrant.v1beta1.MsgPruneAllowances") proto.RegisterType((*MsgPruneAllowancesResponse)(nil), "cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "cosmos.feegrant.v1beta1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.feegrant.v1beta1.MsgUpdateParamsResponse") } func init() { proto.RegisterFile("cosmos/feegrant/v1beta1/tx.proto", fileDescriptor_dd44ad7946dad783) } var fileDescriptor_dd44ad7946dad783 = []byte{ - // 455 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, 0x4b, 0x4d, 0x4d, 0x2f, 0x4a, 0xcc, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, - 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x87, 0xa8, - 0xd0, 0x83, 0xa9, 0xd0, 0x83, 0xaa, 0x90, 0x92, 0x4c, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x07, - 0x2b, 0x4b, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0x84, 0xe8, 0x91, 0x92, 0x84, 0xe8, 0x89, 0x07, - 0xf3, 0xf4, 0xa1, 0x06, 0x40, 0xa4, 0xa0, 0xc6, 0xe9, 0xe7, 0x16, 0xa7, 0xeb, 0x97, 0x19, 0x82, - 0x28, 0xa8, 0x84, 0x60, 0x62, 0x6e, 0x66, 0x5e, 0xbe, 0x3e, 0x98, 0x84, 0x08, 0x29, 0x75, 0x32, - 0x71, 0x09, 0xfa, 0x16, 0xa7, 0xbb, 0x83, 0xac, 0x75, 0xcc, 0xc9, 0xc9, 0x2f, 0x4f, 0xcc, 0x4b, - 0x4e, 0x15, 0x32, 0xe2, 0x62, 0x07, 0x3b, 0x24, 0xb5, 0x48, 0x82, 0x51, 0x81, 0x51, 0x83, 0xd3, - 0x49, 0xe2, 0xd2, 0x16, 0x5d, 0x11, 0xa8, 0x25, 0x8e, 0x29, 0x29, 0x45, 0xa9, 0xc5, 0xc5, 0xc1, - 0x25, 0x45, 0x99, 0x79, 0xe9, 0x41, 0x30, 0x85, 0x08, 0x3d, 0xa9, 0x12, 0x4c, 0xc4, 0xe9, 0x49, - 0x15, 0x8a, 0xe5, 0xe2, 0x4c, 0x84, 0x59, 0x2a, 0xc1, 0xac, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa2, - 0x07, 0xf1, 0xb3, 0x1e, 0xcc, 0xcf, 0x7a, 0x8e, 0x79, 0x95, 0x4e, 0x9a, 0xa7, 0xb6, 0xe8, 0xaa, - 0xe2, 0x08, 0x25, 0x3d, 0xb7, 0xd4, 0x54, 0xb8, 0xd3, 0x3d, 0x83, 0x10, 0x26, 0x5a, 0xe9, 0x36, - 0x3d, 0xdf, 0xa0, 0x05, 0x73, 0x60, 0xd7, 0xf3, 0x0d, 0x5a, 0x32, 0x10, 0x23, 0x74, 0x8b, 0x53, - 0xb2, 0xf5, 0x31, 0x7c, 0xad, 0x24, 0xcd, 0x25, 0x89, 0x21, 0x18, 0x94, 0x5a, 0x5c, 0x90, 0x9f, - 0x57, 0x9c, 0xaa, 0xb4, 0x86, 0x91, 0x4b, 0xc8, 0xb7, 0x38, 0x3d, 0x28, 0xb5, 0x2c, 0x3f, 0x3b, - 0x95, 0xee, 0x21, 0x65, 0xa5, 0x87, 0xee, 0x15, 0x59, 0x54, 0xaf, 0xa0, 0xb9, 0x4b, 0x49, 0x86, - 0x4b, 0x0a, 0x53, 0x14, 0xee, 0x99, 0x60, 0xb0, 0x5f, 0x02, 0x8a, 0x4a, 0xf3, 0x10, 0x92, 0xc5, - 0x42, 0x06, 0x5c, 0x6c, 0x05, 0x20, 0x21, 0xc2, 0x5e, 0x81, 0xaa, 0xb3, 0xe2, 0x06, 0xb9, 0x0a, - 0xca, 0x81, 0x5a, 0x89, 0x66, 0x28, 0xcc, 0x4a, 0xa3, 0x17, 0x4c, 0x5c, 0xcc, 0xbe, 0xc5, 0xe9, - 0x42, 0x05, 0x5c, 0x7c, 0x68, 0x89, 0x4d, 0x4b, 0x0f, 0x57, 0xc4, 0x62, 0xc4, 0x86, 0x94, 0x11, - 0xf1, 0x6a, 0x61, 0x36, 0x0b, 0x15, 0x73, 0xf1, 0xa3, 0xc7, 0x9a, 0x36, 0x3e, 0x63, 0xd0, 0x14, - 0x4b, 0x19, 0x93, 0xa0, 0x18, 0xd9, 0x52, 0xf4, 0xe0, 0xc5, 0x6b, 0x29, 0x9a, 0x62, 0xfc, 0x96, - 0xe2, 0x08, 0x63, 0x29, 0xd6, 0x86, 0xe7, 0x1b, 0xb4, 0x18, 0x9d, 0x0c, 0x4f, 0x3c, 0x92, 0x63, - 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, - 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x0a, 0x5a, 0x32, 0x14, 0xa7, 0x64, 0xeb, 0x65, 0xe6, 0xeb, - 0x57, 0xc0, 0x8b, 0xa4, 0x24, 0x36, 0x70, 0x6e, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8d, - 0x04, 0xdd, 0xf4, 0xac, 0x04, 0x00, 0x00, + // 568 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xb1, 0x6f, 0xd3, 0x4e, + 0x14, 0x8e, 0x1b, 0xfd, 0xf2, 0x53, 0x2e, 0xa8, 0x55, 0x4f, 0x91, 0x9a, 0x98, 0xe2, 0x46, 0x91, + 0x40, 0x21, 0x28, 0x77, 0x4d, 0x2a, 0x31, 0x64, 0x8b, 0x07, 0x10, 0x43, 0xa4, 0xca, 0x15, 0x0b, + 0x12, 0x42, 0x97, 0xfa, 0x7a, 0x84, 0x24, 0x3e, 0xcb, 0xe7, 0x84, 0x66, 0x43, 0x6c, 0x30, 0xf1, + 0x0f, 0xb0, 0x33, 0x30, 0x64, 0xe8, 0x1f, 0x51, 0x31, 0x55, 0x88, 0x81, 0x09, 0xa1, 0x64, 0xc8, + 0xbf, 0x81, 0x6c, 0x9f, 0xed, 0xd6, 0x91, 0xd3, 0xb0, 0xb0, 0xd8, 0xbe, 0xf7, 0xbe, 0xf7, 0x7d, + 0xdf, 0x7b, 0x7a, 0x3e, 0x50, 0x39, 0xe5, 0x62, 0xc4, 0x05, 0x3e, 0xa3, 0x94, 0x39, 0xc4, 0x72, + 0xf1, 0xa4, 0xd9, 0xa3, 0x2e, 0x69, 0x62, 0xf7, 0x1c, 0xd9, 0x0e, 0x77, 0x39, 0xdc, 0x0b, 0x10, + 0x28, 0x44, 0x20, 0x89, 0x50, 0x8b, 0x8c, 0x33, 0xee, 0x63, 0xb0, 0xf7, 0x15, 0xc0, 0xd5, 0x32, + 0xe3, 0x9c, 0x0d, 0x29, 0xf6, 0x4f, 0xbd, 0xf1, 0x19, 0x26, 0xd6, 0x34, 0x4c, 0x05, 0x4c, 0xaf, + 0x82, 0x1a, 0x49, 0x1b, 0xa4, 0xa4, 0x08, 0x1e, 0x09, 0x86, 0x27, 0x4d, 0xef, 0x25, 0x13, 0xbb, + 0x64, 0xd4, 0xb7, 0x38, 0xf6, 0x9f, 0x32, 0xf4, 0x20, 0xcd, 0x72, 0xe4, 0xd0, 0xc7, 0x55, 0x3f, + 0x6c, 0x81, 0xdd, 0xae, 0x60, 0x4f, 0xbd, 0x50, 0x67, 0x38, 0xe4, 0x6f, 0x89, 0x75, 0x4a, 0x61, + 0x0b, 0xfc, 0xef, 0x83, 0xa8, 0x53, 0x52, 0x2a, 0x4a, 0x2d, 0xaf, 0x97, 0xbe, 0x5f, 0x34, 0x8a, + 0xd2, 0x4c, 0xc7, 0x34, 0x1d, 0x2a, 0xc4, 0x89, 0xeb, 0xf4, 0x2d, 0x66, 0x84, 0xc0, 0xb8, 0x86, + 0x96, 0xb6, 0x36, 0xab, 0xa1, 0xf0, 0x25, 0xc8, 0x93, 0x50, 0xb4, 0x94, 0xad, 0x28, 0xb5, 0x42, + 0xab, 0x88, 0x82, 0xd9, 0xa0, 0x70, 0x36, 0xa8, 0x63, 0x4d, 0xf5, 0x87, 0xdf, 0x2e, 0x1a, 0xf7, + 0x53, 0x66, 0x8c, 0x9e, 0x50, 0x1a, 0x59, 0x7f, 0x66, 0xc4, 0x8c, 0xed, 0xc6, 0xfb, 0xe5, 0xac, + 0x1e, 0x1a, 0xfc, 0xb8, 0x9c, 0xd5, 0xf7, 0x03, 0x8a, 0x86, 0x30, 0x07, 0x78, 0xa5, 0xeb, 0xea, + 0x5d, 0x50, 0x5e, 0x09, 0x1a, 0x54, 0xd8, 0xdc, 0x12, 0xb4, 0xfa, 0x55, 0x01, 0xb0, 0x2b, 0x98, + 0x41, 0x27, 0x7c, 0x40, 0xff, 0xf9, 0xa4, 0xda, 0x28, 0xd9, 0xca, 0xbd, 0x9b, 0xad, 0x24, 0x7c, + 0x55, 0xf7, 0x81, 0xba, 0x1a, 0x8d, 0x9a, 0x39, 0xf1, 0x7b, 0x39, 0x76, 0xc6, 0x56, 0x9c, 0x14, + 0xf0, 0x10, 0xe4, 0x6c, 0x2f, 0x74, 0x7b, 0x2b, 0x12, 0xd7, 0x2e, 0x78, 0xae, 0xe4, 0x41, 0x4a, + 0x26, 0x48, 0x23, 0xc9, 0xcf, 0x0a, 0xd8, 0xe9, 0x0a, 0xf6, 0xdc, 0x36, 0x89, 0x4b, 0x8f, 0x89, + 0x43, 0x46, 0x02, 0x3e, 0x06, 0x79, 0x32, 0x76, 0x5f, 0x73, 0xa7, 0xef, 0x4e, 0x6f, 0xd5, 0x8c, + 0xa1, 0x50, 0x07, 0x39, 0xdb, 0x67, 0xf0, 0xe7, 0x57, 0x68, 0x1d, 0xa0, 0xb4, 0xd5, 0x08, 0x84, + 0xf4, 0xfc, 0xe5, 0xaf, 0x83, 0xcc, 0x97, 0xe5, 0xac, 0xae, 0x18, 0xb2, 0xb2, 0xbd, 0xed, 0x59, + 0x8f, 0x39, 0xab, 0x65, 0xb0, 0x97, 0xb0, 0x17, 0x5a, 0x6f, 0xfd, 0xc8, 0x82, 0x6c, 0x57, 0x30, + 0x68, 0x83, 0xed, 0xc4, 0x7f, 0x52, 0x4f, 0x15, 0x5e, 0x59, 0x24, 0xb5, 0xb5, 0x39, 0x36, 0x54, + 0x86, 0x02, 0xec, 0x24, 0x17, 0xee, 0xd1, 0x3a, 0x9a, 0x04, 0x58, 0x3d, 0xfa, 0x0b, 0xf0, 0x75, + 0xd1, 0xe4, 0x66, 0xac, 0x15, 0x4d, 0x80, 0xd7, 0x8b, 0xa6, 0xac, 0x07, 0x7c, 0x03, 0xee, 0xdc, + 0x58, 0x8d, 0xda, 0x3a, 0x92, 0xeb, 0x48, 0xf5, 0x70, 0x53, 0x64, 0xa8, 0xa5, 0xfe, 0xf7, 0xce, + 0xdb, 0x04, 0xbd, 0x79, 0x39, 0xd7, 0x94, 0xab, 0xb9, 0xa6, 0xfc, 0x9e, 0x6b, 0xca, 0xa7, 0x85, + 0x96, 0xb9, 0x5a, 0x68, 0x99, 0x9f, 0x0b, 0x2d, 0xf3, 0x42, 0x5e, 0xb4, 0xc2, 0x1c, 0xa0, 0x3e, + 0xc7, 0xe7, 0xd1, 0x9d, 0xd9, 0xcb, 0xf9, 0x97, 0xd2, 0xd1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xaa, 0xdc, 0xfb, 0x6e, 0x11, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -372,6 +476,8 @@ type MsgClient interface { RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, error) // PruneAllowances prunes expired fee allowances. PruneAllowances(ctx context.Context, in *MsgPruneAllowances, opts ...grpc.CallOption) (*MsgPruneAllowancesResponse, error) + // UpdateParams updates the parameters of the feegrant module. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } type msgClient struct { @@ -409,6 +515,15 @@ func (c *msgClient) PruneAllowances(ctx context.Context, in *MsgPruneAllowances, return out, nil } +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // GrantAllowance grants fee allowance to the grantee on the granter's @@ -419,6 +534,8 @@ type MsgServer interface { RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) // PruneAllowances prunes expired fee allowances. PruneAllowances(context.Context, *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) + // UpdateParams updates the parameters of the feegrant module. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -434,6 +551,9 @@ func (*UnimplementedMsgServer) RevokeAllowance(ctx context.Context, req *MsgRevo func (*UnimplementedMsgServer) PruneAllowances(ctx context.Context, req *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PruneAllowances not implemented") } +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -493,6 +613,24 @@ func _Msg_PruneAllowances_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.feegrant.v1beta1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.feegrant.v1beta1.Msg", HandlerType: (*MsgServer)(nil), @@ -509,6 +647,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "PruneAllowances", Handler: _Msg_PruneAllowances_Handler, }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/feegrant/v1beta1/tx.proto", @@ -699,6 +841,69 @@ func (m *MsgPruneAllowancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *MsgUpdateParams) 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 *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) 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 *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -788,6 +993,30 @@ func (m *MsgPruneAllowancesResponse) Size() (n int) { return n } +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1290,6 +1519,171 @@ func (m *MsgPruneAllowancesResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgUpdateParams) 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: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) 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: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: 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 skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From ff1d5e1bb63fb3c85bdda00cd8220da077757ed7 Mon Sep 17 00:00:00 2001 From: Facundo Date: Thu, 12 Oct 2023 13:34:43 +0200 Subject: [PATCH 06/32] fix autocli --- x/feegrant/module/autocli.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/feegrant/module/autocli.go b/x/feegrant/module/autocli.go index ac0e724941e1..93e6f9cf0ad7 100644 --- a/x/feegrant/module/autocli.go +++ b/x/feegrant/module/autocli.go @@ -73,7 +73,7 @@ You can find the fee-grant of a granter and grantee.`), Use: "prune", Short: "Prune expired allowances", Long: "Prune a limited amount of expired allowances in order to reduce the size of the store when the number of expired allowances is large.", - Example: fmt.Sprintf(`$ %s tx feegrant prune`, version.AppName), + Example: fmt.Sprintf(`$ %s tx feegrant prune --from [mykey]`, version.AppName), }, }, EnhanceCustomCommand: true, From 332c9d513b0d3dd01fd1f26af1bd88750207319b Mon Sep 17 00:00:00 2001 From: Facundo Date: Thu, 12 Oct 2023 13:46:26 +0200 Subject: [PATCH 07/32] bump api --- go.mod | 2 +- go.sum | 2 ++ x/feegrant/go.mod | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b256ae749c7d..50f742eb8c6c 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ toolchain go1.21.0 module github.com/cosmos/cosmos-sdk require ( - cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 + cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/go.sum b/go.sum index d65bb755b2c7..5a36a62084a6 100644 --- a/go.sum +++ b/go.sum @@ -37,6 +37,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f h1:ySFY7TrWCwfNxyx9qE9ObgfcgvYOrFM0gOko74hPkns= +cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index c893b257be21..f5e7b5e2df7c 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -157,5 +157,4 @@ require ( sigs.k8s.io/yaml v1.3.0 // indirect ) -replace github.com/cosmos/cosmos-sdk => ../../. -replace cosmossdk.io/api => ../../api +replace github.com/cosmos/cosmos-sdk => ../../. \ No newline at end of file From 572d6ee7590512c8ef297db7e6882d9eeebde8c4 Mon Sep 17 00:00:00 2001 From: Facundo Date: Thu, 12 Oct 2023 13:52:18 +0200 Subject: [PATCH 08/32] go mod tidy --- go.sum | 2 -- simapp/go.mod | 2 +- simapp/go.sum | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.sum b/go.sum index 5a36a62084a6..c66eb0ce844d 100644 --- a/go.sum +++ b/go.sum @@ -35,8 +35,6 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f h1:ySFY7TrWCwfNxyx9qE9ObgfcgvYOrFM0gOko74hPkns= cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= diff --git a/simapp/go.mod b/simapp/go.mod index a53935071499..f9795d7f8377 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/simapp go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 + cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f cosmossdk.io/client/v2 v2.0.0-20230630094428-02b760776860 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 diff --git a/simapp/go.sum b/simapp/go.sum index 3d513c4cdad4..41d4a1e3c3cd 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -187,8 +187,8 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f h1:ySFY7TrWCwfNxyx9qE9ObgfcgvYOrFM0gOko74hPkns= +cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= From 2a527531b33ce14b3303eabe2358a35579b4bb52 Mon Sep 17 00:00:00 2001 From: Facundo Date: Thu, 12 Oct 2023 14:08:24 +0200 Subject: [PATCH 09/32] go mod tidy --- tests/go.mod | 2 +- tests/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/go.mod b/tests/go.mod index 978e7ac89a5a..436c2d2c466e 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -3,7 +3,7 @@ module github.com/cosmos/cosmos-sdk/tests go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 + cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/tests/go.sum b/tests/go.sum index 8c9dfdfb6573..c29fbfd76928 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -187,8 +187,8 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f h1:ySFY7TrWCwfNxyx9qE9ObgfcgvYOrFM0gOko74hPkns= +cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= From ac0f712fe0e0f3e45259208f453866df76e2e403 Mon Sep 17 00:00:00 2001 From: Facundo Date: Thu, 12 Oct 2023 14:29:09 +0200 Subject: [PATCH 10/32] add queryserver --- api/cosmos/feegrant/v1beta1/query.pulsar.go | 1042 ++++++++++++++++-- api/cosmos/feegrant/v1beta1/query_grpc.pb.go | 37 + proto/cosmos/feegrant/v1beta1/query.proto | 12 + x/feegrant/keeper/grpc_query.go | 36 +- x/feegrant/module/autocli.go | 4 + x/feegrant/module/module.go | 2 +- x/feegrant/query.pb.go | 407 ++++++- x/feegrant/query.pb.gw.go | 65 ++ 8 files changed, 1488 insertions(+), 117 deletions(-) diff --git a/api/cosmos/feegrant/v1beta1/query.pulsar.go b/api/cosmos/feegrant/v1beta1/query.pulsar.go index e6e62a22666c..9a30541c8124 100644 --- a/api/cosmos/feegrant/v1beta1/query.pulsar.go +++ b/api/cosmos/feegrant/v1beta1/query.pulsar.go @@ -3078,6 +3078,797 @@ func (x *fastReflection_QueryAllowancesByGranterResponse) ProtoMethods() *protoi } } +var ( + md_QueryParamsRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_feegrant_v1beta1_query_proto_init() + md_QueryParamsRequest = File_cosmos_feegrant_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) + +type fastReflection_QueryParamsRequest QueryParamsRequest + +func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(x) +} + +func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_feegrant_v1beta1_query_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_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} + +type fastReflection_QueryParamsRequest_messageType struct{} + +func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(nil) +} +func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) +} +func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest +} + +// 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_QueryParamsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryParamsRequest)(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_QueryParamsRequest) 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsRequest 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_QueryParamsRequest) 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.feegrant.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsRequest 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_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsRequest 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_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.QueryParamsRequest", 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsRequest) + 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().(*QueryParamsRequest) + 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().(*QueryParamsRequest) + 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: 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_QueryParamsResponse protoreflect.MessageDescriptor + fd_QueryParamsResponse_params protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_feegrant_v1beta1_query_proto_init() + md_QueryParamsResponse = File_cosmos_feegrant_v1beta1_query_proto.Messages().ByName("QueryParamsResponse") + fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) + +type fastReflection_QueryParamsResponse QueryParamsResponse + +func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(x) +} + +func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_feegrant_v1beta1_query_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_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} + +type fastReflection_QueryParamsResponse_messageType struct{} + +func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(nil) +} +func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} +func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// 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_QueryParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryParamsResponse)(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_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_QueryParamsResponse_params, 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_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.QueryParamsResponse.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.QueryParamsResponse.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.feegrant.v1beta1.QueryParamsResponse.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.QueryParamsResponse.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.QueryParamsResponse.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsResponse 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_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.QueryParamsResponse.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsResponse 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_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.QueryParamsResponse", 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsResponse) + 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.Params != nil { + l = options.Size(x.Params) + 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().(*QueryParamsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsResponse) + 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: 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 Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Since: cosmos-sdk 0.43 // Code generated by protoc-gen-go. DO NOT EDIT. @@ -3362,6 +4153,69 @@ func (x *QueryAllowancesByGranterResponse) GetPagination() *v1beta1.PageResponse return nil } +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryParamsRequest) Reset() { + *x = QueryParamsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_feegrant_v1beta1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsRequest) ProtoMessage() {} + +// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return file_cosmos_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{6} +} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *QueryParamsResponse) Reset() { + *x = QueryParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_feegrant_v1beta1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsResponse) ProtoMessage() {} + +// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return file_cosmos_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{7} +} + +func (x *QueryParamsResponse) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + var File_cosmos_feegrant_v1beta1_query_proto protoreflect.FileDescriptor var file_cosmos_feegrant_v1beta1_query_proto_rawDesc = []byte{ @@ -3431,56 +4285,72 @@ var file_cosmos_feegrant_v1beta1_query_proto_rawDesc = []byte{ 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x9f, - 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xac, 0x01, 0x0a, 0x09, 0x41, 0x6c, 0x6c, - 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, - 0x36, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, - 0x6e, 0x63, 0x65, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x7d, 0x12, 0xa6, 0x01, 0x0a, 0x0a, 0x41, 0x6c, 0x6c, 0x6f, - 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2f, 0x12, 0x2d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x7d, - 0x12, 0xbd, 0x01, 0x0a, 0x13, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, - 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x14, + 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x4e, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x32, 0xae, 0x05, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xac, + 0x01, 0x0a, 0x09, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, + 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, + 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, + 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x7d, 0x12, 0xa6, 0x01, + 0x0a, 0x0a, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, + 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, + 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x65, 0x65, 0x7d, 0x12, 0xbd, 0x01, 0x0a, 0x13, 0x41, 0x6c, 0x6c, 0x6f, 0x77, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x38, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, + 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, - 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x7d, - 0x42, 0xe1, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, - 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x2f, 0x7b, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x65, 0x72, 0x7d, 0x12, 0x8c, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, + 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xe1, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, + 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, + 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, + 0x43, 0x46, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, + 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -3495,7 +4365,7 @@ func file_cosmos_feegrant_v1beta1_query_proto_rawDescGZIP() []byte { return file_cosmos_feegrant_v1beta1_query_proto_rawDescData } -var file_cosmos_feegrant_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_cosmos_feegrant_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_cosmos_feegrant_v1beta1_query_proto_goTypes = []interface{}{ (*QueryAllowanceRequest)(nil), // 0: cosmos.feegrant.v1beta1.QueryAllowanceRequest (*QueryAllowanceResponse)(nil), // 1: cosmos.feegrant.v1beta1.QueryAllowanceResponse @@ -3503,29 +4373,35 @@ var file_cosmos_feegrant_v1beta1_query_proto_goTypes = []interface{}{ (*QueryAllowancesResponse)(nil), // 3: cosmos.feegrant.v1beta1.QueryAllowancesResponse (*QueryAllowancesByGranterRequest)(nil), // 4: cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest (*QueryAllowancesByGranterResponse)(nil), // 5: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse - (*Grant)(nil), // 6: cosmos.feegrant.v1beta1.Grant - (*v1beta1.PageRequest)(nil), // 7: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 8: cosmos.base.query.v1beta1.PageResponse + (*QueryParamsRequest)(nil), // 6: cosmos.feegrant.v1beta1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 7: cosmos.feegrant.v1beta1.QueryParamsResponse + (*Grant)(nil), // 8: cosmos.feegrant.v1beta1.Grant + (*v1beta1.PageRequest)(nil), // 9: cosmos.base.query.v1beta1.PageRequest + (*v1beta1.PageResponse)(nil), // 10: cosmos.base.query.v1beta1.PageResponse + (*Params)(nil), // 11: cosmos.feegrant.v1beta1.Params } var file_cosmos_feegrant_v1beta1_query_proto_depIdxs = []int32{ - 6, // 0: cosmos.feegrant.v1beta1.QueryAllowanceResponse.allowance:type_name -> cosmos.feegrant.v1beta1.Grant - 7, // 1: cosmos.feegrant.v1beta1.QueryAllowancesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 6, // 2: cosmos.feegrant.v1beta1.QueryAllowancesResponse.allowances:type_name -> cosmos.feegrant.v1beta1.Grant - 8, // 3: cosmos.feegrant.v1beta1.QueryAllowancesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 7, // 4: cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 6, // 5: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances:type_name -> cosmos.feegrant.v1beta1.Grant - 8, // 6: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 0, // 7: cosmos.feegrant.v1beta1.Query.Allowance:input_type -> cosmos.feegrant.v1beta1.QueryAllowanceRequest - 2, // 8: cosmos.feegrant.v1beta1.Query.Allowances:input_type -> cosmos.feegrant.v1beta1.QueryAllowancesRequest - 4, // 9: cosmos.feegrant.v1beta1.Query.AllowancesByGranter:input_type -> cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest - 1, // 10: cosmos.feegrant.v1beta1.Query.Allowance:output_type -> cosmos.feegrant.v1beta1.QueryAllowanceResponse - 3, // 11: cosmos.feegrant.v1beta1.Query.Allowances:output_type -> cosmos.feegrant.v1beta1.QueryAllowancesResponse - 5, // 12: cosmos.feegrant.v1beta1.Query.AllowancesByGranter:output_type -> cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse - 10, // [10:13] is the sub-list for method output_type - 7, // [7:10] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 8, // 0: cosmos.feegrant.v1beta1.QueryAllowanceResponse.allowance:type_name -> cosmos.feegrant.v1beta1.Grant + 9, // 1: cosmos.feegrant.v1beta1.QueryAllowancesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 8, // 2: cosmos.feegrant.v1beta1.QueryAllowancesResponse.allowances:type_name -> cosmos.feegrant.v1beta1.Grant + 10, // 3: cosmos.feegrant.v1beta1.QueryAllowancesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 9, // 4: cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 8, // 5: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances:type_name -> cosmos.feegrant.v1beta1.Grant + 10, // 6: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 11, // 7: cosmos.feegrant.v1beta1.QueryParamsResponse.params:type_name -> cosmos.feegrant.v1beta1.Params + 0, // 8: cosmos.feegrant.v1beta1.Query.Allowance:input_type -> cosmos.feegrant.v1beta1.QueryAllowanceRequest + 2, // 9: cosmos.feegrant.v1beta1.Query.Allowances:input_type -> cosmos.feegrant.v1beta1.QueryAllowancesRequest + 4, // 10: cosmos.feegrant.v1beta1.Query.AllowancesByGranter:input_type -> cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest + 6, // 11: cosmos.feegrant.v1beta1.Query.Params:input_type -> cosmos.feegrant.v1beta1.QueryParamsRequest + 1, // 12: cosmos.feegrant.v1beta1.Query.Allowance:output_type -> cosmos.feegrant.v1beta1.QueryAllowanceResponse + 3, // 13: cosmos.feegrant.v1beta1.Query.Allowances:output_type -> cosmos.feegrant.v1beta1.QueryAllowancesResponse + 5, // 14: cosmos.feegrant.v1beta1.Query.AllowancesByGranter:output_type -> cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse + 7, // 15: cosmos.feegrant.v1beta1.Query.Params:output_type -> cosmos.feegrant.v1beta1.QueryParamsResponse + 12, // [12:16] is the sub-list for method output_type + 8, // [8:12] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_cosmos_feegrant_v1beta1_query_proto_init() } @@ -3607,6 +4483,30 @@ func file_cosmos_feegrant_v1beta1_query_proto_init() { return nil } } + file_cosmos_feegrant_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_feegrant_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -3614,7 +4514,7 @@ func file_cosmos_feegrant_v1beta1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_feegrant_v1beta1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/feegrant/v1beta1/query_grpc.pb.go b/api/cosmos/feegrant/v1beta1/query_grpc.pb.go index 52eb181462f8..2f621111fcd4 100644 --- a/api/cosmos/feegrant/v1beta1/query_grpc.pb.go +++ b/api/cosmos/feegrant/v1beta1/query_grpc.pb.go @@ -24,6 +24,7 @@ const ( Query_Allowance_FullMethodName = "/cosmos.feegrant.v1beta1.Query/Allowance" Query_Allowances_FullMethodName = "/cosmos.feegrant.v1beta1.Query/Allowances" Query_AllowancesByGranter_FullMethodName = "/cosmos.feegrant.v1beta1.Query/AllowancesByGranter" + Query_Params_FullMethodName = "/cosmos.feegrant.v1beta1.Query/Params" ) // QueryClient is the client API for Query service. @@ -38,6 +39,7 @@ type QueryClient interface { // // Since: cosmos-sdk 0.46 AllowancesByGranter(ctx context.Context, in *QueryAllowancesByGranterRequest, opts ...grpc.CallOption) (*QueryAllowancesByGranterResponse, error) + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } type queryClient struct { @@ -75,6 +77,15 @@ func (c *queryClient) AllowancesByGranter(ctx context.Context, in *QueryAllowanc return out, nil } +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility @@ -87,6 +98,7 @@ type QueryServer interface { // // Since: cosmos-sdk 0.46 AllowancesByGranter(context.Context, *QueryAllowancesByGranterRequest) (*QueryAllowancesByGranterResponse, error) + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) mustEmbedUnimplementedQueryServer() } @@ -103,6 +115,9 @@ func (UnimplementedQueryServer) Allowances(context.Context, *QueryAllowancesRequ func (UnimplementedQueryServer) AllowancesByGranter(context.Context, *QueryAllowancesByGranterRequest) (*QueryAllowancesByGranterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllowancesByGranter not implemented") } +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -170,6 +185,24 @@ func _Query_AllowancesByGranter_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -189,6 +222,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "AllowancesByGranter", Handler: _Query_AllowancesByGranter_Handler, }, + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/feegrant/v1beta1/query.proto", diff --git a/proto/cosmos/feegrant/v1beta1/query.proto b/proto/cosmos/feegrant/v1beta1/query.proto index 591537acd9ef..12192bbde430 100644 --- a/proto/cosmos/feegrant/v1beta1/query.proto +++ b/proto/cosmos/feegrant/v1beta1/query.proto @@ -28,6 +28,10 @@ service Query { rpc AllowancesByGranter(QueryAllowancesByGranterRequest) returns (QueryAllowancesByGranterResponse) { option (google.api.http).get = "/cosmos/feegrant/v1beta1/issued/{granter}"; } + + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/feegrant/v1beta1/params"; + } } // QueryAllowanceRequest is the request type for the Query/Allowance RPC method. @@ -82,3 +86,11 @@ message QueryAllowancesByGranterResponse { // pagination defines an pagination for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + Params params = 1; +} \ No newline at end of file diff --git a/x/feegrant/keeper/grpc_query.go b/x/feegrant/keeper/grpc_query.go index 0bc3db1839cc..d39abc8173f9 100644 --- a/x/feegrant/keeper/grpc_query.go +++ b/x/feegrant/keeper/grpc_query.go @@ -15,25 +15,31 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" ) -var _ feegrant.QueryServer = Keeper{} +var _ feegrant.QueryServer = queryServer{} + +type queryServer struct{ k Keeper } + +func NewQueryServer(k Keeper) queryServer { + return queryServer{k: k} +} // Allowance returns granted allowance to the grantee by the granter. -func (q Keeper) Allowance(ctx context.Context, req *feegrant.QueryAllowanceRequest) (*feegrant.QueryAllowanceResponse, error) { +func (q queryServer) Allowance(ctx context.Context, req *feegrant.QueryAllowanceRequest) (*feegrant.QueryAllowanceResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - granterAddr, err := q.authKeeper.AddressCodec().StringToBytes(req.Granter) + granterAddr, err := q.k.authKeeper.AddressCodec().StringToBytes(req.Granter) if err != nil { return nil, err } - granteeAddr, err := q.authKeeper.AddressCodec().StringToBytes(req.Grantee) + granteeAddr, err := q.k.authKeeper.AddressCodec().StringToBytes(req.Grantee) if err != nil { return nil, err } - feeAllowance, err := q.GetAllowance(ctx, granterAddr, granteeAddr) + feeAllowance, err := q.k.GetAllowance(ctx, granterAddr, granteeAddr) if err != nil { return nil, status.Errorf(codes.Internal, err.Error()) } @@ -58,19 +64,19 @@ func (q Keeper) Allowance(ctx context.Context, req *feegrant.QueryAllowanceReque } // Allowances queries all the allowances granted to the given grantee. -func (q Keeper) Allowances(c context.Context, req *feegrant.QueryAllowancesRequest) (*feegrant.QueryAllowancesResponse, error) { +func (q queryServer) Allowances(c context.Context, req *feegrant.QueryAllowancesRequest) (*feegrant.QueryAllowancesResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - granteeAddr, err := q.authKeeper.AddressCodec().StringToBytes(req.Grantee) + granteeAddr, err := q.k.authKeeper.AddressCodec().StringToBytes(req.Grantee) if err != nil { return nil, err } var grants []*feegrant.Grant - _, pageRes, err := query.CollectionFilteredPaginate(c, q.FeeAllowance, req.Pagination, + _, pageRes, err := query.CollectionFilteredPaginate(c, q.k.FeeAllowance, req.Pagination, func(key collections.Pair[sdk.AccAddress, sdk.AccAddress], grant feegrant.Grant) (include bool, err error) { grants = append(grants, &grant) return true, nil @@ -86,18 +92,18 @@ func (q Keeper) Allowances(c context.Context, req *feegrant.QueryAllowancesReque } // AllowancesByGranter queries all the allowances granted by the given granter -func (q Keeper) AllowancesByGranter(c context.Context, req *feegrant.QueryAllowancesByGranterRequest) (*feegrant.QueryAllowancesByGranterResponse, error) { +func (q queryServer) AllowancesByGranter(c context.Context, req *feegrant.QueryAllowancesByGranterRequest) (*feegrant.QueryAllowancesByGranterResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - granterAddr, err := q.authKeeper.AddressCodec().StringToBytes(req.Granter) + granterAddr, err := q.k.authKeeper.AddressCodec().StringToBytes(req.Granter) if err != nil { return nil, err } var grants []*feegrant.Grant - _, pageRes, err := query.CollectionFilteredPaginate(c, q.FeeAllowance, req.Pagination, + _, pageRes, err := query.CollectionFilteredPaginate(c, q.k.FeeAllowance, req.Pagination, func(key collections.Pair[sdk.AccAddress, sdk.AccAddress], grant feegrant.Grant) (include bool, err error) { if !sdk.AccAddress(granterAddr).Equals(key.K2()) { return false, nil @@ -116,3 +122,11 @@ func (q Keeper) AllowancesByGranter(c context.Context, req *feegrant.QueryAllowa return &feegrant.QueryAllowancesByGranterResponse{Allowances: grants, Pagination: pageRes}, nil } + +func (q queryServer) Params(c context.Context, req *feegrant.QueryParamsRequest) (*feegrant.QueryParamsResponse, error) { + p, err := q.k.Params.Get(c) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + return &feegrant.QueryParamsResponse{Params: &p}, nil +} diff --git a/x/feegrant/module/autocli.go b/x/feegrant/module/autocli.go index 93e6f9cf0ad7..6f81ddc3822d 100644 --- a/x/feegrant/module/autocli.go +++ b/x/feegrant/module/autocli.go @@ -75,6 +75,10 @@ You can find the fee-grant of a granter and grantee.`), Long: "Prune a limited amount of expired allowances in order to reduce the size of the store when the number of expired allowances is large.", Example: fmt.Sprintf(`$ %s tx feegrant prune --from [mykey]`, version.AppName), }, + { + RpcMethod: "UpdateParams", + Skip: true, // skipped because authority gated + }, }, EnhanceCustomCommand: true, }, diff --git a/x/feegrant/module/module.go b/x/feegrant/module/module.go index c0503961b2a5..ab2dc4fe4809 100644 --- a/x/feegrant/module/module.go +++ b/x/feegrant/module/module.go @@ -57,7 +57,7 @@ func (ab AppModuleBasic) Name() string { // module-specific gRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { feegrant.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) - feegrant.RegisterQueryServer(cfg.QueryServer(), am.keeper) + feegrant.RegisterQueryServer(cfg.QueryServer(), keeper.NewQueryServer(am.keeper)) m := keeper.NewMigrator(am.keeper) err := cfg.RegisterMigration(feegrant.ModuleName, 1, m.Migrate1to2) if err != nil { diff --git a/x/feegrant/query.pb.go b/x/feegrant/query.pb.go index a4673fc23302..7005812f821b 100644 --- a/x/feegrant/query.pb.go +++ b/x/feegrant/query.pb.go @@ -353,6 +353,88 @@ func (m *QueryAllowancesByGranterResponse) GetPagination() *query.PageResponse { return nil } +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_59efc303945de53f, []int{6} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.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 *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_59efc303945de53f, []int{7} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + func init() { proto.RegisterType((*QueryAllowanceRequest)(nil), "cosmos.feegrant.v1beta1.QueryAllowanceRequest") proto.RegisterType((*QueryAllowanceResponse)(nil), "cosmos.feegrant.v1beta1.QueryAllowanceResponse") @@ -360,6 +442,8 @@ func init() { proto.RegisterType((*QueryAllowancesResponse)(nil), "cosmos.feegrant.v1beta1.QueryAllowancesResponse") proto.RegisterType((*QueryAllowancesByGranterRequest)(nil), "cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest") proto.RegisterType((*QueryAllowancesByGranterResponse)(nil), "cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.feegrant.v1beta1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.feegrant.v1beta1.QueryParamsResponse") } func init() { @@ -367,40 +451,43 @@ func init() { } var fileDescriptor_59efc303945de53f = []byte{ - // 516 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x95, 0xbd, 0x8b, 0x13, 0x41, - 0x18, 0xc6, 0x33, 0xe7, 0x17, 0x79, 0xaf, 0x1b, 0x3f, 0x2e, 0x2e, 0xb2, 0x86, 0x15, 0xce, 0x2f, - 0x6e, 0xc6, 0x44, 0x94, 0x13, 0xe4, 0xe0, 0x52, 0x98, 0x56, 0x23, 0x58, 0xd8, 0xc8, 0xe4, 0xf2, - 0xba, 0x2c, 0xc6, 0x99, 0xdc, 0xce, 0x46, 0x3d, 0xe4, 0x10, 0xfc, 0x0b, 0x04, 0x6d, 0x45, 0xb0, - 0xb0, 0xd1, 0xd2, 0xd6, 0xde, 0xf2, 0xd0, 0xc6, 0x52, 0x12, 0xff, 0x10, 0xc9, 0xec, 0xcc, 0x6e, - 0xcc, 0x65, 0xc9, 0xa2, 0x16, 0xd7, 0x65, 0xb2, 0xcf, 0xf3, 0xee, 0xef, 0x79, 0xdf, 0x99, 0x59, - 0x38, 0xb7, 0xa5, 0xf4, 0x63, 0xa5, 0xf9, 0x43, 0xc4, 0x30, 0x16, 0x32, 0xe1, 0x4f, 0x1a, 0x5d, - 0x4c, 0x44, 0x83, 0x6f, 0x0f, 0x31, 0xde, 0x61, 0x83, 0x58, 0x25, 0x8a, 0xae, 0xa4, 0x22, 0xe6, - 0x44, 0xcc, 0x8a, 0xbc, 0xd5, 0x22, 0x77, 0xa6, 0x34, 0x05, 0xbc, 0x4b, 0x56, 0xd7, 0x15, 0x1a, - 0xd3, 0xca, 0x99, 0x72, 0x20, 0xc2, 0x48, 0x8a, 0x24, 0x52, 0xd2, 0x6a, 0xcf, 0x84, 0x4a, 0x85, - 0x7d, 0xe4, 0x62, 0x10, 0x71, 0x21, 0xa5, 0x4a, 0xcc, 0x43, 0x6d, 0x9f, 0x9e, 0x4e, 0x2b, 0x3d, - 0x30, 0x2b, 0x6e, 0xb9, 0xcc, 0x22, 0x78, 0x01, 0x27, 0xef, 0x4c, 0x4a, 0x6f, 0xf6, 0xfb, 0xea, - 0xa9, 0x90, 0x5b, 0xd8, 0xc1, 0xed, 0x21, 0xea, 0x84, 0x36, 0xe1, 0x98, 0x81, 0xc1, 0xb8, 0x46, - 0xea, 0xe4, 0x42, 0xb5, 0x55, 0xfb, 0xf6, 0x79, 0xed, 0x84, 0xf5, 0x6e, 0xf6, 0x7a, 0x31, 0x6a, - 0x7d, 0x37, 0x89, 0x23, 0x19, 0x76, 0x9c, 0x30, 0xf7, 0x60, 0x6d, 0xa9, 0x9c, 0x07, 0x83, 0x7b, - 0x70, 0x6a, 0x16, 0x40, 0x0f, 0x94, 0xd4, 0x48, 0x6f, 0x42, 0x55, 0xb8, 0x3f, 0x0d, 0xc3, 0x72, - 0xd3, 0x67, 0x05, 0x4d, 0x65, 0xed, 0xc9, 0xaa, 0x93, 0x1b, 0x82, 0x37, 0x64, 0xb6, 0xb0, 0xde, - 0x17, 0x0d, 0xcb, 0x46, 0x43, 0x7a, 0x0b, 0x20, 0x6f, 0xba, 0x49, 0xb7, 0xdc, 0x5c, 0x75, 0x34, - 0x93, 0x09, 0xb1, 0x74, 0xf6, 0x8e, 0xe7, 0xb6, 0x08, 0x5d, 0x2b, 0x3b, 0x53, 0xce, 0xe0, 0x3d, - 0x81, 0x95, 0x7d, 0x58, 0x36, 0xf0, 0x06, 0x40, 0xc6, 0xaf, 0x6b, 0xa4, 0x7e, 0xa8, 0x44, 0xe2, - 0x29, 0x07, 0x6d, 0xcf, 0x61, 0x3c, 0xbf, 0x90, 0x31, 0x7d, 0xf9, 0x1f, 0x90, 0x6f, 0x09, 0x9c, - 0x9d, 0x81, 0x6c, 0xed, 0xb4, 0xd3, 0x21, 0xff, 0xcb, 0xfe, 0xf8, 0x5f, 0x4d, 0xfc, 0x48, 0xa0, - 0x5e, 0xcc, 0x77, 0xc0, 0xba, 0xd9, 0x7c, 0x77, 0x18, 0x8e, 0x18, 0x5a, 0xfa, 0x89, 0x40, 0x35, - 0x43, 0xa6, 0xac, 0x10, 0x66, 0xee, 0x89, 0xf4, 0x78, 0x69, 0x7d, 0x0a, 0x11, 0x6c, 0xbc, 0xfc, - 0xfe, 0xeb, 0xf5, 0xd2, 0x3a, 0xbd, 0xce, 0x8b, 0x6e, 0x9c, 0x2c, 0x2e, 0x7f, 0x6e, 0x67, 0xb4, - 0xeb, 0x7e, 0xe1, 0x2e, 0xfd, 0x40, 0x00, 0xf2, 0x0e, 0xd3, 0xb2, 0xef, 0x77, 0xe7, 0xcc, 0xbb, - 0x52, 0xde, 0x60, 0x89, 0xaf, 0x19, 0x62, 0x4e, 0xd7, 0x16, 0x13, 0xeb, 0x29, 0xd0, 0x2f, 0x04, - 0x8e, 0xcf, 0xd9, 0x0a, 0x74, 0xbd, 0x2c, 0xc0, 0xec, 0xee, 0xf6, 0x6e, 0xfc, 0x85, 0xd3, 0x66, - 0x68, 0x98, 0x0c, 0x97, 0xe9, 0xc5, 0xc2, 0x0c, 0x91, 0xd6, 0x43, 0xec, 0xe5, 0x2d, 0x6f, 0x35, - 0xbe, 0x8e, 0x7c, 0xb2, 0x37, 0xf2, 0xc9, 0xcf, 0x91, 0x4f, 0x5e, 0x8d, 0xfd, 0xca, 0xde, 0xd8, - 0xaf, 0xfc, 0x18, 0xfb, 0x95, 0xfb, 0xf6, 0x23, 0xa2, 0x7b, 0x8f, 0x58, 0xa4, 0xf8, 0xb3, 0xac, - 0x56, 0xf7, 0xa8, 0xb9, 0xbe, 0xaf, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x3d, 0x3a, 0x28, 0x67, - 0x8b, 0x06, 0x00, 0x00, + // 576 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x95, 0xb1, 0x6f, 0xd3, 0x40, + 0x14, 0xc6, 0x73, 0x45, 0x0d, 0xca, 0xeb, 0x76, 0x2d, 0x34, 0x58, 0xc8, 0x09, 0x46, 0x6a, 0x81, + 0x52, 0x1f, 0x09, 0x02, 0x8a, 0x84, 0x2a, 0x35, 0x03, 0xd9, 0x50, 0x09, 0x12, 0x03, 0x0b, 0xba, + 0x34, 0x0f, 0xcb, 0x22, 0xf5, 0xb9, 0x3e, 0x07, 0xa8, 0x50, 0x85, 0xc4, 0xcc, 0x80, 0x04, 0x2b, + 0x0b, 0x03, 0x0b, 0x88, 0x89, 0x95, 0x9d, 0xb1, 0x82, 0x85, 0x11, 0x25, 0xfc, 0x21, 0x28, 0xe7, + 0xb3, 0x9d, 0xa4, 0x31, 0xb1, 0x80, 0x81, 0x2d, 0x77, 0xfe, 0xbe, 0x77, 0xbf, 0xf7, 0xdd, 0x73, + 0x0c, 0x67, 0x77, 0x84, 0xdc, 0x15, 0x92, 0x3d, 0x40, 0x74, 0x02, 0xee, 0x85, 0xec, 0x51, 0xad, + 0x8d, 0x21, 0xaf, 0xb1, 0xbd, 0x1e, 0x06, 0xfb, 0xb6, 0x1f, 0x88, 0x50, 0xd0, 0xe5, 0x48, 0x64, + 0xc7, 0x22, 0x5b, 0x8b, 0x8c, 0x95, 0x2c, 0x77, 0xa2, 0x54, 0x05, 0x8c, 0x0b, 0x5a, 0xd7, 0xe6, + 0x12, 0xa3, 0xca, 0x89, 0xd2, 0xe7, 0x8e, 0xeb, 0xf1, 0xd0, 0x15, 0x9e, 0xd6, 0x9e, 0x76, 0x84, + 0x70, 0xba, 0xc8, 0xb8, 0xef, 0x32, 0xee, 0x79, 0x22, 0x54, 0x0f, 0xa5, 0x7e, 0x7a, 0x2a, 0xaa, + 0x74, 0x5f, 0xad, 0x98, 0xe6, 0x52, 0x0b, 0xeb, 0x19, 0x9c, 0xb8, 0x3d, 0x2c, 0xbd, 0xd5, 0xed, + 0x8a, 0xc7, 0xdc, 0xdb, 0xc1, 0x16, 0xee, 0xf5, 0x50, 0x86, 0xb4, 0x0e, 0xc7, 0x15, 0x0c, 0x06, + 0x65, 0x52, 0x25, 0xe7, 0x4a, 0x8d, 0xf2, 0xd7, 0x4f, 0xeb, 0x4b, 0xda, 0xbb, 0xd5, 0xe9, 0x04, + 0x28, 0xe5, 0x9d, 0x30, 0x70, 0x3d, 0xa7, 0x15, 0x0b, 0x53, 0x0f, 0x96, 0xe7, 0xf2, 0x79, 0xd0, + 0xba, 0x0b, 0x27, 0x27, 0x01, 0xa4, 0x2f, 0x3c, 0x89, 0xf4, 0x06, 0x94, 0x78, 0xbc, 0xa9, 0x18, + 0x16, 0xea, 0xa6, 0x9d, 0x11, 0xaa, 0xdd, 0x1c, 0xae, 0x5a, 0xa9, 0xc1, 0x7a, 0x4d, 0x26, 0x0b, + 0xcb, 0x23, 0xad, 0x61, 0xde, 0xd6, 0x90, 0xde, 0x04, 0x48, 0x43, 0x57, 0xdd, 0x2d, 0xd4, 0x57, + 0x62, 0x9a, 0xe1, 0x0d, 0xd9, 0xd1, 0xdd, 0xc7, 0x3c, 0xdb, 0xdc, 0x89, 0xa3, 0x6c, 0x8d, 0x38, + 0xad, 0xb7, 0x04, 0x96, 0x8f, 0x60, 0xe9, 0x86, 0x37, 0x01, 0x12, 0x7e, 0x59, 0x26, 0xd5, 0x63, + 0x39, 0x3a, 0x1e, 0x71, 0xd0, 0xe6, 0x14, 0xc6, 0xd5, 0x99, 0x8c, 0xd1, 0xe1, 0x63, 0x90, 0x6f, + 0x08, 0x54, 0x26, 0x20, 0x1b, 0xfb, 0xcd, 0xe8, 0x92, 0xff, 0x66, 0x3e, 0xfe, 0x55, 0x88, 0xef, + 0x09, 0x54, 0xb3, 0xf9, 0xfe, 0xb7, 0x34, 0x97, 0x80, 0x2a, 0xd8, 0x6d, 0x1e, 0xf0, 0xdd, 0x78, + 0x08, 0xad, 0x5b, 0xb0, 0x38, 0xb6, 0xab, 0xa9, 0xaf, 0x41, 0xd1, 0x57, 0x3b, 0x7a, 0xe2, 0x2b, + 0x99, 0xc4, 0xda, 0xa8, 0xe5, 0xf5, 0x8f, 0xf3, 0x30, 0xaf, 0x0a, 0xd2, 0x0f, 0x04, 0x4a, 0x49, + 0x30, 0xd4, 0xce, 0x2c, 0x30, 0xf5, 0xbd, 0x37, 0x58, 0x6e, 0x7d, 0x44, 0x6c, 0x6d, 0x3e, 0xff, + 0xf6, 0xf3, 0xd5, 0xdc, 0x06, 0xbd, 0xca, 0xb2, 0xfe, 0xd7, 0x92, 0x50, 0xd9, 0x53, 0x3d, 0x09, + 0x07, 0xf1, 0x2f, 0x3c, 0xa0, 0xef, 0x08, 0x40, 0x7a, 0x8f, 0x34, 0xef, 0xf9, 0x71, 0x90, 0xc6, + 0xa5, 0xfc, 0x06, 0x4d, 0x7c, 0x45, 0x11, 0x33, 0xba, 0x3e, 0x9b, 0x58, 0x8e, 0x80, 0x7e, 0x26, + 0xb0, 0x38, 0x65, 0xe0, 0xe8, 0x46, 0x5e, 0x80, 0xc9, 0x77, 0xc8, 0xb8, 0xfe, 0x07, 0x4e, 0xdd, + 0x43, 0x4d, 0xf5, 0xb0, 0x46, 0xcf, 0x67, 0xf6, 0xe0, 0x4a, 0xd9, 0xc3, 0x4e, 0x1a, 0x39, 0x7d, + 0x41, 0xa0, 0x18, 0x0d, 0x0d, 0x5d, 0xfb, 0xfd, 0xc1, 0x63, 0x93, 0x6a, 0x5c, 0xcc, 0x27, 0xd6, + 0x60, 0xab, 0x0a, 0xec, 0x0c, 0xad, 0x64, 0x82, 0x45, 0x03, 0xdb, 0xa8, 0x7d, 0xe9, 0x9b, 0xe4, + 0xb0, 0x6f, 0x92, 0x1f, 0x7d, 0x93, 0xbc, 0x1c, 0x98, 0x85, 0xc3, 0x81, 0x59, 0xf8, 0x3e, 0x30, + 0x0b, 0xf7, 0xf4, 0x97, 0x53, 0x76, 0x1e, 0xda, 0xae, 0x60, 0x4f, 0x92, 0x0a, 0xed, 0xa2, 0xfa, + 0x66, 0x5d, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, 0x74, 0xdc, 0xc3, 0x4b, 0x80, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -423,6 +510,7 @@ type QueryClient interface { // // Since: cosmos-sdk 0.46 AllowancesByGranter(ctx context.Context, in *QueryAllowancesByGranterRequest, opts ...grpc.CallOption) (*QueryAllowancesByGranterResponse, error) + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } type queryClient struct { @@ -460,6 +548,15 @@ func (c *queryClient) AllowancesByGranter(ctx context.Context, in *QueryAllowanc return out, nil } +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Allowance returns granted allwance to the grantee by the granter. @@ -470,6 +567,7 @@ type QueryServer interface { // // Since: cosmos-sdk 0.46 AllowancesByGranter(context.Context, *QueryAllowancesByGranterRequest) (*QueryAllowancesByGranterResponse, error) + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -485,6 +583,9 @@ func (*UnimplementedQueryServer) Allowances(ctx context.Context, req *QueryAllow func (*UnimplementedQueryServer) AllowancesByGranter(ctx context.Context, req *QueryAllowancesByGranterRequest) (*QueryAllowancesByGranterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllowancesByGranter not implemented") } +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -544,6 +645,24 @@ func _Query_AllowancesByGranter_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.feegrant.v1beta1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.feegrant.v1beta1.Query", HandlerType: (*QueryServer)(nil), @@ -560,6 +679,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "AllowancesByGranter", Handler: _Query_AllowancesByGranter_Handler, }, + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/feegrant/v1beta1/query.proto", @@ -819,6 +942,64 @@ func (m *QueryAllowancesByGranterResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } +func (m *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -932,6 +1113,28 @@ func (m *QueryAllowancesByGranterResponse) Size() (n int) { return n } +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1614,6 +1817,142 @@ func (m *QueryAllowancesByGranterResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/feegrant/query.pb.gw.go b/x/feegrant/query.pb.gw.go index a34118fd88a5..ddd1db23578d 100644 --- a/x/feegrant/query.pb.gw.go +++ b/x/feegrant/query.pb.gw.go @@ -253,6 +253,24 @@ func local_request_Query_AllowancesByGranter_0(ctx context.Context, marshaler ru } +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -328,6 +346,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -429,6 +470,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -438,6 +499,8 @@ var ( pattern_Query_Allowances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "feegrant", "v1beta1", "allowances", "grantee"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_AllowancesByGranter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "feegrant", "v1beta1", "issued", "granter"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "feegrant", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -446,4 +509,6 @@ var ( forward_Query_Allowances_0 = runtime.ForwardResponseMessage forward_Query_AllowancesByGranter_0 = runtime.ForwardResponseMessage + + forward_Query_Params_0 = runtime.ForwardResponseMessage ) From 7d4444c7ad7a731572dd8e114f02d80ff0c336af Mon Sep 17 00:00:00 2001 From: Facundo Date: Thu, 12 Oct 2023 14:42:38 +0200 Subject: [PATCH 11/32] fix legacy build --- simapp/app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simapp/app.go b/simapp/app.go index 4f9e94756fad..98c7441f0e9c 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -303,7 +303,7 @@ func NewSimApp( app.CrisisKeeper = crisiskeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[crisistypes.StoreKey]), invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String(), app.AccountKeeper.AddressCodec()) - app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[feegrant.StoreKey]), app.AccountKeeper) + app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[feegrant.StoreKey]), app.AccountKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String()) // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks From 0bc11526d1d5455f21aab77a665d2b750dc22b52 Mon Sep 17 00:00:00 2001 From: Facundo Date: Fri, 13 Oct 2023 14:44:08 +0200 Subject: [PATCH 12/32] Revert "fix legacy build" This reverts commit 7d4444c7ad7a731572dd8e114f02d80ff0c336af. --- simapp/app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simapp/app.go b/simapp/app.go index 98c7441f0e9c..4f9e94756fad 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -303,7 +303,7 @@ func NewSimApp( app.CrisisKeeper = crisiskeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[crisistypes.StoreKey]), invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String(), app.AccountKeeper.AddressCodec()) - app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[feegrant.StoreKey]), app.AccountKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String()) + app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[feegrant.StoreKey]), app.AccountKeeper) // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks From 6ac1e425c0f766797775faa8f2e6217ac8891cdb Mon Sep 17 00:00:00 2001 From: Facundo Date: Fri, 13 Oct 2023 14:44:08 +0200 Subject: [PATCH 13/32] Revert "add queryserver" This reverts commit ac0f712fe0e0f3e45259208f453866df76e2e403. --- api/cosmos/feegrant/v1beta1/query.pulsar.go | 1042 ++---------------- api/cosmos/feegrant/v1beta1/query_grpc.pb.go | 37 - proto/cosmos/feegrant/v1beta1/query.proto | 12 - x/feegrant/keeper/grpc_query.go | 36 +- x/feegrant/module/autocli.go | 4 - x/feegrant/module/module.go | 2 +- x/feegrant/query.pb.go | 407 +------ x/feegrant/query.pb.gw.go | 65 -- 8 files changed, 117 insertions(+), 1488 deletions(-) diff --git a/api/cosmos/feegrant/v1beta1/query.pulsar.go b/api/cosmos/feegrant/v1beta1/query.pulsar.go index 9a30541c8124..e6e62a22666c 100644 --- a/api/cosmos/feegrant/v1beta1/query.pulsar.go +++ b/api/cosmos/feegrant/v1beta1/query.pulsar.go @@ -3078,797 +3078,6 @@ func (x *fastReflection_QueryAllowancesByGranterResponse) ProtoMethods() *protoi } } -var ( - md_QueryParamsRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_query_proto_init() - md_QueryParamsRequest = File_cosmos_feegrant_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_query_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_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest -} - -// 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_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(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_QueryParamsRequest) 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsRequest 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_QueryParamsRequest) 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.feegrant.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsRequest 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_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsRequest 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_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.QueryParamsRequest", 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsRequest) - 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().(*QueryParamsRequest) - 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().(*QueryParamsRequest) - 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: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: 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_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_params protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_query_proto_init() - md_QueryParamsResponse = File_cosmos_feegrant_v1beta1_query_proto.Messages().ByName("QueryParamsResponse") - fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) - -type fastReflection_QueryParamsResponse QueryParamsResponse - -func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(x) -} - -func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_query_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_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} - -type fastReflection_QueryParamsResponse_messageType struct{} - -func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(nil) -} -func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) -} -func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse -} - -// 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_QueryParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsResponse)(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_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_QueryParamsResponse_params, 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_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryParamsResponse.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryParamsResponse.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.QueryParamsResponse.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryParamsResponse.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryParamsResponse.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsResponse 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_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryParamsResponse.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryParamsResponse 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_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.QueryParamsResponse", 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsResponse) - 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.Params != nil { - l = options.Size(x.Params) - 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().(*QueryParamsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) - 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: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: 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 Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - // Since: cosmos-sdk 0.43 // Code generated by protoc-gen-go. DO NOT EDIT. @@ -4153,69 +3362,6 @@ func (x *QueryAllowancesByGranterResponse) GetPagination() *v1beta1.PageResponse return nil } -// QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{6} -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryParamsResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - var File_cosmos_feegrant_v1beta1_query_proto protoreflect.FileDescriptor var file_cosmos_feegrant_v1beta1_query_proto_rawDesc = []byte{ @@ -4285,72 +3431,56 @@ var file_cosmos_feegrant_v1beta1_query_proto_rawDesc = []byte{ 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x14, - 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x4e, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x32, 0xae, 0x05, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xac, - 0x01, 0x0a, 0x09, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, - 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, - 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x7d, 0x12, 0xa6, 0x01, - 0x0a, 0x0a, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, - 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, - 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x65, 0x65, 0x7d, 0x12, 0xbd, 0x01, 0x0a, 0x13, 0x41, 0x6c, 0x6c, 0x6f, 0x77, - 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x38, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, - 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x9f, + 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xac, 0x01, 0x0a, 0x09, 0x41, 0x6c, 0x6c, + 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, + 0x36, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, + 0x6e, 0x63, 0x65, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x67, + 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x7d, 0x12, 0xa6, 0x01, 0x0a, 0x0a, 0x41, 0x6c, 0x6c, 0x6f, + 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2f, 0x12, 0x2d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x7d, + 0x12, 0xbd, 0x01, 0x0a, 0x13, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, + 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, - 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x2f, 0x7b, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x65, 0x72, 0x7d, 0x12, 0x8c, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, - 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xe1, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, - 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, - 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, - 0x43, 0x46, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, + 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, + 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, + 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x7d, + 0x42, 0xe1, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, + 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, + 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4365,7 +3495,7 @@ func file_cosmos_feegrant_v1beta1_query_proto_rawDescGZIP() []byte { return file_cosmos_feegrant_v1beta1_query_proto_rawDescData } -var file_cosmos_feegrant_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_cosmos_feegrant_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_cosmos_feegrant_v1beta1_query_proto_goTypes = []interface{}{ (*QueryAllowanceRequest)(nil), // 0: cosmos.feegrant.v1beta1.QueryAllowanceRequest (*QueryAllowanceResponse)(nil), // 1: cosmos.feegrant.v1beta1.QueryAllowanceResponse @@ -4373,35 +3503,29 @@ var file_cosmos_feegrant_v1beta1_query_proto_goTypes = []interface{}{ (*QueryAllowancesResponse)(nil), // 3: cosmos.feegrant.v1beta1.QueryAllowancesResponse (*QueryAllowancesByGranterRequest)(nil), // 4: cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest (*QueryAllowancesByGranterResponse)(nil), // 5: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse - (*QueryParamsRequest)(nil), // 6: cosmos.feegrant.v1beta1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 7: cosmos.feegrant.v1beta1.QueryParamsResponse - (*Grant)(nil), // 8: cosmos.feegrant.v1beta1.Grant - (*v1beta1.PageRequest)(nil), // 9: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 10: cosmos.base.query.v1beta1.PageResponse - (*Params)(nil), // 11: cosmos.feegrant.v1beta1.Params + (*Grant)(nil), // 6: cosmos.feegrant.v1beta1.Grant + (*v1beta1.PageRequest)(nil), // 7: cosmos.base.query.v1beta1.PageRequest + (*v1beta1.PageResponse)(nil), // 8: cosmos.base.query.v1beta1.PageResponse } var file_cosmos_feegrant_v1beta1_query_proto_depIdxs = []int32{ - 8, // 0: cosmos.feegrant.v1beta1.QueryAllowanceResponse.allowance:type_name -> cosmos.feegrant.v1beta1.Grant - 9, // 1: cosmos.feegrant.v1beta1.QueryAllowancesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 8, // 2: cosmos.feegrant.v1beta1.QueryAllowancesResponse.allowances:type_name -> cosmos.feegrant.v1beta1.Grant - 10, // 3: cosmos.feegrant.v1beta1.QueryAllowancesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 9, // 4: cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 8, // 5: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances:type_name -> cosmos.feegrant.v1beta1.Grant - 10, // 6: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 11, // 7: cosmos.feegrant.v1beta1.QueryParamsResponse.params:type_name -> cosmos.feegrant.v1beta1.Params - 0, // 8: cosmos.feegrant.v1beta1.Query.Allowance:input_type -> cosmos.feegrant.v1beta1.QueryAllowanceRequest - 2, // 9: cosmos.feegrant.v1beta1.Query.Allowances:input_type -> cosmos.feegrant.v1beta1.QueryAllowancesRequest - 4, // 10: cosmos.feegrant.v1beta1.Query.AllowancesByGranter:input_type -> cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest - 6, // 11: cosmos.feegrant.v1beta1.Query.Params:input_type -> cosmos.feegrant.v1beta1.QueryParamsRequest - 1, // 12: cosmos.feegrant.v1beta1.Query.Allowance:output_type -> cosmos.feegrant.v1beta1.QueryAllowanceResponse - 3, // 13: cosmos.feegrant.v1beta1.Query.Allowances:output_type -> cosmos.feegrant.v1beta1.QueryAllowancesResponse - 5, // 14: cosmos.feegrant.v1beta1.Query.AllowancesByGranter:output_type -> cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse - 7, // 15: cosmos.feegrant.v1beta1.Query.Params:output_type -> cosmos.feegrant.v1beta1.QueryParamsResponse - 12, // [12:16] is the sub-list for method output_type - 8, // [8:12] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 6, // 0: cosmos.feegrant.v1beta1.QueryAllowanceResponse.allowance:type_name -> cosmos.feegrant.v1beta1.Grant + 7, // 1: cosmos.feegrant.v1beta1.QueryAllowancesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 6, // 2: cosmos.feegrant.v1beta1.QueryAllowancesResponse.allowances:type_name -> cosmos.feegrant.v1beta1.Grant + 8, // 3: cosmos.feegrant.v1beta1.QueryAllowancesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 7, // 4: cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 6, // 5: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances:type_name -> cosmos.feegrant.v1beta1.Grant + 8, // 6: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 0, // 7: cosmos.feegrant.v1beta1.Query.Allowance:input_type -> cosmos.feegrant.v1beta1.QueryAllowanceRequest + 2, // 8: cosmos.feegrant.v1beta1.Query.Allowances:input_type -> cosmos.feegrant.v1beta1.QueryAllowancesRequest + 4, // 9: cosmos.feegrant.v1beta1.Query.AllowancesByGranter:input_type -> cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest + 1, // 10: cosmos.feegrant.v1beta1.Query.Allowance:output_type -> cosmos.feegrant.v1beta1.QueryAllowanceResponse + 3, // 11: cosmos.feegrant.v1beta1.Query.Allowances:output_type -> cosmos.feegrant.v1beta1.QueryAllowancesResponse + 5, // 12: cosmos.feegrant.v1beta1.Query.AllowancesByGranter:output_type -> cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse + 10, // [10:13] is the sub-list for method output_type + 7, // [7:10] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_cosmos_feegrant_v1beta1_query_proto_init() } @@ -4483,30 +3607,6 @@ func file_cosmos_feegrant_v1beta1_query_proto_init() { return nil } } - file_cosmos_feegrant_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_feegrant_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -4514,7 +3614,7 @@ func file_cosmos_feegrant_v1beta1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_feegrant_v1beta1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/feegrant/v1beta1/query_grpc.pb.go b/api/cosmos/feegrant/v1beta1/query_grpc.pb.go index 2f621111fcd4..52eb181462f8 100644 --- a/api/cosmos/feegrant/v1beta1/query_grpc.pb.go +++ b/api/cosmos/feegrant/v1beta1/query_grpc.pb.go @@ -24,7 +24,6 @@ const ( Query_Allowance_FullMethodName = "/cosmos.feegrant.v1beta1.Query/Allowance" Query_Allowances_FullMethodName = "/cosmos.feegrant.v1beta1.Query/Allowances" Query_AllowancesByGranter_FullMethodName = "/cosmos.feegrant.v1beta1.Query/AllowancesByGranter" - Query_Params_FullMethodName = "/cosmos.feegrant.v1beta1.Query/Params" ) // QueryClient is the client API for Query service. @@ -39,7 +38,6 @@ type QueryClient interface { // // Since: cosmos-sdk 0.46 AllowancesByGranter(ctx context.Context, in *QueryAllowancesByGranterRequest, opts ...grpc.CallOption) (*QueryAllowancesByGranterResponse, error) - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } type queryClient struct { @@ -77,15 +75,6 @@ func (c *queryClient) AllowancesByGranter(ctx context.Context, in *QueryAllowanc return out, nil } -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility @@ -98,7 +87,6 @@ type QueryServer interface { // // Since: cosmos-sdk 0.46 AllowancesByGranter(context.Context, *QueryAllowancesByGranterRequest) (*QueryAllowancesByGranterResponse, error) - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) mustEmbedUnimplementedQueryServer() } @@ -115,9 +103,6 @@ func (UnimplementedQueryServer) Allowances(context.Context, *QueryAllowancesRequ func (UnimplementedQueryServer) AllowancesByGranter(context.Context, *QueryAllowancesByGranterRequest) (*QueryAllowancesByGranterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllowancesByGranter not implemented") } -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -185,24 +170,6 @@ func _Query_AllowancesByGranter_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_Params_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -222,10 +189,6 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "AllowancesByGranter", Handler: _Query_AllowancesByGranter_Handler, }, - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/feegrant/v1beta1/query.proto", diff --git a/proto/cosmos/feegrant/v1beta1/query.proto b/proto/cosmos/feegrant/v1beta1/query.proto index 12192bbde430..591537acd9ef 100644 --- a/proto/cosmos/feegrant/v1beta1/query.proto +++ b/proto/cosmos/feegrant/v1beta1/query.proto @@ -28,10 +28,6 @@ service Query { rpc AllowancesByGranter(QueryAllowancesByGranterRequest) returns (QueryAllowancesByGranterResponse) { option (google.api.http).get = "/cosmos/feegrant/v1beta1/issued/{granter}"; } - - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/feegrant/v1beta1/params"; - } } // QueryAllowanceRequest is the request type for the Query/Allowance RPC method. @@ -86,11 +82,3 @@ message QueryAllowancesByGranterResponse { // pagination defines an pagination for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - Params params = 1; -} \ No newline at end of file diff --git a/x/feegrant/keeper/grpc_query.go b/x/feegrant/keeper/grpc_query.go index d39abc8173f9..0bc3db1839cc 100644 --- a/x/feegrant/keeper/grpc_query.go +++ b/x/feegrant/keeper/grpc_query.go @@ -15,31 +15,25 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" ) -var _ feegrant.QueryServer = queryServer{} - -type queryServer struct{ k Keeper } - -func NewQueryServer(k Keeper) queryServer { - return queryServer{k: k} -} +var _ feegrant.QueryServer = Keeper{} // Allowance returns granted allowance to the grantee by the granter. -func (q queryServer) Allowance(ctx context.Context, req *feegrant.QueryAllowanceRequest) (*feegrant.QueryAllowanceResponse, error) { +func (q Keeper) Allowance(ctx context.Context, req *feegrant.QueryAllowanceRequest) (*feegrant.QueryAllowanceResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - granterAddr, err := q.k.authKeeper.AddressCodec().StringToBytes(req.Granter) + granterAddr, err := q.authKeeper.AddressCodec().StringToBytes(req.Granter) if err != nil { return nil, err } - granteeAddr, err := q.k.authKeeper.AddressCodec().StringToBytes(req.Grantee) + granteeAddr, err := q.authKeeper.AddressCodec().StringToBytes(req.Grantee) if err != nil { return nil, err } - feeAllowance, err := q.k.GetAllowance(ctx, granterAddr, granteeAddr) + feeAllowance, err := q.GetAllowance(ctx, granterAddr, granteeAddr) if err != nil { return nil, status.Errorf(codes.Internal, err.Error()) } @@ -64,19 +58,19 @@ func (q queryServer) Allowance(ctx context.Context, req *feegrant.QueryAllowance } // Allowances queries all the allowances granted to the given grantee. -func (q queryServer) Allowances(c context.Context, req *feegrant.QueryAllowancesRequest) (*feegrant.QueryAllowancesResponse, error) { +func (q Keeper) Allowances(c context.Context, req *feegrant.QueryAllowancesRequest) (*feegrant.QueryAllowancesResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - granteeAddr, err := q.k.authKeeper.AddressCodec().StringToBytes(req.Grantee) + granteeAddr, err := q.authKeeper.AddressCodec().StringToBytes(req.Grantee) if err != nil { return nil, err } var grants []*feegrant.Grant - _, pageRes, err := query.CollectionFilteredPaginate(c, q.k.FeeAllowance, req.Pagination, + _, pageRes, err := query.CollectionFilteredPaginate(c, q.FeeAllowance, req.Pagination, func(key collections.Pair[sdk.AccAddress, sdk.AccAddress], grant feegrant.Grant) (include bool, err error) { grants = append(grants, &grant) return true, nil @@ -92,18 +86,18 @@ func (q queryServer) Allowances(c context.Context, req *feegrant.QueryAllowances } // AllowancesByGranter queries all the allowances granted by the given granter -func (q queryServer) AllowancesByGranter(c context.Context, req *feegrant.QueryAllowancesByGranterRequest) (*feegrant.QueryAllowancesByGranterResponse, error) { +func (q Keeper) AllowancesByGranter(c context.Context, req *feegrant.QueryAllowancesByGranterRequest) (*feegrant.QueryAllowancesByGranterResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - granterAddr, err := q.k.authKeeper.AddressCodec().StringToBytes(req.Granter) + granterAddr, err := q.authKeeper.AddressCodec().StringToBytes(req.Granter) if err != nil { return nil, err } var grants []*feegrant.Grant - _, pageRes, err := query.CollectionFilteredPaginate(c, q.k.FeeAllowance, req.Pagination, + _, pageRes, err := query.CollectionFilteredPaginate(c, q.FeeAllowance, req.Pagination, func(key collections.Pair[sdk.AccAddress, sdk.AccAddress], grant feegrant.Grant) (include bool, err error) { if !sdk.AccAddress(granterAddr).Equals(key.K2()) { return false, nil @@ -122,11 +116,3 @@ func (q queryServer) AllowancesByGranter(c context.Context, req *feegrant.QueryA return &feegrant.QueryAllowancesByGranterResponse{Allowances: grants, Pagination: pageRes}, nil } - -func (q queryServer) Params(c context.Context, req *feegrant.QueryParamsRequest) (*feegrant.QueryParamsResponse, error) { - p, err := q.k.Params.Get(c) - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - return &feegrant.QueryParamsResponse{Params: &p}, nil -} diff --git a/x/feegrant/module/autocli.go b/x/feegrant/module/autocli.go index 6f81ddc3822d..93e6f9cf0ad7 100644 --- a/x/feegrant/module/autocli.go +++ b/x/feegrant/module/autocli.go @@ -75,10 +75,6 @@ You can find the fee-grant of a granter and grantee.`), Long: "Prune a limited amount of expired allowances in order to reduce the size of the store when the number of expired allowances is large.", Example: fmt.Sprintf(`$ %s tx feegrant prune --from [mykey]`, version.AppName), }, - { - RpcMethod: "UpdateParams", - Skip: true, // skipped because authority gated - }, }, EnhanceCustomCommand: true, }, diff --git a/x/feegrant/module/module.go b/x/feegrant/module/module.go index ab2dc4fe4809..c0503961b2a5 100644 --- a/x/feegrant/module/module.go +++ b/x/feegrant/module/module.go @@ -57,7 +57,7 @@ func (ab AppModuleBasic) Name() string { // module-specific gRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { feegrant.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) - feegrant.RegisterQueryServer(cfg.QueryServer(), keeper.NewQueryServer(am.keeper)) + feegrant.RegisterQueryServer(cfg.QueryServer(), am.keeper) m := keeper.NewMigrator(am.keeper) err := cfg.RegisterMigration(feegrant.ModuleName, 1, m.Migrate1to2) if err != nil { diff --git a/x/feegrant/query.pb.go b/x/feegrant/query.pb.go index 7005812f821b..a4673fc23302 100644 --- a/x/feegrant/query.pb.go +++ b/x/feegrant/query.pb.go @@ -353,88 +353,6 @@ func (m *QueryAllowancesByGranterResponse) GetPagination() *query.PageResponse { return nil } -// QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct { -} - -func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } -func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryParamsRequest) ProtoMessage() {} -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_59efc303945de53f, []int{6} -} -func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsRequest.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 *QueryParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsRequest.Merge(m, src) -} -func (m *QueryParamsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_59efc303945de53f, []int{7} -} -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() *Params { - if m != nil { - return m.Params - } - return nil -} - func init() { proto.RegisterType((*QueryAllowanceRequest)(nil), "cosmos.feegrant.v1beta1.QueryAllowanceRequest") proto.RegisterType((*QueryAllowanceResponse)(nil), "cosmos.feegrant.v1beta1.QueryAllowanceResponse") @@ -442,8 +360,6 @@ func init() { proto.RegisterType((*QueryAllowancesResponse)(nil), "cosmos.feegrant.v1beta1.QueryAllowancesResponse") proto.RegisterType((*QueryAllowancesByGranterRequest)(nil), "cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest") proto.RegisterType((*QueryAllowancesByGranterResponse)(nil), "cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse") - proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.feegrant.v1beta1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.feegrant.v1beta1.QueryParamsResponse") } func init() { @@ -451,43 +367,40 @@ func init() { } var fileDescriptor_59efc303945de53f = []byte{ - // 576 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x95, 0xb1, 0x6f, 0xd3, 0x40, - 0x14, 0xc6, 0x73, 0x45, 0x0d, 0xca, 0xeb, 0x76, 0x2d, 0x34, 0x58, 0xc8, 0x09, 0x46, 0x6a, 0x81, - 0x52, 0x1f, 0x09, 0x02, 0x8a, 0x84, 0x2a, 0x35, 0x03, 0xd9, 0x50, 0x09, 0x12, 0x03, 0x0b, 0xba, - 0x34, 0x0f, 0xcb, 0x22, 0xf5, 0xb9, 0x3e, 0x07, 0xa8, 0x50, 0x85, 0xc4, 0xcc, 0x80, 0x04, 0x2b, - 0x0b, 0x03, 0x0b, 0x88, 0x89, 0x95, 0x9d, 0xb1, 0x82, 0x85, 0x11, 0x25, 0xfc, 0x21, 0x28, 0xe7, - 0xb3, 0x9d, 0xa4, 0x31, 0xb1, 0x80, 0x81, 0x2d, 0x77, 0xfe, 0xbe, 0x77, 0xbf, 0xf7, 0xdd, 0x73, - 0x0c, 0x67, 0x77, 0x84, 0xdc, 0x15, 0x92, 0x3d, 0x40, 0x74, 0x02, 0xee, 0x85, 0xec, 0x51, 0xad, - 0x8d, 0x21, 0xaf, 0xb1, 0xbd, 0x1e, 0x06, 0xfb, 0xb6, 0x1f, 0x88, 0x50, 0xd0, 0xe5, 0x48, 0x64, - 0xc7, 0x22, 0x5b, 0x8b, 0x8c, 0x95, 0x2c, 0x77, 0xa2, 0x54, 0x05, 0x8c, 0x0b, 0x5a, 0xd7, 0xe6, - 0x12, 0xa3, 0xca, 0x89, 0xd2, 0xe7, 0x8e, 0xeb, 0xf1, 0xd0, 0x15, 0x9e, 0xd6, 0x9e, 0x76, 0x84, - 0x70, 0xba, 0xc8, 0xb8, 0xef, 0x32, 0xee, 0x79, 0x22, 0x54, 0x0f, 0xa5, 0x7e, 0x7a, 0x2a, 0xaa, - 0x74, 0x5f, 0xad, 0x98, 0xe6, 0x52, 0x0b, 0xeb, 0x19, 0x9c, 0xb8, 0x3d, 0x2c, 0xbd, 0xd5, 0xed, - 0x8a, 0xc7, 0xdc, 0xdb, 0xc1, 0x16, 0xee, 0xf5, 0x50, 0x86, 0xb4, 0x0e, 0xc7, 0x15, 0x0c, 0x06, - 0x65, 0x52, 0x25, 0xe7, 0x4a, 0x8d, 0xf2, 0xd7, 0x4f, 0xeb, 0x4b, 0xda, 0xbb, 0xd5, 0xe9, 0x04, - 0x28, 0xe5, 0x9d, 0x30, 0x70, 0x3d, 0xa7, 0x15, 0x0b, 0x53, 0x0f, 0x96, 0xe7, 0xf2, 0x79, 0xd0, - 0xba, 0x0b, 0x27, 0x27, 0x01, 0xa4, 0x2f, 0x3c, 0x89, 0xf4, 0x06, 0x94, 0x78, 0xbc, 0xa9, 0x18, - 0x16, 0xea, 0xa6, 0x9d, 0x11, 0xaa, 0xdd, 0x1c, 0xae, 0x5a, 0xa9, 0xc1, 0x7a, 0x4d, 0x26, 0x0b, - 0xcb, 0x23, 0xad, 0x61, 0xde, 0xd6, 0x90, 0xde, 0x04, 0x48, 0x43, 0x57, 0xdd, 0x2d, 0xd4, 0x57, - 0x62, 0x9a, 0xe1, 0x0d, 0xd9, 0xd1, 0xdd, 0xc7, 0x3c, 0xdb, 0xdc, 0x89, 0xa3, 0x6c, 0x8d, 0x38, - 0xad, 0xb7, 0x04, 0x96, 0x8f, 0x60, 0xe9, 0x86, 0x37, 0x01, 0x12, 0x7e, 0x59, 0x26, 0xd5, 0x63, - 0x39, 0x3a, 0x1e, 0x71, 0xd0, 0xe6, 0x14, 0xc6, 0xd5, 0x99, 0x8c, 0xd1, 0xe1, 0x63, 0x90, 0x6f, - 0x08, 0x54, 0x26, 0x20, 0x1b, 0xfb, 0xcd, 0xe8, 0x92, 0xff, 0x66, 0x3e, 0xfe, 0x55, 0x88, 0xef, - 0x09, 0x54, 0xb3, 0xf9, 0xfe, 0xb7, 0x34, 0x97, 0x80, 0x2a, 0xd8, 0x6d, 0x1e, 0xf0, 0xdd, 0x78, - 0x08, 0xad, 0x5b, 0xb0, 0x38, 0xb6, 0xab, 0xa9, 0xaf, 0x41, 0xd1, 0x57, 0x3b, 0x7a, 0xe2, 0x2b, - 0x99, 0xc4, 0xda, 0xa8, 0xe5, 0xf5, 0x8f, 0xf3, 0x30, 0xaf, 0x0a, 0xd2, 0x0f, 0x04, 0x4a, 0x49, - 0x30, 0xd4, 0xce, 0x2c, 0x30, 0xf5, 0xbd, 0x37, 0x58, 0x6e, 0x7d, 0x44, 0x6c, 0x6d, 0x3e, 0xff, - 0xf6, 0xf3, 0xd5, 0xdc, 0x06, 0xbd, 0xca, 0xb2, 0xfe, 0xd7, 0x92, 0x50, 0xd9, 0x53, 0x3d, 0x09, - 0x07, 0xf1, 0x2f, 0x3c, 0xa0, 0xef, 0x08, 0x40, 0x7a, 0x8f, 0x34, 0xef, 0xf9, 0x71, 0x90, 0xc6, - 0xa5, 0xfc, 0x06, 0x4d, 0x7c, 0x45, 0x11, 0x33, 0xba, 0x3e, 0x9b, 0x58, 0x8e, 0x80, 0x7e, 0x26, - 0xb0, 0x38, 0x65, 0xe0, 0xe8, 0x46, 0x5e, 0x80, 0xc9, 0x77, 0xc8, 0xb8, 0xfe, 0x07, 0x4e, 0xdd, - 0x43, 0x4d, 0xf5, 0xb0, 0x46, 0xcf, 0x67, 0xf6, 0xe0, 0x4a, 0xd9, 0xc3, 0x4e, 0x1a, 0x39, 0x7d, - 0x41, 0xa0, 0x18, 0x0d, 0x0d, 0x5d, 0xfb, 0xfd, 0xc1, 0x63, 0x93, 0x6a, 0x5c, 0xcc, 0x27, 0xd6, - 0x60, 0xab, 0x0a, 0xec, 0x0c, 0xad, 0x64, 0x82, 0x45, 0x03, 0xdb, 0xa8, 0x7d, 0xe9, 0x9b, 0xe4, - 0xb0, 0x6f, 0x92, 0x1f, 0x7d, 0x93, 0xbc, 0x1c, 0x98, 0x85, 0xc3, 0x81, 0x59, 0xf8, 0x3e, 0x30, - 0x0b, 0xf7, 0xf4, 0x97, 0x53, 0x76, 0x1e, 0xda, 0xae, 0x60, 0x4f, 0x92, 0x0a, 0xed, 0xa2, 0xfa, - 0x66, 0x5d, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, 0x74, 0xdc, 0xc3, 0x4b, 0x80, 0x07, 0x00, 0x00, + // 516 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x95, 0xbd, 0x8b, 0x13, 0x41, + 0x18, 0xc6, 0x33, 0xe7, 0x17, 0x79, 0xaf, 0x1b, 0x3f, 0x2e, 0x2e, 0xb2, 0x86, 0x15, 0xce, 0x2f, + 0x6e, 0xc6, 0x44, 0x94, 0x13, 0xe4, 0xe0, 0x52, 0x98, 0x56, 0x23, 0x58, 0xd8, 0xc8, 0xe4, 0xf2, + 0xba, 0x2c, 0xc6, 0x99, 0xdc, 0xce, 0x46, 0x3d, 0xe4, 0x10, 0xfc, 0x0b, 0x04, 0x6d, 0x45, 0xb0, + 0xb0, 0xd1, 0xd2, 0xd6, 0xde, 0xf2, 0xd0, 0xc6, 0x52, 0x12, 0xff, 0x10, 0xc9, 0xec, 0xcc, 0x6e, + 0xcc, 0x65, 0xc9, 0xa2, 0x16, 0xd7, 0x65, 0xb2, 0xcf, 0xf3, 0xee, 0xef, 0x79, 0xdf, 0x99, 0x59, + 0x38, 0xb7, 0xa5, 0xf4, 0x63, 0xa5, 0xf9, 0x43, 0xc4, 0x30, 0x16, 0x32, 0xe1, 0x4f, 0x1a, 0x5d, + 0x4c, 0x44, 0x83, 0x6f, 0x0f, 0x31, 0xde, 0x61, 0x83, 0x58, 0x25, 0x8a, 0xae, 0xa4, 0x22, 0xe6, + 0x44, 0xcc, 0x8a, 0xbc, 0xd5, 0x22, 0x77, 0xa6, 0x34, 0x05, 0xbc, 0x4b, 0x56, 0xd7, 0x15, 0x1a, + 0xd3, 0xca, 0x99, 0x72, 0x20, 0xc2, 0x48, 0x8a, 0x24, 0x52, 0xd2, 0x6a, 0xcf, 0x84, 0x4a, 0x85, + 0x7d, 0xe4, 0x62, 0x10, 0x71, 0x21, 0xa5, 0x4a, 0xcc, 0x43, 0x6d, 0x9f, 0x9e, 0x4e, 0x2b, 0x3d, + 0x30, 0x2b, 0x6e, 0xb9, 0xcc, 0x22, 0x78, 0x01, 0x27, 0xef, 0x4c, 0x4a, 0x6f, 0xf6, 0xfb, 0xea, + 0xa9, 0x90, 0x5b, 0xd8, 0xc1, 0xed, 0x21, 0xea, 0x84, 0x36, 0xe1, 0x98, 0x81, 0xc1, 0xb8, 0x46, + 0xea, 0xe4, 0x42, 0xb5, 0x55, 0xfb, 0xf6, 0x79, 0xed, 0x84, 0xf5, 0x6e, 0xf6, 0x7a, 0x31, 0x6a, + 0x7d, 0x37, 0x89, 0x23, 0x19, 0x76, 0x9c, 0x30, 0xf7, 0x60, 0x6d, 0xa9, 0x9c, 0x07, 0x83, 0x7b, + 0x70, 0x6a, 0x16, 0x40, 0x0f, 0x94, 0xd4, 0x48, 0x6f, 0x42, 0x55, 0xb8, 0x3f, 0x0d, 0xc3, 0x72, + 0xd3, 0x67, 0x05, 0x4d, 0x65, 0xed, 0xc9, 0xaa, 0x93, 0x1b, 0x82, 0x37, 0x64, 0xb6, 0xb0, 0xde, + 0x17, 0x0d, 0xcb, 0x46, 0x43, 0x7a, 0x0b, 0x20, 0x6f, 0xba, 0x49, 0xb7, 0xdc, 0x5c, 0x75, 0x34, + 0x93, 0x09, 0xb1, 0x74, 0xf6, 0x8e, 0xe7, 0xb6, 0x08, 0x5d, 0x2b, 0x3b, 0x53, 0xce, 0xe0, 0x3d, + 0x81, 0x95, 0x7d, 0x58, 0x36, 0xf0, 0x06, 0x40, 0xc6, 0xaf, 0x6b, 0xa4, 0x7e, 0xa8, 0x44, 0xe2, + 0x29, 0x07, 0x6d, 0xcf, 0x61, 0x3c, 0xbf, 0x90, 0x31, 0x7d, 0xf9, 0x1f, 0x90, 0x6f, 0x09, 0x9c, + 0x9d, 0x81, 0x6c, 0xed, 0xb4, 0xd3, 0x21, 0xff, 0xcb, 0xfe, 0xf8, 0x5f, 0x4d, 0xfc, 0x48, 0xa0, + 0x5e, 0xcc, 0x77, 0xc0, 0xba, 0xd9, 0x7c, 0x77, 0x18, 0x8e, 0x18, 0x5a, 0xfa, 0x89, 0x40, 0x35, + 0x43, 0xa6, 0xac, 0x10, 0x66, 0xee, 0x89, 0xf4, 0x78, 0x69, 0x7d, 0x0a, 0x11, 0x6c, 0xbc, 0xfc, + 0xfe, 0xeb, 0xf5, 0xd2, 0x3a, 0xbd, 0xce, 0x8b, 0x6e, 0x9c, 0x2c, 0x2e, 0x7f, 0x6e, 0x67, 0xb4, + 0xeb, 0x7e, 0xe1, 0x2e, 0xfd, 0x40, 0x00, 0xf2, 0x0e, 0xd3, 0xb2, 0xef, 0x77, 0xe7, 0xcc, 0xbb, + 0x52, 0xde, 0x60, 0x89, 0xaf, 0x19, 0x62, 0x4e, 0xd7, 0x16, 0x13, 0xeb, 0x29, 0xd0, 0x2f, 0x04, + 0x8e, 0xcf, 0xd9, 0x0a, 0x74, 0xbd, 0x2c, 0xc0, 0xec, 0xee, 0xf6, 0x6e, 0xfc, 0x85, 0xd3, 0x66, + 0x68, 0x98, 0x0c, 0x97, 0xe9, 0xc5, 0xc2, 0x0c, 0x91, 0xd6, 0x43, 0xec, 0xe5, 0x2d, 0x6f, 0x35, + 0xbe, 0x8e, 0x7c, 0xb2, 0x37, 0xf2, 0xc9, 0xcf, 0x91, 0x4f, 0x5e, 0x8d, 0xfd, 0xca, 0xde, 0xd8, + 0xaf, 0xfc, 0x18, 0xfb, 0x95, 0xfb, 0xf6, 0x23, 0xa2, 0x7b, 0x8f, 0x58, 0xa4, 0xf8, 0xb3, 0xac, + 0x56, 0xf7, 0xa8, 0xb9, 0xbe, 0xaf, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x3d, 0x3a, 0x28, 0x67, + 0x8b, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -510,7 +423,6 @@ type QueryClient interface { // // Since: cosmos-sdk 0.46 AllowancesByGranter(ctx context.Context, in *QueryAllowancesByGranterRequest, opts ...grpc.CallOption) (*QueryAllowancesByGranterResponse, error) - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } type queryClient struct { @@ -548,15 +460,6 @@ func (c *queryClient) AllowancesByGranter(ctx context.Context, in *QueryAllowanc return out, nil } -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // QueryServer is the server API for Query service. type QueryServer interface { // Allowance returns granted allwance to the grantee by the granter. @@ -567,7 +470,6 @@ type QueryServer interface { // // Since: cosmos-sdk 0.46 AllowancesByGranter(context.Context, *QueryAllowancesByGranterRequest) (*QueryAllowancesByGranterResponse, error) - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -583,9 +485,6 @@ func (*UnimplementedQueryServer) Allowances(ctx context.Context, req *QueryAllow func (*UnimplementedQueryServer) AllowancesByGranter(ctx context.Context, req *QueryAllowancesByGranterRequest) (*QueryAllowancesByGranterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllowancesByGranter not implemented") } -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -645,24 +544,6 @@ func _Query_AllowancesByGranter_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.feegrant.v1beta1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.feegrant.v1beta1.Query", HandlerType: (*QueryServer)(nil), @@ -679,10 +560,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "AllowancesByGranter", Handler: _Query_AllowancesByGranter_Handler, }, - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/feegrant/v1beta1/query.proto", @@ -942,64 +819,6 @@ func (m *QueryAllowancesByGranterResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Params != nil { - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -1113,28 +932,6 @@ func (m *QueryAllowancesByGranterResponse) Size() (n int) { return n } -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Params != nil { - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1817,142 +1614,6 @@ func (m *QueryAllowancesByGranterResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Params == nil { - m.Params = &Params{} - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/feegrant/query.pb.gw.go b/x/feegrant/query.pb.gw.go index ddd1db23578d..a34118fd88a5 100644 --- a/x/feegrant/query.pb.gw.go +++ b/x/feegrant/query.pb.gw.go @@ -253,24 +253,6 @@ func local_request_Query_AllowancesByGranter_0(ctx context.Context, marshaler ru } -func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := server.Params(ctx, &protoReq) - return msg, metadata, err - -} - // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -346,29 +328,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -470,26 +429,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -499,8 +438,6 @@ var ( pattern_Query_Allowances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "feegrant", "v1beta1", "allowances", "grantee"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_AllowancesByGranter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "feegrant", "v1beta1", "issued", "granter"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "feegrant", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -509,6 +446,4 @@ var ( forward_Query_Allowances_0 = runtime.ForwardResponseMessage forward_Query_AllowancesByGranter_0 = runtime.ForwardResponseMessage - - forward_Query_Params_0 = runtime.ForwardResponseMessage ) From c67e5eff0558a6400e1d3b04c948e199cd0321cb Mon Sep 17 00:00:00 2001 From: Facundo Date: Fri, 13 Oct 2023 14:44:08 +0200 Subject: [PATCH 14/32] Revert "go mod tidy" This reverts commit 2a527531b33ce14b3303eabe2358a35579b4bb52. --- tests/go.mod | 2 +- tests/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/go.mod b/tests/go.mod index 436c2d2c466e..978e7ac89a5a 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -3,7 +3,7 @@ module github.com/cosmos/cosmos-sdk/tests go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f + cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/tests/go.sum b/tests/go.sum index c29fbfd76928..8c9dfdfb6573 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -187,8 +187,8 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f h1:ySFY7TrWCwfNxyx9qE9ObgfcgvYOrFM0gOko74hPkns= -cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= +cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= From be05fc1b757f8a385e2a83bb46c08aa9f58c6805 Mon Sep 17 00:00:00 2001 From: Facundo Date: Fri, 13 Oct 2023 14:44:08 +0200 Subject: [PATCH 15/32] Revert "go mod tidy" This reverts commit 572d6ee7590512c8ef297db7e6882d9eeebde8c4. --- go.sum | 2 ++ simapp/go.mod | 2 +- simapp/go.sum | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/go.sum b/go.sum index c66eb0ce844d..5a36a62084a6 100644 --- a/go.sum +++ b/go.sum @@ -35,6 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= +cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f h1:ySFY7TrWCwfNxyx9qE9ObgfcgvYOrFM0gOko74hPkns= cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= diff --git a/simapp/go.mod b/simapp/go.mod index f9795d7f8377..a53935071499 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/simapp go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f + cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 cosmossdk.io/client/v2 v2.0.0-20230630094428-02b760776860 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 diff --git a/simapp/go.sum b/simapp/go.sum index 41d4a1e3c3cd..3d513c4cdad4 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -187,8 +187,8 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f h1:ySFY7TrWCwfNxyx9qE9ObgfcgvYOrFM0gOko74hPkns= -cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= +cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= From d9096c48252f8ae1e8105944cbf9b985d9659272 Mon Sep 17 00:00:00 2001 From: Facundo Date: Fri, 13 Oct 2023 14:44:08 +0200 Subject: [PATCH 16/32] Revert "bump api" This reverts commit 332c9d513b0d3dd01fd1f26af1bd88750207319b. --- go.mod | 2 +- go.sum | 2 -- x/feegrant/go.mod | 3 ++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 50f742eb8c6c..b256ae749c7d 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ toolchain go1.21.0 module github.com/cosmos/cosmos-sdk require ( - cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f + cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/go.sum b/go.sum index 5a36a62084a6..d65bb755b2c7 100644 --- a/go.sum +++ b/go.sum @@ -37,8 +37,6 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= -cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f h1:ySFY7TrWCwfNxyx9qE9ObgfcgvYOrFM0gOko74hPkns= -cosmossdk.io/api v0.7.2-0.20231012113443-ff1d5e1bb63f/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index f5e7b5e2df7c..c893b257be21 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -157,4 +157,5 @@ require ( sigs.k8s.io/yaml v1.3.0 // indirect ) -replace github.com/cosmos/cosmos-sdk => ../../. \ No newline at end of file +replace github.com/cosmos/cosmos-sdk => ../../. +replace cosmossdk.io/api => ../../api From 5cd5ab98accc9af5116d14c660e98bfc5551c74f Mon Sep 17 00:00:00 2001 From: Facundo Date: Fri, 13 Oct 2023 14:44:08 +0200 Subject: [PATCH 17/32] Revert "fix autocli" This reverts commit ff1d5e1bb63fb3c85bdda00cd8220da077757ed7. --- x/feegrant/module/autocli.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/feegrant/module/autocli.go b/x/feegrant/module/autocli.go index 93e6f9cf0ad7..ac0e724941e1 100644 --- a/x/feegrant/module/autocli.go +++ b/x/feegrant/module/autocli.go @@ -73,7 +73,7 @@ You can find the fee-grant of a granter and grantee.`), Use: "prune", Short: "Prune expired allowances", Long: "Prune a limited amount of expired allowances in order to reduce the size of the store when the number of expired allowances is large.", - Example: fmt.Sprintf(`$ %s tx feegrant prune --from [mykey]`, version.AppName), + Example: fmt.Sprintf(`$ %s tx feegrant prune`, version.AppName), }, }, EnhanceCustomCommand: true, From 74066e483803484c61b6b49448f5fa1d6dae4975 Mon Sep 17 00:00:00 2001 From: Facundo Date: Fri, 13 Oct 2023 14:44:59 +0200 Subject: [PATCH 18/32] re-do autocli --- x/feegrant/module/autocli.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/feegrant/module/autocli.go b/x/feegrant/module/autocli.go index ac0e724941e1..93e6f9cf0ad7 100644 --- a/x/feegrant/module/autocli.go +++ b/x/feegrant/module/autocli.go @@ -73,7 +73,7 @@ You can find the fee-grant of a granter and grantee.`), Use: "prune", Short: "Prune expired allowances", Long: "Prune a limited amount of expired allowances in order to reduce the size of the store when the number of expired allowances is large.", - Example: fmt.Sprintf(`$ %s tx feegrant prune`, version.AppName), + Example: fmt.Sprintf(`$ %s tx feegrant prune --from [mykey]`, version.AppName), }, }, EnhanceCustomCommand: true, From f545db3ac5d4d2c5ef89fb5a2d55471be4682f82 Mon Sep 17 00:00:00 2001 From: Facundo Date: Fri, 13 Oct 2023 14:46:06 +0200 Subject: [PATCH 19/32] Revert "add params and authority" This reverts commit b6da60c6a79ee85cca8a349b19fbd4a199432f48. --- .../feegrant/module/v1/module.pulsar.go | 116 +- .../feegrant/v1beta1/feegrant.pulsar.go | 576 +------- api/cosmos/feegrant/v1beta1/genesis.pulsar.go | 145 +- api/cosmos/feegrant/v1beta1/tx.pulsar.go | 1172 ++--------------- api/cosmos/feegrant/v1beta1/tx_grpc.pb.go | 39 - proto/cosmos/feegrant/module/v1/module.proto | 3 - proto/cosmos/feegrant/v1beta1/feegrant.proto | 9 - proto/cosmos/feegrant/v1beta1/genesis.proto | 1 - proto/cosmos/feegrant/v1beta1/tx.proto | 23 +- x/feegrant/feegrant.pb.go | 281 +--- x/feegrant/genesis.go | 18 +- x/feegrant/genesis.pb.go | 73 +- x/feegrant/go.mod | 1 - x/feegrant/keeper/keeper.go | 9 +- x/feegrant/keeper/msg_server.go | 19 - x/feegrant/key.go | 2 - x/feegrant/module/autocli.go | 5 - x/feegrant/module/module.go | 16 +- x/feegrant/tx.pb.go | 454 +------ 19 files changed, 257 insertions(+), 2705 deletions(-) diff --git a/api/cosmos/feegrant/module/v1/module.pulsar.go b/api/cosmos/feegrant/module/v1/module.pulsar.go index c60310da52e1..70a90af5da32 100644 --- a/api/cosmos/feegrant/module/v1/module.pulsar.go +++ b/api/cosmos/feegrant/module/v1/module.pulsar.go @@ -14,14 +14,12 @@ import ( ) var ( - md_Module protoreflect.MessageDescriptor - fd_Module_authority protoreflect.FieldDescriptor + md_Module protoreflect.MessageDescriptor ) func init() { file_cosmos_feegrant_module_v1_module_proto_init() md_Module = File_cosmos_feegrant_module_v1_module_proto.Messages().ByName("Module") - fd_Module_authority = md_Module.Fields().ByName("authority") } var _ protoreflect.Message = (*fastReflection_Module)(nil) @@ -89,12 +87,6 @@ func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_Module_authority, value) { - return - } - } } // Has reports whether a field is populated. @@ -110,8 +102,6 @@ func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, proto // a repeated field is populated if it is non-empty. func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.feegrant.module.v1.Module.authority": - return x.Authority != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.module.v1.Module")) @@ -128,8 +118,6 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.feegrant.module.v1.Module.authority": - x.Authority = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.module.v1.Module")) @@ -146,9 +134,6 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.feegrant.module.v1.Module.authority": - value := x.Authority - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.module.v1.Module")) @@ -169,8 +154,6 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.feegrant.module.v1.Module.authority": - x.Authority = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.module.v1.Module")) @@ -191,8 +174,6 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.feegrant.module.v1.Module.authority": - panic(fmt.Errorf("field authority of message cosmos.feegrant.module.v1.Module is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.module.v1.Module")) @@ -206,8 +187,6 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.feegrant.module.v1.Module.authority": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.module.v1.Module")) @@ -277,10 +256,6 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -310,13 +285,6 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -366,38 +334,6 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: 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 Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -451,9 +387,6 @@ type Module struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // authority defines the custom module authority. If not set, defaults to the governance module. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` } func (x *Module) Reset() { @@ -476,13 +409,6 @@ func (*Module) Descriptor() ([]byte, []int) { return file_cosmos_feegrant_module_v1_module_proto_rawDescGZIP(), []int{0} } -func (x *Module) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - var File_cosmos_feegrant_module_v1_module_proto protoreflect.FileDescriptor var file_cosmos_feegrant_module_v1_module_proto_rawDesc = []byte{ @@ -492,27 +418,25 @@ var file_cosmos_feegrant_module_v1_module_proto_rawDesc = []byte{ 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x47, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x1f, 0xba, - 0xc0, 0x96, 0xda, 0x01, 0x19, 0x0a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x78, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x42, 0xe8, - 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, - 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, - 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x33, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x4d, 0xaa, 0x02, 0x19, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x25, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, + 0x1f, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x19, 0x0a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x78, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x42, 0xe8, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, + 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x33, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x4d, 0xaa, 0x02, 0x19, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, + 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, + 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go b/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go index f9aef739f73a..fbd2ee96c773 100644 --- a/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go +++ b/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go @@ -2583,458 +2583,6 @@ func (x *fastReflection_Grant) ProtoMethods() *protoiface.Methods { } } -var ( - md_Params protoreflect.MessageDescriptor - fd_Params_endblock_prunes protoreflect.FieldDescriptor - fd_Params_manual_prunes protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_feegrant_proto_init() - md_Params = File_cosmos_feegrant_v1beta1_feegrant_proto.Messages().ByName("Params") - fd_Params_endblock_prunes = md_Params.Fields().ByName("endblock_prunes") - fd_Params_manual_prunes = md_Params.Fields().ByName("manual_prunes") -} - -var _ protoreflect.Message = (*fastReflection_Params)(nil) - -type fastReflection_Params Params - -func (x *Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_Params)(x) -} - -func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[4] - 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_Params_messageType fastReflection_Params_messageType -var _ protoreflect.MessageType = fastReflection_Params_messageType{} - -type fastReflection_Params_messageType struct{} - -func (x fastReflection_Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_Params)(nil) -} -func (x fastReflection_Params_messageType) New() protoreflect.Message { - return new(fastReflection_Params) -} -func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// 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_Params) Type() protoreflect.MessageType { - return _fastReflection_Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Params) New() protoreflect.Message { - return new(fastReflection_Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { - return (*Params)(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_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.EndblockPrunes != uint64(0) { - value := protoreflect.ValueOfUint64(x.EndblockPrunes) - if !f(fd_Params_endblock_prunes, value) { - return - } - } - if x.ManualPrunes != uint64(0) { - value := protoreflect.ValueOfUint64(x.ManualPrunes) - if !f(fd_Params_manual_prunes, 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_Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.Params.endblock_prunes": - return x.EndblockPrunes != uint64(0) - case "cosmos.feegrant.v1beta1.Params.manual_prunes": - return x.ManualPrunes != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Params 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_Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.Params.endblock_prunes": - x.EndblockPrunes = uint64(0) - case "cosmos.feegrant.v1beta1.Params.manual_prunes": - x.ManualPrunes = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Params 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_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.Params.endblock_prunes": - value := x.EndblockPrunes - return protoreflect.ValueOfUint64(value) - case "cosmos.feegrant.v1beta1.Params.manual_prunes": - value := x.ManualPrunes - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Params 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_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.Params.endblock_prunes": - x.EndblockPrunes = value.Uint() - case "cosmos.feegrant.v1beta1.Params.manual_prunes": - x.ManualPrunes = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Params 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_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.Params.endblock_prunes": - panic(fmt.Errorf("field endblock_prunes of message cosmos.feegrant.v1beta1.Params is not mutable")) - case "cosmos.feegrant.v1beta1.Params.manual_prunes": - panic(fmt.Errorf("field manual_prunes of message cosmos.feegrant.v1beta1.Params is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Params 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_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.Params.endblock_prunes": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.feegrant.v1beta1.Params.manual_prunes": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Params 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_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.Params", 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_Params) 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_Params) 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_Params) 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_Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Params) - 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.EndblockPrunes != 0 { - n += 1 + runtime.Sov(uint64(x.EndblockPrunes)) - } - if x.ManualPrunes != 0 { - n += 1 + runtime.Sov(uint64(x.ManualPrunes)) - } - 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().(*Params) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.ManualPrunes != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ManualPrunes)) - i-- - dAtA[i] = 0x10 - } - if x.EndblockPrunes != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.EndblockPrunes)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Params) - 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: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EndblockPrunes", wireType) - } - x.EndblockPrunes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.EndblockPrunes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ManualPrunes", wireType) - } - x.ManualPrunes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ManualPrunes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - // Since: cosmos-sdk 0.43 // Code generated by protoc-gen-go. DO NOT EDIT. @@ -3278,52 +2826,6 @@ func (x *Grant) GetAllowance() *anypb.Any { return nil } -// Params defines the parameters for the x/feegrant module. -type Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // amount of expired grants to prune at endblock - EndblockPrunes uint64 `protobuf:"varint,1,opt,name=endblock_prunes,json=endblockPrunes,proto3" json:"endblock_prunes,omitempty"` - // amount of expired grants to prune using MsgPruneAllowances - ManualPrunes uint64 `protobuf:"varint,2,opt,name=manual_prunes,json=manualPrunes,proto3" json:"manual_prunes,omitempty"` -} - -func (x *Params) Reset() { - *x = Params{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Params) ProtoMessage() {} - -// Deprecated: Use Params.ProtoReflect.Descriptor instead. -func (*Params) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescGZIP(), []int{4} -} - -func (x *Params) GetEndblockPrunes() uint64 { - if x != nil { - return x.EndblockPrunes - } - return 0 -} - -func (x *Params) GetManualPrunes() uint64 { - if x != nil { - return x.ManualPrunes - } - return 0 -} - var File_cosmos_feegrant_v1beta1_feegrant_proto protoreflect.FileDescriptor var file_cosmos_feegrant_v1beta1_feegrant_proto_rawDesc = []byte{ @@ -3427,27 +2929,22 @@ var file_cosmos_feegrant_v1beta1_feegrant_proto_rawDesc = []byte{ 0x29, 0xca, 0xb4, 0x2d, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x70, 0x72, 0x75, 0x6e, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x65, 0x6e, 0x64, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x6e, 0x75, - 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x73, 0x42, 0xe4, 0x01, - 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0d, 0x46, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, - 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x77, 0x61, 0x6e, 0x63, 0x65, 0x42, 0xe4, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0d, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, + 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3462,28 +2959,27 @@ func file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescGZIP() []byte { return file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescData } -var file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_cosmos_feegrant_v1beta1_feegrant_proto_goTypes = []interface{}{ (*BasicAllowance)(nil), // 0: cosmos.feegrant.v1beta1.BasicAllowance (*PeriodicAllowance)(nil), // 1: cosmos.feegrant.v1beta1.PeriodicAllowance (*AllowedMsgAllowance)(nil), // 2: cosmos.feegrant.v1beta1.AllowedMsgAllowance (*Grant)(nil), // 3: cosmos.feegrant.v1beta1.Grant - (*Params)(nil), // 4: cosmos.feegrant.v1beta1.Params - (*v1beta1.Coin)(nil), // 5: cosmos.base.v1beta1.Coin - (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 7: google.protobuf.Duration - (*anypb.Any)(nil), // 8: google.protobuf.Any + (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 6: google.protobuf.Duration + (*anypb.Any)(nil), // 7: google.protobuf.Any } var file_cosmos_feegrant_v1beta1_feegrant_proto_depIdxs = []int32{ - 5, // 0: cosmos.feegrant.v1beta1.BasicAllowance.spend_limit:type_name -> cosmos.base.v1beta1.Coin - 6, // 1: cosmos.feegrant.v1beta1.BasicAllowance.expiration:type_name -> google.protobuf.Timestamp + 4, // 0: cosmos.feegrant.v1beta1.BasicAllowance.spend_limit:type_name -> cosmos.base.v1beta1.Coin + 5, // 1: cosmos.feegrant.v1beta1.BasicAllowance.expiration:type_name -> google.protobuf.Timestamp 0, // 2: cosmos.feegrant.v1beta1.PeriodicAllowance.basic:type_name -> cosmos.feegrant.v1beta1.BasicAllowance - 7, // 3: cosmos.feegrant.v1beta1.PeriodicAllowance.period:type_name -> google.protobuf.Duration - 5, // 4: cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit:type_name -> cosmos.base.v1beta1.Coin - 5, // 5: cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend:type_name -> cosmos.base.v1beta1.Coin - 6, // 6: cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset:type_name -> google.protobuf.Timestamp - 8, // 7: cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance:type_name -> google.protobuf.Any - 8, // 8: cosmos.feegrant.v1beta1.Grant.allowance:type_name -> google.protobuf.Any + 6, // 3: cosmos.feegrant.v1beta1.PeriodicAllowance.period:type_name -> google.protobuf.Duration + 4, // 4: cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit:type_name -> cosmos.base.v1beta1.Coin + 4, // 5: cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend:type_name -> cosmos.base.v1beta1.Coin + 5, // 6: cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset:type_name -> google.protobuf.Timestamp + 7, // 7: cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance:type_name -> google.protobuf.Any + 7, // 8: cosmos.feegrant.v1beta1.Grant.allowance:type_name -> google.protobuf.Any 9, // [9:9] is the sub-list for method output_type 9, // [9:9] is the sub-list for method input_type 9, // [9:9] is the sub-list for extension type_name @@ -3545,18 +3041,6 @@ func file_cosmos_feegrant_v1beta1_feegrant_proto_init() { return nil } } - file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Params); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -3564,7 +3048,7 @@ func file_cosmos_feegrant_v1beta1_feegrant_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_feegrant_v1beta1_feegrant_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/api/cosmos/feegrant/v1beta1/genesis.pulsar.go b/api/cosmos/feegrant/v1beta1/genesis.pulsar.go index 83fc5f5eb4c0..459af1b1511d 100644 --- a/api/cosmos/feegrant/v1beta1/genesis.pulsar.go +++ b/api/cosmos/feegrant/v1beta1/genesis.pulsar.go @@ -68,14 +68,12 @@ func (x *_GenesisState_1_list) IsValid() bool { var ( md_GenesisState protoreflect.MessageDescriptor fd_GenesisState_allowances protoreflect.FieldDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor ) func init() { file_cosmos_feegrant_v1beta1_genesis_proto_init() md_GenesisState = File_cosmos_feegrant_v1beta1_genesis_proto.Messages().ByName("GenesisState") fd_GenesisState_allowances = md_GenesisState.Fields().ByName("allowances") - fd_GenesisState_params = md_GenesisState.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) @@ -149,12 +147,6 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, return } } - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_GenesisState_params, value) { - return - } - } } // Has reports whether a field is populated. @@ -172,8 +164,6 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool switch fd.FullName() { case "cosmos.feegrant.v1beta1.GenesisState.allowances": return len(x.Allowances) != 0 - case "cosmos.feegrant.v1beta1.GenesisState.params": - return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) @@ -192,8 +182,6 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "cosmos.feegrant.v1beta1.GenesisState.allowances": x.Allowances = nil - case "cosmos.feegrant.v1beta1.GenesisState.params": - x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) @@ -216,9 +204,6 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto } listValue := &_GenesisState_1_list{list: &x.Allowances} return protoreflect.ValueOfList(listValue) - case "cosmos.feegrant.v1beta1.GenesisState.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) @@ -243,8 +228,6 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value lv := value.List() clv := lv.(*_GenesisState_1_list) x.Allowances = *clv.list - case "cosmos.feegrant.v1beta1.GenesisState.params": - x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) @@ -271,11 +254,6 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p } value := &_GenesisState_1_list{list: &x.Allowances} return protoreflect.ValueOfList(value) - case "cosmos.feegrant.v1beta1.GenesisState.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) @@ -292,9 +270,6 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) case "cosmos.feegrant.v1beta1.GenesisState.allowances": list := []*Grant{} return protoreflect.ValueOfList(&_GenesisState_1_list{list: &list}) - case "cosmos.feegrant.v1beta1.GenesisState.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) @@ -370,10 +345,6 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -403,20 +374,6 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } if len(x.Allowances) > 0 { for iNdEx := len(x.Allowances) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Allowances[iNdEx]) @@ -516,42 +473,6 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -609,7 +530,6 @@ type GenesisState struct { unknownFields protoimpl.UnknownFields Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` - Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` } func (x *GenesisState) Reset() { @@ -639,13 +559,6 @@ func (x *GenesisState) GetAllowances() []*Grant { return nil } -func (x *GenesisState) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - var File_cosmos_feegrant_v1beta1_genesis_proto protoreflect.FileDescriptor var file_cosmos_feegrant_v1beta1_genesis_proto_rawDesc = []byte{ @@ -658,31 +571,27 @@ var file_cosmos_feegrant_v1beta1_genesis_proto_rawDesc = []byte{ 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x9d, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, - 0x01, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x42, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, - 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x42, 0xe3, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, - 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x22, 0x59, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, + 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x47, 0x72, 0x61, 0x6e, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0xe3, 0x01, 0x0a, + 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, + 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, 0x17, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, + 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -701,16 +610,14 @@ var file_cosmos_feegrant_v1beta1_genesis_proto_msgTypes = make([]protoimpl.Messa var file_cosmos_feegrant_v1beta1_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: cosmos.feegrant.v1beta1.GenesisState (*Grant)(nil), // 1: cosmos.feegrant.v1beta1.Grant - (*Params)(nil), // 2: cosmos.feegrant.v1beta1.Params } var file_cosmos_feegrant_v1beta1_genesis_proto_depIdxs = []int32{ 1, // 0: cosmos.feegrant.v1beta1.GenesisState.allowances:type_name -> cosmos.feegrant.v1beta1.Grant - 2, // 1: cosmos.feegrant.v1beta1.GenesisState.params:type_name -> cosmos.feegrant.v1beta1.Params - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] 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 + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_cosmos_feegrant_v1beta1_genesis_proto_init() } diff --git a/api/cosmos/feegrant/v1beta1/tx.pulsar.go b/api/cosmos/feegrant/v1beta1/tx.pulsar.go index edb6f1705695..c27b7c8e51c3 100644 --- a/api/cosmos/feegrant/v1beta1/tx.pulsar.go +++ b/api/cosmos/feegrant/v1beta1/tx.pulsar.go @@ -7,7 +7,6 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -2552,861 +2551,6 @@ func (x *fastReflection_MsgPruneAllowancesResponse) ProtoMethods() *protoiface.M } } -var ( - md_MsgUpdateParams protoreflect.MessageDescriptor - fd_MsgUpdateParams_authority protoreflect.FieldDescriptor - fd_MsgUpdateParams_params protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_tx_proto_init() - md_MsgUpdateParams = File_cosmos_feegrant_v1beta1_tx_proto.Messages().ByName("MsgUpdateParams") - fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") - fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) - -type fastReflection_MsgUpdateParams MsgUpdateParams - -func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(x) -} - -func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_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_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} - -type fastReflection_MsgUpdateParams_messageType struct{} - -func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(nil) -} -func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) -} -func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams -} - -// 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_MsgUpdateParams) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParams)(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_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgUpdateParams_authority, value) { - return - } - } - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_MsgUpdateParams_params, 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_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.MsgUpdateParams.authority": - return x.Authority != "" - case "cosmos.feegrant.v1beta1.MsgUpdateParams.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParams")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParams 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_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.MsgUpdateParams.authority": - x.Authority = "" - case "cosmos.feegrant.v1beta1.MsgUpdateParams.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParams")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParams 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_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.MsgUpdateParams.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "cosmos.feegrant.v1beta1.MsgUpdateParams.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParams")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParams 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_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.MsgUpdateParams.authority": - x.Authority = value.Interface().(string) - case "cosmos.feegrant.v1beta1.MsgUpdateParams.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParams")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParams 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_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.MsgUpdateParams.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "cosmos.feegrant.v1beta1.MsgUpdateParams.authority": - panic(fmt.Errorf("field authority of message cosmos.feegrant.v1beta1.MsgUpdateParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParams")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParams 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_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.MsgUpdateParams.authority": - return protoreflect.ValueOfString("") - case "cosmos.feegrant.v1beta1.MsgUpdateParams.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParams")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParams 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_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.MsgUpdateParams", 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_MsgUpdateParams) 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_MsgUpdateParams) 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_MsgUpdateParams) 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_MsgUpdateParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParams) - 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.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Params != nil { - l = options.Size(x.Params) - 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().(*MsgUpdateParams) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - 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().(*MsgUpdateParams) - 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: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: 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 Authority", 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.Authority = 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 Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateParamsResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_tx_proto_init() - md_MsgUpdateParamsResponse = File_cosmos_feegrant_v1beta1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) - -type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse - -func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(x) -} - -func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_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_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} - -type fastReflection_MsgUpdateParamsResponse_messageType struct{} - -func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(nil) -} -func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) -} -func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse -} - -// 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_MsgUpdateParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParamsResponse)(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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) 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.feegrant.v1beta1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.MsgUpdateParamsResponse", 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - 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().(*MsgUpdateParamsResponse) - 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().(*MsgUpdateParamsResponse) - 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: MsgUpdateParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: 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, - } -} - // Since: cosmos-sdk 0.43 // Code generated by protoc-gen-go. DO NOT EDIT. @@ -3642,192 +2786,95 @@ func (*MsgPruneAllowancesResponse) Descriptor() ([]byte, []int) { return file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{5} } -// MsgUpdateParams is the Msg/UpdateParams request type. -type MsgUpdateParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // params defines the x/feegrant parameters to update. - // - // NOTE: All parameters must be supplied. - Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *MsgUpdateParams) Reset() { - *x = MsgUpdateParams{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateParams) ProtoMessage() {} - -// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. -func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{6} -} - -func (x *MsgUpdateParams) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgUpdateParams) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// MsgUpdateParamsResponse defines the response structure of the UpdateParams. -type MsgUpdateParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateParamsResponse) Reset() { - *x = MsgUpdateParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateParamsResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{7} -} - var File_cosmos_feegrant_v1beta1_tx_proto protoreflect.FileDescriptor var file_cosmos_feegrant_v1beta1_tx_proto_rawDesc = []byte{ 0x0a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, - 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x02, 0x0a, 0x11, - 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, - 0x65, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, + 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x02, + 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, + 0x6e, 0x63, 0x65, 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, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x5d, 0x0a, 0x09, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x29, 0xca, 0xb4, 0x2d, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x52, + 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x2d, 0x82, 0xe7, 0xb0, 0x2a, + 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1c, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, + 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, + 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xac, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 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, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x5d, 0x0a, 0x09, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, - 0x6e, 0x79, 0x42, 0x29, 0xca, 0xb4, 0x2d, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x52, 0x09, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x2d, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, - 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xac, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, - 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 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, - 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x65, 0x65, 0x3a, 0x2e, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, - 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, - 0x6e, 0x63, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x53, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, - 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 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, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, - 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x79, 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, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x12, 0x42, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, - 0xd4, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x70, 0x0a, 0x0e, 0x47, 0x72, 0x61, 0x6e, 0x74, - 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, - 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x0f, 0x52, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x2e, 0x63, + 0x61, 0x6e, 0x74, 0x65, 0x65, 0x3a, 0x2e, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, + 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, + 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x53, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, + 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 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, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x50, + 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe8, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x70, + 0x0a, 0x0e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, + 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, + 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, - 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, - 0x0a, 0x0f, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, - 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, - 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x33, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, - 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, + 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x73, 0x0a, 0x0f, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, + 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x30, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, - 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xde, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, - 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, + 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x0f, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, + 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, + 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, + 0x01, 0x42, 0xde, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, 0x17, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, + 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3842,7 +2889,7 @@ func file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP() []byte { return file_cosmos_feegrant_v1beta1_tx_proto_rawDescData } -var file_cosmos_feegrant_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_cosmos_feegrant_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_cosmos_feegrant_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgGrantAllowance)(nil), // 0: cosmos.feegrant.v1beta1.MsgGrantAllowance (*MsgGrantAllowanceResponse)(nil), // 1: cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse @@ -3850,27 +2897,21 @@ var file_cosmos_feegrant_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgRevokeAllowanceResponse)(nil), // 3: cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse (*MsgPruneAllowances)(nil), // 4: cosmos.feegrant.v1beta1.MsgPruneAllowances (*MsgPruneAllowancesResponse)(nil), // 5: cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse - (*MsgUpdateParams)(nil), // 6: cosmos.feegrant.v1beta1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 7: cosmos.feegrant.v1beta1.MsgUpdateParamsResponse - (*anypb.Any)(nil), // 8: google.protobuf.Any - (*Params)(nil), // 9: cosmos.feegrant.v1beta1.Params + (*anypb.Any)(nil), // 6: google.protobuf.Any } var file_cosmos_feegrant_v1beta1_tx_proto_depIdxs = []int32{ - 8, // 0: cosmos.feegrant.v1beta1.MsgGrantAllowance.allowance:type_name -> google.protobuf.Any - 9, // 1: cosmos.feegrant.v1beta1.MsgUpdateParams.params:type_name -> cosmos.feegrant.v1beta1.Params - 0, // 2: cosmos.feegrant.v1beta1.Msg.GrantAllowance:input_type -> cosmos.feegrant.v1beta1.MsgGrantAllowance - 2, // 3: cosmos.feegrant.v1beta1.Msg.RevokeAllowance:input_type -> cosmos.feegrant.v1beta1.MsgRevokeAllowance - 4, // 4: cosmos.feegrant.v1beta1.Msg.PruneAllowances:input_type -> cosmos.feegrant.v1beta1.MsgPruneAllowances - 6, // 5: cosmos.feegrant.v1beta1.Msg.UpdateParams:input_type -> cosmos.feegrant.v1beta1.MsgUpdateParams - 1, // 6: cosmos.feegrant.v1beta1.Msg.GrantAllowance:output_type -> cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse - 3, // 7: cosmos.feegrant.v1beta1.Msg.RevokeAllowance:output_type -> cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse - 5, // 8: cosmos.feegrant.v1beta1.Msg.PruneAllowances:output_type -> cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse - 7, // 9: cosmos.feegrant.v1beta1.Msg.UpdateParams:output_type -> cosmos.feegrant.v1beta1.MsgUpdateParamsResponse - 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 + 6, // 0: cosmos.feegrant.v1beta1.MsgGrantAllowance.allowance:type_name -> google.protobuf.Any + 0, // 1: cosmos.feegrant.v1beta1.Msg.GrantAllowance:input_type -> cosmos.feegrant.v1beta1.MsgGrantAllowance + 2, // 2: cosmos.feegrant.v1beta1.Msg.RevokeAllowance:input_type -> cosmos.feegrant.v1beta1.MsgRevokeAllowance + 4, // 3: cosmos.feegrant.v1beta1.Msg.PruneAllowances:input_type -> cosmos.feegrant.v1beta1.MsgPruneAllowances + 1, // 4: cosmos.feegrant.v1beta1.Msg.GrantAllowance:output_type -> cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse + 3, // 5: cosmos.feegrant.v1beta1.Msg.RevokeAllowance:output_type -> cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse + 5, // 6: cosmos.feegrant.v1beta1.Msg.PruneAllowances:output_type -> cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_cosmos_feegrant_v1beta1_tx_proto_init() } @@ -3878,7 +2919,6 @@ func file_cosmos_feegrant_v1beta1_tx_proto_init() { if File_cosmos_feegrant_v1beta1_tx_proto != nil { return } - file_cosmos_feegrant_v1beta1_feegrant_proto_init() if !protoimpl.UnsafeEnabled { file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgGrantAllowance); i { @@ -3952,30 +2992,6 @@ func file_cosmos_feegrant_v1beta1_tx_proto_init() { return nil } } - file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -3983,7 +2999,7 @@ func file_cosmos_feegrant_v1beta1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_feegrant_v1beta1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go b/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go index 9b1a73555429..1bfb94127da1 100644 --- a/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go +++ b/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go @@ -24,7 +24,6 @@ const ( Msg_GrantAllowance_FullMethodName = "/cosmos.feegrant.v1beta1.Msg/GrantAllowance" Msg_RevokeAllowance_FullMethodName = "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance" Msg_PruneAllowances_FullMethodName = "/cosmos.feegrant.v1beta1.Msg/PruneAllowances" - Msg_UpdateParams_FullMethodName = "/cosmos.feegrant.v1beta1.Msg/UpdateParams" ) // MsgClient is the client API for Msg service. @@ -39,8 +38,6 @@ type MsgClient interface { RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, error) // PruneAllowances prunes expired fee allowances. PruneAllowances(ctx context.Context, in *MsgPruneAllowances, opts ...grpc.CallOption) (*MsgPruneAllowancesResponse, error) - // UpdateParams updates the parameters of the feegrant module. - UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } type msgClient struct { @@ -78,15 +75,6 @@ func (c *msgClient) PruneAllowances(ctx context.Context, in *MsgPruneAllowances, return out, nil } -func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { - out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -99,8 +87,6 @@ type MsgServer interface { RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) // PruneAllowances prunes expired fee allowances. PruneAllowances(context.Context, *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) - // UpdateParams updates the parameters of the feegrant module. - UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) mustEmbedUnimplementedMsgServer() } @@ -117,9 +103,6 @@ func (UnimplementedMsgServer) RevokeAllowance(context.Context, *MsgRevokeAllowan func (UnimplementedMsgServer) PruneAllowances(context.Context, *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PruneAllowances not implemented") } -func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") -} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -187,24 +170,6 @@ func _Msg_PruneAllowances_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateParams) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_UpdateParams_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) - } - return interceptor(ctx, in, info, handler) -} - // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -224,10 +189,6 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "PruneAllowances", Handler: _Msg_PruneAllowances_Handler, }, - { - MethodName: "UpdateParams", - Handler: _Msg_UpdateParams_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/feegrant/v1beta1/tx.proto", diff --git a/proto/cosmos/feegrant/module/v1/module.proto b/proto/cosmos/feegrant/module/v1/module.proto index b9f1260463df..c5d6c24e07c5 100644 --- a/proto/cosmos/feegrant/module/v1/module.proto +++ b/proto/cosmos/feegrant/module/v1/module.proto @@ -9,7 +9,4 @@ message Module { option (cosmos.app.v1alpha1.module) = { go_import: "cosmossdk.io/x/feegrant" }; - - // authority defines the custom module authority. If not set, defaults to the governance module. - string authority = 1; } \ No newline at end of file diff --git a/proto/cosmos/feegrant/v1beta1/feegrant.proto b/proto/cosmos/feegrant/v1beta1/feegrant.proto index b836327a9b79..a1c67eafbd15 100644 --- a/proto/cosmos/feegrant/v1beta1/feegrant.proto +++ b/proto/cosmos/feegrant/v1beta1/feegrant.proto @@ -94,12 +94,3 @@ message Grant { // allowance can be any of basic, periodic, allowed fee allowance. google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "cosmos.feegrant.v1beta1.FeeAllowanceI"]; } - -// Params defines the parameters for the x/feegrant module. -message Params { - // amount of expired grants to prune at endblock - uint64 endblock_prunes = 1; - - // amount of expired grants to prune using MsgPruneAllowances - uint64 manual_prunes = 2; -} \ No newline at end of file diff --git a/proto/cosmos/feegrant/v1beta1/genesis.proto b/proto/cosmos/feegrant/v1beta1/genesis.proto index 4b632da089fc..ac7e57e1e44a 100644 --- a/proto/cosmos/feegrant/v1beta1/genesis.proto +++ b/proto/cosmos/feegrant/v1beta1/genesis.proto @@ -11,5 +11,4 @@ option go_package = "cosmossdk.io/x/feegrant"; // GenesisState contains a set of fee allowances, persisted from the store message GenesisState { repeated Grant allowances = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } diff --git a/proto/cosmos/feegrant/v1beta1/tx.proto b/proto/cosmos/feegrant/v1beta1/tx.proto index fcb1058dc54e..d71dac092491 100644 --- a/proto/cosmos/feegrant/v1beta1/tx.proto +++ b/proto/cosmos/feegrant/v1beta1/tx.proto @@ -2,12 +2,10 @@ syntax = "proto3"; package cosmos.feegrant.v1beta1; -import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/msg/v1/msg.proto"; import "amino/amino.proto"; -import "cosmos/feegrant/v1beta1/feegrant.proto"; option go_package = "cosmossdk.io/x/feegrant"; @@ -25,9 +23,6 @@ service Msg { // PruneAllowances prunes expired fee allowances. rpc PruneAllowances(MsgPruneAllowances) returns (MsgPruneAllowancesResponse); - - // UpdateParams updates the parameters of the feegrant module. - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); } // MsgGrantAllowance adds permission for Grantee to spend up to Allowance @@ -73,20 +68,4 @@ message MsgPruneAllowances { } // MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. -message MsgPruneAllowancesResponse {} - -// MsgUpdateParams is the Msg/UpdateParams request type. -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // params defines the x/feegrant parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgUpdateParamsResponse defines the response structure of the UpdateParams. -message MsgUpdateParamsResponse {} +message MsgPruneAllowancesResponse {} \ No newline at end of file diff --git a/x/feegrant/feegrant.pb.go b/x/feegrant/feegrant.pb.go index 3603a427bcb5..b30f725c8a7f 100644 --- a/x/feegrant/feegrant.pb.go +++ b/x/feegrant/feegrant.pb.go @@ -283,67 +283,11 @@ func (m *Grant) GetAllowance() *types1.Any { return nil } -// Params defines the parameters for the x/feegrant module. -type Params struct { - // amount of expired grants to prune at endblock - EndblockPrunes uint64 `protobuf:"varint,1,opt,name=endblock_prunes,json=endblockPrunes,proto3" json:"endblock_prunes,omitempty"` - // amount of expired grants to prune using MsgPruneAllowances - ManualPrunes uint64 `protobuf:"varint,2,opt,name=manual_prunes,json=manualPrunes,proto3" json:"manual_prunes,omitempty"` -} - -func (m *Params) Reset() { *m = Params{} } -func (m *Params) String() string { return proto.CompactTextString(m) } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_7279582900c30aea, []int{4} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func (m *Params) GetEndblockPrunes() uint64 { - if m != nil { - return m.EndblockPrunes - } - return 0 -} - -func (m *Params) GetManualPrunes() uint64 { - if m != nil { - return m.ManualPrunes - } - return 0 -} - func init() { proto.RegisterType((*BasicAllowance)(nil), "cosmos.feegrant.v1beta1.BasicAllowance") proto.RegisterType((*PeriodicAllowance)(nil), "cosmos.feegrant.v1beta1.PeriodicAllowance") proto.RegisterType((*AllowedMsgAllowance)(nil), "cosmos.feegrant.v1beta1.AllowedMsgAllowance") proto.RegisterType((*Grant)(nil), "cosmos.feegrant.v1beta1.Grant") - proto.RegisterType((*Params)(nil), "cosmos.feegrant.v1beta1.Params") } func init() { @@ -351,52 +295,49 @@ func init() { } var fileDescriptor_7279582900c30aea = []byte{ - // 707 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x4f, 0xd4, 0x40, - 0x14, 0xde, 0xd9, 0x5d, 0x30, 0x3b, 0xcb, 0xcf, 0x4a, 0xe2, 0x2e, 0x31, 0x5d, 0xb2, 0x46, 0x59, - 0x48, 0x68, 0x03, 0xde, 0x38, 0x41, 0x31, 0xa0, 0x06, 0x92, 0x4d, 0x31, 0x1e, 0x4c, 0x4c, 0x33, - 0x6d, 0x87, 0xda, 0xd0, 0xce, 0x34, 0x9d, 0xae, 0xb2, 0x57, 0x4f, 0x46, 0x0f, 0x72, 0x34, 0x9e, - 0x38, 0x1a, 0x4f, 0x1c, 0xf8, 0x23, 0x88, 0x07, 0x43, 0x3c, 0xe9, 0x45, 0x0c, 0x1c, 0x38, 0xfb, - 0x1f, 0x98, 0xce, 0x4c, 0x77, 0x17, 0x90, 0x08, 0x89, 0xe1, 0xb2, 0xdb, 0x79, 0xf3, 0xbd, 0xef, - 0x7d, 0xdf, 0x7b, 0xaf, 0x29, 0xbc, 0xe7, 0x50, 0x16, 0x52, 0xa6, 0x6f, 0x60, 0xec, 0xc5, 0x88, - 0x24, 0xfa, 0xcb, 0x59, 0x1b, 0x27, 0x68, 0xb6, 0x13, 0xd0, 0xa2, 0x98, 0x26, 0x54, 0xb9, 0x25, - 0x70, 0x5a, 0x27, 0x2c, 0x71, 0xe3, 0x63, 0x1e, 0xf5, 0x28, 0xc7, 0xe8, 0xe9, 0x93, 0x80, 0x8f, - 0x57, 0x3d, 0x4a, 0xbd, 0x00, 0xeb, 0xfc, 0x64, 0xb7, 0x36, 0x74, 0x44, 0xda, 0xd9, 0x95, 0x60, - 0xb2, 0x44, 0x8e, 0xa4, 0x15, 0x57, 0xaa, 0x14, 0x63, 0x23, 0x86, 0x3b, 0x42, 0x1c, 0xea, 0x13, - 0x79, 0x3f, 0x8a, 0x42, 0x9f, 0x50, 0x9d, 0xff, 0xca, 0x50, 0xed, 0x6c, 0xa1, 0xc4, 0x0f, 0x31, - 0x4b, 0x50, 0x18, 0x65, 0x9c, 0x67, 0x01, 0x6e, 0x2b, 0x46, 0x89, 0x4f, 0x25, 0x67, 0x7d, 0x27, - 0x0f, 0x87, 0x0c, 0xc4, 0x7c, 0x67, 0x31, 0x08, 0xe8, 0x2b, 0x44, 0x1c, 0xac, 0xbc, 0x06, 0xb0, - 0xcc, 0x22, 0x4c, 0x5c, 0x2b, 0xf0, 0x43, 0x3f, 0xa9, 0x80, 0x89, 0x42, 0xa3, 0x3c, 0x57, 0xd5, - 0xa4, 0xd6, 0x54, 0x5d, 0x66, 0x5f, 0x5b, 0xa2, 0x3e, 0x31, 0x96, 0xf7, 0x7f, 0xd6, 0x72, 0x9f, - 0x0f, 0x6b, 0x0d, 0xcf, 0x4f, 0x5e, 0xb4, 0x6c, 0xcd, 0xa1, 0xa1, 0x34, 0x26, 0xff, 0x66, 0x98, - 0xbb, 0xa9, 0x27, 0xed, 0x08, 0x33, 0x9e, 0xc0, 0x3e, 0x9e, 0xec, 0x4e, 0x0f, 0x04, 0xd8, 0x43, - 0x4e, 0xdb, 0x4a, 0xfd, 0xb1, 0x4f, 0x27, 0xbb, 0xd3, 0xc0, 0x84, 0xbc, 0xea, 0x6a, 0x5a, 0x54, - 0x59, 0x80, 0x10, 0x6f, 0x45, 0xbe, 0xd0, 0x5a, 0xc9, 0x4f, 0x80, 0x46, 0x79, 0x6e, 0x5c, 0x13, - 0x66, 0xb4, 0xcc, 0x8c, 0xf6, 0x24, 0x73, 0x6b, 0x14, 0xb7, 0x0f, 0x6b, 0xc0, 0xec, 0xc9, 0x99, - 0x5f, 0xf9, 0xb2, 0x37, 0x73, 0xf7, 0x82, 0xb1, 0x69, 0xcb, 0x18, 0x77, 0x0c, 0x3f, 0x7a, 0x7b, - 0xb2, 0x3b, 0x5d, 0xed, 0x51, 0x7a, 0xba, 0x1f, 0xf5, 0x1f, 0x45, 0x38, 0xda, 0xc4, 0xb1, 0x4f, - 0xdd, 0xde, 0x2e, 0x3d, 0x84, 0x7d, 0x76, 0x8a, 0xab, 0x00, 0xae, 0x6d, 0x52, 0xbb, 0xa8, 0xd4, - 0x69, 0x36, 0xa3, 0x94, 0x36, 0x4b, 0xf8, 0x15, 0x04, 0xca, 0x02, 0xec, 0x8f, 0x38, 0xbd, 0xb4, - 0x59, 0x3d, 0x67, 0xf3, 0x81, 0x9c, 0x99, 0x31, 0x98, 0x26, 0x7f, 0x38, 0xac, 0x01, 0x41, 0x20, - 0xf3, 0x94, 0xf7, 0x00, 0x2a, 0xe2, 0xd1, 0xea, 0x1d, 0x5c, 0xe1, 0xba, 0x06, 0x37, 0x22, 0x8a, - 0xaf, 0x77, 0xc7, 0xf7, 0x0e, 0x40, 0x19, 0xb4, 0x1c, 0x44, 0x84, 0xaa, 0x4a, 0xf1, 0xba, 0xf4, - 0x0c, 0x89, 0xd2, 0x4b, 0x88, 0x70, 0x49, 0xca, 0x2a, 0x1c, 0x90, 0x62, 0x62, 0xcc, 0x70, 0x52, - 0xe9, 0xfb, 0xe7, 0x3a, 0xf1, 0x46, 0x6f, 0x77, 0x1a, 0x5d, 0x16, 0xe9, 0x66, 0x9a, 0x3d, 0xff, - 0xf8, 0x4a, 0x8b, 0x75, 0xbb, 0x47, 0xf9, 0xb9, 0x2d, 0xaa, 0xff, 0x06, 0xf0, 0x26, 0x3f, 0x61, - 0x77, 0x8d, 0x79, 0xdd, 0xed, 0x7a, 0x0e, 0x4b, 0x28, 0x3b, 0xc8, 0x0d, 0x1b, 0x3b, 0x27, 0x77, - 0x91, 0xb4, 0x8d, 0xa9, 0x4b, 0x8b, 0x31, 0xbb, 0x8c, 0xca, 0x14, 0x1c, 0x41, 0xa2, 0xaa, 0x15, - 0x62, 0xc6, 0x90, 0x87, 0x59, 0x25, 0x3f, 0x51, 0x68, 0x94, 0xcc, 0x61, 0x19, 0x5f, 0x93, 0xe1, - 0xf9, 0xe6, 0x9b, 0x9d, 0x5a, 0xee, 0x4a, 0x8e, 0xd5, 0x1e, 0xc7, 0x7f, 0xf1, 0x56, 0xff, 0x0a, - 0x60, 0xdf, 0x4a, 0x4a, 0xa1, 0xcc, 0xc1, 0x1b, 0x9c, 0x0b, 0xc7, 0xdc, 0x63, 0xc9, 0xa8, 0x7c, - 0xdb, 0x9b, 0x19, 0x93, 0x85, 0x16, 0x5d, 0x37, 0xc6, 0x8c, 0xad, 0x27, 0xb1, 0x4f, 0x3c, 0x33, - 0x03, 0x76, 0x73, 0x30, 0x7f, 0x5d, 0x2e, 0x91, 0x73, 0xa6, 0x9b, 0x85, 0xff, 0xdd, 0xcd, 0xfa, - 0x53, 0xd8, 0xdf, 0x44, 0x31, 0x0a, 0x99, 0x32, 0x09, 0x87, 0x31, 0x71, 0xed, 0x80, 0x3a, 0x9b, - 0x56, 0x14, 0xb7, 0x08, 0x66, 0xdc, 0x58, 0xd1, 0x1c, 0xca, 0xc2, 0x4d, 0x1e, 0x55, 0xee, 0xc0, - 0xc1, 0x10, 0x91, 0x16, 0x0a, 0x32, 0x58, 0x9e, 0xc3, 0x06, 0x44, 0x50, 0x80, 0x8c, 0xd9, 0xfd, - 0x23, 0x15, 0x1c, 0x1c, 0xa9, 0xe0, 0xd7, 0x91, 0x0a, 0xb6, 0x8f, 0xd5, 0xdc, 0xc1, 0xb1, 0x9a, - 0xfb, 0x7e, 0xac, 0xe6, 0x9e, 0xc9, 0xcf, 0x11, 0x73, 0x37, 0x35, 0x9f, 0xea, 0x5b, 0x9d, 0xaf, - 0x95, 0xdd, 0xcf, 0xed, 0xdc, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x30, 0xda, 0xfa, 0xa1, 0xd8, - 0x06, 0x00, 0x00, + // 658 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x4f, 0xd4, 0x4e, + 0x14, 0xdf, 0x61, 0x81, 0x6f, 0x76, 0x96, 0x2f, 0x42, 0x25, 0xb1, 0x4b, 0x4c, 0x4b, 0x36, 0x51, + 0x17, 0x12, 0xda, 0x80, 0x37, 0x4e, 0x50, 0x0c, 0xa8, 0x81, 0x84, 0x14, 0x4f, 0x26, 0xa6, 0x99, + 0xb6, 0x43, 0x9d, 0xb0, 0xed, 0x34, 0x9d, 0xa2, 0xec, 0xd5, 0x93, 0xd1, 0x83, 0x1c, 0x8d, 0x27, + 0x8e, 0xc6, 0x13, 0x07, 0xfe, 0x08, 0xe2, 0xc1, 0x10, 0x4f, 0x7a, 0x11, 0x03, 0x07, 0xce, 0xfe, + 0x07, 0xa6, 0x33, 0xd3, 0x6e, 0x61, 0x25, 0x42, 0x62, 0xb8, 0xec, 0x76, 0xde, 0xbc, 0xf7, 0xf9, + 0xf1, 0xde, 0x6b, 0x0a, 0xef, 0x7a, 0x94, 0x85, 0x94, 0x99, 0x1b, 0x18, 0x07, 0x09, 0x8a, 0x52, + 0xf3, 0xc5, 0x8c, 0x8b, 0x53, 0x34, 0x53, 0x04, 0x8c, 0x38, 0xa1, 0x29, 0x55, 0x6e, 0x89, 0x3c, + 0xa3, 0x08, 0xcb, 0xbc, 0xf1, 0xb1, 0x80, 0x06, 0x94, 0xe7, 0x98, 0xd9, 0x93, 0x48, 0x1f, 0x6f, + 0x04, 0x94, 0x06, 0x6d, 0x6c, 0xf2, 0x93, 0xbb, 0xb5, 0x61, 0xa2, 0xa8, 0x93, 0x5f, 0x09, 0x24, + 0x47, 0xd4, 0x48, 0x58, 0x71, 0xa5, 0x49, 0x31, 0x2e, 0x62, 0xb8, 0x10, 0xe2, 0x51, 0x12, 0xc9, + 0xfb, 0x51, 0x14, 0x92, 0x88, 0x9a, 0xfc, 0x57, 0x86, 0xf4, 0xf3, 0x44, 0x29, 0x09, 0x31, 0x4b, + 0x51, 0x18, 0xe7, 0x98, 0xe7, 0x13, 0xfc, 0xad, 0x04, 0xa5, 0x84, 0x4a, 0xcc, 0xe6, 0x6e, 0x1f, + 0x1c, 0xb6, 0x10, 0x23, 0xde, 0x42, 0xbb, 0x4d, 0x5f, 0xa2, 0xc8, 0xc3, 0xca, 0x2b, 0x00, 0xeb, + 0x2c, 0xc6, 0x91, 0xef, 0xb4, 0x49, 0x48, 0x52, 0x15, 0x4c, 0x54, 0x5b, 0xf5, 0xd9, 0x86, 0x21, + 0xb5, 0x66, 0xea, 0x72, 0xfb, 0xc6, 0x22, 0x25, 0x91, 0xb5, 0x74, 0xf0, 0x43, 0xaf, 0x7c, 0x3a, + 0xd2, 0x5b, 0x01, 0x49, 0x9f, 0x6f, 0xb9, 0x86, 0x47, 0x43, 0x69, 0x4c, 0xfe, 0x4d, 0x33, 0x7f, + 0xd3, 0x4c, 0x3b, 0x31, 0x66, 0xbc, 0x80, 0x7d, 0x38, 0xdd, 0x9b, 0x1a, 0x6a, 0xe3, 0x00, 0x79, + 0x1d, 0x27, 0xf3, 0xc7, 0x3e, 0x9e, 0xee, 0x4d, 0x01, 0x1b, 0x72, 0xd6, 0x95, 0x8c, 0x54, 0x99, + 0x87, 0x10, 0x6f, 0xc7, 0x44, 0x68, 0x55, 0xfb, 0x26, 0x40, 0xab, 0x3e, 0x3b, 0x6e, 0x08, 0x33, + 0x46, 0x6e, 0xc6, 0x78, 0x92, 0xbb, 0xb5, 0xfa, 0x77, 0x8e, 0x74, 0x60, 0x97, 0x6a, 0xe6, 0x96, + 0x3f, 0xef, 0x4f, 0xdf, 0xb9, 0x60, 0x6c, 0xc6, 0x12, 0xc6, 0x85, 0xe1, 0x47, 0x6f, 0x4e, 0xf7, + 0xa6, 0x1a, 0x25, 0xa5, 0x67, 0xfb, 0xd1, 0xfc, 0xde, 0x0f, 0x47, 0xd7, 0x70, 0x42, 0xa8, 0x5f, + 0xee, 0xd2, 0x43, 0x38, 0xe0, 0x66, 0x79, 0x2a, 0xe0, 0xda, 0xee, 0x19, 0x17, 0x51, 0x9d, 0x45, + 0xb3, 0x6a, 0x59, 0xb3, 0x84, 0x5f, 0x01, 0xa0, 0xcc, 0xc3, 0xc1, 0x98, 0xc3, 0x4b, 0x9b, 0x8d, + 0x1e, 0x9b, 0x0f, 0xe4, 0xcc, 0xac, 0xff, 0xb3, 0xe2, 0xf7, 0x47, 0x3a, 0x10, 0x00, 0xb2, 0x4e, + 0x79, 0x07, 0xa0, 0x22, 0x1e, 0x9d, 0xf2, 0xe0, 0xaa, 0xd7, 0x35, 0xb8, 0x11, 0x41, 0xbe, 0xde, + 0x1d, 0xdf, 0x5b, 0x00, 0x65, 0xd0, 0xf1, 0x50, 0x24, 0x54, 0xa9, 0xfd, 0xd7, 0xa5, 0x67, 0x58, + 0x50, 0x2f, 0xa2, 0x88, 0x4b, 0x52, 0x56, 0xe0, 0x90, 0x14, 0x93, 0x60, 0x86, 0x53, 0x75, 0xe0, + 0xaf, 0xeb, 0xc4, 0x1b, 0xbd, 0x53, 0x34, 0xba, 0x2e, 0xca, 0xed, 0xac, 0x7a, 0xee, 0xf1, 0x95, + 0x16, 0xeb, 0x76, 0x49, 0x79, 0xcf, 0x16, 0x35, 0x7f, 0x01, 0x78, 0x93, 0x9f, 0xb0, 0xbf, 0xca, + 0x82, 0xee, 0x76, 0x3d, 0x83, 0x35, 0x94, 0x1f, 0xe4, 0x86, 0x8d, 0xf5, 0xc8, 0x5d, 0x88, 0x3a, + 0xd6, 0xe4, 0xa5, 0xc5, 0xd8, 0x5d, 0x44, 0x65, 0x12, 0x8e, 0x20, 0xc1, 0xea, 0x84, 0x98, 0x31, + 0x14, 0x60, 0xa6, 0xf6, 0x4d, 0x54, 0x5b, 0x35, 0xfb, 0x86, 0x8c, 0xaf, 0xca, 0xf0, 0xdc, 0xda, + 0xeb, 0x5d, 0xbd, 0x72, 0x25, 0xc7, 0x5a, 0xc9, 0xf1, 0x1f, 0xbc, 0x35, 0xbf, 0x00, 0x38, 0xb0, + 0x9c, 0x41, 0x28, 0xb3, 0xf0, 0x3f, 0x8e, 0x85, 0x13, 0xee, 0xb1, 0x66, 0xa9, 0x5f, 0xf7, 0xa7, + 0xc7, 0x24, 0xd1, 0x82, 0xef, 0x27, 0x98, 0xb1, 0xf5, 0x34, 0x21, 0x51, 0x60, 0xe7, 0x89, 0xdd, + 0x1a, 0xcc, 0x5f, 0x97, 0x4b, 0xd4, 0x9c, 0xeb, 0x66, 0xf5, 0x5f, 0x77, 0xd3, 0x9a, 0x39, 0x38, + 0xd6, 0xc0, 0xe1, 0xb1, 0x06, 0x7e, 0x1e, 0x6b, 0x60, 0xe7, 0x44, 0xab, 0x1c, 0x9e, 0x68, 0x95, + 0x6f, 0x27, 0x5a, 0xe5, 0xa9, 0xfc, 0x6c, 0x30, 0x7f, 0xd3, 0x20, 0xd4, 0xdc, 0x2e, 0xbe, 0x2a, + 0xee, 0x20, 0xa7, 0xbd, 0xff, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x0d, 0x76, 0xbd, 0x15, 0x80, 0x06, + 0x00, 0x00, } func (m *BasicAllowance) Marshal() (dAtA []byte, err error) { @@ -616,39 +557,6 @@ func (m *Grant) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ManualPrunes != 0 { - i = encodeVarintFeegrant(dAtA, i, uint64(m.ManualPrunes)) - i-- - dAtA[i] = 0x10 - } - if m.EndblockPrunes != 0 { - i = encodeVarintFeegrant(dAtA, i, uint64(m.EndblockPrunes)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func encodeVarintFeegrant(dAtA []byte, offset int, v uint64) int { offset -= sovFeegrant(v) base := offset @@ -746,21 +654,6 @@ func (m *Grant) Size() (n int) { return n } -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EndblockPrunes != 0 { - n += 1 + sovFeegrant(uint64(m.EndblockPrunes)) - } - if m.ManualPrunes != 0 { - n += 1 + sovFeegrant(uint64(m.ManualPrunes)) - } - return n -} - func sovFeegrant(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1372,94 +1265,6 @@ func (m *Grant) Unmarshal(dAtA []byte) error { } return nil } -func (m *Params) 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 ErrIntOverflowFeegrant - } - 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: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EndblockPrunes", wireType) - } - m.EndblockPrunes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFeegrant - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EndblockPrunes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ManualPrunes", wireType) - } - m.ManualPrunes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFeegrant - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ManualPrunes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipFeegrant(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFeegrant - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipFeegrant(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/feegrant/genesis.go b/x/feegrant/genesis.go index 749053dadff6..83b29baeb85d 100644 --- a/x/feegrant/genesis.go +++ b/x/feegrant/genesis.go @@ -1,8 +1,6 @@ package feegrant import ( - "errors" - "github.com/cosmos/cosmos-sdk/codec/types" ) @@ -27,19 +25,12 @@ func ValidateGenesis(data GenesisState) error { return err } } - - if data.Params.EndblockPrunes == 0 || data.Params.ManualPrunes == 0 { - return errors.New("invalid prune params") - } - return nil } // DefaultGenesisState returns default state for feegrant module. func DefaultGenesisState() *GenesisState { - return &GenesisState{ - Params: DefaultParams(), - } + return &GenesisState{} } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces @@ -53,10 +44,3 @@ func (data GenesisState) UnpackInterfaces(unpacker types.AnyUnpacker) error { return nil } - -func DefaultParams() Params { - return Params{ - EndblockPrunes: 50, - ManualPrunes: 5, - } -} diff --git a/x/feegrant/genesis.pb.go b/x/feegrant/genesis.pb.go index 7ef4fd1224d6..bb56184a4751 100644 --- a/x/feegrant/genesis.pb.go +++ b/x/feegrant/genesis.pb.go @@ -27,7 +27,6 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState contains a set of fee allowances, persisted from the store type GenesisState struct { Allowances []Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances"` - Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -70,13 +69,6 @@ func (m *GenesisState) GetAllowances() []Grant { return nil } -func (m *GenesisState) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - func init() { proto.RegisterType((*GenesisState)(nil), "cosmos.feegrant.v1beta1.GenesisState") } @@ -86,22 +78,20 @@ func init() { } var fileDescriptor_ac719d2d0954d1bf = []byte{ - // 236 bytes of a gzipped FileDescriptorProto + // 207 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x4b, 0x4d, 0x4d, 0x2f, 0x4a, 0xcc, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x87, 0x28, 0xd3, 0x83, 0x29, 0xd3, 0x83, 0x2a, 0x93, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0xa5, 0xd4, 0x70, 0x99, 0x0a, 0xd7, 0x0f, 0x51, - 0x27, 0x98, 0x98, 0x9b, 0x99, 0x97, 0xaf, 0x0f, 0x26, 0x21, 0x42, 0x4a, 0x73, 0x19, 0xb9, 0x78, - 0xdc, 0x21, 0x76, 0x07, 0x97, 0x24, 0x96, 0xa4, 0x0a, 0x79, 0x72, 0x71, 0x25, 0xe6, 0xe4, 0xe4, - 0x97, 0x27, 0xe6, 0x25, 0xa7, 0x16, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x1b, 0xc9, 0xe9, 0xe1, - 0x70, 0x8f, 0x9e, 0x3b, 0x88, 0xe7, 0xc4, 0x79, 0xe2, 0x9e, 0x3c, 0xc3, 0x8a, 0xe7, 0x1b, 0xb4, - 0x18, 0x83, 0x90, 0x34, 0x0b, 0x39, 0x71, 0xb1, 0x15, 0x24, 0x16, 0x25, 0xe6, 0x16, 0x4b, 0x30, - 0x29, 0x30, 0x6a, 0x70, 0x1b, 0xc9, 0xe3, 0x34, 0x26, 0x00, 0xac, 0x0c, 0xd9, 0x1c, 0xa8, 0x4e, - 0x27, 0xc3, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, - 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x82, 0x86, 0x51, 0x71, - 0x4a, 0xb6, 0x5e, 0x66, 0xbe, 0x7e, 0x05, 0xdc, 0xaf, 0x49, 0x6c, 0x60, 0x9f, 0x19, 0x03, 0x02, - 0x00, 0x00, 0xff, 0xff, 0x13, 0xe3, 0x7b, 0x0a, 0x6c, 0x01, 0x00, 0x00, + 0x27, 0x98, 0x98, 0x9b, 0x99, 0x97, 0xaf, 0x0f, 0x26, 0x21, 0x42, 0x4a, 0x91, 0x5c, 0x3c, 0xee, + 0x10, 0xab, 0x83, 0x4b, 0x12, 0x4b, 0x52, 0x85, 0x3c, 0xb9, 0xb8, 0x12, 0x73, 0x72, 0xf2, 0xcb, + 0x13, 0xf3, 0x92, 0x53, 0x8b, 0x25, 0x18, 0x15, 0x98, 0x35, 0xb8, 0x8d, 0xe4, 0xf4, 0x70, 0x38, + 0x47, 0xcf, 0x1d, 0xc4, 0x73, 0xe2, 0x3c, 0x71, 0x4f, 0x9e, 0x61, 0xc5, 0xf3, 0x0d, 0x5a, 0x8c, + 0x41, 0x48, 0x9a, 0x9d, 0x0c, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, + 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x0a, + 0xea, 0xbd, 0xe2, 0x94, 0x6c, 0xbd, 0xcc, 0x7c, 0xfd, 0x0a, 0xb8, 0x33, 0x93, 0xd8, 0xc0, 0x8e, + 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x32, 0xdb, 0x7e, 0x13, 0x27, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -124,16 +114,6 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 if len(m.Allowances) > 0 { for iNdEx := len(m.Allowances) - 1; iNdEx >= 0; iNdEx-- { { @@ -174,8 +154,6 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) return n } @@ -248,39 +226,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index c893b257be21..cb08125aa944 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -158,4 +158,3 @@ require ( ) replace github.com/cosmos/cosmos-sdk => ../../. -replace cosmossdk.io/api => ../../api diff --git a/x/feegrant/keeper/keeper.go b/x/feegrant/keeper/keeper.go index 5110f3a7639e..1bb0c9dd264f 100644 --- a/x/feegrant/keeper/keeper.go +++ b/x/feegrant/keeper/keeper.go @@ -25,26 +25,23 @@ type Keeper struct { cdc codec.BinaryCodec storeService store.KVStoreService authKeeper feegrant.AccountKeeper - authority string Schema collections.Schema // FeeAllowance key: grantee+granter | value: Grant FeeAllowance collections.Map[collections.Pair[sdk.AccAddress, sdk.AccAddress], feegrant.Grant] // FeeAllowanceQueue key: expiration time+grantee+granter | value: bool FeeAllowanceQueue collections.Map[collections.Triple[time.Time, sdk.AccAddress, sdk.AccAddress], bool] - Params collections.Item[feegrant.Params] } var _ ante.FeegrantKeeper = &Keeper{} // NewKeeper creates a feegrant Keeper -func NewKeeper(cdc codec.BinaryCodec, storeService store.KVStoreService, ak feegrant.AccountKeeper, authority string) Keeper { +func NewKeeper(cdc codec.BinaryCodec, storeService store.KVStoreService, ak feegrant.AccountKeeper) Keeper { sb := collections.NewSchemaBuilder(storeService) return Keeper{ cdc: cdc, storeService: storeService, authKeeper: ak, - authority: authority, FeeAllowance: collections.NewMap( sb, feegrant.FeeAllowanceKeyPrefix, @@ -59,7 +56,6 @@ func NewKeeper(cdc codec.BinaryCodec, storeService store.KVStoreService, ak feeg collections.TripleKeyCodec(sdk.TimeKey, sdk.LengthPrefixedAddressKey(sdk.AccAddressKey), sdk.LengthPrefixedAddressKey(sdk.AccAddressKey)), //nolint: staticcheck // sdk.LengthPrefixedAddressKey is needed to retain state compatibility collections.BoolValue, ), - Params: collections.NewItem(sb, feegrant.ParamsKey, "params", codec.CollValue[feegrant.Params](cdc)), } } @@ -305,8 +301,7 @@ func (k Keeper) InitGenesis(ctx context.Context, data *feegrant.GenesisState) er return err } } - - return k.Params.Set(ctx, data.Params) + return nil } // ExportGenesis will dump the contents of the keeper into a serializable GenesisState. diff --git a/x/feegrant/keeper/msg_server.go b/x/feegrant/keeper/msg_server.go index 19ad957fe8a9..2c6de7b9e160 100644 --- a/x/feegrant/keeper/msg_server.go +++ b/x/feegrant/keeper/msg_server.go @@ -4,13 +4,11 @@ import ( "context" "strings" - "cosmossdk.io/errors" errorsmod "cosmossdk.io/errors" "cosmossdk.io/x/feegrant" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/bank/types" ) type msgServer struct { @@ -105,20 +103,3 @@ func (k msgServer) PruneAllowances(ctx context.Context, req *feegrant.MsgPruneAl return &feegrant.MsgPruneAllowancesResponse{}, nil } - -// UpdateParams updates the params. -func (k msgServer) UpdateParams(ctx context.Context, msg *feegrant.MsgUpdateParams) (*feegrant.MsgUpdateParamsResponse, error) { - if k.authority != msg.Authority { - return nil, errors.Wrapf(types.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.authority, msg.Authority) - } - - if msg.Params.EndblockPrunes == 0 || msg.Params.ManualPrunes == 0 { - return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid prune params") - } - - if err := k.Params.Set(ctx, msg.Params); err != nil { - return nil, err - } - - return &feegrant.MsgUpdateParamsResponse{}, nil -} diff --git a/x/feegrant/key.go b/x/feegrant/key.go index fa6c23ea2d63..837435128c73 100644 --- a/x/feegrant/key.go +++ b/x/feegrant/key.go @@ -26,6 +26,4 @@ var ( // FeeAllowanceQueueKeyPrefix is the set of the kvstore for fee allowance keys data // - 0x01: FeeAllowanceQueueKeyPrefix = collections.NewPrefix(1) - - ParamsKey = collections.NewPrefix(2) ) diff --git a/x/feegrant/module/autocli.go b/x/feegrant/module/autocli.go index 93e6f9cf0ad7..2234892f6c89 100644 --- a/x/feegrant/module/autocli.go +++ b/x/feegrant/module/autocli.go @@ -47,11 +47,6 @@ You can find the fee-grant of a granter and grantee.`), {ProtoField: "granter"}, }, }, - { - RpcMethod: "Params", - Use: "params", - Short: "Query the current parameters", - }, }, }, Tx: &autocliv1.ServiceCommandDescriptor{ diff --git a/x/feegrant/module/module.go b/x/feegrant/module/module.go index c0503961b2a5..63a50d76e39e 100644 --- a/x/feegrant/module/module.go +++ b/x/feegrant/module/module.go @@ -24,8 +24,6 @@ import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/bank/types" ) var ( @@ -180,22 +178,10 @@ type FeegrantInputs struct { AccountKeeper feegrant.AccountKeeper BankKeeper feegrant.BankKeeper Registry cdctypes.InterfaceRegistry - Config *modulev1.Module } func ProvideModule(in FeegrantInputs) (keeper.Keeper, appmodule.AppModule) { - // default to governance authority if not provided - authority := authtypes.NewModuleAddress(types.GovModuleName) - if in.Config.Authority != "" { - authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) - } - - as, err := in.AccountKeeper.AddressCodec().BytesToString(authority) - if err != nil { - panic(err) - } - - k := keeper.NewKeeper(in.Cdc, in.StoreService, in.AccountKeeper, as) + k := keeper.NewKeeper(in.Cdc, in.StoreService, in.AccountKeeper) m := NewAppModule(in.Cdc, in.AccountKeeper, in.BankKeeper, k, in.Registry) return k, m } diff --git a/x/feegrant/tx.pb.go b/x/feegrant/tx.pb.go index da757a9efccb..7bc84761b388 100644 --- a/x/feegrant/tx.pb.go +++ b/x/feegrant/tx.pb.go @@ -10,7 +10,6 @@ import ( types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" @@ -309,100 +308,6 @@ func (m *MsgPruneAllowancesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgPruneAllowancesResponse proto.InternalMessageInfo -// MsgUpdateParams is the Msg/UpdateParams request type. -type MsgUpdateParams struct { - // authority is the address that controls the module (defaults to x/gov unless overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // params defines the x/feegrant parameters to update. - // - // NOTE: All parameters must be supplied. - Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` -} - -func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } -func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateParams) ProtoMessage() {} -func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_dd44ad7946dad783, []int{6} -} -func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateParams.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 *MsgUpdateParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateParams.Merge(m, src) -} -func (m *MsgUpdateParams) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateParams) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo - -func (m *MsgUpdateParams) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgUpdateParams) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -// MsgUpdateParamsResponse defines the response structure of the UpdateParams. -type MsgUpdateParamsResponse struct { -} - -func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } -func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateParamsResponse) ProtoMessage() {} -func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dd44ad7946dad783, []int{7} -} -func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateParamsResponse.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 *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) -} -func (m *MsgUpdateParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo - func init() { proto.RegisterType((*MsgGrantAllowance)(nil), "cosmos.feegrant.v1beta1.MsgGrantAllowance") proto.RegisterType((*MsgGrantAllowanceResponse)(nil), "cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse") @@ -410,50 +315,41 @@ func init() { proto.RegisterType((*MsgRevokeAllowanceResponse)(nil), "cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse") proto.RegisterType((*MsgPruneAllowances)(nil), "cosmos.feegrant.v1beta1.MsgPruneAllowances") proto.RegisterType((*MsgPruneAllowancesResponse)(nil), "cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse") - proto.RegisterType((*MsgUpdateParams)(nil), "cosmos.feegrant.v1beta1.MsgUpdateParams") - proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.feegrant.v1beta1.MsgUpdateParamsResponse") } func init() { proto.RegisterFile("cosmos/feegrant/v1beta1/tx.proto", fileDescriptor_dd44ad7946dad783) } var fileDescriptor_dd44ad7946dad783 = []byte{ - // 568 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xb1, 0x6f, 0xd3, 0x4e, - 0x14, 0x8e, 0x1b, 0xfd, 0xf2, 0x53, 0x2e, 0xa8, 0x55, 0x4f, 0x91, 0x9a, 0x98, 0xe2, 0x46, 0x91, - 0x40, 0x21, 0x28, 0x77, 0x4d, 0x2a, 0x31, 0x64, 0x8b, 0x07, 0x10, 0x43, 0xa4, 0xca, 0x15, 0x0b, - 0x12, 0x42, 0x97, 0xfa, 0x7a, 0x84, 0x24, 0x3e, 0xcb, 0xe7, 0x84, 0x66, 0x43, 0x6c, 0x30, 0xf1, - 0x0f, 0xb0, 0x33, 0x30, 0x64, 0xe8, 0x1f, 0x51, 0x31, 0x55, 0x88, 0x81, 0x09, 0xa1, 0x64, 0xc8, - 0xbf, 0x81, 0x6c, 0x9f, 0xed, 0xd6, 0x91, 0xd3, 0xb0, 0xb0, 0xd8, 0xbe, 0xf7, 0xbe, 0xf7, 0x7d, - 0xdf, 0x7b, 0x7a, 0x3e, 0x50, 0x39, 0xe5, 0x62, 0xc4, 0x05, 0x3e, 0xa3, 0x94, 0x39, 0xc4, 0x72, - 0xf1, 0xa4, 0xd9, 0xa3, 0x2e, 0x69, 0x62, 0xf7, 0x1c, 0xd9, 0x0e, 0x77, 0x39, 0xdc, 0x0b, 0x10, - 0x28, 0x44, 0x20, 0x89, 0x50, 0x8b, 0x8c, 0x33, 0xee, 0x63, 0xb0, 0xf7, 0x15, 0xc0, 0xd5, 0x32, - 0xe3, 0x9c, 0x0d, 0x29, 0xf6, 0x4f, 0xbd, 0xf1, 0x19, 0x26, 0xd6, 0x34, 0x4c, 0x05, 0x4c, 0xaf, - 0x82, 0x1a, 0x49, 0x1b, 0xa4, 0xa4, 0x08, 0x1e, 0x09, 0x86, 0x27, 0x4d, 0xef, 0x25, 0x13, 0xbb, - 0x64, 0xd4, 0xb7, 0x38, 0xf6, 0x9f, 0x32, 0xf4, 0x20, 0xcd, 0x72, 0xe4, 0xd0, 0xc7, 0x55, 0x3f, - 0x6c, 0x81, 0xdd, 0xae, 0x60, 0x4f, 0xbd, 0x50, 0x67, 0x38, 0xe4, 0x6f, 0x89, 0x75, 0x4a, 0x61, - 0x0b, 0xfc, 0xef, 0x83, 0xa8, 0x53, 0x52, 0x2a, 0x4a, 0x2d, 0xaf, 0x97, 0xbe, 0x5f, 0x34, 0x8a, - 0xd2, 0x4c, 0xc7, 0x34, 0x1d, 0x2a, 0xc4, 0x89, 0xeb, 0xf4, 0x2d, 0x66, 0x84, 0xc0, 0xb8, 0x86, - 0x96, 0xb6, 0x36, 0xab, 0xa1, 0xf0, 0x25, 0xc8, 0x93, 0x50, 0xb4, 0x94, 0xad, 0x28, 0xb5, 0x42, - 0xab, 0x88, 0x82, 0xd9, 0xa0, 0x70, 0x36, 0xa8, 0x63, 0x4d, 0xf5, 0x87, 0xdf, 0x2e, 0x1a, 0xf7, - 0x53, 0x66, 0x8c, 0x9e, 0x50, 0x1a, 0x59, 0x7f, 0x66, 0xc4, 0x8c, 0xed, 0xc6, 0xfb, 0xe5, 0xac, - 0x1e, 0x1a, 0xfc, 0xb8, 0x9c, 0xd5, 0xf7, 0x03, 0x8a, 0x86, 0x30, 0x07, 0x78, 0xa5, 0xeb, 0xea, - 0x5d, 0x50, 0x5e, 0x09, 0x1a, 0x54, 0xd8, 0xdc, 0x12, 0xb4, 0xfa, 0x55, 0x01, 0xb0, 0x2b, 0x98, - 0x41, 0x27, 0x7c, 0x40, 0xff, 0xf9, 0xa4, 0xda, 0x28, 0xd9, 0xca, 0xbd, 0x9b, 0xad, 0x24, 0x7c, - 0x55, 0xf7, 0x81, 0xba, 0x1a, 0x8d, 0x9a, 0x39, 0xf1, 0x7b, 0x39, 0x76, 0xc6, 0x56, 0x9c, 0x14, - 0xf0, 0x10, 0xe4, 0x6c, 0x2f, 0x74, 0x7b, 0x2b, 0x12, 0xd7, 0x2e, 0x78, 0xae, 0xe4, 0x41, 0x4a, - 0x26, 0x48, 0x23, 0xc9, 0xcf, 0x0a, 0xd8, 0xe9, 0x0a, 0xf6, 0xdc, 0x36, 0x89, 0x4b, 0x8f, 0x89, - 0x43, 0x46, 0x02, 0x3e, 0x06, 0x79, 0x32, 0x76, 0x5f, 0x73, 0xa7, 0xef, 0x4e, 0x6f, 0xd5, 0x8c, - 0xa1, 0x50, 0x07, 0x39, 0xdb, 0x67, 0xf0, 0xe7, 0x57, 0x68, 0x1d, 0xa0, 0xb4, 0xd5, 0x08, 0x84, - 0xf4, 0xfc, 0xe5, 0xaf, 0x83, 0xcc, 0x97, 0xe5, 0xac, 0xae, 0x18, 0xb2, 0xb2, 0xbd, 0xed, 0x59, - 0x8f, 0x39, 0xab, 0x65, 0xb0, 0x97, 0xb0, 0x17, 0x5a, 0x6f, 0xfd, 0xc8, 0x82, 0x6c, 0x57, 0x30, - 0x68, 0x83, 0xed, 0xc4, 0x7f, 0x52, 0x4f, 0x15, 0x5e, 0x59, 0x24, 0xb5, 0xb5, 0x39, 0x36, 0x54, - 0x86, 0x02, 0xec, 0x24, 0x17, 0xee, 0xd1, 0x3a, 0x9a, 0x04, 0x58, 0x3d, 0xfa, 0x0b, 0xf0, 0x75, - 0xd1, 0xe4, 0x66, 0xac, 0x15, 0x4d, 0x80, 0xd7, 0x8b, 0xa6, 0xac, 0x07, 0x7c, 0x03, 0xee, 0xdc, - 0x58, 0x8d, 0xda, 0x3a, 0x92, 0xeb, 0x48, 0xf5, 0x70, 0x53, 0x64, 0xa8, 0xa5, 0xfe, 0xf7, 0xce, - 0xdb, 0x04, 0xbd, 0x79, 0x39, 0xd7, 0x94, 0xab, 0xb9, 0xa6, 0xfc, 0x9e, 0x6b, 0xca, 0xa7, 0x85, - 0x96, 0xb9, 0x5a, 0x68, 0x99, 0x9f, 0x0b, 0x2d, 0xf3, 0x42, 0x5e, 0xb4, 0xc2, 0x1c, 0xa0, 0x3e, - 0xc7, 0xe7, 0xd1, 0x9d, 0xd9, 0xcb, 0xf9, 0x97, 0xd2, 0xd1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xaa, 0xdc, 0xfb, 0x6e, 0x11, 0x06, 0x00, 0x00, + // 455 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, 0x4b, 0x4d, 0x4d, 0x2f, 0x4a, 0xcc, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, + 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x87, 0xa8, + 0xd0, 0x83, 0xa9, 0xd0, 0x83, 0xaa, 0x90, 0x92, 0x4c, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x07, + 0x2b, 0x4b, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0x84, 0xe8, 0x91, 0x92, 0x84, 0xe8, 0x89, 0x07, + 0xf3, 0xf4, 0xa1, 0x06, 0x40, 0xa4, 0xa0, 0xc6, 0xe9, 0xe7, 0x16, 0xa7, 0xeb, 0x97, 0x19, 0x82, + 0x28, 0xa8, 0x84, 0x60, 0x62, 0x6e, 0x66, 0x5e, 0xbe, 0x3e, 0x98, 0x84, 0x08, 0x29, 0x75, 0x32, + 0x71, 0x09, 0xfa, 0x16, 0xa7, 0xbb, 0x83, 0xac, 0x75, 0xcc, 0xc9, 0xc9, 0x2f, 0x4f, 0xcc, 0x4b, + 0x4e, 0x15, 0x32, 0xe2, 0x62, 0x07, 0x3b, 0x24, 0xb5, 0x48, 0x82, 0x51, 0x81, 0x51, 0x83, 0xd3, + 0x49, 0xe2, 0xd2, 0x16, 0x5d, 0x11, 0xa8, 0x25, 0x8e, 0x29, 0x29, 0x45, 0xa9, 0xc5, 0xc5, 0xc1, + 0x25, 0x45, 0x99, 0x79, 0xe9, 0x41, 0x30, 0x85, 0x08, 0x3d, 0xa9, 0x12, 0x4c, 0xc4, 0xe9, 0x49, + 0x15, 0x8a, 0xe5, 0xe2, 0x4c, 0x84, 0x59, 0x2a, 0xc1, 0xac, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa2, + 0x07, 0xf1, 0xb3, 0x1e, 0xcc, 0xcf, 0x7a, 0x8e, 0x79, 0x95, 0x4e, 0x9a, 0xa7, 0xb6, 0xe8, 0xaa, + 0xe2, 0x08, 0x25, 0x3d, 0xb7, 0xd4, 0x54, 0xb8, 0xd3, 0x3d, 0x83, 0x10, 0x26, 0x5a, 0xe9, 0x36, + 0x3d, 0xdf, 0xa0, 0x05, 0x73, 0x60, 0xd7, 0xf3, 0x0d, 0x5a, 0x32, 0x10, 0x23, 0x74, 0x8b, 0x53, + 0xb2, 0xf5, 0x31, 0x7c, 0xad, 0x24, 0xcd, 0x25, 0x89, 0x21, 0x18, 0x94, 0x5a, 0x5c, 0x90, 0x9f, + 0x57, 0x9c, 0xaa, 0xb4, 0x86, 0x91, 0x4b, 0xc8, 0xb7, 0x38, 0x3d, 0x28, 0xb5, 0x2c, 0x3f, 0x3b, + 0x95, 0xee, 0x21, 0x65, 0xa5, 0x87, 0xee, 0x15, 0x59, 0x54, 0xaf, 0xa0, 0xb9, 0x4b, 0x49, 0x86, + 0x4b, 0x0a, 0x53, 0x14, 0xee, 0x99, 0x60, 0xb0, 0x5f, 0x02, 0x8a, 0x4a, 0xf3, 0x10, 0x92, 0xc5, + 0x42, 0x06, 0x5c, 0x6c, 0x05, 0x20, 0x21, 0xc2, 0x5e, 0x81, 0xaa, 0xb3, 0xe2, 0x06, 0xb9, 0x0a, + 0xca, 0x81, 0x5a, 0x89, 0x66, 0x28, 0xcc, 0x4a, 0xa3, 0x17, 0x4c, 0x5c, 0xcc, 0xbe, 0xc5, 0xe9, + 0x42, 0x05, 0x5c, 0x7c, 0x68, 0x89, 0x4d, 0x4b, 0x0f, 0x57, 0xc4, 0x62, 0xc4, 0x86, 0x94, 0x11, + 0xf1, 0x6a, 0x61, 0x36, 0x0b, 0x15, 0x73, 0xf1, 0xa3, 0xc7, 0x9a, 0x36, 0x3e, 0x63, 0xd0, 0x14, + 0x4b, 0x19, 0x93, 0xa0, 0x18, 0xd9, 0x52, 0xf4, 0xe0, 0xc5, 0x6b, 0x29, 0x9a, 0x62, 0xfc, 0x96, + 0xe2, 0x08, 0x63, 0x29, 0xd6, 0x86, 0xe7, 0x1b, 0xb4, 0x18, 0x9d, 0x0c, 0x4f, 0x3c, 0x92, 0x63, + 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, + 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x0a, 0x5a, 0x32, 0x14, 0xa7, 0x64, 0xeb, 0x65, 0xe6, 0xeb, + 0x57, 0xc0, 0x8b, 0xa4, 0x24, 0x36, 0x70, 0x6e, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8d, + 0x04, 0xdd, 0xf4, 0xac, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -476,8 +372,6 @@ type MsgClient interface { RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, error) // PruneAllowances prunes expired fee allowances. PruneAllowances(ctx context.Context, in *MsgPruneAllowances, opts ...grpc.CallOption) (*MsgPruneAllowancesResponse, error) - // UpdateParams updates the parameters of the feegrant module. - UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } type msgClient struct { @@ -515,15 +409,6 @@ func (c *msgClient) PruneAllowances(ctx context.Context, in *MsgPruneAllowances, return out, nil } -func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { - out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Msg/UpdateParams", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // MsgServer is the server API for Msg service. type MsgServer interface { // GrantAllowance grants fee allowance to the grantee on the granter's @@ -534,8 +419,6 @@ type MsgServer interface { RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) // PruneAllowances prunes expired fee allowances. PruneAllowances(context.Context, *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) - // UpdateParams updates the parameters of the feegrant module. - UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -551,9 +434,6 @@ func (*UnimplementedMsgServer) RevokeAllowance(ctx context.Context, req *MsgRevo func (*UnimplementedMsgServer) PruneAllowances(ctx context.Context, req *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PruneAllowances not implemented") } -func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") -} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -613,24 +493,6 @@ func _Msg_PruneAllowances_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateParams) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.feegrant.v1beta1.Msg/UpdateParams", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) - } - return interceptor(ctx, in, info, handler) -} - var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.feegrant.v1beta1.Msg", HandlerType: (*MsgServer)(nil), @@ -647,10 +509,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "PruneAllowances", Handler: _Msg_PruneAllowances_Handler, }, - { - MethodName: "UpdateParams", - Handler: _Msg_UpdateParams_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/feegrant/v1beta1/tx.proto", @@ -841,69 +699,6 @@ func (m *MsgPruneAllowancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *MsgUpdateParams) 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 *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateParamsResponse) 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 *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -993,30 +788,6 @@ func (m *MsgPruneAllowancesResponse) Size() (n int) { return n } -func (m *MsgUpdateParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Params.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgUpdateParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1519,171 +1290,6 @@ func (m *MsgPruneAllowancesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateParams) 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: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateParamsResponse) 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: MsgUpdateParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: 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 skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From 3159fa8b095a696dea81bcee5ef30d07eb00c8e2 Mon Sep 17 00:00:00 2001 From: Facundo Date: Fri, 13 Oct 2023 14:48:39 +0200 Subject: [PATCH 20/32] set default values --- x/feegrant/CHANGELOG.md | 2 +- x/feegrant/keeper/msg_server.go | 2 +- x/feegrant/module/abci.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/x/feegrant/CHANGELOG.md b/x/feegrant/CHANGELOG.md index 21dfc8fb40db..07efab6565ec 100644 --- a/x/feegrant/CHANGELOG.md +++ b/x/feegrant/CHANGELOG.md @@ -27,7 +27,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Features -* [#18047](https://github.com/cosmos/cosmos-sdk/pull/18047) Added a limit of 50 grants pruned per EndBlock and the method PruneAllowances that prunes 5 expired grants on every run. +* [#18047](https://github.com/cosmos/cosmos-sdk/pull/18047) Added a limit of 200 grants pruned per EndBlock and the method PruneAllowances that prunes 75 expired grants on every run. * [#14649](https://github.com/cosmos/cosmos-sdk/pull/14649) The `x/feegrant` module is extracted to have a separate go.mod file which allows it to be a standalone module. ### API Breaking Changes diff --git a/x/feegrant/keeper/msg_server.go b/x/feegrant/keeper/msg_server.go index 2c6de7b9e160..0ad22a721f7c 100644 --- a/x/feegrant/keeper/msg_server.go +++ b/x/feegrant/keeper/msg_server.go @@ -88,7 +88,7 @@ func (k msgServer) RevokeAllowance(ctx context.Context, msg *feegrant.MsgRevokeA // PruneAllowances removes expired allowances from the store. func (k msgServer) PruneAllowances(ctx context.Context, req *feegrant.MsgPruneAllowances) (*feegrant.MsgPruneAllowancesResponse, error) { - err := k.RemoveExpiredAllowances(ctx, 5) + err := k.RemoveExpiredAllowances(ctx, 75) if err != nil { return nil, err } diff --git a/x/feegrant/module/abci.go b/x/feegrant/module/abci.go index 533988fb8e30..71d94c302cef 100644 --- a/x/feegrant/module/abci.go +++ b/x/feegrant/module/abci.go @@ -7,5 +7,5 @@ import ( ) func EndBlocker(ctx context.Context, k keeper.Keeper) error { - return k.RemoveExpiredAllowances(ctx, 50) + return k.RemoveExpiredAllowances(ctx, 200) } From 74d157604d0e1ea576f8958072653963ad68fa47 Mon Sep 17 00:00:00 2001 From: Facundo Date: Fri, 13 Oct 2023 15:15:29 +0200 Subject: [PATCH 21/32] bump api --- go.mod | 2 +- go.sum | 2 ++ simapp/go.mod | 2 +- simapp/go.sum | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index b256ae749c7d..c514779888c2 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ toolchain go1.21.0 module github.com/cosmos/cosmos-sdk require ( - cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 + cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/go.sum b/go.sum index d65bb755b2c7..7fd03f8d81e0 100644 --- a/go.sum +++ b/go.sum @@ -37,6 +37,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a h1:2a5orFKu9MNUJfUjoWXIQb7MZnGa+CLoft4Z7leLSvQ= +cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/simapp/go.mod b/simapp/go.mod index a53935071499..4111421396f6 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/simapp go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 + cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a cosmossdk.io/client/v2 v2.0.0-20230630094428-02b760776860 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 diff --git a/simapp/go.sum b/simapp/go.sum index 3d513c4cdad4..ae4e3fbfe788 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -189,6 +189,8 @@ cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1V cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a h1:2a5orFKu9MNUJfUjoWXIQb7MZnGa+CLoft4Z7leLSvQ= +cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= From 5e77b119ac29a9f9b191ae4ceb48b39da04ee947 Mon Sep 17 00:00:00 2001 From: Facundo Date: Fri, 13 Oct 2023 15:25:30 +0200 Subject: [PATCH 22/32] bump api --- tests/go.mod | 2 +- tests/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/go.mod b/tests/go.mod index 978e7ac89a5a..d7b46a7fcf93 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -3,7 +3,7 @@ module github.com/cosmos/cosmos-sdk/tests go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 + cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/tests/go.sum b/tests/go.sum index 8c9dfdfb6573..f2c22c395425 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -189,6 +189,8 @@ cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1V cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a h1:2a5orFKu9MNUJfUjoWXIQb7MZnGa+CLoft4Z7leLSvQ= +cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= From fca13c21ff912691c163948b3846a52606b30a04 Mon Sep 17 00:00:00 2001 From: Facundo Date: Fri, 13 Oct 2023 15:29:25 +0200 Subject: [PATCH 23/32] suggestions from julien, only missing benchmark --- proto/cosmos/feegrant/v1beta1/tx.proto | 8 +++++++- x/feegrant/README.md | 8 ++++++++ x/feegrant/module/autocli.go | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/proto/cosmos/feegrant/v1beta1/tx.proto b/proto/cosmos/feegrant/v1beta1/tx.proto index d71dac092491..88171c526eaf 100644 --- a/proto/cosmos/feegrant/v1beta1/tx.proto +++ b/proto/cosmos/feegrant/v1beta1/tx.proto @@ -21,7 +21,9 @@ service Msg { // has been granted to the grantee. rpc RevokeAllowance(MsgRevokeAllowance) returns (MsgRevokeAllowanceResponse); - // PruneAllowances prunes expired fee allowances. + // PruneAllowances prunes expired fee allowances, currently up to 75 at a time. + // + // Since feegrant v0.1 rpc PruneAllowances(MsgPruneAllowances) returns (MsgPruneAllowancesResponse); } @@ -60,6 +62,8 @@ message MsgRevokeAllowance { message MsgRevokeAllowanceResponse {} // MsgPruneAllowances prunes expired fee allowances. +// +// Since feegrant v0.1 message MsgPruneAllowances { option (cosmos.msg.v1.signer) = "pruner"; @@ -68,4 +72,6 @@ message MsgPruneAllowances { } // MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. +// +// Since feegrant v0.1 message MsgPruneAllowancesResponse {} \ No newline at end of file diff --git a/x/feegrant/README.md b/x/feegrant/README.md index 9fcd1e476d6f..07524449a862 100644 --- a/x/feegrant/README.md +++ b/x/feegrant/README.md @@ -206,6 +206,14 @@ The feegrant module emits the following events: | message | granter | {granterAddress} | | message | grantee | {granteeAddress} | +### Prune fee allowances + +| Type | Attribute Key | Attribute Value | +| ------- | ------------- | ---------------- | +| message | action | prune_feegrant | +| message | pruner | {prunerAddress} | + + ## Client ### CLI diff --git a/x/feegrant/module/autocli.go b/x/feegrant/module/autocli.go index 2234892f6c89..818c3be9c3e6 100644 --- a/x/feegrant/module/autocli.go +++ b/x/feegrant/module/autocli.go @@ -67,7 +67,7 @@ You can find the fee-grant of a granter and grantee.`), RpcMethod: "PruneAllowances", Use: "prune", Short: "Prune expired allowances", - Long: "Prune a limited amount of expired allowances in order to reduce the size of the store when the number of expired allowances is large.", + Long: "Prune up to 75 expired allowances in order to reduce the size of the store when the number of expired allowances is large.", Example: fmt.Sprintf(`$ %s tx feegrant prune --from [mykey]`, version.AppName), }, }, From 1314de734f17bb1371de362ab5201134e6111ca7 Mon Sep 17 00:00:00 2001 From: Facundo Date: Mon, 16 Oct 2023 10:47:09 +0200 Subject: [PATCH 24/32] go mod tidy fix test --- x/feegrant/go.mod | 2 +- x/feegrant/go.sum | 4 +-- x/feegrant/keeper/msg_server_test.go | 47 +++++++++++++++++----------- 3 files changed, 32 insertions(+), 21 deletions(-) diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index cb08125aa944..be8634003af7 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/feegrant go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 + cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/x/feegrant/go.sum b/x/feegrant/go.sum index b67fc994e6c2..d71d6c15c376 100644 --- a/x/feegrant/go.sum +++ b/x/feegrant/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a h1:2a5orFKu9MNUJfUjoWXIQb7MZnGa+CLoft4Z7leLSvQ= +cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/feegrant/keeper/msg_server_test.go b/x/feegrant/keeper/msg_server_test.go index cb291196ff31..aa55c86e2338 100644 --- a/x/feegrant/keeper/msg_server_test.go +++ b/x/feegrant/keeper/msg_server_test.go @@ -293,37 +293,48 @@ func (suite *KeeperTestSuite) TestPruneAllowances() { ctx := suite.ctx.WithHeaderInfo(header.Info{Time: time.Now()}) oneYear := ctx.HeaderInfo().Time.AddDate(1, 0, 0) - // We create 6 allowances, all expiring in one year - for i := 0; i < 6; i++ { - any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ - SpendLimit: suite.atom, - Expiration: &oneYear, - }) - suite.Require().NoError(err) - req := &feegrant.MsgGrantAllowance{ - Granter: suite.encodedAddrs[0], - Grantee: suite.encodedAddrs[i+1], - Allowance: any, - } + // We create 76 allowances, all expiring in one year + count := 0 + for i := 0; i < len(suite.encodedAddrs); i++ { + for j := 0; j < len(suite.encodedAddrs); j++ { + if count == 76 { + break + } + if suite.encodedAddrs[i] == suite.encodedAddrs[j] { + continue + } - _, err = suite.msgSrvr.GrantAllowance(ctx, req) - suite.Require().NoError(err) + any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ + SpendLimit: suite.atom, + Expiration: &oneYear, + }) + suite.Require().NoError(err) + req := &feegrant.MsgGrantAllowance{ + Granter: suite.encodedAddrs[i], + Grantee: suite.encodedAddrs[j], + Allowance: any, + } + + _, err = suite.msgSrvr.GrantAllowance(ctx, req) + suite.Require().NoError(err) + count++ + } } - // we have 6 allowances - count := 0 + // we have 76 allowances + count = 0 suite.feegrantKeeper.FeeAllowance.Walk(ctx, nil, func(key collections.Pair[types.AccAddress, types.AccAddress], value feegrant.Grant) (stop bool, err error) { count++ return false, nil }) - suite.Require().Equal(6, count) + suite.Require().Equal(76, count) // after a year and one day passes, they are all expired oneYearAndADay := ctx.HeaderInfo().Time.AddDate(1, 0, 1) ctx = suite.ctx.WithHeaderInfo(header.Info{Time: oneYearAndADay}) - // we prune them, but currently only 5 will be pruned + // we prune them, but currently only 75 will be pruned _, err := suite.msgSrvr.PruneAllowances(ctx, &feegrant.MsgPruneAllowances{}) suite.Require().NoError(err) From ec72d0f945e3e793049447dc490755af9d875dd7 Mon Sep 17 00:00:00 2001 From: Facundo Date: Mon, 16 Oct 2023 11:33:29 +0200 Subject: [PATCH 25/32] lint --- x/feegrant/keeper/msg_server_test.go | 8 +++++--- x/feegrant/module/abci_test.go | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/x/feegrant/keeper/msg_server_test.go b/x/feegrant/keeper/msg_server_test.go index aa55c86e2338..64023d3cc28f 100644 --- a/x/feegrant/keeper/msg_server_test.go +++ b/x/feegrant/keeper/msg_server_test.go @@ -324,10 +324,11 @@ func (suite *KeeperTestSuite) TestPruneAllowances() { // we have 76 allowances count = 0 - suite.feegrantKeeper.FeeAllowance.Walk(ctx, nil, func(key collections.Pair[types.AccAddress, types.AccAddress], value feegrant.Grant) (stop bool, err error) { + err := suite.feegrantKeeper.FeeAllowance.Walk(ctx, nil, func(key collections.Pair[types.AccAddress, types.AccAddress], value feegrant.Grant) (stop bool, err error) { count++ return false, nil }) + suite.Require().NoError(err) suite.Require().Equal(76, count) // after a year and one day passes, they are all expired @@ -335,16 +336,17 @@ func (suite *KeeperTestSuite) TestPruneAllowances() { ctx = suite.ctx.WithHeaderInfo(header.Info{Time: oneYearAndADay}) // we prune them, but currently only 75 will be pruned - _, err := suite.msgSrvr.PruneAllowances(ctx, &feegrant.MsgPruneAllowances{}) + _, err = suite.msgSrvr.PruneAllowances(ctx, &feegrant.MsgPruneAllowances{}) suite.Require().NoError(err) // we have 1 allowance left count = 0 - suite.feegrantKeeper.FeeAllowance.Walk(ctx, nil, func(key collections.Pair[types.AccAddress, types.AccAddress], value feegrant.Grant) (stop bool, err error) { + err = suite.feegrantKeeper.FeeAllowance.Walk(ctx, nil, func(key collections.Pair[types.AccAddress, types.AccAddress], value feegrant.Grant) (stop bool, err error) { count++ return false, nil }) + suite.Require().NoError(err) suite.Require().Equal(1, count) } diff --git a/x/feegrant/module/abci_test.go b/x/feegrant/module/abci_test.go index ff9c5b0fb4f3..34280ef68a88 100644 --- a/x/feegrant/module/abci_test.go +++ b/x/feegrant/module/abci_test.go @@ -83,7 +83,7 @@ func TestFeegrantPruning(t *testing.T) { feegrant.RegisterQueryServer(queryHelper, feegrantKeeper) queryClient := feegrant.NewQueryClient(queryHelper) - module.EndBlocker(testCtx.Ctx, feegrantKeeper) + require.NoError(t, module.EndBlocker(testCtx.Ctx, feegrantKeeper)) granteeStr, err := ac.BytesToString(grantee) require.NoError(t, err) @@ -95,7 +95,7 @@ func TestFeegrantPruning(t *testing.T) { require.Len(t, res.Allowances, 2) testCtx.Ctx = testCtx.Ctx.WithHeaderInfo(header.Info{Time: now.AddDate(0, 0, 2)}) - module.EndBlocker(testCtx.Ctx, feegrantKeeper) + require.NoError(t, module.EndBlocker(testCtx.Ctx, feegrantKeeper)) res, err = queryClient.Allowances(testCtx.Ctx.Context(), &feegrant.QueryAllowancesRequest{ Grantee: granteeStr, From 630034e3437fc10ab718f31eabc5e77372d437ef Mon Sep 17 00:00:00 2001 From: Facundo Date: Mon, 16 Oct 2023 11:39:16 +0200 Subject: [PATCH 26/32] api bump --- go.mod | 2 +- go.sum | 2 ++ simapp/go.mod | 2 +- simapp/go.sum | 2 ++ tests/go.mod | 2 +- tests/go.sum | 2 ++ x/feegrant/go.mod | 2 +- x/feegrant/go.sum | 2 ++ 8 files changed, 12 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index c514779888c2..73fb02e16df5 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ toolchain go1.21.0 module github.com/cosmos/cosmos-sdk require ( - cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a + cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/go.sum b/go.sum index 7fd03f8d81e0..300f25ffc54e 100644 --- a/go.sum +++ b/go.sum @@ -39,6 +39,8 @@ cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+6 cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a h1:2a5orFKu9MNUJfUjoWXIQb7MZnGa+CLoft4Z7leLSvQ= cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 h1:bCxnZ6XHFedjB1bT1twYfaLxY/uMkIxgFGOFtQ9xnt4= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/simapp/go.mod b/simapp/go.mod index 4111421396f6..8eeb7b3cf41c 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/simapp go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a + cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 cosmossdk.io/client/v2 v2.0.0-20230630094428-02b760776860 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 diff --git a/simapp/go.sum b/simapp/go.sum index ae4e3fbfe788..9e0155c65c53 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -191,6 +191,8 @@ cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+6 cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a h1:2a5orFKu9MNUJfUjoWXIQb7MZnGa+CLoft4Z7leLSvQ= cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 h1:bCxnZ6XHFedjB1bT1twYfaLxY/uMkIxgFGOFtQ9xnt4= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/tests/go.mod b/tests/go.mod index d7b46a7fcf93..aa4a493fae4a 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -3,7 +3,7 @@ module github.com/cosmos/cosmos-sdk/tests go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a + cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/tests/go.sum b/tests/go.sum index f2c22c395425..326e09498664 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -191,6 +191,8 @@ cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+6 cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a h1:2a5orFKu9MNUJfUjoWXIQb7MZnGa+CLoft4Z7leLSvQ= cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 h1:bCxnZ6XHFedjB1bT1twYfaLxY/uMkIxgFGOFtQ9xnt4= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index be8634003af7..0e5c6b853dec 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/feegrant go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a + cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/x/feegrant/go.sum b/x/feegrant/go.sum index d71d6c15c376..c94dde7d17c5 100644 --- a/x/feegrant/go.sum +++ b/x/feegrant/go.sum @@ -37,6 +37,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a h1:2a5orFKu9MNUJfUjoWXIQb7MZnGa+CLoft4Z7leLSvQ= cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 h1:bCxnZ6XHFedjB1bT1twYfaLxY/uMkIxgFGOFtQ9xnt4= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= From d9e6c113f79494b05e6e9826a3ddf1f31de88623 Mon Sep 17 00:00:00 2001 From: Facundo Date: Mon, 16 Oct 2023 13:08:07 +0200 Subject: [PATCH 27/32] tests and comments --- x/feegrant/keeper/keeper_test.go | 2 +- x/feegrant/keeper/msg_server.go | 3 ++- x/feegrant/module/abci.go | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/x/feegrant/keeper/keeper_test.go b/x/feegrant/keeper/keeper_test.go index ec83549dfd54..272618a7121a 100644 --- a/x/feegrant/keeper/keeper_test.go +++ b/x/feegrant/keeper/keeper_test.go @@ -40,7 +40,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (suite *KeeperTestSuite) SetupTest() { - suite.addrs = simtestutil.CreateIncrementalAccounts(7) + suite.addrs = simtestutil.CreateIncrementalAccounts(20) key := storetypes.NewKVStoreKey(feegrant.StoreKey) testCtx := testutil.DefaultContextWithDB(suite.T(), key, storetypes.NewTransientStoreKey("transient_test")) encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) diff --git a/x/feegrant/keeper/msg_server.go b/x/feegrant/keeper/msg_server.go index 0ad22a721f7c..269220f7b054 100644 --- a/x/feegrant/keeper/msg_server.go +++ b/x/feegrant/keeper/msg_server.go @@ -88,7 +88,8 @@ func (k msgServer) RevokeAllowance(ctx context.Context, msg *feegrant.MsgRevokeA // PruneAllowances removes expired allowances from the store. func (k msgServer) PruneAllowances(ctx context.Context, req *feegrant.MsgPruneAllowances) (*feegrant.MsgPruneAllowancesResponse, error) { - err := k.RemoveExpiredAllowances(ctx, 75) + // 75 is an arbitrary value, we can change it later if needed + err := k.RemoveExpiredAllowances(ctx, 100) if err != nil { return nil, err } diff --git a/x/feegrant/module/abci.go b/x/feegrant/module/abci.go index 71d94c302cef..6f14eee3137c 100644 --- a/x/feegrant/module/abci.go +++ b/x/feegrant/module/abci.go @@ -7,5 +7,6 @@ import ( ) func EndBlocker(ctx context.Context, k keeper.Keeper) error { + // 200 is an arbitrary value, we can change it later if needed return k.RemoveExpiredAllowances(ctx, 200) } From 2f10574d16e46ae6981dc5c707948f40db786927 Mon Sep 17 00:00:00 2001 From: Facundo Date: Mon, 16 Oct 2023 13:12:30 +0200 Subject: [PATCH 28/32] lint fix --- x/feegrant/keeper/msg_server_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/x/feegrant/keeper/msg_server_test.go b/x/feegrant/keeper/msg_server_test.go index 64023d3cc28f..4ef2ca6621fc 100644 --- a/x/feegrant/keeper/msg_server_test.go +++ b/x/feegrant/keeper/msg_server_test.go @@ -348,5 +348,4 @@ func (suite *KeeperTestSuite) TestPruneAllowances() { }) suite.Require().NoError(err) suite.Require().Equal(1, count) - } From a6c1c6fea978bfb2bb177825aee95b0f1a0d67e1 Mon Sep 17 00:00:00 2001 From: Facundo Date: Mon, 16 Oct 2023 13:14:50 +0200 Subject: [PATCH 29/32] correct since comments in feegrant --- proto/cosmos/feegrant/v1beta1/tx.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proto/cosmos/feegrant/v1beta1/tx.proto b/proto/cosmos/feegrant/v1beta1/tx.proto index 88171c526eaf..a45eec3ba368 100644 --- a/proto/cosmos/feegrant/v1beta1/tx.proto +++ b/proto/cosmos/feegrant/v1beta1/tx.proto @@ -23,7 +23,7 @@ service Msg { // PruneAllowances prunes expired fee allowances, currently up to 75 at a time. // - // Since feegrant v0.1 + // Since cosmos-sdk 0.50 rpc PruneAllowances(MsgPruneAllowances) returns (MsgPruneAllowancesResponse); } @@ -63,7 +63,7 @@ message MsgRevokeAllowanceResponse {} // MsgPruneAllowances prunes expired fee allowances. // -// Since feegrant v0.1 +// Since cosmos-sdk 0.50 message MsgPruneAllowances { option (cosmos.msg.v1.signer) = "pruner"; @@ -73,5 +73,5 @@ message MsgPruneAllowances { // MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. // -// Since feegrant v0.1 +// Since cosmos-sdk 0.50 message MsgPruneAllowancesResponse {} \ No newline at end of file From 66230cc119a8c20a797f45d3def838b3041497da Mon Sep 17 00:00:00 2001 From: Facundo Date: Mon, 16 Oct 2023 15:43:54 +0200 Subject: [PATCH 30/32] oopsie --- x/feegrant/keeper/msg_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/feegrant/keeper/msg_server.go b/x/feegrant/keeper/msg_server.go index 269220f7b054..f3c5319123ac 100644 --- a/x/feegrant/keeper/msg_server.go +++ b/x/feegrant/keeper/msg_server.go @@ -89,7 +89,7 @@ func (k msgServer) RevokeAllowance(ctx context.Context, msg *feegrant.MsgRevokeA // PruneAllowances removes expired allowances from the store. func (k msgServer) PruneAllowances(ctx context.Context, req *feegrant.MsgPruneAllowances) (*feegrant.MsgPruneAllowancesResponse, error) { // 75 is an arbitrary value, we can change it later if needed - err := k.RemoveExpiredAllowances(ctx, 100) + err := k.RemoveExpiredAllowances(ctx, 75) if err != nil { return nil, err } From 2eba354e4ba95ac47e3c1b14fa500cb4bf180933 Mon Sep 17 00:00:00 2001 From: Facundo Date: Mon, 16 Oct 2023 16:34:33 +0200 Subject: [PATCH 31/32] fix --- x/feegrant/keeper/msg_server_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x/feegrant/keeper/msg_server_test.go b/x/feegrant/keeper/msg_server_test.go index 4ef2ca6621fc..e368df88b66a 100644 --- a/x/feegrant/keeper/msg_server_test.go +++ b/x/feegrant/keeper/msg_server_test.go @@ -316,7 +316,10 @@ func (suite *KeeperTestSuite) TestPruneAllowances() { } _, err = suite.msgSrvr.GrantAllowance(ctx, req) - suite.Require().NoError(err) + if err != nil { + // do not fail, just try with another pair + continue + } count++ } From d84f1a10bc1c965a9f22ea9d00206b38d2b2bd08 Mon Sep 17 00:00:00 2001 From: Facundo Date: Mon, 16 Oct 2023 16:47:19 +0200 Subject: [PATCH 32/32] ty julien --- client/v2/go.mod | 2 +- client/v2/go.sum | 4 ++-- go.sum | 4 ---- simapp/go.sum | 4 ---- simapp/gomod2nix.toml | 4 ++-- tests/go.sum | 4 ---- tests/starship/tests/go.mod | 2 +- tests/starship/tests/go.sum | 4 ++-- x/circuit/go.mod | 2 +- x/circuit/go.sum | 4 ++-- x/evidence/go.mod | 2 +- x/evidence/go.sum | 4 ++-- x/feegrant/go.sum | 2 -- x/nft/go.mod | 2 +- x/nft/go.sum | 4 ++-- x/params/go.mod | 2 +- x/params/go.sum | 4 ++-- x/protocolpool/go.mod | 2 +- x/protocolpool/go.sum | 4 ++-- x/upgrade/go.mod | 2 +- x/upgrade/go.sum | 4 ++-- 21 files changed, 26 insertions(+), 40 deletions(-) diff --git a/client/v2/go.mod b/client/v2/go.mod index d3de1dff1e40..3c295829b044 100644 --- a/client/v2/go.mod +++ b/client/v2/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/client/v2 go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 + cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/x/tx v0.10.0 diff --git a/client/v2/go.sum b/client/v2/go.sum index 7bbc1c63b8db..4b9987514424 100644 --- a/client/v2/go.sum +++ b/client/v2/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 h1:bCxnZ6XHFedjB1bT1twYfaLxY/uMkIxgFGOFtQ9xnt4= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/go.sum b/go.sum index 300f25ffc54e..813df89e323f 100644 --- a/go.sum +++ b/go.sum @@ -35,10 +35,6 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= -cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a h1:2a5orFKu9MNUJfUjoWXIQb7MZnGa+CLoft4Z7leLSvQ= -cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 h1:bCxnZ6XHFedjB1bT1twYfaLxY/uMkIxgFGOFtQ9xnt4= cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= diff --git a/simapp/go.sum b/simapp/go.sum index 9e0155c65c53..332ad2e26f08 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -187,10 +187,6 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= -cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a h1:2a5orFKu9MNUJfUjoWXIQb7MZnGa+CLoft4Z7leLSvQ= -cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 h1:bCxnZ6XHFedjB1bT1twYfaLxY/uMkIxgFGOFtQ9xnt4= cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= diff --git a/simapp/gomod2nix.toml b/simapp/gomod2nix.toml index 37bd4e11275d..5e1fe1ae01a8 100644 --- a/simapp/gomod2nix.toml +++ b/simapp/gomod2nix.toml @@ -17,8 +17,8 @@ schema = 3 version = "v1.31.0" hash = "sha256-d59Q6JjMga6/7d1TtFW9GuAq+6O2U4LhNesz3Knmo0E=" [mod."cosmossdk.io/api"] - version = "v0.7.2-0.20230927090904-9dd34510e273" - hash = "sha256-KRosrgOUbZeHDkLcSRLq4e4DHugXynj5vSHNrzGKEqs=" + version = "v0.7.2-0.20231016084709-1314de734f17" + hash = "sha256-AByjhMjt6dmx4mGr+ljAoFnBBeaDYnj71mgpnGbogys=" [mod."cosmossdk.io/collections"] version = "v0.4.0" hash = "sha256-minFyzgO/D+Oda4E3B1qvOAN5qd65SjS6nmjca4cp/8=" diff --git a/tests/go.sum b/tests/go.sum index 326e09498664..63b7c348148b 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -187,10 +187,6 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= -cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a h1:2a5orFKu9MNUJfUjoWXIQb7MZnGa+CLoft4Z7leLSvQ= -cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 h1:bCxnZ6XHFedjB1bT1twYfaLxY/uMkIxgFGOFtQ9xnt4= cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= diff --git a/tests/starship/tests/go.mod b/tests/starship/tests/go.mod index 807e08f8a34a..526277c64d53 100644 --- a/tests/starship/tests/go.mod +++ b/tests/starship/tests/go.mod @@ -39,7 +39,7 @@ require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.1 // indirect cloud.google.com/go/storage v1.31.0 // indirect - cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 // indirect + cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 // indirect cosmossdk.io/client/v2 v2.0.0-20230630094428-02b760776860 // indirect cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/core v0.12.0 // indirect diff --git a/tests/starship/tests/go.sum b/tests/starship/tests/go.sum index 4f6c9dfea08f..9201b5e6de5c 100644 --- a/tests/starship/tests/go.sum +++ b/tests/starship/tests/go.sum @@ -187,8 +187,8 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 h1:bCxnZ6XHFedjB1bT1twYfaLxY/uMkIxgFGOFtQ9xnt4= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/circuit/go.mod b/x/circuit/go.mod index fb0374398161..05de6145e53c 100644 --- a/x/circuit/go.mod +++ b/x/circuit/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/circuit go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 + cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/x/circuit/go.sum b/x/circuit/go.sum index 7bbc1c63b8db..4b9987514424 100644 --- a/x/circuit/go.sum +++ b/x/circuit/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 h1:bCxnZ6XHFedjB1bT1twYfaLxY/uMkIxgFGOFtQ9xnt4= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/evidence/go.mod b/x/evidence/go.mod index 827dcbbf3b9e..51704d2943ce 100644 --- a/x/evidence/go.mod +++ b/x/evidence/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/evidence go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 + cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/x/evidence/go.sum b/x/evidence/go.sum index 7bbc1c63b8db..4b9987514424 100644 --- a/x/evidence/go.sum +++ b/x/evidence/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 h1:bCxnZ6XHFedjB1bT1twYfaLxY/uMkIxgFGOFtQ9xnt4= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/feegrant/go.sum b/x/feegrant/go.sum index c94dde7d17c5..aada4cd33d5c 100644 --- a/x/feegrant/go.sum +++ b/x/feegrant/go.sum @@ -35,8 +35,6 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a h1:2a5orFKu9MNUJfUjoWXIQb7MZnGa+CLoft4Z7leLSvQ= -cosmossdk.io/api v0.7.2-0.20231013124839-3159fa8b095a/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 h1:bCxnZ6XHFedjB1bT1twYfaLxY/uMkIxgFGOFtQ9xnt4= cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= diff --git a/x/nft/go.mod b/x/nft/go.mod index 19b8473dcf7b..120b786dcfd0 100644 --- a/x/nft/go.mod +++ b/x/nft/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/nft go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 + cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/errors v1.0.0 diff --git a/x/nft/go.sum b/x/nft/go.sum index 7bbc1c63b8db..4b9987514424 100644 --- a/x/nft/go.sum +++ b/x/nft/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 h1:bCxnZ6XHFedjB1bT1twYfaLxY/uMkIxgFGOFtQ9xnt4= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/params/go.mod b/x/params/go.mod index 2bf3fa4f1efc..1b2abdabca75 100644 --- a/x/params/go.mod +++ b/x/params/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/params go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 + cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/errors v1.0.0 diff --git a/x/params/go.sum b/x/params/go.sum index 7bbc1c63b8db..4b9987514424 100644 --- a/x/params/go.sum +++ b/x/params/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 h1:bCxnZ6XHFedjB1bT1twYfaLxY/uMkIxgFGOFtQ9xnt4= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/protocolpool/go.mod b/x/protocolpool/go.mod index 883770814280..a7a9736e73fa 100644 --- a/x/protocolpool/go.mod +++ b/x/protocolpool/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/protocolpool go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 + cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/errors v1.0.0 diff --git a/x/protocolpool/go.sum b/x/protocolpool/go.sum index f916fcd3ebcd..5caf219e7f24 100644 --- a/x/protocolpool/go.sum +++ b/x/protocolpool/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 h1:bCxnZ6XHFedjB1bT1twYfaLxY/uMkIxgFGOFtQ9xnt4= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/upgrade/go.mod b/x/upgrade/go.mod index e7adb1421e31..f633a153fc3f 100644 --- a/x/upgrade/go.mod +++ b/x/upgrade/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/upgrade go 1.21 require ( - cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 + cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/errors v1.0.0 diff --git a/x/upgrade/go.sum b/x/upgrade/go.sum index fae50d1a1c36..6b9791977268 100644 --- a/x/upgrade/go.sum +++ b/x/upgrade/go.sum @@ -187,8 +187,8 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 h1:rNTYK/OQQ5B8jNY0wGSOv+64Fwm7DG8Yke5eRmdTPqk= -cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17 h1:bCxnZ6XHFedjB1bT1twYfaLxY/uMkIxgFGOFtQ9xnt4= +cosmossdk.io/api v0.7.2-0.20231016084709-1314de734f17/go.mod h1:RgzIuGUBiX4E4imKHFyxl+uSKU+qs2v0W2ymVoGoyQQ= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU=