From 517840c73af5f13497e9695573af6e55a0d79e4c Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Thu, 23 May 2024 10:36:52 -0500 Subject: [PATCH] base PR --- .gitignore | 42 - Makefile | 31 +- api/ratelimit/module/v1/module.pulsar.go | 580 ++ api/ratelimit/v1/genesis.pulsar.go | 1273 ++++ api/ratelimit/v1/params.pulsar.go | 493 ++ api/ratelimit/v1/query.pulsar.go | 6095 +++++++++++++++++ api/ratelimit/v1/query_grpc.pb.go | 310 + api/ratelimit/v1/ratelimit.pulsar.go | 3873 +++++++++++ api/ratelimit/v1/tx.pulsar.go | 4673 +++++++++++++ api/ratelimit/v1/tx_grpc.pb.go | 228 + buf.work.yaml | 3 + {ratelimit/client => client}/cli/query.go | 2 +- depinject.go | 61 + go.mod | 130 +- go.sum | 46 +- .../ibc_middleware.go => ibc_middleware.go | 2 +- {ratelimit/keeper => keeper}/abci.go | 0 {ratelimit/keeper => keeper}/abci_test.go | 2 +- {ratelimit/keeper => keeper}/blacklist.go | 16 +- .../keeper => keeper}/blacklist_test.go | 0 {ratelimit/keeper => keeper}/epoch.go | 8 +- {ratelimit/keeper => keeper}/epoch_test.go | 2 +- {ratelimit/keeper => keeper}/events.go | 2 +- {ratelimit/keeper => keeper}/flow.go | 2 +- {ratelimit/keeper => keeper}/flow_test.go | 4 +- {ratelimit/keeper => keeper}/genesis.go | 2 +- {ratelimit/keeper => keeper}/genesis_test.go | 2 +- {ratelimit/keeper => keeper}/grpc_query.go | 2 +- .../keeper => keeper}/grpc_query_test.go | 2 +- {ratelimit/keeper => keeper}/keeper.go | 33 +- {ratelimit/keeper => keeper}/keeper_test.go | 4 +- {ratelimit/keeper => keeper}/msg_server.go | 2 +- .../keeper => keeper}/msg_server_test.go | 4 +- {ratelimit/keeper => keeper}/packet.go | 2 +- {ratelimit/keeper => keeper}/packet_test.go | 4 +- {ratelimit/keeper => keeper}/params.go | 2 +- {ratelimit/keeper => keeper}/pending_send.go | 21 +- .../keeper => keeper}/pending_send_test.go | 0 {ratelimit/keeper => keeper}/rate_limit.go | 16 +- .../keeper => keeper}/rate_limit_test.go | 2 +- {ratelimit/keeper => keeper}/whitelist.go | 16 +- .../keeper => keeper}/whitelist_test.go | 2 +- ratelimit/module.go => module.go | 11 +- proto/buf.gen.pulsar.yaml | 18 + proto/buf.lock | 16 +- proto/generate.sh | 8 + proto/ratelimit/module/v1/module.proto | 13 + proto/ratelimit/v1/genesis.proto | 2 +- proto/ratelimit/v1/params.proto | 2 +- proto/ratelimit/v1/query.proto | 68 +- proto/ratelimit/v1/ratelimit.proto | 10 +- proto/ratelimit/v1/tx.proto | 14 +- ratelimit/LICENSE | 201 - scripts/protocgen.sh | 28 - testing/simapp/app.go | 8 +- testing/simapp/apptesting/test_helpers.go | 2 +- testing/simapp/encoding.go | 2 +- testing/simapp/simd/main.go | 2 +- testing/simapp/simd/root.go | 4 +- {ratelimit/types => types}/codec.go | 0 {ratelimit/types => types}/errors.go | 0 {ratelimit/types => types}/events.go | 0 .../types => types}/expected_keepers.go | 0 {ratelimit/types => types}/flow.go | 0 {ratelimit/types => types}/flow_test.go | 2 +- {ratelimit/types => types}/genesis.go | 0 {ratelimit/types => types}/genesis.pb.go | 58 +- {ratelimit/types => types}/genesis_test.go | 2 +- {ratelimit/types => types}/keys.go | 0 {ratelimit/types => types}/msgs.go | 0 {ratelimit/types => types}/msgs_test.go | 4 +- {ratelimit/types => types}/params.go | 0 {ratelimit/types => types}/params.pb.go | 13 +- {ratelimit/types => types}/query.pb.go | 91 +- {ratelimit/types => types}/query.pb.gw.go | 0 {ratelimit/types => types}/quota.go | 0 {ratelimit/types => types}/quota_test.go | 2 +- {ratelimit/types => types}/ratelimit.pb.go | 87 +- {ratelimit/types => types}/tx.pb.go | 76 +- 79 files changed, 18049 insertions(+), 689 deletions(-) delete mode 100644 .gitignore create mode 100644 api/ratelimit/module/v1/module.pulsar.go create mode 100644 api/ratelimit/v1/genesis.pulsar.go create mode 100644 api/ratelimit/v1/params.pulsar.go create mode 100644 api/ratelimit/v1/query.pulsar.go create mode 100644 api/ratelimit/v1/query_grpc.pb.go create mode 100644 api/ratelimit/v1/ratelimit.pulsar.go create mode 100644 api/ratelimit/v1/tx.pulsar.go create mode 100644 api/ratelimit/v1/tx_grpc.pb.go create mode 100644 buf.work.yaml rename {ratelimit/client => client}/cli/query.go (98%) create mode 100644 depinject.go rename ratelimit/ibc_middleware.go => ibc_middleware.go (98%) rename {ratelimit/keeper => keeper}/abci.go (100%) rename {ratelimit/keeper => keeper}/abci_test.go (97%) rename {ratelimit/keeper => keeper}/blacklist.go (63%) rename {ratelimit/keeper => keeper}/blacklist_test.go (100%) rename {ratelimit/keeper => keeper}/epoch.go (84%) rename {ratelimit/keeper => keeper}/epoch_test.go (98%) rename {ratelimit/keeper => keeper}/events.go (93%) rename {ratelimit/keeper => keeper}/flow.go (98%) rename {ratelimit/keeper => keeper}/flow_test.go (99%) rename {ratelimit/keeper => keeper}/genesis.go (97%) rename {ratelimit/keeper => keeper}/genesis_test.go (98%) rename {ratelimit/keeper => keeper}/grpc_query.go (98%) rename {ratelimit/keeper => keeper}/grpc_query_test.go (98%) rename {ratelimit/keeper => keeper}/keeper.go (61%) rename {ratelimit/keeper => keeper}/keeper_test.go (71%) rename {ratelimit/keeper => keeper}/msg_server.go (97%) rename {ratelimit/keeper => keeper}/msg_server_test.go (98%) rename {ratelimit/keeper => keeper}/packet.go (99%) rename {ratelimit/keeper => keeper}/packet_test.go (99%) rename {ratelimit/keeper => keeper}/params.go (84%) rename {ratelimit/keeper => keeper}/pending_send.go (73%) rename {ratelimit/keeper => keeper}/pending_send_test.go (100%) rename {ratelimit/keeper => keeper}/rate_limit.go (87%) rename {ratelimit/keeper => keeper}/rate_limit_test.go (97%) rename {ratelimit/keeper => keeper}/whitelist.go (70%) rename {ratelimit/keeper => keeper}/whitelist_test.go (97%) rename ratelimit/module.go => module.go (94%) create mode 100644 proto/buf.gen.pulsar.yaml create mode 100644 proto/generate.sh create mode 100644 proto/ratelimit/module/v1/module.proto delete mode 100644 ratelimit/LICENSE delete mode 100644 scripts/protocgen.sh rename {ratelimit/types => types}/codec.go (100%) rename {ratelimit/types => types}/errors.go (100%) rename {ratelimit/types => types}/events.go (100%) rename {ratelimit/types => types}/expected_keepers.go (100%) rename {ratelimit/types => types}/flow.go (100%) rename {ratelimit/types => types}/flow_test.go (98%) rename {ratelimit/types => types}/genesis.go (100%) rename {ratelimit/types => types}/genesis.pb.go (84%) rename {ratelimit/types => types}/genesis_test.go (97%) rename {ratelimit/types => types}/keys.go (100%) rename {ratelimit/types => types}/msgs.go (100%) rename {ratelimit/types => types}/msgs_test.go (98%) rename {ratelimit/types => types}/params.go (100%) rename {ratelimit/types => types}/params.pb.go (91%) rename {ratelimit/types => types}/query.pb.go (93%) rename {ratelimit/types => types}/query.pb.gw.go (100%) rename {ratelimit/types => types}/quota.go (100%) rename {ratelimit/types => types}/quota_test.go (96%) rename {ratelimit/types => types}/ratelimit.pb.go (90%) rename {ratelimit/types => types}/tx.pb.go (94%) diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8153ce1..0000000 --- a/.gitignore +++ /dev/null @@ -1,42 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -**state.json -**test.py -**test.sh -**test.py -# build -launch.sh -build/* -state/* -scripts/state -scripts/logs -dockernet/state -dockernet/logs -dockernet/upgrades/binaries -dockernet/upgrades/cosmovisor -dockernet/temp.sh -scripts/temp.sh -vue/* -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ - - -.DS_Store -.terraform -*.pem - -.vscode -!.vscode/settings.json - -.ipynb_checkpoints/* diff --git a/Makefile b/Makefile index 9267276..19ba76a 100644 --- a/Makefile +++ b/Makefile @@ -98,33 +98,26 @@ lint: ############################################################################### test-unit: - @go test -mod=readonly ./ratelimit/... + @go test -mod=readonly ./keeper/... ############################################################################### ### Protobuf ### ############################################################################### -containerProtoVer=0.14.0 -containerProtoImage=ghcr.io/cosmos/proto-builder:$(containerProtoVer) +BUF_VERSION=1.31.0 +BUILDER_VERSION=0.14.0 -proto-all: proto-format proto-gen - -proto-gen: - @echo "Generating Protobuf files" - @$(DOCKER) run --user $(id -u):$(id -g) --rm -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \ - sh ./scripts/protocgen.sh; +proto-all: proto-format proto-lint proto-gen proto-format: - @echo "Formatting Protobuf files" - @$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/docker-build-proto \ - find ./proto -name "*.proto" -exec clang-format -i {} \; + @docker run --rm --volume "$(PWD)":/workspace --workdir /workspace \ + bufbuild/buf:$(BUF_VERSION) format --diff --write -proto-swagger-gen: - @echo "Generating Protobuf Swagger" - @$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \ - sh ./scripts/protoc-swagger-gen.sh; - -proto-check-breaking: - @$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main +proto-gen: + @docker run --rm --volume "$(PWD)":/workspace --workdir /workspace \ + ghcr.io/cosmos/proto-builder:$(BUILDER_VERSION) sh ./proto/generate.sh +proto-lint: + @docker run --rm --volume "$(PWD)":/workspace --workdir /workspace \ + bufbuild/buf:$(BUF_VERSION) lint diff --git a/api/ratelimit/module/v1/module.pulsar.go b/api/ratelimit/module/v1/module.pulsar.go new file mode 100644 index 0000000..b14ac62 --- /dev/null +++ b/api/ratelimit/module/v1/module.pulsar.go @@ -0,0 +1,580 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package modulev1 + +import ( + _ "cosmossdk.io/api/cosmos/app/v1alpha1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Module protoreflect.MessageDescriptor + fd_Module_authority protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_module_v1_module_proto_init() + md_Module = File_ratelimit_module_v1_module_proto.Messages().ByName("Module") + fd_Module_authority = md_Module.Fields().ByName("authority") +} + +var _ protoreflect.Message = (*fastReflection_Module)(nil) + +type fastReflection_Module Module + +func (x *Module) ProtoReflect() protoreflect.Message { + return (*fastReflection_Module)(x) +} + +func (x *Module) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_module_v1_module_proto_msgTypes[0] + 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_Module_messageType fastReflection_Module_messageType +var _ protoreflect.MessageType = fastReflection_Module_messageType{} + +type fastReflection_Module_messageType struct{} + +func (x fastReflection_Module_messageType) Zero() protoreflect.Message { + return (*fastReflection_Module)(nil) +} +func (x fastReflection_Module_messageType) New() protoreflect.Message { + return new(fastReflection_Module) +} +func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// 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_Module) Type() protoreflect.MessageType { + return _fastReflection_Module_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Module) New() protoreflect.Message { + return new(fastReflection_Module) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { + return (*Module)(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_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. +// +// 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_Module) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.module.v1.Module.authority": + return x.Authority != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.module.v1.Module")) + } + panic(fmt.Errorf("message ratelimit.module.v1.Module 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_Module) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.module.v1.Module.authority": + x.Authority = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.module.v1.Module")) + } + panic(fmt.Errorf("message ratelimit.module.v1.Module 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_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.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: ratelimit.module.v1.Module")) + } + panic(fmt.Errorf("message ratelimit.module.v1.Module 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_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.module.v1.Module.authority": + x.Authority = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.module.v1.Module")) + } + panic(fmt.Errorf("message ratelimit.module.v1.Module 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_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.module.v1.Module.authority": + panic(fmt.Errorf("field authority of message ratelimit.module.v1.Module is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.module.v1.Module")) + } + panic(fmt.Errorf("message ratelimit.module.v1.Module 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_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.module.v1.Module.authority": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.module.v1.Module")) + } + panic(fmt.Errorf("message ratelimit.module.v1.Module 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_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.module.v1.Module", 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_Module) 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_Module) 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_Module) 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_Module) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Module) + 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.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().(*Module) + 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.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().(*Module) + 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: Module: wiretype end group for non-group") + } + if fieldNum <= 0 { + 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:]) + 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, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: ratelimit/module/v1/module.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Module is the config object of the IBC Rate Limiting module. +type Module struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority defines the custom module authority. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (x *Module) Reset() { + *x = Module{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_module_v1_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Module) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Module) ProtoMessage() {} + +// Deprecated: Use Module.ProtoReflect.Descriptor instead. +func (*Module) Descriptor() ([]byte, []int) { + return file_ratelimit_module_v1_module_proto_rawDescGZIP(), []int{0} +} + +func (x *Module) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +var File_ratelimit_module_v1_module_proto protoreflect.FileDescriptor + +var file_ratelimit_module_v1_module_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x13, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 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, 0x63, 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, 0x3b, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x35, 0x0a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x69, 0x62, 0x63, + 0x2d, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x72, 0x61, + 0x74, 0x65, 0x2d, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x38, 0x42, 0xea, + 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 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, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x69, 0x62, 0x63, + 0x2d, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x72, 0x61, + 0x74, 0x65, 0x2d, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x38, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x52, 0x4d, 0x58, 0xaa, 0x02, 0x13, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x52, 0x61, + 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x1f, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 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, 0x15, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x3a, + 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_ratelimit_module_v1_module_proto_rawDescOnce sync.Once + file_ratelimit_module_v1_module_proto_rawDescData = file_ratelimit_module_v1_module_proto_rawDesc +) + +func file_ratelimit_module_v1_module_proto_rawDescGZIP() []byte { + file_ratelimit_module_v1_module_proto_rawDescOnce.Do(func() { + file_ratelimit_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_ratelimit_module_v1_module_proto_rawDescData) + }) + return file_ratelimit_module_v1_module_proto_rawDescData +} + +var file_ratelimit_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_ratelimit_module_v1_module_proto_goTypes = []interface{}{ + (*Module)(nil), // 0: ratelimit.module.v1.Module +} +var file_ratelimit_module_v1_module_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_ratelimit_module_v1_module_proto_init() } +func file_ratelimit_module_v1_module_proto_init() { + if File_ratelimit_module_v1_module_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ratelimit_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Module); 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{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ratelimit_module_v1_module_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ratelimit_module_v1_module_proto_goTypes, + DependencyIndexes: file_ratelimit_module_v1_module_proto_depIdxs, + MessageInfos: file_ratelimit_module_v1_module_proto_msgTypes, + }.Build() + File_ratelimit_module_v1_module_proto = out.File + file_ratelimit_module_v1_module_proto_rawDesc = nil + file_ratelimit_module_v1_module_proto_goTypes = nil + file_ratelimit_module_v1_module_proto_depIdxs = nil +} diff --git a/api/ratelimit/v1/genesis.pulsar.go b/api/ratelimit/v1/genesis.pulsar.go new file mode 100644 index 0000000..f689d88 --- /dev/null +++ b/api/ratelimit/v1/genesis.pulsar.go @@ -0,0 +1,1273 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package ratelimitv1 + +import ( + fmt "fmt" + 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" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_GenesisState_2_list)(nil) + +type _GenesisState_2_list struct { + list *[]*RateLimit +} + +func (x *_GenesisState_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*RateLimit) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*RateLimit) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { + v := new(RateLimit) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_2_list) NewElement() protoreflect.Value { + v := new(RateLimit) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_3_list)(nil) + +type _GenesisState_3_list struct { + list *[]*WhitelistedAddressPair +} + +func (x *_GenesisState_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*WhitelistedAddressPair) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*WhitelistedAddressPair) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { + v := new(WhitelistedAddressPair) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_3_list) NewElement() protoreflect.Value { + v := new(WhitelistedAddressPair) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_4_list)(nil) + +type _GenesisState_4_list struct { + list *[]string +} + +func (x *_GenesisState_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_GenesisState_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_4_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message GenesisState at list field BlacklistedDenoms as it is not of Message kind")) +} + +func (x *_GenesisState_4_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_4_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_GenesisState_4_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_5_list)(nil) + +type _GenesisState_5_list struct { + list *[]string +} + +func (x *_GenesisState_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_GenesisState_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_5_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message GenesisState at list field PendingSendPacketSequenceNumbers as it is not of Message kind")) +} + +func (x *_GenesisState_5_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_5_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_GenesisState_5_list) IsValid() bool { + return x.list != nil +} + +var ( + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor + fd_GenesisState_rate_limits protoreflect.FieldDescriptor + fd_GenesisState_whitelisted_address_pairs protoreflect.FieldDescriptor + fd_GenesisState_blacklisted_denoms protoreflect.FieldDescriptor + fd_GenesisState_pending_send_packet_sequence_numbers protoreflect.FieldDescriptor + fd_GenesisState_hour_epoch protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_genesis_proto_init() + md_GenesisState = File_ratelimit_v1_genesis_proto.Messages().ByName("GenesisState") + fd_GenesisState_params = md_GenesisState.Fields().ByName("params") + fd_GenesisState_rate_limits = md_GenesisState.Fields().ByName("rate_limits") + fd_GenesisState_whitelisted_address_pairs = md_GenesisState.Fields().ByName("whitelisted_address_pairs") + fd_GenesisState_blacklisted_denoms = md_GenesisState.Fields().ByName("blacklisted_denoms") + fd_GenesisState_pending_send_packet_sequence_numbers = md_GenesisState.Fields().ByName("pending_send_packet_sequence_numbers") + fd_GenesisState_hour_epoch = md_GenesisState.Fields().ByName("hour_epoch") +} + +var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) + +type fastReflection_GenesisState GenesisState + +func (x *GenesisState) ProtoReflect() protoreflect.Message { + return (*fastReflection_GenesisState)(x) +} + +func (x *GenesisState) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_genesis_proto_msgTypes[0] + 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_GenesisState_messageType fastReflection_GenesisState_messageType +var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} + +type fastReflection_GenesisState_messageType struct{} + +func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { + return (*fastReflection_GenesisState)(nil) +} +func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} +func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// 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_GenesisState) Type() protoreflect.MessageType { + return _fastReflection_GenesisState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GenesisState) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { + return (*GenesisState)(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_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_GenesisState_params, value) { + return + } + } + if len(x.RateLimits) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.RateLimits}) + if !f(fd_GenesisState_rate_limits, value) { + return + } + } + if len(x.WhitelistedAddressPairs) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.WhitelistedAddressPairs}) + if !f(fd_GenesisState_whitelisted_address_pairs, value) { + return + } + } + if len(x.BlacklistedDenoms) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_4_list{list: &x.BlacklistedDenoms}) + if !f(fd_GenesisState_blacklisted_denoms, value) { + return + } + } + if len(x.PendingSendPacketSequenceNumbers) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_5_list{list: &x.PendingSendPacketSequenceNumbers}) + if !f(fd_GenesisState_pending_send_packet_sequence_numbers, value) { + return + } + } + if x.HourEpoch != nil { + value := protoreflect.ValueOfMessage(x.HourEpoch.ProtoReflect()) + if !f(fd_GenesisState_hour_epoch, 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_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.GenesisState.params": + return x.Params != nil + case "ratelimit.v1.GenesisState.rate_limits": + return len(x.RateLimits) != 0 + case "ratelimit.v1.GenesisState.whitelisted_address_pairs": + return len(x.WhitelistedAddressPairs) != 0 + case "ratelimit.v1.GenesisState.blacklisted_denoms": + return len(x.BlacklistedDenoms) != 0 + case "ratelimit.v1.GenesisState.pending_send_packet_sequence_numbers": + return len(x.PendingSendPacketSequenceNumbers) != 0 + case "ratelimit.v1.GenesisState.hour_epoch": + return x.HourEpoch != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.GenesisState")) + } + panic(fmt.Errorf("message ratelimit.v1.GenesisState 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_GenesisState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.GenesisState.params": + x.Params = nil + case "ratelimit.v1.GenesisState.rate_limits": + x.RateLimits = nil + case "ratelimit.v1.GenesisState.whitelisted_address_pairs": + x.WhitelistedAddressPairs = nil + case "ratelimit.v1.GenesisState.blacklisted_denoms": + x.BlacklistedDenoms = nil + case "ratelimit.v1.GenesisState.pending_send_packet_sequence_numbers": + x.PendingSendPacketSequenceNumbers = nil + case "ratelimit.v1.GenesisState.hour_epoch": + x.HourEpoch = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.GenesisState")) + } + panic(fmt.Errorf("message ratelimit.v1.GenesisState 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_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.GenesisState.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "ratelimit.v1.GenesisState.rate_limits": + if len(x.RateLimits) == 0 { + return protoreflect.ValueOfList(&_GenesisState_2_list{}) + } + listValue := &_GenesisState_2_list{list: &x.RateLimits} + return protoreflect.ValueOfList(listValue) + case "ratelimit.v1.GenesisState.whitelisted_address_pairs": + if len(x.WhitelistedAddressPairs) == 0 { + return protoreflect.ValueOfList(&_GenesisState_3_list{}) + } + listValue := &_GenesisState_3_list{list: &x.WhitelistedAddressPairs} + return protoreflect.ValueOfList(listValue) + case "ratelimit.v1.GenesisState.blacklisted_denoms": + if len(x.BlacklistedDenoms) == 0 { + return protoreflect.ValueOfList(&_GenesisState_4_list{}) + } + listValue := &_GenesisState_4_list{list: &x.BlacklistedDenoms} + return protoreflect.ValueOfList(listValue) + case "ratelimit.v1.GenesisState.pending_send_packet_sequence_numbers": + if len(x.PendingSendPacketSequenceNumbers) == 0 { + return protoreflect.ValueOfList(&_GenesisState_5_list{}) + } + listValue := &_GenesisState_5_list{list: &x.PendingSendPacketSequenceNumbers} + return protoreflect.ValueOfList(listValue) + case "ratelimit.v1.GenesisState.hour_epoch": + value := x.HourEpoch + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.GenesisState")) + } + panic(fmt.Errorf("message ratelimit.v1.GenesisState 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_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.GenesisState.params": + x.Params = value.Message().Interface().(*Params) + case "ratelimit.v1.GenesisState.rate_limits": + lv := value.List() + clv := lv.(*_GenesisState_2_list) + x.RateLimits = *clv.list + case "ratelimit.v1.GenesisState.whitelisted_address_pairs": + lv := value.List() + clv := lv.(*_GenesisState_3_list) + x.WhitelistedAddressPairs = *clv.list + case "ratelimit.v1.GenesisState.blacklisted_denoms": + lv := value.List() + clv := lv.(*_GenesisState_4_list) + x.BlacklistedDenoms = *clv.list + case "ratelimit.v1.GenesisState.pending_send_packet_sequence_numbers": + lv := value.List() + clv := lv.(*_GenesisState_5_list) + x.PendingSendPacketSequenceNumbers = *clv.list + case "ratelimit.v1.GenesisState.hour_epoch": + x.HourEpoch = value.Message().Interface().(*HourEpoch) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.GenesisState")) + } + panic(fmt.Errorf("message ratelimit.v1.GenesisState 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_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.GenesisState.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "ratelimit.v1.GenesisState.rate_limits": + if x.RateLimits == nil { + x.RateLimits = []*RateLimit{} + } + value := &_GenesisState_2_list{list: &x.RateLimits} + return protoreflect.ValueOfList(value) + case "ratelimit.v1.GenesisState.whitelisted_address_pairs": + if x.WhitelistedAddressPairs == nil { + x.WhitelistedAddressPairs = []*WhitelistedAddressPair{} + } + value := &_GenesisState_3_list{list: &x.WhitelistedAddressPairs} + return protoreflect.ValueOfList(value) + case "ratelimit.v1.GenesisState.blacklisted_denoms": + if x.BlacklistedDenoms == nil { + x.BlacklistedDenoms = []string{} + } + value := &_GenesisState_4_list{list: &x.BlacklistedDenoms} + return protoreflect.ValueOfList(value) + case "ratelimit.v1.GenesisState.pending_send_packet_sequence_numbers": + if x.PendingSendPacketSequenceNumbers == nil { + x.PendingSendPacketSequenceNumbers = []string{} + } + value := &_GenesisState_5_list{list: &x.PendingSendPacketSequenceNumbers} + return protoreflect.ValueOfList(value) + case "ratelimit.v1.GenesisState.hour_epoch": + if x.HourEpoch == nil { + x.HourEpoch = new(HourEpoch) + } + return protoreflect.ValueOfMessage(x.HourEpoch.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.GenesisState")) + } + panic(fmt.Errorf("message ratelimit.v1.GenesisState 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_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.GenesisState.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "ratelimit.v1.GenesisState.rate_limits": + list := []*RateLimit{} + return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) + case "ratelimit.v1.GenesisState.whitelisted_address_pairs": + list := []*WhitelistedAddressPair{} + return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) + case "ratelimit.v1.GenesisState.blacklisted_denoms": + list := []string{} + return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) + case "ratelimit.v1.GenesisState.pending_send_packet_sequence_numbers": + list := []string{} + return protoreflect.ValueOfList(&_GenesisState_5_list{list: &list}) + case "ratelimit.v1.GenesisState.hour_epoch": + m := new(HourEpoch) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.GenesisState")) + } + panic(fmt.Errorf("message ratelimit.v1.GenesisState 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_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.GenesisState", 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_GenesisState) 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_GenesisState) 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_GenesisState) 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_GenesisState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GenesisState) + 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 len(x.RateLimits) > 0 { + for _, e := range x.RateLimits { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.WhitelistedAddressPairs) > 0 { + for _, e := range x.WhitelistedAddressPairs { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.BlacklistedDenoms) > 0 { + for _, s := range x.BlacklistedDenoms { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.PendingSendPacketSequenceNumbers) > 0 { + for _, s := range x.PendingSendPacketSequenceNumbers { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.HourEpoch != nil { + l = options.Size(x.HourEpoch) + 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().(*GenesisState) + 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.HourEpoch != nil { + encoded, err := options.Marshal(x.HourEpoch) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x32 + } + if len(x.PendingSendPacketSequenceNumbers) > 0 { + for iNdEx := len(x.PendingSendPacketSequenceNumbers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.PendingSendPacketSequenceNumbers[iNdEx]) + copy(dAtA[i:], x.PendingSendPacketSequenceNumbers[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PendingSendPacketSequenceNumbers[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(x.BlacklistedDenoms) > 0 { + for iNdEx := len(x.BlacklistedDenoms) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.BlacklistedDenoms[iNdEx]) + copy(dAtA[i:], x.BlacklistedDenoms[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BlacklistedDenoms[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.WhitelistedAddressPairs) > 0 { + for iNdEx := len(x.WhitelistedAddressPairs) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.WhitelistedAddressPairs[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.RateLimits) > 0 { + for iNdEx := len(x.RateLimits) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.RateLimits[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if 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().(*GenesisState) + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: 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 + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RateLimits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.RateLimits = append(x.RateLimits, &RateLimit{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RateLimits[len(x.RateLimits)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WhitelistedAddressPairs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.WhitelistedAddressPairs = append(x.WhitelistedAddressPairs, &WhitelistedAddressPair{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.WhitelistedAddressPairs[len(x.WhitelistedAddressPairs)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlacklistedDenoms", 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.BlacklistedDenoms = append(x.BlacklistedDenoms, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PendingSendPacketSequenceNumbers", 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.PendingSendPacketSequenceNumbers = append(x.PendingSendPacketSequenceNumbers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HourEpoch", 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.HourEpoch == nil { + x.HourEpoch = &HourEpoch{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.HourEpoch); 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, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: ratelimit/v1/genesis.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// GenesisState defines the ratelimit module's genesis state. +type GenesisState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + RateLimits []*RateLimit `protobuf:"bytes,2,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` + WhitelistedAddressPairs []*WhitelistedAddressPair `protobuf:"bytes,3,rep,name=whitelisted_address_pairs,json=whitelistedAddressPairs,proto3" json:"whitelisted_address_pairs,omitempty"` + BlacklistedDenoms []string `protobuf:"bytes,4,rep,name=blacklisted_denoms,json=blacklistedDenoms,proto3" json:"blacklisted_denoms,omitempty"` + PendingSendPacketSequenceNumbers []string `protobuf:"bytes,5,rep,name=pending_send_packet_sequence_numbers,json=pendingSendPacketSequenceNumbers,proto3" json:"pending_send_packet_sequence_numbers,omitempty"` + HourEpoch *HourEpoch `protobuf:"bytes,6,opt,name=hour_epoch,json=hourEpoch,proto3" json:"hour_epoch,omitempty"` +} + +func (x *GenesisState) Reset() { + *x = GenesisState{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_genesis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenesisState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenesisState) ProtoMessage() {} + +// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. +func (*GenesisState) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_genesis_proto_rawDescGZIP(), []int{0} +} + +func (x *GenesisState) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +func (x *GenesisState) GetRateLimits() []*RateLimit { + if x != nil { + return x.RateLimits + } + return nil +} + +func (x *GenesisState) GetWhitelistedAddressPairs() []*WhitelistedAddressPair { + if x != nil { + return x.WhitelistedAddressPairs + } + return nil +} + +func (x *GenesisState) GetBlacklistedDenoms() []string { + if x != nil { + return x.BlacklistedDenoms + } + return nil +} + +func (x *GenesisState) GetPendingSendPacketSequenceNumbers() []string { + if x != nil { + return x.PendingSendPacketSequenceNumbers + } + return nil +} + +func (x *GenesisState) GetHourEpoch() *HourEpoch { + if x != nil { + return x.HourEpoch + } + return nil +} + +var File_ratelimit_v1_genesis_proto protoreflect.FileDescriptor + +var file_ratelimit_v1_genesis_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x67, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x72, 0x61, + 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 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, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x04, 0x0a, 0x0c, 0x47, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x42, 0x15, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x54, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x1a, 0xc8, + 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x12, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x72, 0x61, 0x74, + 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x22, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x8a, 0x01, 0x0a, 0x19, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x61, + 0x69, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, + 0x73, 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x69, 0x72, 0x42, + 0x28, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x77, + 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x22, 0x52, 0x17, 0x77, 0x68, 0x69, 0x74, 0x65, + 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x69, + 0x72, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, + 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, + 0x73, 0x12, 0x4e, 0x0a, 0x24, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x6e, + 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, + 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x20, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x12, 0x51, 0x0a, 0x0a, 0x68, 0x6f, 0x75, 0x72, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x75, 0x72, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x19, + 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x11, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x68, 0x6f, + 0x75, 0x72, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x52, 0x09, 0x68, 0x6f, 0x75, 0x72, 0x45, + 0x70, 0x6f, 0x63, 0x68, 0x42, 0xc3, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, + 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x69, 0x62, 0x63, + 0x2d, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x72, 0x61, + 0x74, 0x65, 0x2d, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x38, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x3b, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x58, + 0x58, 0xaa, 0x02, 0x0c, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x0c, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x18, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x52, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_ratelimit_v1_genesis_proto_rawDescOnce sync.Once + file_ratelimit_v1_genesis_proto_rawDescData = file_ratelimit_v1_genesis_proto_rawDesc +) + +func file_ratelimit_v1_genesis_proto_rawDescGZIP() []byte { + file_ratelimit_v1_genesis_proto_rawDescOnce.Do(func() { + file_ratelimit_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_ratelimit_v1_genesis_proto_rawDescData) + }) + return file_ratelimit_v1_genesis_proto_rawDescData +} + +var file_ratelimit_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_ratelimit_v1_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: ratelimit.v1.GenesisState + (*Params)(nil), // 1: ratelimit.v1.Params + (*RateLimit)(nil), // 2: ratelimit.v1.RateLimit + (*WhitelistedAddressPair)(nil), // 3: ratelimit.v1.WhitelistedAddressPair + (*HourEpoch)(nil), // 4: ratelimit.v1.HourEpoch +} +var file_ratelimit_v1_genesis_proto_depIdxs = []int32{ + 1, // 0: ratelimit.v1.GenesisState.params:type_name -> ratelimit.v1.Params + 2, // 1: ratelimit.v1.GenesisState.rate_limits:type_name -> ratelimit.v1.RateLimit + 3, // 2: ratelimit.v1.GenesisState.whitelisted_address_pairs:type_name -> ratelimit.v1.WhitelistedAddressPair + 4, // 3: ratelimit.v1.GenesisState.hour_epoch:type_name -> ratelimit.v1.HourEpoch + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_ratelimit_v1_genesis_proto_init() } +func file_ratelimit_v1_genesis_proto_init() { + if File_ratelimit_v1_genesis_proto != nil { + return + } + file_ratelimit_v1_params_proto_init() + file_ratelimit_v1_ratelimit_proto_init() + if !protoimpl.UnsafeEnabled { + file_ratelimit_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenesisState); 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{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ratelimit_v1_genesis_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ratelimit_v1_genesis_proto_goTypes, + DependencyIndexes: file_ratelimit_v1_genesis_proto_depIdxs, + MessageInfos: file_ratelimit_v1_genesis_proto_msgTypes, + }.Build() + File_ratelimit_v1_genesis_proto = out.File + file_ratelimit_v1_genesis_proto_rawDesc = nil + file_ratelimit_v1_genesis_proto_goTypes = nil + file_ratelimit_v1_genesis_proto_depIdxs = nil +} diff --git a/api/ratelimit/v1/params.pulsar.go b/api/ratelimit/v1/params.pulsar.go new file mode 100644 index 0000000..8727523 --- /dev/null +++ b/api/ratelimit/v1/params.pulsar.go @@ -0,0 +1,493 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package ratelimitv1 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Params protoreflect.MessageDescriptor +) + +func init() { + file_ratelimit_v1_params_proto_init() + md_Params = File_ratelimit_v1_params_proto.Messages().ByName("Params") +} + +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_ratelimit_v1_params_proto_msgTypes[0] + 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) { +} + +// 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() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Params")) + } + panic(fmt.Errorf("message ratelimit.v1.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() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Params")) + } + panic(fmt.Errorf("message ratelimit.v1.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() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Params")) + } + panic(fmt.Errorf("message ratelimit.v1.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() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Params")) + } + panic(fmt.Errorf("message ratelimit.v1.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() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Params")) + } + panic(fmt.Errorf("message ratelimit.v1.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() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Params")) + } + panic(fmt.Errorf("message ratelimit.v1.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 ratelimit.v1.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.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 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 { + 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, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: ratelimit/v1/params.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Params defines the ratelimit module's parameters. +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_params_proto_msgTypes[0] + 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_ratelimit_v1_params_proto_rawDescGZIP(), []int{0} +} + +var File_ratelimit_v1_params_proto protoreflect.FileDescriptor + +var file_ratelimit_v1_params_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x22, 0x08, 0x0a, 0x06, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x69, 0x62, 0x63, 0x2d, 0x61, + 0x70, 0x70, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x72, 0x61, 0x74, 0x65, + 0x2d, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x38, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x61, + 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x58, 0x58, 0xaa, + 0x02, 0x0c, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x0c, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, + 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x52, 0x61, 0x74, 0x65, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ratelimit_v1_params_proto_rawDescOnce sync.Once + file_ratelimit_v1_params_proto_rawDescData = file_ratelimit_v1_params_proto_rawDesc +) + +func file_ratelimit_v1_params_proto_rawDescGZIP() []byte { + file_ratelimit_v1_params_proto_rawDescOnce.Do(func() { + file_ratelimit_v1_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_ratelimit_v1_params_proto_rawDescData) + }) + return file_ratelimit_v1_params_proto_rawDescData +} + +var file_ratelimit_v1_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_ratelimit_v1_params_proto_goTypes = []interface{}{ + (*Params)(nil), // 0: ratelimit.v1.Params +} +var file_ratelimit_v1_params_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_ratelimit_v1_params_proto_init() } +func file_ratelimit_v1_params_proto_init() { + if File_ratelimit_v1_params_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ratelimit_v1_params_proto_msgTypes[0].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{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ratelimit_v1_params_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ratelimit_v1_params_proto_goTypes, + DependencyIndexes: file_ratelimit_v1_params_proto_depIdxs, + MessageInfos: file_ratelimit_v1_params_proto_msgTypes, + }.Build() + File_ratelimit_v1_params_proto = out.File + file_ratelimit_v1_params_proto_rawDesc = nil + file_ratelimit_v1_params_proto_goTypes = nil + file_ratelimit_v1_params_proto_depIdxs = nil +} diff --git a/api/ratelimit/v1/query.pulsar.go b/api/ratelimit/v1/query.pulsar.go new file mode 100644 index 0000000..ef3f7d7 --- /dev/null +++ b/api/ratelimit/v1/query.pulsar.go @@ -0,0 +1,6095 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package ratelimitv1 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_QueryAllRateLimitsRequest protoreflect.MessageDescriptor +) + +func init() { + file_ratelimit_v1_query_proto_init() + md_QueryAllRateLimitsRequest = File_ratelimit_v1_query_proto.Messages().ByName("QueryAllRateLimitsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllRateLimitsRequest)(nil) + +type fastReflection_QueryAllRateLimitsRequest QueryAllRateLimitsRequest + +func (x *QueryAllRateLimitsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllRateLimitsRequest)(x) +} + +func (x *QueryAllRateLimitsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_query_proto_msgTypes[0] + 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_QueryAllRateLimitsRequest_messageType fastReflection_QueryAllRateLimitsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllRateLimitsRequest_messageType{} + +type fastReflection_QueryAllRateLimitsRequest_messageType struct{} + +func (x fastReflection_QueryAllRateLimitsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllRateLimitsRequest)(nil) +} +func (x fastReflection_QueryAllRateLimitsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllRateLimitsRequest) +} +func (x fastReflection_QueryAllRateLimitsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllRateLimitsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllRateLimitsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllRateLimitsRequest +} + +// 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_QueryAllRateLimitsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAllRateLimitsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllRateLimitsRequest) New() protoreflect.Message { + return new(fastReflection_QueryAllRateLimitsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllRateLimitsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAllRateLimitsRequest)(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_QueryAllRateLimitsRequest) 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_QueryAllRateLimitsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllRateLimitsRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllRateLimitsRequest 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_QueryAllRateLimitsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllRateLimitsRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllRateLimitsRequest 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_QueryAllRateLimitsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllRateLimitsRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllRateLimitsRequest 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_QueryAllRateLimitsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllRateLimitsRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllRateLimitsRequest 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_QueryAllRateLimitsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllRateLimitsRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllRateLimitsRequest 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_QueryAllRateLimitsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllRateLimitsRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllRateLimitsRequest 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_QueryAllRateLimitsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.QueryAllRateLimitsRequest", 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_QueryAllRateLimitsRequest) 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_QueryAllRateLimitsRequest) 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_QueryAllRateLimitsRequest) 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_QueryAllRateLimitsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllRateLimitsRequest) + 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().(*QueryAllRateLimitsRequest) + 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().(*QueryAllRateLimitsRequest) + 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: QueryAllRateLimitsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllRateLimitsRequest: 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 _ protoreflect.List = (*_QueryAllRateLimitsResponse_1_list)(nil) + +type _QueryAllRateLimitsResponse_1_list struct { + list *[]*RateLimit +} + +func (x *_QueryAllRateLimitsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryAllRateLimitsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryAllRateLimitsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*RateLimit) + (*x.list)[i] = concreteValue +} + +func (x *_QueryAllRateLimitsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*RateLimit) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryAllRateLimitsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(RateLimit) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllRateLimitsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryAllRateLimitsResponse_1_list) NewElement() protoreflect.Value { + v := new(RateLimit) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllRateLimitsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryAllRateLimitsResponse protoreflect.MessageDescriptor + fd_QueryAllRateLimitsResponse_rate_limits protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_query_proto_init() + md_QueryAllRateLimitsResponse = File_ratelimit_v1_query_proto.Messages().ByName("QueryAllRateLimitsResponse") + fd_QueryAllRateLimitsResponse_rate_limits = md_QueryAllRateLimitsResponse.Fields().ByName("rate_limits") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllRateLimitsResponse)(nil) + +type fastReflection_QueryAllRateLimitsResponse QueryAllRateLimitsResponse + +func (x *QueryAllRateLimitsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllRateLimitsResponse)(x) +} + +func (x *QueryAllRateLimitsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_query_proto_msgTypes[1] + 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_QueryAllRateLimitsResponse_messageType fastReflection_QueryAllRateLimitsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllRateLimitsResponse_messageType{} + +type fastReflection_QueryAllRateLimitsResponse_messageType struct{} + +func (x fastReflection_QueryAllRateLimitsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllRateLimitsResponse)(nil) +} +func (x fastReflection_QueryAllRateLimitsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllRateLimitsResponse) +} +func (x fastReflection_QueryAllRateLimitsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllRateLimitsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllRateLimitsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllRateLimitsResponse +} + +// 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_QueryAllRateLimitsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAllRateLimitsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllRateLimitsResponse) New() protoreflect.Message { + return new(fastReflection_QueryAllRateLimitsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllRateLimitsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAllRateLimitsResponse)(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_QueryAllRateLimitsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.RateLimits) != 0 { + value := protoreflect.ValueOfList(&_QueryAllRateLimitsResponse_1_list{list: &x.RateLimits}) + if !f(fd_QueryAllRateLimitsResponse_rate_limits, 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_QueryAllRateLimitsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.QueryAllRateLimitsResponse.rate_limits": + return len(x.RateLimits) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllRateLimitsResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllRateLimitsResponse 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_QueryAllRateLimitsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.QueryAllRateLimitsResponse.rate_limits": + x.RateLimits = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllRateLimitsResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllRateLimitsResponse 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_QueryAllRateLimitsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.QueryAllRateLimitsResponse.rate_limits": + if len(x.RateLimits) == 0 { + return protoreflect.ValueOfList(&_QueryAllRateLimitsResponse_1_list{}) + } + listValue := &_QueryAllRateLimitsResponse_1_list{list: &x.RateLimits} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllRateLimitsResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllRateLimitsResponse 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_QueryAllRateLimitsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.QueryAllRateLimitsResponse.rate_limits": + lv := value.List() + clv := lv.(*_QueryAllRateLimitsResponse_1_list) + x.RateLimits = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllRateLimitsResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllRateLimitsResponse 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_QueryAllRateLimitsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryAllRateLimitsResponse.rate_limits": + if x.RateLimits == nil { + x.RateLimits = []*RateLimit{} + } + value := &_QueryAllRateLimitsResponse_1_list{list: &x.RateLimits} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllRateLimitsResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllRateLimitsResponse 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_QueryAllRateLimitsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryAllRateLimitsResponse.rate_limits": + list := []*RateLimit{} + return protoreflect.ValueOfList(&_QueryAllRateLimitsResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllRateLimitsResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllRateLimitsResponse 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_QueryAllRateLimitsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.QueryAllRateLimitsResponse", 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_QueryAllRateLimitsResponse) 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_QueryAllRateLimitsResponse) 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_QueryAllRateLimitsResponse) 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_QueryAllRateLimitsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllRateLimitsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.RateLimits) > 0 { + for _, e := range x.RateLimits { + l = options.Size(e) + 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().(*QueryAllRateLimitsResponse) + 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.RateLimits) > 0 { + for iNdEx := len(x.RateLimits) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.RateLimits[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 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().(*QueryAllRateLimitsResponse) + 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: QueryAllRateLimitsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllRateLimitsResponse: 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 RateLimits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.RateLimits = append(x.RateLimits, &RateLimit{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RateLimits[len(x.RateLimits)-1]); 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_QueryRateLimitRequest protoreflect.MessageDescriptor + fd_QueryRateLimitRequest_denom protoreflect.FieldDescriptor + fd_QueryRateLimitRequest_channel_id protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_query_proto_init() + md_QueryRateLimitRequest = File_ratelimit_v1_query_proto.Messages().ByName("QueryRateLimitRequest") + fd_QueryRateLimitRequest_denom = md_QueryRateLimitRequest.Fields().ByName("denom") + fd_QueryRateLimitRequest_channel_id = md_QueryRateLimitRequest.Fields().ByName("channel_id") +} + +var _ protoreflect.Message = (*fastReflection_QueryRateLimitRequest)(nil) + +type fastReflection_QueryRateLimitRequest QueryRateLimitRequest + +func (x *QueryRateLimitRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRateLimitRequest)(x) +} + +func (x *QueryRateLimitRequest) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_query_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryRateLimitRequest_messageType fastReflection_QueryRateLimitRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryRateLimitRequest_messageType{} + +type fastReflection_QueryRateLimitRequest_messageType struct{} + +func (x fastReflection_QueryRateLimitRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRateLimitRequest)(nil) +} +func (x fastReflection_QueryRateLimitRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRateLimitRequest) +} +func (x fastReflection_QueryRateLimitRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRateLimitRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryRateLimitRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRateLimitRequest +} + +// 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_QueryRateLimitRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryRateLimitRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryRateLimitRequest) New() protoreflect.Message { + return new(fastReflection_QueryRateLimitRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryRateLimitRequest) Interface() protoreflect.ProtoMessage { + return (*QueryRateLimitRequest)(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_QueryRateLimitRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_QueryRateLimitRequest_denom, value) { + return + } + } + if x.ChannelId != "" { + value := protoreflect.ValueOfString(x.ChannelId) + if !f(fd_QueryRateLimitRequest_channel_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryRateLimitRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitRequest.denom": + return x.Denom != "" + case "ratelimit.v1.QueryRateLimitRequest.channel_id": + return x.ChannelId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitRequest 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_QueryRateLimitRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitRequest.denom": + x.Denom = "" + case "ratelimit.v1.QueryRateLimitRequest.channel_id": + x.ChannelId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitRequest 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_QueryRateLimitRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.QueryRateLimitRequest.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + case "ratelimit.v1.QueryRateLimitRequest.channel_id": + value := x.ChannelId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitRequest 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_QueryRateLimitRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitRequest.denom": + x.Denom = value.Interface().(string) + case "ratelimit.v1.QueryRateLimitRequest.channel_id": + x.ChannelId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitRequest 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_QueryRateLimitRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitRequest.denom": + panic(fmt.Errorf("field denom of message ratelimit.v1.QueryRateLimitRequest is not mutable")) + case "ratelimit.v1.QueryRateLimitRequest.channel_id": + panic(fmt.Errorf("field channel_id of message ratelimit.v1.QueryRateLimitRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitRequest 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_QueryRateLimitRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitRequest.denom": + return protoreflect.ValueOfString("") + case "ratelimit.v1.QueryRateLimitRequest.channel_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitRequest 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_QueryRateLimitRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.QueryRateLimitRequest", 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_QueryRateLimitRequest) 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_QueryRateLimitRequest) 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_QueryRateLimitRequest) 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_QueryRateLimitRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryRateLimitRequest) + 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.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChannelId) + 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().(*QueryRateLimitRequest) + 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.ChannelId) > 0 { + i -= len(x.ChannelId) + copy(dAtA[i:], x.ChannelId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + 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().(*QueryRateLimitRequest) + 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: QueryRateLimitRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRateLimitRequest: 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 Denom", 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.Denom = 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 ChannelId", 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.ChannelId = 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_QueryRateLimitResponse protoreflect.MessageDescriptor + fd_QueryRateLimitResponse_rate_limit protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_query_proto_init() + md_QueryRateLimitResponse = File_ratelimit_v1_query_proto.Messages().ByName("QueryRateLimitResponse") + fd_QueryRateLimitResponse_rate_limit = md_QueryRateLimitResponse.Fields().ByName("rate_limit") +} + +var _ protoreflect.Message = (*fastReflection_QueryRateLimitResponse)(nil) + +type fastReflection_QueryRateLimitResponse QueryRateLimitResponse + +func (x *QueryRateLimitResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRateLimitResponse)(x) +} + +func (x *QueryRateLimitResponse) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_query_proto_msgTypes[3] + 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_QueryRateLimitResponse_messageType fastReflection_QueryRateLimitResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryRateLimitResponse_messageType{} + +type fastReflection_QueryRateLimitResponse_messageType struct{} + +func (x fastReflection_QueryRateLimitResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRateLimitResponse)(nil) +} +func (x fastReflection_QueryRateLimitResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRateLimitResponse) +} +func (x fastReflection_QueryRateLimitResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRateLimitResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryRateLimitResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRateLimitResponse +} + +// 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_QueryRateLimitResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryRateLimitResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryRateLimitResponse) New() protoreflect.Message { + return new(fastReflection_QueryRateLimitResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryRateLimitResponse) Interface() protoreflect.ProtoMessage { + return (*QueryRateLimitResponse)(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_QueryRateLimitResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.RateLimit != nil { + value := protoreflect.ValueOfMessage(x.RateLimit.ProtoReflect()) + if !f(fd_QueryRateLimitResponse_rate_limit, 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_QueryRateLimitResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitResponse.rate_limit": + return x.RateLimit != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitResponse 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_QueryRateLimitResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitResponse.rate_limit": + x.RateLimit = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitResponse 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_QueryRateLimitResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.QueryRateLimitResponse.rate_limit": + value := x.RateLimit + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitResponse 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_QueryRateLimitResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitResponse.rate_limit": + x.RateLimit = value.Message().Interface().(*RateLimit) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitResponse 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_QueryRateLimitResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitResponse.rate_limit": + if x.RateLimit == nil { + x.RateLimit = new(RateLimit) + } + return protoreflect.ValueOfMessage(x.RateLimit.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitResponse 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_QueryRateLimitResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitResponse.rate_limit": + m := new(RateLimit) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitResponse 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_QueryRateLimitResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.QueryRateLimitResponse", 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_QueryRateLimitResponse) 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_QueryRateLimitResponse) 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_QueryRateLimitResponse) 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_QueryRateLimitResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryRateLimitResponse) + 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.RateLimit != nil { + l = options.Size(x.RateLimit) + 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().(*QueryRateLimitResponse) + 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.RateLimit != nil { + encoded, err := options.Marshal(x.RateLimit) + 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().(*QueryRateLimitResponse) + 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: QueryRateLimitResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRateLimitResponse: 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 RateLimit", 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.RateLimit == nil { + x.RateLimit = &RateLimit{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RateLimit); 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_QueryRateLimitsByChainIdRequest protoreflect.MessageDescriptor + fd_QueryRateLimitsByChainIdRequest_chain_id protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_query_proto_init() + md_QueryRateLimitsByChainIdRequest = File_ratelimit_v1_query_proto.Messages().ByName("QueryRateLimitsByChainIdRequest") + fd_QueryRateLimitsByChainIdRequest_chain_id = md_QueryRateLimitsByChainIdRequest.Fields().ByName("chain_id") +} + +var _ protoreflect.Message = (*fastReflection_QueryRateLimitsByChainIdRequest)(nil) + +type fastReflection_QueryRateLimitsByChainIdRequest QueryRateLimitsByChainIdRequest + +func (x *QueryRateLimitsByChainIdRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRateLimitsByChainIdRequest)(x) +} + +func (x *QueryRateLimitsByChainIdRequest) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_query_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_QueryRateLimitsByChainIdRequest_messageType fastReflection_QueryRateLimitsByChainIdRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryRateLimitsByChainIdRequest_messageType{} + +type fastReflection_QueryRateLimitsByChainIdRequest_messageType struct{} + +func (x fastReflection_QueryRateLimitsByChainIdRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRateLimitsByChainIdRequest)(nil) +} +func (x fastReflection_QueryRateLimitsByChainIdRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRateLimitsByChainIdRequest) +} +func (x fastReflection_QueryRateLimitsByChainIdRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRateLimitsByChainIdRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryRateLimitsByChainIdRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRateLimitsByChainIdRequest +} + +// 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_QueryRateLimitsByChainIdRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryRateLimitsByChainIdRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryRateLimitsByChainIdRequest) New() protoreflect.Message { + return new(fastReflection_QueryRateLimitsByChainIdRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryRateLimitsByChainIdRequest) Interface() protoreflect.ProtoMessage { + return (*QueryRateLimitsByChainIdRequest)(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_QueryRateLimitsByChainIdRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ChainId != "" { + value := protoreflect.ValueOfString(x.ChainId) + if !f(fd_QueryRateLimitsByChainIdRequest_chain_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryRateLimitsByChainIdRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChainIdRequest.chain_id": + return x.ChainId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChainIdRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChainIdRequest 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_QueryRateLimitsByChainIdRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChainIdRequest.chain_id": + x.ChainId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChainIdRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChainIdRequest 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_QueryRateLimitsByChainIdRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.QueryRateLimitsByChainIdRequest.chain_id": + value := x.ChainId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChainIdRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChainIdRequest 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_QueryRateLimitsByChainIdRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChainIdRequest.chain_id": + x.ChainId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChainIdRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChainIdRequest 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_QueryRateLimitsByChainIdRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChainIdRequest.chain_id": + panic(fmt.Errorf("field chain_id of message ratelimit.v1.QueryRateLimitsByChainIdRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChainIdRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChainIdRequest 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_QueryRateLimitsByChainIdRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChainIdRequest.chain_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChainIdRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChainIdRequest 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_QueryRateLimitsByChainIdRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.QueryRateLimitsByChainIdRequest", 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_QueryRateLimitsByChainIdRequest) 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_QueryRateLimitsByChainIdRequest) 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_QueryRateLimitsByChainIdRequest) 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_QueryRateLimitsByChainIdRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryRateLimitsByChainIdRequest) + 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.ChainId) + 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().(*QueryRateLimitsByChainIdRequest) + 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.ChainId) > 0 { + i -= len(x.ChainId) + copy(dAtA[i:], x.ChainId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) + 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().(*QueryRateLimitsByChainIdRequest) + 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: QueryRateLimitsByChainIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRateLimitsByChainIdRequest: 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 ChainId", 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.ChainId = 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 _ protoreflect.List = (*_QueryRateLimitsByChainIdResponse_1_list)(nil) + +type _QueryRateLimitsByChainIdResponse_1_list struct { + list *[]*RateLimit +} + +func (x *_QueryRateLimitsByChainIdResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryRateLimitsByChainIdResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryRateLimitsByChainIdResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*RateLimit) + (*x.list)[i] = concreteValue +} + +func (x *_QueryRateLimitsByChainIdResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*RateLimit) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryRateLimitsByChainIdResponse_1_list) AppendMutable() protoreflect.Value { + v := new(RateLimit) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryRateLimitsByChainIdResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryRateLimitsByChainIdResponse_1_list) NewElement() protoreflect.Value { + v := new(RateLimit) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryRateLimitsByChainIdResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryRateLimitsByChainIdResponse protoreflect.MessageDescriptor + fd_QueryRateLimitsByChainIdResponse_rate_limits protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_query_proto_init() + md_QueryRateLimitsByChainIdResponse = File_ratelimit_v1_query_proto.Messages().ByName("QueryRateLimitsByChainIdResponse") + fd_QueryRateLimitsByChainIdResponse_rate_limits = md_QueryRateLimitsByChainIdResponse.Fields().ByName("rate_limits") +} + +var _ protoreflect.Message = (*fastReflection_QueryRateLimitsByChainIdResponse)(nil) + +type fastReflection_QueryRateLimitsByChainIdResponse QueryRateLimitsByChainIdResponse + +func (x *QueryRateLimitsByChainIdResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRateLimitsByChainIdResponse)(x) +} + +func (x *QueryRateLimitsByChainIdResponse) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_query_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_QueryRateLimitsByChainIdResponse_messageType fastReflection_QueryRateLimitsByChainIdResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryRateLimitsByChainIdResponse_messageType{} + +type fastReflection_QueryRateLimitsByChainIdResponse_messageType struct{} + +func (x fastReflection_QueryRateLimitsByChainIdResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRateLimitsByChainIdResponse)(nil) +} +func (x fastReflection_QueryRateLimitsByChainIdResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRateLimitsByChainIdResponse) +} +func (x fastReflection_QueryRateLimitsByChainIdResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRateLimitsByChainIdResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryRateLimitsByChainIdResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRateLimitsByChainIdResponse +} + +// 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_QueryRateLimitsByChainIdResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryRateLimitsByChainIdResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryRateLimitsByChainIdResponse) New() protoreflect.Message { + return new(fastReflection_QueryRateLimitsByChainIdResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryRateLimitsByChainIdResponse) Interface() protoreflect.ProtoMessage { + return (*QueryRateLimitsByChainIdResponse)(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_QueryRateLimitsByChainIdResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.RateLimits) != 0 { + value := protoreflect.ValueOfList(&_QueryRateLimitsByChainIdResponse_1_list{list: &x.RateLimits}) + if !f(fd_QueryRateLimitsByChainIdResponse_rate_limits, 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_QueryRateLimitsByChainIdResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChainIdResponse.rate_limits": + return len(x.RateLimits) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChainIdResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChainIdResponse 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_QueryRateLimitsByChainIdResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChainIdResponse.rate_limits": + x.RateLimits = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChainIdResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChainIdResponse 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_QueryRateLimitsByChainIdResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.QueryRateLimitsByChainIdResponse.rate_limits": + if len(x.RateLimits) == 0 { + return protoreflect.ValueOfList(&_QueryRateLimitsByChainIdResponse_1_list{}) + } + listValue := &_QueryRateLimitsByChainIdResponse_1_list{list: &x.RateLimits} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChainIdResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChainIdResponse 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_QueryRateLimitsByChainIdResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChainIdResponse.rate_limits": + lv := value.List() + clv := lv.(*_QueryRateLimitsByChainIdResponse_1_list) + x.RateLimits = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChainIdResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChainIdResponse 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_QueryRateLimitsByChainIdResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChainIdResponse.rate_limits": + if x.RateLimits == nil { + x.RateLimits = []*RateLimit{} + } + value := &_QueryRateLimitsByChainIdResponse_1_list{list: &x.RateLimits} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChainIdResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChainIdResponse 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_QueryRateLimitsByChainIdResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChainIdResponse.rate_limits": + list := []*RateLimit{} + return protoreflect.ValueOfList(&_QueryRateLimitsByChainIdResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChainIdResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChainIdResponse 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_QueryRateLimitsByChainIdResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.QueryRateLimitsByChainIdResponse", 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_QueryRateLimitsByChainIdResponse) 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_QueryRateLimitsByChainIdResponse) 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_QueryRateLimitsByChainIdResponse) 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_QueryRateLimitsByChainIdResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryRateLimitsByChainIdResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.RateLimits) > 0 { + for _, e := range x.RateLimits { + l = options.Size(e) + 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().(*QueryRateLimitsByChainIdResponse) + 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.RateLimits) > 0 { + for iNdEx := len(x.RateLimits) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.RateLimits[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 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().(*QueryRateLimitsByChainIdResponse) + 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: QueryRateLimitsByChainIdResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRateLimitsByChainIdResponse: 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 RateLimits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.RateLimits = append(x.RateLimits, &RateLimit{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RateLimits[len(x.RateLimits)-1]); 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_QueryRateLimitsByChannelIdRequest protoreflect.MessageDescriptor + fd_QueryRateLimitsByChannelIdRequest_channel_id protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_query_proto_init() + md_QueryRateLimitsByChannelIdRequest = File_ratelimit_v1_query_proto.Messages().ByName("QueryRateLimitsByChannelIdRequest") + fd_QueryRateLimitsByChannelIdRequest_channel_id = md_QueryRateLimitsByChannelIdRequest.Fields().ByName("channel_id") +} + +var _ protoreflect.Message = (*fastReflection_QueryRateLimitsByChannelIdRequest)(nil) + +type fastReflection_QueryRateLimitsByChannelIdRequest QueryRateLimitsByChannelIdRequest + +func (x *QueryRateLimitsByChannelIdRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRateLimitsByChannelIdRequest)(x) +} + +func (x *QueryRateLimitsByChannelIdRequest) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_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_QueryRateLimitsByChannelIdRequest_messageType fastReflection_QueryRateLimitsByChannelIdRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryRateLimitsByChannelIdRequest_messageType{} + +type fastReflection_QueryRateLimitsByChannelIdRequest_messageType struct{} + +func (x fastReflection_QueryRateLimitsByChannelIdRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRateLimitsByChannelIdRequest)(nil) +} +func (x fastReflection_QueryRateLimitsByChannelIdRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRateLimitsByChannelIdRequest) +} +func (x fastReflection_QueryRateLimitsByChannelIdRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRateLimitsByChannelIdRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryRateLimitsByChannelIdRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRateLimitsByChannelIdRequest +} + +// 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_QueryRateLimitsByChannelIdRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryRateLimitsByChannelIdRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryRateLimitsByChannelIdRequest) New() protoreflect.Message { + return new(fastReflection_QueryRateLimitsByChannelIdRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryRateLimitsByChannelIdRequest) Interface() protoreflect.ProtoMessage { + return (*QueryRateLimitsByChannelIdRequest)(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_QueryRateLimitsByChannelIdRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ChannelId != "" { + value := protoreflect.ValueOfString(x.ChannelId) + if !f(fd_QueryRateLimitsByChannelIdRequest_channel_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryRateLimitsByChannelIdRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChannelIdRequest.channel_id": + return x.ChannelId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChannelIdRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChannelIdRequest 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_QueryRateLimitsByChannelIdRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChannelIdRequest.channel_id": + x.ChannelId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChannelIdRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChannelIdRequest 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_QueryRateLimitsByChannelIdRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.QueryRateLimitsByChannelIdRequest.channel_id": + value := x.ChannelId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChannelIdRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChannelIdRequest 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_QueryRateLimitsByChannelIdRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChannelIdRequest.channel_id": + x.ChannelId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChannelIdRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChannelIdRequest 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_QueryRateLimitsByChannelIdRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChannelIdRequest.channel_id": + panic(fmt.Errorf("field channel_id of message ratelimit.v1.QueryRateLimitsByChannelIdRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChannelIdRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChannelIdRequest 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_QueryRateLimitsByChannelIdRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChannelIdRequest.channel_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChannelIdRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChannelIdRequest 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_QueryRateLimitsByChannelIdRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.QueryRateLimitsByChannelIdRequest", 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_QueryRateLimitsByChannelIdRequest) 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_QueryRateLimitsByChannelIdRequest) 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_QueryRateLimitsByChannelIdRequest) 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_QueryRateLimitsByChannelIdRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryRateLimitsByChannelIdRequest) + 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.ChannelId) + 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().(*QueryRateLimitsByChannelIdRequest) + 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.ChannelId) > 0 { + i -= len(x.ChannelId) + copy(dAtA[i:], x.ChannelId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChannelId))) + 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().(*QueryRateLimitsByChannelIdRequest) + 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: QueryRateLimitsByChannelIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRateLimitsByChannelIdRequest: 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 ChannelId", 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.ChannelId = 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 _ protoreflect.List = (*_QueryRateLimitsByChannelIdResponse_1_list)(nil) + +type _QueryRateLimitsByChannelIdResponse_1_list struct { + list *[]*RateLimit +} + +func (x *_QueryRateLimitsByChannelIdResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryRateLimitsByChannelIdResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryRateLimitsByChannelIdResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*RateLimit) + (*x.list)[i] = concreteValue +} + +func (x *_QueryRateLimitsByChannelIdResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*RateLimit) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryRateLimitsByChannelIdResponse_1_list) AppendMutable() protoreflect.Value { + v := new(RateLimit) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryRateLimitsByChannelIdResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryRateLimitsByChannelIdResponse_1_list) NewElement() protoreflect.Value { + v := new(RateLimit) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryRateLimitsByChannelIdResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryRateLimitsByChannelIdResponse protoreflect.MessageDescriptor + fd_QueryRateLimitsByChannelIdResponse_rate_limits protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_query_proto_init() + md_QueryRateLimitsByChannelIdResponse = File_ratelimit_v1_query_proto.Messages().ByName("QueryRateLimitsByChannelIdResponse") + fd_QueryRateLimitsByChannelIdResponse_rate_limits = md_QueryRateLimitsByChannelIdResponse.Fields().ByName("rate_limits") +} + +var _ protoreflect.Message = (*fastReflection_QueryRateLimitsByChannelIdResponse)(nil) + +type fastReflection_QueryRateLimitsByChannelIdResponse QueryRateLimitsByChannelIdResponse + +func (x *QueryRateLimitsByChannelIdResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRateLimitsByChannelIdResponse)(x) +} + +func (x *QueryRateLimitsByChannelIdResponse) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_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_QueryRateLimitsByChannelIdResponse_messageType fastReflection_QueryRateLimitsByChannelIdResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryRateLimitsByChannelIdResponse_messageType{} + +type fastReflection_QueryRateLimitsByChannelIdResponse_messageType struct{} + +func (x fastReflection_QueryRateLimitsByChannelIdResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRateLimitsByChannelIdResponse)(nil) +} +func (x fastReflection_QueryRateLimitsByChannelIdResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRateLimitsByChannelIdResponse) +} +func (x fastReflection_QueryRateLimitsByChannelIdResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRateLimitsByChannelIdResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryRateLimitsByChannelIdResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRateLimitsByChannelIdResponse +} + +// 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_QueryRateLimitsByChannelIdResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryRateLimitsByChannelIdResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryRateLimitsByChannelIdResponse) New() protoreflect.Message { + return new(fastReflection_QueryRateLimitsByChannelIdResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryRateLimitsByChannelIdResponse) Interface() protoreflect.ProtoMessage { + return (*QueryRateLimitsByChannelIdResponse)(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_QueryRateLimitsByChannelIdResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.RateLimits) != 0 { + value := protoreflect.ValueOfList(&_QueryRateLimitsByChannelIdResponse_1_list{list: &x.RateLimits}) + if !f(fd_QueryRateLimitsByChannelIdResponse_rate_limits, 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_QueryRateLimitsByChannelIdResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChannelIdResponse.rate_limits": + return len(x.RateLimits) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChannelIdResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChannelIdResponse 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_QueryRateLimitsByChannelIdResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChannelIdResponse.rate_limits": + x.RateLimits = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChannelIdResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChannelIdResponse 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_QueryRateLimitsByChannelIdResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.QueryRateLimitsByChannelIdResponse.rate_limits": + if len(x.RateLimits) == 0 { + return protoreflect.ValueOfList(&_QueryRateLimitsByChannelIdResponse_1_list{}) + } + listValue := &_QueryRateLimitsByChannelIdResponse_1_list{list: &x.RateLimits} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChannelIdResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChannelIdResponse 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_QueryRateLimitsByChannelIdResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChannelIdResponse.rate_limits": + lv := value.List() + clv := lv.(*_QueryRateLimitsByChannelIdResponse_1_list) + x.RateLimits = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChannelIdResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChannelIdResponse 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_QueryRateLimitsByChannelIdResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChannelIdResponse.rate_limits": + if x.RateLimits == nil { + x.RateLimits = []*RateLimit{} + } + value := &_QueryRateLimitsByChannelIdResponse_1_list{list: &x.RateLimits} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChannelIdResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChannelIdResponse 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_QueryRateLimitsByChannelIdResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryRateLimitsByChannelIdResponse.rate_limits": + list := []*RateLimit{} + return protoreflect.ValueOfList(&_QueryRateLimitsByChannelIdResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryRateLimitsByChannelIdResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryRateLimitsByChannelIdResponse 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_QueryRateLimitsByChannelIdResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.QueryRateLimitsByChannelIdResponse", 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_QueryRateLimitsByChannelIdResponse) 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_QueryRateLimitsByChannelIdResponse) 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_QueryRateLimitsByChannelIdResponse) 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_QueryRateLimitsByChannelIdResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryRateLimitsByChannelIdResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.RateLimits) > 0 { + for _, e := range x.RateLimits { + l = options.Size(e) + 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().(*QueryRateLimitsByChannelIdResponse) + 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.RateLimits) > 0 { + for iNdEx := len(x.RateLimits) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.RateLimits[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 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().(*QueryRateLimitsByChannelIdResponse) + 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: QueryRateLimitsByChannelIdResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRateLimitsByChannelIdResponse: 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 RateLimits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.RateLimits = append(x.RateLimits, &RateLimit{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RateLimits[len(x.RateLimits)-1]); 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_QueryAllBlacklistedDenomsRequest protoreflect.MessageDescriptor +) + +func init() { + file_ratelimit_v1_query_proto_init() + md_QueryAllBlacklistedDenomsRequest = File_ratelimit_v1_query_proto.Messages().ByName("QueryAllBlacklistedDenomsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllBlacklistedDenomsRequest)(nil) + +type fastReflection_QueryAllBlacklistedDenomsRequest QueryAllBlacklistedDenomsRequest + +func (x *QueryAllBlacklistedDenomsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllBlacklistedDenomsRequest)(x) +} + +func (x *QueryAllBlacklistedDenomsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_query_proto_msgTypes[8] + 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_QueryAllBlacklistedDenomsRequest_messageType fastReflection_QueryAllBlacklistedDenomsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllBlacklistedDenomsRequest_messageType{} + +type fastReflection_QueryAllBlacklistedDenomsRequest_messageType struct{} + +func (x fastReflection_QueryAllBlacklistedDenomsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllBlacklistedDenomsRequest)(nil) +} +func (x fastReflection_QueryAllBlacklistedDenomsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllBlacklistedDenomsRequest) +} +func (x fastReflection_QueryAllBlacklistedDenomsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllBlacklistedDenomsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllBlacklistedDenomsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllBlacklistedDenomsRequest +} + +// 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_QueryAllBlacklistedDenomsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAllBlacklistedDenomsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllBlacklistedDenomsRequest) New() protoreflect.Message { + return new(fastReflection_QueryAllBlacklistedDenomsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllBlacklistedDenomsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAllBlacklistedDenomsRequest)(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_QueryAllBlacklistedDenomsRequest) 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_QueryAllBlacklistedDenomsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllBlacklistedDenomsRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllBlacklistedDenomsRequest 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_QueryAllBlacklistedDenomsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllBlacklistedDenomsRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllBlacklistedDenomsRequest 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_QueryAllBlacklistedDenomsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllBlacklistedDenomsRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllBlacklistedDenomsRequest 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_QueryAllBlacklistedDenomsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllBlacklistedDenomsRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllBlacklistedDenomsRequest 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_QueryAllBlacklistedDenomsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllBlacklistedDenomsRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllBlacklistedDenomsRequest 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_QueryAllBlacklistedDenomsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllBlacklistedDenomsRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllBlacklistedDenomsRequest 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_QueryAllBlacklistedDenomsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.QueryAllBlacklistedDenomsRequest", 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_QueryAllBlacklistedDenomsRequest) 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_QueryAllBlacklistedDenomsRequest) 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_QueryAllBlacklistedDenomsRequest) 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_QueryAllBlacklistedDenomsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllBlacklistedDenomsRequest) + 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().(*QueryAllBlacklistedDenomsRequest) + 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().(*QueryAllBlacklistedDenomsRequest) + 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: QueryAllBlacklistedDenomsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllBlacklistedDenomsRequest: 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 _ protoreflect.List = (*_QueryAllBlacklistedDenomsResponse_1_list)(nil) + +type _QueryAllBlacklistedDenomsResponse_1_list struct { + list *[]string +} + +func (x *_QueryAllBlacklistedDenomsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryAllBlacklistedDenomsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_QueryAllBlacklistedDenomsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_QueryAllBlacklistedDenomsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryAllBlacklistedDenomsResponse_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message QueryAllBlacklistedDenomsResponse at list field Denoms as it is not of Message kind")) +} + +func (x *_QueryAllBlacklistedDenomsResponse_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_QueryAllBlacklistedDenomsResponse_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_QueryAllBlacklistedDenomsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryAllBlacklistedDenomsResponse protoreflect.MessageDescriptor + fd_QueryAllBlacklistedDenomsResponse_denoms protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_query_proto_init() + md_QueryAllBlacklistedDenomsResponse = File_ratelimit_v1_query_proto.Messages().ByName("QueryAllBlacklistedDenomsResponse") + fd_QueryAllBlacklistedDenomsResponse_denoms = md_QueryAllBlacklistedDenomsResponse.Fields().ByName("denoms") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllBlacklistedDenomsResponse)(nil) + +type fastReflection_QueryAllBlacklistedDenomsResponse QueryAllBlacklistedDenomsResponse + +func (x *QueryAllBlacklistedDenomsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllBlacklistedDenomsResponse)(x) +} + +func (x *QueryAllBlacklistedDenomsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_query_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAllBlacklistedDenomsResponse_messageType fastReflection_QueryAllBlacklistedDenomsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllBlacklistedDenomsResponse_messageType{} + +type fastReflection_QueryAllBlacklistedDenomsResponse_messageType struct{} + +func (x fastReflection_QueryAllBlacklistedDenomsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllBlacklistedDenomsResponse)(nil) +} +func (x fastReflection_QueryAllBlacklistedDenomsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllBlacklistedDenomsResponse) +} +func (x fastReflection_QueryAllBlacklistedDenomsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllBlacklistedDenomsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllBlacklistedDenomsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllBlacklistedDenomsResponse +} + +// 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_QueryAllBlacklistedDenomsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAllBlacklistedDenomsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllBlacklistedDenomsResponse) New() protoreflect.Message { + return new(fastReflection_QueryAllBlacklistedDenomsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllBlacklistedDenomsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAllBlacklistedDenomsResponse)(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_QueryAllBlacklistedDenomsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Denoms) != 0 { + value := protoreflect.ValueOfList(&_QueryAllBlacklistedDenomsResponse_1_list{list: &x.Denoms}) + if !f(fd_QueryAllBlacklistedDenomsResponse_denoms, 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_QueryAllBlacklistedDenomsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.QueryAllBlacklistedDenomsResponse.denoms": + return len(x.Denoms) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllBlacklistedDenomsResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllBlacklistedDenomsResponse 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_QueryAllBlacklistedDenomsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.QueryAllBlacklistedDenomsResponse.denoms": + x.Denoms = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllBlacklistedDenomsResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllBlacklistedDenomsResponse 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_QueryAllBlacklistedDenomsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.QueryAllBlacklistedDenomsResponse.denoms": + if len(x.Denoms) == 0 { + return protoreflect.ValueOfList(&_QueryAllBlacklistedDenomsResponse_1_list{}) + } + listValue := &_QueryAllBlacklistedDenomsResponse_1_list{list: &x.Denoms} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllBlacklistedDenomsResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllBlacklistedDenomsResponse 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_QueryAllBlacklistedDenomsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.QueryAllBlacklistedDenomsResponse.denoms": + lv := value.List() + clv := lv.(*_QueryAllBlacklistedDenomsResponse_1_list) + x.Denoms = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllBlacklistedDenomsResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllBlacklistedDenomsResponse 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_QueryAllBlacklistedDenomsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryAllBlacklistedDenomsResponse.denoms": + if x.Denoms == nil { + x.Denoms = []string{} + } + value := &_QueryAllBlacklistedDenomsResponse_1_list{list: &x.Denoms} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllBlacklistedDenomsResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllBlacklistedDenomsResponse 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_QueryAllBlacklistedDenomsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryAllBlacklistedDenomsResponse.denoms": + list := []string{} + return protoreflect.ValueOfList(&_QueryAllBlacklistedDenomsResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllBlacklistedDenomsResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllBlacklistedDenomsResponse 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_QueryAllBlacklistedDenomsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.QueryAllBlacklistedDenomsResponse", 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_QueryAllBlacklistedDenomsResponse) 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_QueryAllBlacklistedDenomsResponse) 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_QueryAllBlacklistedDenomsResponse) 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_QueryAllBlacklistedDenomsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllBlacklistedDenomsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Denoms) > 0 { + for _, s := range x.Denoms { + l = len(s) + 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().(*QueryAllBlacklistedDenomsResponse) + 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.Denoms) > 0 { + for iNdEx := len(x.Denoms) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Denoms[iNdEx]) + copy(dAtA[i:], x.Denoms[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denoms[iNdEx]))) + 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().(*QueryAllBlacklistedDenomsResponse) + 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: QueryAllBlacklistedDenomsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllBlacklistedDenomsResponse: 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 Denoms", 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.Denoms = append(x.Denoms, 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_QueryAllWhitelistedAddressesRequest protoreflect.MessageDescriptor +) + +func init() { + file_ratelimit_v1_query_proto_init() + md_QueryAllWhitelistedAddressesRequest = File_ratelimit_v1_query_proto.Messages().ByName("QueryAllWhitelistedAddressesRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllWhitelistedAddressesRequest)(nil) + +type fastReflection_QueryAllWhitelistedAddressesRequest QueryAllWhitelistedAddressesRequest + +func (x *QueryAllWhitelistedAddressesRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllWhitelistedAddressesRequest)(x) +} + +func (x *QueryAllWhitelistedAddressesRequest) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_query_proto_msgTypes[10] + 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_QueryAllWhitelistedAddressesRequest_messageType fastReflection_QueryAllWhitelistedAddressesRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllWhitelistedAddressesRequest_messageType{} + +type fastReflection_QueryAllWhitelistedAddressesRequest_messageType struct{} + +func (x fastReflection_QueryAllWhitelistedAddressesRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllWhitelistedAddressesRequest)(nil) +} +func (x fastReflection_QueryAllWhitelistedAddressesRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllWhitelistedAddressesRequest) +} +func (x fastReflection_QueryAllWhitelistedAddressesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllWhitelistedAddressesRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllWhitelistedAddressesRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllWhitelistedAddressesRequest +} + +// 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_QueryAllWhitelistedAddressesRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAllWhitelistedAddressesRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllWhitelistedAddressesRequest) New() protoreflect.Message { + return new(fastReflection_QueryAllWhitelistedAddressesRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllWhitelistedAddressesRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAllWhitelistedAddressesRequest)(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_QueryAllWhitelistedAddressesRequest) 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_QueryAllWhitelistedAddressesRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllWhitelistedAddressesRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllWhitelistedAddressesRequest 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_QueryAllWhitelistedAddressesRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllWhitelistedAddressesRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllWhitelistedAddressesRequest 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_QueryAllWhitelistedAddressesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllWhitelistedAddressesRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllWhitelistedAddressesRequest 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_QueryAllWhitelistedAddressesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllWhitelistedAddressesRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllWhitelistedAddressesRequest 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_QueryAllWhitelistedAddressesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllWhitelistedAddressesRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllWhitelistedAddressesRequest 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_QueryAllWhitelistedAddressesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllWhitelistedAddressesRequest")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllWhitelistedAddressesRequest 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_QueryAllWhitelistedAddressesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.QueryAllWhitelistedAddressesRequest", 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_QueryAllWhitelistedAddressesRequest) 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_QueryAllWhitelistedAddressesRequest) 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_QueryAllWhitelistedAddressesRequest) 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_QueryAllWhitelistedAddressesRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllWhitelistedAddressesRequest) + 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().(*QueryAllWhitelistedAddressesRequest) + 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().(*QueryAllWhitelistedAddressesRequest) + 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: QueryAllWhitelistedAddressesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllWhitelistedAddressesRequest: 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 _ protoreflect.List = (*_QueryAllWhitelistedAddressesResponse_1_list)(nil) + +type _QueryAllWhitelistedAddressesResponse_1_list struct { + list *[]*WhitelistedAddressPair +} + +func (x *_QueryAllWhitelistedAddressesResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryAllWhitelistedAddressesResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryAllWhitelistedAddressesResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*WhitelistedAddressPair) + (*x.list)[i] = concreteValue +} + +func (x *_QueryAllWhitelistedAddressesResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*WhitelistedAddressPair) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryAllWhitelistedAddressesResponse_1_list) AppendMutable() protoreflect.Value { + v := new(WhitelistedAddressPair) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllWhitelistedAddressesResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryAllWhitelistedAddressesResponse_1_list) NewElement() protoreflect.Value { + v := new(WhitelistedAddressPair) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllWhitelistedAddressesResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryAllWhitelistedAddressesResponse protoreflect.MessageDescriptor + fd_QueryAllWhitelistedAddressesResponse_address_pairs protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_query_proto_init() + md_QueryAllWhitelistedAddressesResponse = File_ratelimit_v1_query_proto.Messages().ByName("QueryAllWhitelistedAddressesResponse") + fd_QueryAllWhitelistedAddressesResponse_address_pairs = md_QueryAllWhitelistedAddressesResponse.Fields().ByName("address_pairs") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllWhitelistedAddressesResponse)(nil) + +type fastReflection_QueryAllWhitelistedAddressesResponse QueryAllWhitelistedAddressesResponse + +func (x *QueryAllWhitelistedAddressesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllWhitelistedAddressesResponse)(x) +} + +func (x *QueryAllWhitelistedAddressesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_query_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAllWhitelistedAddressesResponse_messageType fastReflection_QueryAllWhitelistedAddressesResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllWhitelistedAddressesResponse_messageType{} + +type fastReflection_QueryAllWhitelistedAddressesResponse_messageType struct{} + +func (x fastReflection_QueryAllWhitelistedAddressesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllWhitelistedAddressesResponse)(nil) +} +func (x fastReflection_QueryAllWhitelistedAddressesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllWhitelistedAddressesResponse) +} +func (x fastReflection_QueryAllWhitelistedAddressesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllWhitelistedAddressesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllWhitelistedAddressesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllWhitelistedAddressesResponse +} + +// 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_QueryAllWhitelistedAddressesResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAllWhitelistedAddressesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllWhitelistedAddressesResponse) New() protoreflect.Message { + return new(fastReflection_QueryAllWhitelistedAddressesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllWhitelistedAddressesResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAllWhitelistedAddressesResponse)(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_QueryAllWhitelistedAddressesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.AddressPairs) != 0 { + value := protoreflect.ValueOfList(&_QueryAllWhitelistedAddressesResponse_1_list{list: &x.AddressPairs}) + if !f(fd_QueryAllWhitelistedAddressesResponse_address_pairs, 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_QueryAllWhitelistedAddressesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.QueryAllWhitelistedAddressesResponse.address_pairs": + return len(x.AddressPairs) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllWhitelistedAddressesResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllWhitelistedAddressesResponse 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_QueryAllWhitelistedAddressesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.QueryAllWhitelistedAddressesResponse.address_pairs": + x.AddressPairs = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllWhitelistedAddressesResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllWhitelistedAddressesResponse 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_QueryAllWhitelistedAddressesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.QueryAllWhitelistedAddressesResponse.address_pairs": + if len(x.AddressPairs) == 0 { + return protoreflect.ValueOfList(&_QueryAllWhitelistedAddressesResponse_1_list{}) + } + listValue := &_QueryAllWhitelistedAddressesResponse_1_list{list: &x.AddressPairs} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllWhitelistedAddressesResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllWhitelistedAddressesResponse 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_QueryAllWhitelistedAddressesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.QueryAllWhitelistedAddressesResponse.address_pairs": + lv := value.List() + clv := lv.(*_QueryAllWhitelistedAddressesResponse_1_list) + x.AddressPairs = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllWhitelistedAddressesResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllWhitelistedAddressesResponse 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_QueryAllWhitelistedAddressesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryAllWhitelistedAddressesResponse.address_pairs": + if x.AddressPairs == nil { + x.AddressPairs = []*WhitelistedAddressPair{} + } + value := &_QueryAllWhitelistedAddressesResponse_1_list{list: &x.AddressPairs} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllWhitelistedAddressesResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllWhitelistedAddressesResponse 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_QueryAllWhitelistedAddressesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.QueryAllWhitelistedAddressesResponse.address_pairs": + list := []*WhitelistedAddressPair{} + return protoreflect.ValueOfList(&_QueryAllWhitelistedAddressesResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.QueryAllWhitelistedAddressesResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.QueryAllWhitelistedAddressesResponse 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_QueryAllWhitelistedAddressesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.QueryAllWhitelistedAddressesResponse", 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_QueryAllWhitelistedAddressesResponse) 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_QueryAllWhitelistedAddressesResponse) 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_QueryAllWhitelistedAddressesResponse) 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_QueryAllWhitelistedAddressesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllWhitelistedAddressesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.AddressPairs) > 0 { + for _, e := range x.AddressPairs { + l = options.Size(e) + 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().(*QueryAllWhitelistedAddressesResponse) + 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.AddressPairs) > 0 { + for iNdEx := len(x.AddressPairs) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.AddressPairs[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 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().(*QueryAllWhitelistedAddressesResponse) + 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: QueryAllWhitelistedAddressesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllWhitelistedAddressesResponse: 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 AddressPairs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AddressPairs = append(x.AddressPairs, &WhitelistedAddressPair{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AddressPairs[len(x.AddressPairs)-1]); 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, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: ratelimit/v1/query.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Queries all rate limits +type QueryAllRateLimitsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryAllRateLimitsRequest) Reset() { + *x = QueryAllRateLimitsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllRateLimitsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllRateLimitsRequest) ProtoMessage() {} + +// Deprecated: Use QueryAllRateLimitsRequest.ProtoReflect.Descriptor instead. +func (*QueryAllRateLimitsRequest) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_query_proto_rawDescGZIP(), []int{0} +} + +type QueryAllRateLimitsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RateLimits []*RateLimit `protobuf:"bytes,1,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` +} + +func (x *QueryAllRateLimitsResponse) Reset() { + *x = QueryAllRateLimitsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllRateLimitsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllRateLimitsResponse) ProtoMessage() {} + +// Deprecated: Use QueryAllRateLimitsResponse.ProtoReflect.Descriptor instead. +func (*QueryAllRateLimitsResponse) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryAllRateLimitsResponse) GetRateLimits() []*RateLimit { + if x != nil { + return x.RateLimits + } + return nil +} + +// Queries a specific rate limit by channel ID and denom +type QueryRateLimitRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` +} + +func (x *QueryRateLimitRequest) Reset() { + *x = QueryRateLimitRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRateLimitRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRateLimitRequest) ProtoMessage() {} + +// Deprecated: Use QueryRateLimitRequest.ProtoReflect.Descriptor instead. +func (*QueryRateLimitRequest) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_query_proto_rawDescGZIP(), []int{2} +} + +func (x *QueryRateLimitRequest) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *QueryRateLimitRequest) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +type QueryRateLimitResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RateLimit *RateLimit `protobuf:"bytes,1,opt,name=rate_limit,json=rateLimit,proto3" json:"rate_limit,omitempty"` +} + +func (x *QueryRateLimitResponse) Reset() { + *x = QueryRateLimitResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRateLimitResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRateLimitResponse) ProtoMessage() {} + +// Deprecated: Use QueryRateLimitResponse.ProtoReflect.Descriptor instead. +func (*QueryRateLimitResponse) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryRateLimitResponse) GetRateLimit() *RateLimit { + if x != nil { + return x.RateLimit + } + return nil +} + +// Queries all the rate limits for a given chain +type QueryRateLimitsByChainIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` +} + +func (x *QueryRateLimitsByChainIdRequest) Reset() { + *x = QueryRateLimitsByChainIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRateLimitsByChainIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRateLimitsByChainIdRequest) ProtoMessage() {} + +// Deprecated: Use QueryRateLimitsByChainIdRequest.ProtoReflect.Descriptor instead. +func (*QueryRateLimitsByChainIdRequest) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_query_proto_rawDescGZIP(), []int{4} +} + +func (x *QueryRateLimitsByChainIdRequest) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +type QueryRateLimitsByChainIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RateLimits []*RateLimit `protobuf:"bytes,1,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` +} + +func (x *QueryRateLimitsByChainIdResponse) Reset() { + *x = QueryRateLimitsByChainIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRateLimitsByChainIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRateLimitsByChainIdResponse) ProtoMessage() {} + +// Deprecated: Use QueryRateLimitsByChainIdResponse.ProtoReflect.Descriptor instead. +func (*QueryRateLimitsByChainIdResponse) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryRateLimitsByChainIdResponse) GetRateLimits() []*RateLimit { + if x != nil { + return x.RateLimits + } + return nil +} + +// Queries all the rate limits for a given channel ID +type QueryRateLimitsByChannelIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` +} + +func (x *QueryRateLimitsByChannelIdRequest) Reset() { + *x = QueryRateLimitsByChannelIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRateLimitsByChannelIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRateLimitsByChannelIdRequest) ProtoMessage() {} + +// Deprecated: Use QueryRateLimitsByChannelIdRequest.ProtoReflect.Descriptor instead. +func (*QueryRateLimitsByChannelIdRequest) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_query_proto_rawDescGZIP(), []int{6} +} + +func (x *QueryRateLimitsByChannelIdRequest) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +type QueryRateLimitsByChannelIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RateLimits []*RateLimit `protobuf:"bytes,1,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` +} + +func (x *QueryRateLimitsByChannelIdResponse) Reset() { + *x = QueryRateLimitsByChannelIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRateLimitsByChannelIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRateLimitsByChannelIdResponse) ProtoMessage() {} + +// Deprecated: Use QueryRateLimitsByChannelIdResponse.ProtoReflect.Descriptor instead. +func (*QueryRateLimitsByChannelIdResponse) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_query_proto_rawDescGZIP(), []int{7} +} + +func (x *QueryRateLimitsByChannelIdResponse) GetRateLimits() []*RateLimit { + if x != nil { + return x.RateLimits + } + return nil +} + +// Queries all blacklisted denoms +type QueryAllBlacklistedDenomsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryAllBlacklistedDenomsRequest) Reset() { + *x = QueryAllBlacklistedDenomsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllBlacklistedDenomsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllBlacklistedDenomsRequest) ProtoMessage() {} + +// Deprecated: Use QueryAllBlacklistedDenomsRequest.ProtoReflect.Descriptor instead. +func (*QueryAllBlacklistedDenomsRequest) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_query_proto_rawDescGZIP(), []int{8} +} + +type QueryAllBlacklistedDenomsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Denoms []string `protobuf:"bytes,1,rep,name=denoms,proto3" json:"denoms,omitempty"` +} + +func (x *QueryAllBlacklistedDenomsResponse) Reset() { + *x = QueryAllBlacklistedDenomsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllBlacklistedDenomsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllBlacklistedDenomsResponse) ProtoMessage() {} + +// Deprecated: Use QueryAllBlacklistedDenomsResponse.ProtoReflect.Descriptor instead. +func (*QueryAllBlacklistedDenomsResponse) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_query_proto_rawDescGZIP(), []int{9} +} + +func (x *QueryAllBlacklistedDenomsResponse) GetDenoms() []string { + if x != nil { + return x.Denoms + } + return nil +} + +// Queries all whitelisted address pairs +type QueryAllWhitelistedAddressesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryAllWhitelistedAddressesRequest) Reset() { + *x = QueryAllWhitelistedAddressesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_query_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllWhitelistedAddressesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllWhitelistedAddressesRequest) ProtoMessage() {} + +// Deprecated: Use QueryAllWhitelistedAddressesRequest.ProtoReflect.Descriptor instead. +func (*QueryAllWhitelistedAddressesRequest) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_query_proto_rawDescGZIP(), []int{10} +} + +type QueryAllWhitelistedAddressesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AddressPairs []*WhitelistedAddressPair `protobuf:"bytes,1,rep,name=address_pairs,json=addressPairs,proto3" json:"address_pairs,omitempty"` +} + +func (x *QueryAllWhitelistedAddressesResponse) Reset() { + *x = QueryAllWhitelistedAddressesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_query_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllWhitelistedAddressesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllWhitelistedAddressesResponse) ProtoMessage() {} + +// Deprecated: Use QueryAllWhitelistedAddressesResponse.ProtoReflect.Descriptor instead. +func (*QueryAllWhitelistedAddressesResponse) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_query_proto_rawDescGZIP(), []int{11} +} + +func (x *QueryAllWhitelistedAddressesResponse) GetAddressPairs() []*WhitelistedAddressPair { + if x != nil { + return x.AddressPairs + } + return nil +} + +var File_ratelimit_v1_query_proto protoreflect.FileDescriptor + +var file_ratelimit_v1_query_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x72, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x72, 0x61, + 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1b, 0x0a, 0x19, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5c, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x41, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x73, 0x22, 0x4c, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, + 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, + 0x0a, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x09, 0x72, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x3c, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x49, 0x64, 0x22, 0x62, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x65, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, + 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x72, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x22, 0x42, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x79, 0x43, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x22, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x79, + 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x73, 0x22, 0x22, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x42, 0x6c, 0x61, + 0x63, 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, + 0x6c, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, + 0x6e, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x6e, 0x6f, + 0x6d, 0x73, 0x22, 0x25, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x57, 0x68, + 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x77, 0x0a, 0x24, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4f, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x61, 0x69, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x69, 0x72, 0x42, 0x04, + 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x69, + 0x72, 0x73, 0x32, 0xe4, 0x08, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x9f, 0x01, 0x0a, + 0x0d, 0x41, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x27, + 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x53, 0x74, 0x72, 0x69, + 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x69, 0x62, 0x63, 0x2d, 0x72, 0x61, 0x74, 0x65, + 0x2d, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0xa8, + 0x01, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x23, 0x2e, 0x72, + 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x24, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4a, 0x12, + 0x48, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x69, 0x62, + 0x63, 0x2d, 0x72, 0x61, 0x74, 0x65, 0x2d, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x2f, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x7d, + 0x2f, 0x62, 0x79, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0xbc, 0x01, 0x0a, 0x13, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, + 0x64, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, + 0x42, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x42, + 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, 0x3e, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, + 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x69, 0x62, 0x63, 0x2d, 0x72, 0x61, 0x74, 0x65, 0x2d, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x2f, 0x7b, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xc4, 0x01, 0x0a, 0x15, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x49, 0x64, 0x12, 0x2f, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x73, 0x42, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x73, 0x42, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x12, 0x40, 0x2f, + 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x69, 0x62, 0x63, 0x2d, + 0x72, 0x61, 0x74, 0x65, 0x2d, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x61, + 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x73, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, + 0xbc, 0x01, 0x0a, 0x14, 0x41, 0x6c, 0x6c, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x6c, 0x69, 0x73, 0x74, + 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, + 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, + 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x3d, 0x12, 0x3b, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, + 0x69, 0x62, 0x63, 0x2d, 0x72, 0x61, 0x74, 0x65, 0x2d, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, + 0x67, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x62, 0x6c, 0x61, 0x63, + 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x12, 0xc8, + 0x01, 0x0a, 0x17, 0x41, 0x6c, 0x6c, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, + 0x6c, 0x6c, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, 0x3e, 0x2f, 0x53, 0x74, 0x72, 0x69, + 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x69, 0x62, 0x63, 0x2d, 0x72, 0x61, 0x74, 0x65, + 0x2d, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x2f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x42, 0xc1, 0x01, 0x0a, 0x10, 0x63, 0x6f, + 0x6d, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x69, 0x62, 0x63, 0x2d, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, + 0x2f, 0x72, 0x61, 0x74, 0x65, 0x2d, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x76, + 0x38, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, + 0x76, 0x31, 0x3b, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x52, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x18, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, + 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ratelimit_v1_query_proto_rawDescOnce sync.Once + file_ratelimit_v1_query_proto_rawDescData = file_ratelimit_v1_query_proto_rawDesc +) + +func file_ratelimit_v1_query_proto_rawDescGZIP() []byte { + file_ratelimit_v1_query_proto_rawDescOnce.Do(func() { + file_ratelimit_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_ratelimit_v1_query_proto_rawDescData) + }) + return file_ratelimit_v1_query_proto_rawDescData +} + +var file_ratelimit_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_ratelimit_v1_query_proto_goTypes = []interface{}{ + (*QueryAllRateLimitsRequest)(nil), // 0: ratelimit.v1.QueryAllRateLimitsRequest + (*QueryAllRateLimitsResponse)(nil), // 1: ratelimit.v1.QueryAllRateLimitsResponse + (*QueryRateLimitRequest)(nil), // 2: ratelimit.v1.QueryRateLimitRequest + (*QueryRateLimitResponse)(nil), // 3: ratelimit.v1.QueryRateLimitResponse + (*QueryRateLimitsByChainIdRequest)(nil), // 4: ratelimit.v1.QueryRateLimitsByChainIdRequest + (*QueryRateLimitsByChainIdResponse)(nil), // 5: ratelimit.v1.QueryRateLimitsByChainIdResponse + (*QueryRateLimitsByChannelIdRequest)(nil), // 6: ratelimit.v1.QueryRateLimitsByChannelIdRequest + (*QueryRateLimitsByChannelIdResponse)(nil), // 7: ratelimit.v1.QueryRateLimitsByChannelIdResponse + (*QueryAllBlacklistedDenomsRequest)(nil), // 8: ratelimit.v1.QueryAllBlacklistedDenomsRequest + (*QueryAllBlacklistedDenomsResponse)(nil), // 9: ratelimit.v1.QueryAllBlacklistedDenomsResponse + (*QueryAllWhitelistedAddressesRequest)(nil), // 10: ratelimit.v1.QueryAllWhitelistedAddressesRequest + (*QueryAllWhitelistedAddressesResponse)(nil), // 11: ratelimit.v1.QueryAllWhitelistedAddressesResponse + (*RateLimit)(nil), // 12: ratelimit.v1.RateLimit + (*WhitelistedAddressPair)(nil), // 13: ratelimit.v1.WhitelistedAddressPair +} +var file_ratelimit_v1_query_proto_depIdxs = []int32{ + 12, // 0: ratelimit.v1.QueryAllRateLimitsResponse.rate_limits:type_name -> ratelimit.v1.RateLimit + 12, // 1: ratelimit.v1.QueryRateLimitResponse.rate_limit:type_name -> ratelimit.v1.RateLimit + 12, // 2: ratelimit.v1.QueryRateLimitsByChainIdResponse.rate_limits:type_name -> ratelimit.v1.RateLimit + 12, // 3: ratelimit.v1.QueryRateLimitsByChannelIdResponse.rate_limits:type_name -> ratelimit.v1.RateLimit + 13, // 4: ratelimit.v1.QueryAllWhitelistedAddressesResponse.address_pairs:type_name -> ratelimit.v1.WhitelistedAddressPair + 0, // 5: ratelimit.v1.Query.AllRateLimits:input_type -> ratelimit.v1.QueryAllRateLimitsRequest + 2, // 6: ratelimit.v1.Query.RateLimit:input_type -> ratelimit.v1.QueryRateLimitRequest + 4, // 7: ratelimit.v1.Query.RateLimitsByChainId:input_type -> ratelimit.v1.QueryRateLimitsByChainIdRequest + 6, // 8: ratelimit.v1.Query.RateLimitsByChannelId:input_type -> ratelimit.v1.QueryRateLimitsByChannelIdRequest + 8, // 9: ratelimit.v1.Query.AllBlacklistedDenoms:input_type -> ratelimit.v1.QueryAllBlacklistedDenomsRequest + 10, // 10: ratelimit.v1.Query.AllWhitelistedAddresses:input_type -> ratelimit.v1.QueryAllWhitelistedAddressesRequest + 1, // 11: ratelimit.v1.Query.AllRateLimits:output_type -> ratelimit.v1.QueryAllRateLimitsResponse + 3, // 12: ratelimit.v1.Query.RateLimit:output_type -> ratelimit.v1.QueryRateLimitResponse + 5, // 13: ratelimit.v1.Query.RateLimitsByChainId:output_type -> ratelimit.v1.QueryRateLimitsByChainIdResponse + 7, // 14: ratelimit.v1.Query.RateLimitsByChannelId:output_type -> ratelimit.v1.QueryRateLimitsByChannelIdResponse + 9, // 15: ratelimit.v1.Query.AllBlacklistedDenoms:output_type -> ratelimit.v1.QueryAllBlacklistedDenomsResponse + 11, // 16: ratelimit.v1.Query.AllWhitelistedAddresses:output_type -> ratelimit.v1.QueryAllWhitelistedAddressesResponse + 11, // [11:17] is the sub-list for method output_type + 5, // [5:11] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_ratelimit_v1_query_proto_init() } +func file_ratelimit_v1_query_proto_init() { + if File_ratelimit_v1_query_proto != nil { + return + } + file_ratelimit_v1_ratelimit_proto_init() + if !protoimpl.UnsafeEnabled { + file_ratelimit_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllRateLimitsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllRateLimitsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRateLimitRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRateLimitResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRateLimitsByChainIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRateLimitsByChainIdResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRateLimitsByChannelIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRateLimitsByChannelIdResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllBlacklistedDenomsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllBlacklistedDenomsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllWhitelistedAddressesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllWhitelistedAddressesResponse); 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{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ratelimit_v1_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_ratelimit_v1_query_proto_goTypes, + DependencyIndexes: file_ratelimit_v1_query_proto_depIdxs, + MessageInfos: file_ratelimit_v1_query_proto_msgTypes, + }.Build() + File_ratelimit_v1_query_proto = out.File + file_ratelimit_v1_query_proto_rawDesc = nil + file_ratelimit_v1_query_proto_goTypes = nil + file_ratelimit_v1_query_proto_depIdxs = nil +} diff --git a/api/ratelimit/v1/query_grpc.pb.go b/api/ratelimit/v1/query_grpc.pb.go new file mode 100644 index 0000000..3b32842 --- /dev/null +++ b/api/ratelimit/v1/query_grpc.pb.go @@ -0,0 +1,310 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: ratelimit/v1/query.proto + +package ratelimitv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Query_AllRateLimits_FullMethodName = "/ratelimit.v1.Query/AllRateLimits" + Query_RateLimit_FullMethodName = "/ratelimit.v1.Query/RateLimit" + Query_RateLimitsByChainId_FullMethodName = "/ratelimit.v1.Query/RateLimitsByChainId" + Query_RateLimitsByChannelId_FullMethodName = "/ratelimit.v1.Query/RateLimitsByChannelId" + Query_AllBlacklistedDenoms_FullMethodName = "/ratelimit.v1.Query/AllBlacklistedDenoms" + Query_AllWhitelistedAddresses_FullMethodName = "/ratelimit.v1.Query/AllWhitelistedAddresses" +) + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type QueryClient interface { + // Queries all rate limits + AllRateLimits(ctx context.Context, in *QueryAllRateLimitsRequest, opts ...grpc.CallOption) (*QueryAllRateLimitsResponse, error) + // Queries a specific rate limit by channel ID and denom + // Ex: + // - /ratelimit/{channel_id}/by_denom?denom={denom} + RateLimit(ctx context.Context, in *QueryRateLimitRequest, opts ...grpc.CallOption) (*QueryRateLimitResponse, error) + // Queries all the rate limits for a given chain + RateLimitsByChainId(ctx context.Context, in *QueryRateLimitsByChainIdRequest, opts ...grpc.CallOption) (*QueryRateLimitsByChainIdResponse, error) + // Queries all the rate limits for a given channel ID + RateLimitsByChannelId(ctx context.Context, in *QueryRateLimitsByChannelIdRequest, opts ...grpc.CallOption) (*QueryRateLimitsByChannelIdResponse, error) + // Queries all blacklisted denoms + AllBlacklistedDenoms(ctx context.Context, in *QueryAllBlacklistedDenomsRequest, opts ...grpc.CallOption) (*QueryAllBlacklistedDenomsResponse, error) + // Queries all whitelisted address pairs + AllWhitelistedAddresses(ctx context.Context, in *QueryAllWhitelistedAddressesRequest, opts ...grpc.CallOption) (*QueryAllWhitelistedAddressesResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) AllRateLimits(ctx context.Context, in *QueryAllRateLimitsRequest, opts ...grpc.CallOption) (*QueryAllRateLimitsResponse, error) { + out := new(QueryAllRateLimitsResponse) + err := c.cc.Invoke(ctx, Query_AllRateLimits_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) RateLimit(ctx context.Context, in *QueryRateLimitRequest, opts ...grpc.CallOption) (*QueryRateLimitResponse, error) { + out := new(QueryRateLimitResponse) + err := c.cc.Invoke(ctx, Query_RateLimit_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) RateLimitsByChainId(ctx context.Context, in *QueryRateLimitsByChainIdRequest, opts ...grpc.CallOption) (*QueryRateLimitsByChainIdResponse, error) { + out := new(QueryRateLimitsByChainIdResponse) + err := c.cc.Invoke(ctx, Query_RateLimitsByChainId_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) RateLimitsByChannelId(ctx context.Context, in *QueryRateLimitsByChannelIdRequest, opts ...grpc.CallOption) (*QueryRateLimitsByChannelIdResponse, error) { + out := new(QueryRateLimitsByChannelIdResponse) + err := c.cc.Invoke(ctx, Query_RateLimitsByChannelId_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllBlacklistedDenoms(ctx context.Context, in *QueryAllBlacklistedDenomsRequest, opts ...grpc.CallOption) (*QueryAllBlacklistedDenomsResponse, error) { + out := new(QueryAllBlacklistedDenomsResponse) + err := c.cc.Invoke(ctx, Query_AllBlacklistedDenoms_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllWhitelistedAddresses(ctx context.Context, in *QueryAllWhitelistedAddressesRequest, opts ...grpc.CallOption) (*QueryAllWhitelistedAddressesResponse, error) { + out := new(QueryAllWhitelistedAddressesResponse) + err := c.cc.Invoke(ctx, Query_AllWhitelistedAddresses_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 +type QueryServer interface { + // Queries all rate limits + AllRateLimits(context.Context, *QueryAllRateLimitsRequest) (*QueryAllRateLimitsResponse, error) + // Queries a specific rate limit by channel ID and denom + // Ex: + // - /ratelimit/{channel_id}/by_denom?denom={denom} + RateLimit(context.Context, *QueryRateLimitRequest) (*QueryRateLimitResponse, error) + // Queries all the rate limits for a given chain + RateLimitsByChainId(context.Context, *QueryRateLimitsByChainIdRequest) (*QueryRateLimitsByChainIdResponse, error) + // Queries all the rate limits for a given channel ID + RateLimitsByChannelId(context.Context, *QueryRateLimitsByChannelIdRequest) (*QueryRateLimitsByChannelIdResponse, error) + // Queries all blacklisted denoms + AllBlacklistedDenoms(context.Context, *QueryAllBlacklistedDenomsRequest) (*QueryAllBlacklistedDenomsResponse, error) + // Queries all whitelisted address pairs + AllWhitelistedAddresses(context.Context, *QueryAllWhitelistedAddressesRequest) (*QueryAllWhitelistedAddressesResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) AllRateLimits(context.Context, *QueryAllRateLimitsRequest) (*QueryAllRateLimitsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllRateLimits not implemented") +} +func (UnimplementedQueryServer) RateLimit(context.Context, *QueryRateLimitRequest) (*QueryRateLimitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RateLimit not implemented") +} +func (UnimplementedQueryServer) RateLimitsByChainId(context.Context, *QueryRateLimitsByChainIdRequest) (*QueryRateLimitsByChainIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RateLimitsByChainId not implemented") +} +func (UnimplementedQueryServer) RateLimitsByChannelId(context.Context, *QueryRateLimitsByChannelIdRequest) (*QueryRateLimitsByChannelIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RateLimitsByChannelId not implemented") +} +func (UnimplementedQueryServer) AllBlacklistedDenoms(context.Context, *QueryAllBlacklistedDenomsRequest) (*QueryAllBlacklistedDenomsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllBlacklistedDenoms not implemented") +} +func (UnimplementedQueryServer) AllWhitelistedAddresses(context.Context, *QueryAllWhitelistedAddressesRequest) (*QueryAllWhitelistedAddressesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllWhitelistedAddresses not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_AllRateLimits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllRateLimitsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllRateLimits(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AllRateLimits_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllRateLimits(ctx, req.(*QueryAllRateLimitsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_RateLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRateLimitRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).RateLimit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_RateLimit_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).RateLimit(ctx, req.(*QueryRateLimitRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_RateLimitsByChainId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRateLimitsByChainIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).RateLimitsByChainId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_RateLimitsByChainId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).RateLimitsByChainId(ctx, req.(*QueryRateLimitsByChainIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_RateLimitsByChannelId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRateLimitsByChannelIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).RateLimitsByChannelId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_RateLimitsByChannelId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).RateLimitsByChannelId(ctx, req.(*QueryRateLimitsByChannelIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllBlacklistedDenoms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllBlacklistedDenomsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllBlacklistedDenoms(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AllBlacklistedDenoms_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllBlacklistedDenoms(ctx, req.(*QueryAllBlacklistedDenomsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllWhitelistedAddresses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllWhitelistedAddressesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllWhitelistedAddresses(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AllWhitelistedAddresses_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllWhitelistedAddresses(ctx, req.(*QueryAllWhitelistedAddressesRequest)) + } + 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) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "ratelimit.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AllRateLimits", + Handler: _Query_AllRateLimits_Handler, + }, + { + MethodName: "RateLimit", + Handler: _Query_RateLimit_Handler, + }, + { + MethodName: "RateLimitsByChainId", + Handler: _Query_RateLimitsByChainId_Handler, + }, + { + MethodName: "RateLimitsByChannelId", + Handler: _Query_RateLimitsByChannelId_Handler, + }, + { + MethodName: "AllBlacklistedDenoms", + Handler: _Query_AllBlacklistedDenoms_Handler, + }, + { + MethodName: "AllWhitelistedAddresses", + Handler: _Query_AllWhitelistedAddresses_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ratelimit/v1/query.proto", +} diff --git a/api/ratelimit/v1/ratelimit.pulsar.go b/api/ratelimit/v1/ratelimit.pulsar.go new file mode 100644 index 0000000..3ed5dd0 --- /dev/null +++ b/api/ratelimit/v1/ratelimit.pulsar.go @@ -0,0 +1,3873 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package ratelimitv1 + +import ( + fmt "fmt" + 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" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Path protoreflect.MessageDescriptor + fd_Path_denom protoreflect.FieldDescriptor + fd_Path_channel_id protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_ratelimit_proto_init() + md_Path = File_ratelimit_v1_ratelimit_proto.Messages().ByName("Path") + fd_Path_denom = md_Path.Fields().ByName("denom") + fd_Path_channel_id = md_Path.Fields().ByName("channel_id") +} + +var _ protoreflect.Message = (*fastReflection_Path)(nil) + +type fastReflection_Path Path + +func (x *Path) ProtoReflect() protoreflect.Message { + return (*fastReflection_Path)(x) +} + +func (x *Path) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_ratelimit_proto_msgTypes[0] + 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_Path_messageType fastReflection_Path_messageType +var _ protoreflect.MessageType = fastReflection_Path_messageType{} + +type fastReflection_Path_messageType struct{} + +func (x fastReflection_Path_messageType) Zero() protoreflect.Message { + return (*fastReflection_Path)(nil) +} +func (x fastReflection_Path_messageType) New() protoreflect.Message { + return new(fastReflection_Path) +} +func (x fastReflection_Path_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Path +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Path) Descriptor() protoreflect.MessageDescriptor { + return md_Path +} + +// 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_Path) Type() protoreflect.MessageType { + return _fastReflection_Path_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Path) New() protoreflect.Message { + return new(fastReflection_Path) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Path) Interface() protoreflect.ProtoMessage { + return (*Path)(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_Path) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_Path_denom, value) { + return + } + } + if x.ChannelId != "" { + value := protoreflect.ValueOfString(x.ChannelId) + if !f(fd_Path_channel_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Path) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.Path.denom": + return x.Denom != "" + case "ratelimit.v1.Path.channel_id": + return x.ChannelId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Path")) + } + panic(fmt.Errorf("message ratelimit.v1.Path 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_Path) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.Path.denom": + x.Denom = "" + case "ratelimit.v1.Path.channel_id": + x.ChannelId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Path")) + } + panic(fmt.Errorf("message ratelimit.v1.Path 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_Path) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.Path.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + case "ratelimit.v1.Path.channel_id": + value := x.ChannelId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Path")) + } + panic(fmt.Errorf("message ratelimit.v1.Path 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_Path) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.Path.denom": + x.Denom = value.Interface().(string) + case "ratelimit.v1.Path.channel_id": + x.ChannelId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Path")) + } + panic(fmt.Errorf("message ratelimit.v1.Path 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_Path) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.Path.denom": + panic(fmt.Errorf("field denom of message ratelimit.v1.Path is not mutable")) + case "ratelimit.v1.Path.channel_id": + panic(fmt.Errorf("field channel_id of message ratelimit.v1.Path is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Path")) + } + panic(fmt.Errorf("message ratelimit.v1.Path 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_Path) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.Path.denom": + return protoreflect.ValueOfString("") + case "ratelimit.v1.Path.channel_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Path")) + } + panic(fmt.Errorf("message ratelimit.v1.Path 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_Path) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.Path", 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_Path) 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_Path) 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_Path) 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_Path) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Path) + 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.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChannelId) + 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().(*Path) + 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.ChannelId) > 0 { + i -= len(x.ChannelId) + copy(dAtA[i:], x.ChannelId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + 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().(*Path) + 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: Path: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Path: 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 Denom", 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.Denom = 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 ChannelId", 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.ChannelId = 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_Quota protoreflect.MessageDescriptor + fd_Quota_max_percent_send protoreflect.FieldDescriptor + fd_Quota_max_percent_recv protoreflect.FieldDescriptor + fd_Quota_duration_hours protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_ratelimit_proto_init() + md_Quota = File_ratelimit_v1_ratelimit_proto.Messages().ByName("Quota") + fd_Quota_max_percent_send = md_Quota.Fields().ByName("max_percent_send") + fd_Quota_max_percent_recv = md_Quota.Fields().ByName("max_percent_recv") + fd_Quota_duration_hours = md_Quota.Fields().ByName("duration_hours") +} + +var _ protoreflect.Message = (*fastReflection_Quota)(nil) + +type fastReflection_Quota Quota + +func (x *Quota) ProtoReflect() protoreflect.Message { + return (*fastReflection_Quota)(x) +} + +func (x *Quota) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_ratelimit_proto_msgTypes[1] + 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_Quota_messageType fastReflection_Quota_messageType +var _ protoreflect.MessageType = fastReflection_Quota_messageType{} + +type fastReflection_Quota_messageType struct{} + +func (x fastReflection_Quota_messageType) Zero() protoreflect.Message { + return (*fastReflection_Quota)(nil) +} +func (x fastReflection_Quota_messageType) New() protoreflect.Message { + return new(fastReflection_Quota) +} +func (x fastReflection_Quota_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Quota +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Quota) Descriptor() protoreflect.MessageDescriptor { + return md_Quota +} + +// 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_Quota) Type() protoreflect.MessageType { + return _fastReflection_Quota_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Quota) New() protoreflect.Message { + return new(fastReflection_Quota) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Quota) Interface() protoreflect.ProtoMessage { + return (*Quota)(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_Quota) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.MaxPercentSend != "" { + value := protoreflect.ValueOfString(x.MaxPercentSend) + if !f(fd_Quota_max_percent_send, value) { + return + } + } + if x.MaxPercentRecv != "" { + value := protoreflect.ValueOfString(x.MaxPercentRecv) + if !f(fd_Quota_max_percent_recv, value) { + return + } + } + if x.DurationHours != uint64(0) { + value := protoreflect.ValueOfUint64(x.DurationHours) + if !f(fd_Quota_duration_hours, 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_Quota) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.Quota.max_percent_send": + return x.MaxPercentSend != "" + case "ratelimit.v1.Quota.max_percent_recv": + return x.MaxPercentRecv != "" + case "ratelimit.v1.Quota.duration_hours": + return x.DurationHours != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Quota")) + } + panic(fmt.Errorf("message ratelimit.v1.Quota 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_Quota) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.Quota.max_percent_send": + x.MaxPercentSend = "" + case "ratelimit.v1.Quota.max_percent_recv": + x.MaxPercentRecv = "" + case "ratelimit.v1.Quota.duration_hours": + x.DurationHours = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Quota")) + } + panic(fmt.Errorf("message ratelimit.v1.Quota 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_Quota) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.Quota.max_percent_send": + value := x.MaxPercentSend + return protoreflect.ValueOfString(value) + case "ratelimit.v1.Quota.max_percent_recv": + value := x.MaxPercentRecv + return protoreflect.ValueOfString(value) + case "ratelimit.v1.Quota.duration_hours": + value := x.DurationHours + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Quota")) + } + panic(fmt.Errorf("message ratelimit.v1.Quota 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_Quota) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.Quota.max_percent_send": + x.MaxPercentSend = value.Interface().(string) + case "ratelimit.v1.Quota.max_percent_recv": + x.MaxPercentRecv = value.Interface().(string) + case "ratelimit.v1.Quota.duration_hours": + x.DurationHours = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Quota")) + } + panic(fmt.Errorf("message ratelimit.v1.Quota 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_Quota) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.Quota.max_percent_send": + panic(fmt.Errorf("field max_percent_send of message ratelimit.v1.Quota is not mutable")) + case "ratelimit.v1.Quota.max_percent_recv": + panic(fmt.Errorf("field max_percent_recv of message ratelimit.v1.Quota is not mutable")) + case "ratelimit.v1.Quota.duration_hours": + panic(fmt.Errorf("field duration_hours of message ratelimit.v1.Quota is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Quota")) + } + panic(fmt.Errorf("message ratelimit.v1.Quota 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_Quota) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.Quota.max_percent_send": + return protoreflect.ValueOfString("") + case "ratelimit.v1.Quota.max_percent_recv": + return protoreflect.ValueOfString("") + case "ratelimit.v1.Quota.duration_hours": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Quota")) + } + panic(fmt.Errorf("message ratelimit.v1.Quota 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_Quota) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.Quota", 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_Quota) 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_Quota) 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_Quota) 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_Quota) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Quota) + 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.MaxPercentSend) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.MaxPercentRecv) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.DurationHours != 0 { + n += 1 + runtime.Sov(uint64(x.DurationHours)) + } + 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().(*Quota) + 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.DurationHours != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.DurationHours)) + i-- + dAtA[i] = 0x18 + } + if len(x.MaxPercentRecv) > 0 { + i -= len(x.MaxPercentRecv) + copy(dAtA[i:], x.MaxPercentRecv) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxPercentRecv))) + i-- + dAtA[i] = 0x12 + } + if len(x.MaxPercentSend) > 0 { + i -= len(x.MaxPercentSend) + copy(dAtA[i:], x.MaxPercentSend) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxPercentSend))) + 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().(*Quota) + 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: Quota: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Quota: 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 MaxPercentSend", 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.MaxPercentSend = 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 MaxPercentRecv", 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.MaxPercentRecv = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DurationHours", wireType) + } + x.DurationHours = 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.DurationHours |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_Flow protoreflect.MessageDescriptor + fd_Flow_inflow protoreflect.FieldDescriptor + fd_Flow_outflow protoreflect.FieldDescriptor + fd_Flow_channel_value protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_ratelimit_proto_init() + md_Flow = File_ratelimit_v1_ratelimit_proto.Messages().ByName("Flow") + fd_Flow_inflow = md_Flow.Fields().ByName("inflow") + fd_Flow_outflow = md_Flow.Fields().ByName("outflow") + fd_Flow_channel_value = md_Flow.Fields().ByName("channel_value") +} + +var _ protoreflect.Message = (*fastReflection_Flow)(nil) + +type fastReflection_Flow Flow + +func (x *Flow) ProtoReflect() protoreflect.Message { + return (*fastReflection_Flow)(x) +} + +func (x *Flow) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_ratelimit_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Flow_messageType fastReflection_Flow_messageType +var _ protoreflect.MessageType = fastReflection_Flow_messageType{} + +type fastReflection_Flow_messageType struct{} + +func (x fastReflection_Flow_messageType) Zero() protoreflect.Message { + return (*fastReflection_Flow)(nil) +} +func (x fastReflection_Flow_messageType) New() protoreflect.Message { + return new(fastReflection_Flow) +} +func (x fastReflection_Flow_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Flow +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Flow) Descriptor() protoreflect.MessageDescriptor { + return md_Flow +} + +// 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_Flow) Type() protoreflect.MessageType { + return _fastReflection_Flow_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Flow) New() protoreflect.Message { + return new(fastReflection_Flow) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Flow) Interface() protoreflect.ProtoMessage { + return (*Flow)(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_Flow) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Inflow != "" { + value := protoreflect.ValueOfString(x.Inflow) + if !f(fd_Flow_inflow, value) { + return + } + } + if x.Outflow != "" { + value := protoreflect.ValueOfString(x.Outflow) + if !f(fd_Flow_outflow, value) { + return + } + } + if x.ChannelValue != "" { + value := protoreflect.ValueOfString(x.ChannelValue) + if !f(fd_Flow_channel_value, 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_Flow) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.Flow.inflow": + return x.Inflow != "" + case "ratelimit.v1.Flow.outflow": + return x.Outflow != "" + case "ratelimit.v1.Flow.channel_value": + return x.ChannelValue != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Flow")) + } + panic(fmt.Errorf("message ratelimit.v1.Flow 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_Flow) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.Flow.inflow": + x.Inflow = "" + case "ratelimit.v1.Flow.outflow": + x.Outflow = "" + case "ratelimit.v1.Flow.channel_value": + x.ChannelValue = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Flow")) + } + panic(fmt.Errorf("message ratelimit.v1.Flow 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_Flow) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.Flow.inflow": + value := x.Inflow + return protoreflect.ValueOfString(value) + case "ratelimit.v1.Flow.outflow": + value := x.Outflow + return protoreflect.ValueOfString(value) + case "ratelimit.v1.Flow.channel_value": + value := x.ChannelValue + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Flow")) + } + panic(fmt.Errorf("message ratelimit.v1.Flow 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_Flow) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.Flow.inflow": + x.Inflow = value.Interface().(string) + case "ratelimit.v1.Flow.outflow": + x.Outflow = value.Interface().(string) + case "ratelimit.v1.Flow.channel_value": + x.ChannelValue = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Flow")) + } + panic(fmt.Errorf("message ratelimit.v1.Flow 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_Flow) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.Flow.inflow": + panic(fmt.Errorf("field inflow of message ratelimit.v1.Flow is not mutable")) + case "ratelimit.v1.Flow.outflow": + panic(fmt.Errorf("field outflow of message ratelimit.v1.Flow is not mutable")) + case "ratelimit.v1.Flow.channel_value": + panic(fmt.Errorf("field channel_value of message ratelimit.v1.Flow is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Flow")) + } + panic(fmt.Errorf("message ratelimit.v1.Flow 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_Flow) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.Flow.inflow": + return protoreflect.ValueOfString("") + case "ratelimit.v1.Flow.outflow": + return protoreflect.ValueOfString("") + case "ratelimit.v1.Flow.channel_value": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.Flow")) + } + panic(fmt.Errorf("message ratelimit.v1.Flow 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_Flow) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.Flow", 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_Flow) 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_Flow) 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_Flow) 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_Flow) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Flow) + 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.Inflow) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Outflow) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChannelValue) + 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().(*Flow) + 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.ChannelValue) > 0 { + i -= len(x.ChannelValue) + copy(dAtA[i:], x.ChannelValue) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChannelValue))) + i-- + dAtA[i] = 0x1a + } + if len(x.Outflow) > 0 { + i -= len(x.Outflow) + copy(dAtA[i:], x.Outflow) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Outflow))) + i-- + dAtA[i] = 0x12 + } + if len(x.Inflow) > 0 { + i -= len(x.Inflow) + copy(dAtA[i:], x.Inflow) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Inflow))) + 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().(*Flow) + 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: Flow: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Flow: 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 Inflow", 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.Inflow = 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 Outflow", 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.Outflow = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChannelValue", 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.ChannelValue = 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_RateLimit protoreflect.MessageDescriptor + fd_RateLimit_path protoreflect.FieldDescriptor + fd_RateLimit_quota protoreflect.FieldDescriptor + fd_RateLimit_flow protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_ratelimit_proto_init() + md_RateLimit = File_ratelimit_v1_ratelimit_proto.Messages().ByName("RateLimit") + fd_RateLimit_path = md_RateLimit.Fields().ByName("path") + fd_RateLimit_quota = md_RateLimit.Fields().ByName("quota") + fd_RateLimit_flow = md_RateLimit.Fields().ByName("flow") +} + +var _ protoreflect.Message = (*fastReflection_RateLimit)(nil) + +type fastReflection_RateLimit RateLimit + +func (x *RateLimit) ProtoReflect() protoreflect.Message { + return (*fastReflection_RateLimit)(x) +} + +func (x *RateLimit) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_ratelimit_proto_msgTypes[3] + 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_RateLimit_messageType fastReflection_RateLimit_messageType +var _ protoreflect.MessageType = fastReflection_RateLimit_messageType{} + +type fastReflection_RateLimit_messageType struct{} + +func (x fastReflection_RateLimit_messageType) Zero() protoreflect.Message { + return (*fastReflection_RateLimit)(nil) +} +func (x fastReflection_RateLimit_messageType) New() protoreflect.Message { + return new(fastReflection_RateLimit) +} +func (x fastReflection_RateLimit_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_RateLimit +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_RateLimit) Descriptor() protoreflect.MessageDescriptor { + return md_RateLimit +} + +// 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_RateLimit) Type() protoreflect.MessageType { + return _fastReflection_RateLimit_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_RateLimit) New() protoreflect.Message { + return new(fastReflection_RateLimit) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_RateLimit) Interface() protoreflect.ProtoMessage { + return (*RateLimit)(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_RateLimit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Path != nil { + value := protoreflect.ValueOfMessage(x.Path.ProtoReflect()) + if !f(fd_RateLimit_path, value) { + return + } + } + if x.Quota != nil { + value := protoreflect.ValueOfMessage(x.Quota.ProtoReflect()) + if !f(fd_RateLimit_quota, value) { + return + } + } + if x.Flow != nil { + value := protoreflect.ValueOfMessage(x.Flow.ProtoReflect()) + if !f(fd_RateLimit_flow, 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_RateLimit) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.RateLimit.path": + return x.Path != nil + case "ratelimit.v1.RateLimit.quota": + return x.Quota != nil + case "ratelimit.v1.RateLimit.flow": + return x.Flow != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.RateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.RateLimit 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_RateLimit) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.RateLimit.path": + x.Path = nil + case "ratelimit.v1.RateLimit.quota": + x.Quota = nil + case "ratelimit.v1.RateLimit.flow": + x.Flow = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.RateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.RateLimit 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_RateLimit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.RateLimit.path": + value := x.Path + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "ratelimit.v1.RateLimit.quota": + value := x.Quota + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "ratelimit.v1.RateLimit.flow": + value := x.Flow + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.RateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.RateLimit 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_RateLimit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.RateLimit.path": + x.Path = value.Message().Interface().(*Path) + case "ratelimit.v1.RateLimit.quota": + x.Quota = value.Message().Interface().(*Quota) + case "ratelimit.v1.RateLimit.flow": + x.Flow = value.Message().Interface().(*Flow) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.RateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.RateLimit 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_RateLimit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.RateLimit.path": + if x.Path == nil { + x.Path = new(Path) + } + return protoreflect.ValueOfMessage(x.Path.ProtoReflect()) + case "ratelimit.v1.RateLimit.quota": + if x.Quota == nil { + x.Quota = new(Quota) + } + return protoreflect.ValueOfMessage(x.Quota.ProtoReflect()) + case "ratelimit.v1.RateLimit.flow": + if x.Flow == nil { + x.Flow = new(Flow) + } + return protoreflect.ValueOfMessage(x.Flow.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.RateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.RateLimit 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_RateLimit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.RateLimit.path": + m := new(Path) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "ratelimit.v1.RateLimit.quota": + m := new(Quota) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "ratelimit.v1.RateLimit.flow": + m := new(Flow) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.RateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.RateLimit 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_RateLimit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.RateLimit", 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_RateLimit) 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_RateLimit) 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_RateLimit) 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_RateLimit) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*RateLimit) + 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.Path != nil { + l = options.Size(x.Path) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Quota != nil { + l = options.Size(x.Quota) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Flow != nil { + l = options.Size(x.Flow) + 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().(*RateLimit) + 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.Flow != nil { + encoded, err := options.Marshal(x.Flow) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.Quota != nil { + encoded, err := options.Marshal(x.Quota) + 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 x.Path != nil { + encoded, err := options.Marshal(x.Path) + 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().(*RateLimit) + 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: RateLimit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RateLimit: 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 Path", 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.Path == nil { + x.Path = &Path{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Path); err != nil { + 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 Quota", 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.Quota == nil { + x.Quota = &Quota{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Quota); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Flow", 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.Flow == nil { + x.Flow = &Flow{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Flow); 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_WhitelistedAddressPair protoreflect.MessageDescriptor + fd_WhitelistedAddressPair_sender protoreflect.FieldDescriptor + fd_WhitelistedAddressPair_receiver protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_ratelimit_proto_init() + md_WhitelistedAddressPair = File_ratelimit_v1_ratelimit_proto.Messages().ByName("WhitelistedAddressPair") + fd_WhitelistedAddressPair_sender = md_WhitelistedAddressPair.Fields().ByName("sender") + fd_WhitelistedAddressPair_receiver = md_WhitelistedAddressPair.Fields().ByName("receiver") +} + +var _ protoreflect.Message = (*fastReflection_WhitelistedAddressPair)(nil) + +type fastReflection_WhitelistedAddressPair WhitelistedAddressPair + +func (x *WhitelistedAddressPair) ProtoReflect() protoreflect.Message { + return (*fastReflection_WhitelistedAddressPair)(x) +} + +func (x *WhitelistedAddressPair) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_ratelimit_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_WhitelistedAddressPair_messageType fastReflection_WhitelistedAddressPair_messageType +var _ protoreflect.MessageType = fastReflection_WhitelistedAddressPair_messageType{} + +type fastReflection_WhitelistedAddressPair_messageType struct{} + +func (x fastReflection_WhitelistedAddressPair_messageType) Zero() protoreflect.Message { + return (*fastReflection_WhitelistedAddressPair)(nil) +} +func (x fastReflection_WhitelistedAddressPair_messageType) New() protoreflect.Message { + return new(fastReflection_WhitelistedAddressPair) +} +func (x fastReflection_WhitelistedAddressPair_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_WhitelistedAddressPair +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_WhitelistedAddressPair) Descriptor() protoreflect.MessageDescriptor { + return md_WhitelistedAddressPair +} + +// 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_WhitelistedAddressPair) Type() protoreflect.MessageType { + return _fastReflection_WhitelistedAddressPair_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_WhitelistedAddressPair) New() protoreflect.Message { + return new(fastReflection_WhitelistedAddressPair) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_WhitelistedAddressPair) Interface() protoreflect.ProtoMessage { + return (*WhitelistedAddressPair)(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_WhitelistedAddressPair) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_WhitelistedAddressPair_sender, value) { + return + } + } + if x.Receiver != "" { + value := protoreflect.ValueOfString(x.Receiver) + if !f(fd_WhitelistedAddressPair_receiver, 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_WhitelistedAddressPair) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.WhitelistedAddressPair.sender": + return x.Sender != "" + case "ratelimit.v1.WhitelistedAddressPair.receiver": + return x.Receiver != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.WhitelistedAddressPair")) + } + panic(fmt.Errorf("message ratelimit.v1.WhitelistedAddressPair 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_WhitelistedAddressPair) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.WhitelistedAddressPair.sender": + x.Sender = "" + case "ratelimit.v1.WhitelistedAddressPair.receiver": + x.Receiver = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.WhitelistedAddressPair")) + } + panic(fmt.Errorf("message ratelimit.v1.WhitelistedAddressPair 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_WhitelistedAddressPair) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.WhitelistedAddressPair.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "ratelimit.v1.WhitelistedAddressPair.receiver": + value := x.Receiver + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.WhitelistedAddressPair")) + } + panic(fmt.Errorf("message ratelimit.v1.WhitelistedAddressPair 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_WhitelistedAddressPair) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.WhitelistedAddressPair.sender": + x.Sender = value.Interface().(string) + case "ratelimit.v1.WhitelistedAddressPair.receiver": + x.Receiver = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.WhitelistedAddressPair")) + } + panic(fmt.Errorf("message ratelimit.v1.WhitelistedAddressPair 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_WhitelistedAddressPair) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.WhitelistedAddressPair.sender": + panic(fmt.Errorf("field sender of message ratelimit.v1.WhitelistedAddressPair is not mutable")) + case "ratelimit.v1.WhitelistedAddressPair.receiver": + panic(fmt.Errorf("field receiver of message ratelimit.v1.WhitelistedAddressPair is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.WhitelistedAddressPair")) + } + panic(fmt.Errorf("message ratelimit.v1.WhitelistedAddressPair 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_WhitelistedAddressPair) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.WhitelistedAddressPair.sender": + return protoreflect.ValueOfString("") + case "ratelimit.v1.WhitelistedAddressPair.receiver": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.WhitelistedAddressPair")) + } + panic(fmt.Errorf("message ratelimit.v1.WhitelistedAddressPair 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_WhitelistedAddressPair) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.WhitelistedAddressPair", 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_WhitelistedAddressPair) 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_WhitelistedAddressPair) 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_WhitelistedAddressPair) 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_WhitelistedAddressPair) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*WhitelistedAddressPair) + 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.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Receiver) + 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().(*WhitelistedAddressPair) + 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.Receiver) > 0 { + i -= len(x.Receiver) + copy(dAtA[i:], x.Receiver) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Receiver))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + 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().(*WhitelistedAddressPair) + 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: WhitelistedAddressPair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: WhitelistedAddressPair: 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 Sender", 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.Sender = 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 Receiver", 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.Receiver = 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_HourEpoch protoreflect.MessageDescriptor + fd_HourEpoch_epoch_number protoreflect.FieldDescriptor + fd_HourEpoch_duration protoreflect.FieldDescriptor + fd_HourEpoch_epoch_start_time protoreflect.FieldDescriptor + fd_HourEpoch_epoch_start_height protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_ratelimit_proto_init() + md_HourEpoch = File_ratelimit_v1_ratelimit_proto.Messages().ByName("HourEpoch") + fd_HourEpoch_epoch_number = md_HourEpoch.Fields().ByName("epoch_number") + fd_HourEpoch_duration = md_HourEpoch.Fields().ByName("duration") + fd_HourEpoch_epoch_start_time = md_HourEpoch.Fields().ByName("epoch_start_time") + fd_HourEpoch_epoch_start_height = md_HourEpoch.Fields().ByName("epoch_start_height") +} + +var _ protoreflect.Message = (*fastReflection_HourEpoch)(nil) + +type fastReflection_HourEpoch HourEpoch + +func (x *HourEpoch) ProtoReflect() protoreflect.Message { + return (*fastReflection_HourEpoch)(x) +} + +func (x *HourEpoch) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_ratelimit_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_HourEpoch_messageType fastReflection_HourEpoch_messageType +var _ protoreflect.MessageType = fastReflection_HourEpoch_messageType{} + +type fastReflection_HourEpoch_messageType struct{} + +func (x fastReflection_HourEpoch_messageType) Zero() protoreflect.Message { + return (*fastReflection_HourEpoch)(nil) +} +func (x fastReflection_HourEpoch_messageType) New() protoreflect.Message { + return new(fastReflection_HourEpoch) +} +func (x fastReflection_HourEpoch_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_HourEpoch +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_HourEpoch) Descriptor() protoreflect.MessageDescriptor { + return md_HourEpoch +} + +// 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_HourEpoch) Type() protoreflect.MessageType { + return _fastReflection_HourEpoch_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_HourEpoch) New() protoreflect.Message { + return new(fastReflection_HourEpoch) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_HourEpoch) Interface() protoreflect.ProtoMessage { + return (*HourEpoch)(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_HourEpoch) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.EpochNumber != uint64(0) { + value := protoreflect.ValueOfUint64(x.EpochNumber) + if !f(fd_HourEpoch_epoch_number, value) { + return + } + } + if x.Duration != nil { + value := protoreflect.ValueOfMessage(x.Duration.ProtoReflect()) + if !f(fd_HourEpoch_duration, value) { + return + } + } + if x.EpochStartTime != nil { + value := protoreflect.ValueOfMessage(x.EpochStartTime.ProtoReflect()) + if !f(fd_HourEpoch_epoch_start_time, value) { + return + } + } + if x.EpochStartHeight != int64(0) { + value := protoreflect.ValueOfInt64(x.EpochStartHeight) + if !f(fd_HourEpoch_epoch_start_height, 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_HourEpoch) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.HourEpoch.epoch_number": + return x.EpochNumber != uint64(0) + case "ratelimit.v1.HourEpoch.duration": + return x.Duration != nil + case "ratelimit.v1.HourEpoch.epoch_start_time": + return x.EpochStartTime != nil + case "ratelimit.v1.HourEpoch.epoch_start_height": + return x.EpochStartHeight != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.HourEpoch")) + } + panic(fmt.Errorf("message ratelimit.v1.HourEpoch 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_HourEpoch) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.HourEpoch.epoch_number": + x.EpochNumber = uint64(0) + case "ratelimit.v1.HourEpoch.duration": + x.Duration = nil + case "ratelimit.v1.HourEpoch.epoch_start_time": + x.EpochStartTime = nil + case "ratelimit.v1.HourEpoch.epoch_start_height": + x.EpochStartHeight = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.HourEpoch")) + } + panic(fmt.Errorf("message ratelimit.v1.HourEpoch 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_HourEpoch) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.HourEpoch.epoch_number": + value := x.EpochNumber + return protoreflect.ValueOfUint64(value) + case "ratelimit.v1.HourEpoch.duration": + value := x.Duration + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "ratelimit.v1.HourEpoch.epoch_start_time": + value := x.EpochStartTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "ratelimit.v1.HourEpoch.epoch_start_height": + value := x.EpochStartHeight + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.HourEpoch")) + } + panic(fmt.Errorf("message ratelimit.v1.HourEpoch 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_HourEpoch) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.HourEpoch.epoch_number": + x.EpochNumber = value.Uint() + case "ratelimit.v1.HourEpoch.duration": + x.Duration = value.Message().Interface().(*durationpb.Duration) + case "ratelimit.v1.HourEpoch.epoch_start_time": + x.EpochStartTime = value.Message().Interface().(*timestamppb.Timestamp) + case "ratelimit.v1.HourEpoch.epoch_start_height": + x.EpochStartHeight = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.HourEpoch")) + } + panic(fmt.Errorf("message ratelimit.v1.HourEpoch 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_HourEpoch) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.HourEpoch.duration": + if x.Duration == nil { + x.Duration = new(durationpb.Duration) + } + return protoreflect.ValueOfMessage(x.Duration.ProtoReflect()) + case "ratelimit.v1.HourEpoch.epoch_start_time": + if x.EpochStartTime == nil { + x.EpochStartTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.EpochStartTime.ProtoReflect()) + case "ratelimit.v1.HourEpoch.epoch_number": + panic(fmt.Errorf("field epoch_number of message ratelimit.v1.HourEpoch is not mutable")) + case "ratelimit.v1.HourEpoch.epoch_start_height": + panic(fmt.Errorf("field epoch_start_height of message ratelimit.v1.HourEpoch is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.HourEpoch")) + } + panic(fmt.Errorf("message ratelimit.v1.HourEpoch 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_HourEpoch) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.HourEpoch.epoch_number": + return protoreflect.ValueOfUint64(uint64(0)) + case "ratelimit.v1.HourEpoch.duration": + m := new(durationpb.Duration) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "ratelimit.v1.HourEpoch.epoch_start_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "ratelimit.v1.HourEpoch.epoch_start_height": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.HourEpoch")) + } + panic(fmt.Errorf("message ratelimit.v1.HourEpoch 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_HourEpoch) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.HourEpoch", 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_HourEpoch) 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_HourEpoch) 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_HourEpoch) 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_HourEpoch) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*HourEpoch) + 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.EpochNumber != 0 { + n += 1 + runtime.Sov(uint64(x.EpochNumber)) + } + if x.Duration != nil { + l = options.Size(x.Duration) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.EpochStartTime != nil { + l = options.Size(x.EpochStartTime) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.EpochStartHeight != 0 { + n += 1 + runtime.Sov(uint64(x.EpochStartHeight)) + } + 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().(*HourEpoch) + 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.EpochStartHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.EpochStartHeight)) + i-- + dAtA[i] = 0x20 + } + if x.EpochStartTime != nil { + encoded, err := options.Marshal(x.EpochStartTime) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.Duration != nil { + encoded, err := options.Marshal(x.Duration) + 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 x.EpochNumber != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.EpochNumber)) + 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().(*HourEpoch) + 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: HourEpoch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: HourEpoch: 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 EpochNumber", wireType) + } + x.EpochNumber = 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.EpochNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Duration", 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.Duration == nil { + x.Duration = &durationpb.Duration{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Duration); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochStartTime", 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.EpochStartTime == nil { + x.EpochStartTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.EpochStartTime); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochStartHeight", wireType) + } + x.EpochStartHeight = 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.EpochStartHeight |= int64(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, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: ratelimit/v1/ratelimit.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// PacketDirection defines whether the transfer packet is being sent from +// this chain or is being received on this chain +type PacketDirection int32 + +const ( + PacketDirection_PACKET_SEND PacketDirection = 0 + PacketDirection_PACKET_RECV PacketDirection = 1 +) + +// Enum value maps for PacketDirection. +var ( + PacketDirection_name = map[int32]string{ + 0: "PACKET_SEND", + 1: "PACKET_RECV", + } + PacketDirection_value = map[string]int32{ + "PACKET_SEND": 0, + "PACKET_RECV": 1, + } +) + +func (x PacketDirection) Enum() *PacketDirection { + p := new(PacketDirection) + *p = x + return p +} + +func (x PacketDirection) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PacketDirection) Descriptor() protoreflect.EnumDescriptor { + return file_ratelimit_v1_ratelimit_proto_enumTypes[0].Descriptor() +} + +func (PacketDirection) Type() protoreflect.EnumType { + return &file_ratelimit_v1_ratelimit_proto_enumTypes[0] +} + +func (x PacketDirection) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PacketDirection.Descriptor instead. +func (PacketDirection) EnumDescriptor() ([]byte, []int) { + return file_ratelimit_v1_ratelimit_proto_rawDescGZIP(), []int{0} +} + +// Path holds the denom and channelID that define the rate limited route +type Path struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` +} + +func (x *Path) Reset() { + *x = Path{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_ratelimit_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Path) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Path) ProtoMessage() {} + +// Deprecated: Use Path.ProtoReflect.Descriptor instead. +func (*Path) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_ratelimit_proto_rawDescGZIP(), []int{0} +} + +func (x *Path) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *Path) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +// Quota defines the rate limit thresholds for transfer packets +type Quota struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MaxPercentSend defines the threshold for outflows + // The threshold is defined as a percentage (e.g. 10 indicates 10%) + MaxPercentSend string `protobuf:"bytes,1,opt,name=max_percent_send,json=maxPercentSend,proto3" json:"max_percent_send,omitempty"` + // MaxPercentSend defines the threshold for inflows + // The threshold is defined as a percentage (e.g. 10 indicates 10%) + MaxPercentRecv string `protobuf:"bytes,2,opt,name=max_percent_recv,json=maxPercentRecv,proto3" json:"max_percent_recv,omitempty"` + // DurationHours specifies the number of hours before the rate limit + // is reset (e.g. 24 indicates that the rate limit is reset each day) + DurationHours uint64 `protobuf:"varint,3,opt,name=duration_hours,json=durationHours,proto3" json:"duration_hours,omitempty"` +} + +func (x *Quota) Reset() { + *x = Quota{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_ratelimit_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Quota) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Quota) ProtoMessage() {} + +// Deprecated: Use Quota.ProtoReflect.Descriptor instead. +func (*Quota) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_ratelimit_proto_rawDescGZIP(), []int{1} +} + +func (x *Quota) GetMaxPercentSend() string { + if x != nil { + return x.MaxPercentSend + } + return "" +} + +func (x *Quota) GetMaxPercentRecv() string { + if x != nil { + return x.MaxPercentRecv + } + return "" +} + +func (x *Quota) GetDurationHours() uint64 { + if x != nil { + return x.DurationHours + } + return 0 +} + +type Flow struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Inflow defines the total amount of inbound transfers for the given + // rate limit in the current window + Inflow string `protobuf:"bytes,1,opt,name=inflow,proto3" json:"inflow,omitempty"` + // Outflow defines the total amount of outbound transfers for the given + // rate limit in the current window + Outflow string `protobuf:"bytes,2,opt,name=outflow,proto3" json:"outflow,omitempty"` + // ChannelValue stores the total supply of the denom at the start of + // the rate limit. This is used as the denominator when checking + // the rate limit threshold + // The ChannelValue is fixed for the duration of the rate limit window + ChannelValue string `protobuf:"bytes,3,opt,name=channel_value,json=channelValue,proto3" json:"channel_value,omitempty"` +} + +func (x *Flow) Reset() { + *x = Flow{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_ratelimit_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Flow) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Flow) ProtoMessage() {} + +// Deprecated: Use Flow.ProtoReflect.Descriptor instead. +func (*Flow) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_ratelimit_proto_rawDescGZIP(), []int{2} +} + +func (x *Flow) GetInflow() string { + if x != nil { + return x.Inflow + } + return "" +} + +func (x *Flow) GetOutflow() string { + if x != nil { + return x.Outflow + } + return "" +} + +func (x *Flow) GetChannelValue() string { + if x != nil { + return x.ChannelValue + } + return "" +} + +// RateLimit stores all the context about a given rate limit, including +// the relevant denom and channel, rate limit thresholds, and current +// progress towards the limits +type RateLimit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path *Path `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Quota *Quota `protobuf:"bytes,2,opt,name=quota,proto3" json:"quota,omitempty"` + Flow *Flow `protobuf:"bytes,3,opt,name=flow,proto3" json:"flow,omitempty"` +} + +func (x *RateLimit) Reset() { + *x = RateLimit{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_ratelimit_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimit) ProtoMessage() {} + +// Deprecated: Use RateLimit.ProtoReflect.Descriptor instead. +func (*RateLimit) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_ratelimit_proto_rawDescGZIP(), []int{3} +} + +func (x *RateLimit) GetPath() *Path { + if x != nil { + return x.Path + } + return nil +} + +func (x *RateLimit) GetQuota() *Quota { + if x != nil { + return x.Quota + } + return nil +} + +func (x *RateLimit) GetFlow() *Flow { + if x != nil { + return x.Flow + } + return nil +} + +// WhitelistedAddressPair represents a sender-receiver combo that is +// not subject to rate limit restrictions +type WhitelistedAddressPair struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` +} + +func (x *WhitelistedAddressPair) Reset() { + *x = WhitelistedAddressPair{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_ratelimit_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WhitelistedAddressPair) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WhitelistedAddressPair) ProtoMessage() {} + +// Deprecated: Use WhitelistedAddressPair.ProtoReflect.Descriptor instead. +func (*WhitelistedAddressPair) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_ratelimit_proto_rawDescGZIP(), []int{4} +} + +func (x *WhitelistedAddressPair) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *WhitelistedAddressPair) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +type HourEpoch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EpochNumber uint64 `protobuf:"varint,1,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` + Duration *durationpb.Duration `protobuf:"bytes,2,opt,name=duration,proto3" json:"duration,omitempty"` + EpochStartTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=epoch_start_time,json=epochStartTime,proto3" json:"epoch_start_time,omitempty"` + EpochStartHeight int64 `protobuf:"varint,4,opt,name=epoch_start_height,json=epochStartHeight,proto3" json:"epoch_start_height,omitempty"` +} + +func (x *HourEpoch) Reset() { + *x = HourEpoch{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_ratelimit_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HourEpoch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HourEpoch) ProtoMessage() {} + +// Deprecated: Use HourEpoch.ProtoReflect.Descriptor instead. +func (*HourEpoch) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_ratelimit_proto_rawDescGZIP(), []int{5} +} + +func (x *HourEpoch) GetEpochNumber() uint64 { + if x != nil { + return x.EpochNumber + } + return 0 +} + +func (x *HourEpoch) GetDuration() *durationpb.Duration { + if x != nil { + return x.Duration + } + return nil +} + +func (x *HourEpoch) GetEpochStartTime() *timestamppb.Timestamp { + if x != nil { + return x.EpochStartTime + } + return nil +} + +func (x *HourEpoch) GetEpochStartHeight() int64 { + if x != nil { + return x.EpochStartHeight + } + return 0 +} + +var File_ratelimit_v1_ratelimit_proto protoreflect.FileDescriptor + +var file_ratelimit_v1_ratelimit_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x72, + 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, + 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x04, 0x50, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x64, + 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, + 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, + 0x22, 0xc0, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x47, 0x0a, 0x10, 0x6d, 0x61, + 0x78, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, + 0x49, 0x6e, 0x74, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x53, + 0x65, 0x6e, 0x64, 0x12, 0x47, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, + 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, + 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0e, 0x6d, 0x61, + 0x78, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x76, 0x12, 0x25, 0x0a, 0x0e, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x75, 0x72, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x6f, + 0x75, 0x72, 0x73, 0x22, 0xba, 0x01, 0x0a, 0x04, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x35, 0x0a, 0x06, + 0x69, 0x6e, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, + 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x69, 0x6e, 0x66, + 0x6c, 0x6f, 0x77, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, + 0x49, 0x6e, 0x74, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x42, 0x0a, 0x0d, + 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, + 0x6e, 0x74, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0x86, 0x01, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x26, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x72, + 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x74, 0x68, + 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x29, 0x0a, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, + 0x61, 0x12, 0x26, 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x4c, 0x0a, 0x16, 0x57, 0x68, 0x69, + 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, + 0x61, 0x69, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x22, 0x83, 0x02, 0x0a, 0x09, 0x48, 0x6f, 0x75, 0x72, + 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x65, 0x70, 0x6f, + 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x1e, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x12, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, + 0x79, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x4e, 0x0a, 0x10, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, + 0x0e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x2c, 0x0a, 0x12, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x65, 0x70, 0x6f, + 0x63, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x2a, 0x39, 0x0a, + 0x0f, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x10, + 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x45, 0x43, 0x56, + 0x10, 0x01, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xc5, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, + 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, + 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x69, 0x62, 0x63, 0x2d, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x73, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x2d, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, + 0x67, 0x2f, 0x76, 0x38, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x52, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x0d, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ratelimit_v1_ratelimit_proto_rawDescOnce sync.Once + file_ratelimit_v1_ratelimit_proto_rawDescData = file_ratelimit_v1_ratelimit_proto_rawDesc +) + +func file_ratelimit_v1_ratelimit_proto_rawDescGZIP() []byte { + file_ratelimit_v1_ratelimit_proto_rawDescOnce.Do(func() { + file_ratelimit_v1_ratelimit_proto_rawDescData = protoimpl.X.CompressGZIP(file_ratelimit_v1_ratelimit_proto_rawDescData) + }) + return file_ratelimit_v1_ratelimit_proto_rawDescData +} + +var file_ratelimit_v1_ratelimit_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_ratelimit_v1_ratelimit_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_ratelimit_v1_ratelimit_proto_goTypes = []interface{}{ + (PacketDirection)(0), // 0: ratelimit.v1.PacketDirection + (*Path)(nil), // 1: ratelimit.v1.Path + (*Quota)(nil), // 2: ratelimit.v1.Quota + (*Flow)(nil), // 3: ratelimit.v1.Flow + (*RateLimit)(nil), // 4: ratelimit.v1.RateLimit + (*WhitelistedAddressPair)(nil), // 5: ratelimit.v1.WhitelistedAddressPair + (*HourEpoch)(nil), // 6: ratelimit.v1.HourEpoch + (*durationpb.Duration)(nil), // 7: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp +} +var file_ratelimit_v1_ratelimit_proto_depIdxs = []int32{ + 1, // 0: ratelimit.v1.RateLimit.path:type_name -> ratelimit.v1.Path + 2, // 1: ratelimit.v1.RateLimit.quota:type_name -> ratelimit.v1.Quota + 3, // 2: ratelimit.v1.RateLimit.flow:type_name -> ratelimit.v1.Flow + 7, // 3: ratelimit.v1.HourEpoch.duration:type_name -> google.protobuf.Duration + 8, // 4: ratelimit.v1.HourEpoch.epoch_start_time:type_name -> google.protobuf.Timestamp + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_ratelimit_v1_ratelimit_proto_init() } +func file_ratelimit_v1_ratelimit_proto_init() { + if File_ratelimit_v1_ratelimit_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ratelimit_v1_ratelimit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Path); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_ratelimit_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Quota); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_ratelimit_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Flow); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_ratelimit_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_ratelimit_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WhitelistedAddressPair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_ratelimit_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HourEpoch); 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{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ratelimit_v1_ratelimit_proto_rawDesc, + NumEnums: 1, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ratelimit_v1_ratelimit_proto_goTypes, + DependencyIndexes: file_ratelimit_v1_ratelimit_proto_depIdxs, + EnumInfos: file_ratelimit_v1_ratelimit_proto_enumTypes, + MessageInfos: file_ratelimit_v1_ratelimit_proto_msgTypes, + }.Build() + File_ratelimit_v1_ratelimit_proto = out.File + file_ratelimit_v1_ratelimit_proto_rawDesc = nil + file_ratelimit_v1_ratelimit_proto_goTypes = nil + file_ratelimit_v1_ratelimit_proto_depIdxs = nil +} diff --git a/api/ratelimit/v1/tx.pulsar.go b/api/ratelimit/v1/tx.pulsar.go new file mode 100644 index 0000000..2d0389f --- /dev/null +++ b/api/ratelimit/v1/tx.pulsar.go @@ -0,0 +1,4673 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package ratelimitv1 + +import ( + _ "cosmossdk.io/api/amino" + _ "cosmossdk.io/api/cosmos/msg/v1" + 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" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_MsgAddRateLimit protoreflect.MessageDescriptor + fd_MsgAddRateLimit_authority protoreflect.FieldDescriptor + fd_MsgAddRateLimit_denom protoreflect.FieldDescriptor + fd_MsgAddRateLimit_channel_id protoreflect.FieldDescriptor + fd_MsgAddRateLimit_max_percent_send protoreflect.FieldDescriptor + fd_MsgAddRateLimit_max_percent_recv protoreflect.FieldDescriptor + fd_MsgAddRateLimit_duration_hours protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_tx_proto_init() + md_MsgAddRateLimit = File_ratelimit_v1_tx_proto.Messages().ByName("MsgAddRateLimit") + fd_MsgAddRateLimit_authority = md_MsgAddRateLimit.Fields().ByName("authority") + fd_MsgAddRateLimit_denom = md_MsgAddRateLimit.Fields().ByName("denom") + fd_MsgAddRateLimit_channel_id = md_MsgAddRateLimit.Fields().ByName("channel_id") + fd_MsgAddRateLimit_max_percent_send = md_MsgAddRateLimit.Fields().ByName("max_percent_send") + fd_MsgAddRateLimit_max_percent_recv = md_MsgAddRateLimit.Fields().ByName("max_percent_recv") + fd_MsgAddRateLimit_duration_hours = md_MsgAddRateLimit.Fields().ByName("duration_hours") +} + +var _ protoreflect.Message = (*fastReflection_MsgAddRateLimit)(nil) + +type fastReflection_MsgAddRateLimit MsgAddRateLimit + +func (x *MsgAddRateLimit) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAddRateLimit)(x) +} + +func (x *MsgAddRateLimit) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_tx_proto_msgTypes[0] + 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_MsgAddRateLimit_messageType fastReflection_MsgAddRateLimit_messageType +var _ protoreflect.MessageType = fastReflection_MsgAddRateLimit_messageType{} + +type fastReflection_MsgAddRateLimit_messageType struct{} + +func (x fastReflection_MsgAddRateLimit_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAddRateLimit)(nil) +} +func (x fastReflection_MsgAddRateLimit_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAddRateLimit) +} +func (x fastReflection_MsgAddRateLimit_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAddRateLimit +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgAddRateLimit) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAddRateLimit +} + +// 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_MsgAddRateLimit) Type() protoreflect.MessageType { + return _fastReflection_MsgAddRateLimit_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgAddRateLimit) New() protoreflect.Message { + return new(fastReflection_MsgAddRateLimit) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgAddRateLimit) Interface() protoreflect.ProtoMessage { + return (*MsgAddRateLimit)(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_MsgAddRateLimit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgAddRateLimit_authority, value) { + return + } + } + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_MsgAddRateLimit_denom, value) { + return + } + } + if x.ChannelId != "" { + value := protoreflect.ValueOfString(x.ChannelId) + if !f(fd_MsgAddRateLimit_channel_id, value) { + return + } + } + if x.MaxPercentSend != "" { + value := protoreflect.ValueOfString(x.MaxPercentSend) + if !f(fd_MsgAddRateLimit_max_percent_send, value) { + return + } + } + if x.MaxPercentRecv != "" { + value := protoreflect.ValueOfString(x.MaxPercentRecv) + if !f(fd_MsgAddRateLimit_max_percent_recv, value) { + return + } + } + if x.DurationHours != uint64(0) { + value := protoreflect.ValueOfUint64(x.DurationHours) + if !f(fd_MsgAddRateLimit_duration_hours, 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_MsgAddRateLimit) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.MsgAddRateLimit.authority": + return x.Authority != "" + case "ratelimit.v1.MsgAddRateLimit.denom": + return x.Denom != "" + case "ratelimit.v1.MsgAddRateLimit.channel_id": + return x.ChannelId != "" + case "ratelimit.v1.MsgAddRateLimit.max_percent_send": + return x.MaxPercentSend != "" + case "ratelimit.v1.MsgAddRateLimit.max_percent_recv": + return x.MaxPercentRecv != "" + case "ratelimit.v1.MsgAddRateLimit.duration_hours": + return x.DurationHours != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgAddRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgAddRateLimit 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_MsgAddRateLimit) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.MsgAddRateLimit.authority": + x.Authority = "" + case "ratelimit.v1.MsgAddRateLimit.denom": + x.Denom = "" + case "ratelimit.v1.MsgAddRateLimit.channel_id": + x.ChannelId = "" + case "ratelimit.v1.MsgAddRateLimit.max_percent_send": + x.MaxPercentSend = "" + case "ratelimit.v1.MsgAddRateLimit.max_percent_recv": + x.MaxPercentRecv = "" + case "ratelimit.v1.MsgAddRateLimit.duration_hours": + x.DurationHours = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgAddRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgAddRateLimit 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_MsgAddRateLimit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.MsgAddRateLimit.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "ratelimit.v1.MsgAddRateLimit.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + case "ratelimit.v1.MsgAddRateLimit.channel_id": + value := x.ChannelId + return protoreflect.ValueOfString(value) + case "ratelimit.v1.MsgAddRateLimit.max_percent_send": + value := x.MaxPercentSend + return protoreflect.ValueOfString(value) + case "ratelimit.v1.MsgAddRateLimit.max_percent_recv": + value := x.MaxPercentRecv + return protoreflect.ValueOfString(value) + case "ratelimit.v1.MsgAddRateLimit.duration_hours": + value := x.DurationHours + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgAddRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgAddRateLimit 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_MsgAddRateLimit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.MsgAddRateLimit.authority": + x.Authority = value.Interface().(string) + case "ratelimit.v1.MsgAddRateLimit.denom": + x.Denom = value.Interface().(string) + case "ratelimit.v1.MsgAddRateLimit.channel_id": + x.ChannelId = value.Interface().(string) + case "ratelimit.v1.MsgAddRateLimit.max_percent_send": + x.MaxPercentSend = value.Interface().(string) + case "ratelimit.v1.MsgAddRateLimit.max_percent_recv": + x.MaxPercentRecv = value.Interface().(string) + case "ratelimit.v1.MsgAddRateLimit.duration_hours": + x.DurationHours = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgAddRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgAddRateLimit 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_MsgAddRateLimit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.MsgAddRateLimit.authority": + panic(fmt.Errorf("field authority of message ratelimit.v1.MsgAddRateLimit is not mutable")) + case "ratelimit.v1.MsgAddRateLimit.denom": + panic(fmt.Errorf("field denom of message ratelimit.v1.MsgAddRateLimit is not mutable")) + case "ratelimit.v1.MsgAddRateLimit.channel_id": + panic(fmt.Errorf("field channel_id of message ratelimit.v1.MsgAddRateLimit is not mutable")) + case "ratelimit.v1.MsgAddRateLimit.max_percent_send": + panic(fmt.Errorf("field max_percent_send of message ratelimit.v1.MsgAddRateLimit is not mutable")) + case "ratelimit.v1.MsgAddRateLimit.max_percent_recv": + panic(fmt.Errorf("field max_percent_recv of message ratelimit.v1.MsgAddRateLimit is not mutable")) + case "ratelimit.v1.MsgAddRateLimit.duration_hours": + panic(fmt.Errorf("field duration_hours of message ratelimit.v1.MsgAddRateLimit is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgAddRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgAddRateLimit 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_MsgAddRateLimit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.MsgAddRateLimit.authority": + return protoreflect.ValueOfString("") + case "ratelimit.v1.MsgAddRateLimit.denom": + return protoreflect.ValueOfString("") + case "ratelimit.v1.MsgAddRateLimit.channel_id": + return protoreflect.ValueOfString("") + case "ratelimit.v1.MsgAddRateLimit.max_percent_send": + return protoreflect.ValueOfString("") + case "ratelimit.v1.MsgAddRateLimit.max_percent_recv": + return protoreflect.ValueOfString("") + case "ratelimit.v1.MsgAddRateLimit.duration_hours": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgAddRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgAddRateLimit 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_MsgAddRateLimit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.MsgAddRateLimit", 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_MsgAddRateLimit) 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_MsgAddRateLimit) 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_MsgAddRateLimit) 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_MsgAddRateLimit) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgAddRateLimit) + 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)) + } + l = len(x.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChannelId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.MaxPercentSend) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.MaxPercentRecv) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.DurationHours != 0 { + n += 1 + runtime.Sov(uint64(x.DurationHours)) + } + 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().(*MsgAddRateLimit) + 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.DurationHours != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.DurationHours)) + i-- + dAtA[i] = 0x30 + } + if len(x.MaxPercentRecv) > 0 { + i -= len(x.MaxPercentRecv) + copy(dAtA[i:], x.MaxPercentRecv) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxPercentRecv))) + i-- + dAtA[i] = 0x2a + } + if len(x.MaxPercentSend) > 0 { + i -= len(x.MaxPercentSend) + copy(dAtA[i:], x.MaxPercentSend) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxPercentSend))) + i-- + dAtA[i] = 0x22 + } + if len(x.ChannelId) > 0 { + i -= len(x.ChannelId) + copy(dAtA[i:], x.ChannelId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChannelId))) + i-- + dAtA[i] = 0x1a + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + 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().(*MsgAddRateLimit) + 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: MsgAddRateLimit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddRateLimit: 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 Denom", 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.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChannelId", 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.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxPercentSend", 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.MaxPercentSend = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxPercentRecv", 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.MaxPercentRecv = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DurationHours", wireType) + } + x.DurationHours = 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.DurationHours |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgAddRateLimitResponse protoreflect.MessageDescriptor +) + +func init() { + file_ratelimit_v1_tx_proto_init() + md_MsgAddRateLimitResponse = File_ratelimit_v1_tx_proto.Messages().ByName("MsgAddRateLimitResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgAddRateLimitResponse)(nil) + +type fastReflection_MsgAddRateLimitResponse MsgAddRateLimitResponse + +func (x *MsgAddRateLimitResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAddRateLimitResponse)(x) +} + +func (x *MsgAddRateLimitResponse) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_tx_proto_msgTypes[1] + 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_MsgAddRateLimitResponse_messageType fastReflection_MsgAddRateLimitResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgAddRateLimitResponse_messageType{} + +type fastReflection_MsgAddRateLimitResponse_messageType struct{} + +func (x fastReflection_MsgAddRateLimitResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAddRateLimitResponse)(nil) +} +func (x fastReflection_MsgAddRateLimitResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAddRateLimitResponse) +} +func (x fastReflection_MsgAddRateLimitResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAddRateLimitResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgAddRateLimitResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAddRateLimitResponse +} + +// 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_MsgAddRateLimitResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgAddRateLimitResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgAddRateLimitResponse) New() protoreflect.Message { + return new(fastReflection_MsgAddRateLimitResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgAddRateLimitResponse) Interface() protoreflect.ProtoMessage { + return (*MsgAddRateLimitResponse)(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_MsgAddRateLimitResponse) 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_MsgAddRateLimitResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgAddRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgAddRateLimitResponse 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_MsgAddRateLimitResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgAddRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgAddRateLimitResponse 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_MsgAddRateLimitResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgAddRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgAddRateLimitResponse 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_MsgAddRateLimitResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgAddRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgAddRateLimitResponse 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_MsgAddRateLimitResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgAddRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgAddRateLimitResponse 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_MsgAddRateLimitResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgAddRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgAddRateLimitResponse 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_MsgAddRateLimitResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.MsgAddRateLimitResponse", 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_MsgAddRateLimitResponse) 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_MsgAddRateLimitResponse) 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_MsgAddRateLimitResponse) 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_MsgAddRateLimitResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgAddRateLimitResponse) + 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().(*MsgAddRateLimitResponse) + 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().(*MsgAddRateLimitResponse) + 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: MsgAddRateLimitResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddRateLimitResponse: 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_MsgUpdateRateLimit protoreflect.MessageDescriptor + fd_MsgUpdateRateLimit_authority protoreflect.FieldDescriptor + fd_MsgUpdateRateLimit_denom protoreflect.FieldDescriptor + fd_MsgUpdateRateLimit_channel_id protoreflect.FieldDescriptor + fd_MsgUpdateRateLimit_max_percent_send protoreflect.FieldDescriptor + fd_MsgUpdateRateLimit_max_percent_recv protoreflect.FieldDescriptor + fd_MsgUpdateRateLimit_duration_hours protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_tx_proto_init() + md_MsgUpdateRateLimit = File_ratelimit_v1_tx_proto.Messages().ByName("MsgUpdateRateLimit") + fd_MsgUpdateRateLimit_authority = md_MsgUpdateRateLimit.Fields().ByName("authority") + fd_MsgUpdateRateLimit_denom = md_MsgUpdateRateLimit.Fields().ByName("denom") + fd_MsgUpdateRateLimit_channel_id = md_MsgUpdateRateLimit.Fields().ByName("channel_id") + fd_MsgUpdateRateLimit_max_percent_send = md_MsgUpdateRateLimit.Fields().ByName("max_percent_send") + fd_MsgUpdateRateLimit_max_percent_recv = md_MsgUpdateRateLimit.Fields().ByName("max_percent_recv") + fd_MsgUpdateRateLimit_duration_hours = md_MsgUpdateRateLimit.Fields().ByName("duration_hours") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateRateLimit)(nil) + +type fastReflection_MsgUpdateRateLimit MsgUpdateRateLimit + +func (x *MsgUpdateRateLimit) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateRateLimit)(x) +} + +func (x *MsgUpdateRateLimit) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_tx_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateRateLimit_messageType fastReflection_MsgUpdateRateLimit_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateRateLimit_messageType{} + +type fastReflection_MsgUpdateRateLimit_messageType struct{} + +func (x fastReflection_MsgUpdateRateLimit_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateRateLimit)(nil) +} +func (x fastReflection_MsgUpdateRateLimit_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateRateLimit) +} +func (x fastReflection_MsgUpdateRateLimit_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateRateLimit +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateRateLimit) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateRateLimit +} + +// 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_MsgUpdateRateLimit) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateRateLimit_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateRateLimit) New() protoreflect.Message { + return new(fastReflection_MsgUpdateRateLimit) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateRateLimit) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateRateLimit)(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_MsgUpdateRateLimit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgUpdateRateLimit_authority, value) { + return + } + } + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_MsgUpdateRateLimit_denom, value) { + return + } + } + if x.ChannelId != "" { + value := protoreflect.ValueOfString(x.ChannelId) + if !f(fd_MsgUpdateRateLimit_channel_id, value) { + return + } + } + if x.MaxPercentSend != "" { + value := protoreflect.ValueOfString(x.MaxPercentSend) + if !f(fd_MsgUpdateRateLimit_max_percent_send, value) { + return + } + } + if x.MaxPercentRecv != "" { + value := protoreflect.ValueOfString(x.MaxPercentRecv) + if !f(fd_MsgUpdateRateLimit_max_percent_recv, value) { + return + } + } + if x.DurationHours != uint64(0) { + value := protoreflect.ValueOfUint64(x.DurationHours) + if !f(fd_MsgUpdateRateLimit_duration_hours, 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_MsgUpdateRateLimit) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.MsgUpdateRateLimit.authority": + return x.Authority != "" + case "ratelimit.v1.MsgUpdateRateLimit.denom": + return x.Denom != "" + case "ratelimit.v1.MsgUpdateRateLimit.channel_id": + return x.ChannelId != "" + case "ratelimit.v1.MsgUpdateRateLimit.max_percent_send": + return x.MaxPercentSend != "" + case "ratelimit.v1.MsgUpdateRateLimit.max_percent_recv": + return x.MaxPercentRecv != "" + case "ratelimit.v1.MsgUpdateRateLimit.duration_hours": + return x.DurationHours != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgUpdateRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgUpdateRateLimit 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_MsgUpdateRateLimit) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.MsgUpdateRateLimit.authority": + x.Authority = "" + case "ratelimit.v1.MsgUpdateRateLimit.denom": + x.Denom = "" + case "ratelimit.v1.MsgUpdateRateLimit.channel_id": + x.ChannelId = "" + case "ratelimit.v1.MsgUpdateRateLimit.max_percent_send": + x.MaxPercentSend = "" + case "ratelimit.v1.MsgUpdateRateLimit.max_percent_recv": + x.MaxPercentRecv = "" + case "ratelimit.v1.MsgUpdateRateLimit.duration_hours": + x.DurationHours = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgUpdateRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgUpdateRateLimit 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_MsgUpdateRateLimit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.MsgUpdateRateLimit.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "ratelimit.v1.MsgUpdateRateLimit.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + case "ratelimit.v1.MsgUpdateRateLimit.channel_id": + value := x.ChannelId + return protoreflect.ValueOfString(value) + case "ratelimit.v1.MsgUpdateRateLimit.max_percent_send": + value := x.MaxPercentSend + return protoreflect.ValueOfString(value) + case "ratelimit.v1.MsgUpdateRateLimit.max_percent_recv": + value := x.MaxPercentRecv + return protoreflect.ValueOfString(value) + case "ratelimit.v1.MsgUpdateRateLimit.duration_hours": + value := x.DurationHours + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgUpdateRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgUpdateRateLimit 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_MsgUpdateRateLimit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.MsgUpdateRateLimit.authority": + x.Authority = value.Interface().(string) + case "ratelimit.v1.MsgUpdateRateLimit.denom": + x.Denom = value.Interface().(string) + case "ratelimit.v1.MsgUpdateRateLimit.channel_id": + x.ChannelId = value.Interface().(string) + case "ratelimit.v1.MsgUpdateRateLimit.max_percent_send": + x.MaxPercentSend = value.Interface().(string) + case "ratelimit.v1.MsgUpdateRateLimit.max_percent_recv": + x.MaxPercentRecv = value.Interface().(string) + case "ratelimit.v1.MsgUpdateRateLimit.duration_hours": + x.DurationHours = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgUpdateRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgUpdateRateLimit 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_MsgUpdateRateLimit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.MsgUpdateRateLimit.authority": + panic(fmt.Errorf("field authority of message ratelimit.v1.MsgUpdateRateLimit is not mutable")) + case "ratelimit.v1.MsgUpdateRateLimit.denom": + panic(fmt.Errorf("field denom of message ratelimit.v1.MsgUpdateRateLimit is not mutable")) + case "ratelimit.v1.MsgUpdateRateLimit.channel_id": + panic(fmt.Errorf("field channel_id of message ratelimit.v1.MsgUpdateRateLimit is not mutable")) + case "ratelimit.v1.MsgUpdateRateLimit.max_percent_send": + panic(fmt.Errorf("field max_percent_send of message ratelimit.v1.MsgUpdateRateLimit is not mutable")) + case "ratelimit.v1.MsgUpdateRateLimit.max_percent_recv": + panic(fmt.Errorf("field max_percent_recv of message ratelimit.v1.MsgUpdateRateLimit is not mutable")) + case "ratelimit.v1.MsgUpdateRateLimit.duration_hours": + panic(fmt.Errorf("field duration_hours of message ratelimit.v1.MsgUpdateRateLimit is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgUpdateRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgUpdateRateLimit 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_MsgUpdateRateLimit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.MsgUpdateRateLimit.authority": + return protoreflect.ValueOfString("") + case "ratelimit.v1.MsgUpdateRateLimit.denom": + return protoreflect.ValueOfString("") + case "ratelimit.v1.MsgUpdateRateLimit.channel_id": + return protoreflect.ValueOfString("") + case "ratelimit.v1.MsgUpdateRateLimit.max_percent_send": + return protoreflect.ValueOfString("") + case "ratelimit.v1.MsgUpdateRateLimit.max_percent_recv": + return protoreflect.ValueOfString("") + case "ratelimit.v1.MsgUpdateRateLimit.duration_hours": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgUpdateRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgUpdateRateLimit 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_MsgUpdateRateLimit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.MsgUpdateRateLimit", 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_MsgUpdateRateLimit) 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_MsgUpdateRateLimit) 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_MsgUpdateRateLimit) 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_MsgUpdateRateLimit) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateRateLimit) + 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)) + } + l = len(x.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChannelId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.MaxPercentSend) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.MaxPercentRecv) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.DurationHours != 0 { + n += 1 + runtime.Sov(uint64(x.DurationHours)) + } + 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().(*MsgUpdateRateLimit) + 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.DurationHours != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.DurationHours)) + i-- + dAtA[i] = 0x30 + } + if len(x.MaxPercentRecv) > 0 { + i -= len(x.MaxPercentRecv) + copy(dAtA[i:], x.MaxPercentRecv) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxPercentRecv))) + i-- + dAtA[i] = 0x2a + } + if len(x.MaxPercentSend) > 0 { + i -= len(x.MaxPercentSend) + copy(dAtA[i:], x.MaxPercentSend) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxPercentSend))) + i-- + dAtA[i] = 0x22 + } + if len(x.ChannelId) > 0 { + i -= len(x.ChannelId) + copy(dAtA[i:], x.ChannelId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChannelId))) + i-- + dAtA[i] = 0x1a + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + 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().(*MsgUpdateRateLimit) + 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: MsgUpdateRateLimit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateRateLimit: 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 Denom", 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.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChannelId", 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.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxPercentSend", 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.MaxPercentSend = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxPercentRecv", 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.MaxPercentRecv = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DurationHours", wireType) + } + x.DurationHours = 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.DurationHours |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateRateLimitResponse protoreflect.MessageDescriptor +) + +func init() { + file_ratelimit_v1_tx_proto_init() + md_MsgUpdateRateLimitResponse = File_ratelimit_v1_tx_proto.Messages().ByName("MsgUpdateRateLimitResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateRateLimitResponse)(nil) + +type fastReflection_MsgUpdateRateLimitResponse MsgUpdateRateLimitResponse + +func (x *MsgUpdateRateLimitResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateRateLimitResponse)(x) +} + +func (x *MsgUpdateRateLimitResponse) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_tx_proto_msgTypes[3] + 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_MsgUpdateRateLimitResponse_messageType fastReflection_MsgUpdateRateLimitResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateRateLimitResponse_messageType{} + +type fastReflection_MsgUpdateRateLimitResponse_messageType struct{} + +func (x fastReflection_MsgUpdateRateLimitResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateRateLimitResponse)(nil) +} +func (x fastReflection_MsgUpdateRateLimitResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateRateLimitResponse) +} +func (x fastReflection_MsgUpdateRateLimitResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateRateLimitResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateRateLimitResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateRateLimitResponse +} + +// 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_MsgUpdateRateLimitResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateRateLimitResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateRateLimitResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateRateLimitResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateRateLimitResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateRateLimitResponse)(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_MsgUpdateRateLimitResponse) 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_MsgUpdateRateLimitResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgUpdateRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgUpdateRateLimitResponse 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_MsgUpdateRateLimitResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgUpdateRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgUpdateRateLimitResponse 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_MsgUpdateRateLimitResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgUpdateRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgUpdateRateLimitResponse 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_MsgUpdateRateLimitResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgUpdateRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgUpdateRateLimitResponse 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_MsgUpdateRateLimitResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgUpdateRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgUpdateRateLimitResponse 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_MsgUpdateRateLimitResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgUpdateRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgUpdateRateLimitResponse 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_MsgUpdateRateLimitResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.MsgUpdateRateLimitResponse", 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_MsgUpdateRateLimitResponse) 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_MsgUpdateRateLimitResponse) 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_MsgUpdateRateLimitResponse) 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_MsgUpdateRateLimitResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateRateLimitResponse) + 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().(*MsgUpdateRateLimitResponse) + 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().(*MsgUpdateRateLimitResponse) + 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: MsgUpdateRateLimitResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateRateLimitResponse: 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_MsgRemoveRateLimit protoreflect.MessageDescriptor + fd_MsgRemoveRateLimit_authority protoreflect.FieldDescriptor + fd_MsgRemoveRateLimit_denom protoreflect.FieldDescriptor + fd_MsgRemoveRateLimit_channel_id protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_tx_proto_init() + md_MsgRemoveRateLimit = File_ratelimit_v1_tx_proto.Messages().ByName("MsgRemoveRateLimit") + fd_MsgRemoveRateLimit_authority = md_MsgRemoveRateLimit.Fields().ByName("authority") + fd_MsgRemoveRateLimit_denom = md_MsgRemoveRateLimit.Fields().ByName("denom") + fd_MsgRemoveRateLimit_channel_id = md_MsgRemoveRateLimit.Fields().ByName("channel_id") +} + +var _ protoreflect.Message = (*fastReflection_MsgRemoveRateLimit)(nil) + +type fastReflection_MsgRemoveRateLimit MsgRemoveRateLimit + +func (x *MsgRemoveRateLimit) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRemoveRateLimit)(x) +} + +func (x *MsgRemoveRateLimit) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_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_MsgRemoveRateLimit_messageType fastReflection_MsgRemoveRateLimit_messageType +var _ protoreflect.MessageType = fastReflection_MsgRemoveRateLimit_messageType{} + +type fastReflection_MsgRemoveRateLimit_messageType struct{} + +func (x fastReflection_MsgRemoveRateLimit_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRemoveRateLimit)(nil) +} +func (x fastReflection_MsgRemoveRateLimit_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRemoveRateLimit) +} +func (x fastReflection_MsgRemoveRateLimit_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRemoveRateLimit +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRemoveRateLimit) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRemoveRateLimit +} + +// 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_MsgRemoveRateLimit) Type() protoreflect.MessageType { + return _fastReflection_MsgRemoveRateLimit_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRemoveRateLimit) New() protoreflect.Message { + return new(fastReflection_MsgRemoveRateLimit) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRemoveRateLimit) Interface() protoreflect.ProtoMessage { + return (*MsgRemoveRateLimit)(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_MsgRemoveRateLimit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgRemoveRateLimit_authority, value) { + return + } + } + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_MsgRemoveRateLimit_denom, value) { + return + } + } + if x.ChannelId != "" { + value := protoreflect.ValueOfString(x.ChannelId) + if !f(fd_MsgRemoveRateLimit_channel_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRemoveRateLimit) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.MsgRemoveRateLimit.authority": + return x.Authority != "" + case "ratelimit.v1.MsgRemoveRateLimit.denom": + return x.Denom != "" + case "ratelimit.v1.MsgRemoveRateLimit.channel_id": + return x.ChannelId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgRemoveRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgRemoveRateLimit 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_MsgRemoveRateLimit) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.MsgRemoveRateLimit.authority": + x.Authority = "" + case "ratelimit.v1.MsgRemoveRateLimit.denom": + x.Denom = "" + case "ratelimit.v1.MsgRemoveRateLimit.channel_id": + x.ChannelId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgRemoveRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgRemoveRateLimit 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_MsgRemoveRateLimit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.MsgRemoveRateLimit.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "ratelimit.v1.MsgRemoveRateLimit.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + case "ratelimit.v1.MsgRemoveRateLimit.channel_id": + value := x.ChannelId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgRemoveRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgRemoveRateLimit 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_MsgRemoveRateLimit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.MsgRemoveRateLimit.authority": + x.Authority = value.Interface().(string) + case "ratelimit.v1.MsgRemoveRateLimit.denom": + x.Denom = value.Interface().(string) + case "ratelimit.v1.MsgRemoveRateLimit.channel_id": + x.ChannelId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgRemoveRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgRemoveRateLimit 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_MsgRemoveRateLimit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.MsgRemoveRateLimit.authority": + panic(fmt.Errorf("field authority of message ratelimit.v1.MsgRemoveRateLimit is not mutable")) + case "ratelimit.v1.MsgRemoveRateLimit.denom": + panic(fmt.Errorf("field denom of message ratelimit.v1.MsgRemoveRateLimit is not mutable")) + case "ratelimit.v1.MsgRemoveRateLimit.channel_id": + panic(fmt.Errorf("field channel_id of message ratelimit.v1.MsgRemoveRateLimit is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgRemoveRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgRemoveRateLimit 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_MsgRemoveRateLimit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.MsgRemoveRateLimit.authority": + return protoreflect.ValueOfString("") + case "ratelimit.v1.MsgRemoveRateLimit.denom": + return protoreflect.ValueOfString("") + case "ratelimit.v1.MsgRemoveRateLimit.channel_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgRemoveRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgRemoveRateLimit 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_MsgRemoveRateLimit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.MsgRemoveRateLimit", 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_MsgRemoveRateLimit) 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_MsgRemoveRateLimit) 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_MsgRemoveRateLimit) 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_MsgRemoveRateLimit) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRemoveRateLimit) + 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)) + } + l = len(x.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChannelId) + 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().(*MsgRemoveRateLimit) + 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.ChannelId) > 0 { + i -= len(x.ChannelId) + copy(dAtA[i:], x.ChannelId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChannelId))) + i-- + dAtA[i] = 0x1a + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + 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().(*MsgRemoveRateLimit) + 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: MsgRemoveRateLimit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveRateLimit: 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 Denom", 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.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChannelId", 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.ChannelId = 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_MsgRemoveRateLimitResponse protoreflect.MessageDescriptor +) + +func init() { + file_ratelimit_v1_tx_proto_init() + md_MsgRemoveRateLimitResponse = File_ratelimit_v1_tx_proto.Messages().ByName("MsgRemoveRateLimitResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgRemoveRateLimitResponse)(nil) + +type fastReflection_MsgRemoveRateLimitResponse MsgRemoveRateLimitResponse + +func (x *MsgRemoveRateLimitResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRemoveRateLimitResponse)(x) +} + +func (x *MsgRemoveRateLimitResponse) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_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_MsgRemoveRateLimitResponse_messageType fastReflection_MsgRemoveRateLimitResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRemoveRateLimitResponse_messageType{} + +type fastReflection_MsgRemoveRateLimitResponse_messageType struct{} + +func (x fastReflection_MsgRemoveRateLimitResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRemoveRateLimitResponse)(nil) +} +func (x fastReflection_MsgRemoveRateLimitResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRemoveRateLimitResponse) +} +func (x fastReflection_MsgRemoveRateLimitResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRemoveRateLimitResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRemoveRateLimitResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRemoveRateLimitResponse +} + +// 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_MsgRemoveRateLimitResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRemoveRateLimitResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRemoveRateLimitResponse) New() protoreflect.Message { + return new(fastReflection_MsgRemoveRateLimitResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRemoveRateLimitResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRemoveRateLimitResponse)(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_MsgRemoveRateLimitResponse) 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_MsgRemoveRateLimitResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgRemoveRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgRemoveRateLimitResponse 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_MsgRemoveRateLimitResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgRemoveRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgRemoveRateLimitResponse 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_MsgRemoveRateLimitResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgRemoveRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgRemoveRateLimitResponse 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_MsgRemoveRateLimitResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgRemoveRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgRemoveRateLimitResponse 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_MsgRemoveRateLimitResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgRemoveRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgRemoveRateLimitResponse 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_MsgRemoveRateLimitResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgRemoveRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgRemoveRateLimitResponse 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_MsgRemoveRateLimitResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.MsgRemoveRateLimitResponse", 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_MsgRemoveRateLimitResponse) 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_MsgRemoveRateLimitResponse) 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_MsgRemoveRateLimitResponse) 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_MsgRemoveRateLimitResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRemoveRateLimitResponse) + 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().(*MsgRemoveRateLimitResponse) + 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().(*MsgRemoveRateLimitResponse) + 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: MsgRemoveRateLimitResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveRateLimitResponse: 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_MsgResetRateLimit protoreflect.MessageDescriptor + fd_MsgResetRateLimit_authority protoreflect.FieldDescriptor + fd_MsgResetRateLimit_denom protoreflect.FieldDescriptor + fd_MsgResetRateLimit_channel_id protoreflect.FieldDescriptor +) + +func init() { + file_ratelimit_v1_tx_proto_init() + md_MsgResetRateLimit = File_ratelimit_v1_tx_proto.Messages().ByName("MsgResetRateLimit") + fd_MsgResetRateLimit_authority = md_MsgResetRateLimit.Fields().ByName("authority") + fd_MsgResetRateLimit_denom = md_MsgResetRateLimit.Fields().ByName("denom") + fd_MsgResetRateLimit_channel_id = md_MsgResetRateLimit.Fields().ByName("channel_id") +} + +var _ protoreflect.Message = (*fastReflection_MsgResetRateLimit)(nil) + +type fastReflection_MsgResetRateLimit MsgResetRateLimit + +func (x *MsgResetRateLimit) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgResetRateLimit)(x) +} + +func (x *MsgResetRateLimit) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_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_MsgResetRateLimit_messageType fastReflection_MsgResetRateLimit_messageType +var _ protoreflect.MessageType = fastReflection_MsgResetRateLimit_messageType{} + +type fastReflection_MsgResetRateLimit_messageType struct{} + +func (x fastReflection_MsgResetRateLimit_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgResetRateLimit)(nil) +} +func (x fastReflection_MsgResetRateLimit_messageType) New() protoreflect.Message { + return new(fastReflection_MsgResetRateLimit) +} +func (x fastReflection_MsgResetRateLimit_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgResetRateLimit +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgResetRateLimit) Descriptor() protoreflect.MessageDescriptor { + return md_MsgResetRateLimit +} + +// 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_MsgResetRateLimit) Type() protoreflect.MessageType { + return _fastReflection_MsgResetRateLimit_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgResetRateLimit) New() protoreflect.Message { + return new(fastReflection_MsgResetRateLimit) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgResetRateLimit) Interface() protoreflect.ProtoMessage { + return (*MsgResetRateLimit)(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_MsgResetRateLimit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgResetRateLimit_authority, value) { + return + } + } + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_MsgResetRateLimit_denom, value) { + return + } + } + if x.ChannelId != "" { + value := protoreflect.ValueOfString(x.ChannelId) + if !f(fd_MsgResetRateLimit_channel_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgResetRateLimit) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ratelimit.v1.MsgResetRateLimit.authority": + return x.Authority != "" + case "ratelimit.v1.MsgResetRateLimit.denom": + return x.Denom != "" + case "ratelimit.v1.MsgResetRateLimit.channel_id": + return x.ChannelId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgResetRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgResetRateLimit 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_MsgResetRateLimit) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ratelimit.v1.MsgResetRateLimit.authority": + x.Authority = "" + case "ratelimit.v1.MsgResetRateLimit.denom": + x.Denom = "" + case "ratelimit.v1.MsgResetRateLimit.channel_id": + x.ChannelId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgResetRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgResetRateLimit 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_MsgResetRateLimit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ratelimit.v1.MsgResetRateLimit.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "ratelimit.v1.MsgResetRateLimit.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + case "ratelimit.v1.MsgResetRateLimit.channel_id": + value := x.ChannelId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgResetRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgResetRateLimit 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_MsgResetRateLimit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ratelimit.v1.MsgResetRateLimit.authority": + x.Authority = value.Interface().(string) + case "ratelimit.v1.MsgResetRateLimit.denom": + x.Denom = value.Interface().(string) + case "ratelimit.v1.MsgResetRateLimit.channel_id": + x.ChannelId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgResetRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgResetRateLimit 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_MsgResetRateLimit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.MsgResetRateLimit.authority": + panic(fmt.Errorf("field authority of message ratelimit.v1.MsgResetRateLimit is not mutable")) + case "ratelimit.v1.MsgResetRateLimit.denom": + panic(fmt.Errorf("field denom of message ratelimit.v1.MsgResetRateLimit is not mutable")) + case "ratelimit.v1.MsgResetRateLimit.channel_id": + panic(fmt.Errorf("field channel_id of message ratelimit.v1.MsgResetRateLimit is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgResetRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgResetRateLimit 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_MsgResetRateLimit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ratelimit.v1.MsgResetRateLimit.authority": + return protoreflect.ValueOfString("") + case "ratelimit.v1.MsgResetRateLimit.denom": + return protoreflect.ValueOfString("") + case "ratelimit.v1.MsgResetRateLimit.channel_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgResetRateLimit")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgResetRateLimit 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_MsgResetRateLimit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.MsgResetRateLimit", 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_MsgResetRateLimit) 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_MsgResetRateLimit) 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_MsgResetRateLimit) 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_MsgResetRateLimit) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgResetRateLimit) + 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)) + } + l = len(x.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChannelId) + 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().(*MsgResetRateLimit) + 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.ChannelId) > 0 { + i -= len(x.ChannelId) + copy(dAtA[i:], x.ChannelId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChannelId))) + i-- + dAtA[i] = 0x1a + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + 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().(*MsgResetRateLimit) + 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: MsgResetRateLimit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgResetRateLimit: 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 Denom", 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.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChannelId", 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.ChannelId = 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_MsgResetRateLimitResponse protoreflect.MessageDescriptor +) + +func init() { + file_ratelimit_v1_tx_proto_init() + md_MsgResetRateLimitResponse = File_ratelimit_v1_tx_proto.Messages().ByName("MsgResetRateLimitResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgResetRateLimitResponse)(nil) + +type fastReflection_MsgResetRateLimitResponse MsgResetRateLimitResponse + +func (x *MsgResetRateLimitResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgResetRateLimitResponse)(x) +} + +func (x *MsgResetRateLimitResponse) slowProtoReflect() protoreflect.Message { + mi := &file_ratelimit_v1_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_MsgResetRateLimitResponse_messageType fastReflection_MsgResetRateLimitResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgResetRateLimitResponse_messageType{} + +type fastReflection_MsgResetRateLimitResponse_messageType struct{} + +func (x fastReflection_MsgResetRateLimitResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgResetRateLimitResponse)(nil) +} +func (x fastReflection_MsgResetRateLimitResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgResetRateLimitResponse) +} +func (x fastReflection_MsgResetRateLimitResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgResetRateLimitResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgResetRateLimitResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgResetRateLimitResponse +} + +// 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_MsgResetRateLimitResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgResetRateLimitResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgResetRateLimitResponse) New() protoreflect.Message { + return new(fastReflection_MsgResetRateLimitResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgResetRateLimitResponse) Interface() protoreflect.ProtoMessage { + return (*MsgResetRateLimitResponse)(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_MsgResetRateLimitResponse) 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_MsgResetRateLimitResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgResetRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgResetRateLimitResponse 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_MsgResetRateLimitResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgResetRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgResetRateLimitResponse 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_MsgResetRateLimitResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgResetRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgResetRateLimitResponse 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_MsgResetRateLimitResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgResetRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgResetRateLimitResponse 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_MsgResetRateLimitResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgResetRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgResetRateLimitResponse 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_MsgResetRateLimitResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ratelimit.v1.MsgResetRateLimitResponse")) + } + panic(fmt.Errorf("message ratelimit.v1.MsgResetRateLimitResponse 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_MsgResetRateLimitResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ratelimit.v1.MsgResetRateLimitResponse", 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_MsgResetRateLimitResponse) 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_MsgResetRateLimitResponse) 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_MsgResetRateLimitResponse) 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_MsgResetRateLimitResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgResetRateLimitResponse) + 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().(*MsgResetRateLimitResponse) + 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().(*MsgResetRateLimitResponse) + 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: MsgResetRateLimitResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgResetRateLimitResponse: 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, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: ratelimit/v1/tx.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Gov tx to add a new rate limit +type MsgAddRateLimit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Authority defines the x/gov module account + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Denom for the rate limit, as it appears on the rate limited chain + // When rate limiting a non-native token, this will be an ibc denom + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + // ChannelId for the rate limit, on the side of the rate limited chain + ChannelId string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + // MaxPercentSend defines the threshold for outflows + // The threshold is defined as a percentage (e.g. 10 indicates 10%) + MaxPercentSend string `protobuf:"bytes,4,opt,name=max_percent_send,json=maxPercentSend,proto3" json:"max_percent_send,omitempty"` + // MaxPercentSend defines the threshold for inflows + // The threshold is defined as a percentage (e.g. 10 indicates 10%) + MaxPercentRecv string `protobuf:"bytes,5,opt,name=max_percent_recv,json=maxPercentRecv,proto3" json:"max_percent_recv,omitempty"` + // DurationHours specifies the number of hours before the rate limit + // is reset (e.g. 24 indicates that the rate limit is reset each day) + DurationHours uint64 `protobuf:"varint,6,opt,name=duration_hours,json=durationHours,proto3" json:"duration_hours,omitempty"` +} + +func (x *MsgAddRateLimit) Reset() { + *x = MsgAddRateLimit{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAddRateLimit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAddRateLimit) ProtoMessage() {} + +// Deprecated: Use MsgAddRateLimit.ProtoReflect.Descriptor instead. +func (*MsgAddRateLimit) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgAddRateLimit) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgAddRateLimit) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *MsgAddRateLimit) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +func (x *MsgAddRateLimit) GetMaxPercentSend() string { + if x != nil { + return x.MaxPercentSend + } + return "" +} + +func (x *MsgAddRateLimit) GetMaxPercentRecv() string { + if x != nil { + return x.MaxPercentRecv + } + return "" +} + +func (x *MsgAddRateLimit) GetDurationHours() uint64 { + if x != nil { + return x.DurationHours + } + return 0 +} + +type MsgAddRateLimitResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgAddRateLimitResponse) Reset() { + *x = MsgAddRateLimitResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAddRateLimitResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAddRateLimitResponse) ProtoMessage() {} + +// Deprecated: Use MsgAddRateLimitResponse.ProtoReflect.Descriptor instead. +func (*MsgAddRateLimitResponse) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_tx_proto_rawDescGZIP(), []int{1} +} + +// Gov tx to update an existing rate limit +type MsgUpdateRateLimit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Authority defines the x/gov module account + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Denom for the rate limit, as it appears on the rate limited chain + // When rate limiting a non-native token, this will be an ibc denom + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + // ChannelId for the rate limit, on the side of the rate limited chain + ChannelId string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + // MaxPercentSend defines the threshold for outflows + // The threshold is defined as a percentage (e.g. 10 indicates 10%) + MaxPercentSend string `protobuf:"bytes,4,opt,name=max_percent_send,json=maxPercentSend,proto3" json:"max_percent_send,omitempty"` + // MaxPercentSend defines the threshold for inflows + // The threshold is defined as a percentage (e.g. 10 indicates 10%) + MaxPercentRecv string `protobuf:"bytes,5,opt,name=max_percent_recv,json=maxPercentRecv,proto3" json:"max_percent_recv,omitempty"` + // DurationHours specifies the number of hours before the rate limit + // is reset (e.g. 24 indicates that the rate limit is reset each day) + DurationHours uint64 `protobuf:"varint,6,opt,name=duration_hours,json=durationHours,proto3" json:"duration_hours,omitempty"` +} + +func (x *MsgUpdateRateLimit) Reset() { + *x = MsgUpdateRateLimit{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateRateLimit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateRateLimit) ProtoMessage() {} + +// Deprecated: Use MsgUpdateRateLimit.ProtoReflect.Descriptor instead. +func (*MsgUpdateRateLimit) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgUpdateRateLimit) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgUpdateRateLimit) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *MsgUpdateRateLimit) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +func (x *MsgUpdateRateLimit) GetMaxPercentSend() string { + if x != nil { + return x.MaxPercentSend + } + return "" +} + +func (x *MsgUpdateRateLimit) GetMaxPercentRecv() string { + if x != nil { + return x.MaxPercentRecv + } + return "" +} + +func (x *MsgUpdateRateLimit) GetDurationHours() uint64 { + if x != nil { + return x.DurationHours + } + return 0 +} + +type MsgUpdateRateLimitResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateRateLimitResponse) Reset() { + *x = MsgUpdateRateLimitResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateRateLimitResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateRateLimitResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateRateLimitResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateRateLimitResponse) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_tx_proto_rawDescGZIP(), []int{3} +} + +// Gov tx to remove a rate limit +type MsgRemoveRateLimit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Authority defines the x/gov module account + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Denom for the rate limit, as it appears on the rate limited chain + // When rate limiting a non-native token, this will be an ibc denom + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + // ChannelId for the rate limit, on the side of the rate limited chain + ChannelId string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` +} + +func (x *MsgRemoveRateLimit) Reset() { + *x = MsgRemoveRateLimit{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRemoveRateLimit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRemoveRateLimit) ProtoMessage() {} + +// Deprecated: Use MsgRemoveRateLimit.ProtoReflect.Descriptor instead. +func (*MsgRemoveRateLimit) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgRemoveRateLimit) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgRemoveRateLimit) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *MsgRemoveRateLimit) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +type MsgRemoveRateLimitResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgRemoveRateLimitResponse) Reset() { + *x = MsgRemoveRateLimitResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRemoveRateLimitResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRemoveRateLimitResponse) ProtoMessage() {} + +// Deprecated: Use MsgRemoveRateLimitResponse.ProtoReflect.Descriptor instead. +func (*MsgRemoveRateLimitResponse) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_tx_proto_rawDescGZIP(), []int{5} +} + +// Gov tx to reset the flow on a rate limit +type MsgResetRateLimit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Authority defines the x/gov module account + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Denom for the rate limit, as it appears on the rate limited chain + // When rate limiting a non-native token, this will be an ibc denom + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + // ChannelId for the rate limit, on the side of the rate limited chain + ChannelId string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` +} + +func (x *MsgResetRateLimit) Reset() { + *x = MsgResetRateLimit{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgResetRateLimit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgResetRateLimit) ProtoMessage() {} + +// Deprecated: Use MsgResetRateLimit.ProtoReflect.Descriptor instead. +func (*MsgResetRateLimit) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgResetRateLimit) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgResetRateLimit) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *MsgResetRateLimit) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +type MsgResetRateLimitResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgResetRateLimitResponse) Reset() { + *x = MsgResetRateLimitResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_v1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgResetRateLimitResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgResetRateLimitResponse) ProtoMessage() {} + +// Deprecated: Use MsgResetRateLimitResponse.ProtoReflect.Descriptor instead. +func (*MsgResetRateLimitResponse) Descriptor() ([]byte, []int) { + return file_ratelimit_v1_tx_proto_rawDescGZIP(), []int{7} +} + +var File_ratelimit_v1_tx_proto protoreflect.FileDescriptor + +var file_ratelimit_v1_tx_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x74, + 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, + 0x6e, 0x6f, 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, 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, 0x14, 0x67, 0x6f, + 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xe5, 0x02, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 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, 0x14, + 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, + 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x64, 0x12, 0x47, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, + 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, + 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0e, 0x6d, 0x61, + 0x78, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x47, 0x0a, 0x10, + 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x76, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, + 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x63, 0x76, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x68, 0x6f, 0x75, 0x72, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x6f, 0x75, 0x72, 0x73, 0x3a, 0x2c, 0x82, 0xe7, + 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, + 0x19, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x64, + 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, + 0x67, 0x41, 0x64, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xeb, 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 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, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, + 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x47, 0x0a, 0x10, 0x6d, 0x61, 0x78, + 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, + 0x6e, 0x74, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x53, 0x65, + 0x6e, 0x64, 0x12, 0x47, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x5f, 0x72, 0x65, 0x63, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, + 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0e, 0x6d, 0x61, 0x78, + 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x76, 0x12, 0x25, 0x0a, 0x0e, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x75, 0x72, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0d, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x6f, 0x75, + 0x72, 0x73, 0x3a, 0x2f, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x1c, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xb2, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 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, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x3a, 0x2f, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x1c, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x65, + 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 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, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, + 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x3a, 0x2e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x72, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x73, 0x65, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xfc, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x54, 0x0a, 0x0c, + 0x41, 0x64, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1d, 0x2e, 0x72, + 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, + 0x64, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x25, 0x2e, 0x72, 0x61, + 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, + 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x28, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5d, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x28, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x5a, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x12, 0x1f, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x1a, 0x27, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, + 0xb0, 0x2a, 0x01, 0x42, 0xbe, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x69, 0x62, 0x63, 0x2d, 0x61, 0x70, 0x70, 0x73, 0x2f, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x2d, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x38, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x52, 0x61, + 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x52, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x52, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ratelimit_v1_tx_proto_rawDescOnce sync.Once + file_ratelimit_v1_tx_proto_rawDescData = file_ratelimit_v1_tx_proto_rawDesc +) + +func file_ratelimit_v1_tx_proto_rawDescGZIP() []byte { + file_ratelimit_v1_tx_proto_rawDescOnce.Do(func() { + file_ratelimit_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_ratelimit_v1_tx_proto_rawDescData) + }) + return file_ratelimit_v1_tx_proto_rawDescData +} + +var file_ratelimit_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_ratelimit_v1_tx_proto_goTypes = []interface{}{ + (*MsgAddRateLimit)(nil), // 0: ratelimit.v1.MsgAddRateLimit + (*MsgAddRateLimitResponse)(nil), // 1: ratelimit.v1.MsgAddRateLimitResponse + (*MsgUpdateRateLimit)(nil), // 2: ratelimit.v1.MsgUpdateRateLimit + (*MsgUpdateRateLimitResponse)(nil), // 3: ratelimit.v1.MsgUpdateRateLimitResponse + (*MsgRemoveRateLimit)(nil), // 4: ratelimit.v1.MsgRemoveRateLimit + (*MsgRemoveRateLimitResponse)(nil), // 5: ratelimit.v1.MsgRemoveRateLimitResponse + (*MsgResetRateLimit)(nil), // 6: ratelimit.v1.MsgResetRateLimit + (*MsgResetRateLimitResponse)(nil), // 7: ratelimit.v1.MsgResetRateLimitResponse +} +var file_ratelimit_v1_tx_proto_depIdxs = []int32{ + 0, // 0: ratelimit.v1.Msg.AddRateLimit:input_type -> ratelimit.v1.MsgAddRateLimit + 2, // 1: ratelimit.v1.Msg.UpdateRateLimit:input_type -> ratelimit.v1.MsgUpdateRateLimit + 4, // 2: ratelimit.v1.Msg.RemoveRateLimit:input_type -> ratelimit.v1.MsgRemoveRateLimit + 6, // 3: ratelimit.v1.Msg.ResetRateLimit:input_type -> ratelimit.v1.MsgResetRateLimit + 1, // 4: ratelimit.v1.Msg.AddRateLimit:output_type -> ratelimit.v1.MsgAddRateLimitResponse + 3, // 5: ratelimit.v1.Msg.UpdateRateLimit:output_type -> ratelimit.v1.MsgUpdateRateLimitResponse + 5, // 6: ratelimit.v1.Msg.RemoveRateLimit:output_type -> ratelimit.v1.MsgRemoveRateLimitResponse + 7, // 7: ratelimit.v1.Msg.ResetRateLimit:output_type -> ratelimit.v1.MsgResetRateLimitResponse + 4, // [4:8] is the sub-list for method output_type + 0, // [0:4] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_ratelimit_v1_tx_proto_init() } +func file_ratelimit_v1_tx_proto_init() { + if File_ratelimit_v1_tx_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ratelimit_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgAddRateLimit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgAddRateLimitResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateRateLimit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateRateLimitResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRemoveRateLimit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRemoveRateLimitResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgResetRateLimit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgResetRateLimitResponse); 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{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ratelimit_v1_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_ratelimit_v1_tx_proto_goTypes, + DependencyIndexes: file_ratelimit_v1_tx_proto_depIdxs, + MessageInfos: file_ratelimit_v1_tx_proto_msgTypes, + }.Build() + File_ratelimit_v1_tx_proto = out.File + file_ratelimit_v1_tx_proto_rawDesc = nil + file_ratelimit_v1_tx_proto_goTypes = nil + file_ratelimit_v1_tx_proto_depIdxs = nil +} diff --git a/api/ratelimit/v1/tx_grpc.pb.go b/api/ratelimit/v1/tx_grpc.pb.go new file mode 100644 index 0000000..0144540 --- /dev/null +++ b/api/ratelimit/v1/tx_grpc.pb.go @@ -0,0 +1,228 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: ratelimit/v1/tx.proto + +package ratelimitv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Msg_AddRateLimit_FullMethodName = "/ratelimit.v1.Msg/AddRateLimit" + Msg_UpdateRateLimit_FullMethodName = "/ratelimit.v1.Msg/UpdateRateLimit" + Msg_RemoveRateLimit_FullMethodName = "/ratelimit.v1.Msg/RemoveRateLimit" + Msg_ResetRateLimit_FullMethodName = "/ratelimit.v1.Msg/ResetRateLimit" +) + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MsgClient interface { + // Gov tx to add a new rate limit + AddRateLimit(ctx context.Context, in *MsgAddRateLimit, opts ...grpc.CallOption) (*MsgAddRateLimitResponse, error) + // Gov tx to update an existing rate limit + UpdateRateLimit(ctx context.Context, in *MsgUpdateRateLimit, opts ...grpc.CallOption) (*MsgUpdateRateLimitResponse, error) + // Gov tx to remove a rate limit + RemoveRateLimit(ctx context.Context, in *MsgRemoveRateLimit, opts ...grpc.CallOption) (*MsgRemoveRateLimitResponse, error) + // Gov tx to reset the flow on a rate limit + ResetRateLimit(ctx context.Context, in *MsgResetRateLimit, opts ...grpc.CallOption) (*MsgResetRateLimitResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) AddRateLimit(ctx context.Context, in *MsgAddRateLimit, opts ...grpc.CallOption) (*MsgAddRateLimitResponse, error) { + out := new(MsgAddRateLimitResponse) + err := c.cc.Invoke(ctx, Msg_AddRateLimit_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateRateLimit(ctx context.Context, in *MsgUpdateRateLimit, opts ...grpc.CallOption) (*MsgUpdateRateLimitResponse, error) { + out := new(MsgUpdateRateLimitResponse) + err := c.cc.Invoke(ctx, Msg_UpdateRateLimit_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RemoveRateLimit(ctx context.Context, in *MsgRemoveRateLimit, opts ...grpc.CallOption) (*MsgRemoveRateLimitResponse, error) { + out := new(MsgRemoveRateLimitResponse) + err := c.cc.Invoke(ctx, Msg_RemoveRateLimit_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ResetRateLimit(ctx context.Context, in *MsgResetRateLimit, opts ...grpc.CallOption) (*MsgResetRateLimitResponse, error) { + out := new(MsgResetRateLimitResponse) + err := c.cc.Invoke(ctx, Msg_ResetRateLimit_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 +type MsgServer interface { + // Gov tx to add a new rate limit + AddRateLimit(context.Context, *MsgAddRateLimit) (*MsgAddRateLimitResponse, error) + // Gov tx to update an existing rate limit + UpdateRateLimit(context.Context, *MsgUpdateRateLimit) (*MsgUpdateRateLimitResponse, error) + // Gov tx to remove a rate limit + RemoveRateLimit(context.Context, *MsgRemoveRateLimit) (*MsgRemoveRateLimitResponse, error) + // Gov tx to reset the flow on a rate limit + ResetRateLimit(context.Context, *MsgResetRateLimit) (*MsgResetRateLimitResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) AddRateLimit(context.Context, *MsgAddRateLimit) (*MsgAddRateLimitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddRateLimit not implemented") +} +func (UnimplementedMsgServer) UpdateRateLimit(context.Context, *MsgUpdateRateLimit) (*MsgUpdateRateLimitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateRateLimit not implemented") +} +func (UnimplementedMsgServer) RemoveRateLimit(context.Context, *MsgRemoveRateLimit) (*MsgRemoveRateLimitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveRateLimit not implemented") +} +func (UnimplementedMsgServer) ResetRateLimit(context.Context, *MsgResetRateLimit) (*MsgResetRateLimitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResetRateLimit not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_AddRateLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAddRateLimit) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).AddRateLimit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_AddRateLimit_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AddRateLimit(ctx, req.(*MsgAddRateLimit)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateRateLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateRateLimit) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateRateLimit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateRateLimit_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateRateLimit(ctx, req.(*MsgUpdateRateLimit)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RemoveRateLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRemoveRateLimit) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RemoveRateLimit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_RemoveRateLimit_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RemoveRateLimit(ctx, req.(*MsgRemoveRateLimit)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ResetRateLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgResetRateLimit) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ResetRateLimit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_ResetRateLimit_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ResetRateLimit(ctx, req.(*MsgResetRateLimit)) + } + 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) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "ratelimit.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AddRateLimit", + Handler: _Msg_AddRateLimit_Handler, + }, + { + MethodName: "UpdateRateLimit", + Handler: _Msg_UpdateRateLimit_Handler, + }, + { + MethodName: "RemoveRateLimit", + Handler: _Msg_RemoveRateLimit_Handler, + }, + { + MethodName: "ResetRateLimit", + Handler: _Msg_ResetRateLimit_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ratelimit/v1/tx.proto", +} diff --git a/buf.work.yaml b/buf.work.yaml new file mode 100644 index 0000000..1878b34 --- /dev/null +++ b/buf.work.yaml @@ -0,0 +1,3 @@ +version: v1 +directories: + - proto diff --git a/ratelimit/client/cli/query.go b/client/cli/query.go similarity index 98% rename from ratelimit/client/cli/query.go rename to client/cli/query.go index db4a675..8dba08f 100644 --- a/ratelimit/client/cli/query.go +++ b/client/cli/query.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/version" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) const ( diff --git a/depinject.go b/depinject.go new file mode 100644 index 0000000..57f21d5 --- /dev/null +++ b/depinject.go @@ -0,0 +1,61 @@ +package ratelimit + +import ( + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/store" + "cosmossdk.io/depinject" + "github.com/cosmos/cosmos-sdk/codec" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + modulev1 "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/api/ratelimit/module/v1" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/keeper" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" +) + +var _ depinject.OnePerModuleType = AppModule{} + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +func init() { + appmodule.Register(&modulev1.Module{}, + appmodule.Provide(ProvideModule), + ) +} + +type ModuleInputs struct { + depinject.In + + Config *modulev1.Module + Cdc codec.Codec + StoreService store.KVStoreService + Subspace paramstypes.Subspace + BankKeeper types.BankKeeper +} + +type ModuleOutputs struct { + depinject.Out + + Keeper *keeper.Keeper + Module appmodule.AppModule +} + +func ProvideModule(in ModuleInputs) ModuleOutputs { + if in.Config.Authority == "" { + panic("authority for x/ratelimit module must be set") + } + + authority := authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) + k := keeper.NewKeeper( + in.Cdc, + in.StoreService, + in.Subspace, + authority.String(), + in.BankKeeper, + nil, + nil, + ) + m := NewAppModule(in.Cdc, *k) + + return ModuleOutputs{Keeper: k, Module: m} +} diff --git a/go.mod b/go.mod index 8a0fd74..da74809 100644 --- a/go.mod +++ b/go.mod @@ -1,44 +1,36 @@ -module github.com/Stride-Labs/ibc-rate-limiting +module github.com/cosmos/ibc-apps/modules/rate-limiting/v8 -go 1.21 +go 1.22 require ( + cosmossdk.io/api v0.7.4 + cosmossdk.io/core v0.11.0 + cosmossdk.io/depinject v1.0.0-alpha.4 + cosmossdk.io/errors v1.0.1 + cosmossdk.io/log v1.3.1 + cosmossdk.io/math v1.3.0 + cosmossdk.io/store v1.1.0 + cosmossdk.io/x/evidence v0.1.0 + cosmossdk.io/x/feegrant v0.1.0 cosmossdk.io/x/tx v0.13.2 + cosmossdk.io/x/upgrade v0.1.0 + github.com/cometbft/cometbft v0.38.7 github.com/cosmos/cosmos-db v1.0.2 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 + github.com/cosmos/cosmos-sdk v0.50.6 + github.com/cosmos/gogoproto v1.4.12 + github.com/cosmos/ibc-go/modules/capability v1.0.0 + github.com/cosmos/ibc-go/v8 v8.3.0 + github.com/golang/protobuf v1.5.4 + github.com/gorilla/mux v1.8.1 + github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/rakyll/statik v0.1.7 + github.com/spf13/cast v1.6.0 + github.com/spf13/cobra v1.8.0 + github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de -) - -require ( - cosmossdk.io/client/v2 v2.0.0-beta.1 // indirect - cosmossdk.io/collections v0.4.0 // indirect - cosmossdk.io/x/circuit v0.1.0 // indirect - github.com/DataDog/datadog-go v3.2.0+incompatible // indirect - github.com/DataDog/zstd v1.5.5 // indirect - github.com/bits-and-blooms/bitset v1.8.0 // indirect - github.com/cockroachdb/pebble v1.1.0 // indirect - github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/emicklei/dot v1.6.1 // indirect - github.com/fatih/color v1.15.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect - github.com/hashicorp/go-metrics v0.5.3 // indirect - github.com/hashicorp/go-plugin v1.5.2 // indirect - github.com/hashicorp/yamux v0.1.1 // indirect - github.com/iancoleman/strcase v0.3.0 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect - github.com/oklog/run v1.1.0 // indirect - github.com/sagikazarmark/locafero v0.4.0 // indirect - github.com/sagikazarmark/slog-shim v0.1.0 // indirect - github.com/sourcegraph/conc v0.3.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect - go.opentelemetry.io/otel v1.22.0 // indirect - go.opentelemetry.io/otel/metric v1.22.0 // indirect - go.opentelemetry.io/otel/trace v1.22.0 // indirect - go.uber.org/multierr v1.10.0 // indirect - golang.org/x/time v0.5.0 // indirect - gotest.tools/v3 v3.5.1 // indirect + google.golang.org/grpc v1.63.2 + google.golang.org/protobuf v1.33.0 ) require ( @@ -47,23 +39,19 @@ require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/storage v1.36.0 // indirect - cosmossdk.io/api v0.7.4 - cosmossdk.io/core v0.11.0 // indirect - cosmossdk.io/depinject v1.0.0-alpha.4 // indirect - cosmossdk.io/errors v1.0.1 - cosmossdk.io/log v1.3.1 - cosmossdk.io/math v1.3.0 - cosmossdk.io/store v1.1.0 - cosmossdk.io/x/evidence v0.1.0 - cosmossdk.io/x/feegrant v0.1.0 - cosmossdk.io/x/upgrade v0.1.0 + cosmossdk.io/client/v2 v2.0.0-beta.1 // indirect + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/x/circuit v0.1.0 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect + github.com/DataDog/zstd v1.5.5 // indirect github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect + github.com/bits-and-blooms/bitset v1.8.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect @@ -72,18 +60,14 @@ require ( github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect - github.com/cometbft/cometbft v0.38.6 + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.9.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.5 - github.com/cosmos/cosmos-sdk v0.50.6 github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/gogoproto v1.4.12 github.com/cosmos/iavl v1.1.2 // indirect - github.com/cosmos/ibc-go/modules/capability v1.0.0 - github.com/cosmos/ibc-go/v8 v8.1.1 github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.1.2 // indirect @@ -95,20 +79,23 @@ require ( github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.4 - github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect + github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect @@ -117,20 +104,23 @@ require ( github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect - github.com/gorilla/mux v1.8.1 github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect - github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.1 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect @@ -150,6 +140,8 @@ require ( github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect + github.com/oklog/run v1.1.0 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect @@ -158,18 +150,17 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.52.2 // indirect github.com/prometheus/procfs v0.13.0 // indirect - github.com/rakyll/statik v0.1.7 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.8.3 // indirect github.com/rs/zerolog v1.32.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/cast v1.6.0 - github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.18.2 // indirect - github.com/stretchr/testify v1.9.0 github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect @@ -179,6 +170,12 @@ require ( github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.3.8 // indirect go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect + go.opentelemetry.io/otel v1.22.0 // indirect + go.opentelemetry.io/otel/metric v1.22.0 // indirect + go.opentelemetry.io/otel/trace v1.22.0 // indirect + go.uber.org/multierr v1.10.0 // indirect golang.org/x/crypto v0.22.0 // indirect golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect golang.org/x/net v0.24.0 // indirect @@ -187,27 +184,16 @@ require ( golang.org/x/sys v0.19.0 // indirect golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect + golang.org/x/time v0.5.0 // indirect google.golang.org/api v0.162.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 - google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + gotest.tools/v3 v3.5.1 // indirect nhooyr.io/websocket v1.8.6 // indirect pgregory.net/rapid v1.1.0 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) - -replace ( - // Use the keyring specified by the cosmos-sdk - github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 - github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.22.2 //indirect - - // fork cast to add additional error checking - github.com/spf13/cast => github.com/Stride-Labs/cast v0.0.3 - - github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 -) diff --git a/go.sum b/go.sum index 07aef92..3202eb7 100644 --- a/go.sum +++ b/go.sum @@ -217,6 +217,8 @@ filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= +github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= +github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -234,8 +236,6 @@ github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/Stride-Labs/cast v0.0.3 h1:eM3n/t3hSxb+iw9LDo3r/uGBp3w4U7wPv40GKMtJ1dI= -github.com/Stride-Labs/cast v0.0.3/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= @@ -333,8 +333,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= -github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= +github.com/cometbft/cometbft v0.38.7 h1:ULhIOJ9+LgSy6nLekhq9ae3juX3NnQUMMPyVdhZV6Hk= +github.com/cometbft/cometbft v0.38.7/go.mod h1:HIyf811dFMI73IE0F7RrnY/Fr+d1+HuJAgtkEpQjCMY= github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= @@ -364,12 +364,10 @@ github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco= -github.com/cosmos/ibc-go/v8 v8.1.1 h1:N2+GA86yACcXnKWCKtqdbCwP0/Eo8pH79+6e7TicULU= -github.com/cosmos/ibc-go/v8 v8.1.1/go.mod h1:o1ipS95xpdjqNcB8Drq0eI3Sn4FRLigjll42ec1ECuU= +github.com/cosmos/ibc-go/v8 v8.3.0 h1:fdW2S7NjZYFhSwmCaFjjyDv80kI1ePOJDQmco4qrnD0= +github.com/cosmos/ibc-go/v8 v8.3.0/go.mod h1:izwHZvn9lKrBn8xWj0aXWut6HKcwHMPD3uyuvOJoPSA= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= -github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= @@ -437,10 +435,11 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8 github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= @@ -486,6 +485,7 @@ github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJ github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= @@ -548,9 +548,8 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= -github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -596,6 +595,7 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -747,7 +747,6 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -837,12 +836,15 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= @@ -928,7 +930,6 @@ github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqn github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= @@ -969,6 +970,9 @@ github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2 github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= @@ -1005,8 +1009,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= @@ -1167,7 +1171,6 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -1177,6 +1180,7 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1279,17 +1283,16 @@ golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1412,6 +1415,7 @@ golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82u golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= diff --git a/ratelimit/ibc_middleware.go b/ibc_middleware.go similarity index 98% rename from ratelimit/ibc_middleware.go rename to ibc_middleware.go index 71ec595..2dd4509 100644 --- a/ratelimit/ibc_middleware.go +++ b/ibc_middleware.go @@ -3,7 +3,7 @@ package ratelimit import ( "fmt" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/keeper" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/keeper" sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" diff --git a/ratelimit/keeper/abci.go b/keeper/abci.go similarity index 100% rename from ratelimit/keeper/abci.go rename to keeper/abci.go diff --git a/ratelimit/keeper/abci_test.go b/keeper/abci_test.go similarity index 97% rename from ratelimit/keeper/abci_test.go rename to keeper/abci_test.go index 7aeb22d..accfdac 100644 --- a/ratelimit/keeper/abci_test.go +++ b/keeper/abci_test.go @@ -6,7 +6,7 @@ import ( sdkmath "cosmossdk.io/math" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) // Store a rate limit with a non-zero flow for each duration diff --git a/ratelimit/keeper/blacklist.go b/keeper/blacklist.go similarity index 63% rename from ratelimit/keeper/blacklist.go rename to keeper/blacklist.go index cabfe4c..7bab0c4 100644 --- a/ratelimit/keeper/blacklist.go +++ b/keeper/blacklist.go @@ -2,28 +2,31 @@ package keeper import ( "cosmossdk.io/store/prefix" + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) // Adds a denom to a blacklist to prevent all IBC transfers with this denom func (k Keeper) AddDenomToBlacklist(ctx sdk.Context, denom string) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.DenomBlacklistKeyPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.DenomBlacklistKeyPrefix) key := types.KeyPrefix(denom) store.Set(key, []byte{1}) } // Removes a denom from a blacklist to re-enable IBC transfers for that denom func (k Keeper) RemoveDenomFromBlacklist(ctx sdk.Context, denom string) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.DenomBlacklistKeyPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.DenomBlacklistKeyPrefix) key := types.KeyPrefix(denom) store.Delete(key) } // Check if a denom is currently blacklisted func (k Keeper) IsDenomBlacklisted(ctx sdk.Context, denom string) bool { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.DenomBlacklistKeyPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.DenomBlacklistKeyPrefix) key := types.KeyPrefix(denom) value := store.Get(key) @@ -34,7 +37,8 @@ func (k Keeper) IsDenomBlacklisted(ctx sdk.Context, denom string) bool { // Get all the blacklisted denoms func (k Keeper) GetAllBlacklistedDenoms(ctx sdk.Context) []string { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.DenomBlacklistKeyPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.DenomBlacklistKeyPrefix) iterator := store.Iterator(nil, nil) defer iterator.Close() diff --git a/ratelimit/keeper/blacklist_test.go b/keeper/blacklist_test.go similarity index 100% rename from ratelimit/keeper/blacklist_test.go rename to keeper/blacklist_test.go diff --git a/ratelimit/keeper/epoch.go b/keeper/epoch.go similarity index 84% rename from ratelimit/keeper/epoch.go rename to keeper/epoch.go index ccc60ab..11fa5d9 100644 --- a/ratelimit/keeper/epoch.go +++ b/keeper/epoch.go @@ -1,21 +1,21 @@ package keeper import ( + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) // Stores the hour epoch func (k Keeper) SetHourEpoch(ctx sdk.Context, epoch types.HourEpoch) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) epochBz := k.cdc.MustMarshal(&epoch) store.Set(types.HourEpochKey, epochBz) } // Reads the hour epoch from the store func (k Keeper) GetHourEpoch(ctx sdk.Context) (epoch types.HourEpoch) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) epochBz := store.Get(types.HourEpochKey) if len(epochBz) == 0 { diff --git a/ratelimit/keeper/epoch_test.go b/keeper/epoch_test.go similarity index 98% rename from ratelimit/keeper/epoch_test.go rename to keeper/epoch_test.go index ea71c5b..be40b80 100644 --- a/ratelimit/keeper/epoch_test.go +++ b/keeper/epoch_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "time" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) // Tests Get/Set Hour epoch diff --git a/ratelimit/keeper/events.go b/keeper/events.go similarity index 93% rename from ratelimit/keeper/events.go rename to keeper/events.go index 9c1fd38..f55e7f4 100644 --- a/ratelimit/keeper/events.go +++ b/keeper/events.go @@ -4,8 +4,8 @@ import ( "strings" sdkmath "cosmossdk.io/math" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) // If the rate limit is exceeded or the denom is blacklisted, we emit an event diff --git a/ratelimit/keeper/flow.go b/keeper/flow.go similarity index 98% rename from ratelimit/keeper/flow.go rename to keeper/flow.go index 9d9e013..1a738a0 100644 --- a/ratelimit/keeper/flow.go +++ b/keeper/flow.go @@ -3,9 +3,9 @@ package keeper import ( errorsmod "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) // The total value on a given path (aka, the denominator in the percentage calculation) diff --git a/ratelimit/keeper/flow_test.go b/keeper/flow_test.go similarity index 99% rename from ratelimit/keeper/flow_test.go rename to keeper/flow_test.go index 8ea9579..23e20a8 100644 --- a/ratelimit/keeper/flow_test.go +++ b/keeper/flow_test.go @@ -2,10 +2,10 @@ package keeper_test import ( sdkmath "cosmossdk.io/math" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/keeper" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" sdk "github.com/cosmos/cosmos-sdk/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/keeper" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) func (s *KeeperTestSuite) TestGetChannelValue() { diff --git a/ratelimit/keeper/genesis.go b/keeper/genesis.go similarity index 97% rename from ratelimit/keeper/genesis.go rename to keeper/genesis.go index aa4d95a..3ff2e08 100644 --- a/ratelimit/keeper/genesis.go +++ b/keeper/genesis.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) // InitGenesis initializes the capability module's state from a provided genesis diff --git a/ratelimit/keeper/genesis_test.go b/keeper/genesis_test.go similarity index 98% rename from ratelimit/keeper/genesis_test.go rename to keeper/genesis_test.go index 72344e4..6579d67 100644 --- a/ratelimit/keeper/genesis_test.go +++ b/keeper/genesis_test.go @@ -6,7 +6,7 @@ import ( sdkmath "cosmossdk.io/math" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) func createRateLimits() []types.RateLimit { diff --git a/ratelimit/keeper/grpc_query.go b/keeper/grpc_query.go similarity index 98% rename from ratelimit/keeper/grpc_query.go rename to keeper/grpc_query.go index 5b585eb..3dfac11 100644 --- a/ratelimit/keeper/grpc_query.go +++ b/keeper/grpc_query.go @@ -9,7 +9,7 @@ import ( transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" ibctmtypes "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) var _ types.QueryServer = Keeper{} diff --git a/ratelimit/keeper/grpc_query_test.go b/keeper/grpc_query_test.go similarity index 98% rename from ratelimit/keeper/grpc_query_test.go rename to keeper/grpc_query_test.go index 96834d0..10c6244 100644 --- a/ratelimit/keeper/grpc_query_test.go +++ b/keeper/grpc_query_test.go @@ -11,7 +11,7 @@ import ( channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" ibctmtypes "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) // Add three rate limits on different channels diff --git a/ratelimit/keeper/keeper.go b/keeper/keeper.go similarity index 61% rename from ratelimit/keeper/keeper.go rename to keeper/keeper.go index 8e516f5..1b417e0 100644 --- a/ratelimit/keeper/keeper.go +++ b/keeper/keeper.go @@ -3,22 +3,20 @@ package keeper import ( "fmt" + "cosmossdk.io/core/store" "cosmossdk.io/log" - "github.com/cosmos/cosmos-sdk/codec" - storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) type ( Keeper struct { - storeKey storetypes.StoreKey - cdc codec.BinaryCodec - paramstore paramtypes.Subspace - authority string + cdc codec.BinaryCodec + storeService store.KVStoreService + paramstore paramtypes.Subspace + authority string bankKeeper types.BankKeeper channelKeeper types.ChannelKeeper @@ -28,7 +26,7 @@ type ( func NewKeeper( cdc codec.BinaryCodec, - key storetypes.StoreKey, + storeService store.KVStoreService, ps paramtypes.Subspace, authority string, bankKeeper types.BankKeeper, @@ -37,7 +35,7 @@ func NewKeeper( ) *Keeper { return &Keeper{ cdc: cdc, - storeKey: key, + storeService: storeService, paramstore: ps, authority: authority, bankKeeper: bankKeeper, @@ -46,11 +44,18 @@ func NewKeeper( } } -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) -} - // GetAuthority returns the module's authority. func (k Keeper) GetAuthority() string { return k.authority } + +// SetIBCKeepers allows us to set the relevant IBC keepers post dependency +// injection, as IBC doesn't support dependency injection yet. +func (k *Keeper) SetIBCKeepers(channelKeeper types.ChannelKeeper, ics4Wrapper types.ICS4Wrapper) { + k.channelKeeper = channelKeeper + k.ics4Wrapper = ics4Wrapper +} + +func (k Keeper) Logger(ctx sdk.Context) log.Logger { + return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) +} diff --git a/ratelimit/keeper/keeper_test.go b/keeper/keeper_test.go similarity index 71% rename from ratelimit/keeper/keeper_test.go rename to keeper/keeper_test.go index d6e0942..ed1536b 100644 --- a/ratelimit/keeper/keeper_test.go +++ b/keeper/keeper_test.go @@ -5,8 +5,8 @@ import ( "github.com/stretchr/testify/suite" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" - "github.com/Stride-Labs/ibc-rate-limiting/testing/simapp/apptesting" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/testing/simapp/apptesting" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) type KeeperTestSuite struct { diff --git a/ratelimit/keeper/msg_server.go b/keeper/msg_server.go similarity index 97% rename from ratelimit/keeper/msg_server.go rename to keeper/msg_server.go index a70adf0..2b6d5e8 100644 --- a/ratelimit/keeper/msg_server.go +++ b/keeper/msg_server.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) type msgServer struct { diff --git a/ratelimit/keeper/msg_server_test.go b/keeper/msg_server_test.go similarity index 98% rename from ratelimit/keeper/msg_server_test.go rename to keeper/msg_server_test.go index d595960..f82f47d 100644 --- a/ratelimit/keeper/msg_server_test.go +++ b/keeper/msg_server_test.go @@ -9,9 +9,9 @@ import ( transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/keeper" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/keeper" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) var ( diff --git a/ratelimit/keeper/packet.go b/keeper/packet.go similarity index 99% rename from ratelimit/keeper/packet.go rename to keeper/packet.go index 4184e23..7b77534 100644 --- a/ratelimit/keeper/packet.go +++ b/keeper/packet.go @@ -14,7 +14,7 @@ import ( channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) type RateLimitedPacketInfo struct { diff --git a/ratelimit/keeper/packet_test.go b/keeper/packet_test.go similarity index 99% rename from ratelimit/keeper/packet_test.go rename to keeper/packet_test.go index 3ba8d2c..5812888 100644 --- a/ratelimit/keeper/packet_test.go +++ b/keeper/packet_test.go @@ -13,8 +13,8 @@ import ( tmbytes "github.com/cometbft/cometbft/libs/bytes" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/keeper" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/keeper" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) const ( diff --git a/ratelimit/keeper/params.go b/keeper/params.go similarity index 84% rename from ratelimit/keeper/params.go rename to keeper/params.go index cdfcd42..a724fa1 100644 --- a/ratelimit/keeper/params.go +++ b/keeper/params.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) // GetParams get all parameters as types.Params diff --git a/ratelimit/keeper/pending_send.go b/keeper/pending_send.go similarity index 73% rename from ratelimit/keeper/pending_send.go rename to keeper/pending_send.go index 8f18d25..2cdcfbd 100644 --- a/ratelimit/keeper/pending_send.go +++ b/keeper/pending_send.go @@ -6,15 +6,16 @@ import ( "strings" "cosmossdk.io/store/prefix" - sdk "github.com/cosmos/cosmos-sdk/types" - storetypes "cosmossdk.io/store/types" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/cosmos-sdk/runtime" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) // Sets the sequence number of a packet that was just sent func (k Keeper) SetPendingSendPacket(ctx sdk.Context, channelId string, sequence uint64) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.PendingSendPacketPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.PendingSendPacketPrefix) key := types.GetPendingSendPacketKey(channelId, sequence) store.Set(key, []byte{1}) } @@ -22,7 +23,8 @@ func (k Keeper) SetPendingSendPacket(ctx sdk.Context, channelId string, sequence // Remove a pending packet sequence number from the store // Used after the ack or timeout for a packet has been received func (k Keeper) RemovePendingSendPacket(ctx sdk.Context, channelId string, sequence uint64) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.PendingSendPacketPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.PendingSendPacketPrefix) key := types.GetPendingSendPacketKey(channelId, sequence) store.Delete(key) } @@ -30,7 +32,8 @@ func (k Keeper) RemovePendingSendPacket(ctx sdk.Context, channelId string, seque // Checks whether the packet sequence number is in the store - indicating that it was // sent during the current quota func (k Keeper) CheckPacketSentDuringCurrentQuota(ctx sdk.Context, channelId string, sequence uint64) bool { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.PendingSendPacketPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.PendingSendPacketPrefix) key := types.GetPendingSendPacketKey(channelId, sequence) valueBz := store.Get(key) found := len(valueBz) != 0 @@ -39,7 +42,8 @@ func (k Keeper) CheckPacketSentDuringCurrentQuota(ctx sdk.Context, channelId str // Get all pending packet sequence numbers func (k Keeper) GetAllPendingSendPackets(ctx sdk.Context) []string { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.PendingSendPacketPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.PendingSendPacketPrefix) iterator := store.Iterator(nil, nil) defer iterator.Close() @@ -62,7 +66,8 @@ func (k Keeper) GetAllPendingSendPackets(ctx sdk.Context) []string { // Remove all pending sequence numbers from the store // This is executed when the quota resets func (k Keeper) RemoveAllChannelPendingSendPackets(ctx sdk.Context, channelId string) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.PendingSendPacketPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.PendingSendPacketPrefix) iterator := storetypes.KVStorePrefixIterator(store, types.KeyPrefix(channelId)) defer iterator.Close() diff --git a/ratelimit/keeper/pending_send_test.go b/keeper/pending_send_test.go similarity index 100% rename from ratelimit/keeper/pending_send_test.go rename to keeper/pending_send_test.go diff --git a/ratelimit/keeper/rate_limit.go b/keeper/rate_limit.go similarity index 87% rename from ratelimit/keeper/rate_limit.go rename to keeper/rate_limit.go index f962c3f..57a14f8 100644 --- a/ratelimit/keeper/rate_limit.go +++ b/keeper/rate_limit.go @@ -3,15 +3,16 @@ package keeper import ( sdkmath "cosmossdk.io/math" "cosmossdk.io/store/prefix" + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" ) // Stores/Updates a rate limit object in the store func (k Keeper) SetRateLimit(ctx sdk.Context, rateLimit types.RateLimit) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.RateLimitKeyPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.RateLimitKeyPrefix) rateLimitKey := types.GetRateLimitItemKey(rateLimit.Path.Denom, rateLimit.Path.ChannelId) rateLimitValue := k.cdc.MustMarshal(&rateLimit) @@ -21,14 +22,16 @@ func (k Keeper) SetRateLimit(ctx sdk.Context, rateLimit types.RateLimit) { // Removes a rate limit object from the store using denom and channel-id func (k Keeper) RemoveRateLimit(ctx sdk.Context, denom string, channelId string) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.RateLimitKeyPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.RateLimitKeyPrefix) rateLimitKey := types.GetRateLimitItemKey(denom, channelId) store.Delete(rateLimitKey) } // Grabs and returns a rate limit object from the store using denom and channel-id func (k Keeper) GetRateLimit(ctx sdk.Context, denom string, channelId string) (rateLimit types.RateLimit, found bool) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.RateLimitKeyPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.RateLimitKeyPrefix) rateLimitKey := types.GetRateLimitItemKey(denom, channelId) rateLimitValue := store.Get(rateLimitKey) @@ -43,7 +46,8 @@ func (k Keeper) GetRateLimit(ctx sdk.Context, denom string, channelId string) (r // Returns all rate limits stored func (k Keeper) GetAllRateLimits(ctx sdk.Context) []types.RateLimit { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.RateLimitKeyPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.RateLimitKeyPrefix) iterator := store.Iterator(nil, nil) defer iterator.Close() diff --git a/ratelimit/keeper/rate_limit_test.go b/keeper/rate_limit_test.go similarity index 97% rename from ratelimit/keeper/rate_limit_test.go rename to keeper/rate_limit_test.go index b1d2294..46640e9 100644 --- a/ratelimit/keeper/rate_limit_test.go +++ b/keeper/rate_limit_test.go @@ -5,7 +5,7 @@ import ( sdkmath "cosmossdk.io/math" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) const ( diff --git a/ratelimit/keeper/whitelist.go b/keeper/whitelist.go similarity index 70% rename from ratelimit/keeper/whitelist.go rename to keeper/whitelist.go index 7f873e0..99c0faa 100644 --- a/ratelimit/keeper/whitelist.go +++ b/keeper/whitelist.go @@ -2,15 +2,16 @@ package keeper import ( "cosmossdk.io/store/prefix" + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) // Adds an pair of sender and receiver addresses to the whitelist to allow all // IBC transfers between those addresses to skip all flow calculations func (k Keeper) SetWhitelistedAddressPair(ctx sdk.Context, whitelist types.WhitelistedAddressPair) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.AddressWhitelistKeyPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.AddressWhitelistKeyPrefix) key := types.GetAddressWhitelistKey(whitelist.Sender, whitelist.Receiver) value := k.cdc.MustMarshal(&whitelist) store.Set(key, value) @@ -18,14 +19,16 @@ func (k Keeper) SetWhitelistedAddressPair(ctx sdk.Context, whitelist types.White // Removes a whitelisted address pair so that it's transfers are counted in the quota func (k Keeper) RemoveWhitelistedAddressPair(ctx sdk.Context, sender, receiver string) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.AddressWhitelistKeyPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.AddressWhitelistKeyPrefix) key := types.GetAddressWhitelistKey(sender, receiver) store.Delete(key) } // Check if a sender/receiver address pair is currently whitelisted func (k Keeper) IsAddressPairWhitelisted(ctx sdk.Context, sender, receiver string) bool { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.AddressWhitelistKeyPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.AddressWhitelistKeyPrefix) key := types.GetAddressWhitelistKey(sender, receiver) value := store.Get(key) @@ -36,7 +39,8 @@ func (k Keeper) IsAddressPairWhitelisted(ctx sdk.Context, sender, receiver strin // Get all the whitelisted addresses func (k Keeper) GetAllWhitelistedAddressPairs(ctx sdk.Context) []types.WhitelistedAddressPair { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.AddressWhitelistKeyPrefix) + adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(adapter, types.AddressWhitelistKeyPrefix) iterator := store.Iterator(nil, nil) defer iterator.Close() diff --git a/ratelimit/keeper/whitelist_test.go b/keeper/whitelist_test.go similarity index 97% rename from ratelimit/keeper/whitelist_test.go rename to keeper/whitelist_test.go index d1ef01d..7fcb2ec 100644 --- a/ratelimit/keeper/whitelist_test.go +++ b/keeper/whitelist_test.go @@ -1,6 +1,6 @@ package keeper_test -import "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" +import "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" func (s *KeeperTestSuite) TestAddressWhitelist() { // Store addresses in whitelist diff --git a/ratelimit/module.go b/module.go similarity index 94% rename from ratelimit/module.go rename to module.go index b275766..70fa8e5 100644 --- a/ratelimit/module.go +++ b/module.go @@ -17,9 +17,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/client/cli" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/keeper" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/client/cli" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/keeper" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) var ( @@ -164,8 +164,3 @@ func (am AppModule) EndBlock(_ sdk.Context) ([]abci.ValidatorUpdate, error) { func (am AppModule) IsAppModule() { panic("unimplemented") } - -// IsOnePerModuleType implements module.AppModule. -func (am AppModule) IsOnePerModuleType() { - panic("unimplemented") -} diff --git a/proto/buf.gen.pulsar.yaml b/proto/buf.gen.pulsar.yaml new file mode 100644 index 0000000..6cb7677 --- /dev/null +++ b/proto/buf.gen.pulsar.yaml @@ -0,0 +1,18 @@ +version: v1 +managed: + enabled: true + go_package_prefix: + default: github.com/cosmos/ibc-apps/modules/rate-limiting/v8/api + except: + - buf.build/cosmos/cosmos-proto + - buf.build/cosmos/gogo-proto + - buf.build/googleapis/googleapis + override: + buf.build/cosmos/cosmos-sdk: cosmossdk.io/api +plugins: + - name: go-pulsar + out: ../api + opt: paths=source_relative + - name: go-grpc + out: ../api + opt: paths=source_relative diff --git a/proto/buf.lock b/proto/buf.lock index def9704..b8aef7f 100644 --- a/proto/buf.lock +++ b/proto/buf.lock @@ -4,20 +4,20 @@ deps: - remote: buf.build owner: cosmos repository: cosmos-proto - commit: 1935555c206d4afb9e94615dfd0fad31 - digest: shake256:c74d91a3ac7ae07d579e90eee33abf9b29664047ac8816500cf22c081fec0d72d62c89ce0bebafc1f6fec7aa5315be72606717740ca95007248425102c365377 + commit: 04467658e59e44bbb22fe568206e1f70 + digest: shake256:73a640bd60e0c523b0f8237ff34eab67c45a38b64bbbde1d80224819d272dbf316ac183526bd245f994af6608b025f5130483d0133c5edd385531326b5990466 - remote: buf.build owner: cosmos repository: cosmos-sdk - commit: 954f7b05f38440fc8250134b15adec47 - digest: shake256:2ab4404fd04a7d1d52df0e2d0f2d477a3d83ffd88d876957bf3fedfd702c8e52833d65b3ce1d89a3c5adf2aab512616b0e4f51d8463f07eda9a8a3317ee3ac54 + commit: 5a6ab7bc14314acaa912d5e53aef1c2f + digest: shake256:02c00c73493720055f9b57553a35b5550023a3c1914123b247956288a78fb913aff70e66552777ae14d759467e119079d484af081264a5dd607a94d9fbc8116b - remote: buf.build owner: cosmos repository: gogo-proto - commit: 34d970b699f84aa382f3c29773a60836 - digest: shake256:3d3bee5229ba579e7d19ffe6e140986a228b48a8c7fe74348f308537ab95e9135210e81812489d42cd8941d33ff71f11583174ccc5972e86e6112924b6ce9f04 + commit: 88ef6483f90f478fb938c37dde52ece3 + digest: shake256:89c45df2aa11e0cff97b0d695436713db3d993d76792e9f8dc1ae90e6ab9a9bec55503d48ceedd6b86069ab07d3041b32001b2bfe0227fa725dd515ff381e5ba - remote: buf.build owner: googleapis repository: googleapis - commit: cc916c31859748a68fd229a3c8d7a2e8 - digest: shake256:469b049d0eb04203d5272062636c078decefc96fec69739159c25d85349c50c34c7706918a8b216c5c27f76939df48452148cff8c5c3ae77fa6ba5c25c1b8bf8 + commit: dae66f69b69443f198292e5958b5e441 + digest: shake256:de26a277fc28b8b411ecf58729d78d32fcf15090ffd998a4469225b17889bfb51442eaab04bb7a8d88d203ecdf0a9febd4ffd52c18ed1c2229160c7bd353ca95 diff --git a/proto/generate.sh b/proto/generate.sh new file mode 100644 index 0000000..37fd4bd --- /dev/null +++ b/proto/generate.sh @@ -0,0 +1,8 @@ +cd proto +buf generate --template buf.gen.gogo.yaml +buf generate --template buf.gen.pulsar.yaml +cd .. + +cp -r github.com/cosmos/ibc-apps/modules/rate-limiting/v8/* ./ +rm -rf github.com +rm -rf ratelimit diff --git a/proto/ratelimit/module/v1/module.proto b/proto/ratelimit/module/v1/module.proto new file mode 100644 index 0000000..9ff6756 --- /dev/null +++ b/proto/ratelimit/module/v1/module.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package ratelimit.module.v1; + +import "cosmos/app/v1alpha1/module.proto"; + +// Module is the config object of the IBC Rate Limiting module. +message Module { + option (cosmos.app.v1alpha1.module) = {go_import: "github.com/cosmos/ibc-apps/modules/rate-limiting/v8"}; + + // authority defines the custom module authority. + string authority = 1; +} diff --git a/proto/ratelimit/v1/genesis.proto b/proto/ratelimit/v1/genesis.proto index 2929a8a..366e890 100644 --- a/proto/ratelimit/v1/genesis.proto +++ b/proto/ratelimit/v1/genesis.proto @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto"; import "ratelimit/v1/params.proto"; import "ratelimit/v1/ratelimit.proto"; -option go_package = "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types"; +option go_package = "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types"; // GenesisState defines the ratelimit module's genesis state. message GenesisState { diff --git a/proto/ratelimit/v1/params.proto b/proto/ratelimit/v1/params.proto index 5f29bcc..dd1ac4a 100644 --- a/proto/ratelimit/v1/params.proto +++ b/proto/ratelimit/v1/params.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package ratelimit.v1; -option go_package = "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types"; +option go_package = "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types"; // Params defines the ratelimit module's parameters. message Params {} diff --git a/proto/ratelimit/v1/query.proto b/proto/ratelimit/v1/query.proto index 5904a48..a466bde 100644 --- a/proto/ratelimit/v1/query.proto +++ b/proto/ratelimit/v1/query.proto @@ -1,62 +1,53 @@ syntax = "proto3"; package ratelimit.v1; -import "ratelimit/v1/ratelimit.proto"; -import "google/api/annotations.proto"; import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "ratelimit/v1/ratelimit.proto"; -option go_package = "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types"; +option go_package = "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types"; // Query defines the gRPC querier service. service Query { // Queries all rate limits - rpc AllRateLimits(QueryAllRateLimitsRequest) - returns (QueryAllRateLimitsResponse) { - option (google.api.http).get = - "/Stride-Labs/ibc-rate-limiting/ratelimit/ratelimits"; + rpc AllRateLimits(QueryAllRateLimitsRequest) returns (QueryAllRateLimitsResponse) { + option (google.api.http).get = "/Stride-Labs/ibc-rate-limiting/ratelimit/ratelimits"; } // Queries a specific rate limit by channel ID and denom // Ex: // - /ratelimit/{channel_id}/by_denom?denom={denom} rpc RateLimit(QueryRateLimitRequest) returns (QueryRateLimitResponse) { - option (google.api.http).get = "/Stride-Labs/ibc-rate-limiting/ratelimit/" - "ratelimit/{channel_id}/by_denom"; + option (google.api.http).get = + "/Stride-Labs/ibc-rate-limiting/ratelimit/" + "ratelimit/{channel_id}/by_denom"; } // Queries all the rate limits for a given chain - rpc RateLimitsByChainId(QueryRateLimitsByChainIdRequest) - returns (QueryRateLimitsByChainIdResponse) { - option (google.api.http).get = - "/Stride-Labs/ibc-rate-limiting/ratelimit/ratelimits/{chain_id}"; + rpc RateLimitsByChainId(QueryRateLimitsByChainIdRequest) returns (QueryRateLimitsByChainIdResponse) { + option (google.api.http).get = "/Stride-Labs/ibc-rate-limiting/ratelimit/ratelimits/{chain_id}"; } // Queries all the rate limits for a given channel ID - rpc RateLimitsByChannelId(QueryRateLimitsByChannelIdRequest) - returns (QueryRateLimitsByChannelIdResponse) { - option (google.api.http).get = - "/Stride-Labs/ibc-rate-limiting/ratelimit/ratelimits/{channel_id}"; + rpc RateLimitsByChannelId(QueryRateLimitsByChannelIdRequest) returns (QueryRateLimitsByChannelIdResponse) { + option (google.api.http).get = "/Stride-Labs/ibc-rate-limiting/ratelimit/ratelimits/{channel_id}"; } // Queries all blacklisted denoms - rpc AllBlacklistedDenoms(QueryAllBlacklistedDenomsRequest) - returns (QueryAllBlacklistedDenomsResponse) { - option (google.api.http).get = - "/Stride-Labs/ibc-rate-limiting/ratelimit/blacklisted_denoms"; + rpc AllBlacklistedDenoms(QueryAllBlacklistedDenomsRequest) returns (QueryAllBlacklistedDenomsResponse) { + option (google.api.http).get = "/Stride-Labs/ibc-rate-limiting/ratelimit/blacklisted_denoms"; } // Queries all whitelisted address pairs - rpc AllWhitelistedAddresses(QueryAllWhitelistedAddressesRequest) - returns (QueryAllWhitelistedAddressesResponse) { - option (google.api.http).get = - "/Stride-Labs/ibc-rate-limiting/ratelimit/whitelisted_addresses"; + rpc AllWhitelistedAddresses(QueryAllWhitelistedAddressesRequest) returns (QueryAllWhitelistedAddressesResponse) { + option (google.api.http).get = "/Stride-Labs/ibc-rate-limiting/ratelimit/whitelisted_addresses"; } } // Queries all rate limits message QueryAllRateLimitsRequest {} message QueryAllRateLimitsResponse { - repeated RateLimit rate_limits = 1 [ (gogoproto.nullable) = false ]; + repeated RateLimit rate_limits = 1 [(gogoproto.nullable) = false]; } // Queries a specific rate limit by channel ID and denom @@ -64,27 +55,34 @@ message QueryRateLimitRequest { string denom = 1; string channel_id = 2; } -message QueryRateLimitResponse { RateLimit rate_limit = 1; } +message QueryRateLimitResponse { + RateLimit rate_limit = 1; +} // Queries all the rate limits for a given chain -message QueryRateLimitsByChainIdRequest { string chain_id = 1; } +message QueryRateLimitsByChainIdRequest { + string chain_id = 1; +} message QueryRateLimitsByChainIdResponse { - repeated RateLimit rate_limits = 1 [ (gogoproto.nullable) = false ]; + repeated RateLimit rate_limits = 1 [(gogoproto.nullable) = false]; } // Queries all the rate limits for a given channel ID -message QueryRateLimitsByChannelIdRequest { string channel_id = 1; } +message QueryRateLimitsByChannelIdRequest { + string channel_id = 1; +} message QueryRateLimitsByChannelIdResponse { - repeated RateLimit rate_limits = 1 [ (gogoproto.nullable) = false ]; + repeated RateLimit rate_limits = 1 [(gogoproto.nullable) = false]; } // Queries all blacklisted denoms message QueryAllBlacklistedDenomsRequest {} -message QueryAllBlacklistedDenomsResponse { repeated string denoms = 1; } +message QueryAllBlacklistedDenomsResponse { + repeated string denoms = 1; +} // Queries all whitelisted address pairs message QueryAllWhitelistedAddressesRequest {} message QueryAllWhitelistedAddressesResponse { - repeated WhitelistedAddressPair address_pairs = 1 - [ (gogoproto.nullable) = false ]; -} \ No newline at end of file + repeated WhitelistedAddressPair address_pairs = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/ratelimit/v1/ratelimit.proto b/proto/ratelimit/v1/ratelimit.proto index b50be3a..0ac3f3f 100644 --- a/proto/ratelimit/v1/ratelimit.proto +++ b/proto/ratelimit/v1/ratelimit.proto @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types"; +option go_package = "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types"; // PacketDirection defines whether the transfer packet is being sent from // this chain or is being received on this chain @@ -87,7 +87,9 @@ message HourEpoch { (gogoproto.stdduration) = true, (gogoproto.jsontag) = "duration,omitempty" ]; - google.protobuf.Timestamp epoch_start_time = 3 - [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; + google.protobuf.Timestamp epoch_start_time = 3 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false + ]; int64 epoch_start_height = 4; -} \ No newline at end of file +} diff --git a/proto/ratelimit/v1/tx.proto b/proto/ratelimit/v1/tx.proto index 87d2efc..ed8ed08 100644 --- a/proto/ratelimit/v1/tx.proto +++ b/proto/ratelimit/v1/tx.proto @@ -1,12 +1,12 @@ syntax = "proto3"; package ratelimit.v1; -import "gogoproto/gogo.proto"; import "amino/amino.proto"; -import "cosmos_proto/cosmos.proto"; import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; -option go_package = "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types"; +option go_package = "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types"; // Msg service for rate limit txs service Msg { @@ -28,7 +28,7 @@ message MsgAddRateLimit { option (amino.name) = "ratelimit/MsgAddRateLimit"; // Authority defines the x/gov module account - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Denom for the rate limit, as it appears on the rate limited chain // When rate limiting a non-native token, this will be an ibc denom string denom = 2; @@ -58,7 +58,7 @@ message MsgUpdateRateLimit { option (amino.name) = "ratelimit/MsgUpdateRateLimit"; // Authority defines the x/gov module account - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Denom for the rate limit, as it appears on the rate limited chain // When rate limiting a non-native token, this will be an ibc denom string denom = 2; @@ -88,7 +88,7 @@ message MsgRemoveRateLimit { option (amino.name) = "ratelimit/MsgRemoveRateLimit"; // Authority defines the x/gov module account - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Denom for the rate limit, as it appears on the rate limited chain // When rate limiting a non-native token, this will be an ibc denom string denom = 2; @@ -103,7 +103,7 @@ message MsgResetRateLimit { option (amino.name) = "ratelimit/MsgResetRateLimit"; // Authority defines the x/gov module account - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Denom for the rate limit, as it appears on the rate limited chain // When rate limiting a non-native token, this will be an ibc denom string denom = 2; diff --git a/ratelimit/LICENSE b/ratelimit/LICENSE deleted file mode 100644 index f74f6d3..0000000 --- a/ratelimit/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright for interchainquery public infrastructure attributed to 2022 Quicksilver - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh deleted file mode 100644 index 7ba8315..0000000 --- a/scripts/protocgen.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -generate_protos() { - package="$1" - proto_dirs=$(find $package -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) - for dir in $proto_dirs; do - for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do - if grep go_package "$file" &>/dev/null; then - buf generate --template buf.gen.gogo.yaml "$file" - fi - done - done -} - -echo "Generating gogo proto code" -cd proto - -generate_protos "./ratelimit" - -cd .. - -# move proto files to the right places -# -# Note: Proto files are suffixed with the current binary version. -cp -r github.com/Stride-Labs/ibc-rate-limiting/ratelimit/* ratelimit/ -rm -rf github.com diff --git a/testing/simapp/app.go b/testing/simapp/app.go index ffd1dee..8c61e6d 100644 --- a/testing/simapp/app.go +++ b/testing/simapp/app.go @@ -7,9 +7,9 @@ import ( "os" "path/filepath" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit" - ratelimitkeeper "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/keeper" - ratelimittypes "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8" + ratelimitkeeper "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/keeper" + ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" "github.com/gorilla/mux" "github.com/rakyll/statik/fs" @@ -464,7 +464,7 @@ func NewSimApp( // Create the rate limit keeper app.RatelimitKeeper = *ratelimitkeeper.NewKeeper( appCodec, - keys[ratelimittypes.StoreKey], + runtime.NewKVStoreService(keys[ratelimittypes.StoreKey]), app.GetSubspace(ratelimittypes.ModuleName), authtypes.NewModuleAddress(govtypes.ModuleName).String(), app.BankKeeper, diff --git a/testing/simapp/apptesting/test_helpers.go b/testing/simapp/apptesting/test_helpers.go index 647079a..f845758 100644 --- a/testing/simapp/apptesting/test_helpers.go +++ b/testing/simapp/apptesting/test_helpers.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" - app "github.com/Stride-Labs/ibc-rate-limiting/testing/simapp" + app "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/testing/simapp" ) var ( diff --git a/testing/simapp/encoding.go b/testing/simapp/encoding.go index 570cd6b..92be35c 100644 --- a/testing/simapp/encoding.go +++ b/testing/simapp/encoding.go @@ -1,7 +1,7 @@ package simapp import ( - appparams "github.com/Stride-Labs/ibc-rate-limiting/testing/simapp/params" + appparams "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/testing/simapp/params" "github.com/cosmos/cosmos-sdk/std" ) diff --git a/testing/simapp/simd/main.go b/testing/simapp/simd/main.go index a5f779d..7c22177 100644 --- a/testing/simapp/simd/main.go +++ b/testing/simapp/simd/main.go @@ -3,7 +3,7 @@ package main import ( "os" - "github.com/Stride-Labs/ibc-rate-limiting/testing/simapp" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/testing/simapp" "cosmossdk.io/log" diff --git a/testing/simapp/simd/root.go b/testing/simapp/simd/root.go index f31ca10..04df773 100644 --- a/testing/simapp/simd/root.go +++ b/testing/simapp/simd/root.go @@ -5,8 +5,8 @@ import ( "io" "os" - app "github.com/Stride-Labs/ibc-rate-limiting/testing/simapp" - appparams "github.com/Stride-Labs/ibc-rate-limiting/testing/simapp/params" + app "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/testing/simapp" + appparams "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/testing/simapp/params" "github.com/spf13/cast" "github.com/spf13/cobra" diff --git a/ratelimit/types/codec.go b/types/codec.go similarity index 100% rename from ratelimit/types/codec.go rename to types/codec.go diff --git a/ratelimit/types/errors.go b/types/errors.go similarity index 100% rename from ratelimit/types/errors.go rename to types/errors.go diff --git a/ratelimit/types/events.go b/types/events.go similarity index 100% rename from ratelimit/types/events.go rename to types/events.go diff --git a/ratelimit/types/expected_keepers.go b/types/expected_keepers.go similarity index 100% rename from ratelimit/types/expected_keepers.go rename to types/expected_keepers.go diff --git a/ratelimit/types/flow.go b/types/flow.go similarity index 100% rename from ratelimit/types/flow.go rename to types/flow.go diff --git a/ratelimit/types/flow_test.go b/types/flow_test.go similarity index 98% rename from ratelimit/types/flow_test.go rename to types/flow_test.go index eb7bc2c..fab993a 100644 --- a/ratelimit/types/flow_test.go +++ b/types/flow_test.go @@ -6,7 +6,7 @@ import ( sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) func TestAddInflow(t *testing.T) { diff --git a/ratelimit/types/genesis.go b/types/genesis.go similarity index 100% rename from ratelimit/types/genesis.go rename to types/genesis.go diff --git a/ratelimit/types/genesis.pb.go b/types/genesis.pb.go similarity index 84% rename from ratelimit/types/genesis.pb.go rename to types/genesis.pb.go index 32d388f..fe601e2 100644 --- a/ratelimit/types/genesis.pb.go +++ b/types/genesis.pb.go @@ -115,35 +115,35 @@ func init() { func init() { proto.RegisterFile("ratelimit/v1/genesis.proto", fileDescriptor_fbb08d6119688a03) } var fileDescriptor_fbb08d6119688a03 = []byte{ - // 442 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x4f, 0x6b, 0xd4, 0x40, - 0x1c, 0x86, 0x37, 0x6e, 0x5d, 0xe8, 0x6c, 0x3d, 0x74, 0xa8, 0x34, 0x1b, 0x24, 0x0d, 0xa1, 0x87, - 0xbd, 0x6c, 0x42, 0xeb, 0x45, 0xbc, 0xb9, 0x2a, 0x7a, 0x28, 0x65, 0xcd, 0x0a, 0x82, 0x97, 0x30, - 0x49, 0x7e, 0x24, 0x43, 0x37, 0x33, 0x71, 0x66, 0xd2, 0xd2, 0x6f, 0x20, 0x9e, 0xfc, 0x58, 0x3d, - 0xf6, 0xe8, 0xa9, 0xc8, 0xee, 0x37, 0xf0, 0x13, 0x48, 0x66, 0xc6, 0xfd, 0x23, 0x7a, 0x4b, 0x78, - 0x9f, 0xe7, 0x7d, 0x99, 0x64, 0x90, 0x27, 0x88, 0x82, 0x05, 0xad, 0xa9, 0x8a, 0xaf, 0xcf, 0xe2, - 0x12, 0x18, 0x48, 0x2a, 0xa3, 0x46, 0x70, 0xc5, 0xf1, 0xc1, 0x3a, 0x8b, 0xae, 0xcf, 0xbc, 0xa3, - 0x92, 0x97, 0x5c, 0x07, 0x71, 0xf7, 0x64, 0x18, 0x6f, 0xb4, 0xe3, 0x37, 0x44, 0x90, 0xda, 0xea, - 0xde, 0xb3, 0x9d, 0x68, 0xd3, 0xa5, 0xd3, 0xf0, 0xeb, 0x1e, 0x3a, 0x78, 0x67, 0xe6, 0xe6, 0x8a, - 0x28, 0xc0, 0xaf, 0xd1, 0xc0, 0xe8, 0xae, 0x13, 0x38, 0xe3, 0xe1, 0xf9, 0x51, 0xb4, 0x3d, 0x1f, - 0xcd, 0x74, 0x36, 0x7d, 0x7a, 0xf7, 0x70, 0xd2, 0xfb, 0xf5, 0x70, 0xf2, 0xe4, 0x96, 0xd4, 0x8b, - 0x97, 0xa1, 0x31, 0xc2, 0xc4, 0xaa, 0xf8, 0x23, 0x1a, 0x76, 0x56, 0xaa, 0x35, 0xe9, 0x3e, 0x0a, - 0xfa, 0xe3, 0xe1, 0xf9, 0xf1, 0x6e, 0x53, 0x42, 0x14, 0x5c, 0x74, 0x2f, 0x53, 0xcf, 0x96, 0x61, - 0x53, 0xb6, 0x65, 0x86, 0x09, 0x12, 0x7f, 0x30, 0x89, 0xbf, 0x39, 0x68, 0x74, 0x53, 0xd1, 0xae, - 0x43, 0x2a, 0x28, 0x52, 0x52, 0x14, 0x02, 0xa4, 0x4c, 0x1b, 0x42, 0x85, 0x74, 0xfb, 0x7a, 0xe4, - 0x74, 0x77, 0xe4, 0xd3, 0x06, 0x7f, 0x65, 0xe8, 0x19, 0xa1, 0x62, 0x3a, 0xb6, 0x8b, 0x81, 0x59, - 0xfc, 0x6f, 0x69, 0x98, 0x1c, 0xdf, 0xfc, 0xb3, 0x41, 0xe2, 0x09, 0xc2, 0xd9, 0x82, 0xe4, 0x57, - 0x56, 0x2b, 0x80, 0xf1, 0x5a, 0xba, 0x7b, 0x41, 0x7f, 0xbc, 0x9f, 0x1c, 0x6e, 0x25, 0x6f, 0x74, - 0x80, 0x2f, 0xd1, 0x69, 0x03, 0xac, 0xa0, 0xac, 0x4c, 0x25, 0xb0, 0x22, 0x6d, 0x48, 0x7e, 0x05, - 0x2a, 0x95, 0xf0, 0xa5, 0x05, 0x96, 0x43, 0xca, 0xda, 0x3a, 0x03, 0x21, 0xdd, 0xc7, 0xba, 0x20, - 0xb0, 0xec, 0x1c, 0x58, 0x31, 0xd3, 0xe4, 0xdc, 0x82, 0x97, 0x86, 0xc3, 0x1f, 0x10, 0xaa, 0x78, - 0x2b, 0x52, 0x68, 0x78, 0x5e, 0xb9, 0x03, 0xfd, 0xab, 0xfe, 0xfa, 0xc0, 0xef, 0x79, 0x2b, 0xde, - 0x76, 0xf1, 0x74, 0x64, 0x8f, 0x7b, 0x68, 0x8e, 0xbb, 0x11, 0xc3, 0x64, 0xbf, 0x5a, 0x53, 0xc9, - 0xdd, 0xd2, 0x77, 0xee, 0x97, 0xbe, 0xf3, 0x73, 0xe9, 0x3b, 0xdf, 0x57, 0x7e, 0xef, 0x7e, 0xe5, - 0xf7, 0x7e, 0xac, 0xfc, 0xde, 0xe7, 0x17, 0x25, 0x55, 0x55, 0x9b, 0x45, 0x39, 0xaf, 0xe3, 0xb9, - 0x12, 0xb4, 0x80, 0xc9, 0x05, 0xc9, 0x64, 0x4c, 0xb3, 0x7c, 0xd2, 0x4d, 0x4e, 0xf4, 0x26, 0x65, - 0xe5, 0xe6, 0x7a, 0xc5, 0xea, 0xb6, 0x01, 0x99, 0x0d, 0xf4, 0x2d, 0x7b, 0xfe, 0x3b, 0x00, 0x00, - 0xff, 0xff, 0x44, 0x16, 0x33, 0x59, 0xe0, 0x02, 0x00, 0x00, + // 448 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xb1, 0x6e, 0xd3, 0x40, + 0x1c, 0xc6, 0x63, 0x52, 0x22, 0xf5, 0x52, 0x86, 0x5a, 0x45, 0x75, 0x2c, 0xe4, 0x5a, 0x56, 0x87, + 0x2c, 0xb1, 0xd5, 0xb2, 0x00, 0x1b, 0x01, 0x04, 0x03, 0xaa, 0x82, 0x83, 0x84, 0xc4, 0x62, 0x9d, + 0xed, 0xbf, 0xec, 0x53, 0x63, 0xdf, 0x71, 0xff, 0x73, 0xaa, 0xbe, 0x01, 0x62, 0xe2, 0xb1, 0x3a, + 0x76, 0x64, 0xaa, 0x50, 0xf2, 0x06, 0x3c, 0x01, 0xf2, 0x9d, 0x69, 0x12, 0x04, 0x9b, 0xad, 0xef, + 0xf7, 0xfb, 0x3e, 0x9d, 0x7d, 0xc4, 0x95, 0x54, 0xc1, 0x82, 0x55, 0x4c, 0x45, 0xcb, 0xb3, 0xa8, + 0x80, 0x1a, 0x90, 0x61, 0x28, 0x24, 0x57, 0xdc, 0x3e, 0xb8, 0xcf, 0xc2, 0xe5, 0x99, 0x7b, 0x54, + 0xf0, 0x82, 0xeb, 0x20, 0x6a, 0x9f, 0x0c, 0xe3, 0x8e, 0x76, 0x7c, 0x41, 0x25, 0xad, 0x3a, 0xdd, + 0x7d, 0xb2, 0x13, 0x6d, 0xba, 0x74, 0x1a, 0x7c, 0xdd, 0x23, 0x07, 0x6f, 0xcd, 0xdc, 0x5c, 0x51, + 0x05, 0xf6, 0x2b, 0x32, 0x30, 0xba, 0x63, 0xf9, 0xd6, 0x78, 0x78, 0x7e, 0x14, 0x6e, 0xcf, 0x87, + 0x33, 0x9d, 0x4d, 0x1f, 0xdf, 0xdc, 0x9d, 0xf4, 0x7e, 0xdd, 0x9d, 0x3c, 0xba, 0xa6, 0xd5, 0xe2, + 0x45, 0x60, 0x8c, 0x20, 0xee, 0x54, 0xfb, 0x23, 0x19, 0xb6, 0x56, 0xa2, 0x35, 0x74, 0x1e, 0xf8, + 0xfd, 0xf1, 0xf0, 0xfc, 0x78, 0xb7, 0x29, 0xa6, 0x0a, 0xde, 0xb7, 0x2f, 0x53, 0xb7, 0x2b, 0xb3, + 0x4d, 0xd9, 0x96, 0x19, 0xc4, 0x44, 0xfe, 0xc1, 0xd0, 0xfe, 0x66, 0x91, 0xd1, 0x55, 0xc9, 0xda, + 0x0e, 0x54, 0x90, 0x27, 0x34, 0xcf, 0x25, 0x20, 0x26, 0x82, 0x32, 0x89, 0x4e, 0x5f, 0x8f, 0x9c, + 0xee, 0x8e, 0x7c, 0xda, 0xe0, 0x2f, 0x0d, 0x3d, 0xa3, 0x4c, 0x4e, 0xc7, 0xdd, 0xa2, 0x6f, 0x16, + 0xff, 0x5b, 0x1a, 0xc4, 0xc7, 0x57, 0xff, 0x6c, 0x40, 0x7b, 0x42, 0xec, 0x74, 0x41, 0xb3, 0xcb, + 0x4e, 0xcb, 0xa1, 0xe6, 0x15, 0x3a, 0x7b, 0x7e, 0x7f, 0xbc, 0x1f, 0x1f, 0x6e, 0x25, 0xaf, 0x75, + 0x60, 0x5f, 0x90, 0x53, 0x01, 0x75, 0xce, 0xea, 0x22, 0x41, 0xa8, 0xf3, 0x44, 0xd0, 0xec, 0x12, + 0x54, 0x82, 0xf0, 0xa5, 0x81, 0x3a, 0x83, 0xa4, 0x6e, 0xaa, 0x14, 0x24, 0x3a, 0x0f, 0x75, 0x81, + 0xdf, 0xb1, 0x73, 0xa8, 0xf3, 0x99, 0x26, 0xe7, 0x1d, 0x78, 0x61, 0x38, 0xfb, 0x03, 0x21, 0x25, + 0x6f, 0x64, 0x02, 0x82, 0x67, 0xa5, 0x33, 0xd0, 0xbf, 0xea, 0xaf, 0x0f, 0xfc, 0x8e, 0x37, 0xf2, + 0x4d, 0x1b, 0x4f, 0x47, 0xdd, 0x71, 0x0f, 0xcd, 0x71, 0x37, 0x62, 0x10, 0xef, 0x97, 0xf7, 0xd4, + 0xfc, 0x66, 0xe5, 0x59, 0xb7, 0x2b, 0xcf, 0xfa, 0xb9, 0xf2, 0xac, 0xef, 0x6b, 0xaf, 0x77, 0xbb, + 0xf6, 0x7a, 0x3f, 0xd6, 0x5e, 0xef, 0xf3, 0xf3, 0x82, 0xa9, 0xb2, 0x49, 0xc3, 0x8c, 0x57, 0x51, + 0xc6, 0xb1, 0xe2, 0x18, 0xb1, 0x34, 0x9b, 0x50, 0x21, 0x30, 0xaa, 0x78, 0xde, 0x2c, 0x00, 0xf5, + 0xc5, 0x9a, 0xe8, 0x6d, 0x56, 0x17, 0xd1, 0xf2, 0x59, 0xa4, 0xae, 0x05, 0x60, 0x3a, 0xd0, 0xd7, + 0xec, 0xe9, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xea, 0x31, 0x41, 0xf9, 0xe1, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/ratelimit/types/genesis_test.go b/types/genesis_test.go similarity index 97% rename from ratelimit/types/genesis_test.go rename to types/genesis_test.go index b2e9378..4b82ec3 100644 --- a/ratelimit/types/genesis_test.go +++ b/types/genesis_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" "github.com/stretchr/testify/require" ) diff --git a/ratelimit/types/keys.go b/types/keys.go similarity index 100% rename from ratelimit/types/keys.go rename to types/keys.go diff --git a/ratelimit/types/msgs.go b/types/msgs.go similarity index 100% rename from ratelimit/types/msgs.go rename to types/msgs.go diff --git a/ratelimit/types/msgs_test.go b/types/msgs_test.go similarity index 98% rename from ratelimit/types/msgs_test.go rename to types/msgs_test.go index 00f76ab..a1f5fce 100644 --- a/ratelimit/types/msgs_test.go +++ b/types/msgs_test.go @@ -8,8 +8,8 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/stretchr/testify/require" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" - "github.com/Stride-Labs/ibc-rate-limiting/testing/simapp/apptesting" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/testing/simapp/apptesting" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) // ---------------------------------------------- diff --git a/ratelimit/types/params.go b/types/params.go similarity index 100% rename from ratelimit/types/params.go rename to types/params.go diff --git a/ratelimit/types/params.pb.go b/types/params.pb.go similarity index 91% rename from ratelimit/types/params.pb.go rename to types/params.pb.go index 8be3f1e..b35f808 100644 --- a/ratelimit/types/params.pb.go +++ b/types/params.pb.go @@ -66,16 +66,17 @@ func init() { func init() { proto.RegisterFile("ratelimit/v1/params.proto", fileDescriptor_3a98f618ae7612ca) } var fileDescriptor_3a98f618ae7612ca = []byte{ - // 143 bytes of a gzipped FileDescriptorProto + // 152 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2c, 0x4a, 0x2c, 0x49, 0xcd, 0xc9, 0xcc, 0xcd, 0x2c, 0xd1, 0x2f, 0x33, 0xd4, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x81, 0x4b, 0xe9, 0x95, 0x19, 0x2a, 0x71, 0x70, 0xb1, - 0x05, 0x80, 0x65, 0x9d, 0x82, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, + 0x05, 0x80, 0x65, 0x9d, 0x82, 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, 0xca, - 0x22, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0xb8, 0xa4, 0x28, 0x33, - 0x25, 0x55, 0xd7, 0x27, 0x31, 0xa9, 0x58, 0x3f, 0x33, 0x29, 0x59, 0x17, 0x64, 0x98, 0x2e, 0xd8, - 0xb4, 0xcc, 0xbc, 0x74, 0x7d, 0x84, 0xad, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0x2b, - 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x5d, 0x17, 0x50, 0x8f, 0x00, 0x00, 0x00, + 0x32, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x39, 0xbf, 0x38, 0x37, + 0xbf, 0x58, 0x3f, 0x33, 0x29, 0x59, 0x37, 0xb1, 0xa0, 0xa0, 0x58, 0x3f, 0x37, 0x3f, 0xa5, 0x34, + 0x27, 0xb5, 0x58, 0x1f, 0x64, 0xa8, 0x2e, 0xd8, 0xd4, 0xcc, 0xbc, 0x74, 0xfd, 0x32, 0x0b, 0xfd, + 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0x9d, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x1f, 0x2e, 0xf2, 0x3c, 0x90, 0x00, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/ratelimit/types/query.pb.go b/types/query.pb.go similarity index 93% rename from ratelimit/types/query.pb.go rename to types/query.pb.go index 5975aa8..dfe256f 100644 --- a/ratelimit/types/query.pb.go +++ b/types/query.pb.go @@ -565,51 +565,52 @@ func init() { func init() { proto.RegisterFile("ratelimit/v1/query.proto", fileDescriptor_d909918e357d6d0b) } var fileDescriptor_d909918e357d6d0b = []byte{ - // 692 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x4f, 0xd4, 0x4e, - 0x14, 0xdf, 0xe1, 0xfb, 0x05, 0xd9, 0x07, 0x5c, 0x46, 0x7e, 0x2c, 0x15, 0x17, 0x2c, 0x18, 0xb9, - 0x6c, 0x2b, 0x10, 0x8d, 0x09, 0x4a, 0x60, 0x31, 0x06, 0x0c, 0x89, 0x58, 0x0f, 0x26, 0xc6, 0x64, - 0x33, 0x6d, 0x27, 0xdd, 0x89, 0xa5, 0x5d, 0x3a, 0x05, 0xb2, 0x31, 0x5c, 0xfc, 0x0b, 0x4c, 0xfc, - 0x03, 0xbc, 0xfa, 0x47, 0x78, 0xf4, 0xc0, 0x91, 0xc4, 0x8b, 0x27, 0x63, 0x80, 0x3f, 0xc4, 0x74, - 0x3a, 0x6d, 0x2d, 0x74, 0x97, 0x85, 0x70, 0x9b, 0xce, 0x7b, 0xef, 0xf3, 0x3e, 0x9f, 0x37, 0xef, - 0xbd, 0x14, 0x2a, 0x01, 0x09, 0xa9, 0xcb, 0x76, 0x58, 0xa8, 0xef, 0x2f, 0xe8, 0xbb, 0x7b, 0x34, - 0x68, 0x6b, 0xad, 0xc0, 0x0f, 0x7d, 0x3c, 0x9c, 0x5a, 0xb4, 0xfd, 0x05, 0x65, 0x2a, 0xe7, 0x97, - 0x99, 0x84, 0xaf, 0x32, 0xe5, 0xf8, 0xbe, 0xe3, 0x52, 0x9d, 0xb4, 0x98, 0x4e, 0x3c, 0xcf, 0x0f, - 0x49, 0xc8, 0x7c, 0x8f, 0x4b, 0xeb, 0xa8, 0xe3, 0x3b, 0xbe, 0x38, 0xea, 0xd1, 0x29, 0xbe, 0x55, - 0xef, 0xc0, 0xe4, 0xeb, 0x28, 0xdd, 0x9a, 0xeb, 0x1a, 0x24, 0xa4, 0x5b, 0x11, 0x1c, 0x37, 0xe8, - 0xee, 0x1e, 0xe5, 0xa1, 0xfa, 0x1e, 0x94, 0x22, 0x23, 0x6f, 0xf9, 0x1e, 0xa7, 0x78, 0x05, 0x86, - 0x22, 0x06, 0x0d, 0x41, 0x81, 0x57, 0xd0, 0xcc, 0x7f, 0xf3, 0x43, 0x8b, 0x13, 0xda, 0xbf, 0x84, - 0xb5, 0x34, 0xac, 0xfe, 0xff, 0xd1, 0xef, 0xe9, 0x92, 0x01, 0x41, 0x8a, 0xa3, 0x6e, 0xc1, 0x98, - 0x40, 0x4f, 0x7d, 0x64, 0x5a, 0x3c, 0x0a, 0xfd, 0x36, 0xf5, 0xfc, 0x9d, 0x0a, 0x9a, 0x41, 0xf3, - 0x65, 0x23, 0xfe, 0xc0, 0x77, 0x01, 0xac, 0x26, 0xf1, 0x3c, 0xea, 0x36, 0x98, 0x5d, 0xe9, 0x13, - 0xa6, 0xb2, 0xbc, 0xd9, 0xb4, 0xd5, 0x6d, 0x18, 0x3f, 0x8f, 0x26, 0x79, 0x3e, 0x06, 0xc8, 0x78, - 0x0a, 0xcc, 0xce, 0x34, 0x8d, 0x72, 0x4a, 0x50, 0x7d, 0x0a, 0xd3, 0x79, 0x44, 0x5e, 0x6f, 0xaf, - 0x37, 0x09, 0xf3, 0x36, 0xed, 0x84, 0xe9, 0x24, 0x0c, 0x5a, 0xd1, 0x4d, 0xc4, 0x28, 0x26, 0x7b, - 0xcb, 0x8a, 0x3d, 0x54, 0x13, 0x66, 0x3a, 0x47, 0xdf, 0x50, 0x05, 0xeb, 0x70, 0xaf, 0x28, 0x47, - 0x5c, 0x91, 0x84, 0x63, 0xbe, 0x6e, 0xe8, 0x7c, 0xdd, 0x6c, 0x50, 0xbb, 0x61, 0xdc, 0x10, 0x53, - 0x55, 0x56, 0x63, 0xcd, 0x75, 0xeb, 0x2e, 0xb1, 0x3e, 0xb8, 0x8c, 0x87, 0xd4, 0x7e, 0x1e, 0x3d, - 0x6c, 0xda, 0x6d, 0xcb, 0x52, 0x4d, 0xb1, 0x8f, 0x24, 0x32, 0x0e, 0x03, 0xa2, 0x1d, 0x62, 0x0e, - 0x65, 0x43, 0x7e, 0xa9, 0xf7, 0x61, 0x36, 0x09, 0x7e, 0xdb, 0x64, 0x11, 0xab, 0x28, 0x78, 0xcd, - 0xb6, 0x03, 0xca, 0x39, 0x4d, 0x73, 0x1c, 0xc0, 0x5c, 0x77, 0x37, 0x99, 0xe6, 0x15, 0x8c, 0x90, - 0xf8, 0xb2, 0xd1, 0x22, 0x2c, 0x48, 0x14, 0xcf, 0xe5, 0x15, 0x5f, 0x84, 0xd8, 0x26, 0x2c, 0x90, - 0xf2, 0x87, 0x49, 0x76, 0xc5, 0x17, 0xcf, 0x06, 0xa1, 0x5f, 0x64, 0xc6, 0x5f, 0x11, 0x8c, 0xe4, - 0x06, 0x0a, 0x3f, 0xc8, 0xa3, 0x76, 0x9c, 0x47, 0x65, 0xfe, 0x72, 0xc7, 0x98, 0xbf, 0xba, 0xfc, - 0xe9, 0xe7, 0xd9, 0x97, 0xbe, 0x47, 0x78, 0x49, 0x7f, 0x13, 0x06, 0xcc, 0xa6, 0xb5, 0x2d, 0x62, - 0x72, 0x9d, 0x99, 0x56, 0x2d, 0x42, 0xa8, 0x09, 0x08, 0xe6, 0x39, 0xd9, 0x0a, 0xc9, 0x4e, 0x1c, - 0x7f, 0x43, 0x50, 0x4e, 0x31, 0xf1, 0x6c, 0x41, 0xd2, 0xf3, 0x23, 0xab, 0xcc, 0x75, 0x77, 0x92, - 0xac, 0xb6, 0x05, 0xab, 0x97, 0x78, 0xe3, 0xea, 0xac, 0xf4, 0x8f, 0x59, 0x13, 0x1f, 0xea, 0x66, - 0xbb, 0x11, 0x2f, 0x85, 0xef, 0x08, 0x6e, 0x17, 0x4c, 0x18, 0xae, 0x75, 0xe3, 0x73, 0x61, 0x8e, - 0x15, 0xad, 0x57, 0x77, 0x29, 0xe4, 0x85, 0x10, 0xb2, 0x8a, 0x57, 0xae, 0x51, 0x5e, 0xa1, 0x44, - 0xac, 0x8c, 0x43, 0xfc, 0x03, 0xc1, 0x58, 0xe1, 0xe0, 0x61, 0xfd, 0x72, 0x46, 0xb9, 0x31, 0x57, - 0x1e, 0xf6, 0x1e, 0x20, 0x45, 0x6c, 0x08, 0x11, 0x75, 0xbc, 0x7a, 0x5d, 0x11, 0xc9, 0x73, 0x44, - 0xaf, 0x30, 0x5a, 0x34, 0xb5, 0x58, 0x2b, 0x6e, 0xd8, 0x4e, 0x2b, 0x40, 0xd1, 0x7b, 0xf6, 0x97, - 0x1a, 0xd6, 0x85, 0x86, 0x67, 0x78, 0xb9, 0x67, 0x0d, 0x66, 0x86, 0x15, 0xf7, 0x10, 0xc7, 0x47, - 0x08, 0x26, 0x3a, 0x2c, 0x04, 0xbc, 0x50, 0xcc, 0xa8, 0xcb, 0x8e, 0x51, 0x16, 0xaf, 0x12, 0x72, - 0xed, 0x86, 0x3a, 0xc8, 0xe0, 0x1a, 0x24, 0xc1, 0xab, 0x1b, 0x47, 0x27, 0x55, 0x74, 0x7c, 0x52, - 0x45, 0x7f, 0x4e, 0xaa, 0xe8, 0xf3, 0x69, 0xb5, 0x74, 0x7c, 0x5a, 0x2d, 0xfd, 0x3a, 0xad, 0x96, - 0xde, 0x3d, 0x71, 0x58, 0xd8, 0xdc, 0x33, 0x35, 0xcb, 0xdf, 0xe9, 0x39, 0x47, 0xd8, 0x6e, 0x51, - 0x6e, 0x0e, 0x88, 0x3f, 0x85, 0xa5, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x83, 0x66, 0x8e, - 0xa5, 0x08, 0x00, 0x00, + // 710 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x4f, 0x14, 0x4d, + 0x10, 0xde, 0xe1, 0x7d, 0xe1, 0x65, 0x0b, 0xb8, 0xf4, 0xcb, 0xc7, 0x32, 0xea, 0x82, 0x03, 0x46, + 0x2e, 0x3b, 0x2d, 0x10, 0x8d, 0x06, 0x25, 0xb0, 0x18, 0x03, 0x86, 0x44, 0x5c, 0x0e, 0x26, 0xc6, + 0x64, 0xd3, 0x33, 0xd3, 0xd9, 0xed, 0x38, 0x3b, 0x3d, 0x4c, 0xcf, 0x42, 0x36, 0x86, 0x8b, 0xbf, + 0xc0, 0xc4, 0x1f, 0xe0, 0xd5, 0x1f, 0xe1, 0xd1, 0x03, 0x47, 0x12, 0x2f, 0x9e, 0x8c, 0x01, 0x7e, + 0x88, 0x99, 0x9e, 0x2f, 0x07, 0x66, 0x97, 0x85, 0x70, 0x9b, 0xee, 0xaa, 0x7a, 0xea, 0x79, 0xaa, + 0xab, 0x2a, 0x03, 0x25, 0x8f, 0xf8, 0xd4, 0x66, 0x2d, 0xe6, 0xe3, 0xfd, 0x45, 0xbc, 0xd7, 0xa6, + 0x5e, 0x47, 0x77, 0x3d, 0xee, 0x73, 0x34, 0x9a, 0x58, 0xf4, 0xfd, 0x45, 0x75, 0xbc, 0xc1, 0x1b, + 0x5c, 0x1a, 0x70, 0xf0, 0x15, 0xfa, 0xa8, 0xb7, 0x1b, 0x9c, 0x37, 0x6c, 0x8a, 0x89, 0xcb, 0x30, + 0x71, 0x1c, 0xee, 0x13, 0x9f, 0x71, 0x47, 0xc4, 0xd6, 0x0c, 0x76, 0x0a, 0x27, 0xad, 0xda, 0x2d, + 0x98, 0x7e, 0x1d, 0xa4, 0x5b, 0xb7, 0xed, 0x1a, 0xf1, 0xe9, 0x76, 0x60, 0x12, 0x35, 0xba, 0xd7, + 0xa6, 0xc2, 0xd7, 0xde, 0x81, 0x9a, 0x67, 0x14, 0x2e, 0x77, 0x04, 0x45, 0xab, 0x30, 0x12, 0xa0, + 0xd5, 0x25, 0x9c, 0x28, 0x29, 0xb3, 0xff, 0x2c, 0x8c, 0x2c, 0x4d, 0xe9, 0x7f, 0x13, 0xd6, 0x93, + 0xb0, 0xea, 0xbf, 0x47, 0xbf, 0x66, 0x0a, 0x35, 0xf0, 0x12, 0x1c, 0x6d, 0x1b, 0x26, 0x24, 0x7a, + 0xe2, 0x13, 0xa5, 0x45, 0xe3, 0x30, 0x68, 0x51, 0x87, 0xb7, 0x4a, 0xca, 0xac, 0xb2, 0x50, 0xac, + 0x85, 0x07, 0x74, 0x07, 0xc0, 0x6c, 0x12, 0xc7, 0xa1, 0x76, 0x9d, 0x59, 0xa5, 0x01, 0x69, 0x2a, + 0x46, 0x37, 0x5b, 0x96, 0xb6, 0x03, 0x93, 0xe7, 0xd1, 0x22, 0x9e, 0x8f, 0x00, 0x52, 0x9e, 0x12, + 0xb3, 0x3b, 0xcd, 0x5a, 0x31, 0x21, 0xa8, 0x3d, 0x85, 0x99, 0x2c, 0xa2, 0xa8, 0x76, 0x36, 0x9a, + 0x84, 0x39, 0x5b, 0x56, 0xcc, 0x74, 0x1a, 0x86, 0xcd, 0xe0, 0x26, 0x60, 0x14, 0x92, 0xfd, 0xcf, + 0x0c, 0x3d, 0x34, 0x03, 0x66, 0xbb, 0x47, 0xdf, 0x50, 0x05, 0xab, 0x70, 0x37, 0x2f, 0x47, 0x58, + 0x91, 0x98, 0x63, 0xb6, 0x6e, 0xca, 0xf9, 0xba, 0x59, 0xa0, 0xf5, 0xc2, 0xb8, 0x21, 0xa6, 0x5a, + 0x54, 0x8d, 0x75, 0xdb, 0xae, 0xda, 0xc4, 0x7c, 0x6f, 0x33, 0xe1, 0x53, 0xeb, 0x79, 0xf0, 0xb0, + 0x49, 0xb7, 0xad, 0x44, 0x6a, 0xf2, 0x7d, 0x22, 0x22, 0x93, 0x30, 0x24, 0xdb, 0x21, 0xe4, 0x50, + 0xac, 0x45, 0x27, 0xed, 0x1e, 0xcc, 0xc5, 0xc1, 0x6f, 0x9a, 0x2c, 0x60, 0x15, 0x04, 0xaf, 0x5b, + 0x96, 0x47, 0x85, 0xa0, 0x49, 0x8e, 0x03, 0x98, 0xef, 0xed, 0x16, 0xa5, 0x79, 0x05, 0x63, 0x24, + 0xbc, 0xac, 0xbb, 0x84, 0x79, 0xb1, 0xe2, 0xf9, 0xac, 0xe2, 0x8b, 0x10, 0x3b, 0x84, 0x79, 0x91, + 0xfc, 0x51, 0x92, 0x5e, 0x89, 0xa5, 0xb3, 0x61, 0x18, 0x94, 0x99, 0xd1, 0x17, 0x05, 0xc6, 0x32, + 0x03, 0x85, 0xee, 0x67, 0x51, 0xbb, 0xce, 0xa3, 0xba, 0x70, 0xb9, 0x63, 0xc8, 0x5f, 0x5b, 0xf9, + 0xf8, 0xe3, 0xec, 0xf3, 0xc0, 0x43, 0xb4, 0x8c, 0x77, 0x7d, 0x8f, 0x59, 0xb4, 0xb2, 0x4d, 0x0c, + 0x81, 0x99, 0x61, 0x56, 0x02, 0x84, 0x8a, 0x84, 0x60, 0x4e, 0x23, 0x5d, 0x07, 0xe9, 0x97, 0x40, + 0x5f, 0x15, 0x28, 0x26, 0x98, 0x68, 0x2e, 0x27, 0xe9, 0xf9, 0x91, 0x55, 0xe7, 0x7b, 0x3b, 0x45, + 0xac, 0x76, 0x24, 0xab, 0x97, 0x68, 0xf3, 0xea, 0xac, 0xf0, 0x87, 0xb4, 0x89, 0x0f, 0xb1, 0xd1, + 0xa9, 0x87, 0x4b, 0xe1, 0x9b, 0x02, 0xff, 0xe7, 0x4c, 0x18, 0xaa, 0xf4, 0xe2, 0x73, 0x61, 0x8e, + 0x55, 0xbd, 0x5f, 0xf7, 0x48, 0xc8, 0x0b, 0x29, 0x64, 0x0d, 0xad, 0x5e, 0xa3, 0xbc, 0x52, 0x89, + 0x5c, 0x19, 0x87, 0xe8, 0xbb, 0x02, 0x13, 0xb9, 0x83, 0x87, 0xf0, 0xe5, 0x8c, 0x32, 0x63, 0xae, + 0x3e, 0xe8, 0x3f, 0x20, 0x12, 0xb1, 0x29, 0x45, 0x54, 0xd1, 0xda, 0x75, 0x45, 0xc4, 0xcf, 0x11, + 0xbc, 0xc2, 0x78, 0xde, 0xd4, 0x22, 0x3d, 0xbf, 0x61, 0xbb, 0xad, 0x00, 0x15, 0xf7, 0xed, 0x1f, + 0x69, 0xd8, 0x90, 0x1a, 0x9e, 0xa1, 0x95, 0xbe, 0x35, 0x18, 0x29, 0x56, 0xd8, 0x43, 0x02, 0x1d, + 0x29, 0x30, 0xd5, 0x65, 0x21, 0xa0, 0xc5, 0x7c, 0x46, 0x3d, 0x76, 0x8c, 0xba, 0x74, 0x95, 0x90, + 0x6b, 0x37, 0xd4, 0x41, 0x0a, 0x57, 0x27, 0x31, 0x5e, 0x75, 0xf7, 0xe8, 0xa4, 0xac, 0x1c, 0x9f, + 0x94, 0x95, 0xdf, 0x27, 0x65, 0xe5, 0xd3, 0x69, 0xb9, 0x70, 0x7c, 0x5a, 0x2e, 0xfc, 0x3c, 0x2d, + 0x17, 0xde, 0x3e, 0x69, 0x30, 0xbf, 0xd9, 0x36, 0x74, 0x93, 0xb7, 0xb0, 0xc9, 0x45, 0x8b, 0x87, + 0xf0, 0xc4, 0x75, 0x05, 0x6e, 0x71, 0xab, 0x6d, 0x53, 0x81, 0xb3, 0xb9, 0xf6, 0x1f, 0x63, 0xbf, + 0xe3, 0x52, 0x61, 0x0c, 0xc9, 0x5f, 0x85, 0xe5, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7d, 0xe7, + 0xeb, 0xd1, 0xa6, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/ratelimit/types/query.pb.gw.go b/types/query.pb.gw.go similarity index 100% rename from ratelimit/types/query.pb.gw.go rename to types/query.pb.gw.go diff --git a/ratelimit/types/quota.go b/types/quota.go similarity index 100% rename from ratelimit/types/quota.go rename to types/quota.go diff --git a/ratelimit/types/quota_test.go b/types/quota_test.go similarity index 96% rename from ratelimit/types/quota_test.go rename to types/quota_test.go index 08edc7f..11807ba 100644 --- a/ratelimit/types/quota_test.go +++ b/types/quota_test.go @@ -6,7 +6,7 @@ import ( sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" - "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" + "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" ) func TestCheckExceedsQuota(t *testing.T) { diff --git a/ratelimit/types/ratelimit.pb.go b/types/ratelimit.pb.go similarity index 90% rename from ratelimit/types/ratelimit.pb.go rename to types/ratelimit.pb.go index d2bd50a..1454219 100644 --- a/ratelimit/types/ratelimit.pb.go +++ b/types/ratelimit.pb.go @@ -406,49 +406,50 @@ func init() { func init() { proto.RegisterFile("ratelimit/v1/ratelimit.proto", fileDescriptor_a3afe8dd489c3bd2) } var fileDescriptor_a3afe8dd489c3bd2 = []byte{ - // 671 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x4f, 0xd4, 0x40, - 0x14, 0xdf, 0xc2, 0x82, 0xec, 0x2c, 0x7f, 0x36, 0x23, 0x92, 0x75, 0x23, 0x5d, 0xdc, 0x44, 0x83, - 0x06, 0xda, 0x80, 0x31, 0x6a, 0x3c, 0xb1, 0xb0, 0x0a, 0x91, 0x90, 0xb5, 0x8b, 0x98, 0x78, 0x69, - 0x66, 0xdb, 0x47, 0x3b, 0x61, 0xdb, 0xa9, 0xd3, 0xe9, 0x02, 0x67, 0x13, 0xe3, 0x91, 0xa3, 0x77, - 0xbf, 0x85, 0x27, 0x8f, 0x1c, 0x39, 0x1a, 0x0f, 0x68, 0xe0, 0xe6, 0xa7, 0x30, 0x33, 0x6d, 0x01, - 0xd1, 0x44, 0xbc, 0xf5, 0xbd, 0xdf, 0x9f, 0x79, 0xf3, 0xde, 0x9b, 0xa2, 0x5b, 0x9c, 0x08, 0xe8, - 0xd1, 0x80, 0x0a, 0xb3, 0xbf, 0x60, 0x9e, 0x05, 0x46, 0xc4, 0x99, 0x60, 0x78, 0xf4, 0x3c, 0xd1, - 0x5f, 0xa8, 0x4d, 0x7a, 0xcc, 0x63, 0x0a, 0x30, 0xe5, 0x57, 0xca, 0xa9, 0xe9, 0x1e, 0x63, 0x5e, - 0x0f, 0x4c, 0x15, 0x75, 0x93, 0x6d, 0xd3, 0x4d, 0x38, 0x11, 0x94, 0x85, 0x19, 0x5e, 0xbf, 0x8c, - 0x0b, 0x1a, 0x40, 0x2c, 0x48, 0x10, 0xa5, 0x84, 0xc6, 0x53, 0x54, 0x6c, 0x13, 0xe1, 0xe3, 0x49, - 0x34, 0xe4, 0x42, 0xc8, 0x82, 0xaa, 0x36, 0xa3, 0xcd, 0x96, 0xac, 0x34, 0xc0, 0xd3, 0x08, 0x39, - 0x3e, 0x09, 0x43, 0xe8, 0xd9, 0xd4, 0xad, 0x0e, 0x28, 0xa8, 0x94, 0x65, 0xd6, 0xdc, 0xc6, 0x17, - 0x0d, 0x0d, 0xbd, 0x4c, 0x98, 0x20, 0xf8, 0x39, 0xaa, 0x04, 0x64, 0xcf, 0x8e, 0x80, 0x3b, 0x10, - 0x0a, 0x3b, 0x86, 0xd0, 0x4d, 0x9d, 0x9a, 0xd3, 0x87, 0xc7, 0xf5, 0xc2, 0xb7, 0xe3, 0xfa, 0x0d, - 0x87, 0xc5, 0x01, 0x8b, 0x63, 0x77, 0xc7, 0xa0, 0xcc, 0x0c, 0x88, 0xf0, 0x8d, 0xb5, 0x50, 0x58, - 0xe3, 0x01, 0xd9, 0x6b, 0xa7, 0xaa, 0x0e, 0x84, 0xee, 0x65, 0x23, 0x0e, 0x4e, 0x3f, 0x3d, 0xf7, - 0x3f, 0x8c, 0x2c, 0x70, 0xfa, 0xf8, 0x0e, 0x1a, 0xcf, 0x7b, 0x61, 0xfb, 0x2c, 0xe1, 0x71, 0x75, - 0x70, 0x46, 0x9b, 0x2d, 0x5a, 0x63, 0x79, 0x76, 0x55, 0x26, 0x1b, 0x9f, 0x35, 0x54, 0x7c, 0xd6, - 0x63, 0xbb, 0xf8, 0x21, 0x1a, 0xa6, 0xe1, 0x76, 0x8f, 0xed, 0x5e, 0xad, 0xee, 0x8c, 0x8c, 0x1f, - 0xa1, 0x6b, 0x2c, 0x11, 0x4a, 0x77, 0xa5, 0x32, 0x73, 0x36, 0x6e, 0xa2, 0xb1, 0xbc, 0xb5, 0x7d, - 0xd2, 0x4b, 0x40, 0x95, 0xf7, 0x4f, 0xf9, 0x68, 0xa6, 0xd9, 0x92, 0x92, 0xc6, 0x7b, 0x0d, 0x95, - 0x2c, 0x22, 0x60, 0x5d, 0x2e, 0x09, 0xbe, 0x8b, 0x8a, 0x11, 0x11, 0xbe, 0xaa, 0xbf, 0xbc, 0x88, - 0x8d, 0x8b, 0xeb, 0x63, 0xc8, 0x21, 0x5b, 0x0a, 0xc7, 0xf7, 0xd0, 0xd0, 0x5b, 0x39, 0x34, 0x55, - 0x70, 0x79, 0xf1, 0xfa, 0xef, 0x44, 0x35, 0x4f, 0x2b, 0x65, 0x48, 0x4b, 0x75, 0xb5, 0xc1, 0xbf, - 0x59, 0xca, 0xb6, 0x59, 0x0a, 0x6f, 0xac, 0xa3, 0xa9, 0xd7, 0x3e, 0x95, 0x58, 0x2c, 0xc0, 0x5d, - 0x72, 0x5d, 0x0e, 0x71, 0xdc, 0x26, 0x94, 0xe3, 0x29, 0x34, 0x2c, 0x97, 0x01, 0x78, 0xb6, 0x58, - 0x59, 0x84, 0x6b, 0x68, 0x84, 0x83, 0x03, 0xb4, 0x0f, 0x3c, 0xdb, 0xab, 0xb3, 0xb8, 0xf1, 0x6e, - 0x00, 0x95, 0xe4, 0x74, 0x5a, 0x11, 0x73, 0x7c, 0x7c, 0x1b, 0x8d, 0x82, 0xfc, 0xb0, 0xc3, 0x24, - 0xe8, 0x66, 0x3e, 0x45, 0xab, 0xac, 0x72, 0x1b, 0x2a, 0x85, 0x5f, 0xa1, 0x91, 0x7c, 0xaa, 0xd9, - 0xa5, 0x6e, 0x1a, 0xe9, 0xe2, 0x1b, 0xf9, 0xe2, 0x1b, 0x2b, 0x19, 0xa1, 0xa9, 0xcb, 0x0e, 0xff, - 0x3c, 0xae, 0xe3, 0x5c, 0x32, 0xc7, 0x02, 0x2a, 0x20, 0x88, 0xc4, 0xfe, 0xc7, 0xef, 0x75, 0xcd, - 0x3a, 0xb3, 0xc2, 0x1b, 0xa8, 0x92, 0x9e, 0x1c, 0x0b, 0xc2, 0x85, 0x2d, 0x9f, 0x4e, 0xd6, 0x89, - 0xda, 0x1f, 0xf6, 0x9b, 0xf9, 0xbb, 0x6a, 0x8e, 0x48, 0xff, 0x03, 0xe9, 0x34, 0xae, 0xd4, 0x1d, - 0x29, 0x96, 0x30, 0x9e, 0x43, 0xf8, 0xa2, 0x9f, 0x0f, 0xd4, 0xf3, 0x45, 0xb5, 0x38, 0xa3, 0xcd, - 0x0e, 0x5a, 0x95, 0x73, 0xee, 0xaa, 0xca, 0xdf, 0x7f, 0x82, 0x26, 0xda, 0xc4, 0xd9, 0x01, 0xb1, - 0x42, 0x39, 0x38, 0xaa, 0xa0, 0x09, 0x54, 0x6e, 0x2f, 0x2d, 0xbf, 0x68, 0x6d, 0xda, 0x9d, 0xd6, - 0xc6, 0x4a, 0xa5, 0x70, 0x21, 0x61, 0xb5, 0x96, 0xb7, 0x2a, 0x5a, 0xad, 0xf8, 0xe1, 0x93, 0x5e, - 0x68, 0x5a, 0x87, 0x27, 0xba, 0x76, 0x74, 0xa2, 0x6b, 0x3f, 0x4e, 0x74, 0xed, 0xe0, 0x54, 0x2f, - 0x1c, 0x9d, 0xea, 0x85, 0xaf, 0xa7, 0x7a, 0xe1, 0xcd, 0x63, 0x8f, 0x0a, 0x3f, 0xe9, 0x1a, 0x0e, - 0x0b, 0xcc, 0x8e, 0xe0, 0xd4, 0x85, 0xf9, 0x75, 0xd2, 0x8d, 0x4d, 0xda, 0x75, 0xe6, 0xe5, 0x70, - 0xe7, 0xd5, 0x74, 0x69, 0xe8, 0x9d, 0xff, 0x8d, 0x4c, 0xb1, 0x1f, 0x41, 0xdc, 0x1d, 0x56, 0x57, - 0x7d, 0xf0, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x94, 0xab, 0xab, 0xb3, 0xb4, 0x04, 0x00, 0x00, + // 677 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcf, 0x4f, 0xd4, 0x4e, + 0x14, 0xdf, 0xc2, 0xc2, 0x97, 0x9d, 0xe5, 0xc7, 0x66, 0xbe, 0x48, 0xd6, 0x8d, 0x74, 0x71, 0x13, + 0x0d, 0x1a, 0x68, 0x03, 0xc6, 0x28, 0xf1, 0xc4, 0xc2, 0x2a, 0x44, 0x42, 0xd6, 0x2e, 0x62, 0xe2, + 0xa5, 0x99, 0x6d, 0x1f, 0xed, 0x84, 0xb6, 0x53, 0xdb, 0x69, 0x81, 0xb3, 0x89, 0xf1, 0xc8, 0xd1, + 0xbb, 0xff, 0x85, 0x27, 0x8f, 0x1c, 0x39, 0x1a, 0x0f, 0x68, 0xe0, 0xe6, 0x5f, 0x61, 0x66, 0xda, + 0x02, 0xa2, 0x89, 0x78, 0xeb, 0x7b, 0xef, 0xf3, 0xf9, 0xcc, 0x9b, 0xf7, 0x3e, 0x53, 0x74, 0x2b, + 0x22, 0x1c, 0x3c, 0xea, 0x53, 0xae, 0xa7, 0x0b, 0xfa, 0x79, 0xa0, 0x85, 0x11, 0xe3, 0x0c, 0x8f, + 0x5e, 0x24, 0xd2, 0x85, 0xc6, 0xa4, 0xc3, 0x1c, 0x26, 0x0b, 0xba, 0xf8, 0xca, 0x30, 0x0d, 0xd5, + 0x61, 0xcc, 0xf1, 0x40, 0x97, 0x51, 0x3f, 0xd9, 0xd1, 0xed, 0x24, 0x22, 0x9c, 0xb2, 0x20, 0xaf, + 0x37, 0xaf, 0xd6, 0x39, 0xf5, 0x21, 0xe6, 0xc4, 0x0f, 0x33, 0x40, 0xeb, 0x09, 0x2a, 0x77, 0x09, + 0x77, 0xf1, 0x24, 0x1a, 0xb2, 0x21, 0x60, 0x7e, 0x5d, 0x99, 0x51, 0x66, 0x2b, 0x46, 0x16, 0xe0, + 0x69, 0x84, 0x2c, 0x97, 0x04, 0x01, 0x78, 0x26, 0xb5, 0xeb, 0x03, 0xb2, 0x54, 0xc9, 0x33, 0xeb, + 0x76, 0xeb, 0xb3, 0x82, 0x86, 0x5e, 0x24, 0x8c, 0x13, 0xfc, 0x0c, 0xd5, 0x7c, 0xb2, 0x6f, 0x86, + 0x10, 0x59, 0x10, 0x70, 0x33, 0x86, 0xc0, 0xce, 0x94, 0xda, 0xd3, 0x47, 0x27, 0xcd, 0xd2, 0xd7, + 0x93, 0xe6, 0x0d, 0x8b, 0xc5, 0x3e, 0x8b, 0x63, 0x7b, 0x57, 0xa3, 0x4c, 0xf7, 0x09, 0x77, 0xb5, + 0xf5, 0x80, 0x1b, 0xe3, 0x3e, 0xd9, 0xef, 0x66, 0xac, 0x1e, 0x04, 0xf6, 0x55, 0xa1, 0x08, 0xac, + 0x34, 0x3b, 0xf7, 0x1f, 0x84, 0x0c, 0xb0, 0x52, 0x7c, 0x07, 0x8d, 0x17, 0xb3, 0x30, 0x5d, 0x96, + 0x44, 0x71, 0x7d, 0x70, 0x46, 0x99, 0x2d, 0x1b, 0x63, 0x45, 0x76, 0x4d, 0x24, 0x5b, 0x9f, 0x14, + 0x54, 0x7e, 0xea, 0xb1, 0x3d, 0xfc, 0x10, 0x0d, 0xd3, 0x60, 0xc7, 0x63, 0x7b, 0xd7, 0xeb, 0x3b, + 0x07, 0xe3, 0x47, 0xe8, 0x3f, 0x96, 0x70, 0xc9, 0xbb, 0x56, 0x9b, 0x05, 0x1a, 0xb7, 0xd1, 0x58, + 0x31, 0xda, 0x94, 0x78, 0x09, 0xc8, 0xf6, 0xfe, 0x4a, 0x1f, 0xcd, 0x39, 0xdb, 0x82, 0xd2, 0x7a, + 0xa7, 0xa0, 0x8a, 0x41, 0x38, 0x6c, 0x08, 0x93, 0xe0, 0xbb, 0xa8, 0x1c, 0x12, 0xee, 0xca, 0xfe, + 0xab, 0x8b, 0x58, 0xbb, 0x6c, 0x1f, 0x4d, 0x2c, 0xd9, 0x90, 0x75, 0x7c, 0x0f, 0x0d, 0xbd, 0x11, + 0x4b, 0x93, 0x0d, 0x57, 0x17, 0xff, 0xff, 0x15, 0x28, 0xf7, 0x69, 0x64, 0x08, 0x21, 0x29, 0xaf, + 0x36, 0xf8, 0x27, 0x49, 0x31, 0x36, 0x43, 0xd6, 0x5b, 0x1b, 0x68, 0xea, 0x95, 0x4b, 0x45, 0x2d, + 0xe6, 0x60, 0x2f, 0xdb, 0x76, 0x04, 0x71, 0xdc, 0x25, 0x34, 0xc2, 0x53, 0x68, 0x58, 0x98, 0x01, + 0xa2, 0xdc, 0x58, 0x79, 0x84, 0x1b, 0x68, 0x24, 0x02, 0x0b, 0x68, 0x0a, 0x51, 0xee, 0xab, 0xf3, + 0xb8, 0xf5, 0x76, 0x00, 0x55, 0xc4, 0x76, 0x3a, 0x21, 0xb3, 0x5c, 0x7c, 0x1b, 0x8d, 0x82, 0xf8, + 0x30, 0x83, 0xc4, 0xef, 0xe7, 0x3a, 0x65, 0xa3, 0x2a, 0x73, 0x9b, 0x32, 0x85, 0x5f, 0xa2, 0x91, + 0x62, 0xab, 0xf9, 0xa5, 0x6e, 0x6a, 0x99, 0xf1, 0xb5, 0xc2, 0xf8, 0xda, 0x6a, 0x0e, 0x68, 0xab, + 0x62, 0xc2, 0x3f, 0x4e, 0x9a, 0xb8, 0xa0, 0xcc, 0x31, 0x9f, 0x72, 0xf0, 0x43, 0x7e, 0xf0, 0xe1, + 0x5b, 0x53, 0x31, 0xce, 0xa5, 0xf0, 0x26, 0xaa, 0x65, 0x27, 0xc7, 0x9c, 0x44, 0xdc, 0x14, 0x4f, + 0x27, 0x9f, 0x44, 0xe3, 0x37, 0xf9, 0xad, 0xe2, 0x5d, 0xb5, 0x47, 0x84, 0xfe, 0xa1, 0x50, 0x1a, + 0x97, 0xec, 0x9e, 0x20, 0x8b, 0x32, 0x9e, 0x43, 0xf8, 0xb2, 0x9e, 0x0b, 0xd4, 0x71, 0x79, 0xbd, + 0x3c, 0xa3, 0xcc, 0x0e, 0x1a, 0xb5, 0x0b, 0xec, 0x9a, 0xcc, 0xdf, 0x5f, 0x42, 0x13, 0x5d, 0x62, + 0xed, 0x02, 0x5f, 0xa5, 0x11, 0x58, 0xb2, 0xa1, 0x09, 0x54, 0xed, 0x2e, 0xaf, 0x3c, 0xef, 0x6c, + 0x99, 0xbd, 0xce, 0xe6, 0x6a, 0xad, 0x74, 0x29, 0x61, 0x74, 0x56, 0xb6, 0x6b, 0x4a, 0xa3, 0xfc, + 0xfe, 0xa3, 0x5a, 0x6a, 0xf7, 0x8e, 0x4e, 0x55, 0xe5, 0xf8, 0x54, 0x55, 0xbe, 0x9f, 0xaa, 0xca, + 0xe1, 0x99, 0x5a, 0x3a, 0x3e, 0x53, 0x4b, 0x5f, 0xce, 0xd4, 0xd2, 0xeb, 0x25, 0x87, 0x72, 0x37, + 0xe9, 0x6b, 0x16, 0xf3, 0xf5, 0xcc, 0x61, 0x3a, 0xed, 0x5b, 0xf3, 0x24, 0x0c, 0x63, 0xdd, 0x67, + 0x76, 0xe2, 0x41, 0x2c, 0xff, 0x43, 0xf3, 0x72, 0xcb, 0x34, 0x70, 0xf4, 0xf4, 0xb1, 0xce, 0x0f, + 0x42, 0x88, 0xfb, 0xc3, 0xf2, 0xae, 0x0f, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0x83, 0x7b, 0x78, + 0x7f, 0xb5, 0x04, 0x00, 0x00, } func (m *Path) Marshal() (dAtA []byte, err error) { diff --git a/ratelimit/types/tx.pb.go b/types/tx.pb.go similarity index 94% rename from ratelimit/types/tx.pb.go rename to types/tx.pb.go index 9c62d4f..4fc5edb 100644 --- a/ratelimit/types/tx.pb.go +++ b/types/tx.pb.go @@ -482,44 +482,44 @@ func init() { func init() { proto.RegisterFile("ratelimit/v1/tx.proto", fileDescriptor_415b1435b4efaad0) } var fileDescriptor_415b1435b4efaad0 = []byte{ - // 581 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0x4f, 0x6b, 0xdb, 0x30, - 0x1c, 0x8d, 0xd3, 0xa6, 0x10, 0xd1, 0xa5, 0xab, 0x49, 0xa9, 0xe3, 0x36, 0x4e, 0x08, 0x94, 0x85, - 0xb0, 0xd8, 0x74, 0x83, 0x31, 0x76, 0x6b, 0x2f, 0x5b, 0xa1, 0x81, 0xe1, 0x6e, 0x97, 0xc2, 0x08, - 0x8a, 0x25, 0x1c, 0xb1, 0x4a, 0x0a, 0x96, 0x12, 0xd2, 0xdb, 0xd8, 0x71, 0xa7, 0x7d, 0x94, 0x30, - 0xf6, 0x21, 0x7a, 0x2c, 0x3b, 0x8d, 0x1d, 0xca, 0x48, 0x18, 0x39, 0xec, 0x2b, 0xec, 0x30, 0x6c, - 0xe7, 0x5f, 0xe5, 0x6e, 0xa1, 0xa7, 0x5e, 0x7a, 0x09, 0xd1, 0xfb, 0xbd, 0xdf, 0xfb, 0xf9, 0xf9, - 0x49, 0x32, 0xd8, 0x0a, 0xa0, 0xc4, 0x67, 0x84, 0x12, 0xe9, 0xf4, 0xf6, 0x1d, 0xd9, 0xb7, 0x3b, - 0x01, 0x97, 0x5c, 0x5f, 0x9f, 0xc1, 0x76, 0x6f, 0xdf, 0xcc, 0xfb, 0xdc, 0xe7, 0x51, 0xc1, 0x09, - 0xff, 0xc5, 0x1c, 0x73, 0x13, 0x52, 0xc2, 0xb8, 0x13, 0xfd, 0x4e, 0xa0, 0x82, 0xc7, 0x05, 0xe5, - 0xa2, 0x19, 0x73, 0xe3, 0xc5, 0xa4, 0xb4, 0x1d, 0xaf, 0x1c, 0x2a, 0xfc, 0x70, 0x12, 0x15, 0x7e, - 0x5c, 0xa8, 0xfc, 0x4a, 0x83, 0x8d, 0x86, 0xf0, 0x0f, 0x10, 0x72, 0xa1, 0xc4, 0xc7, 0xe1, 0x4c, - 0xfd, 0x19, 0xc8, 0xc2, 0xae, 0x6c, 0xf3, 0x80, 0xc8, 0x73, 0x43, 0x2b, 0x6b, 0xd5, 0xec, 0xa1, - 0xf1, 0xed, 0x6b, 0x3d, 0x3f, 0x51, 0x3c, 0x40, 0x28, 0xc0, 0x42, 0x9c, 0xc8, 0x80, 0x30, 0xdf, - 0x9d, 0x53, 0xf5, 0x3c, 0xc8, 0x20, 0xcc, 0x38, 0x35, 0xd2, 0x61, 0x8f, 0x1b, 0x2f, 0xf4, 0x22, - 0x00, 0x5e, 0x1b, 0x32, 0x86, 0xcf, 0x9a, 0x04, 0x19, 0x2b, 0x51, 0x29, 0x3b, 0x41, 0x8e, 0x90, - 0xfe, 0x12, 0x3c, 0xa4, 0xb0, 0xdf, 0xec, 0xe0, 0xc0, 0xc3, 0x4c, 0x36, 0x05, 0x66, 0xc8, 0x58, - 0x8d, 0x66, 0x16, 0x2f, 0xae, 0x4a, 0xa9, 0x1f, 0x57, 0xa5, 0xad, 0x78, 0xae, 0x40, 0xef, 0x6d, - 0xc2, 0x1d, 0x0a, 0x65, 0xdb, 0x3e, 0x62, 0xd2, 0xcd, 0x51, 0xd8, 0x7f, 0x1d, 0x77, 0x9d, 0x60, - 0x96, 0x10, 0x0a, 0xb0, 0xd7, 0x33, 0x32, 0xb7, 0x14, 0x72, 0xb1, 0xd7, 0xd3, 0xf7, 0x40, 0x0e, - 0x75, 0x03, 0x28, 0x09, 0x67, 0xcd, 0x36, 0xef, 0x06, 0xc2, 0x58, 0x2b, 0x6b, 0xd5, 0x55, 0xf7, - 0xc1, 0x14, 0x7d, 0x15, 0x82, 0x2f, 0x1e, 0x7f, 0x1c, 0x0f, 0x6a, 0x73, 0xf7, 0x9f, 0xc6, 0x83, - 0x5a, 0x61, 0x1e, 0xa7, 0xf2, 0x4e, 0x2b, 0x05, 0xb0, 0xad, 0x40, 0x2e, 0x16, 0x1d, 0xce, 0x04, - 0xae, 0xfc, 0x4e, 0x03, 0xbd, 0x21, 0xfc, 0xb7, 0x1d, 0x04, 0x25, 0xbe, 0x4f, 0xe1, 0x76, 0x29, - 0x38, 0xc9, 0x14, 0x76, 0xaf, 0xa5, 0xa0, 0xbc, 0xd6, 0xca, 0x2e, 0x30, 0x93, 0xe8, 0x2c, 0x8b, - 0x2f, 0x5a, 0x94, 0x85, 0x8b, 0x29, 0xef, 0xdd, 0x51, 0x16, 0xcb, 0x2d, 0x29, 0x4f, 0x37, 0xb1, - 0xa4, 0xa0, 0x33, 0x4b, 0x03, 0x0d, 0x6c, 0x46, 0x65, 0x81, 0xe5, 0x1d, 0x39, 0xb2, 0x93, 0x8e, - 0x76, 0x14, 0x47, 0x8b, 0x0f, 0x57, 0xd9, 0x01, 0x85, 0x04, 0x38, 0xf5, 0xf3, 0xe4, 0x4f, 0x1a, - 0xac, 0x34, 0x84, 0xaf, 0xbf, 0x01, 0xeb, 0xd7, 0x6e, 0xad, 0xa2, 0xbd, 0x78, 0x6b, 0xda, 0xca, - 0x69, 0x33, 0xf7, 0xfe, 0x5b, 0x9e, 0xaa, 0xeb, 0xef, 0xc0, 0x86, 0x7a, 0x10, 0xcb, 0x89, 0x4e, - 0x85, 0x61, 0x56, 0x97, 0x31, 0x16, 0xe5, 0xd5, 0xbd, 0x95, 0x94, 0x57, 0x18, 0x37, 0xc8, 0xff, - 0x23, 0x6b, 0xfd, 0x14, 0xe4, 0x94, 0x9c, 0x4b, 0x37, 0xf4, 0x2e, 0x12, 0xcc, 0x47, 0x4b, 0x08, - 0x53, 0x6d, 0x33, 0xf3, 0x61, 0x3c, 0xa8, 0x69, 0x87, 0xee, 0xc5, 0xd0, 0xd2, 0x2e, 0x87, 0x96, - 0xf6, 0x73, 0x68, 0x69, 0x9f, 0x47, 0x56, 0xea, 0x72, 0x64, 0xa5, 0xbe, 0x8f, 0xac, 0xd4, 0xe9, - 0x73, 0x9f, 0xc8, 0x76, 0xb7, 0x65, 0x7b, 0x9c, 0x3a, 0xe1, 0xc6, 0x41, 0xb8, 0x7e, 0x0c, 0x5b, - 0xc2, 0x21, 0x2d, 0xaf, 0x1e, 0xce, 0xa8, 0x47, 0x43, 0x08, 0xf3, 0x9d, 0x79, 0xf6, 0xf2, 0xbc, - 0x83, 0x45, 0x6b, 0x2d, 0xfa, 0x16, 0x3d, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x3a, 0x9f, 0x17, - 0x58, 0x0f, 0x07, 0x00, 0x00, + // 587 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xcb, 0x6a, 0xdb, 0x4c, + 0x18, 0xb5, 0x9c, 0x0b, 0x64, 0xc8, 0x9f, 0xfc, 0x11, 0x0e, 0x91, 0x95, 0x58, 0x36, 0x86, 0x50, + 0x63, 0x6a, 0x0d, 0x69, 0xa1, 0xb4, 0xdd, 0x25, 0x9b, 0x36, 0x50, 0x43, 0x91, 0xdb, 0x4d, 0xa0, + 0x18, 0x59, 0x33, 0xc8, 0xa2, 0x9e, 0x19, 0xa1, 0x19, 0x0b, 0x67, 0x57, 0xba, 0xec, 0xaa, 0x8f, + 0x62, 0x4a, 0x1f, 0x22, 0xcb, 0xd0, 0x55, 0xe9, 0x22, 0x14, 0x9b, 0xe2, 0x45, 0x5f, 0xa1, 0x8b, + 0xa2, 0x8b, 0x2f, 0x19, 0xa5, 0x35, 0x59, 0x65, 0xd3, 0x8d, 0xf1, 0x9c, 0xef, 0x7c, 0xe7, 0xd3, + 0xd1, 0xd1, 0xcc, 0x80, 0xdd, 0xc0, 0x16, 0xb8, 0xe7, 0x11, 0x4f, 0xc0, 0xf0, 0x08, 0x8a, 0x81, + 0xe9, 0x07, 0x4c, 0x30, 0x75, 0x73, 0x06, 0x9b, 0xe1, 0x91, 0xbe, 0x63, 0x13, 0x8f, 0x32, 0x18, + 0xff, 0x26, 0x04, 0x7d, 0xcf, 0x61, 0x9c, 0x30, 0x0e, 0x09, 0x77, 0xa3, 0x46, 0xc2, 0xdd, 0xb4, + 0x50, 0x4c, 0x0a, 0xed, 0x78, 0x05, 0x93, 0x45, 0x5a, 0x2a, 0xb8, 0xcc, 0x65, 0x09, 0x1e, 0xfd, + 0x4b, 0xd0, 0xea, 0x8f, 0x3c, 0xd8, 0x6e, 0x72, 0xf7, 0x18, 0x21, 0xcb, 0x16, 0xf8, 0x45, 0x34, + 0x53, 0x7d, 0x04, 0x36, 0xec, 0xbe, 0xe8, 0xb2, 0xc0, 0x13, 0xe7, 0x9a, 0x52, 0x51, 0x6a, 0x1b, + 0x27, 0xda, 0x97, 0xcf, 0x8d, 0x42, 0x2a, 0x77, 0x8c, 0x50, 0x80, 0x39, 0x6f, 0x89, 0xc0, 0xa3, + 0xae, 0x35, 0xa7, 0xaa, 0x05, 0xb0, 0x86, 0x30, 0x65, 0x44, 0xcb, 0x47, 0x3d, 0x56, 0xb2, 0x50, + 0x4b, 0x00, 0x38, 0x5d, 0x9b, 0x52, 0xdc, 0x6b, 0x7b, 0x48, 0x5b, 0x89, 0x4b, 0x1b, 0x29, 0x72, + 0x8a, 0xd4, 0x67, 0xe0, 0x7f, 0x62, 0x0f, 0xda, 0x3e, 0x0e, 0x1c, 0x4c, 0x45, 0x9b, 0x63, 0x8a, + 0xb4, 0xd5, 0x78, 0x66, 0xe9, 0xe2, 0xaa, 0x9c, 0xfb, 0x76, 0x55, 0xde, 0x4d, 0xe6, 0x72, 0xf4, + 0xd6, 0xf4, 0x18, 0x24, 0xb6, 0xe8, 0x9a, 0xa7, 0x54, 0x58, 0x5b, 0xc4, 0x1e, 0xbc, 0x4c, 0xba, + 0x5a, 0x98, 0x66, 0x84, 0x02, 0xec, 0x84, 0xda, 0xda, 0x2d, 0x85, 0x2c, 0xec, 0x84, 0xea, 0x21, + 0xd8, 0x42, 0xfd, 0xc0, 0x16, 0x1e, 0xa3, 0xed, 0x2e, 0xeb, 0x07, 0x5c, 0x5b, 0xaf, 0x28, 0xb5, + 0x55, 0xeb, 0xbf, 0x29, 0xfa, 0x3c, 0x02, 0x9f, 0xde, 0x7f, 0x3f, 0x19, 0xd6, 0xe7, 0xee, 0x3f, + 0x4c, 0x86, 0xf5, 0xe2, 0x3c, 0x4e, 0xe9, 0x9d, 0x56, 0x8b, 0x60, 0x4f, 0x82, 0x2c, 0xcc, 0x7d, + 0x46, 0x39, 0xae, 0xfe, 0xcc, 0x03, 0xb5, 0xc9, 0xdd, 0xd7, 0x3e, 0xb2, 0x05, 0xfe, 0x97, 0xc2, + 0xed, 0x52, 0x80, 0xd9, 0x14, 0x0e, 0xae, 0xa5, 0x20, 0xbd, 0xd6, 0xea, 0x01, 0xd0, 0xb3, 0xe8, + 0x2c, 0x8b, 0x4f, 0x4a, 0x9c, 0x85, 0x85, 0x09, 0x0b, 0xef, 0x28, 0x8b, 0xe5, 0x96, 0xa4, 0xa7, + 0x4b, 0x2d, 0x49, 0xe8, 0xcc, 0xd2, 0x50, 0x01, 0x3b, 0x71, 0x99, 0x63, 0x71, 0x47, 0x8e, 0xcc, + 0xac, 0xa3, 0x7d, 0xc9, 0xd1, 0xe2, 0xc3, 0x55, 0xf7, 0x41, 0x31, 0x03, 0x4e, 0xfd, 0x3c, 0xf8, + 0x95, 0x07, 0x2b, 0x4d, 0xee, 0xaa, 0xaf, 0xc0, 0xe6, 0xb5, 0x53, 0xab, 0x64, 0x2e, 0x9e, 0x9a, + 0xa6, 0xb4, 0xdb, 0xf4, 0xc3, 0xbf, 0x96, 0xa7, 0xea, 0xea, 0x1b, 0xb0, 0x2d, 0x6f, 0xc4, 0x4a, + 0xa6, 0x53, 0x62, 0xe8, 0xb5, 0x65, 0x8c, 0x45, 0x79, 0xf9, 0xdb, 0xca, 0xca, 0x4b, 0x8c, 0x1b, + 0xe4, 0xff, 0x90, 0xb5, 0x7a, 0x06, 0xb6, 0xa4, 0x9c, 0xcb, 0x37, 0xf4, 0x2e, 0x12, 0xf4, 0x7b, + 0x4b, 0x08, 0x53, 0x6d, 0x7d, 0xed, 0xdd, 0x64, 0x58, 0x57, 0x4e, 0x5a, 0x17, 0x23, 0x43, 0xb9, + 0x1c, 0x19, 0xca, 0xf7, 0x91, 0xa1, 0x7c, 0x1c, 0x1b, 0xb9, 0xcb, 0xb1, 0x91, 0xfb, 0x3a, 0x36, + 0x72, 0x67, 0x4f, 0x5c, 0x4f, 0x74, 0xfb, 0x1d, 0xd3, 0x61, 0x24, 0xbd, 0x79, 0xa0, 0xd7, 0x71, + 0x1a, 0xb6, 0xef, 0x73, 0x48, 0x18, 0xea, 0xf7, 0x30, 0x87, 0xd1, 0xac, 0x46, 0x3c, 0xcc, 0xa3, + 0x2e, 0x0c, 0x1f, 0x43, 0x71, 0xee, 0x63, 0xde, 0x59, 0x8f, 0x2f, 0xa3, 0x87, 0xbf, 0x03, 0x00, + 0x00, 0xff, 0xff, 0x33, 0x24, 0xa6, 0x35, 0x10, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used.