From bb57927465a6ed371af1228d098242aa484496a9 Mon Sep 17 00:00:00 2001 From: Facundo Medica <14063057+facundomedica@users.noreply.github.com> Date: Mon, 11 Nov 2024 19:05:59 +0100 Subject: [PATCH] feat(x/protocolpool)!: allow any coins in continuous funds (#21916) (cherry picked from commit 13c234f421e81f99870dfc22a85178aabd075ccb) # Conflicts: # api/cosmos/protocolpool/v1/genesis.pulsar.go # api/cosmos/protocolpool/v1/tx.pulsar.go # api/cosmos/protocolpool/v1/tx_grpc.pb.go # api/cosmos/protocolpool/v1/types.pulsar.go # x/protocolpool/keeper/genesis.go # x/protocolpool/testutil/expected_keepers_mocks.go --- api/cosmos/protocolpool/v1/genesis.pulsar.go | 1747 ++++ api/cosmos/protocolpool/v1/tx.pulsar.go | 9065 +++++++++++++++++ api/cosmos/protocolpool/v1/tx_grpc.pb.go | 417 + api/cosmos/protocolpool/v1/types.pulsar.go | 2763 +++++ simapp/app.go | 2 +- .../distribution/keeper/msg_server_test.go | 2 +- tests/integration/gov/keeper/keeper_test.go | 2 +- x/protocolpool/autocli.go | 8 + x/protocolpool/depinject.go | 3 +- x/protocolpool/keeper/genesis.go | 30 +- x/protocolpool/keeper/genesis_test.go | 6 +- x/protocolpool/keeper/keeper.go | 134 +- x/protocolpool/keeper/keeper_test.go | 74 +- x/protocolpool/keeper/msg_server.go | 14 +- x/protocolpool/keeper/msg_server_test.go | 64 +- .../cosmos/protocolpool/v1/genesis.proto | 22 +- .../proto/cosmos/protocolpool/v1/tx.proto | 28 +- .../proto/cosmos/protocolpool/v1/types.proto | 18 + .../testutil/expected_keepers_mocks.go | 17 + x/protocolpool/types/expected_keepers.go | 5 +- x/protocolpool/types/genesis.go | 7 +- x/protocolpool/types/genesis.pb.go | 213 +- x/protocolpool/types/keys.go | 1 + x/protocolpool/types/tx.pb.go | 593 +- x/protocolpool/types/types.pb.go | 435 +- 25 files changed, 15319 insertions(+), 351 deletions(-) create mode 100644 api/cosmos/protocolpool/v1/genesis.pulsar.go create mode 100644 api/cosmos/protocolpool/v1/tx.pulsar.go create mode 100644 api/cosmos/protocolpool/v1/tx_grpc.pb.go create mode 100644 api/cosmos/protocolpool/v1/types.pulsar.go diff --git a/api/cosmos/protocolpool/v1/genesis.pulsar.go b/api/cosmos/protocolpool/v1/genesis.pulsar.go new file mode 100644 index 000000000000..d894307e2d86 --- /dev/null +++ b/api/cosmos/protocolpool/v1/genesis.pulsar.go @@ -0,0 +1,1747 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package protocolpoolv1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_GenesisState_1_list)(nil) + +type _GenesisState_1_list struct { + list *[]*ContinuousFund +} + +func (x *_GenesisState_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ContinuousFund) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ContinuousFund) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_1_list) AppendMutable() protoreflect.Value { + v := new(ContinuousFund) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_1_list) NewElement() protoreflect.Value { + v := new(ContinuousFund) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_1_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_2_list)(nil) + +type _GenesisState_2_list struct { + list *[]*Budget +} + +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().(*Budget) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Budget) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { + v := new(Budget) + *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(Budget) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_4_list)(nil) + +type _GenesisState_4_list struct { + list *[]*Distribution +} + +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.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Distribution) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Distribution) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_4_list) AppendMutable() protoreflect.Value { + v := new(Distribution) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_4_list) NewElement() protoreflect.Value { + v := new(Distribution) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_continuous_fund protoreflect.FieldDescriptor + fd_GenesisState_budget protoreflect.FieldDescriptor + fd_GenesisState_last_balance protoreflect.FieldDescriptor + fd_GenesisState_distributions protoreflect.FieldDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_genesis_proto_init() + md_GenesisState = File_cosmos_protocolpool_v1_genesis_proto.Messages().ByName("GenesisState") + fd_GenesisState_continuous_fund = md_GenesisState.Fields().ByName("continuous_fund") + fd_GenesisState_budget = md_GenesisState.Fields().ByName("budget") + fd_GenesisState_last_balance = md_GenesisState.Fields().ByName("last_balance") + fd_GenesisState_distributions = md_GenesisState.Fields().ByName("distributions") + fd_GenesisState_params = md_GenesisState.Fields().ByName("params") +} + +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_cosmos_protocolpool_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 len(x.ContinuousFund) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_1_list{list: &x.ContinuousFund}) + if !f(fd_GenesisState_continuous_fund, value) { + return + } + } + if len(x.Budget) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.Budget}) + if !f(fd_GenesisState_budget, value) { + return + } + } + if x.LastBalance != nil { + value := protoreflect.ValueOfMessage(x.LastBalance.ProtoReflect()) + if !f(fd_GenesisState_last_balance, value) { + return + } + } + if len(x.Distributions) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_4_list{list: &x.Distributions}) + if !f(fd_GenesisState_distributions, value) { + return + } + } + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_GenesisState_params, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// 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 "cosmos.protocolpool.v1.GenesisState.continuous_fund": + return len(x.ContinuousFund) != 0 + case "cosmos.protocolpool.v1.GenesisState.budget": + return len(x.Budget) != 0 + case "cosmos.protocolpool.v1.GenesisState.last_balance": + return x.LastBalance != nil + case "cosmos.protocolpool.v1.GenesisState.distributions": + return len(x.Distributions) != 0 + case "cosmos.protocolpool.v1.GenesisState.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.GenesisState")) + } + panic(fmt.Errorf("message cosmos.protocolpool.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 "cosmos.protocolpool.v1.GenesisState.continuous_fund": + x.ContinuousFund = nil + case "cosmos.protocolpool.v1.GenesisState.budget": + x.Budget = nil + case "cosmos.protocolpool.v1.GenesisState.last_balance": + x.LastBalance = nil + case "cosmos.protocolpool.v1.GenesisState.distributions": + x.Distributions = nil + case "cosmos.protocolpool.v1.GenesisState.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.GenesisState")) + } + panic(fmt.Errorf("message cosmos.protocolpool.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 "cosmos.protocolpool.v1.GenesisState.continuous_fund": + if len(x.ContinuousFund) == 0 { + return protoreflect.ValueOfList(&_GenesisState_1_list{}) + } + listValue := &_GenesisState_1_list{list: &x.ContinuousFund} + return protoreflect.ValueOfList(listValue) + case "cosmos.protocolpool.v1.GenesisState.budget": + if len(x.Budget) == 0 { + return protoreflect.ValueOfList(&_GenesisState_2_list{}) + } + listValue := &_GenesisState_2_list{list: &x.Budget} + return protoreflect.ValueOfList(listValue) + case "cosmos.protocolpool.v1.GenesisState.last_balance": + value := x.LastBalance + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.GenesisState.distributions": + if len(x.Distributions) == 0 { + return protoreflect.ValueOfList(&_GenesisState_4_list{}) + } + listValue := &_GenesisState_4_list{list: &x.Distributions} + return protoreflect.ValueOfList(listValue) + case "cosmos.protocolpool.v1.GenesisState.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.GenesisState")) + } + panic(fmt.Errorf("message cosmos.protocolpool.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 "cosmos.protocolpool.v1.GenesisState.continuous_fund": + lv := value.List() + clv := lv.(*_GenesisState_1_list) + x.ContinuousFund = *clv.list + case "cosmos.protocolpool.v1.GenesisState.budget": + lv := value.List() + clv := lv.(*_GenesisState_2_list) + x.Budget = *clv.list + case "cosmos.protocolpool.v1.GenesisState.last_balance": + x.LastBalance = value.Message().Interface().(*DistributionAmount) + case "cosmos.protocolpool.v1.GenesisState.distributions": + lv := value.List() + clv := lv.(*_GenesisState_4_list) + x.Distributions = *clv.list + case "cosmos.protocolpool.v1.GenesisState.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.GenesisState")) + } + panic(fmt.Errorf("message cosmos.protocolpool.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 "cosmos.protocolpool.v1.GenesisState.continuous_fund": + if x.ContinuousFund == nil { + x.ContinuousFund = []*ContinuousFund{} + } + value := &_GenesisState_1_list{list: &x.ContinuousFund} + return protoreflect.ValueOfList(value) + case "cosmos.protocolpool.v1.GenesisState.budget": + if x.Budget == nil { + x.Budget = []*Budget{} + } + value := &_GenesisState_2_list{list: &x.Budget} + return protoreflect.ValueOfList(value) + case "cosmos.protocolpool.v1.GenesisState.last_balance": + if x.LastBalance == nil { + x.LastBalance = new(DistributionAmount) + } + return protoreflect.ValueOfMessage(x.LastBalance.ProtoReflect()) + case "cosmos.protocolpool.v1.GenesisState.distributions": + if x.Distributions == nil { + x.Distributions = []*Distribution{} + } + value := &_GenesisState_4_list{list: &x.Distributions} + return protoreflect.ValueOfList(value) + case "cosmos.protocolpool.v1.GenesisState.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.GenesisState")) + } + panic(fmt.Errorf("message cosmos.protocolpool.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 "cosmos.protocolpool.v1.GenesisState.continuous_fund": + list := []*ContinuousFund{} + return protoreflect.ValueOfList(&_GenesisState_1_list{list: &list}) + case "cosmos.protocolpool.v1.GenesisState.budget": + list := []*Budget{} + return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) + case "cosmos.protocolpool.v1.GenesisState.last_balance": + m := new(DistributionAmount) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.GenesisState.distributions": + list := []*Distribution{} + return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) + case "cosmos.protocolpool.v1.GenesisState.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.GenesisState")) + } + panic(fmt.Errorf("message cosmos.protocolpool.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 cosmos.protocolpool.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 len(x.ContinuousFund) > 0 { + for _, e := range x.ContinuousFund { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Budget) > 0 { + for _, e := range x.Budget { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.LastBalance != nil { + l = options.Size(x.LastBalance) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Distributions) > 0 { + for _, e := range x.Distributions { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*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.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] = 0x2a + } + if len(x.Distributions) > 0 { + for iNdEx := len(x.Distributions) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Distributions[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] = 0x22 + } + } + if x.LastBalance != nil { + encoded, err := options.Marshal(x.LastBalance) + 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.Budget) > 0 { + for iNdEx := len(x.Budget) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Budget[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.ContinuousFund) > 0 { + for iNdEx := len(x.ContinuousFund) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ContinuousFund[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().(*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 ContinuousFund", 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.ContinuousFund = append(x.ContinuousFund, &ContinuousFund{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ContinuousFund[len(x.ContinuousFund)-1]); 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 Budget", 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.Budget = append(x.Budget, &Budget{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Budget[len(x.Budget)-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 LastBalance", 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.LastBalance == nil { + x.LastBalance = &DistributionAmount{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LastBalance); 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 Distributions", 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.Distributions = append(x.Distributions, &Distribution{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Distributions[len(x.Distributions)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_Distribution protoreflect.MessageDescriptor + fd_Distribution_time protoreflect.FieldDescriptor + fd_Distribution_amount protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_genesis_proto_init() + md_Distribution = File_cosmos_protocolpool_v1_genesis_proto.Messages().ByName("Distribution") + fd_Distribution_time = md_Distribution.Fields().ByName("time") + fd_Distribution_amount = md_Distribution.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_Distribution)(nil) + +type fastReflection_Distribution Distribution + +func (x *Distribution) ProtoReflect() protoreflect.Message { + return (*fastReflection_Distribution)(x) +} + +func (x *Distribution) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_v1_genesis_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_Distribution_messageType fastReflection_Distribution_messageType +var _ protoreflect.MessageType = fastReflection_Distribution_messageType{} + +type fastReflection_Distribution_messageType struct{} + +func (x fastReflection_Distribution_messageType) Zero() protoreflect.Message { + return (*fastReflection_Distribution)(nil) +} +func (x fastReflection_Distribution_messageType) New() protoreflect.Message { + return new(fastReflection_Distribution) +} +func (x fastReflection_Distribution_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Distribution +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Distribution) Descriptor() protoreflect.MessageDescriptor { + return md_Distribution +} + +// 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_Distribution) Type() protoreflect.MessageType { + return _fastReflection_Distribution_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Distribution) New() protoreflect.Message { + return new(fastReflection_Distribution) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Distribution) Interface() protoreflect.ProtoMessage { + return (*Distribution)(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_Distribution) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Time != nil { + value := protoreflect.ValueOfMessage(x.Time.ProtoReflect()) + if !f(fd_Distribution_time, value) { + return + } + } + if x.Amount != nil { + value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + if !f(fd_Distribution_amount, 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_Distribution) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.Distribution.time": + return x.Time != nil + case "cosmos.protocolpool.v1.Distribution.amount": + return x.Amount != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Distribution")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.Distribution 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_Distribution) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.Distribution.time": + x.Time = nil + case "cosmos.protocolpool.v1.Distribution.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Distribution")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.Distribution 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_Distribution) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.Distribution.time": + value := x.Time + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.Distribution.amount": + value := x.Amount + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Distribution")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.Distribution 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_Distribution) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.Distribution.time": + x.Time = value.Message().Interface().(*timestamppb.Timestamp) + case "cosmos.protocolpool.v1.Distribution.amount": + x.Amount = value.Message().Interface().(*DistributionAmount) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Distribution")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.Distribution 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_Distribution) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.Distribution.time": + if x.Time == nil { + x.Time = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.Time.ProtoReflect()) + case "cosmos.protocolpool.v1.Distribution.amount": + if x.Amount == nil { + x.Amount = new(DistributionAmount) + } + return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Distribution")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.Distribution 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_Distribution) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.Distribution.time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.Distribution.amount": + m := new(DistributionAmount) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Distribution")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.Distribution 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_Distribution) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.Distribution", 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_Distribution) 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_Distribution) 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_Distribution) 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_Distribution) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Distribution) + 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.Time != nil { + l = options.Size(x.Time) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Amount != nil { + l = options.Size(x.Amount) + 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().(*Distribution) + 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.Amount != nil { + encoded, err := options.Marshal(x.Amount) + 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.Time != nil { + encoded, err := options.Marshal(x.Time) + 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().(*Distribution) + 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: Distribution: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Distribution: 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 Time", 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.Time == nil { + x.Time = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Time); 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 Amount", 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.Amount == nil { + x.Amount = &DistributionAmount{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); 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: cosmos/protocolpool/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 protocolpool module's genesis state. +type GenesisState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ContinuousFund defines the continuous funds at genesis. + ContinuousFund []*ContinuousFund `protobuf:"bytes,1,rep,name=continuous_fund,json=continuousFund,proto3" json:"continuous_fund,omitempty"` + // Budget defines the budget proposals at genesis. + Budget []*Budget `protobuf:"bytes,2,rep,name=budget,proto3" json:"budget,omitempty"` + // last_balance contains the amount of tokens yet to be distributed, will be zero if + // there are no funds to distribute. + LastBalance *DistributionAmount `protobuf:"bytes,3,opt,name=last_balance,json=lastBalance,proto3" json:"last_balance,omitempty"` + // distributions contains the list of distributions to be made to continuous + // funds and budgets. It contains time in order to distribute to non-expired + // funds only. + Distributions []*Distribution `protobuf:"bytes,4,rep,name=distributions,proto3" json:"distributions,omitempty"` + // params defines the parameters of this module, currently only contains the + // denoms that will be used for continuous fund distributions. + Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *GenesisState) Reset() { + *x = GenesisState{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_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_cosmos_protocolpool_v1_genesis_proto_rawDescGZIP(), []int{0} +} + +func (x *GenesisState) GetContinuousFund() []*ContinuousFund { + if x != nil { + return x.ContinuousFund + } + return nil +} + +func (x *GenesisState) GetBudget() []*Budget { + if x != nil { + return x.Budget + } + return nil +} + +func (x *GenesisState) GetLastBalance() *DistributionAmount { + if x != nil { + return x.LastBalance + } + return nil +} + +func (x *GenesisState) GetDistributions() []*Distribution { + if x != nil { + return x.Distributions + } + return nil +} + +func (x *GenesisState) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +type Distribution struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // time at which this distribution was made, in order to distribute to non-expired funds only + // and funds that existed at that time. Because we don't distribute right away, we keep track + // of the time of distribution. + Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` + // amount is the list of coins to be distributed. + Amount *DistributionAmount `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *Distribution) Reset() { + *x = Distribution{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_genesis_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Distribution) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Distribution) ProtoMessage() {} + +// Deprecated: Use Distribution.ProtoReflect.Descriptor instead. +func (*Distribution) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_genesis_proto_rawDescGZIP(), []int{1} +} + +func (x *Distribution) GetTime() *timestamppb.Timestamp { + if x != nil { + return x.Time + } + return nil +} + +func (x *Distribution) GetAmount() *DistributionAmount { + if x != nil { + return x.Amount + } + return nil +} + +var File_cosmos_protocolpool_v1_genesis_proto protoreflect.FileDescriptor + +var file_cosmos_protocolpool_v1_genesis_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x1a, 0x22, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, + 0x6f, 0x6f, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 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, 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, 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, 0xf0, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x4f, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x6f, 0x75, 0x73, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, + 0x75, 0x73, 0x46, 0x75, 0x6e, 0x64, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, + 0x75, 0x73, 0x46, 0x75, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x53, + 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0d, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x36, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x01, 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, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x48, + 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, + 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0xdc, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x76, 0x31, + 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x43, 0x50, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x70, 0x6f, 0x6f, 0x6c, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, + 0x6f, 0x6f, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_protocolpool_v1_genesis_proto_rawDescOnce sync.Once + file_cosmos_protocolpool_v1_genesis_proto_rawDescData = file_cosmos_protocolpool_v1_genesis_proto_rawDesc +) + +func file_cosmos_protocolpool_v1_genesis_proto_rawDescGZIP() []byte { + file_cosmos_protocolpool_v1_genesis_proto_rawDescOnce.Do(func() { + file_cosmos_protocolpool_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_protocolpool_v1_genesis_proto_rawDescData) + }) + return file_cosmos_protocolpool_v1_genesis_proto_rawDescData +} + +var file_cosmos_protocolpool_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cosmos_protocolpool_v1_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: cosmos.protocolpool.v1.GenesisState + (*Distribution)(nil), // 1: cosmos.protocolpool.v1.Distribution + (*ContinuousFund)(nil), // 2: cosmos.protocolpool.v1.ContinuousFund + (*Budget)(nil), // 3: cosmos.protocolpool.v1.Budget + (*DistributionAmount)(nil), // 4: cosmos.protocolpool.v1.DistributionAmount + (*Params)(nil), // 5: cosmos.protocolpool.v1.Params + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp +} +var file_cosmos_protocolpool_v1_genesis_proto_depIdxs = []int32{ + 2, // 0: cosmos.protocolpool.v1.GenesisState.continuous_fund:type_name -> cosmos.protocolpool.v1.ContinuousFund + 3, // 1: cosmos.protocolpool.v1.GenesisState.budget:type_name -> cosmos.protocolpool.v1.Budget + 4, // 2: cosmos.protocolpool.v1.GenesisState.last_balance:type_name -> cosmos.protocolpool.v1.DistributionAmount + 1, // 3: cosmos.protocolpool.v1.GenesisState.distributions:type_name -> cosmos.protocolpool.v1.Distribution + 5, // 4: cosmos.protocolpool.v1.GenesisState.params:type_name -> cosmos.protocolpool.v1.Params + 6, // 5: cosmos.protocolpool.v1.Distribution.time:type_name -> google.protobuf.Timestamp + 4, // 6: cosmos.protocolpool.v1.Distribution.amount:type_name -> cosmos.protocolpool.v1.DistributionAmount + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_cosmos_protocolpool_v1_genesis_proto_init() } +func file_cosmos_protocolpool_v1_genesis_proto_init() { + if File_cosmos_protocolpool_v1_genesis_proto != nil { + return + } + file_cosmos_protocolpool_v1_types_proto_init() + if !protoimpl.UnsafeEnabled { + file_cosmos_protocolpool_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 + } + } + file_cosmos_protocolpool_v1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Distribution); 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_cosmos_protocolpool_v1_genesis_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_protocolpool_v1_genesis_proto_goTypes, + DependencyIndexes: file_cosmos_protocolpool_v1_genesis_proto_depIdxs, + MessageInfos: file_cosmos_protocolpool_v1_genesis_proto_msgTypes, + }.Build() + File_cosmos_protocolpool_v1_genesis_proto = out.File + file_cosmos_protocolpool_v1_genesis_proto_rawDesc = nil + file_cosmos_protocolpool_v1_genesis_proto_goTypes = nil + file_cosmos_protocolpool_v1_genesis_proto_depIdxs = nil +} diff --git a/api/cosmos/protocolpool/v1/tx.pulsar.go b/api/cosmos/protocolpool/v1/tx.pulsar.go new file mode 100644 index 000000000000..c5ea72028af0 --- /dev/null +++ b/api/cosmos/protocolpool/v1/tx.pulsar.go @@ -0,0 +1,9065 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package protocolpoolv1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + _ "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" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_MsgFundCommunityPool_1_list)(nil) + +type _MsgFundCommunityPool_1_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgFundCommunityPool_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgFundCommunityPool_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgFundCommunityPool_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgFundCommunityPool_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgFundCommunityPool_1_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgFundCommunityPool_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgFundCommunityPool_1_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgFundCommunityPool_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgFundCommunityPool protoreflect.MessageDescriptor + fd_MsgFundCommunityPool_amount protoreflect.FieldDescriptor + fd_MsgFundCommunityPool_depositor protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgFundCommunityPool = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgFundCommunityPool") + fd_MsgFundCommunityPool_amount = md_MsgFundCommunityPool.Fields().ByName("amount") + fd_MsgFundCommunityPool_depositor = md_MsgFundCommunityPool.Fields().ByName("depositor") +} + +var _ protoreflect.Message = (*fastReflection_MsgFundCommunityPool)(nil) + +type fastReflection_MsgFundCommunityPool MsgFundCommunityPool + +func (x *MsgFundCommunityPool) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgFundCommunityPool)(x) +} + +func (x *MsgFundCommunityPool) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_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_MsgFundCommunityPool_messageType fastReflection_MsgFundCommunityPool_messageType +var _ protoreflect.MessageType = fastReflection_MsgFundCommunityPool_messageType{} + +type fastReflection_MsgFundCommunityPool_messageType struct{} + +func (x fastReflection_MsgFundCommunityPool_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgFundCommunityPool)(nil) +} +func (x fastReflection_MsgFundCommunityPool_messageType) New() protoreflect.Message { + return new(fastReflection_MsgFundCommunityPool) +} +func (x fastReflection_MsgFundCommunityPool_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgFundCommunityPool +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgFundCommunityPool) Descriptor() protoreflect.MessageDescriptor { + return md_MsgFundCommunityPool +} + +// 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_MsgFundCommunityPool) Type() protoreflect.MessageType { + return _fastReflection_MsgFundCommunityPool_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgFundCommunityPool) New() protoreflect.Message { + return new(fastReflection_MsgFundCommunityPool) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgFundCommunityPool) Interface() protoreflect.ProtoMessage { + return (*MsgFundCommunityPool)(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_MsgFundCommunityPool) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_MsgFundCommunityPool_1_list{list: &x.Amount}) + if !f(fd_MsgFundCommunityPool_amount, value) { + return + } + } + if x.Depositor != "" { + value := protoreflect.ValueOfString(x.Depositor) + if !f(fd_MsgFundCommunityPool_depositor, 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_MsgFundCommunityPool) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgFundCommunityPool.amount": + return len(x.Amount) != 0 + case "cosmos.protocolpool.v1.MsgFundCommunityPool.depositor": + return x.Depositor != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundCommunityPool")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundCommunityPool 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_MsgFundCommunityPool) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgFundCommunityPool.amount": + x.Amount = nil + case "cosmos.protocolpool.v1.MsgFundCommunityPool.depositor": + x.Depositor = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundCommunityPool")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundCommunityPool 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_MsgFundCommunityPool) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.MsgFundCommunityPool.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_MsgFundCommunityPool_1_list{}) + } + listValue := &_MsgFundCommunityPool_1_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + case "cosmos.protocolpool.v1.MsgFundCommunityPool.depositor": + value := x.Depositor + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundCommunityPool")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundCommunityPool 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_MsgFundCommunityPool) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgFundCommunityPool.amount": + lv := value.List() + clv := lv.(*_MsgFundCommunityPool_1_list) + x.Amount = *clv.list + case "cosmos.protocolpool.v1.MsgFundCommunityPool.depositor": + x.Depositor = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundCommunityPool")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundCommunityPool 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_MsgFundCommunityPool) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgFundCommunityPool.amount": + if x.Amount == nil { + x.Amount = []*v1beta1.Coin{} + } + value := &_MsgFundCommunityPool_1_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + case "cosmos.protocolpool.v1.MsgFundCommunityPool.depositor": + panic(fmt.Errorf("field depositor of message cosmos.protocolpool.v1.MsgFundCommunityPool is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundCommunityPool")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundCommunityPool 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_MsgFundCommunityPool) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgFundCommunityPool.amount": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgFundCommunityPool_1_list{list: &list}) + case "cosmos.protocolpool.v1.MsgFundCommunityPool.depositor": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundCommunityPool")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundCommunityPool 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_MsgFundCommunityPool) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgFundCommunityPool", 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_MsgFundCommunityPool) 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_MsgFundCommunityPool) 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_MsgFundCommunityPool) 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_MsgFundCommunityPool) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgFundCommunityPool) + 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.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Depositor) + 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().(*MsgFundCommunityPool) + 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.Depositor) > 0 { + i -= len(x.Depositor) + copy(dAtA[i:], x.Depositor) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) + i-- + dAtA[i] = 0x12 + } + if len(x.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[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().(*MsgFundCommunityPool) + 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: MsgFundCommunityPool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgFundCommunityPool: 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 Amount", 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.Amount = append(x.Amount, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); 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 Depositor", 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.Depositor = 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_MsgFundCommunityPoolResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgFundCommunityPoolResponse = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgFundCommunityPoolResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgFundCommunityPoolResponse)(nil) + +type fastReflection_MsgFundCommunityPoolResponse MsgFundCommunityPoolResponse + +func (x *MsgFundCommunityPoolResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgFundCommunityPoolResponse)(x) +} + +func (x *MsgFundCommunityPoolResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_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_MsgFundCommunityPoolResponse_messageType fastReflection_MsgFundCommunityPoolResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgFundCommunityPoolResponse_messageType{} + +type fastReflection_MsgFundCommunityPoolResponse_messageType struct{} + +func (x fastReflection_MsgFundCommunityPoolResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgFundCommunityPoolResponse)(nil) +} +func (x fastReflection_MsgFundCommunityPoolResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgFundCommunityPoolResponse) +} +func (x fastReflection_MsgFundCommunityPoolResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgFundCommunityPoolResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgFundCommunityPoolResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgFundCommunityPoolResponse +} + +// 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_MsgFundCommunityPoolResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgFundCommunityPoolResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgFundCommunityPoolResponse) New() protoreflect.Message { + return new(fastReflection_MsgFundCommunityPoolResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgFundCommunityPoolResponse) Interface() protoreflect.ProtoMessage { + return (*MsgFundCommunityPoolResponse)(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_MsgFundCommunityPoolResponse) 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_MsgFundCommunityPoolResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundCommunityPoolResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundCommunityPoolResponse 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_MsgFundCommunityPoolResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundCommunityPoolResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundCommunityPoolResponse 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_MsgFundCommunityPoolResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundCommunityPoolResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundCommunityPoolResponse 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_MsgFundCommunityPoolResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundCommunityPoolResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundCommunityPoolResponse 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_MsgFundCommunityPoolResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundCommunityPoolResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundCommunityPoolResponse 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_MsgFundCommunityPoolResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundCommunityPoolResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundCommunityPoolResponse 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_MsgFundCommunityPoolResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgFundCommunityPoolResponse", 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_MsgFundCommunityPoolResponse) 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_MsgFundCommunityPoolResponse) 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_MsgFundCommunityPoolResponse) 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_MsgFundCommunityPoolResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgFundCommunityPoolResponse) + 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().(*MsgFundCommunityPoolResponse) + 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().(*MsgFundCommunityPoolResponse) + 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: MsgFundCommunityPoolResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgFundCommunityPoolResponse: 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 = (*_MsgCommunityPoolSpend_3_list)(nil) + +type _MsgCommunityPoolSpend_3_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgCommunityPoolSpend_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgCommunityPoolSpend_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgCommunityPoolSpend_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgCommunityPoolSpend_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgCommunityPoolSpend_3_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCommunityPoolSpend_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgCommunityPoolSpend_3_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCommunityPoolSpend_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgCommunityPoolSpend protoreflect.MessageDescriptor + fd_MsgCommunityPoolSpend_authority protoreflect.FieldDescriptor + fd_MsgCommunityPoolSpend_recipient protoreflect.FieldDescriptor + fd_MsgCommunityPoolSpend_amount protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgCommunityPoolSpend = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgCommunityPoolSpend") + fd_MsgCommunityPoolSpend_authority = md_MsgCommunityPoolSpend.Fields().ByName("authority") + fd_MsgCommunityPoolSpend_recipient = md_MsgCommunityPoolSpend.Fields().ByName("recipient") + fd_MsgCommunityPoolSpend_amount = md_MsgCommunityPoolSpend.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_MsgCommunityPoolSpend)(nil) + +type fastReflection_MsgCommunityPoolSpend MsgCommunityPoolSpend + +func (x *MsgCommunityPoolSpend) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCommunityPoolSpend)(x) +} + +func (x *MsgCommunityPoolSpend) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_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_MsgCommunityPoolSpend_messageType fastReflection_MsgCommunityPoolSpend_messageType +var _ protoreflect.MessageType = fastReflection_MsgCommunityPoolSpend_messageType{} + +type fastReflection_MsgCommunityPoolSpend_messageType struct{} + +func (x fastReflection_MsgCommunityPoolSpend_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCommunityPoolSpend)(nil) +} +func (x fastReflection_MsgCommunityPoolSpend_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCommunityPoolSpend) +} +func (x fastReflection_MsgCommunityPoolSpend_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCommunityPoolSpend +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCommunityPoolSpend) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCommunityPoolSpend +} + +// 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_MsgCommunityPoolSpend) Type() protoreflect.MessageType { + return _fastReflection_MsgCommunityPoolSpend_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCommunityPoolSpend) New() protoreflect.Message { + return new(fastReflection_MsgCommunityPoolSpend) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCommunityPoolSpend) Interface() protoreflect.ProtoMessage { + return (*MsgCommunityPoolSpend)(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_MsgCommunityPoolSpend) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgCommunityPoolSpend_authority, value) { + return + } + } + if x.Recipient != "" { + value := protoreflect.ValueOfString(x.Recipient) + if !f(fd_MsgCommunityPoolSpend_recipient, value) { + return + } + } + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_MsgCommunityPoolSpend_3_list{list: &x.Amount}) + if !f(fd_MsgCommunityPoolSpend_amount, 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_MsgCommunityPoolSpend) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.authority": + return x.Authority != "" + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.recipient": + return x.Recipient != "" + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.amount": + return len(x.Amount) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCommunityPoolSpend")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCommunityPoolSpend 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_MsgCommunityPoolSpend) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.authority": + x.Authority = "" + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.recipient": + x.Recipient = "" + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCommunityPoolSpend")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCommunityPoolSpend 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_MsgCommunityPoolSpend) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.recipient": + value := x.Recipient + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_MsgCommunityPoolSpend_3_list{}) + } + listValue := &_MsgCommunityPoolSpend_3_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCommunityPoolSpend")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCommunityPoolSpend 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_MsgCommunityPoolSpend) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.authority": + x.Authority = value.Interface().(string) + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.recipient": + x.Recipient = value.Interface().(string) + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.amount": + lv := value.List() + clv := lv.(*_MsgCommunityPoolSpend_3_list) + x.Amount = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCommunityPoolSpend")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCommunityPoolSpend 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_MsgCommunityPoolSpend) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.amount": + if x.Amount == nil { + x.Amount = []*v1beta1.Coin{} + } + value := &_MsgCommunityPoolSpend_3_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.authority": + panic(fmt.Errorf("field authority of message cosmos.protocolpool.v1.MsgCommunityPoolSpend is not mutable")) + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.recipient": + panic(fmt.Errorf("field recipient of message cosmos.protocolpool.v1.MsgCommunityPoolSpend is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCommunityPoolSpend")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCommunityPoolSpend 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_MsgCommunityPoolSpend) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.authority": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.recipient": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.MsgCommunityPoolSpend.amount": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgCommunityPoolSpend_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCommunityPoolSpend")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCommunityPoolSpend 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_MsgCommunityPoolSpend) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgCommunityPoolSpend", 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_MsgCommunityPoolSpend) 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_MsgCommunityPoolSpend) 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_MsgCommunityPoolSpend) 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_MsgCommunityPoolSpend) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCommunityPoolSpend) + 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.Recipient) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Amount) > 0 { + for _, e := range x.Amount { + 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().(*MsgCommunityPoolSpend) + 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.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[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.Recipient) > 0 { + i -= len(x.Recipient) + copy(dAtA[i:], x.Recipient) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Recipient))) + 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().(*MsgCommunityPoolSpend) + 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: MsgCommunityPoolSpend: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCommunityPoolSpend: 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 Recipient", 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.Recipient = 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 Amount", 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.Amount = append(x.Amount, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-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_MsgCommunityPoolSpendResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgCommunityPoolSpendResponse = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgCommunityPoolSpendResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgCommunityPoolSpendResponse)(nil) + +type fastReflection_MsgCommunityPoolSpendResponse MsgCommunityPoolSpendResponse + +func (x *MsgCommunityPoolSpendResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCommunityPoolSpendResponse)(x) +} + +func (x *MsgCommunityPoolSpendResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_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_MsgCommunityPoolSpendResponse_messageType fastReflection_MsgCommunityPoolSpendResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCommunityPoolSpendResponse_messageType{} + +type fastReflection_MsgCommunityPoolSpendResponse_messageType struct{} + +func (x fastReflection_MsgCommunityPoolSpendResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCommunityPoolSpendResponse)(nil) +} +func (x fastReflection_MsgCommunityPoolSpendResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCommunityPoolSpendResponse) +} +func (x fastReflection_MsgCommunityPoolSpendResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCommunityPoolSpendResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCommunityPoolSpendResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCommunityPoolSpendResponse +} + +// 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_MsgCommunityPoolSpendResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCommunityPoolSpendResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCommunityPoolSpendResponse) New() protoreflect.Message { + return new(fastReflection_MsgCommunityPoolSpendResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCommunityPoolSpendResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCommunityPoolSpendResponse)(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_MsgCommunityPoolSpendResponse) 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_MsgCommunityPoolSpendResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse 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_MsgCommunityPoolSpendResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse 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_MsgCommunityPoolSpendResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse 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_MsgCommunityPoolSpendResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse 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_MsgCommunityPoolSpendResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse 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_MsgCommunityPoolSpendResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse 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_MsgCommunityPoolSpendResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse", 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_MsgCommunityPoolSpendResponse) 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_MsgCommunityPoolSpendResponse) 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_MsgCommunityPoolSpendResponse) 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_MsgCommunityPoolSpendResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCommunityPoolSpendResponse) + 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().(*MsgCommunityPoolSpendResponse) + 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().(*MsgCommunityPoolSpendResponse) + 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: MsgCommunityPoolSpendResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCommunityPoolSpendResponse: 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_MsgSubmitBudgetProposal protoreflect.MessageDescriptor + fd_MsgSubmitBudgetProposal_authority protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_recipient_address protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_budget_per_tranche protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_start_time protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_tranches protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_period protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgSubmitBudgetProposal = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgSubmitBudgetProposal") + fd_MsgSubmitBudgetProposal_authority = md_MsgSubmitBudgetProposal.Fields().ByName("authority") + fd_MsgSubmitBudgetProposal_recipient_address = md_MsgSubmitBudgetProposal.Fields().ByName("recipient_address") + fd_MsgSubmitBudgetProposal_budget_per_tranche = md_MsgSubmitBudgetProposal.Fields().ByName("budget_per_tranche") + fd_MsgSubmitBudgetProposal_start_time = md_MsgSubmitBudgetProposal.Fields().ByName("start_time") + fd_MsgSubmitBudgetProposal_tranches = md_MsgSubmitBudgetProposal.Fields().ByName("tranches") + fd_MsgSubmitBudgetProposal_period = md_MsgSubmitBudgetProposal.Fields().ByName("period") +} + +var _ protoreflect.Message = (*fastReflection_MsgSubmitBudgetProposal)(nil) + +type fastReflection_MsgSubmitBudgetProposal MsgSubmitBudgetProposal + +func (x *MsgSubmitBudgetProposal) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSubmitBudgetProposal)(x) +} + +func (x *MsgSubmitBudgetProposal) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_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_MsgSubmitBudgetProposal_messageType fastReflection_MsgSubmitBudgetProposal_messageType +var _ protoreflect.MessageType = fastReflection_MsgSubmitBudgetProposal_messageType{} + +type fastReflection_MsgSubmitBudgetProposal_messageType struct{} + +func (x fastReflection_MsgSubmitBudgetProposal_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSubmitBudgetProposal)(nil) +} +func (x fastReflection_MsgSubmitBudgetProposal_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSubmitBudgetProposal) +} +func (x fastReflection_MsgSubmitBudgetProposal_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSubmitBudgetProposal +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSubmitBudgetProposal) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSubmitBudgetProposal +} + +// 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_MsgSubmitBudgetProposal) Type() protoreflect.MessageType { + return _fastReflection_MsgSubmitBudgetProposal_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSubmitBudgetProposal) New() protoreflect.Message { + return new(fastReflection_MsgSubmitBudgetProposal) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSubmitBudgetProposal) Interface() protoreflect.ProtoMessage { + return (*MsgSubmitBudgetProposal)(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_MsgSubmitBudgetProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgSubmitBudgetProposal_authority, value) { + return + } + } + if x.RecipientAddress != "" { + value := protoreflect.ValueOfString(x.RecipientAddress) + if !f(fd_MsgSubmitBudgetProposal_recipient_address, value) { + return + } + } + if x.BudgetPerTranche != nil { + value := protoreflect.ValueOfMessage(x.BudgetPerTranche.ProtoReflect()) + if !f(fd_MsgSubmitBudgetProposal_budget_per_tranche, value) { + return + } + } + if x.StartTime != nil { + value := protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) + if !f(fd_MsgSubmitBudgetProposal_start_time, value) { + return + } + } + if x.Tranches != uint64(0) { + value := protoreflect.ValueOfUint64(x.Tranches) + if !f(fd_MsgSubmitBudgetProposal_tranches, value) { + return + } + } + if x.Period != nil { + value := protoreflect.ValueOfMessage(x.Period.ProtoReflect()) + if !f(fd_MsgSubmitBudgetProposal_period, 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_MsgSubmitBudgetProposal) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.authority": + return x.Authority != "" + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.recipient_address": + return x.RecipientAddress != "" + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.budget_per_tranche": + return x.BudgetPerTranche != nil + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": + return x.StartTime != nil + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": + return x.Tranches != uint64(0) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": + return x.Period != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposal 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_MsgSubmitBudgetProposal) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.authority": + x.Authority = "" + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.recipient_address": + x.RecipientAddress = "" + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.budget_per_tranche": + x.BudgetPerTranche = nil + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": + x.StartTime = nil + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": + x.Tranches = uint64(0) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": + x.Period = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposal 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_MsgSubmitBudgetProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.recipient_address": + value := x.RecipientAddress + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.budget_per_tranche": + value := x.BudgetPerTranche + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": + value := x.StartTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": + value := x.Tranches + return protoreflect.ValueOfUint64(value) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": + value := x.Period + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposal 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_MsgSubmitBudgetProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.authority": + x.Authority = value.Interface().(string) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.recipient_address": + x.RecipientAddress = value.Interface().(string) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.budget_per_tranche": + x.BudgetPerTranche = value.Message().Interface().(*v1beta1.Coin) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": + x.StartTime = value.Message().Interface().(*timestamppb.Timestamp) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": + x.Tranches = value.Uint() + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": + x.Period = value.Message().Interface().(*durationpb.Duration) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposal 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_MsgSubmitBudgetProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.budget_per_tranche": + if x.BudgetPerTranche == nil { + x.BudgetPerTranche = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.BudgetPerTranche.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": + if x.StartTime == nil { + x.StartTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": + if x.Period == nil { + x.Period = new(durationpb.Duration) + } + return protoreflect.ValueOfMessage(x.Period.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.authority": + panic(fmt.Errorf("field authority of message cosmos.protocolpool.v1.MsgSubmitBudgetProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.recipient_address": + panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.MsgSubmitBudgetProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": + panic(fmt.Errorf("field tranches of message cosmos.protocolpool.v1.MsgSubmitBudgetProposal is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposal 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_MsgSubmitBudgetProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.authority": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.recipient_address": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.budget_per_tranche": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": + m := new(durationpb.Duration) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposal 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_MsgSubmitBudgetProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgSubmitBudgetProposal", 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_MsgSubmitBudgetProposal) 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_MsgSubmitBudgetProposal) 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_MsgSubmitBudgetProposal) 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_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSubmitBudgetProposal) + 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.RecipientAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.BudgetPerTranche != nil { + l = options.Size(x.BudgetPerTranche) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.StartTime != nil { + l = options.Size(x.StartTime) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Tranches != 0 { + n += 1 + runtime.Sov(uint64(x.Tranches)) + } + if x.Period != nil { + l = options.Size(x.Period) + 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().(*MsgSubmitBudgetProposal) + 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.Period != nil { + encoded, err := options.Marshal(x.Period) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x32 + } + if x.Tranches != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Tranches)) + i-- + dAtA[i] = 0x28 + } + if x.StartTime != nil { + encoded, err := options.Marshal(x.StartTime) + 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] = 0x22 + } + if x.BudgetPerTranche != nil { + encoded, err := options.Marshal(x.BudgetPerTranche) + 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.RecipientAddress) > 0 { + i -= len(x.RecipientAddress) + copy(dAtA[i:], x.RecipientAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RecipientAddress))) + 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().(*MsgSubmitBudgetProposal) + 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: MsgSubmitBudgetProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitBudgetProposal: 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 RecipientAddress", 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.RecipientAddress = 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 BudgetPerTranche", 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.BudgetPerTranche == nil { + x.BudgetPerTranche = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BudgetPerTranche); 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 StartTime", 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.StartTime == nil { + x.StartTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StartTime); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) + } + x.Tranches = 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.Tranches |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", 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.Period == nil { + x.Period = &durationpb.Duration{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Period); 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_MsgSubmitBudgetProposalResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgSubmitBudgetProposalResponse = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgSubmitBudgetProposalResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgSubmitBudgetProposalResponse)(nil) + +type fastReflection_MsgSubmitBudgetProposalResponse MsgSubmitBudgetProposalResponse + +func (x *MsgSubmitBudgetProposalResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSubmitBudgetProposalResponse)(x) +} + +func (x *MsgSubmitBudgetProposalResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_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_MsgSubmitBudgetProposalResponse_messageType fastReflection_MsgSubmitBudgetProposalResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgSubmitBudgetProposalResponse_messageType{} + +type fastReflection_MsgSubmitBudgetProposalResponse_messageType struct{} + +func (x fastReflection_MsgSubmitBudgetProposalResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSubmitBudgetProposalResponse)(nil) +} +func (x fastReflection_MsgSubmitBudgetProposalResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSubmitBudgetProposalResponse) +} +func (x fastReflection_MsgSubmitBudgetProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSubmitBudgetProposalResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSubmitBudgetProposalResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSubmitBudgetProposalResponse +} + +// 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_MsgSubmitBudgetProposalResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgSubmitBudgetProposalResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSubmitBudgetProposalResponse) New() protoreflect.Message { + return new(fastReflection_MsgSubmitBudgetProposalResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSubmitBudgetProposalResponse) Interface() protoreflect.ProtoMessage { + return (*MsgSubmitBudgetProposalResponse)(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_MsgSubmitBudgetProposalResponse) 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_MsgSubmitBudgetProposalResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse 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_MsgSubmitBudgetProposalResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse 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_MsgSubmitBudgetProposalResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse 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_MsgSubmitBudgetProposalResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse 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_MsgSubmitBudgetProposalResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse 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_MsgSubmitBudgetProposalResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse 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_MsgSubmitBudgetProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse", 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_MsgSubmitBudgetProposalResponse) 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_MsgSubmitBudgetProposalResponse) 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_MsgSubmitBudgetProposalResponse) 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_MsgSubmitBudgetProposalResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSubmitBudgetProposalResponse) + 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().(*MsgSubmitBudgetProposalResponse) + 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().(*MsgSubmitBudgetProposalResponse) + 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: MsgSubmitBudgetProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitBudgetProposalResponse: 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_MsgClaimBudget protoreflect.MessageDescriptor + fd_MsgClaimBudget_recipient_address protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgClaimBudget = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgClaimBudget") + fd_MsgClaimBudget_recipient_address = md_MsgClaimBudget.Fields().ByName("recipient_address") +} + +var _ protoreflect.Message = (*fastReflection_MsgClaimBudget)(nil) + +type fastReflection_MsgClaimBudget MsgClaimBudget + +func (x *MsgClaimBudget) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgClaimBudget)(x) +} + +func (x *MsgClaimBudget) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_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_MsgClaimBudget_messageType fastReflection_MsgClaimBudget_messageType +var _ protoreflect.MessageType = fastReflection_MsgClaimBudget_messageType{} + +type fastReflection_MsgClaimBudget_messageType struct{} + +func (x fastReflection_MsgClaimBudget_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgClaimBudget)(nil) +} +func (x fastReflection_MsgClaimBudget_messageType) New() protoreflect.Message { + return new(fastReflection_MsgClaimBudget) +} +func (x fastReflection_MsgClaimBudget_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgClaimBudget +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgClaimBudget) Descriptor() protoreflect.MessageDescriptor { + return md_MsgClaimBudget +} + +// 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_MsgClaimBudget) Type() protoreflect.MessageType { + return _fastReflection_MsgClaimBudget_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgClaimBudget) New() protoreflect.Message { + return new(fastReflection_MsgClaimBudget) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgClaimBudget) Interface() protoreflect.ProtoMessage { + return (*MsgClaimBudget)(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_MsgClaimBudget) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.RecipientAddress != "" { + value := protoreflect.ValueOfString(x.RecipientAddress) + if !f(fd_MsgClaimBudget_recipient_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgClaimBudget) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgClaimBudget.recipient_address": + return x.RecipientAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgClaimBudget")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgClaimBudget 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_MsgClaimBudget) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgClaimBudget.recipient_address": + x.RecipientAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgClaimBudget")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgClaimBudget 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_MsgClaimBudget) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.MsgClaimBudget.recipient_address": + value := x.RecipientAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgClaimBudget")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgClaimBudget 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_MsgClaimBudget) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgClaimBudget.recipient_address": + x.RecipientAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgClaimBudget")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgClaimBudget 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_MsgClaimBudget) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgClaimBudget.recipient_address": + panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.MsgClaimBudget is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgClaimBudget")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgClaimBudget 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_MsgClaimBudget) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgClaimBudget.recipient_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgClaimBudget")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgClaimBudget 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_MsgClaimBudget) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgClaimBudget", 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_MsgClaimBudget) 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_MsgClaimBudget) 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_MsgClaimBudget) 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_MsgClaimBudget) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgClaimBudget) + 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.RecipientAddress) + 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().(*MsgClaimBudget) + 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.RecipientAddress) > 0 { + i -= len(x.RecipientAddress) + copy(dAtA[i:], x.RecipientAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RecipientAddress))) + 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().(*MsgClaimBudget) + 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: MsgClaimBudget: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgClaimBudget: 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 RecipientAddress", 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.RecipientAddress = 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_MsgClaimBudgetResponse protoreflect.MessageDescriptor + fd_MsgClaimBudgetResponse_amount protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgClaimBudgetResponse = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgClaimBudgetResponse") + fd_MsgClaimBudgetResponse_amount = md_MsgClaimBudgetResponse.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_MsgClaimBudgetResponse)(nil) + +type fastReflection_MsgClaimBudgetResponse MsgClaimBudgetResponse + +func (x *MsgClaimBudgetResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgClaimBudgetResponse)(x) +} + +func (x *MsgClaimBudgetResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_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_MsgClaimBudgetResponse_messageType fastReflection_MsgClaimBudgetResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgClaimBudgetResponse_messageType{} + +type fastReflection_MsgClaimBudgetResponse_messageType struct{} + +func (x fastReflection_MsgClaimBudgetResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgClaimBudgetResponse)(nil) +} +func (x fastReflection_MsgClaimBudgetResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgClaimBudgetResponse) +} +func (x fastReflection_MsgClaimBudgetResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgClaimBudgetResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgClaimBudgetResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgClaimBudgetResponse +} + +// 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_MsgClaimBudgetResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgClaimBudgetResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgClaimBudgetResponse) New() protoreflect.Message { + return new(fastReflection_MsgClaimBudgetResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgClaimBudgetResponse) Interface() protoreflect.ProtoMessage { + return (*MsgClaimBudgetResponse)(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_MsgClaimBudgetResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Amount != nil { + value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + if !f(fd_MsgClaimBudgetResponse_amount, 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_MsgClaimBudgetResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount": + return x.Amount != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgClaimBudgetResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgClaimBudgetResponse 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_MsgClaimBudgetResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgClaimBudgetResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgClaimBudgetResponse 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_MsgClaimBudgetResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount": + value := x.Amount + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgClaimBudgetResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgClaimBudgetResponse 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_MsgClaimBudgetResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount": + x.Amount = value.Message().Interface().(*v1beta1.Coin) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgClaimBudgetResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgClaimBudgetResponse 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_MsgClaimBudgetResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount": + if x.Amount == nil { + x.Amount = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgClaimBudgetResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgClaimBudgetResponse 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_MsgClaimBudgetResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgClaimBudgetResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgClaimBudgetResponse 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_MsgClaimBudgetResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgClaimBudgetResponse", 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_MsgClaimBudgetResponse) 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_MsgClaimBudgetResponse) 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_MsgClaimBudgetResponse) 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_MsgClaimBudgetResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgClaimBudgetResponse) + 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.Amount != nil { + l = options.Size(x.Amount) + 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().(*MsgClaimBudgetResponse) + 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.Amount != nil { + encoded, err := options.Marshal(x.Amount) + 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().(*MsgClaimBudgetResponse) + 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: MsgClaimBudgetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgClaimBudgetResponse: 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 Amount", 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.Amount == nil { + x.Amount = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); 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_MsgCreateContinuousFund protoreflect.MessageDescriptor + fd_MsgCreateContinuousFund_authority protoreflect.FieldDescriptor + fd_MsgCreateContinuousFund_recipient protoreflect.FieldDescriptor + fd_MsgCreateContinuousFund_percentage protoreflect.FieldDescriptor + fd_MsgCreateContinuousFund_expiry protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgCreateContinuousFund = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgCreateContinuousFund") + fd_MsgCreateContinuousFund_authority = md_MsgCreateContinuousFund.Fields().ByName("authority") + fd_MsgCreateContinuousFund_recipient = md_MsgCreateContinuousFund.Fields().ByName("recipient") + fd_MsgCreateContinuousFund_percentage = md_MsgCreateContinuousFund.Fields().ByName("percentage") + fd_MsgCreateContinuousFund_expiry = md_MsgCreateContinuousFund.Fields().ByName("expiry") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateContinuousFund)(nil) + +type fastReflection_MsgCreateContinuousFund MsgCreateContinuousFund + +func (x *MsgCreateContinuousFund) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateContinuousFund)(x) +} + +func (x *MsgCreateContinuousFund) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_v1_tx_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_MsgCreateContinuousFund_messageType fastReflection_MsgCreateContinuousFund_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateContinuousFund_messageType{} + +type fastReflection_MsgCreateContinuousFund_messageType struct{} + +func (x fastReflection_MsgCreateContinuousFund_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateContinuousFund)(nil) +} +func (x fastReflection_MsgCreateContinuousFund_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateContinuousFund) +} +func (x fastReflection_MsgCreateContinuousFund_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateContinuousFund +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateContinuousFund) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateContinuousFund +} + +// 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_MsgCreateContinuousFund) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateContinuousFund_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateContinuousFund) New() protoreflect.Message { + return new(fastReflection_MsgCreateContinuousFund) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateContinuousFund) Interface() protoreflect.ProtoMessage { + return (*MsgCreateContinuousFund)(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_MsgCreateContinuousFund) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgCreateContinuousFund_authority, value) { + return + } + } + if x.Recipient != "" { + value := protoreflect.ValueOfString(x.Recipient) + if !f(fd_MsgCreateContinuousFund_recipient, value) { + return + } + } + if x.Percentage != "" { + value := protoreflect.ValueOfString(x.Percentage) + if !f(fd_MsgCreateContinuousFund_percentage, value) { + return + } + } + if x.Expiry != nil { + value := protoreflect.ValueOfMessage(x.Expiry.ProtoReflect()) + if !f(fd_MsgCreateContinuousFund_expiry, 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_MsgCreateContinuousFund) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.authority": + return x.Authority != "" + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.recipient": + return x.Recipient != "" + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.percentage": + return x.Percentage != "" + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.expiry": + return x.Expiry != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCreateContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCreateContinuousFund 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_MsgCreateContinuousFund) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.authority": + x.Authority = "" + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.recipient": + x.Recipient = "" + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.percentage": + x.Percentage = "" + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.expiry": + x.Expiry = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCreateContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCreateContinuousFund 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_MsgCreateContinuousFund) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.recipient": + value := x.Recipient + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.percentage": + value := x.Percentage + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.expiry": + value := x.Expiry + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCreateContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCreateContinuousFund 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_MsgCreateContinuousFund) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.authority": + x.Authority = value.Interface().(string) + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.recipient": + x.Recipient = value.Interface().(string) + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.percentage": + x.Percentage = value.Interface().(string) + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.expiry": + x.Expiry = value.Message().Interface().(*timestamppb.Timestamp) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCreateContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCreateContinuousFund 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_MsgCreateContinuousFund) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.expiry": + if x.Expiry == nil { + x.Expiry = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.Expiry.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.authority": + panic(fmt.Errorf("field authority of message cosmos.protocolpool.v1.MsgCreateContinuousFund is not mutable")) + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.recipient": + panic(fmt.Errorf("field recipient of message cosmos.protocolpool.v1.MsgCreateContinuousFund is not mutable")) + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.percentage": + panic(fmt.Errorf("field percentage of message cosmos.protocolpool.v1.MsgCreateContinuousFund is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCreateContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCreateContinuousFund 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_MsgCreateContinuousFund) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.authority": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.recipient": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.percentage": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.MsgCreateContinuousFund.expiry": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCreateContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCreateContinuousFund 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_MsgCreateContinuousFund) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgCreateContinuousFund", 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_MsgCreateContinuousFund) 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_MsgCreateContinuousFund) 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_MsgCreateContinuousFund) 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_MsgCreateContinuousFund) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateContinuousFund) + 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.Recipient) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Percentage) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Expiry != nil { + l = options.Size(x.Expiry) + 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().(*MsgCreateContinuousFund) + 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.Expiry != nil { + encoded, err := options.Marshal(x.Expiry) + 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] = 0x22 + } + if len(x.Percentage) > 0 { + i -= len(x.Percentage) + copy(dAtA[i:], x.Percentage) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Percentage))) + i-- + dAtA[i] = 0x1a + } + if len(x.Recipient) > 0 { + i -= len(x.Recipient) + copy(dAtA[i:], x.Recipient) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Recipient))) + 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().(*MsgCreateContinuousFund) + 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: MsgCreateContinuousFund: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateContinuousFund: 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 Recipient", 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.Recipient = 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 Percentage", 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.Percentage = 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 Expiry", 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.Expiry == nil { + x.Expiry = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiry); 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_MsgCreateContinuousFundResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgCreateContinuousFundResponse = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgCreateContinuousFundResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateContinuousFundResponse)(nil) + +type fastReflection_MsgCreateContinuousFundResponse MsgCreateContinuousFundResponse + +func (x *MsgCreateContinuousFundResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateContinuousFundResponse)(x) +} + +func (x *MsgCreateContinuousFundResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_v1_tx_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_MsgCreateContinuousFundResponse_messageType fastReflection_MsgCreateContinuousFundResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateContinuousFundResponse_messageType{} + +type fastReflection_MsgCreateContinuousFundResponse_messageType struct{} + +func (x fastReflection_MsgCreateContinuousFundResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateContinuousFundResponse)(nil) +} +func (x fastReflection_MsgCreateContinuousFundResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateContinuousFundResponse) +} +func (x fastReflection_MsgCreateContinuousFundResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateContinuousFundResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateContinuousFundResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateContinuousFundResponse +} + +// 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_MsgCreateContinuousFundResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateContinuousFundResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateContinuousFundResponse) New() protoreflect.Message { + return new(fastReflection_MsgCreateContinuousFundResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateContinuousFundResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCreateContinuousFundResponse)(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_MsgCreateContinuousFundResponse) 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_MsgCreateContinuousFundResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCreateContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCreateContinuousFundResponse 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_MsgCreateContinuousFundResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCreateContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCreateContinuousFundResponse 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_MsgCreateContinuousFundResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCreateContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCreateContinuousFundResponse 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_MsgCreateContinuousFundResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCreateContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCreateContinuousFundResponse 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_MsgCreateContinuousFundResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCreateContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCreateContinuousFundResponse 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_MsgCreateContinuousFundResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCreateContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCreateContinuousFundResponse 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_MsgCreateContinuousFundResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgCreateContinuousFundResponse", 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_MsgCreateContinuousFundResponse) 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_MsgCreateContinuousFundResponse) 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_MsgCreateContinuousFundResponse) 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_MsgCreateContinuousFundResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateContinuousFundResponse) + 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().(*MsgCreateContinuousFundResponse) + 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().(*MsgCreateContinuousFundResponse) + 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: MsgCreateContinuousFundResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateContinuousFundResponse: 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_MsgCancelContinuousFund protoreflect.MessageDescriptor + fd_MsgCancelContinuousFund_authority protoreflect.FieldDescriptor + fd_MsgCancelContinuousFund_recipient_address protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgCancelContinuousFund = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgCancelContinuousFund") + fd_MsgCancelContinuousFund_authority = md_MsgCancelContinuousFund.Fields().ByName("authority") + fd_MsgCancelContinuousFund_recipient_address = md_MsgCancelContinuousFund.Fields().ByName("recipient_address") +} + +var _ protoreflect.Message = (*fastReflection_MsgCancelContinuousFund)(nil) + +type fastReflection_MsgCancelContinuousFund MsgCancelContinuousFund + +func (x *MsgCancelContinuousFund) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCancelContinuousFund)(x) +} + +func (x *MsgCancelContinuousFund) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_v1_tx_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_MsgCancelContinuousFund_messageType fastReflection_MsgCancelContinuousFund_messageType +var _ protoreflect.MessageType = fastReflection_MsgCancelContinuousFund_messageType{} + +type fastReflection_MsgCancelContinuousFund_messageType struct{} + +func (x fastReflection_MsgCancelContinuousFund_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCancelContinuousFund)(nil) +} +func (x fastReflection_MsgCancelContinuousFund_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCancelContinuousFund) +} +func (x fastReflection_MsgCancelContinuousFund_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCancelContinuousFund +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCancelContinuousFund) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCancelContinuousFund +} + +// 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_MsgCancelContinuousFund) Type() protoreflect.MessageType { + return _fastReflection_MsgCancelContinuousFund_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCancelContinuousFund) New() protoreflect.Message { + return new(fastReflection_MsgCancelContinuousFund) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCancelContinuousFund) Interface() protoreflect.ProtoMessage { + return (*MsgCancelContinuousFund)(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_MsgCancelContinuousFund) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgCancelContinuousFund_authority, value) { + return + } + } + if x.RecipientAddress != "" { + value := protoreflect.ValueOfString(x.RecipientAddress) + if !f(fd_MsgCancelContinuousFund_recipient_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgCancelContinuousFund) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCancelContinuousFund.authority": + return x.Authority != "" + case "cosmos.protocolpool.v1.MsgCancelContinuousFund.recipient_address": + return x.RecipientAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCancelContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCancelContinuousFund 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_MsgCancelContinuousFund) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCancelContinuousFund.authority": + x.Authority = "" + case "cosmos.protocolpool.v1.MsgCancelContinuousFund.recipient_address": + x.RecipientAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCancelContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCancelContinuousFund 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_MsgCancelContinuousFund) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.MsgCancelContinuousFund.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.MsgCancelContinuousFund.recipient_address": + value := x.RecipientAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCancelContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCancelContinuousFund 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_MsgCancelContinuousFund) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCancelContinuousFund.authority": + x.Authority = value.Interface().(string) + case "cosmos.protocolpool.v1.MsgCancelContinuousFund.recipient_address": + x.RecipientAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCancelContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCancelContinuousFund 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_MsgCancelContinuousFund) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCancelContinuousFund.authority": + panic(fmt.Errorf("field authority of message cosmos.protocolpool.v1.MsgCancelContinuousFund is not mutable")) + case "cosmos.protocolpool.v1.MsgCancelContinuousFund.recipient_address": + panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.MsgCancelContinuousFund is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCancelContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCancelContinuousFund 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_MsgCancelContinuousFund) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCancelContinuousFund.authority": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.MsgCancelContinuousFund.recipient_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCancelContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCancelContinuousFund 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_MsgCancelContinuousFund) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgCancelContinuousFund", 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_MsgCancelContinuousFund) 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_MsgCancelContinuousFund) 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_MsgCancelContinuousFund) 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_MsgCancelContinuousFund) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCancelContinuousFund) + 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.RecipientAddress) + 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().(*MsgCancelContinuousFund) + 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.RecipientAddress) > 0 { + i -= len(x.RecipientAddress) + copy(dAtA[i:], x.RecipientAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RecipientAddress))) + 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().(*MsgCancelContinuousFund) + 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: MsgCancelContinuousFund: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelContinuousFund: 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 RecipientAddress", 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.RecipientAddress = 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 = (*_MsgCancelContinuousFundResponse_4_list)(nil) + +type _MsgCancelContinuousFundResponse_4_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgCancelContinuousFundResponse_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgCancelContinuousFundResponse_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgCancelContinuousFundResponse_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgCancelContinuousFundResponse_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgCancelContinuousFundResponse_4_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCancelContinuousFundResponse_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgCancelContinuousFundResponse_4_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCancelContinuousFundResponse_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgCancelContinuousFundResponse protoreflect.MessageDescriptor + fd_MsgCancelContinuousFundResponse_canceled_time protoreflect.FieldDescriptor + fd_MsgCancelContinuousFundResponse_canceled_height protoreflect.FieldDescriptor + fd_MsgCancelContinuousFundResponse_recipient_address protoreflect.FieldDescriptor + fd_MsgCancelContinuousFundResponse_withdrawn_allocated_fund protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgCancelContinuousFundResponse = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgCancelContinuousFundResponse") + fd_MsgCancelContinuousFundResponse_canceled_time = md_MsgCancelContinuousFundResponse.Fields().ByName("canceled_time") + fd_MsgCancelContinuousFundResponse_canceled_height = md_MsgCancelContinuousFundResponse.Fields().ByName("canceled_height") + fd_MsgCancelContinuousFundResponse_recipient_address = md_MsgCancelContinuousFundResponse.Fields().ByName("recipient_address") + fd_MsgCancelContinuousFundResponse_withdrawn_allocated_fund = md_MsgCancelContinuousFundResponse.Fields().ByName("withdrawn_allocated_fund") +} + +var _ protoreflect.Message = (*fastReflection_MsgCancelContinuousFundResponse)(nil) + +type fastReflection_MsgCancelContinuousFundResponse MsgCancelContinuousFundResponse + +func (x *MsgCancelContinuousFundResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCancelContinuousFundResponse)(x) +} + +func (x *MsgCancelContinuousFundResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCancelContinuousFundResponse_messageType fastReflection_MsgCancelContinuousFundResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCancelContinuousFundResponse_messageType{} + +type fastReflection_MsgCancelContinuousFundResponse_messageType struct{} + +func (x fastReflection_MsgCancelContinuousFundResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCancelContinuousFundResponse)(nil) +} +func (x fastReflection_MsgCancelContinuousFundResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCancelContinuousFundResponse) +} +func (x fastReflection_MsgCancelContinuousFundResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCancelContinuousFundResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCancelContinuousFundResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCancelContinuousFundResponse +} + +// 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_MsgCancelContinuousFundResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCancelContinuousFundResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCancelContinuousFundResponse) New() protoreflect.Message { + return new(fastReflection_MsgCancelContinuousFundResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCancelContinuousFundResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCancelContinuousFundResponse)(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_MsgCancelContinuousFundResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.CanceledTime != nil { + value := protoreflect.ValueOfMessage(x.CanceledTime.ProtoReflect()) + if !f(fd_MsgCancelContinuousFundResponse_canceled_time, value) { + return + } + } + if x.CanceledHeight != uint64(0) { + value := protoreflect.ValueOfUint64(x.CanceledHeight) + if !f(fd_MsgCancelContinuousFundResponse_canceled_height, value) { + return + } + } + if x.RecipientAddress != "" { + value := protoreflect.ValueOfString(x.RecipientAddress) + if !f(fd_MsgCancelContinuousFundResponse_recipient_address, value) { + return + } + } + if len(x.WithdrawnAllocatedFund) != 0 { + value := protoreflect.ValueOfList(&_MsgCancelContinuousFundResponse_4_list{list: &x.WithdrawnAllocatedFund}) + if !f(fd_MsgCancelContinuousFundResponse_withdrawn_allocated_fund, 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_MsgCancelContinuousFundResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.canceled_time": + return x.CanceledTime != nil + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.canceled_height": + return x.CanceledHeight != uint64(0) + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.recipient_address": + return x.RecipientAddress != "" + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.withdrawn_allocated_fund": + return len(x.WithdrawnAllocatedFund) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCancelContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCancelContinuousFundResponse 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_MsgCancelContinuousFundResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.canceled_time": + x.CanceledTime = nil + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.canceled_height": + x.CanceledHeight = uint64(0) + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.recipient_address": + x.RecipientAddress = "" + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.withdrawn_allocated_fund": + x.WithdrawnAllocatedFund = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCancelContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCancelContinuousFundResponse 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_MsgCancelContinuousFundResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.canceled_time": + value := x.CanceledTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.canceled_height": + value := x.CanceledHeight + return protoreflect.ValueOfUint64(value) + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.recipient_address": + value := x.RecipientAddress + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.withdrawn_allocated_fund": + if len(x.WithdrawnAllocatedFund) == 0 { + return protoreflect.ValueOfList(&_MsgCancelContinuousFundResponse_4_list{}) + } + listValue := &_MsgCancelContinuousFundResponse_4_list{list: &x.WithdrawnAllocatedFund} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCancelContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCancelContinuousFundResponse 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_MsgCancelContinuousFundResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.canceled_time": + x.CanceledTime = value.Message().Interface().(*timestamppb.Timestamp) + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.canceled_height": + x.CanceledHeight = value.Uint() + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.recipient_address": + x.RecipientAddress = value.Interface().(string) + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.withdrawn_allocated_fund": + lv := value.List() + clv := lv.(*_MsgCancelContinuousFundResponse_4_list) + x.WithdrawnAllocatedFund = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCancelContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCancelContinuousFundResponse 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_MsgCancelContinuousFundResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.canceled_time": + if x.CanceledTime == nil { + x.CanceledTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.CanceledTime.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.withdrawn_allocated_fund": + if x.WithdrawnAllocatedFund == nil { + x.WithdrawnAllocatedFund = []*v1beta1.Coin{} + } + value := &_MsgCancelContinuousFundResponse_4_list{list: &x.WithdrawnAllocatedFund} + return protoreflect.ValueOfList(value) + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.canceled_height": + panic(fmt.Errorf("field canceled_height of message cosmos.protocolpool.v1.MsgCancelContinuousFundResponse is not mutable")) + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.recipient_address": + panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.MsgCancelContinuousFundResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCancelContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCancelContinuousFundResponse 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_MsgCancelContinuousFundResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.canceled_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.canceled_height": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.recipient_address": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.withdrawn_allocated_fund": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgCancelContinuousFundResponse_4_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgCancelContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgCancelContinuousFundResponse 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_MsgCancelContinuousFundResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgCancelContinuousFundResponse", 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_MsgCancelContinuousFundResponse) 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_MsgCancelContinuousFundResponse) 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_MsgCancelContinuousFundResponse) 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_MsgCancelContinuousFundResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCancelContinuousFundResponse) + 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.CanceledTime != nil { + l = options.Size(x.CanceledTime) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.CanceledHeight != 0 { + n += 1 + runtime.Sov(uint64(x.CanceledHeight)) + } + l = len(x.RecipientAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.WithdrawnAllocatedFund) > 0 { + for _, e := range x.WithdrawnAllocatedFund { + 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().(*MsgCancelContinuousFundResponse) + 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.WithdrawnAllocatedFund) > 0 { + for iNdEx := len(x.WithdrawnAllocatedFund) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.WithdrawnAllocatedFund[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] = 0x22 + } + } + if len(x.RecipientAddress) > 0 { + i -= len(x.RecipientAddress) + copy(dAtA[i:], x.RecipientAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RecipientAddress))) + i-- + dAtA[i] = 0x1a + } + if x.CanceledHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CanceledHeight)) + i-- + dAtA[i] = 0x10 + } + if x.CanceledTime != nil { + encoded, err := options.Marshal(x.CanceledTime) + 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().(*MsgCancelContinuousFundResponse) + 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: MsgCancelContinuousFundResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelContinuousFundResponse: 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 CanceledTime", 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.CanceledTime == nil { + x.CanceledTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CanceledTime); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CanceledHeight", wireType) + } + x.CanceledHeight = 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.CanceledHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RecipientAddress", 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.RecipientAddress = 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 WithdrawnAllocatedFund", 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.WithdrawnAllocatedFund = append(x.WithdrawnAllocatedFund, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.WithdrawnAllocatedFund[len(x.WithdrawnAllocatedFund)-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_MsgWithdrawContinuousFund protoreflect.MessageDescriptor + fd_MsgWithdrawContinuousFund_recipient_address protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgWithdrawContinuousFund = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgWithdrawContinuousFund") + fd_MsgWithdrawContinuousFund_recipient_address = md_MsgWithdrawContinuousFund.Fields().ByName("recipient_address") +} + +var _ protoreflect.Message = (*fastReflection_MsgWithdrawContinuousFund)(nil) + +type fastReflection_MsgWithdrawContinuousFund MsgWithdrawContinuousFund + +func (x *MsgWithdrawContinuousFund) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdrawContinuousFund)(x) +} + +func (x *MsgWithdrawContinuousFund) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgWithdrawContinuousFund_messageType fastReflection_MsgWithdrawContinuousFund_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdrawContinuousFund_messageType{} + +type fastReflection_MsgWithdrawContinuousFund_messageType struct{} + +func (x fastReflection_MsgWithdrawContinuousFund_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdrawContinuousFund)(nil) +} +func (x fastReflection_MsgWithdrawContinuousFund_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawContinuousFund) +} +func (x fastReflection_MsgWithdrawContinuousFund_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawContinuousFund +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgWithdrawContinuousFund) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawContinuousFund +} + +// 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_MsgWithdrawContinuousFund) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdrawContinuousFund_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgWithdrawContinuousFund) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawContinuousFund) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgWithdrawContinuousFund) Interface() protoreflect.ProtoMessage { + return (*MsgWithdrawContinuousFund)(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_MsgWithdrawContinuousFund) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.RecipientAddress != "" { + value := protoreflect.ValueOfString(x.RecipientAddress) + if !f(fd_MsgWithdrawContinuousFund_recipient_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgWithdrawContinuousFund) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgWithdrawContinuousFund.recipient_address": + return x.RecipientAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgWithdrawContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgWithdrawContinuousFund 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_MsgWithdrawContinuousFund) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgWithdrawContinuousFund.recipient_address": + x.RecipientAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgWithdrawContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgWithdrawContinuousFund 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_MsgWithdrawContinuousFund) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.MsgWithdrawContinuousFund.recipient_address": + value := x.RecipientAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgWithdrawContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgWithdrawContinuousFund 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_MsgWithdrawContinuousFund) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgWithdrawContinuousFund.recipient_address": + x.RecipientAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgWithdrawContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgWithdrawContinuousFund 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_MsgWithdrawContinuousFund) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgWithdrawContinuousFund.recipient_address": + panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.MsgWithdrawContinuousFund is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgWithdrawContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgWithdrawContinuousFund 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_MsgWithdrawContinuousFund) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgWithdrawContinuousFund.recipient_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgWithdrawContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgWithdrawContinuousFund 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_MsgWithdrawContinuousFund) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgWithdrawContinuousFund", 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_MsgWithdrawContinuousFund) 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_MsgWithdrawContinuousFund) 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_MsgWithdrawContinuousFund) 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_MsgWithdrawContinuousFund) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgWithdrawContinuousFund) + 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.RecipientAddress) + 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().(*MsgWithdrawContinuousFund) + 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.RecipientAddress) > 0 { + i -= len(x.RecipientAddress) + copy(dAtA[i:], x.RecipientAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RecipientAddress))) + 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().(*MsgWithdrawContinuousFund) + 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: MsgWithdrawContinuousFund: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawContinuousFund: 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 RecipientAddress", 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.RecipientAddress = 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 = (*_MsgWithdrawContinuousFundResponse_1_list)(nil) + +type _MsgWithdrawContinuousFundResponse_1_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgWithdrawContinuousFundResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgWithdrawContinuousFundResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgWithdrawContinuousFundResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgWithdrawContinuousFundResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgWithdrawContinuousFundResponse_1_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgWithdrawContinuousFundResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgWithdrawContinuousFundResponse_1_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgWithdrawContinuousFundResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgWithdrawContinuousFundResponse protoreflect.MessageDescriptor + fd_MsgWithdrawContinuousFundResponse_amount protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgWithdrawContinuousFundResponse = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgWithdrawContinuousFundResponse") + fd_MsgWithdrawContinuousFundResponse_amount = md_MsgWithdrawContinuousFundResponse.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_MsgWithdrawContinuousFundResponse)(nil) + +type fastReflection_MsgWithdrawContinuousFundResponse MsgWithdrawContinuousFundResponse + +func (x *MsgWithdrawContinuousFundResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdrawContinuousFundResponse)(x) +} + +func (x *MsgWithdrawContinuousFundResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[13] + 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_MsgWithdrawContinuousFundResponse_messageType fastReflection_MsgWithdrawContinuousFundResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdrawContinuousFundResponse_messageType{} + +type fastReflection_MsgWithdrawContinuousFundResponse_messageType struct{} + +func (x fastReflection_MsgWithdrawContinuousFundResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdrawContinuousFundResponse)(nil) +} +func (x fastReflection_MsgWithdrawContinuousFundResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawContinuousFundResponse) +} +func (x fastReflection_MsgWithdrawContinuousFundResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawContinuousFundResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgWithdrawContinuousFundResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawContinuousFundResponse +} + +// 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_MsgWithdrawContinuousFundResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdrawContinuousFundResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgWithdrawContinuousFundResponse) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawContinuousFundResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgWithdrawContinuousFundResponse) Interface() protoreflect.ProtoMessage { + return (*MsgWithdrawContinuousFundResponse)(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_MsgWithdrawContinuousFundResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_MsgWithdrawContinuousFundResponse_1_list{list: &x.Amount}) + if !f(fd_MsgWithdrawContinuousFundResponse_amount, 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_MsgWithdrawContinuousFundResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse.amount": + return len(x.Amount) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse 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_MsgWithdrawContinuousFundResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse 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_MsgWithdrawContinuousFundResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_MsgWithdrawContinuousFundResponse_1_list{}) + } + listValue := &_MsgWithdrawContinuousFundResponse_1_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse 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_MsgWithdrawContinuousFundResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse.amount": + lv := value.List() + clv := lv.(*_MsgWithdrawContinuousFundResponse_1_list) + x.Amount = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse 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_MsgWithdrawContinuousFundResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse.amount": + if x.Amount == nil { + x.Amount = []*v1beta1.Coin{} + } + value := &_MsgWithdrawContinuousFundResponse_1_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse 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_MsgWithdrawContinuousFundResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse.amount": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgWithdrawContinuousFundResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse 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_MsgWithdrawContinuousFundResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse", 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_MsgWithdrawContinuousFundResponse) 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_MsgWithdrawContinuousFundResponse) 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_MsgWithdrawContinuousFundResponse) 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_MsgWithdrawContinuousFundResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgWithdrawContinuousFundResponse) + 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.Amount) > 0 { + for _, e := range x.Amount { + 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().(*MsgWithdrawContinuousFundResponse) + 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.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[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().(*MsgWithdrawContinuousFundResponse) + 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: MsgWithdrawContinuousFundResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawContinuousFundResponse: 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 Amount", 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.Amount = append(x.Amount, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-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_MsgUpdateParams protoreflect.MessageDescriptor + fd_MsgUpdateParams_authority protoreflect.FieldDescriptor + fd_MsgUpdateParams_params protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgUpdateParams = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgUpdateParams") + fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") + fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) + +type fastReflection_MsgUpdateParams MsgUpdateParams + +func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(x) +} + +func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} + +type fastReflection_MsgUpdateParams_messageType struct{} + +func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(nil) +} +func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} +func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpdateParams) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParams_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParams)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgUpdateParams_authority, value) { + return + } + } + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_MsgUpdateParams_params, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgUpdateParams.authority": + return x.Authority != "" + case "cosmos.protocolpool.v1.MsgUpdateParams.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgUpdateParams.authority": + x.Authority = "" + case "cosmos.protocolpool.v1.MsgUpdateParams.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.MsgUpdateParams.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.MsgUpdateParams.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgUpdateParams does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgUpdateParams.authority": + x.Authority = value.Interface().(string) + case "cosmos.protocolpool.v1.MsgUpdateParams.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgUpdateParams.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgUpdateParams.authority": + panic(fmt.Errorf("field authority of message cosmos.protocolpool.v1.MsgUpdateParams is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgUpdateParams.authority": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.MsgUpdateParams.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgUpdateParams", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpdateParams) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParams) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParams) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParams) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateParamsResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgUpdateParamsResponse = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) + +type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse + +func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(x) +} + +func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} + +type fastReflection_MsgUpdateParamsResponse_messageType struct{} + +func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(nil) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpdateParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParamsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgUpdateParamsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/protocolpool/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) +) + +// MsgFundCommunityPool allows an account to directly +// fund the community pool. +type MsgFundCommunityPool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Amount []*v1beta1.Coin `protobuf:"bytes,1,rep,name=amount,proto3" json:"amount,omitempty"` + Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` +} + +func (x *MsgFundCommunityPool) Reset() { + *x = MsgFundCommunityPool{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgFundCommunityPool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgFundCommunityPool) ProtoMessage() {} + +// Deprecated: Use MsgFundCommunityPool.ProtoReflect.Descriptor instead. +func (*MsgFundCommunityPool) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgFundCommunityPool) GetAmount() []*v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +func (x *MsgFundCommunityPool) GetDepositor() string { + if x != nil { + return x.Depositor + } + return "" +} + +// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. +type MsgFundCommunityPoolResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgFundCommunityPoolResponse) Reset() { + *x = MsgFundCommunityPoolResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgFundCommunityPoolResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgFundCommunityPoolResponse) ProtoMessage() {} + +// Deprecated: Use MsgFundCommunityPoolResponse.ProtoReflect.Descriptor instead. +func (*MsgFundCommunityPoolResponse) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{1} +} + +// MsgCommunityPoolSpend defines a message for sending tokens from the community +// pool to another account. This message is typically executed via a governance +// proposal with the governance module being the executing authority. +type MsgCommunityPoolSpend struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` + Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *MsgCommunityPoolSpend) Reset() { + *x = MsgCommunityPoolSpend{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCommunityPoolSpend) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCommunityPoolSpend) ProtoMessage() {} + +// Deprecated: Use MsgCommunityPoolSpend.ProtoReflect.Descriptor instead. +func (*MsgCommunityPoolSpend) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgCommunityPoolSpend) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgCommunityPoolSpend) GetRecipient() string { + if x != nil { + return x.Recipient + } + return "" +} + +func (x *MsgCommunityPoolSpend) GetAmount() []*v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// MsgCommunityPoolSpendResponse defines the response to executing a +// MsgCommunityPoolSpend message. +type MsgCommunityPoolSpendResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgCommunityPoolSpendResponse) Reset() { + *x = MsgCommunityPoolSpendResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCommunityPoolSpendResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCommunityPoolSpendResponse) ProtoMessage() {} + +// Deprecated: Use MsgCommunityPoolSpendResponse.ProtoReflect.Descriptor instead. +func (*MsgCommunityPoolSpendResponse) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{3} +} + +// MsgSubmitBudgetProposal defines budget proposal type. +type MsgSubmitBudgetProposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // RecipientAddress is the address of the recipient who can claim the budget. + RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` + // BudgetPerTranche is the amount allocated per tranche. + BudgetPerTranche *v1beta1.Coin `protobuf:"bytes,3,opt,name=budget_per_tranche,json=budgetPerTranche,proto3" json:"budget_per_tranche,omitempty"` + // StartTime is the time when the budget becomes claimable. + // If StartTime is less than the current block time, proposal will not be accepted. + StartTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // Tranches is the number of times the budget amount is to be distributed. + Tranches uint64 `protobuf:"varint,5,opt,name=tranches,proto3" json:"tranches,omitempty"` + // Period is the time interval(number of seconds) at which funds distribution should be performed. + // For example, if a period is set to 3600, it represents an action that + // should occur every hour (3600 seconds). + Period *durationpb.Duration `protobuf:"bytes,6,opt,name=period,proto3" json:"period,omitempty"` +} + +func (x *MsgSubmitBudgetProposal) Reset() { + *x = MsgSubmitBudgetProposal{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSubmitBudgetProposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSubmitBudgetProposal) ProtoMessage() {} + +// Deprecated: Use MsgSubmitBudgetProposal.ProtoReflect.Descriptor instead. +func (*MsgSubmitBudgetProposal) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgSubmitBudgetProposal) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgSubmitBudgetProposal) GetRecipientAddress() string { + if x != nil { + return x.RecipientAddress + } + return "" +} + +func (x *MsgSubmitBudgetProposal) GetBudgetPerTranche() *v1beta1.Coin { + if x != nil { + return x.BudgetPerTranche + } + return nil +} + +func (x *MsgSubmitBudgetProposal) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *MsgSubmitBudgetProposal) GetTranches() uint64 { + if x != nil { + return x.Tranches + } + return 0 +} + +func (x *MsgSubmitBudgetProposal) GetPeriod() *durationpb.Duration { + if x != nil { + return x.Period + } + return nil +} + +// MsgSubmitBudgetProposalResponse defines the response to executing a +// MsgSubmitBudgetProposal message. +type MsgSubmitBudgetProposalResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgSubmitBudgetProposalResponse) Reset() { + *x = MsgSubmitBudgetProposalResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSubmitBudgetProposalResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSubmitBudgetProposalResponse) ProtoMessage() {} + +// Deprecated: Use MsgSubmitBudgetProposalResponse.ProtoReflect.Descriptor instead. +func (*MsgSubmitBudgetProposalResponse) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{5} +} + +// MsgClaimBudget defines a message for claiming the distributed budget. +type MsgClaimBudget struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RecipientAddress string `protobuf:"bytes,1,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` +} + +func (x *MsgClaimBudget) Reset() { + *x = MsgClaimBudget{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgClaimBudget) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgClaimBudget) ProtoMessage() {} + +// Deprecated: Use MsgClaimBudget.ProtoReflect.Descriptor instead. +func (*MsgClaimBudget) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgClaimBudget) GetRecipientAddress() string { + if x != nil { + return x.RecipientAddress + } + return "" +} + +// MsgClaimBudgetResponse defines the response to executing a +// MsgClaimBudget message. +type MsgClaimBudgetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Amount *v1beta1.Coin `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *MsgClaimBudgetResponse) Reset() { + *x = MsgClaimBudgetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgClaimBudgetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgClaimBudgetResponse) ProtoMessage() {} + +// Deprecated: Use MsgClaimBudgetResponse.ProtoReflect.Descriptor instead. +func (*MsgClaimBudgetResponse) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{7} +} + +func (x *MsgClaimBudgetResponse) GetAmount() *v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// MsgCreateContinuousFund defines a message for adding continuous funds. +type MsgCreateContinuousFund struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Recipient address of the account receiving funds. + Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` + // Percentage is the percentage of funds to be allocated from Community pool. + Percentage string `protobuf:"bytes,3,opt,name=percentage,proto3" json:"percentage,omitempty"` + // Optional, if expiry is set, removes the state object when expired. + Expiry *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expiry,proto3" json:"expiry,omitempty"` +} + +func (x *MsgCreateContinuousFund) Reset() { + *x = MsgCreateContinuousFund{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateContinuousFund) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateContinuousFund) ProtoMessage() {} + +// Deprecated: Use MsgCreateContinuousFund.ProtoReflect.Descriptor instead. +func (*MsgCreateContinuousFund) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{8} +} + +func (x *MsgCreateContinuousFund) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgCreateContinuousFund) GetRecipient() string { + if x != nil { + return x.Recipient + } + return "" +} + +func (x *MsgCreateContinuousFund) GetPercentage() string { + if x != nil { + return x.Percentage + } + return "" +} + +func (x *MsgCreateContinuousFund) GetExpiry() *timestamppb.Timestamp { + if x != nil { + return x.Expiry + } + return nil +} + +// MsgCreateContinuousFundResponse defines the response to executing a +// MsgCreateContinuousFund message. +type MsgCreateContinuousFundResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgCreateContinuousFundResponse) Reset() { + *x = MsgCreateContinuousFundResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateContinuousFundResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateContinuousFundResponse) ProtoMessage() {} + +// Deprecated: Use MsgCreateContinuousFundResponse.ProtoReflect.Descriptor instead. +func (*MsgCreateContinuousFundResponse) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{9} +} + +// MsgCancelContinuousFund defines a message to cancel continuous funds for a specific recipient. +type MsgCancelContinuousFund struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Authority is the account address of authority. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // RecipientAddress is the account address of recipient whose funds are to be cancelled. + RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` +} + +func (x *MsgCancelContinuousFund) Reset() { + *x = MsgCancelContinuousFund{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCancelContinuousFund) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCancelContinuousFund) ProtoMessage() {} + +// Deprecated: Use MsgCancelContinuousFund.ProtoReflect.Descriptor instead. +func (*MsgCancelContinuousFund) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{10} +} + +func (x *MsgCancelContinuousFund) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgCancelContinuousFund) GetRecipientAddress() string { + if x != nil { + return x.RecipientAddress + } + return "" +} + +// MsgCancelContinuousFundResponse defines the response to executing a +// MsgCancelContinuousFund message. +type MsgCancelContinuousFundResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // CanceledTime is the canceled time. + CanceledTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=canceled_time,json=canceledTime,proto3" json:"canceled_time,omitempty"` + // CanceledHeight defines the canceled block height. + CanceledHeight uint64 `protobuf:"varint,2,opt,name=canceled_height,json=canceledHeight,proto3" json:"canceled_height,omitempty"` + // RecipientAddress is the account address of recipient whose funds are cancelled. + RecipientAddress string `protobuf:"bytes,3,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` + // withdrawnAllocatedFund represents the fund allocated to this recipient (if any) that have not been withdrawn yet, + // before a cancellation request has been initiated. + // It involves first withdrawing the funds and then canceling the request. + WithdrawnAllocatedFund []*v1beta1.Coin `protobuf:"bytes,4,rep,name=withdrawn_allocated_fund,json=withdrawnAllocatedFund,proto3" json:"withdrawn_allocated_fund,omitempty"` +} + +func (x *MsgCancelContinuousFundResponse) Reset() { + *x = MsgCancelContinuousFundResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCancelContinuousFundResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCancelContinuousFundResponse) ProtoMessage() {} + +// Deprecated: Use MsgCancelContinuousFundResponse.ProtoReflect.Descriptor instead. +func (*MsgCancelContinuousFundResponse) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{11} +} + +func (x *MsgCancelContinuousFundResponse) GetCanceledTime() *timestamppb.Timestamp { + if x != nil { + return x.CanceledTime + } + return nil +} + +func (x *MsgCancelContinuousFundResponse) GetCanceledHeight() uint64 { + if x != nil { + return x.CanceledHeight + } + return 0 +} + +func (x *MsgCancelContinuousFundResponse) GetRecipientAddress() string { + if x != nil { + return x.RecipientAddress + } + return "" +} + +func (x *MsgCancelContinuousFundResponse) GetWithdrawnAllocatedFund() []*v1beta1.Coin { + if x != nil { + return x.WithdrawnAllocatedFund + } + return nil +} + +// MsgWithdrawContinuousFund defines a message for withdrawing the continuous fund allocated to it. +type MsgWithdrawContinuousFund struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RecipientAddress string `protobuf:"bytes,1,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` +} + +func (x *MsgWithdrawContinuousFund) Reset() { + *x = MsgWithdrawContinuousFund{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgWithdrawContinuousFund) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgWithdrawContinuousFund) ProtoMessage() {} + +// Deprecated: Use MsgWithdrawContinuousFund.ProtoReflect.Descriptor instead. +func (*MsgWithdrawContinuousFund) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{12} +} + +func (x *MsgWithdrawContinuousFund) GetRecipientAddress() string { + if x != nil { + return x.RecipientAddress + } + return "" +} + +// MsgWithdrawContinuousFundResponse defines the response to executing a +// MsgWithdrawContinuousFund message. +type MsgWithdrawContinuousFundResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Amount []*v1beta1.Coin `protobuf:"bytes,1,rep,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *MsgWithdrawContinuousFundResponse) Reset() { + *x = MsgWithdrawContinuousFundResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgWithdrawContinuousFundResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgWithdrawContinuousFundResponse) ProtoMessage() {} + +// Deprecated: Use MsgWithdrawContinuousFundResponse.ProtoReflect.Descriptor instead. +func (*MsgWithdrawContinuousFundResponse) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{13} +} + +func (x *MsgWithdrawContinuousFundResponse) GetAmount() []*v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// MsgUpdateParams is the Msg/UpdateParams request type. +type MsgUpdateParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/protocolpool parameters to update. + // + // NOTE: All parameters must be supplied. + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *MsgUpdateParams) Reset() { + *x = MsgUpdateParams{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParams) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{14} +} + +func (x *MsgUpdateParams) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgUpdateParams) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateParamsResponse) Reset() { + *x = MsgUpdateParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParamsResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{15} +} + +var File_cosmos_protocolpool_v1_tx_proto protoreflect.FileDescriptor + +var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x76, + 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 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, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 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, 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, 0x22, 0xcb, 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, + 0x46, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, + 0x6c, 0x12, 0x63, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, + 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x3a, 0x16, + 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, + 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe2, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x43, 0x6f, + 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x6e, 0x64, + 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, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, + 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, + 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x63, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, + 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, + 0x69, 0x6e, 0x73, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, + 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, + 0x73, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x53, + 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x87, 0x03, 0x0a, + 0x17, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 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, 0x45, 0x0a, 0x11, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x47, 0x0a, 0x12, 0x62, 0x75, 0x64, 0x67, 0x65, + 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x10, + 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x50, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, + 0x12, 0x3f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, + 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, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x37, 0x0a, + 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x06, 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, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x06, + 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x21, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, 0x0a, 0x0e, 0x4d, 0x73, 0x67, + 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x45, 0x0a, 0x11, 0x72, + 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x10, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x3a, 0x16, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, + 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x7d, 0x0a, 0x16, 0x4d, 0x73, + 0x67, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, + 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, + 0x73, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa6, 0x02, 0x0a, 0x17, 0x4d, 0x73, + 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, + 0x73, 0x46, 0x75, 0x6e, 0x64, 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, 0x36, 0x0a, + 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, + 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, + 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, + 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, + 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0a, 0x70, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x79, 0x18, 0x04, 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, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x79, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x22, 0x21, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x46, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x46, 0x75, 0x6e, + 0x64, 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, 0x45, 0x0a, 0x11, 0x72, 0x65, 0x63, + 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, + 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x22, 0xe4, 0x02, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x43, 0x6f, + 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x46, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0d, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 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, 0x0c, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x27, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x65, 0x64, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x45, 0x0a, 0x11, 0x72, 0x65, 0x63, 0x69, + 0x70, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x72, + 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x85, 0x01, 0x0a, 0x18, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x5f, 0x61, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, + 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, + 0x16, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x46, 0x75, 0x6e, 0x64, 0x22, 0x7a, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, + 0x46, 0x75, 0x6e, 0x64, 0x12, 0x45, 0x0a, 0x11, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, + 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x72, 0x65, 0x63, 0x69, 0x70, + 0x69, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x16, 0x82, 0xe7, 0xb0, + 0x2a, 0x11, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x21, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x46, 0x75, 0x6e, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x97, + 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3c, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x32, 0xf9, 0x07, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x77, 0x0a, 0x11, 0x46, + 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, + 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, + 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x1a, 0x34, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x43, + 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, + 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x1a, 0x35, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, + 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x80, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x75, 0x64, 0x67, 0x65, + 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x75, 0x64, 0x67, + 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x37, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x75, 0x64, + 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0b, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x42, 0x75, 0x64, 0x67, + 0x65, 0x74, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, + 0x6c, 0x61, 0x69, 0x6d, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x42, 0x75, 0x64, 0x67, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x14, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x46, + 0x75, 0x6e, 0x64, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, + 0x46, 0x75, 0x6e, 0x64, 0x1a, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, + 0x73, 0x46, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x86, 0x01, + 0x0a, 0x16, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, + 0x75, 0x6f, 0x75, 0x73, 0x46, 0x75, 0x6e, 0x64, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x46, 0x75, 0x6e, 0x64, 0x1a, 0x39, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, + 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x46, 0x75, 0x6e, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x46, 0x75, 0x6e, 0x64, 0x12, + 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x46, 0x75, 0x6e, 0x64, + 0x1a, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x46, 0x75, 0x6e, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x0c, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x13, 0xca, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x37, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, + 0xd7, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x42, 0x07, + 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, + 0x76, 0x31, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x43, 0x50, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x5c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_cosmos_protocolpool_v1_tx_proto_rawDescOnce sync.Once + file_cosmos_protocolpool_v1_tx_proto_rawDescData = file_cosmos_protocolpool_v1_tx_proto_rawDesc +) + +func file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP() []byte { + file_cosmos_protocolpool_v1_tx_proto_rawDescOnce.Do(func() { + file_cosmos_protocolpool_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_protocolpool_v1_tx_proto_rawDescData) + }) + return file_cosmos_protocolpool_v1_tx_proto_rawDescData +} + +var file_cosmos_protocolpool_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_cosmos_protocolpool_v1_tx_proto_goTypes = []interface{}{ + (*MsgFundCommunityPool)(nil), // 0: cosmos.protocolpool.v1.MsgFundCommunityPool + (*MsgFundCommunityPoolResponse)(nil), // 1: cosmos.protocolpool.v1.MsgFundCommunityPoolResponse + (*MsgCommunityPoolSpend)(nil), // 2: cosmos.protocolpool.v1.MsgCommunityPoolSpend + (*MsgCommunityPoolSpendResponse)(nil), // 3: cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse + (*MsgSubmitBudgetProposal)(nil), // 4: cosmos.protocolpool.v1.MsgSubmitBudgetProposal + (*MsgSubmitBudgetProposalResponse)(nil), // 5: cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse + (*MsgClaimBudget)(nil), // 6: cosmos.protocolpool.v1.MsgClaimBudget + (*MsgClaimBudgetResponse)(nil), // 7: cosmos.protocolpool.v1.MsgClaimBudgetResponse + (*MsgCreateContinuousFund)(nil), // 8: cosmos.protocolpool.v1.MsgCreateContinuousFund + (*MsgCreateContinuousFundResponse)(nil), // 9: cosmos.protocolpool.v1.MsgCreateContinuousFundResponse + (*MsgCancelContinuousFund)(nil), // 10: cosmos.protocolpool.v1.MsgCancelContinuousFund + (*MsgCancelContinuousFundResponse)(nil), // 11: cosmos.protocolpool.v1.MsgCancelContinuousFundResponse + (*MsgWithdrawContinuousFund)(nil), // 12: cosmos.protocolpool.v1.MsgWithdrawContinuousFund + (*MsgWithdrawContinuousFundResponse)(nil), // 13: cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse + (*MsgUpdateParams)(nil), // 14: cosmos.protocolpool.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 15: cosmos.protocolpool.v1.MsgUpdateParamsResponse + (*v1beta1.Coin)(nil), // 16: cosmos.base.v1beta1.Coin + (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 18: google.protobuf.Duration + (*Params)(nil), // 19: cosmos.protocolpool.v1.Params +} +var file_cosmos_protocolpool_v1_tx_proto_depIdxs = []int32{ + 16, // 0: cosmos.protocolpool.v1.MsgFundCommunityPool.amount:type_name -> cosmos.base.v1beta1.Coin + 16, // 1: cosmos.protocolpool.v1.MsgCommunityPoolSpend.amount:type_name -> cosmos.base.v1beta1.Coin + 16, // 2: cosmos.protocolpool.v1.MsgSubmitBudgetProposal.budget_per_tranche:type_name -> cosmos.base.v1beta1.Coin + 17, // 3: cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time:type_name -> google.protobuf.Timestamp + 18, // 4: cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period:type_name -> google.protobuf.Duration + 16, // 5: cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount:type_name -> cosmos.base.v1beta1.Coin + 17, // 6: cosmos.protocolpool.v1.MsgCreateContinuousFund.expiry:type_name -> google.protobuf.Timestamp + 17, // 7: cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.canceled_time:type_name -> google.protobuf.Timestamp + 16, // 8: cosmos.protocolpool.v1.MsgCancelContinuousFundResponse.withdrawn_allocated_fund:type_name -> cosmos.base.v1beta1.Coin + 16, // 9: cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse.amount:type_name -> cosmos.base.v1beta1.Coin + 19, // 10: cosmos.protocolpool.v1.MsgUpdateParams.params:type_name -> cosmos.protocolpool.v1.Params + 0, // 11: cosmos.protocolpool.v1.Msg.FundCommunityPool:input_type -> cosmos.protocolpool.v1.MsgFundCommunityPool + 2, // 12: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:input_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpend + 4, // 13: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:input_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposal + 6, // 14: cosmos.protocolpool.v1.Msg.ClaimBudget:input_type -> cosmos.protocolpool.v1.MsgClaimBudget + 8, // 15: cosmos.protocolpool.v1.Msg.CreateContinuousFund:input_type -> cosmos.protocolpool.v1.MsgCreateContinuousFund + 12, // 16: cosmos.protocolpool.v1.Msg.WithdrawContinuousFund:input_type -> cosmos.protocolpool.v1.MsgWithdrawContinuousFund + 10, // 17: cosmos.protocolpool.v1.Msg.CancelContinuousFund:input_type -> cosmos.protocolpool.v1.MsgCancelContinuousFund + 14, // 18: cosmos.protocolpool.v1.Msg.UpdateParams:input_type -> cosmos.protocolpool.v1.MsgUpdateParams + 1, // 19: cosmos.protocolpool.v1.Msg.FundCommunityPool:output_type -> cosmos.protocolpool.v1.MsgFundCommunityPoolResponse + 3, // 20: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:output_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse + 5, // 21: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:output_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse + 7, // 22: cosmos.protocolpool.v1.Msg.ClaimBudget:output_type -> cosmos.protocolpool.v1.MsgClaimBudgetResponse + 9, // 23: cosmos.protocolpool.v1.Msg.CreateContinuousFund:output_type -> cosmos.protocolpool.v1.MsgCreateContinuousFundResponse + 13, // 24: cosmos.protocolpool.v1.Msg.WithdrawContinuousFund:output_type -> cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse + 11, // 25: cosmos.protocolpool.v1.Msg.CancelContinuousFund:output_type -> cosmos.protocolpool.v1.MsgCancelContinuousFundResponse + 15, // 26: cosmos.protocolpool.v1.Msg.UpdateParams:output_type -> cosmos.protocolpool.v1.MsgUpdateParamsResponse + 19, // [19:27] is the sub-list for method output_type + 11, // [11:19] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_cosmos_protocolpool_v1_tx_proto_init() } +func file_cosmos_protocolpool_v1_tx_proto_init() { + if File_cosmos_protocolpool_v1_tx_proto != nil { + return + } + file_cosmos_protocolpool_v1_types_proto_init() + if !protoimpl.UnsafeEnabled { + file_cosmos_protocolpool_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgFundCommunityPool); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgFundCommunityPoolResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCommunityPoolSpend); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCommunityPoolSpendResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSubmitBudgetProposal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSubmitBudgetProposalResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgClaimBudget); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgClaimBudgetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateContinuousFund); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateContinuousFundResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCancelContinuousFund); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCancelContinuousFundResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgWithdrawContinuousFund); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgWithdrawContinuousFundResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cosmos_protocolpool_v1_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 16, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cosmos_protocolpool_v1_tx_proto_goTypes, + DependencyIndexes: file_cosmos_protocolpool_v1_tx_proto_depIdxs, + MessageInfos: file_cosmos_protocolpool_v1_tx_proto_msgTypes, + }.Build() + File_cosmos_protocolpool_v1_tx_proto = out.File + file_cosmos_protocolpool_v1_tx_proto_rawDesc = nil + file_cosmos_protocolpool_v1_tx_proto_goTypes = nil + file_cosmos_protocolpool_v1_tx_proto_depIdxs = nil +} diff --git a/api/cosmos/protocolpool/v1/tx_grpc.pb.go b/api/cosmos/protocolpool/v1/tx_grpc.pb.go new file mode 100644 index 000000000000..e730c205bcc4 --- /dev/null +++ b/api/cosmos/protocolpool/v1/tx_grpc.pb.go @@ -0,0 +1,417 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: cosmos/protocolpool/v1/tx.proto + +package protocolpoolv1 + +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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Msg_FundCommunityPool_FullMethodName = "/cosmos.protocolpool.v1.Msg/FundCommunityPool" + Msg_CommunityPoolSpend_FullMethodName = "/cosmos.protocolpool.v1.Msg/CommunityPoolSpend" + Msg_SubmitBudgetProposal_FullMethodName = "/cosmos.protocolpool.v1.Msg/SubmitBudgetProposal" + Msg_ClaimBudget_FullMethodName = "/cosmos.protocolpool.v1.Msg/ClaimBudget" + Msg_CreateContinuousFund_FullMethodName = "/cosmos.protocolpool.v1.Msg/CreateContinuousFund" + Msg_WithdrawContinuousFund_FullMethodName = "/cosmos.protocolpool.v1.Msg/WithdrawContinuousFund" + Msg_CancelContinuousFund_FullMethodName = "/cosmos.protocolpool.v1.Msg/CancelContinuousFund" + Msg_UpdateParams_FullMethodName = "/cosmos.protocolpool.v1.Msg/UpdateParams" +) + +// 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. +// +// Msg defines the pool Msg service. +type MsgClient interface { + // FundCommunityPool defines a method to allow an account to directly + // fund the community pool. + FundCommunityPool(ctx context.Context, in *MsgFundCommunityPool, opts ...grpc.CallOption) (*MsgFundCommunityPoolResponse, error) + // CommunityPoolSpend defines a governance operation for sending tokens from + // the community pool in the x/protocolpool module to another account, which + // could be the governance module itself. The authority is defined in the + // keeper. + CommunityPoolSpend(ctx context.Context, in *MsgCommunityPoolSpend, opts ...grpc.CallOption) (*MsgCommunityPoolSpendResponse, error) + // SubmitBudgetProposal defines a method to set a budget proposal. + SubmitBudgetProposal(ctx context.Context, in *MsgSubmitBudgetProposal, opts ...grpc.CallOption) (*MsgSubmitBudgetProposalResponse, error) + // ClaimBudget defines a method to claim the distributed budget. + ClaimBudget(ctx context.Context, in *MsgClaimBudget, opts ...grpc.CallOption) (*MsgClaimBudgetResponse, error) + // CreateContinuousFund defines a method to add funds continuously. + CreateContinuousFund(ctx context.Context, in *MsgCreateContinuousFund, opts ...grpc.CallOption) (*MsgCreateContinuousFundResponse, error) + // WithdrawContinuousFund defines a method to withdraw continuous fund allocated. + WithdrawContinuousFund(ctx context.Context, in *MsgWithdrawContinuousFund, opts ...grpc.CallOption) (*MsgWithdrawContinuousFundResponse, error) + // CancelContinuousFund defines a method for cancelling continuous fund. + CancelContinuousFund(ctx context.Context, in *MsgCancelContinuousFund, opts ...grpc.CallOption) (*MsgCancelContinuousFundResponse, error) + // UpdateParams defines a governance operation for updating the x/protocolpool module parameters. + // The authority is defined in the keeper. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) FundCommunityPool(ctx context.Context, in *MsgFundCommunityPool, opts ...grpc.CallOption) (*MsgFundCommunityPoolResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgFundCommunityPoolResponse) + err := c.cc.Invoke(ctx, Msg_FundCommunityPool_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CommunityPoolSpend(ctx context.Context, in *MsgCommunityPoolSpend, opts ...grpc.CallOption) (*MsgCommunityPoolSpendResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgCommunityPoolSpendResponse) + err := c.cc.Invoke(ctx, Msg_CommunityPoolSpend_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SubmitBudgetProposal(ctx context.Context, in *MsgSubmitBudgetProposal, opts ...grpc.CallOption) (*MsgSubmitBudgetProposalResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgSubmitBudgetProposalResponse) + err := c.cc.Invoke(ctx, Msg_SubmitBudgetProposal_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ClaimBudget(ctx context.Context, in *MsgClaimBudget, opts ...grpc.CallOption) (*MsgClaimBudgetResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgClaimBudgetResponse) + err := c.cc.Invoke(ctx, Msg_ClaimBudget_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CreateContinuousFund(ctx context.Context, in *MsgCreateContinuousFund, opts ...grpc.CallOption) (*MsgCreateContinuousFundResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgCreateContinuousFundResponse) + err := c.cc.Invoke(ctx, Msg_CreateContinuousFund_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) WithdrawContinuousFund(ctx context.Context, in *MsgWithdrawContinuousFund, opts ...grpc.CallOption) (*MsgWithdrawContinuousFundResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgWithdrawContinuousFundResponse) + err := c.cc.Invoke(ctx, Msg_WithdrawContinuousFund_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CancelContinuousFund(ctx context.Context, in *MsgCancelContinuousFund, opts ...grpc.CallOption) (*MsgCancelContinuousFundResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgCancelContinuousFundResponse) + err := c.cc.Invoke(ctx, Msg_CancelContinuousFund_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) + 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. +// +// Msg defines the pool Msg service. +type MsgServer interface { + // FundCommunityPool defines a method to allow an account to directly + // fund the community pool. + FundCommunityPool(context.Context, *MsgFundCommunityPool) (*MsgFundCommunityPoolResponse, error) + // CommunityPoolSpend defines a governance operation for sending tokens from + // the community pool in the x/protocolpool module to another account, which + // could be the governance module itself. The authority is defined in the + // keeper. + CommunityPoolSpend(context.Context, *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) + // SubmitBudgetProposal defines a method to set a budget proposal. + SubmitBudgetProposal(context.Context, *MsgSubmitBudgetProposal) (*MsgSubmitBudgetProposalResponse, error) + // ClaimBudget defines a method to claim the distributed budget. + ClaimBudget(context.Context, *MsgClaimBudget) (*MsgClaimBudgetResponse, error) + // CreateContinuousFund defines a method to add funds continuously. + CreateContinuousFund(context.Context, *MsgCreateContinuousFund) (*MsgCreateContinuousFundResponse, error) + // WithdrawContinuousFund defines a method to withdraw continuous fund allocated. + WithdrawContinuousFund(context.Context, *MsgWithdrawContinuousFund) (*MsgWithdrawContinuousFundResponse, error) + // CancelContinuousFund defines a method for cancelling continuous fund. + CancelContinuousFund(context.Context, *MsgCancelContinuousFund) (*MsgCancelContinuousFundResponse, error) + // UpdateParams defines a governance operation for updating the x/protocolpool module parameters. + // The authority is defined in the keeper. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedMsgServer struct{} + +func (UnimplementedMsgServer) FundCommunityPool(context.Context, *MsgFundCommunityPool) (*MsgFundCommunityPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FundCommunityPool not implemented") +} +func (UnimplementedMsgServer) CommunityPoolSpend(context.Context, *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CommunityPoolSpend not implemented") +} +func (UnimplementedMsgServer) SubmitBudgetProposal(context.Context, *MsgSubmitBudgetProposal) (*MsgSubmitBudgetProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitBudgetProposal not implemented") +} +func (UnimplementedMsgServer) ClaimBudget(context.Context, *MsgClaimBudget) (*MsgClaimBudgetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClaimBudget not implemented") +} +func (UnimplementedMsgServer) CreateContinuousFund(context.Context, *MsgCreateContinuousFund) (*MsgCreateContinuousFundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateContinuousFund not implemented") +} +func (UnimplementedMsgServer) WithdrawContinuousFund(context.Context, *MsgWithdrawContinuousFund) (*MsgWithdrawContinuousFundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawContinuousFund not implemented") +} +func (UnimplementedMsgServer) CancelContinuousFund(context.Context, *MsgCancelContinuousFund) (*MsgCancelContinuousFundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelContinuousFund not implemented") +} +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} +func (UnimplementedMsgServer) testEmbeddedByValue() {} + +// 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) { + // If the following call pancis, it indicates UnimplementedMsgServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_FundCommunityPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgFundCommunityPool) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).FundCommunityPool(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_FundCommunityPool_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).FundCommunityPool(ctx, req.(*MsgFundCommunityPool)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CommunityPoolSpend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCommunityPoolSpend) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CommunityPoolSpend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CommunityPoolSpend_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CommunityPoolSpend(ctx, req.(*MsgCommunityPoolSpend)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SubmitBudgetProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSubmitBudgetProposal) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SubmitBudgetProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_SubmitBudgetProposal_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SubmitBudgetProposal(ctx, req.(*MsgSubmitBudgetProposal)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ClaimBudget_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgClaimBudget) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ClaimBudget(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_ClaimBudget_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ClaimBudget(ctx, req.(*MsgClaimBudget)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CreateContinuousFund_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateContinuousFund) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateContinuousFund(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CreateContinuousFund_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateContinuousFund(ctx, req.(*MsgCreateContinuousFund)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_WithdrawContinuousFund_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawContinuousFund) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).WithdrawContinuousFund(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_WithdrawContinuousFund_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).WithdrawContinuousFund(ctx, req.(*MsgWithdrawContinuousFund)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CancelContinuousFund_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCancelContinuousFund) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CancelContinuousFund(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CancelContinuousFund_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CancelContinuousFund(ctx, req.(*MsgCancelContinuousFund)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.protocolpool.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "FundCommunityPool", + Handler: _Msg_FundCommunityPool_Handler, + }, + { + MethodName: "CommunityPoolSpend", + Handler: _Msg_CommunityPoolSpend_Handler, + }, + { + MethodName: "SubmitBudgetProposal", + Handler: _Msg_SubmitBudgetProposal_Handler, + }, + { + MethodName: "ClaimBudget", + Handler: _Msg_ClaimBudget_Handler, + }, + { + MethodName: "CreateContinuousFund", + Handler: _Msg_CreateContinuousFund_Handler, + }, + { + MethodName: "WithdrawContinuousFund", + Handler: _Msg_WithdrawContinuousFund_Handler, + }, + { + MethodName: "CancelContinuousFund", + Handler: _Msg_CancelContinuousFund_Handler, + }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/protocolpool/v1/tx.proto", +} diff --git a/api/cosmos/protocolpool/v1/types.pulsar.go b/api/cosmos/protocolpool/v1/types.pulsar.go new file mode 100644 index 000000000000..e2d7b6afcac8 --- /dev/null +++ b/api/cosmos/protocolpool/v1/types.pulsar.go @@ -0,0 +1,2763 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package protocolpoolv1 + +import ( + _ "cosmossdk.io/api/amino" + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + 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" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Budget protoreflect.MessageDescriptor + fd_Budget_recipient_address protoreflect.FieldDescriptor + fd_Budget_claimed_amount protoreflect.FieldDescriptor + fd_Budget_last_claimed_at protoreflect.FieldDescriptor + fd_Budget_tranches_left protoreflect.FieldDescriptor + fd_Budget_budget_per_tranche protoreflect.FieldDescriptor + fd_Budget_period protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_types_proto_init() + md_Budget = File_cosmos_protocolpool_v1_types_proto.Messages().ByName("Budget") + fd_Budget_recipient_address = md_Budget.Fields().ByName("recipient_address") + fd_Budget_claimed_amount = md_Budget.Fields().ByName("claimed_amount") + fd_Budget_last_claimed_at = md_Budget.Fields().ByName("last_claimed_at") + fd_Budget_tranches_left = md_Budget.Fields().ByName("tranches_left") + fd_Budget_budget_per_tranche = md_Budget.Fields().ByName("budget_per_tranche") + fd_Budget_period = md_Budget.Fields().ByName("period") +} + +var _ protoreflect.Message = (*fastReflection_Budget)(nil) + +type fastReflection_Budget Budget + +func (x *Budget) ProtoReflect() protoreflect.Message { + return (*fastReflection_Budget)(x) +} + +func (x *Budget) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_v1_types_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_Budget_messageType fastReflection_Budget_messageType +var _ protoreflect.MessageType = fastReflection_Budget_messageType{} + +type fastReflection_Budget_messageType struct{} + +func (x fastReflection_Budget_messageType) Zero() protoreflect.Message { + return (*fastReflection_Budget)(nil) +} +func (x fastReflection_Budget_messageType) New() protoreflect.Message { + return new(fastReflection_Budget) +} +func (x fastReflection_Budget_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Budget +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Budget) Descriptor() protoreflect.MessageDescriptor { + return md_Budget +} + +// 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_Budget) Type() protoreflect.MessageType { + return _fastReflection_Budget_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Budget) New() protoreflect.Message { + return new(fastReflection_Budget) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Budget) Interface() protoreflect.ProtoMessage { + return (*Budget)(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_Budget) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.RecipientAddress != "" { + value := protoreflect.ValueOfString(x.RecipientAddress) + if !f(fd_Budget_recipient_address, value) { + return + } + } + if x.ClaimedAmount != nil { + value := protoreflect.ValueOfMessage(x.ClaimedAmount.ProtoReflect()) + if !f(fd_Budget_claimed_amount, value) { + return + } + } + if x.LastClaimedAt != nil { + value := protoreflect.ValueOfMessage(x.LastClaimedAt.ProtoReflect()) + if !f(fd_Budget_last_claimed_at, value) { + return + } + } + if x.TranchesLeft != uint64(0) { + value := protoreflect.ValueOfUint64(x.TranchesLeft) + if !f(fd_Budget_tranches_left, value) { + return + } + } + if x.BudgetPerTranche != nil { + value := protoreflect.ValueOfMessage(x.BudgetPerTranche.ProtoReflect()) + if !f(fd_Budget_budget_per_tranche, value) { + return + } + } + if x.Period != nil { + value := protoreflect.ValueOfMessage(x.Period.ProtoReflect()) + if !f(fd_Budget_period, 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_Budget) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.Budget.recipient_address": + return x.RecipientAddress != "" + case "cosmos.protocolpool.v1.Budget.claimed_amount": + return x.ClaimedAmount != nil + case "cosmos.protocolpool.v1.Budget.last_claimed_at": + return x.LastClaimedAt != nil + case "cosmos.protocolpool.v1.Budget.tranches_left": + return x.TranchesLeft != uint64(0) + case "cosmos.protocolpool.v1.Budget.budget_per_tranche": + return x.BudgetPerTranche != nil + case "cosmos.protocolpool.v1.Budget.period": + return x.Period != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Budget")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.Budget 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_Budget) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.Budget.recipient_address": + x.RecipientAddress = "" + case "cosmos.protocolpool.v1.Budget.claimed_amount": + x.ClaimedAmount = nil + case "cosmos.protocolpool.v1.Budget.last_claimed_at": + x.LastClaimedAt = nil + case "cosmos.protocolpool.v1.Budget.tranches_left": + x.TranchesLeft = uint64(0) + case "cosmos.protocolpool.v1.Budget.budget_per_tranche": + x.BudgetPerTranche = nil + case "cosmos.protocolpool.v1.Budget.period": + x.Period = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Budget")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.Budget 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_Budget) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.Budget.recipient_address": + value := x.RecipientAddress + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.Budget.claimed_amount": + value := x.ClaimedAmount + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.Budget.last_claimed_at": + value := x.LastClaimedAt + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.Budget.tranches_left": + value := x.TranchesLeft + return protoreflect.ValueOfUint64(value) + case "cosmos.protocolpool.v1.Budget.budget_per_tranche": + value := x.BudgetPerTranche + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.Budget.period": + value := x.Period + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Budget")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.Budget 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_Budget) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.Budget.recipient_address": + x.RecipientAddress = value.Interface().(string) + case "cosmos.protocolpool.v1.Budget.claimed_amount": + x.ClaimedAmount = value.Message().Interface().(*v1beta1.Coin) + case "cosmos.protocolpool.v1.Budget.last_claimed_at": + x.LastClaimedAt = value.Message().Interface().(*timestamppb.Timestamp) + case "cosmos.protocolpool.v1.Budget.tranches_left": + x.TranchesLeft = value.Uint() + case "cosmos.protocolpool.v1.Budget.budget_per_tranche": + x.BudgetPerTranche = value.Message().Interface().(*v1beta1.Coin) + case "cosmos.protocolpool.v1.Budget.period": + x.Period = value.Message().Interface().(*durationpb.Duration) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Budget")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.Budget 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_Budget) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.Budget.claimed_amount": + if x.ClaimedAmount == nil { + x.ClaimedAmount = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.ClaimedAmount.ProtoReflect()) + case "cosmos.protocolpool.v1.Budget.last_claimed_at": + if x.LastClaimedAt == nil { + x.LastClaimedAt = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.LastClaimedAt.ProtoReflect()) + case "cosmos.protocolpool.v1.Budget.budget_per_tranche": + if x.BudgetPerTranche == nil { + x.BudgetPerTranche = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.BudgetPerTranche.ProtoReflect()) + case "cosmos.protocolpool.v1.Budget.period": + if x.Period == nil { + x.Period = new(durationpb.Duration) + } + return protoreflect.ValueOfMessage(x.Period.ProtoReflect()) + case "cosmos.protocolpool.v1.Budget.recipient_address": + panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.Budget is not mutable")) + case "cosmos.protocolpool.v1.Budget.tranches_left": + panic(fmt.Errorf("field tranches_left of message cosmos.protocolpool.v1.Budget is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Budget")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.Budget 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_Budget) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.Budget.recipient_address": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.Budget.claimed_amount": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.Budget.last_claimed_at": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.Budget.tranches_left": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.protocolpool.v1.Budget.budget_per_tranche": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.Budget.period": + m := new(durationpb.Duration) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Budget")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.Budget 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_Budget) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.Budget", 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_Budget) 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_Budget) 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_Budget) 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_Budget) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Budget) + 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.RecipientAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ClaimedAmount != nil { + l = options.Size(x.ClaimedAmount) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.LastClaimedAt != nil { + l = options.Size(x.LastClaimedAt) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.TranchesLeft != 0 { + n += 1 + runtime.Sov(uint64(x.TranchesLeft)) + } + if x.BudgetPerTranche != nil { + l = options.Size(x.BudgetPerTranche) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Period != nil { + l = options.Size(x.Period) + 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().(*Budget) + 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.Period != nil { + encoded, err := options.Marshal(x.Period) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x32 + } + if x.BudgetPerTranche != nil { + encoded, err := options.Marshal(x.BudgetPerTranche) + 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] = 0x2a + } + if x.TranchesLeft != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TranchesLeft)) + i-- + dAtA[i] = 0x20 + } + if x.LastClaimedAt != nil { + encoded, err := options.Marshal(x.LastClaimedAt) + 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.ClaimedAmount != nil { + encoded, err := options.Marshal(x.ClaimedAmount) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.RecipientAddress) > 0 { + i -= len(x.RecipientAddress) + copy(dAtA[i:], x.RecipientAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RecipientAddress))) + 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().(*Budget) + 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: Budget: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Budget: 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 RecipientAddress", 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.RecipientAddress = 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 ClaimedAmount", 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.ClaimedAmount == nil { + x.ClaimedAmount = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ClaimedAmount); 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 LastClaimedAt", 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.LastClaimedAt == nil { + x.LastClaimedAt = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LastClaimedAt); 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 TranchesLeft", wireType) + } + x.TranchesLeft = 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.TranchesLeft |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BudgetPerTranche", 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.BudgetPerTranche == nil { + x.BudgetPerTranche = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BudgetPerTranche); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", 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.Period == nil { + x.Period = &durationpb.Duration{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Period); 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_ContinuousFund protoreflect.MessageDescriptor + fd_ContinuousFund_recipient protoreflect.FieldDescriptor + fd_ContinuousFund_percentage protoreflect.FieldDescriptor + fd_ContinuousFund_expiry protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_types_proto_init() + md_ContinuousFund = File_cosmos_protocolpool_v1_types_proto.Messages().ByName("ContinuousFund") + fd_ContinuousFund_recipient = md_ContinuousFund.Fields().ByName("recipient") + fd_ContinuousFund_percentage = md_ContinuousFund.Fields().ByName("percentage") + fd_ContinuousFund_expiry = md_ContinuousFund.Fields().ByName("expiry") +} + +var _ protoreflect.Message = (*fastReflection_ContinuousFund)(nil) + +type fastReflection_ContinuousFund ContinuousFund + +func (x *ContinuousFund) ProtoReflect() protoreflect.Message { + return (*fastReflection_ContinuousFund)(x) +} + +func (x *ContinuousFund) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_v1_types_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_ContinuousFund_messageType fastReflection_ContinuousFund_messageType +var _ protoreflect.MessageType = fastReflection_ContinuousFund_messageType{} + +type fastReflection_ContinuousFund_messageType struct{} + +func (x fastReflection_ContinuousFund_messageType) Zero() protoreflect.Message { + return (*fastReflection_ContinuousFund)(nil) +} +func (x fastReflection_ContinuousFund_messageType) New() protoreflect.Message { + return new(fastReflection_ContinuousFund) +} +func (x fastReflection_ContinuousFund_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ContinuousFund +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ContinuousFund) Descriptor() protoreflect.MessageDescriptor { + return md_ContinuousFund +} + +// 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_ContinuousFund) Type() protoreflect.MessageType { + return _fastReflection_ContinuousFund_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ContinuousFund) New() protoreflect.Message { + return new(fastReflection_ContinuousFund) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ContinuousFund) Interface() protoreflect.ProtoMessage { + return (*ContinuousFund)(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_ContinuousFund) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Recipient != "" { + value := protoreflect.ValueOfString(x.Recipient) + if !f(fd_ContinuousFund_recipient, value) { + return + } + } + if x.Percentage != "" { + value := protoreflect.ValueOfString(x.Percentage) + if !f(fd_ContinuousFund_percentage, value) { + return + } + } + if x.Expiry != nil { + value := protoreflect.ValueOfMessage(x.Expiry.ProtoReflect()) + if !f(fd_ContinuousFund_expiry, 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_ContinuousFund) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.ContinuousFund.recipient": + return x.Recipient != "" + case "cosmos.protocolpool.v1.ContinuousFund.percentage": + return x.Percentage != "" + case "cosmos.protocolpool.v1.ContinuousFund.expiry": + return x.Expiry != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.ContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.ContinuousFund 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_ContinuousFund) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.ContinuousFund.recipient": + x.Recipient = "" + case "cosmos.protocolpool.v1.ContinuousFund.percentage": + x.Percentage = "" + case "cosmos.protocolpool.v1.ContinuousFund.expiry": + x.Expiry = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.ContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.ContinuousFund 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_ContinuousFund) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.ContinuousFund.recipient": + value := x.Recipient + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.ContinuousFund.percentage": + value := x.Percentage + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.ContinuousFund.expiry": + value := x.Expiry + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.ContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.ContinuousFund 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_ContinuousFund) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.ContinuousFund.recipient": + x.Recipient = value.Interface().(string) + case "cosmos.protocolpool.v1.ContinuousFund.percentage": + x.Percentage = value.Interface().(string) + case "cosmos.protocolpool.v1.ContinuousFund.expiry": + x.Expiry = value.Message().Interface().(*timestamppb.Timestamp) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.ContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.ContinuousFund 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_ContinuousFund) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.ContinuousFund.expiry": + if x.Expiry == nil { + x.Expiry = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.Expiry.ProtoReflect()) + case "cosmos.protocolpool.v1.ContinuousFund.recipient": + panic(fmt.Errorf("field recipient of message cosmos.protocolpool.v1.ContinuousFund is not mutable")) + case "cosmos.protocolpool.v1.ContinuousFund.percentage": + panic(fmt.Errorf("field percentage of message cosmos.protocolpool.v1.ContinuousFund is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.ContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.ContinuousFund 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_ContinuousFund) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.ContinuousFund.recipient": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.ContinuousFund.percentage": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.ContinuousFund.expiry": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.ContinuousFund")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.ContinuousFund 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_ContinuousFund) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.ContinuousFund", 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_ContinuousFund) 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_ContinuousFund) 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_ContinuousFund) 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_ContinuousFund) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ContinuousFund) + 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.Recipient) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Percentage) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Expiry != nil { + l = options.Size(x.Expiry) + 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().(*ContinuousFund) + 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.Expiry != nil { + encoded, err := options.Marshal(x.Expiry) + 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.Percentage) > 0 { + i -= len(x.Percentage) + copy(dAtA[i:], x.Percentage) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Percentage))) + i-- + dAtA[i] = 0x12 + } + if len(x.Recipient) > 0 { + i -= len(x.Recipient) + copy(dAtA[i:], x.Recipient) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Recipient))) + 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().(*ContinuousFund) + 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: ContinuousFund: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContinuousFund: 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 Recipient", 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.Recipient = 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 Percentage", 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.Percentage = 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 Expiry", 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.Expiry == nil { + x.Expiry = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiry); 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 _ protoreflect.List = (*_DistributionAmount_1_list)(nil) + +type _DistributionAmount_1_list struct { + list *[]*v1beta1.Coin +} + +func (x *_DistributionAmount_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_DistributionAmount_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_DistributionAmount_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_DistributionAmount_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_DistributionAmount_1_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_DistributionAmount_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_DistributionAmount_1_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_DistributionAmount_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_DistributionAmount protoreflect.MessageDescriptor + fd_DistributionAmount_amount protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_types_proto_init() + md_DistributionAmount = File_cosmos_protocolpool_v1_types_proto.Messages().ByName("DistributionAmount") + fd_DistributionAmount_amount = md_DistributionAmount.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_DistributionAmount)(nil) + +type fastReflection_DistributionAmount DistributionAmount + +func (x *DistributionAmount) ProtoReflect() protoreflect.Message { + return (*fastReflection_DistributionAmount)(x) +} + +func (x *DistributionAmount) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_v1_types_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_DistributionAmount_messageType fastReflection_DistributionAmount_messageType +var _ protoreflect.MessageType = fastReflection_DistributionAmount_messageType{} + +type fastReflection_DistributionAmount_messageType struct{} + +func (x fastReflection_DistributionAmount_messageType) Zero() protoreflect.Message { + return (*fastReflection_DistributionAmount)(nil) +} +func (x fastReflection_DistributionAmount_messageType) New() protoreflect.Message { + return new(fastReflection_DistributionAmount) +} +func (x fastReflection_DistributionAmount_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DistributionAmount +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_DistributionAmount) Descriptor() protoreflect.MessageDescriptor { + return md_DistributionAmount +} + +// 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_DistributionAmount) Type() protoreflect.MessageType { + return _fastReflection_DistributionAmount_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_DistributionAmount) New() protoreflect.Message { + return new(fastReflection_DistributionAmount) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_DistributionAmount) Interface() protoreflect.ProtoMessage { + return (*DistributionAmount)(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_DistributionAmount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_DistributionAmount_1_list{list: &x.Amount}) + if !f(fd_DistributionAmount_amount, 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_DistributionAmount) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.DistributionAmount.amount": + return len(x.Amount) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.DistributionAmount")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.DistributionAmount 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_DistributionAmount) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.DistributionAmount.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.DistributionAmount")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.DistributionAmount 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_DistributionAmount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.DistributionAmount.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_DistributionAmount_1_list{}) + } + listValue := &_DistributionAmount_1_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.DistributionAmount")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.DistributionAmount 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_DistributionAmount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.DistributionAmount.amount": + lv := value.List() + clv := lv.(*_DistributionAmount_1_list) + x.Amount = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.DistributionAmount")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.DistributionAmount 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_DistributionAmount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.DistributionAmount.amount": + if x.Amount == nil { + x.Amount = []*v1beta1.Coin{} + } + value := &_DistributionAmount_1_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.DistributionAmount")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.DistributionAmount 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_DistributionAmount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.DistributionAmount.amount": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_DistributionAmount_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.DistributionAmount")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.DistributionAmount 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_DistributionAmount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.DistributionAmount", 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_DistributionAmount) 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_DistributionAmount) 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_DistributionAmount) 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_DistributionAmount) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*DistributionAmount) + 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.Amount) > 0 { + for _, e := range x.Amount { + 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().(*DistributionAmount) + 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.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[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().(*DistributionAmount) + 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: DistributionAmount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DistributionAmount: 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 Amount", 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.Amount = append(x.Amount, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-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 _ protoreflect.List = (*_Params_1_list)(nil) + +type _Params_1_list struct { + list *[]string +} + +func (x *_Params_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Params_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Params_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Params at list field EnabledDistributionDenoms as it is not of Message kind")) +} + +func (x *_Params_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Params_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Params_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Params protoreflect.MessageDescriptor + fd_Params_enabled_distribution_denoms protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_types_proto_init() + md_Params = File_cosmos_protocolpool_v1_types_proto.Messages().ByName("Params") + fd_Params_enabled_distribution_denoms = md_Params.Fields().ByName("enabled_distribution_denoms") +} + +var _ protoreflect.Message = (*fastReflection_Params)(nil) + +type fastReflection_Params Params + +func (x *Params) ProtoReflect() protoreflect.Message { + return (*fastReflection_Params)(x) +} + +func (x *Params) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_v1_types_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_Params_messageType fastReflection_Params_messageType +var _ protoreflect.MessageType = fastReflection_Params_messageType{} + +type fastReflection_Params_messageType struct{} + +func (x fastReflection_Params_messageType) Zero() protoreflect.Message { + return (*fastReflection_Params)(nil) +} +func (x fastReflection_Params_messageType) New() protoreflect.Message { + return new(fastReflection_Params) +} +func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Params) Type() protoreflect.MessageType { + return _fastReflection_Params_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Params) New() protoreflect.Message { + return new(fastReflection_Params) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { + return (*Params)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.EnabledDistributionDenoms) != 0 { + value := protoreflect.ValueOfList(&_Params_1_list{list: &x.EnabledDistributionDenoms}) + if !f(fd_Params_enabled_distribution_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_Params) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.Params.enabled_distribution_denoms": + return len(x.EnabledDistributionDenoms) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Params")) + } + panic(fmt.Errorf("message cosmos.protocolpool.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() { + case "cosmos.protocolpool.v1.Params.enabled_distribution_denoms": + x.EnabledDistributionDenoms = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Params")) + } + panic(fmt.Errorf("message cosmos.protocolpool.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() { + case "cosmos.protocolpool.v1.Params.enabled_distribution_denoms": + if len(x.EnabledDistributionDenoms) == 0 { + return protoreflect.ValueOfList(&_Params_1_list{}) + } + listValue := &_Params_1_list{list: &x.EnabledDistributionDenoms} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Params")) + } + panic(fmt.Errorf("message cosmos.protocolpool.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() { + case "cosmos.protocolpool.v1.Params.enabled_distribution_denoms": + lv := value.List() + clv := lv.(*_Params_1_list) + x.EnabledDistributionDenoms = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Params")) + } + panic(fmt.Errorf("message cosmos.protocolpool.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() { + case "cosmos.protocolpool.v1.Params.enabled_distribution_denoms": + if x.EnabledDistributionDenoms == nil { + x.EnabledDistributionDenoms = []string{} + } + value := &_Params_1_list{list: &x.EnabledDistributionDenoms} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Params")) + } + panic(fmt.Errorf("message cosmos.protocolpool.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() { + case "cosmos.protocolpool.v1.Params.enabled_distribution_denoms": + list := []string{} + return protoreflect.ValueOfList(&_Params_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Params")) + } + panic(fmt.Errorf("message cosmos.protocolpool.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 cosmos.protocolpool.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 len(x.EnabledDistributionDenoms) > 0 { + for _, s := range x.EnabledDistributionDenoms { + 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().(*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 len(x.EnabledDistributionDenoms) > 0 { + for iNdEx := len(x.EnabledDistributionDenoms) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.EnabledDistributionDenoms[iNdEx]) + copy(dAtA[i:], x.EnabledDistributionDenoms[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.EnabledDistributionDenoms[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().(*Params) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EnabledDistributionDenoms", 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.EnabledDistributionDenoms = append(x.EnabledDistributionDenoms, 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: cosmos/protocolpool/v1/types.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) +) + +// Budget defines the fields of a budget proposal. +type Budget struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // recipient_address is the address of the recipient who can claim the budget. + RecipientAddress string `protobuf:"bytes,1,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` + // claimed_amount is the total amount claimed from the total budget amount requested. + ClaimedAmount *v1beta1.Coin `protobuf:"bytes,2,opt,name=claimed_amount,json=claimedAmount,proto3" json:"claimed_amount,omitempty"` + // last_claimed_at is the time when the budget was last successfully claimed or distributed. + // It is used to track the next starting claim time for fund distribution. + LastClaimedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_claimed_at,json=lastClaimedAt,proto3" json:"last_claimed_at,omitempty"` + // tranches_left is the number of tranches left for the amount to be distributed. + TranchesLeft uint64 `protobuf:"varint,4,opt,name=tranches_left,json=tranchesLeft,proto3" json:"tranches_left,omitempty"` + // budget_per_tranche is the amount allocated per tranche. + BudgetPerTranche *v1beta1.Coin `protobuf:"bytes,5,opt,name=budget_per_tranche,json=budgetPerTranche,proto3" json:"budget_per_tranche,omitempty"` + // Period is the time interval(number of seconds) at which funds distribution should be performed. + // For example, if a period is set to 3600, it represents an action that + // should occur every hour (3600 seconds). + Period *durationpb.Duration `protobuf:"bytes,6,opt,name=period,proto3" json:"period,omitempty"` +} + +func (x *Budget) Reset() { + *x = Budget{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Budget) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Budget) ProtoMessage() {} + +// Deprecated: Use Budget.ProtoReflect.Descriptor instead. +func (*Budget) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_types_proto_rawDescGZIP(), []int{0} +} + +func (x *Budget) GetRecipientAddress() string { + if x != nil { + return x.RecipientAddress + } + return "" +} + +func (x *Budget) GetClaimedAmount() *v1beta1.Coin { + if x != nil { + return x.ClaimedAmount + } + return nil +} + +func (x *Budget) GetLastClaimedAt() *timestamppb.Timestamp { + if x != nil { + return x.LastClaimedAt + } + return nil +} + +func (x *Budget) GetTranchesLeft() uint64 { + if x != nil { + return x.TranchesLeft + } + return 0 +} + +func (x *Budget) GetBudgetPerTranche() *v1beta1.Coin { + if x != nil { + return x.BudgetPerTranche + } + return nil +} + +func (x *Budget) GetPeriod() *durationpb.Duration { + if x != nil { + return x.Period + } + return nil +} + +// ContinuousFund defines the fields of continuous fund proposal. +type ContinuousFund struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Recipient address of the account receiving funds. + Recipient string `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"` + // Percentage is the percentage of funds to be allocated from Community pool. + Percentage string `protobuf:"bytes,2,opt,name=percentage,proto3" json:"percentage,omitempty"` + // Optional, if expiry is set, removes the state object when expired. + Expiry *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expiry,proto3" json:"expiry,omitempty"` +} + +func (x *ContinuousFund) Reset() { + *x = ContinuousFund{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContinuousFund) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContinuousFund) ProtoMessage() {} + +// Deprecated: Use ContinuousFund.ProtoReflect.Descriptor instead. +func (*ContinuousFund) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_types_proto_rawDescGZIP(), []int{1} +} + +func (x *ContinuousFund) GetRecipient() string { + if x != nil { + return x.Recipient + } + return "" +} + +func (x *ContinuousFund) GetPercentage() string { + if x != nil { + return x.Percentage + } + return "" +} + +func (x *ContinuousFund) GetExpiry() *timestamppb.Timestamp { + if x != nil { + return x.Expiry + } + return nil +} + +// DistributionAmount is used to store the coins of periodic distributions. +type DistributionAmount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Amount []*v1beta1.Coin `protobuf:"bytes,1,rep,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *DistributionAmount) Reset() { + *x = DistributionAmount{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DistributionAmount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DistributionAmount) ProtoMessage() {} + +// Deprecated: Use DistributionAmount.ProtoReflect.Descriptor instead. +func (*DistributionAmount) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_types_proto_rawDescGZIP(), []int{2} +} + +func (x *DistributionAmount) GetAmount() []*v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// Params defines the parameters for the protocolpool module. +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // enabled_distribution_denoms lists the denoms that are allowed to be distributed. + // This is to avoid spending time distributing undesired tokens to continuous funds and budgets. + EnabledDistributionDenoms []string `protobuf:"bytes,1,rep,name=enabled_distribution_denoms,json=enabledDistributionDenoms,proto3" json:"enabled_distribution_denoms,omitempty"` +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Params) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Params) ProtoMessage() {} + +// Deprecated: Use Params.ProtoReflect.Descriptor instead. +func (*Params) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_types_proto_rawDescGZIP(), []int{3} +} + +func (x *Params) GetEnabledDistributionDenoms() []string { + if x != nil { + return x.EnabledDistributionDenoms + } + return nil +} + +var File_cosmos_protocolpool_v1_types_proto protoreflect.FileDescriptor + +var file_cosmos_protocolpool_v1_types_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 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, 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, 0x1e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 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, 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, 0x11, + 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x82, 0x03, 0x0a, 0x06, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x45, 0x0a, 0x11, + 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x10, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x0d, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x41, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6c, + 0x61, 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x61, 0x74, 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, 0x04, 0x90, 0xdf, 0x1f, 0x01, + 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, + 0x4c, 0x65, 0x66, 0x74, 0x12, 0x47, 0x0a, 0x12, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x5f, 0x70, + 0x65, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x10, 0x62, 0x75, 0x64, + 0x67, 0x65, 0x74, 0x50, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x12, 0x37, 0x0a, + 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x06, 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, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x06, + 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x46, 0x75, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x72, 0x65, 0x63, + 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 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, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, + 0x74, 0x12, 0x51, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, + 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x61, 0x67, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 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, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x22, 0x8f, + 0x01, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, + 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, + 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, + 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x48, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3e, 0x0a, 0x1b, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x19, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x42, 0xda, 0x01, 0x0a, 0x1a, 0x63, + 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x76, 0x31, + 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x43, 0x50, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x70, 0x6f, 0x6f, 0x6c, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, + 0x6f, 0x6f, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_protocolpool_v1_types_proto_rawDescOnce sync.Once + file_cosmos_protocolpool_v1_types_proto_rawDescData = file_cosmos_protocolpool_v1_types_proto_rawDesc +) + +func file_cosmos_protocolpool_v1_types_proto_rawDescGZIP() []byte { + file_cosmos_protocolpool_v1_types_proto_rawDescOnce.Do(func() { + file_cosmos_protocolpool_v1_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_protocolpool_v1_types_proto_rawDescData) + }) + return file_cosmos_protocolpool_v1_types_proto_rawDescData +} + +var file_cosmos_protocolpool_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_cosmos_protocolpool_v1_types_proto_goTypes = []interface{}{ + (*Budget)(nil), // 0: cosmos.protocolpool.v1.Budget + (*ContinuousFund)(nil), // 1: cosmos.protocolpool.v1.ContinuousFund + (*DistributionAmount)(nil), // 2: cosmos.protocolpool.v1.DistributionAmount + (*Params)(nil), // 3: cosmos.protocolpool.v1.Params + (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 6: google.protobuf.Duration +} +var file_cosmos_protocolpool_v1_types_proto_depIdxs = []int32{ + 4, // 0: cosmos.protocolpool.v1.Budget.claimed_amount:type_name -> cosmos.base.v1beta1.Coin + 5, // 1: cosmos.protocolpool.v1.Budget.last_claimed_at:type_name -> google.protobuf.Timestamp + 4, // 2: cosmos.protocolpool.v1.Budget.budget_per_tranche:type_name -> cosmos.base.v1beta1.Coin + 6, // 3: cosmos.protocolpool.v1.Budget.period:type_name -> google.protobuf.Duration + 5, // 4: cosmos.protocolpool.v1.ContinuousFund.expiry:type_name -> google.protobuf.Timestamp + 4, // 5: cosmos.protocolpool.v1.DistributionAmount.amount:type_name -> cosmos.base.v1beta1.Coin + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_cosmos_protocolpool_v1_types_proto_init() } +func file_cosmos_protocolpool_v1_types_proto_init() { + if File_cosmos_protocolpool_v1_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_protocolpool_v1_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Budget); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContinuousFund); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DistributionAmount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_types_proto_msgTypes[3].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_cosmos_protocolpool_v1_types_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_protocolpool_v1_types_proto_goTypes, + DependencyIndexes: file_cosmos_protocolpool_v1_types_proto_depIdxs, + MessageInfos: file_cosmos_protocolpool_v1_types_proto_msgTypes, + }.Build() + File_cosmos_protocolpool_v1_types_proto = out.File + file_cosmos_protocolpool_v1_types_proto_rawDesc = nil + file_cosmos_protocolpool_v1_types_proto_goTypes = nil + file_cosmos_protocolpool_v1_types_proto_depIdxs = nil +} diff --git a/simapp/app.go b/simapp/app.go index 67cd8534b620..a681849f509e 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -383,7 +383,7 @@ func NewSimApp( app.MintKeeper = mintkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[minttypes.StoreKey]), logger.With(log.ModuleKey, "x/mint")), app.StakingKeeper, app.AuthKeeper, app.BankKeeper, authtypes.FeeCollectorName, govModuleAddr) - app.PoolKeeper = poolkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[pooltypes.StoreKey]), logger.With(log.ModuleKey, "x/protocolpool")), app.AuthKeeper, app.BankKeeper, app.StakingKeeper, govModuleAddr) + app.PoolKeeper = poolkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[pooltypes.StoreKey]), logger.With(log.ModuleKey, "x/protocolpool")), app.AuthKeeper, app.BankKeeper, govModuleAddr) app.DistrKeeper = distrkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[distrtypes.StoreKey]), logger.With(log.ModuleKey, "x/distribution")), app.AuthKeeper, app.BankKeeper, app.StakingKeeper, cometService, authtypes.FeeCollectorName, govModuleAddr) diff --git a/tests/integration/distribution/keeper/msg_server_test.go b/tests/integration/distribution/keeper/msg_server_test.go index 7ab94c01a3e1..b942275d61bc 100644 --- a/tests/integration/distribution/keeper/msg_server_test.go +++ b/tests/integration/distribution/keeper/msg_server_test.go @@ -138,7 +138,7 @@ func initFixture(t *testing.T) *fixture { stakingKeeper := stakingkeeper.NewKeeper(cdc, runtime.NewEnvironment(runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), log.NewNopLogger(), runtime.EnvWithQueryRouterService(grpcRouter), runtime.EnvWithMsgRouterService(msgRouter)), accountKeeper, bankKeeper, consensusParamsKeeper, authority.String(), addresscodec.NewBech32Codec(sdk.Bech32PrefixValAddr), addresscodec.NewBech32Codec(sdk.Bech32PrefixConsAddr), cometService) require.NoError(t, stakingKeeper.Params.Set(newCtx, stakingtypes.DefaultParams())) - poolKeeper := poolkeeper.NewKeeper(cdc, runtime.NewEnvironment(runtime.NewKVStoreService(keys[pooltypes.StoreKey]), log.NewNopLogger()), accountKeeper, bankKeeper, stakingKeeper, authority.String()) + poolKeeper := poolkeeper.NewKeeper(cdc, runtime.NewEnvironment(runtime.NewKVStoreService(keys[pooltypes.StoreKey]), log.NewNopLogger()), accountKeeper, bankKeeper, authority.String()) distrKeeper := distrkeeper.NewKeeper( cdc, runtime.NewEnvironment(runtime.NewKVStoreService(keys[distrtypes.StoreKey]), logger), accountKeeper, bankKeeper, stakingKeeper, cometService, distrtypes.ModuleName, authority.String(), diff --git a/tests/integration/gov/keeper/keeper_test.go b/tests/integration/gov/keeper/keeper_test.go index f1f94f575d58..314a5ed5909f 100644 --- a/tests/integration/gov/keeper/keeper_test.go +++ b/tests/integration/gov/keeper/keeper_test.go @@ -119,7 +119,7 @@ func initFixture(tb testing.TB) *fixture { stakingKeeper := stakingkeeper.NewKeeper(cdc, runtime.NewEnvironment(runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), log.NewNopLogger()), accountKeeper, bankKeeper, consensusParamsKeeper, authority.String(), addresscodec.NewBech32Codec(sdk.Bech32PrefixValAddr), addresscodec.NewBech32Codec(sdk.Bech32PrefixConsAddr), runtime.NewContextAwareCometInfoService()) - poolKeeper := poolkeeper.NewKeeper(cdc, runtime.NewEnvironment(runtime.NewKVStoreService(keys[pooltypes.StoreKey]), log.NewNopLogger()), accountKeeper, bankKeeper, stakingKeeper, authority.String()) + poolKeeper := poolkeeper.NewKeeper(cdc, runtime.NewEnvironment(runtime.NewKVStoreService(keys[pooltypes.StoreKey]), log.NewNopLogger()), accountKeeper, bankKeeper, authority.String()) // set default staking params err := stakingKeeper.Params.Set(newCtx, stakingtypes.DefaultParams()) diff --git a/x/protocolpool/autocli.go b/x/protocolpool/autocli.go index 847b3647b2ef..db417b4da974 100644 --- a/x/protocolpool/autocli.go +++ b/x/protocolpool/autocli.go @@ -89,6 +89,14 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, GovProposal: true, }, + { + RpcMethod: "UpdateParams", + Use: "update-params-proposal ", + Short: "Submit a proposal to update protocolpool module params. Note: the entire params must be provided.", + Example: fmt.Sprintf(`%s tx protocolpool update-params-proposal '{ "enabled_distribution_denoms": ["stake", "foo"] }'`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "params"}}, + GovProposal: true, + }, }, }, } diff --git a/x/protocolpool/depinject.go b/x/protocolpool/depinject.go index a2dc1c950c63..bc49c3381809 100644 --- a/x/protocolpool/depinject.go +++ b/x/protocolpool/depinject.go @@ -37,7 +37,6 @@ type ModuleInputs struct { AccountKeeper types.AccountKeeper BankKeeper types.BankKeeper - StakingKeeper types.StakingKeeper } type ModuleOutputs struct { @@ -59,7 +58,7 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { panic(err) } - k := keeper.NewKeeper(in.Codec, in.Environment, in.AccountKeeper, in.BankKeeper, in.StakingKeeper, authorityAddr) + k := keeper.NewKeeper(in.Codec, in.Environment, in.AccountKeeper, in.BankKeeper, authorityAddr) m := NewAppModule(in.Codec, k, in.AccountKeeper, in.BankKeeper) return ModuleOutputs{ diff --git a/x/protocolpool/keeper/genesis.go b/x/protocolpool/keeper/genesis.go index fa32a08f9a50..cd928b3f87be 100644 --- a/x/protocolpool/keeper/genesis.go +++ b/x/protocolpool/keeper/genesis.go @@ -5,7 +5,6 @@ import ( "fmt" "time" - "cosmossdk.io/math" "cosmossdk.io/x/protocolpool/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -13,6 +12,12 @@ import ( func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error { currentTime := k.HeaderService.HeaderInfo(ctx).Time + + err := k.Params.Set(ctx, *data.Params) + if err != nil { + return fmt.Errorf("failed to set params: %w", err) + } + for _, cf := range data.ContinuousFund { // ignore expired ContinuousFunds if cf.Expiry != nil && cf.Expiry.Before(currentTime) { @@ -55,19 +60,25 @@ func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error return fmt.Errorf("failed to set last balance: %w", err) } - totalToBeDistributed := math.ZeroInt() + totalToBeDistributed := sdk.NewCoins() for _, distribution := range data.Distributions { - totalToBeDistributed = totalToBeDistributed.Add(distribution.Amount) + totalToBeDistributed = totalToBeDistributed.Add(distribution.Amount.Amount...) if err := k.Distributions.Set(ctx, *distribution.Time, distribution.Amount); err != nil { return fmt.Errorf("failed to set distribution: %w", err) } } // sanity check to avoid trying to distribute more than what is available +<<<<<<< HEAD if data.LastBalance.LT(totalToBeDistributed) { return fmt.Errorf("total to be distributed is greater than the last balance") } +======= +>>>>>>> 13c234f42 (feat(x/protocolpool)!: allow any coins in continuous funds (#21916)) + if totalToBeDistributed.IsAnyGT(data.LastBalance.Amount) || !totalToBeDistributed.DenomsSubsetOf(data.LastBalance.Amount) { + return fmt.Errorf("total to be distributed is greater than the last balance: %s > %s", totalToBeDistributed, data.LastBalance.Amount) + } return nil } @@ -111,12 +122,14 @@ func (k Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) genState := types.NewGenesisState(cf, budget) - genState.LastBalance, err = k.LastBalance.Get(ctx) + lastBalance, err := k.LastBalance.Get(ctx) if err != nil { return nil, err } - err = k.Distributions.Walk(ctx, nil, func(key time.Time, value math.Int) (stop bool, err error) { + genState.LastBalance = lastBalance + + err = k.Distributions.Walk(ctx, nil, func(key time.Time, value types.DistributionAmount) (stop bool, err error) { genState.Distributions = append(genState.Distributions, &types.Distribution{ Time: &key, Amount: value, @@ -128,5 +141,12 @@ func (k Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) return nil, err } + params, err := k.Params.Get(ctx) + if err != nil { + return nil, err + } + + genState.Params = ¶ms + return genState, nil } diff --git a/x/protocolpool/keeper/genesis_test.go b/x/protocolpool/keeper/genesis_test.go index f0149f662787..9e6c942a8da7 100644 --- a/x/protocolpool/keeper/genesis_test.go +++ b/x/protocolpool/keeper/genesis_test.go @@ -32,7 +32,7 @@ func (suite *KeeperTestSuite) TestInitGenesis() { ) gs.Distributions = append(gs.Distributions, &types.Distribution{ - Amount: math.OneInt(), + Amount: types.DistributionAmount{Amount: sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(100)))}, Time: &time.Time{}, }) @@ -40,7 +40,7 @@ func (suite *KeeperTestSuite) TestInitGenesis() { suite.Require().ErrorContains(err, "total to be distributed is greater than the last balance") // Set last balance - gs.LastBalance = math.NewInt(1) + gs.LastBalance = types.DistributionAmount{Amount: sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(101)))} err = suite.poolKeeper.InitGenesis(suite.ctx, gs) suite.Require().NoError(err) @@ -49,5 +49,5 @@ func (suite *KeeperTestSuite) TestInitGenesis() { suite.Require().NoError(err) suite.Require().Equal(gs.ContinuousFund, exportedGenState.ContinuousFund) suite.Require().Equal(gs.Budget, exportedGenState.Budget) - suite.Require().Equal(math.OneInt(), exportedGenState.LastBalance) + suite.Require().Equal(math.NewInt(101), exportedGenState.LastBalance.Amount.AmountOf("stake")) } diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 8017714a6a84..c6fcf2342bf4 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -22,9 +22,8 @@ import ( type Keeper struct { appmodule.Environment - authKeeper types.AccountKeeper - bankKeeper types.BankKeeper - stakingKeeper types.StakingKeeper + authKeeper types.AccountKeeper + bankKeeper types.BankKeeper cdc codec.BinaryCodec @@ -35,16 +34,17 @@ type Keeper struct { BudgetProposal collections.Map[sdk.AccAddress, types.Budget] ContinuousFund collections.Map[sdk.AccAddress, types.ContinuousFund] // RecipientFundDistribution key: RecipientAddr | value: Claimable amount - RecipientFundDistribution collections.Map[sdk.AccAddress, math.Int] - Distributions collections.Map[time.Time, math.Int] // key: time.Time | value: amount - LastBalance collections.Item[math.Int] + RecipientFundDistribution collections.Map[sdk.AccAddress, types.DistributionAmount] + Distributions collections.Map[time.Time, types.DistributionAmount] // key: time.Time, denom | value: amounts + LastBalance collections.Item[types.DistributionAmount] + Params collections.Item[types.Params] } const ( errModuleAccountNotSet = "%s module account has not been set" ) -func NewKeeper(cdc codec.BinaryCodec, env appmodule.Environment, ak types.AccountKeeper, bk types.BankKeeper, sk types.StakingKeeper, authority string, +func NewKeeper(cdc codec.BinaryCodec, env appmodule.Environment, ak types.AccountKeeper, bk types.BankKeeper, authority string, ) Keeper { // ensure pool module account is set if addr := ak.GetModuleAddress(types.ModuleName); addr == nil { @@ -65,14 +65,14 @@ func NewKeeper(cdc codec.BinaryCodec, env appmodule.Environment, ak types.Accoun Environment: env, authKeeper: ak, bankKeeper: bk, - stakingKeeper: sk, cdc: cdc, authority: authority, BudgetProposal: collections.NewMap(sb, types.BudgetKey, "budget", sdk.AccAddressKey, codec.CollValue[types.Budget](cdc)), ContinuousFund: collections.NewMap(sb, types.ContinuousFundKey, "continuous_fund", sdk.AccAddressKey, codec.CollValue[types.ContinuousFund](cdc)), - RecipientFundDistribution: collections.NewMap(sb, types.RecipientFundDistributionKey, "recipient_fund_distribution", sdk.AccAddressKey, sdk.IntValue), - Distributions: collections.NewMap(sb, types.DistributionsKey, "distributions", sdk.TimeKey, sdk.IntValue), - LastBalance: collections.NewItem(sb, types.LastBalanceKey, "last_balance", sdk.IntValue), + RecipientFundDistribution: collections.NewMap(sb, types.RecipientFundDistributionKey, "recipient_fund_distribution", sdk.AccAddressKey, codec.CollValue[types.DistributionAmount](cdc)), + Distributions: collections.NewMap(sb, types.DistributionsKey, "distributions", sdk.TimeKey, codec.CollValue[types.DistributionAmount](cdc)), + LastBalance: collections.NewItem(sb, types.LastBalanceKey, "last_balance", codec.CollValue[types.DistributionAmount](cdc)), + Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)), } schema, err := sb.Build() @@ -115,34 +115,27 @@ func (k Keeper) GetCommunityPool(ctx context.Context) (sdk.Coins, error) { return k.bankKeeper.GetAllBalances(ctx, moduleAccount.GetAddress()), nil } -func (k Keeper) withdrawRecipientFunds(ctx context.Context, recipient []byte) (sdk.Coin, error) { +func (k Keeper) withdrawRecipientFunds(ctx context.Context, recipient []byte) (sdk.Coins, error) { // get allocated continuous fund fundsAllocated, err := k.RecipientFundDistribution.Get(ctx, recipient) if err != nil { if errors.Is(err, collections.ErrNotFound) { - return sdk.Coin{}, types.ErrNoRecipientFound + return nil, types.ErrNoRecipientFound } - return sdk.Coin{}, err - } - - denom, err := k.stakingKeeper.BondDenom(ctx) - if err != nil { - return sdk.Coin{}, err + return nil, err } - // Distribute funds to the recipient from pool module account - withdrawnAmount := sdk.NewCoin(denom, fundsAllocated) - err = k.DistributeFromStreamFunds(ctx, sdk.NewCoins(withdrawnAmount), recipient) + err = k.DistributeFromStreamFunds(ctx, fundsAllocated.Amount, recipient) if err != nil { - return sdk.Coin{}, fmt.Errorf("error while distributing funds: %w", err) + return nil, fmt.Errorf("error while distributing funds: %w", err) } // reset fund distribution - err = k.RecipientFundDistribution.Set(ctx, recipient, math.ZeroInt()) + err = k.RecipientFundDistribution.Set(ctx, recipient, types.DistributionAmount{Amount: sdk.NewCoins()}) if err != nil { - return sdk.Coin{}, err + return nil, err } - return withdrawnAmount, nil + return fundsAllocated.Amount, nil } // SetToDistribute sets the amount to be distributed among recipients. @@ -152,31 +145,37 @@ func (k Keeper) SetToDistribute(ctx context.Context) error { if moduleAccount == nil { return errorsmod.Wrapf(sdkerrors.ErrUnknownAddress, "module account %s does not exist", types.ProtocolPoolDistrAccount) } - - denom, err := k.stakingKeeper.BondDenom(ctx) + params, err := k.Params.Get(ctx) if err != nil { return err } - currentBalance := k.bankKeeper.GetAllBalances(ctx, moduleAccount.GetAddress()) - distributionBalance := currentBalance.AmountOf(denom) + // only take into account the balances of denoms whitelisted in EnabledDistributionDenoms + currentBalance := sdk.NewCoins() + for _, denom := range params.EnabledDistributionDenoms { + bal := k.bankKeeper.GetBalance(ctx, moduleAccount.GetAddress(), denom) + currentBalance = currentBalance.Add(bal) + } // if the balance is zero, return early - if distributionBalance.IsZero() { + if currentBalance.IsZero() { return nil } lastBalance, err := k.LastBalance.Get(ctx) if err != nil { if errors.Is(err, collections.ErrNotFound) { - lastBalance = math.ZeroInt() + lastBalance = types.DistributionAmount{Amount: sdk.NewCoins()} } else { return err } } // Calculate the amount to be distributed - amountToDistribute := distributionBalance.Sub(lastBalance) + amountToDistribute, anyNegative := currentBalance.SafeSub(lastBalance.Amount...) + if anyNegative { + return errors.New("error while calculating the amount to distribute, result can't be negative") + } // Check if there are any recipients to distribute to, if not, send straight to the community pool and avoid // setting the distributions @@ -191,24 +190,23 @@ func (k Keeper) SetToDistribute(ctx context.Context) error { // if there are no continuous funds, send all the funds to the community pool and reset the last balance if !hasContinuousFunds { - poolCoins := sdk.NewCoins(sdk.NewCoin(denom, amountToDistribute)) - if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ProtocolPoolDistrAccount, types.ModuleName, poolCoins); err != nil { + if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ProtocolPoolDistrAccount, types.ModuleName, amountToDistribute); err != nil { return err } - if !lastBalance.IsZero() { // only reset if the last balance is not zero (so we leave it at zero/nil) - return k.LastBalance.Set(ctx, math.ZeroInt()) + if !lastBalance.Amount.IsZero() { // only reset if the last balance is not zero (so we leave it at zero) + return k.LastBalance.Set(ctx, types.DistributionAmount{Amount: sdk.NewCoins()}) } return nil } - if err = k.Distributions.Set(ctx, k.HeaderService.HeaderInfo(ctx).Time, amountToDistribute); err != nil { + if err = k.Distributions.Set(ctx, k.HeaderService.HeaderInfo(ctx).Time, types.DistributionAmount{Amount: amountToDistribute}); err != nil { return fmt.Errorf("error while setting Distributions: %w", err) } // Update the last balance - return k.LastBalance.Set(ctx, distributionBalance) + return k.LastBalance.Set(ctx, types.DistributionAmount{Amount: currentBalance}) } func (k Keeper) IterateAndUpdateFundsDistribution(ctx context.Context) error { @@ -230,36 +228,38 @@ func (k Keeper) IterateAndUpdateFundsDistribution(ctx context.Context) error { } // next we iterate over the distributions, calculate each recipient's share and the remaining pool funds - toDistribute := map[string]math.Int{} - poolFunds := math.ZeroInt() - fullAmountToDistribute := math.ZeroInt() + distributeToRecipient := map[string]sdk.Coins{} + effectiveDistributionAmounts := sdk.NewCoins() // amount assigned to distributions + totalDistributionAmounts := sdk.NewCoins() // total amount distributed to the pool, to then calculate the remaining pool funds + + if err = k.Distributions.Walk(ctx, nil, func(key time.Time, amount types.DistributionAmount) (stop bool, err error) { + totalPercentageApplied := math.LegacyZeroDec() + totalDistributionAmounts = totalDistributionAmounts.Add(amount.Amount...) - if err = k.Distributions.Walk(ctx, nil, func(key time.Time, amount math.Int) (stop bool, err error) { - percentageToDistribute := math.LegacyZeroDec() for _, f := range funds { if f.Expiry != nil && f.Expiry.Before(key) { continue } - percentageToDistribute = percentageToDistribute.Add(f.Percentage) + totalPercentageApplied = totalPercentageApplied.Add(f.Percentage) - _, ok := toDistribute[f.Recipient] + _, ok := distributeToRecipient[f.Recipient] if !ok { - toDistribute[f.Recipient] = math.ZeroInt() + distributeToRecipient[f.Recipient] = sdk.NewCoins() + } + + for _, denom := range amount.Amount.Denoms() { + am := sdk.NewCoin(denom, f.Percentage.MulInt(amount.Amount.AmountOf(denom)).TruncateInt()) + distributeToRecipient[f.Recipient] = distributeToRecipient[f.Recipient].Add(am) + effectiveDistributionAmounts = effectiveDistributionAmounts.Add(am) } - amountToDistribute := f.Percentage.MulInt(amount).TruncateInt() - toDistribute[f.Recipient] = toDistribute[f.Recipient].Add(amountToDistribute) - fullAmountToDistribute = fullAmountToDistribute.Add(amountToDistribute) } // sanity check for max percentage - if percentageToDistribute.GT(math.LegacyOneDec()) { + if totalPercentageApplied.GT(math.LegacyOneDec()) { return true, errors.New("total funds percentage cannot exceed 100") } - remaining := math.LegacyOneDec().Sub(percentageToDistribute).MulInt(amount).RoundInt() - poolFunds = poolFunds.Add(remaining) - return false, nil }); err != nil { return err @@ -270,33 +270,27 @@ func (k Keeper) IterateAndUpdateFundsDistribution(ctx context.Context) error { return err } - if err = k.LastBalance.Set(ctx, math.ZeroInt()); err != nil { + if err = k.LastBalance.Set(ctx, types.DistributionAmount{Amount: sdk.NewCoins()}); err != nil { return err } // send the funds to the stream account to be distributed later, and the remaining to the community pool - bondDenom, err := k.stakingKeeper.BondDenom(ctx) - if err != nil { - return err - } - - streamAmt := sdk.NewCoins(sdk.NewCoin(bondDenom, fullAmountToDistribute)) - if !streamAmt.IsZero() { - if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ProtocolPoolDistrAccount, types.StreamAccount, streamAmt); err != nil { + if !effectiveDistributionAmounts.IsZero() { + if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ProtocolPoolDistrAccount, types.StreamAccount, effectiveDistributionAmounts); err != nil { return err } } + poolFunds := totalDistributionAmounts.Sub(effectiveDistributionAmounts...) if !poolFunds.IsZero() { - poolCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, poolFunds)) - if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ProtocolPoolDistrAccount, types.ModuleName, poolCoins); err != nil { + if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ProtocolPoolDistrAccount, types.ModuleName, poolFunds); err != nil { return err } } // update the recipient fund distribution, first get the keys and sort them - recipients := make([]string, 0, len(toDistribute)) - for k2 := range toDistribute { + recipients := make([]string, 0, len(distributeToRecipient)) + for k2 := range distributeToRecipient { recipients = append(recipients, k2) } sort.Strings(recipients) @@ -311,14 +305,14 @@ func (k Keeper) IterateAndUpdateFundsDistribution(ctx context.Context) error { toClaim, err := k.RecipientFundDistribution.Get(ctx, bzAddr) if err != nil { if errors.Is(err, collections.ErrNotFound) { - toClaim = math.ZeroInt() + toClaim = types.DistributionAmount{Amount: sdk.NewCoins()} } else { return err } } - amount := toClaim.Add(toDistribute[recipient]) - if err = k.RecipientFundDistribution.Set(ctx, bzAddr, amount); err != nil { + toClaim.Amount = toClaim.Amount.Add(distributeToRecipient[recipient]...) + if err = k.RecipientFundDistribution.Set(ctx, bzAddr, toClaim); err != nil { return err } } diff --git a/x/protocolpool/keeper/keeper_test.go b/x/protocolpool/keeper/keeper_test.go index e4fc05d1a6a3..7455e81d31cb 100644 --- a/x/protocolpool/keeper/keeper_test.go +++ b/x/protocolpool/keeper/keeper_test.go @@ -35,12 +35,11 @@ var ( type KeeperTestSuite struct { suite.Suite - ctx sdk.Context - environment appmodule.Environment - poolKeeper poolkeeper.Keeper - authKeeper *pooltestutil.MockAccountKeeper - bankKeeper *pooltestutil.MockBankKeeper - stakingKeeper *pooltestutil.MockStakingKeeper + ctx sdk.Context + environment appmodule.Environment + poolKeeper poolkeeper.Keeper + authKeeper *pooltestutil.MockAccountKeeper + bankKeeper *pooltestutil.MockBankKeeper msgServer types.MsgServer queryServer types.QueryServer @@ -66,10 +65,6 @@ func (s *KeeperTestSuite) SetupTest() { bankKeeper := pooltestutil.NewMockBankKeeper(ctrl) s.bankKeeper = bankKeeper - stakingKeeper := pooltestutil.NewMockStakingKeeper(ctrl) - stakingKeeper.EXPECT().BondDenom(ctx).Return("stake", nil).AnyTimes() - s.stakingKeeper = stakingKeeper - authority, err := accountKeeper.AddressCodec().BytesToString(authtypes.NewModuleAddress(types.GovModuleName)) s.Require().NoError(err) @@ -78,13 +73,17 @@ func (s *KeeperTestSuite) SetupTest() { environment, accountKeeper, bankKeeper, - stakingKeeper, authority, ) s.ctx = ctx s.poolKeeper = poolKeeper s.environment = environment + err = s.poolKeeper.Params.Set(ctx, types.Params{ + EnabledDistributionDenoms: []string{sdk.DefaultBondDenom}, + }) + s.Require().NoError(err) + types.RegisterInterfaces(encCfg.InterfaceRegistry) queryHelper := baseapp.NewQueryServerTestHelper(ctx, encCfg.InterfaceRegistry) types.RegisterQueryServer(queryHelper, poolkeeper.Querier{Keeper: poolKeeper}) @@ -98,18 +97,17 @@ func (s *KeeperTestSuite) mockSendCoinsFromModuleToAccount(accAddr sdk.AccAddres func (s *KeeperTestSuite) mockWithdrawContinuousFund() { s.authKeeper.EXPECT().GetModuleAccount(gomock.Any(), types.ModuleName).Return(poolAcc).AnyTimes() - distrBal := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(100000))) - s.bankKeeper.EXPECT().GetAllBalances(gomock.Any(), gomock.Any()).Return(distrBal).AnyTimes() + distrBal := sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(100000)) + s.bankKeeper.EXPECT().GetBalance(gomock.Any(), gomock.Any(), sdk.DefaultBondDenom).Return(distrBal).AnyTimes() s.bankKeeper.EXPECT().SendCoinsFromModuleToAccount(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes() - s.stakingKeeper.EXPECT().BondDenom(gomock.Any()).Return("stake", nil).AnyTimes() } func (s *KeeperTestSuite) mockStreamFunds(distributed math.Int) { s.authKeeper.EXPECT().GetModuleAccount(s.ctx, types.ModuleName).Return(poolAcc).AnyTimes() s.authKeeper.EXPECT().GetModuleAccount(s.ctx, types.ProtocolPoolDistrAccount).Return(poolDistrAcc).AnyTimes() s.authKeeper.EXPECT().GetModuleAddress(types.StreamAccount).Return(streamAcc.GetAddress()).AnyTimes() - distrBal := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, distributed)) - s.bankKeeper.EXPECT().GetAllBalances(s.ctx, poolDistrAcc.GetAddress()).Return(distrBal).AnyTimes() + distrBal := sdk.NewCoin(sdk.DefaultBondDenom, distributed) + s.bankKeeper.EXPECT().GetBalance(s.ctx, poolDistrAcc.GetAddress(), sdk.DefaultBondDenom).Return(distrBal).AnyTimes() s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(s.ctx, poolDistrAcc.GetName(), streamAcc.GetName(), gomock.Any()).AnyTimes() s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(s.ctx, poolDistrAcc.GetName(), poolAcc.GetName(), gomock.Any()).AnyTimes() } @@ -123,8 +121,8 @@ func (s *KeeperTestSuite) TestIterateAndUpdateFundsDistribution() { s.SetupTest() s.authKeeper.EXPECT().GetModuleAccount(s.ctx, types.ProtocolPoolDistrAccount).Return(poolAcc).AnyTimes() - distrBal := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(1000000))) - s.bankKeeper.EXPECT().GetAllBalances(s.ctx, poolAcc.GetAddress()).Return(distrBal).AnyTimes() + distrBal := sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(1000000)) + s.bankKeeper.EXPECT().GetBalance(s.ctx, poolAcc.GetAddress(), sdk.DefaultBondDenom).Return(distrBal).AnyTimes() s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(s.ctx, poolDistrAcc.GetName(), streamAcc.GetName(), sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(600000)))) s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(s.ctx, poolDistrAcc.GetName(), poolAcc.GetName(), sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(400000)))) @@ -147,14 +145,14 @@ func (s *KeeperTestSuite) TestIterateAndUpdateFundsDistribution() { err = s.poolKeeper.IterateAndUpdateFundsDistribution(s.ctx) s.Require().NoError(err) - err = s.poolKeeper.RecipientFundDistribution.Walk(s.ctx, nil, func(key sdk.AccAddress, value math.Int) (stop bool, err error) { + err = s.poolKeeper.RecipientFundDistribution.Walk(s.ctx, nil, func(key sdk.AccAddress, value types.DistributionAmount) (stop bool, err error) { strAddr, err := s.authKeeper.AddressCodec().BytesToString(key) s.Require().NoError(err) if strAddr == "cosmos1qypq2q2l8z4wz2z2l8z4wz2z2l8z4wz2srklj6" { - s.Require().Equal(value, math.NewInt(300000)) + s.Require().Equal(value.Amount, sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(300000)))) } else if strAddr == "cosmos1tygms3xhhs3yv487phx3dw4a95jn7t7lpm470r" { - s.Require().Equal(value, math.NewInt(300000)) + s.Require().Equal(value.Amount, sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(300000)))) } return false, nil }) @@ -182,14 +180,25 @@ func (suite *KeeperTestSuite) TestGetCommunityPool() { func (suite *KeeperTestSuite) TestSetToDistribute() { suite.SetupTest() + params, err := suite.poolKeeper.Params.Get(suite.ctx) + suite.Require().NoError(err) + suite.Require().Equal([]string{sdk.DefaultBondDenom}, params.EnabledDistributionDenoms) + + // add another denom + err = suite.poolKeeper.Params.Set(suite.ctx, types.Params{ + EnabledDistributionDenoms: []string{sdk.DefaultBondDenom, "foo"}, + }) + suite.Require().NoError(err) + suite.authKeeper.EXPECT().GetModuleAccount(suite.ctx, types.ProtocolPoolDistrAccount).Return(poolDistrAcc).AnyTimes() - distrBal := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(1000000))) - suite.bankKeeper.EXPECT().GetAllBalances(suite.ctx, poolDistrAcc.GetAddress()).Return(distrBal).AnyTimes() + distrBal := sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(1000000)) + suite.bankKeeper.EXPECT().GetBalance(suite.ctx, poolDistrAcc.GetAddress(), sdk.DefaultBondDenom).Return(distrBal).Times(2) + suite.bankKeeper.EXPECT().GetBalance(suite.ctx, poolDistrAcc.GetAddress(), "foo").Return(sdk.NewCoin("foo", math.NewInt(1234))).Times(2) // because there are no continuous funds, all are going to the community pool - suite.bankKeeper.EXPECT().SendCoinsFromModuleToModule(suite.ctx, poolDistrAcc.GetName(), poolAcc.GetName(), distrBal) + suite.bankKeeper.EXPECT().SendCoinsFromModuleToModule(suite.ctx, poolDistrAcc.GetName(), poolAcc.GetName(), sdk.NewCoins(distrBal, sdk.NewCoin("foo", math.NewInt(1234)))) - err := suite.poolKeeper.SetToDistribute(suite.ctx) + err = suite.poolKeeper.SetToDistribute(suite.ctx) suite.Require().NoError(err) // Verify that LastBalance was not set (zero balance) @@ -215,27 +224,28 @@ func (suite *KeeperTestSuite) TestSetToDistribute() { // Verify that LastBalance was set correctly lastBalance, err := suite.poolKeeper.LastBalance.Get(suite.ctx) suite.Require().NoError(err) - suite.Require().Equal(math.NewInt(1000000), lastBalance) + suite.Require().Equal(sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(1000000)), sdk.NewCoin("foo", math.NewInt(1234))), lastBalance.Amount) // Verify that a distribution was set - var distribution math.Int - err = suite.poolKeeper.Distributions.Walk(suite.ctx, nil, func(key time.Time, value math.Int) (bool, error) { + var distribution types.DistributionAmount + err = suite.poolKeeper.Distributions.Walk(suite.ctx, nil, func(key time.Time, value types.DistributionAmount) (bool, error) { distribution = value return true, nil }) suite.Require().NoError(err) - suite.Require().Equal(math.NewInt(1000000), distribution) + suite.Require().Equal(sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(1000000)), sdk.NewCoin("foo", math.NewInt(1234))), distribution.Amount) // Test case when balance is zero - zeroBal := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.ZeroInt())) - suite.bankKeeper.EXPECT().GetAllBalances(suite.ctx, poolDistrAcc.GetAddress()).Return(zeroBal).AnyTimes() + zeroBal := sdk.NewCoin(sdk.DefaultBondDenom, math.ZeroInt()) + suite.bankKeeper.EXPECT().GetBalance(suite.ctx, poolDistrAcc.GetAddress(), sdk.DefaultBondDenom).Return(zeroBal) + suite.bankKeeper.EXPECT().GetBalance(suite.ctx, poolDistrAcc.GetAddress(), "foo").Return(sdk.NewCoin("foo", math.ZeroInt())) err = suite.poolKeeper.SetToDistribute(suite.ctx) suite.Require().NoError(err) // Verify that no new distribution was set count := 0 - err = suite.poolKeeper.Distributions.Walk(suite.ctx, nil, func(key time.Time, value math.Int) (bool, error) { + err = suite.poolKeeper.Distributions.Walk(suite.ctx, nil, func(key time.Time, value types.DistributionAmount) (bool, error) { count++ return false, nil }) diff --git a/x/protocolpool/keeper/msg_server.go b/x/protocolpool/keeper/msg_server.go index 43caff3e42a2..e6e2f7de19b7 100644 --- a/x/protocolpool/keeper/msg_server.go +++ b/x/protocolpool/keeper/msg_server.go @@ -157,7 +157,7 @@ func (k MsgServer) CreateContinuousFund(ctx context.Context, msg *types.MsgCreat return nil, err } - err = k.RecipientFundDistribution.Set(ctx, recipient, math.ZeroInt()) + err = k.RecipientFundDistribution.Set(ctx, recipient, types.DistributionAmount{Amount: sdk.NewCoins()}) if err != nil { return nil, err } @@ -225,6 +225,18 @@ func (k MsgServer) CancelContinuousFund(ctx context.Context, msg *types.MsgCance }, nil } +func (k MsgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { + if err := k.validateAuthority(msg.GetAuthority()); err != nil { + return nil, err + } + + if err := k.Params.Set(ctx, msg.Params); err != nil { + return nil, err + } + + return &types.MsgUpdateParamsResponse{}, nil +} + func (k *Keeper) validateAuthority(authority string) error { if _, err := k.authKeeper.AddressCodec().StringToBytes(authority); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", err) diff --git a/x/protocolpool/keeper/msg_server_test.go b/x/protocolpool/keeper/msg_server_test.go index b053ef9ff681..f1ed017c544e 100644 --- a/x/protocolpool/keeper/msg_server_test.go +++ b/x/protocolpool/keeper/msg_server_test.go @@ -395,7 +395,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { recipientAddress []sdk.AccAddress expErr bool expErrMsg string - withdrawnAmount sdk.Coin + withdrawnAmount sdk.Coins }{ "empty recipient": { recipientAddress: []sdk.AccAddress{sdk.AccAddress([]byte(""))}, @@ -423,7 +423,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { err = suite.poolKeeper.ContinuousFund.Set(suite.ctx, recipient, cf) suite.Require().NoError(err) // Set recipient fund percentage and recipient fund distribution - err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient, math.ZeroInt()) + err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient, types.DistributionAmount{Amount: sdk.NewCoins()}) suite.Require().NoError(err) // Set fund 2 @@ -439,11 +439,11 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { suite.Require().NoError(err) // Set recipient fund percentage and recipient fund distribution suite.Require().NoError(err) - err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient2, math.ZeroInt()) + err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient2, types.DistributionAmount{Amount: sdk.NewCoins()}) suite.Require().NoError(err) // Set ToDistribute - err = suite.poolKeeper.Distributions.Set(suite.ctx, suite.ctx.HeaderInfo().Time, math.NewInt(100000)) + err = suite.poolKeeper.Distributions.Set(suite.ctx, suite.ctx.HeaderInfo().Time, types.DistributionAmount{Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(100000)))}) suite.Require().NoError(err) }, recipientAddress: []sdk.AccAddress{recipient}, @@ -483,15 +483,15 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { err = suite.poolKeeper.ContinuousFund.Set(suite.ctx, recipient, cf) suite.Require().NoError(err) // Set recipient fund percentage and recipient fund distribution - err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient, math.ZeroInt()) + err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient, types.DistributionAmount{Amount: sdk.NewCoins()}) suite.Require().NoError(err) - err = suite.poolKeeper.Distributions.Set(suite.ctx, suite.ctx.HeaderInfo().Time, math.ZeroInt()) + err = suite.poolKeeper.Distributions.Set(suite.ctx, suite.ctx.HeaderInfo().Time, types.DistributionAmount{Amount: sdk.NewCoins()}) suite.Require().NoError(err) suite.mockStreamFunds(math.NewInt(0)) }, recipientAddress: []sdk.AccAddress{recipient}, expErr: false, - withdrawnAmount: sdk.NewCoin(sdk.DefaultBondDenom, math.ZeroInt()), + withdrawnAmount: nil, }, "valid case with empty expiry": { preRun: func() { @@ -505,7 +505,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { err = suite.poolKeeper.ContinuousFund.Set(suite.ctx, recipient, cf) suite.Require().NoError(err) // Set recipient fund percentage and recipient fund distribution - err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient, math.ZeroInt()) + err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient, types.DistributionAmount{Amount: sdk.NewCoins()}) suite.Require().NoError(err) suite.mockStreamFunds(math.NewInt(100000)) err = suite.poolKeeper.SetToDistribute(suite.ctx) @@ -513,7 +513,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { }, recipientAddress: []sdk.AccAddress{recipient}, expErr: false, - withdrawnAmount: sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(20000)), + withdrawnAmount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(20000))), }, "valid case": { preRun: func() { @@ -530,7 +530,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { err = suite.poolKeeper.ContinuousFund.Set(suite.ctx, recipient, cf) suite.Require().NoError(err) // Set recipient fund percentage and recipient fund distribution - err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient, math.ZeroInt()) + err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient, types.DistributionAmount{Amount: sdk.NewCoins()}) suite.Require().NoError(err) suite.mockStreamFunds(math.NewInt(100000)) err = suite.poolKeeper.SetToDistribute(suite.ctx) @@ -538,7 +538,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { }, recipientAddress: []sdk.AccAddress{recipient}, expErr: false, - withdrawnAmount: sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(20000)), + withdrawnAmount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(20000))), }, "valid case with multiple funds": { preRun: func() { @@ -556,7 +556,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { err = suite.poolKeeper.ContinuousFund.Set(suite.ctx, recipient, cf) suite.Require().NoError(err) // Set recipient fund percentage and recipient fund distribution - err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient, math.ZeroInt()) + err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient, types.DistributionAmount{Amount: sdk.NewCoins()}) suite.Require().NoError(err) // Set continuous fund 2 @@ -571,7 +571,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { err = suite.poolKeeper.ContinuousFund.Set(suite.ctx, recipient2, cf) suite.Require().NoError(err) // Set recipient fund percentage and recipient fund distribution - err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient2, math.ZeroInt()) + err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient2, types.DistributionAmount{Amount: sdk.NewCoins()}) suite.Require().NoError(err) // Set continuous fund 3 @@ -586,7 +586,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { err = suite.poolKeeper.ContinuousFund.Set(suite.ctx, recipient3, cf) suite.Require().NoError(err) // Set recipient fund percentage and recipient fund distribution - err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient3, math.ZeroInt()) + err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient3, types.DistributionAmount{Amount: sdk.NewCoins()}) suite.Require().NoError(err) suite.mockStreamFunds(math.NewInt(100000)) @@ -595,7 +595,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { }, recipientAddress: []sdk.AccAddress{recipient, recipient2, recipient3}, expErr: false, - withdrawnAmount: sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(30000)), + withdrawnAmount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(30000))), }, } @@ -625,10 +625,10 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { if len(tc.recipientAddress) > 1 { toClaim, err := suite.poolKeeper.RecipientFundDistribution.Get(suite.ctx, tc.recipientAddress[1]) suite.Require().NoError(err) - suite.Require().Equal(toClaim, math.NewInt(20000)) + suite.Require().Equal(toClaim.Amount, sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(20000)))) toClaim, err = suite.poolKeeper.RecipientFundDistribution.Get(suite.ctx, tc.recipientAddress[2]) suite.Require().NoError(err) - suite.Require().Equal(toClaim, math.NewInt(30000)) + suite.Require().Equal(toClaim.Amount, sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(30000)))) } } }) @@ -794,7 +794,7 @@ func (suite *KeeperTestSuite) TestCancelContinuousFund() { expErr bool expErrMsg string postRun func() - withdrawnFunds sdk.Coin + withdrawnFunds sdk.Coins }{ "empty recipient": { preRun: func() { @@ -829,7 +829,7 @@ func (suite *KeeperTestSuite) TestCancelContinuousFund() { err = suite.poolKeeper.ContinuousFund.Set(suite.ctx, recipientAddr, cf) suite.Require().NoError(err) // Set recipient fund percentage and recipient fund distribution - err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipientAddr, math.ZeroInt()) + err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipientAddr, types.DistributionAmount{Amount: sdk.NewCoins()}) suite.Require().NoError(err) // Set fund 2 @@ -844,7 +844,7 @@ func (suite *KeeperTestSuite) TestCancelContinuousFund() { err = suite.poolKeeper.ContinuousFund.Set(suite.ctx, recipient2, cf) suite.Require().NoError(err) // Set recipient fund percentage and recipient fund distribution - err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient2, math.ZeroInt()) + err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient2, types.DistributionAmount{Amount: sdk.NewCoins()}) suite.Require().NoError(err) // Set ToDistribute @@ -865,7 +865,7 @@ func (suite *KeeperTestSuite) TestCancelContinuousFund() { suite.Require().Error(err) suite.Require().ErrorIs(err, collections.ErrNotFound) }, - withdrawnFunds: sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(20000)), + withdrawnFunds: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(20000))), }, "all good": { preRun: func() { @@ -881,7 +881,7 @@ func (suite *KeeperTestSuite) TestCancelContinuousFund() { suite.mockWithdrawContinuousFund() err = suite.poolKeeper.ContinuousFund.Set(suite.ctx, recipient3, cf) suite.Require().NoError(err) - err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient3, math.ZeroInt()) + err = suite.poolKeeper.RecipientFundDistribution.Set(suite.ctx, recipient3, types.DistributionAmount{Amount: sdk.NewCoins()}) suite.Require().NoError(err) }, recipientAddr: recipient3, @@ -891,7 +891,7 @@ func (suite *KeeperTestSuite) TestCancelContinuousFund() { suite.Require().Error(err) suite.Require().ErrorIs(err, collections.ErrNotFound) }, - withdrawnFunds: sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(0)), + withdrawnFunds: nil, }, } @@ -988,7 +988,7 @@ func (suite *KeeperTestSuite) TestWithdrawExpiredFunds() { RecipientAddress: recipient2StrAddr, }) suite.Require().NoError(err) - suite.Require().Equal(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(0)), res.WithdrawnAllocatedFund) + suite.Require().Nil(res.WithdrawnAllocatedFund) // canceling an expired continuous fund, won't error res, err = suite.msgServer.CancelContinuousFund(suite.ctx, &types.MsgCancelContinuousFund{ @@ -996,7 +996,7 @@ func (suite *KeeperTestSuite) TestWithdrawExpiredFunds() { RecipientAddress: recipientStrAddr, }) suite.Require().NoError(err) - suite.Require().Equal(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(0)), res.WithdrawnAllocatedFund) + suite.Require().Nil(res.WithdrawnAllocatedFund) // if we try to cancel again the same continuout fund, it won't error, it will still distribute funds if needed. res, err = suite.msgServer.CancelContinuousFund(suite.ctx, &types.MsgCancelContinuousFund{ @@ -1004,7 +1004,7 @@ func (suite *KeeperTestSuite) TestWithdrawExpiredFunds() { RecipientAddress: recipientStrAddr, }) suite.Require().NoError(err) - suite.Require().True(res.WithdrawnAllocatedFund.IsNil()) + suite.Require().True(res.WithdrawnAllocatedFund.IsZero()) } func (suite *KeeperTestSuite) TestFundCommunityPool() { @@ -1039,3 +1039,15 @@ func (suite *KeeperTestSuite) TestCommunityPoolSpend() { }) suite.Require().NoError(err) } + +func (suite *KeeperTestSuite) TestUpdateParams() { + _, err := suite.msgServer.UpdateParams(suite.ctx, &types.MsgUpdateParams{ + Authority: suite.poolKeeper.GetAuthority(), + Params: types.Params{EnabledDistributionDenoms: []string{"stake"}}, + }) + suite.Require().NoError(err) + + params, err := suite.poolKeeper.Params.Get(suite.ctx) + suite.Require().NoError(err) + suite.Require().Len(params.EnabledDistributionDenoms, 1) +} diff --git a/x/protocolpool/proto/cosmos/protocolpool/v1/genesis.proto b/x/protocolpool/proto/cosmos/protocolpool/v1/genesis.proto index d9df6870a7a4..bf862e83c894 100644 --- a/x/protocolpool/proto/cosmos/protocolpool/v1/genesis.proto +++ b/x/protocolpool/proto/cosmos/protocolpool/v1/genesis.proto @@ -17,24 +17,24 @@ message GenesisState { // last_balance contains the amount of tokens yet to be distributed, will be zero if // there are no funds to distribute. - string last_balance = 3 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; + DistributionAmount last_balance = 3 [(gogoproto.nullable) = false]; // distributions contains the list of distributions to be made to continuous // funds and budgets. It contains time in order to distribute to non-expired // funds only. repeated Distribution distributions = 4; + + // params defines the parameters of this module, currently only contains the + // denoms that will be used for continuous fund distributions. + Params params = 5; } message Distribution { - string amount = 3 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; + // time at which this distribution was made, in order to distribute to non-expired funds only + // and funds that existed at that time. Because we don't distribute right away, we keep track + // of the time of distribution. + google.protobuf.Timestamp time = 1 [(gogoproto.stdtime) = true]; - google.protobuf.Timestamp time = 6 [(gogoproto.stdtime) = true]; + // amount is the list of coins to be distributed. + DistributionAmount amount = 2 [(gogoproto.nullable) = false]; } \ No newline at end of file diff --git a/x/protocolpool/proto/cosmos/protocolpool/v1/tx.proto b/x/protocolpool/proto/cosmos/protocolpool/v1/tx.proto index df8949d9ac99..ec1ab37a8d91 100644 --- a/x/protocolpool/proto/cosmos/protocolpool/v1/tx.proto +++ b/x/protocolpool/proto/cosmos/protocolpool/v1/tx.proto @@ -3,6 +3,7 @@ package cosmos.protocolpool.v1; option go_package = "cosmossdk.io/x/protocolpool/types"; +import "cosmos/protocolpool/v1/types.proto"; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos_proto/cosmos.proto"; @@ -38,6 +39,12 @@ service Msg { // CancelContinuousFund defines a method for cancelling continuous fund. rpc CancelContinuousFund(MsgCancelContinuousFund) returns (MsgCancelContinuousFundResponse); + + // UpdateParams defines a governance operation for updating the x/protocolpool module parameters. + // The authority is defined in the keeper. + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse) { + option (cosmos_proto.method_added_in) = "cosmos-sdk 0.47"; + } } // MsgFundCommunityPool allows an account to directly @@ -155,7 +162,7 @@ message MsgCancelContinuousFundResponse { // withdrawnAllocatedFund represents the fund allocated to this recipient (if any) that have not been withdrawn yet, // before a cancellation request has been initiated. // It involves first withdrawing the funds and then canceling the request. - cosmos.base.v1beta1.Coin withdrawn_allocated_fund = 4 + repeated cosmos.base.v1beta1.Coin withdrawn_allocated_fund = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; ; } @@ -169,7 +176,24 @@ message MsgWithdrawContinuousFund { // MsgWithdrawContinuousFundResponse defines the response to executing a // MsgWithdrawContinuousFund message. message MsgWithdrawContinuousFundResponse { - cosmos.base.v1beta1.Coin amount = 1 + repeated cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; ; } + +// MsgUpdateParams is the Msg/UpdateParams request type. +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the x/protocolpool parameters to update. + // + // NOTE: All parameters must be supplied. + Params params = 2 [(gogoproto.nullable) = false]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +message MsgUpdateParamsResponse {} \ No newline at end of file diff --git a/x/protocolpool/proto/cosmos/protocolpool/v1/types.proto b/x/protocolpool/proto/cosmos/protocolpool/v1/types.proto index 008c1bd3d171..87080ee70f9f 100644 --- a/x/protocolpool/proto/cosmos/protocolpool/v1/types.proto +++ b/x/protocolpool/proto/cosmos/protocolpool/v1/types.proto @@ -8,6 +8,7 @@ import "cosmos_proto/cosmos.proto"; import "cosmos/base/v1beta1/coin.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/duration.proto"; +import "amino/amino.proto"; // Budget defines the fields of a budget proposal. message Budget { @@ -41,3 +42,20 @@ message ContinuousFund { // Optional, if expiry is set, removes the state object when expired. google.protobuf.Timestamp expiry = 3 [(gogoproto.stdtime) = true]; } + +// DistributionAmount is used to store the coins of periodic distributions. +message DistributionAmount { + repeated cosmos.base.v1beta1.Coin amount = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (amino.dont_omitempty) = true, + (amino.encoding) = "legacy_coins" + ]; +} + +// Params defines the parameters for the protocolpool module. +message Params { + // enabled_distribution_denoms lists the denoms that are allowed to be distributed. + // This is to avoid spending time distributing undesired tokens to continuous funds and budgets. + repeated string enabled_distribution_denoms = 1; +} diff --git a/x/protocolpool/testutil/expected_keepers_mocks.go b/x/protocolpool/testutil/expected_keepers_mocks.go index 9bbdfc58284b..7906356ef5b7 100644 --- a/x/protocolpool/testutil/expected_keepers_mocks.go +++ b/x/protocolpool/testutil/expected_keepers_mocks.go @@ -129,6 +129,20 @@ func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAllBalances), ctx, addr) } +// GetBalance mocks base method. +func (m *MockBankKeeper) GetBalance(ctx context.Context, addr types.AccAddress, denom string) types.Coin { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetBalance", ctx, addr, denom) + ret0, _ := ret[0].(types.Coin) + return ret0 +} + +// GetBalance indicates an expected call of GetBalance. +func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBalance", reflect.TypeOf((*MockBankKeeper)(nil).GetBalance), ctx, addr, denom) +} + // SendCoinsFromAccountToModule mocks base method. func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx context.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { m.ctrl.T.Helper() @@ -184,6 +198,7 @@ func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gom mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr) } +<<<<<<< HEAD // MockStakingKeeper is a mock of StakingKeeper interface. type MockStakingKeeper struct { @@ -222,3 +237,5 @@ func (mr *MockStakingKeeperMockRecorder) BondDenom(ctx interface{}) *gomock.Call mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BondDenom", reflect.TypeOf((*MockStakingKeeper)(nil).BondDenom), ctx) } +======= +>>>>>>> 13c234f42 (feat(x/protocolpool)!: allow any coins in continuous funds (#21916)) diff --git a/x/protocolpool/types/expected_keepers.go b/x/protocolpool/types/expected_keepers.go index d967ca5c1a1a..c4191460b2fa 100644 --- a/x/protocolpool/types/expected_keepers.go +++ b/x/protocolpool/types/expected_keepers.go @@ -17,13 +17,10 @@ type AccountKeeper interface { // BankKeeper defines the expected interface needed to retrieve account balances. type BankKeeper interface { + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amt sdk.Coins) error } - -type StakingKeeper interface { - BondDenom(ctx context.Context) (string, error) -} diff --git a/x/protocolpool/types/genesis.go b/x/protocolpool/types/genesis.go index 08ad95eaf4bd..d281674645db 100644 --- a/x/protocolpool/types/genesis.go +++ b/x/protocolpool/types/genesis.go @@ -6,6 +6,7 @@ import ( errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -13,8 +14,9 @@ func NewGenesisState(cf []*ContinuousFund, budget []*Budget) *GenesisState { return &GenesisState{ ContinuousFund: cf, Budget: budget, - LastBalance: math.ZeroInt(), + LastBalance: DistributionAmount{Amount: sdk.NewCoins()}, Distributions: []*Distribution{}, + Params: &Params{}, } } @@ -22,6 +24,9 @@ func DefaultGenesisState() *GenesisState { return &GenesisState{ ContinuousFund: []*ContinuousFund{}, Budget: []*Budget{}, + Params: &Params{ + EnabledDistributionDenoms: []string{sdk.DefaultBondDenom}, + }, } } diff --git a/x/protocolpool/types/genesis.pb.go b/x/protocolpool/types/genesis.pb.go index 8118de396b5e..6c96400ebc10 100644 --- a/x/protocolpool/types/genesis.pb.go +++ b/x/protocolpool/types/genesis.pb.go @@ -4,7 +4,6 @@ package types import ( - cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/gogoproto/gogoproto" @@ -37,11 +36,14 @@ type GenesisState struct { Budget []*Budget `protobuf:"bytes,2,rep,name=budget,proto3" json:"budget,omitempty"` // last_balance contains the amount of tokens yet to be distributed, will be zero if // there are no funds to distribute. - LastBalance cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=last_balance,json=lastBalance,proto3,customtype=cosmossdk.io/math.Int" json:"last_balance"` + LastBalance DistributionAmount `protobuf:"bytes,3,opt,name=last_balance,json=lastBalance,proto3" json:"last_balance"` // distributions contains the list of distributions to be made to continuous // funds and budgets. It contains time in order to distribute to non-expired // funds only. Distributions []*Distribution `protobuf:"bytes,4,rep,name=distributions,proto3" json:"distributions,omitempty"` + // params defines the parameters of this module, currently only contains the + // denoms that will be used for continuous fund distributions. + Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -91,6 +93,13 @@ func (m *GenesisState) GetBudget() []*Budget { return nil } +func (m *GenesisState) GetLastBalance() DistributionAmount { + if m != nil { + return m.LastBalance + } + return DistributionAmount{} +} + func (m *GenesisState) GetDistributions() []*Distribution { if m != nil { return m.Distributions @@ -98,9 +107,20 @@ func (m *GenesisState) GetDistributions() []*Distribution { return nil } +func (m *GenesisState) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + type Distribution struct { - Amount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` - Time *time.Time `protobuf:"bytes,6,opt,name=time,proto3,stdtime" json:"time,omitempty"` + // time at which this distribution was made, in order to distribute to non-expired funds only + // and funds that existed at that time. Because we don't distribute right away, we keep track + // of the time of distribution. + Time *time.Time `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time,omitempty"` + // amount is the list of coins to be distributed. + Amount DistributionAmount `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` } func (m *Distribution) Reset() { *m = Distribution{} } @@ -143,6 +163,13 @@ func (m *Distribution) GetTime() *time.Time { return nil } +func (m *Distribution) GetAmount() DistributionAmount { + if m != nil { + return m.Amount + } + return DistributionAmount{} +} + func init() { proto.RegisterType((*GenesisState)(nil), "cosmos.protocolpool.v1.GenesisState") proto.RegisterType((*Distribution)(nil), "cosmos.protocolpool.v1.Distribution") @@ -153,32 +180,32 @@ func init() { } var fileDescriptor_72560a99455b4146 = []byte{ - // 393 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xcf, 0xca, 0xd3, 0x40, - 0x14, 0xc5, 0x33, 0x5f, 0x4b, 0xc0, 0x69, 0x55, 0x08, 0x2a, 0x31, 0x8b, 0xa4, 0x96, 0x22, 0x05, - 0x71, 0x42, 0xab, 0xb8, 0x71, 0x97, 0x8a, 0x52, 0x17, 0x0a, 0xd1, 0x95, 0x9b, 0x92, 0x3f, 0xd3, - 0x18, 0x4c, 0xe6, 0x86, 0xce, 0x4c, 0xd1, 0x47, 0x70, 0xd7, 0x77, 0xd1, 0x87, 0xe8, 0xb2, 0xb8, - 0x12, 0x17, 0x55, 0xda, 0x17, 0x91, 0xce, 0xa4, 0x92, 0x80, 0xdd, 0x7c, 0xbb, 0xc9, 0xbd, 0xbf, - 0x73, 0x72, 0xe0, 0x5c, 0x3c, 0x4a, 0x80, 0x97, 0xc0, 0xfd, 0x6a, 0x05, 0x02, 0x12, 0x28, 0x2a, - 0x80, 0xc2, 0x5f, 0x4f, 0xfc, 0x8c, 0x32, 0xca, 0x73, 0x4e, 0xd4, 0xdc, 0xba, 0xa7, 0x29, 0xd2, - 0xa4, 0xc8, 0x7a, 0xe2, 0x0c, 0x2f, 0xa8, 0xc5, 0x97, 0x8a, 0xd6, 0xb4, 0x73, 0x27, 0x83, 0x0c, - 0xd4, 0xd3, 0x3f, 0xbd, 0xea, 0xe9, 0x7d, 0xad, 0x5c, 0xe8, 0x45, 0xd3, 0xde, 0xf1, 0x32, 0x80, - 0xac, 0xa0, 0xda, 0x34, 0x96, 0x4b, 0x5f, 0xe4, 0x25, 0xe5, 0x22, 0x2a, 0x2b, 0x0d, 0x0c, 0xbf, - 0x5d, 0xe1, 0xfe, 0x2b, 0x9d, 0xef, 0x9d, 0x88, 0x04, 0xb5, 0xde, 0xe2, 0xdb, 0x09, 0x30, 0x91, - 0x33, 0x09, 0x92, 0x2f, 0x96, 0x92, 0xa5, 0x36, 0x1a, 0x74, 0xc6, 0xbd, 0xe9, 0x43, 0xf2, 0xff, - 0xe0, 0x64, 0xf6, 0x0f, 0x7f, 0x29, 0x59, 0x1a, 0xde, 0x4a, 0x5a, 0xdf, 0xd6, 0x33, 0x6c, 0xc6, - 0x32, 0xcd, 0xa8, 0xb0, 0xaf, 0x94, 0x8f, 0x7b, 0xc9, 0x27, 0x50, 0x54, 0x58, 0xd3, 0xd6, 0x1b, - 0xdc, 0x2f, 0x22, 0x2e, 0x16, 0x71, 0x54, 0x44, 0x2c, 0xa1, 0x76, 0x67, 0x80, 0xc6, 0x37, 0x82, - 0x47, 0xdb, 0xbd, 0x67, 0xfc, 0xda, 0x7b, 0x77, 0xb5, 0x09, 0x4f, 0x3f, 0x91, 0x1c, 0xfc, 0x32, - 0x12, 0x1f, 0xc9, 0x9c, 0x89, 0x1f, 0xdf, 0x1f, 0xe3, 0xda, 0x7d, 0xce, 0x44, 0xd8, 0x3b, 0x19, - 0x04, 0x5a, 0x6f, 0xbd, 0xc6, 0x37, 0xd3, 0x9c, 0x8b, 0x55, 0x1e, 0x4b, 0x91, 0x03, 0xe3, 0x76, - 0x57, 0xc5, 0x19, 0x5d, 0x8a, 0xf3, 0xa2, 0x01, 0x87, 0x6d, 0xe9, 0xf0, 0x2b, 0xc2, 0xfd, 0xe6, - 0xde, 0x9a, 0x61, 0x33, 0x2a, 0x41, 0x32, 0x71, 0x9d, 0x98, 0xb5, 0xd4, 0x7a, 0x8a, 0xbb, 0xa7, - 0x7a, 0x6c, 0x73, 0x80, 0xc6, 0xbd, 0xa9, 0x43, 0x74, 0x77, 0xe4, 0xdc, 0x1d, 0x79, 0x7f, 0xee, - 0x2e, 0xe8, 0x6e, 0x7e, 0x7b, 0x28, 0x54, 0x74, 0xf0, 0x7c, 0x7b, 0x70, 0xd1, 0xee, 0xe0, 0xa2, - 0x3f, 0x07, 0x17, 0x6d, 0x8e, 0xae, 0xb1, 0x3b, 0xba, 0xc6, 0xcf, 0xa3, 0x6b, 0x7c, 0x78, 0xd0, - 0xfa, 0xf9, 0xe7, 0xf6, 0x65, 0xa9, 0xb3, 0x8a, 0x4d, 0x35, 0x7b, 0xf2, 0x37, 0x00, 0x00, 0xff, - 0xff, 0x0c, 0x77, 0xdd, 0xf7, 0xbb, 0x02, 0x00, 0x00, + // 394 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x41, 0xeb, 0xd3, 0x30, + 0x18, 0x87, 0x9b, 0xad, 0xee, 0x90, 0x4d, 0x85, 0x22, 0x52, 0x7b, 0xe8, 0xe6, 0x18, 0x32, 0x3c, + 0xa4, 0x6c, 0x8a, 0x17, 0x4f, 0x56, 0x51, 0xf1, 0xa2, 0x74, 0x9e, 0xbc, 0x8c, 0xb4, 0xcd, 0x4a, + 0xb1, 0xcd, 0x5b, 0x96, 0x64, 0xe8, 0x97, 0x90, 0x7d, 0xac, 0x1d, 0x77, 0xf4, 0xa4, 0xb2, 0x7d, + 0x01, 0x3f, 0x82, 0x34, 0xe9, 0xa4, 0x03, 0x0b, 0xf2, 0xbf, 0xa5, 0x6f, 0x9f, 0xdf, 0xc3, 0xfb, + 0xe6, 0x0d, 0x9e, 0x25, 0x20, 0x4a, 0x10, 0x41, 0xb5, 0x05, 0x09, 0x09, 0x14, 0x15, 0x40, 0x11, + 0xec, 0x16, 0x41, 0xc6, 0x38, 0x13, 0xb9, 0x20, 0xba, 0xee, 0xdc, 0x37, 0x14, 0x69, 0x53, 0x64, + 0xb7, 0xf0, 0xa6, 0x1d, 0x69, 0xf9, 0xb5, 0x62, 0x0d, 0xed, 0xdd, 0xcb, 0x20, 0x03, 0x7d, 0x0c, + 0xea, 0x53, 0x53, 0x7d, 0x60, 0x92, 0x6b, 0xf3, 0xa3, 0xad, 0xf7, 0xc6, 0x19, 0x40, 0x56, 0x30, + 0x23, 0x8d, 0xd5, 0x26, 0x90, 0x79, 0xc9, 0x84, 0xa4, 0x65, 0x65, 0x80, 0xe9, 0xef, 0x1e, 0x1e, + 0xbd, 0x31, 0xfd, 0xad, 0x24, 0x95, 0xcc, 0x79, 0x8f, 0xef, 0x26, 0xc0, 0x65, 0xce, 0x15, 0x28, + 0xb1, 0xde, 0x28, 0x9e, 0xba, 0x68, 0xd2, 0x9f, 0x0f, 0x97, 0x8f, 0xc8, 0xbf, 0x1b, 0x27, 0x2f, + 0xff, 0xe2, 0xaf, 0x15, 0x4f, 0xa3, 0x3b, 0xc9, 0xd5, 0xb7, 0xf3, 0x0c, 0x0f, 0x62, 0x95, 0x66, + 0x4c, 0xba, 0x3d, 0xed, 0xf1, 0xbb, 0x3c, 0xa1, 0xa6, 0xa2, 0x86, 0x76, 0x56, 0x78, 0x54, 0x50, + 0x21, 0xd7, 0x31, 0x2d, 0x28, 0x4f, 0x98, 0xdb, 0x9f, 0xa0, 0xf9, 0x70, 0xf9, 0xb8, 0x2b, 0xfd, + 0x2a, 0x17, 0x72, 0x9b, 0xc7, 0x4a, 0xe6, 0xc0, 0x5f, 0x94, 0xa0, 0xb8, 0x0c, 0xed, 0xc3, 0x8f, + 0xb1, 0x15, 0x0d, 0x6b, 0x4b, 0x68, 0x24, 0xce, 0x3b, 0x7c, 0x3b, 0x6d, 0x81, 0xc2, 0xb5, 0x75, + 0x4f, 0xb3, 0xff, 0xb1, 0x46, 0xd7, 0xd1, 0x7a, 0xb0, 0x8a, 0x6e, 0x69, 0x29, 0xdc, 0x5b, 0xba, + 0xb5, 0xce, 0xc1, 0x3e, 0x68, 0x2a, 0x6a, 0xe8, 0xe9, 0x37, 0x84, 0x47, 0x6d, 0xaf, 0xf3, 0x14, + 0xdb, 0xf5, 0x5a, 0x5c, 0xa4, 0x35, 0x1e, 0x31, 0x3b, 0x23, 0x97, 0x9d, 0x91, 0x8f, 0x97, 0x9d, + 0x85, 0xf6, 0xfe, 0xe7, 0x18, 0x45, 0x9a, 0x76, 0xde, 0xe2, 0x01, 0xd5, 0x73, 0xba, 0xbd, 0x1b, + 0xde, 0x4c, 0x93, 0x0f, 0x9f, 0x1f, 0x4e, 0x3e, 0x3a, 0x9e, 0x7c, 0xf4, 0xeb, 0xe4, 0xa3, 0xfd, + 0xd9, 0xb7, 0x8e, 0x67, 0xdf, 0xfa, 0x7e, 0xf6, 0xad, 0x4f, 0x0f, 0x8d, 0x52, 0xa4, 0x9f, 0x49, + 0x0e, 0xc1, 0x97, 0xeb, 0xb7, 0xa9, 0x1f, 0x66, 0x3c, 0xd0, 0xb5, 0x27, 0x7f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0xa2, 0x1c, 0x62, 0x0f, 0xfd, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -201,6 +228,18 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } if len(m.Distributions) > 0 { for iNdEx := len(m.Distributions) - 1; iNdEx >= 0; iNdEx-- { { @@ -216,11 +255,11 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { } } { - size := m.LastBalance.Size() - i -= size - if _, err := m.LastBalance.MarshalTo(dAtA[i:]); err != nil { + size, err := m.LastBalance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { return 0, err } + i -= size i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- @@ -276,26 +315,26 @@ func (m *Distribution) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Time != nil { - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Time):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintGenesis(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x32 - } { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { return 0, err } + i -= size i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 + if m.Time != nil { + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Time):]) + if err4 != nil { + return 0, err4 + } + i -= n4 + i = encodeVarintGenesis(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -336,6 +375,10 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + } return n } @@ -345,12 +388,12 @@ func (m *Distribution) Size() (n int) { } var l int _ = l - l = m.Amount.Size() - n += 1 + l + sovGenesis(uint64(l)) if m.Time != nil { l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Time) n += 1 + l + sovGenesis(uint64(l)) } + l = m.Amount.Size() + n += 1 + l + sovGenesis(uint64(l)) return n } @@ -461,7 +504,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LastBalance", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -471,16 +514,15 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenesis } @@ -525,6 +567,42 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) @@ -575,11 +653,11 @@ func (m *Distribution) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: Distribution: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 3: + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -589,29 +667,31 @@ func (m *Distribution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Time == nil { + m.Time = new(time.Time) + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -638,10 +718,7 @@ func (m *Distribution) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Time == nil { - m.Time = new(time.Time) - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.Time, dAtA[iNdEx:postIndex]); err != nil { + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/protocolpool/types/keys.go b/x/protocolpool/types/keys.go index 072052937b55..15c0f3bf997c 100644 --- a/x/protocolpool/types/keys.go +++ b/x/protocolpool/types/keys.go @@ -31,4 +31,5 @@ var ( RecipientFundDistributionKey = collections.NewPrefix(5) DistributionsKey = collections.NewPrefix(6) LastBalanceKey = collections.NewPrefix(7) + ParamsKey = collections.NewPrefix(8) ) diff --git a/x/protocolpool/types/tx.pb.go b/x/protocolpool/types/tx.pb.go index c6269e973942..2192fcbfc423 100644 --- a/x/protocolpool/types/tx.pb.go +++ b/x/protocolpool/types/tx.pb.go @@ -611,7 +611,7 @@ type MsgCancelContinuousFundResponse struct { // withdrawnAllocatedFund represents the fund allocated to this recipient (if any) that have not been withdrawn yet, // before a cancellation request has been initiated. // It involves first withdrawing the funds and then canceling the request. - WithdrawnAllocatedFund types.Coin `protobuf:"bytes,4,opt,name=withdrawn_allocated_fund,json=withdrawnAllocatedFund,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"withdrawn_allocated_fund"` + WithdrawnAllocatedFund github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=withdrawn_allocated_fund,json=withdrawnAllocatedFund,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"withdrawn_allocated_fund"` } func (m *MsgCancelContinuousFundResponse) Reset() { *m = MsgCancelContinuousFundResponse{} } @@ -668,11 +668,11 @@ func (m *MsgCancelContinuousFundResponse) GetRecipientAddress() string { return "" } -func (m *MsgCancelContinuousFundResponse) GetWithdrawnAllocatedFund() types.Coin { +func (m *MsgCancelContinuousFundResponse) GetWithdrawnAllocatedFund() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.WithdrawnAllocatedFund } - return types.Coin{} + return nil } // MsgWithdrawContinuousFund defines a message for withdrawing the continuous fund allocated to it. @@ -723,7 +723,7 @@ func (m *MsgWithdrawContinuousFund) GetRecipientAddress() string { // MsgWithdrawContinuousFundResponse defines the response to executing a // MsgWithdrawContinuousFund message. type MsgWithdrawContinuousFundResponse struct { - Amount types.Coin `protobuf:"bytes,1,opt,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` } func (m *MsgWithdrawContinuousFundResponse) Reset() { *m = MsgWithdrawContinuousFundResponse{} } @@ -759,13 +759,108 @@ func (m *MsgWithdrawContinuousFundResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgWithdrawContinuousFundResponse proto.InternalMessageInfo -func (m *MsgWithdrawContinuousFundResponse) GetAmount() types.Coin { +func (m *MsgWithdrawContinuousFundResponse) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.Amount } - return types.Coin{} + return nil +} + +// MsgUpdateParams is the Msg/UpdateParams request type. +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/protocolpool parameters to update. + // + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_09efe14517e7f6dc, []int{14} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_09efe14517e7f6dc, []int{15} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) } +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgFundCommunityPool)(nil), "cosmos.protocolpool.v1.MsgFundCommunityPool") proto.RegisterType((*MsgFundCommunityPoolResponse)(nil), "cosmos.protocolpool.v1.MsgFundCommunityPoolResponse") @@ -781,75 +876,83 @@ func init() { proto.RegisterType((*MsgCancelContinuousFundResponse)(nil), "cosmos.protocolpool.v1.MsgCancelContinuousFundResponse") proto.RegisterType((*MsgWithdrawContinuousFund)(nil), "cosmos.protocolpool.v1.MsgWithdrawContinuousFund") proto.RegisterType((*MsgWithdrawContinuousFundResponse)(nil), "cosmos.protocolpool.v1.MsgWithdrawContinuousFundResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "cosmos.protocolpool.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.protocolpool.v1.MsgUpdateParamsResponse") } func init() { proto.RegisterFile("cosmos/protocolpool/v1/tx.proto", fileDescriptor_09efe14517e7f6dc) } var fileDescriptor_09efe14517e7f6dc = []byte{ - // 1006 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0xc4, 0xae, 0x55, 0x4f, 0x21, 0xb4, 0xab, 0xe0, 0x6e, 0x96, 0xe2, 0x4d, 0x7c, 0x80, - 0xa8, 0x22, 0xbb, 0xb8, 0x40, 0x0b, 0xe1, 0x80, 0xea, 0x84, 0x5f, 0x12, 0x96, 0xc2, 0xa6, 0x12, - 0x12, 0x17, 0x6b, 0xbc, 0x3b, 0x5d, 0x8f, 0xba, 0xbb, 0xb3, 0xda, 0x99, 0x4d, 0xe2, 0x4a, 0x48, - 0x15, 0x12, 0xd0, 0x63, 0x8f, 0x1c, 0x7b, 0x42, 0x88, 0x53, 0x0f, 0xfd, 0x23, 0x2a, 0x71, 0xa9, - 0x7a, 0x42, 0x1c, 0x5a, 0x94, 0x20, 0x95, 0xbf, 0x81, 0x13, 0xda, 0x9d, 0xf1, 0xda, 0x8e, 0xd7, - 0x9b, 0xba, 0x4a, 0x38, 0xd9, 0x7e, 0xf3, 0xbe, 0xf7, 0xbe, 0xf7, 0xcd, 0x7b, 0x33, 0x63, 0xa8, - 0xdb, 0x94, 0xf9, 0x94, 0x99, 0x61, 0x44, 0x39, 0xb5, 0xa9, 0x17, 0x52, 0xea, 0x99, 0xbb, 0x2d, - 0x93, 0xef, 0x1b, 0xa9, 0x49, 0xa9, 0x0b, 0x07, 0x63, 0xdc, 0xc1, 0xd8, 0x6d, 0x69, 0x4b, 0x2e, - 0x75, 0x69, 0x6a, 0x34, 0x93, 0x6f, 0x62, 0x5d, 0x6b, 0xc8, 0x70, 0x3d, 0xc4, 0xb0, 0xb9, 0xdb, - 0xea, 0x61, 0x8e, 0x5a, 0xa6, 0x4d, 0x49, 0x20, 0xd7, 0x97, 0xc5, 0x7a, 0x57, 0x00, 0xc7, 0x43, - 0x6b, 0x17, 0x25, 0xd4, 0x67, 0x6e, 0x42, 0xc0, 0x67, 0xae, 0x5c, 0xd0, 0x5d, 0x4a, 0x5d, 0x0f, - 0x0b, 0x8a, 0xbd, 0xf8, 0xa6, 0xc9, 0x89, 0x8f, 0x19, 0x47, 0x7e, 0x38, 0x4c, 0x7a, 0xd4, 0xc1, - 0x89, 0x23, 0xc4, 0x09, 0x95, 0x49, 0x9b, 0xbf, 0x03, 0xb8, 0xd4, 0x61, 0xee, 0x67, 0x71, 0xe0, - 0x6c, 0x52, 0xdf, 0x8f, 0x03, 0xc2, 0x07, 0xdb, 0x94, 0x7a, 0x8a, 0x0d, 0xab, 0xc8, 0xa7, 0x71, - 0xc0, 0x55, 0xb0, 0x52, 0x5e, 0x3b, 0x77, 0x65, 0xd9, 0x90, 0x8c, 0x12, 0xfa, 0x86, 0xa4, 0x6f, - 0x6c, 0x52, 0x12, 0xb4, 0xdf, 0x7d, 0xf4, 0x54, 0x2f, 0xfd, 0xf6, 0x4c, 0x5f, 0x73, 0x09, 0xef, - 0xc7, 0x3d, 0xc3, 0xa6, 0xbe, 0xa4, 0x2f, 0x3f, 0xd6, 0x99, 0x73, 0xcb, 0xe4, 0x83, 0x10, 0xb3, - 0x14, 0xc0, 0x2c, 0x19, 0x5a, 0xb9, 0x0a, 0x6b, 0x0e, 0x0e, 0x29, 0x23, 0x9c, 0x46, 0xea, 0xc2, - 0x0a, 0x58, 0xab, 0xb5, 0xd5, 0x27, 0x0f, 0xd7, 0x97, 0x64, 0xaa, 0xeb, 0x8e, 0x13, 0x61, 0xc6, - 0x76, 0x78, 0x44, 0x02, 0xd7, 0x1a, 0xb9, 0x6e, 0xd4, 0xef, 0xde, 0xd7, 0x4b, 0xff, 0xdc, 0xd7, - 0x4b, 0xdf, 0x3f, 0x7f, 0x70, 0x79, 0x64, 0x6f, 0x36, 0xe0, 0xa5, 0xbc, 0x62, 0x2c, 0xcc, 0x42, - 0x1a, 0x30, 0xdc, 0x3c, 0x00, 0xf0, 0xf5, 0x0e, 0x73, 0x27, 0x16, 0x77, 0x42, 0x1c, 0x38, 0x09, - 0x13, 0x14, 0xf3, 0x3e, 0x8d, 0x08, 0x1f, 0xa8, 0xe0, 0x38, 0x26, 0x99, 0xab, 0x72, 0x09, 0xd6, - 0x22, 0x6c, 0x93, 0x90, 0xe0, 0x80, 0x8b, 0x0a, 0xac, 0x91, 0x61, 0x4c, 0xc4, 0xf2, 0xa9, 0x89, - 0xb8, 0xb1, 0x98, 0x8a, 0x90, 0x51, 0x6a, 0xea, 0xf0, 0xcd, 0xdc, 0x1a, 0x33, 0x15, 0x7e, 0x2a, - 0xc3, 0x8b, 0x1d, 0xe6, 0xee, 0xc4, 0x3d, 0x9f, 0xf0, 0x76, 0xec, 0xb8, 0x98, 0x6f, 0x47, 0x34, - 0xa4, 0x0c, 0x79, 0x2f, 0xad, 0xc3, 0xa7, 0xf0, 0x42, 0x56, 0x76, 0x17, 0x09, 0xaf, 0x63, 0x77, - 0xf4, 0x7c, 0x06, 0x91, 0x76, 0xe5, 0x73, 0xa8, 0xf4, 0x52, 0x42, 0xdd, 0x10, 0x47, 0x5d, 0x1e, - 0xa1, 0xc0, 0xee, 0x63, 0xb5, 0xbc, 0x02, 0x0a, 0xc5, 0xb3, 0xce, 0x0b, 0xd0, 0x36, 0x8e, 0x6e, - 0x08, 0x88, 0xf2, 0x09, 0x84, 0x8c, 0xa3, 0x88, 0x77, 0x93, 0x81, 0x50, 0x2b, 0x69, 0x00, 0xcd, - 0x10, 0xc3, 0x60, 0x0c, 0x87, 0xc1, 0xb8, 0x31, 0x9c, 0x96, 0x76, 0xe5, 0xde, 0x33, 0x1d, 0x58, - 0xb5, 0x14, 0x93, 0x58, 0x15, 0x0d, 0x9e, 0x95, 0xe9, 0x99, 0x7a, 0x66, 0x05, 0xac, 0x55, 0xac, - 0xec, 0xb7, 0x72, 0x0d, 0x56, 0x43, 0x1c, 0x11, 0xea, 0xa8, 0x55, 0xc9, 0xec, 0x68, 0xe0, 0x2d, - 0x39, 0x65, 0xed, 0xca, 0xcf, 0x49, 0x5c, 0xe9, 0x3e, 0xb5, 0x55, 0xab, 0x50, 0x9f, 0xb1, 0x11, - 0xd9, 0x66, 0x51, 0xb8, 0x98, 0xec, 0xa6, 0x87, 0x88, 0x2f, 0x3c, 0xf2, 0xa5, 0x06, 0xf3, 0x4a, - 0xbd, 0x51, 0x4f, 0xb8, 0x4c, 0x47, 0x6a, 0x7e, 0x07, 0xeb, 0x93, 0x09, 0x87, 0x54, 0x26, 0x8e, - 0x04, 0x70, 0x4a, 0xdd, 0xdc, 0xfc, 0x65, 0x21, 0x6d, 0xce, 0xcd, 0x08, 0x23, 0x8e, 0x37, 0x69, - 0xc0, 0x49, 0x10, 0xd3, 0x98, 0x25, 0x33, 0xfd, 0xd2, 0xcd, 0x79, 0x75, 0x6a, 0x48, 0x8b, 0x70, - 0xa3, 0xf1, 0xfd, 0x1a, 0xc2, 0x10, 0x47, 0x36, 0x0e, 0x38, 0x72, 0x45, 0x17, 0xd6, 0xda, 0xad, - 0xa4, 0xb2, 0x3f, 0x9f, 0xea, 0x6f, 0x08, 0x30, 0x73, 0x6e, 0x19, 0x84, 0x9a, 0x3e, 0xe2, 0x7d, - 0xe3, 0x2b, 0xec, 0x22, 0x7b, 0xb0, 0x85, 0xed, 0x27, 0x0f, 0xd7, 0xa1, 0x8c, 0xbd, 0x85, 0x6d, - 0x6b, 0x2c, 0x88, 0xf2, 0x21, 0xac, 0xe2, 0xfd, 0x90, 0x44, 0x83, 0x17, 0xee, 0x49, 0xe9, 0x3f, - 0xa3, 0x77, 0xf2, 0x74, 0xca, 0x7a, 0xe7, 0x57, 0x20, 0xb4, 0x44, 0x81, 0x8d, 0xbd, 0x13, 0xd2, - 0xf2, 0x64, 0x06, 0x7d, 0xaa, 0x9a, 0xbf, 0x17, 0x44, 0x39, 0x39, 0x54, 0xb3, 0xfe, 0xfb, 0x12, - 0xbe, 0x6a, 0xa7, 0xeb, 0xd8, 0x11, 0x63, 0x0d, 0x8e, 0x95, 0xf0, 0x6c, 0xb2, 0x5b, 0xa9, 0x8c, - 0xaf, 0x0c, 0xa1, 0xe9, 0x74, 0xbf, 0x0d, 0x5f, 0xcb, 0x42, 0xf5, 0x31, 0x71, 0xfb, 0xa2, 0x2f, - 0x2a, 0xd6, 0xe2, 0xd0, 0xfc, 0x45, 0x6a, 0xcd, 0x2f, 0xb7, 0x3c, 0xf7, 0xb9, 0xf6, 0x03, 0x80, - 0xea, 0x1e, 0xe1, 0x7d, 0x27, 0x42, 0x7b, 0x41, 0x17, 0x79, 0x1e, 0xb5, 0x11, 0xc7, 0x4e, 0xf7, - 0x66, 0x1c, 0x38, 0xb2, 0x13, 0x4e, 0x74, 0x9a, 0xea, 0x59, 0xb2, 0xeb, 0xc3, 0x5c, 0x89, 0x94, - 0xcd, 0xdb, 0x70, 0xb9, 0xc3, 0xdc, 0x6f, 0xe4, 0xe2, 0x91, 0x96, 0x38, 0xe5, 0x83, 0xe5, 0x2e, - 0x80, 0xab, 0x33, 0x93, 0xff, 0xaf, 0x87, 0xcc, 0x95, 0x7f, 0xab, 0xb0, 0xdc, 0x61, 0xae, 0xb2, - 0x07, 0x2f, 0x4c, 0xbf, 0x7c, 0xde, 0x31, 0xf2, 0x9f, 0x75, 0x46, 0xde, 0xd3, 0x42, 0x7b, 0x7f, - 0x1e, 0xef, 0xac, 0xca, 0xdb, 0x50, 0xc9, 0x79, 0x84, 0xac, 0x17, 0xc4, 0x9a, 0x76, 0xd7, 0x3e, - 0x98, 0xcb, 0x3d, 0xcb, 0x7d, 0x07, 0xc0, 0xa5, 0xdc, 0xbb, 0xdf, 0x2c, 0x88, 0x97, 0x07, 0xd0, - 0xae, 0xcd, 0x09, 0xc8, 0x28, 0x60, 0x78, 0x6e, 0xfc, 0x46, 0x7b, 0xab, 0xa8, 0x90, 0x91, 0x9f, - 0x66, 0xbc, 0x98, 0xdf, 0x44, 0xa5, 0xb9, 0x17, 0x49, 0x51, 0xa5, 0x79, 0x80, 0xc2, 0x4a, 0x8b, - 0x8e, 0x60, 0xe5, 0x47, 0x00, 0xeb, 0x33, 0xc6, 0xad, 0x55, 0x10, 0x33, 0x1f, 0xa2, 0x7d, 0x34, - 0x37, 0x64, 0x52, 0x8b, 0xbc, 0x8b, 0xa0, 0x50, 0x8b, 0x1c, 0x40, 0xb1, 0x16, 0x05, 0xe7, 0xb7, - 0x76, 0xe6, 0xce, 0xf3, 0x07, 0x97, 0x41, 0xfb, 0xe3, 0x47, 0x07, 0x0d, 0xf0, 0xf8, 0xa0, 0x01, - 0xfe, 0x3a, 0x68, 0x80, 0x7b, 0x87, 0x8d, 0xd2, 0xe3, 0xc3, 0x46, 0xe9, 0x8f, 0xc3, 0x46, 0xe9, - 0xdb, 0xd5, 0x89, 0x3b, 0x75, 0x7f, 0xf2, 0x8f, 0x57, 0x3a, 0xc7, 0xbd, 0x6a, 0x6a, 0x7b, 0xef, - 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0xbb, 0x27, 0x2e, 0x9c, 0x0d, 0x00, 0x00, + // 1095 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1b, 0xc5, + 0x1b, 0xf6, 0xc4, 0xae, 0x7f, 0xcd, 0xa4, 0xbf, 0xa4, 0x5d, 0x82, 0xbb, 0x59, 0x8a, 0x37, 0xf1, + 0x81, 0x46, 0x15, 0xde, 0xad, 0x43, 0x69, 0x20, 0x20, 0xa1, 0x3a, 0xe1, 0x9f, 0x84, 0xa5, 0xb0, + 0x29, 0x42, 0xe2, 0x62, 0x8d, 0x77, 0xa7, 0xeb, 0x51, 0xbd, 0x3b, 0xab, 0x9d, 0xd9, 0x24, 0xae, + 0x54, 0xa9, 0x42, 0x02, 0x7a, 0xec, 0x0d, 0x8e, 0x3d, 0x21, 0xc4, 0xa9, 0x87, 0x7c, 0x88, 0x0a, + 0x2e, 0x55, 0x4f, 0x88, 0x43, 0x8b, 0x12, 0xa4, 0xf2, 0x15, 0xb8, 0xa1, 0xdd, 0x1d, 0xaf, 0xed, + 0x78, 0xbd, 0x89, 0xa3, 0xe4, 0x94, 0xcd, 0x3b, 0xcf, 0xf3, 0xfe, 0x79, 0xe6, 0x7d, 0x67, 0xc6, + 0x50, 0x35, 0x29, 0x73, 0x28, 0xd3, 0x3d, 0x9f, 0x72, 0x6a, 0xd2, 0x8e, 0x47, 0x69, 0x47, 0xdf, + 0xae, 0xe9, 0x7c, 0x57, 0x8b, 0x4c, 0x52, 0x29, 0x06, 0x68, 0x83, 0x00, 0x6d, 0xbb, 0xa6, 0x54, + 0xc6, 0x11, 0xbb, 0x1e, 0x16, 0x68, 0x65, 0xde, 0xa6, 0x36, 0x8d, 0x3e, 0xf5, 0xf0, 0x4b, 0x58, + 0xcb, 0x82, 0xd9, 0x42, 0x0c, 0xeb, 0xdb, 0xb5, 0x16, 0xe6, 0xa8, 0xa6, 0x9b, 0x94, 0xb8, 0x62, + 0x7d, 0x21, 0x5e, 0x6f, 0xc6, 0xc4, 0xc1, 0xf0, 0xca, 0x65, 0x41, 0x75, 0x98, 0x1d, 0xc6, 0x72, + 0x98, 0x2d, 0x16, 0x54, 0x9b, 0x52, 0xbb, 0x83, 0xe3, 0x6c, 0x5a, 0xc1, 0x1d, 0x9d, 0x13, 0x07, + 0x33, 0x8e, 0x1c, 0xaf, 0x17, 0xf4, 0x30, 0xc0, 0x0a, 0x7c, 0xc4, 0x09, 0x15, 0x41, 0x2b, 0xbf, + 0x03, 0x38, 0xdf, 0x60, 0xf6, 0x27, 0x81, 0x6b, 0xad, 0x53, 0xc7, 0x09, 0x5c, 0xc2, 0xbb, 0x9b, + 0x94, 0x76, 0x24, 0x13, 0x16, 0x91, 0x43, 0x03, 0x97, 0xcb, 0x60, 0x31, 0xbf, 0x3c, 0xb3, 0xb2, + 0xa0, 0x89, 0x8c, 0xc2, 0xf4, 0x35, 0x91, 0xbe, 0xb6, 0x4e, 0x89, 0x5b, 0xbf, 0xfe, 0xf4, 0x85, + 0x9a, 0xfb, 0xf5, 0xa5, 0xba, 0x6c, 0x13, 0xde, 0x0e, 0x5a, 0x9a, 0x49, 0x1d, 0x91, 0xbe, 0xf8, + 0x53, 0x65, 0xd6, 0x5d, 0x21, 0x50, 0x48, 0x60, 0x86, 0x70, 0x2d, 0xdd, 0x84, 0xd3, 0x16, 0xf6, + 0x28, 0x23, 0x9c, 0xfa, 0xf2, 0xd4, 0x22, 0x58, 0x9e, 0xae, 0xcb, 0xcf, 0xf7, 0xaa, 0xf3, 0x22, + 0xd4, 0x2d, 0xcb, 0xf2, 0x31, 0x63, 0x5b, 0xdc, 0x27, 0xae, 0x6d, 0xf4, 0xa1, 0x6b, 0xa5, 0x87, + 0x8f, 0xd5, 0xdc, 0x3f, 0x8f, 0xd5, 0xdc, 0xb7, 0xaf, 0x9e, 0x5c, 0xeb, 0xdb, 0x2b, 0x65, 0x78, + 0x25, 0xad, 0x18, 0x03, 0x33, 0x8f, 0xba, 0x0c, 0x57, 0xf6, 0x01, 0x7c, 0xbd, 0xc1, 0xec, 0xa1, + 0xc5, 0x2d, 0x0f, 0xbb, 0x56, 0x98, 0x09, 0x0a, 0x78, 0x9b, 0xfa, 0x84, 0x77, 0x65, 0x70, 0x54, + 0x26, 0x09, 0x54, 0xba, 0x02, 0xa7, 0x7d, 0x6c, 0x12, 0x8f, 0x60, 0x97, 0xc7, 0x15, 0x18, 0x7d, + 0xc3, 0x80, 0x88, 0xf9, 0x33, 0x13, 0x71, 0x6d, 0x36, 0x12, 0x21, 0x49, 0xa9, 0xa2, 0xc2, 0x37, + 0x53, 0x6b, 0x4c, 0x54, 0xf8, 0x21, 0x0f, 0x2f, 0x37, 0x98, 0xbd, 0x15, 0xb4, 0x1c, 0xc2, 0xeb, + 0x81, 0x65, 0x63, 0xbe, 0xe9, 0x53, 0x8f, 0x32, 0xd4, 0x39, 0xb1, 0x0e, 0x1f, 0xc3, 0x4b, 0x49, + 0xd9, 0x4d, 0x14, 0xa3, 0x8e, 0xdc, 0xd1, 0x8b, 0x09, 0x45, 0xd8, 0xa5, 0x4f, 0xa1, 0xd4, 0x8a, + 0x12, 0x6a, 0x7a, 0xd8, 0x6f, 0x72, 0x1f, 0xb9, 0x66, 0x1b, 0xcb, 0xf9, 0x45, 0x90, 0x29, 0x9e, + 0x71, 0x31, 0x26, 0x6d, 0x62, 0xff, 0x76, 0x4c, 0x91, 0x3e, 0x82, 0x90, 0x71, 0xe4, 0xf3, 0x66, + 0x38, 0x10, 0x72, 0x21, 0x72, 0xa0, 0x68, 0xf1, 0x30, 0x68, 0xbd, 0x61, 0xd0, 0x6e, 0xf7, 0xa6, + 0xa5, 0x5e, 0x78, 0xf4, 0x52, 0x05, 0xc6, 0x74, 0xc4, 0x09, 0xad, 0x92, 0x02, 0xcf, 0x8b, 0xf0, + 0x4c, 0x3e, 0xb7, 0x08, 0x96, 0x0b, 0x46, 0xf2, 0xbf, 0xb4, 0x0a, 0x8b, 0x1e, 0xf6, 0x09, 0xb5, + 0xe4, 0xa2, 0xc8, 0xec, 0xb0, 0xe3, 0x0d, 0x31, 0x65, 0xf5, 0xc2, 0x4f, 0xa1, 0x5f, 0x01, 0x1f, + 0xd9, 0xaa, 0x25, 0xa8, 0x8e, 0xd9, 0x88, 0x64, 0xb3, 0x28, 0x9c, 0x0d, 0x77, 0xb3, 0x83, 0x88, + 0x13, 0x23, 0xd2, 0xa5, 0x06, 0x93, 0x4a, 0xbd, 0x56, 0x0a, 0x73, 0x19, 0xf5, 0x54, 0xb9, 0x0f, + 0x4b, 0xc3, 0x01, 0x7b, 0xa9, 0x0c, 0x1d, 0x09, 0xe0, 0x8c, 0xba, 0xb9, 0xf2, 0xf3, 0x54, 0xd4, + 0x9c, 0xeb, 0x3e, 0x46, 0x1c, 0xaf, 0x53, 0x97, 0x13, 0x37, 0xa0, 0x01, 0x0b, 0x67, 0xfa, 0xc4, + 0xcd, 0x79, 0x73, 0x64, 0x48, 0xb3, 0x78, 0xfd, 0xf1, 0xfd, 0x12, 0x42, 0x0f, 0xfb, 0x26, 0x76, + 0x39, 0xb2, 0xe3, 0x2e, 0x9c, 0xae, 0xd7, 0xc2, 0xca, 0xfe, 0x7c, 0xa1, 0xbe, 0x11, 0x93, 0x99, + 0x75, 0x57, 0x23, 0x54, 0x77, 0x10, 0x6f, 0x6b, 0x5f, 0x60, 0x1b, 0x99, 0xdd, 0x0d, 0x6c, 0x3e, + 0xdf, 0xab, 0x42, 0xe1, 0x7b, 0x03, 0x9b, 0xc6, 0x80, 0x13, 0xe9, 0x3d, 0x58, 0xc4, 0xbb, 0x1e, + 0xf1, 0xbb, 0xc7, 0xee, 0x49, 0x81, 0x1f, 0xd3, 0x3b, 0x69, 0x3a, 0x25, 0xbd, 0xf3, 0x0b, 0x88, + 0xb5, 0x44, 0xae, 0x89, 0x3b, 0xa7, 0xa4, 0xe5, 0xe9, 0x0c, 0xfa, 0x48, 0x35, 0x7f, 0x4f, 0xc5, + 0xe5, 0xa4, 0xa4, 0x9a, 0xf4, 0xdf, 0xe7, 0xf0, 0xff, 0x66, 0xb4, 0x8e, 0xad, 0x78, 0xac, 0xc1, + 0x91, 0x12, 0x9e, 0x0f, 0x77, 0x2b, 0x92, 0xf1, 0x42, 0x8f, 0x1a, 0x4d, 0xf7, 0x55, 0x38, 0x97, + 0xb8, 0x6a, 0x63, 0x62, 0xb7, 0xe3, 0xbe, 0x28, 0x18, 0xb3, 0x3d, 0xf3, 0x67, 0x91, 0x35, 0xbd, + 0xdc, 0xfc, 0xc4, 0xe7, 0xda, 0x77, 0x00, 0xca, 0x3b, 0x84, 0xb7, 0x2d, 0x1f, 0xed, 0xb8, 0x4d, + 0xd4, 0xe9, 0x50, 0x13, 0x71, 0x6c, 0x35, 0xef, 0x04, 0xae, 0x25, 0x17, 0x4e, 0xff, 0x6e, 0x28, + 0x25, 0xc1, 0x6e, 0xf5, 0x62, 0x85, 0x52, 0x56, 0xee, 0xc1, 0x85, 0x06, 0xb3, 0xbf, 0x16, 0x8b, + 0x87, 0x5a, 0xe2, 0x8c, 0x0f, 0x96, 0x87, 0x00, 0x2e, 0x8d, 0x0d, 0x9e, 0x7a, 0xc8, 0x9c, 0xd5, + 0x95, 0x59, 0xf9, 0x11, 0xc0, 0xb9, 0x06, 0xb3, 0xbf, 0xf2, 0x2c, 0xc4, 0xf1, 0x26, 0xf2, 0x91, + 0xc3, 0x4e, 0x3c, 0x10, 0x1f, 0xc2, 0xa2, 0x17, 0x79, 0x88, 0x3a, 0x68, 0x66, 0xa5, 0xac, 0xa5, + 0xbf, 0x1c, 0xb5, 0x38, 0x4e, 0xbd, 0x10, 0x66, 0x6d, 0x08, 0xce, 0xc8, 0x1c, 0x2c, 0x44, 0x13, + 0x3b, 0x98, 0x58, 0x4f, 0x99, 0x95, 0x7f, 0xff, 0x07, 0xf3, 0x0d, 0x66, 0x4b, 0x3b, 0xf0, 0xd2, + 0xe8, 0x73, 0xed, 0xed, 0x71, 0x51, 0xd3, 0xde, 0x43, 0xca, 0x8d, 0x49, 0xd0, 0xc9, 0xd6, 0xdc, + 0x83, 0x52, 0xca, 0xcb, 0xa9, 0x9a, 0xe1, 0x6b, 0x14, 0xae, 0xbc, 0x3b, 0x11, 0x3c, 0x89, 0xfd, + 0x00, 0xc0, 0xf9, 0xd4, 0x07, 0x8b, 0x9e, 0xe1, 0x2f, 0x8d, 0xa0, 0xac, 0x4e, 0x48, 0x48, 0x52, + 0xc0, 0x70, 0x66, 0xf0, 0x1a, 0x7e, 0x2b, 0xab, 0x90, 0x3e, 0x4e, 0xd1, 0x8e, 0x87, 0x1b, 0xaa, + 0x34, 0xf5, 0xf6, 0xcb, 0xaa, 0x34, 0x8d, 0x90, 0x59, 0x69, 0xd6, 0xbd, 0x21, 0x7d, 0x0f, 0x60, + 0x69, 0xcc, 0x19, 0x51, 0xcb, 0xf0, 0x99, 0x4e, 0x51, 0xde, 0x9f, 0x98, 0x32, 0xac, 0x45, 0xda, + 0xed, 0x95, 0xa9, 0x45, 0x0a, 0x21, 0x5b, 0x8b, 0xac, 0x4b, 0xe7, 0x3e, 0xbc, 0x30, 0x74, 0x4c, + 0x5c, 0xcd, 0x70, 0x34, 0x08, 0x54, 0xf4, 0x63, 0x02, 0x93, 0xdb, 0xfa, 0xb5, 0xdf, 0xf6, 0xaa, + 0x73, 0xfd, 0x83, 0x6b, 0xf1, 0xba, 0x76, 0x63, 0x55, 0x39, 0xf7, 0xe0, 0xd5, 0x93, 0x6b, 0xa0, + 0xfe, 0xc1, 0xd3, 0xfd, 0x32, 0x78, 0xb6, 0x5f, 0x06, 0x7f, 0xed, 0x97, 0xc1, 0xa3, 0x83, 0x72, + 0xee, 0xd9, 0x41, 0x39, 0xf7, 0xc7, 0x41, 0x39, 0xf7, 0xcd, 0xd2, 0xd0, 0x3b, 0x64, 0x77, 0xf8, + 0x77, 0x69, 0x74, 0xf6, 0xb5, 0x8a, 0x91, 0xed, 0x9d, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x45, + 0x30, 0x80, 0xf1, 0xf4, 0x0e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -882,6 +985,9 @@ type MsgClient interface { WithdrawContinuousFund(ctx context.Context, in *MsgWithdrawContinuousFund, opts ...grpc.CallOption) (*MsgWithdrawContinuousFundResponse, error) // CancelContinuousFund defines a method for cancelling continuous fund. CancelContinuousFund(ctx context.Context, in *MsgCancelContinuousFund, opts ...grpc.CallOption) (*MsgCancelContinuousFundResponse, error) + // UpdateParams defines a governance operation for updating the x/protocolpool module parameters. + // The authority is defined in the keeper. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } type msgClient struct { @@ -955,6 +1061,15 @@ func (c *msgClient) CancelContinuousFund(ctx context.Context, in *MsgCancelConti return out, nil } +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/cosmos.protocolpool.v1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // FundCommunityPool defines a method to allow an account to directly @@ -975,6 +1090,9 @@ type MsgServer interface { WithdrawContinuousFund(context.Context, *MsgWithdrawContinuousFund) (*MsgWithdrawContinuousFundResponse, error) // CancelContinuousFund defines a method for cancelling continuous fund. CancelContinuousFund(context.Context, *MsgCancelContinuousFund) (*MsgCancelContinuousFundResponse, error) + // UpdateParams defines a governance operation for updating the x/protocolpool module parameters. + // The authority is defined in the keeper. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1002,6 +1120,9 @@ func (*UnimplementedMsgServer) WithdrawContinuousFund(ctx context.Context, req * func (*UnimplementedMsgServer) CancelContinuousFund(ctx context.Context, req *MsgCancelContinuousFund) (*MsgCancelContinuousFundResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelContinuousFund not implemented") } +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1133,6 +1254,24 @@ func _Msg_CancelContinuousFund_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.protocolpool.v1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.protocolpool.v1.Msg", @@ -1166,6 +1305,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "CancelContinuousFund", Handler: _Msg_CancelContinuousFund_Handler, }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/protocolpool/v1/tx.proto", @@ -1609,16 +1752,20 @@ func (m *MsgCancelContinuousFundResponse) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l - { - size, err := m.WithdrawnAllocatedFund.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.WithdrawnAllocatedFund) > 0 { + for iNdEx := len(m.WithdrawnAllocatedFund) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.WithdrawnAllocatedFund[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x22 if len(m.RecipientAddress) > 0 { i -= len(m.RecipientAddress) copy(dAtA[i:], m.RecipientAddress) @@ -1631,12 +1778,12 @@ func (m *MsgCancelContinuousFundResponse) MarshalToSizedBuffer(dAtA []byte) (int i-- dAtA[i] = 0x10 } - n7, err7 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CanceledTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CanceledTime):]) - if err7 != nil { - return 0, err7 + n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CanceledTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CanceledTime):]) + if err6 != nil { + return 0, err6 } - i -= n7 - i = encodeVarintTx(dAtA, i, uint64(n7)) + i -= n6 + i = encodeVarintTx(dAtA, i, uint64(n6)) i-- dAtA[i] = 0xa return len(dAtA) - i, nil @@ -1688,12 +1835,49 @@ func (m *MsgWithdrawContinuousFundResponse) MarshalTo(dAtA []byte) (int, error) } func (m *MsgWithdrawContinuousFundResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1701,7 +1885,37 @@ func (m *MsgWithdrawContinuousFundResponse) MarshalToSizedBuffer(dAtA []byte) (i i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l return len(dAtA) - i, nil } @@ -1905,8 +2119,12 @@ func (m *MsgCancelContinuousFundResponse) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.WithdrawnAllocatedFund.Size() - n += 1 + l + sovTx(uint64(l)) + if len(m.WithdrawnAllocatedFund) > 0 { + for _, e := range m.WithdrawnAllocatedFund { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } return n } @@ -1929,11 +2147,39 @@ func (m *MsgWithdrawContinuousFundResponse) Size() (n int) { } var l int _ = l - l = m.Amount.Size() + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() n += 1 + l + sovTx(uint64(l)) return n } +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3250,7 +3496,8 @@ func (m *MsgCancelContinuousFundResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.WithdrawnAllocatedFund.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.WithdrawnAllocatedFund = append(m.WithdrawnAllocatedFund, types.Coin{}) + if err := m.WithdrawnAllocatedFund[len(m.WithdrawnAllocatedFund)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3415,7 +3662,123 @@ func (m *MsgWithdrawContinuousFundResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3440,6 +3803,56 @@ func (m *MsgWithdrawContinuousFundResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/protocolpool/types/types.pb.go b/x/protocolpool/types/types.pb.go index a5780df1d27b..dca787bf26c9 100644 --- a/x/protocolpool/types/types.pb.go +++ b/x/protocolpool/types/types.pb.go @@ -7,7 +7,9 @@ import ( cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" @@ -182,9 +184,103 @@ func (m *ContinuousFund) GetExpiry() *time.Time { return nil } +// DistributionAmount is used to store the coins of periodic distributions. +type DistributionAmount struct { + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *DistributionAmount) Reset() { *m = DistributionAmount{} } +func (m *DistributionAmount) String() string { return proto.CompactTextString(m) } +func (*DistributionAmount) ProtoMessage() {} +func (*DistributionAmount) Descriptor() ([]byte, []int) { + return fileDescriptor_c1b7d0ea246d7f44, []int{2} +} +func (m *DistributionAmount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DistributionAmount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DistributionAmount.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DistributionAmount) XXX_Merge(src proto.Message) { + xxx_messageInfo_DistributionAmount.Merge(m, src) +} +func (m *DistributionAmount) XXX_Size() int { + return m.Size() +} +func (m *DistributionAmount) XXX_DiscardUnknown() { + xxx_messageInfo_DistributionAmount.DiscardUnknown(m) +} + +var xxx_messageInfo_DistributionAmount proto.InternalMessageInfo + +func (m *DistributionAmount) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Amount + } + return nil +} + +// Params defines the parameters for the protocolpool module. +type Params struct { + // enabled_distribution_denoms lists the denoms that are allowed to be distributed. + // This is to avoid spending time distributing undesired tokens to continuous funds and budgets. + EnabledDistributionDenoms []string `protobuf:"bytes,1,rep,name=enabled_distribution_denoms,json=enabledDistributionDenoms,proto3" json:"enabled_distribution_denoms,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_c1b7d0ea246d7f44, []int{3} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetEnabledDistributionDenoms() []string { + if m != nil { + return m.EnabledDistributionDenoms + } + return nil +} + func init() { proto.RegisterType((*Budget)(nil), "cosmos.protocolpool.v1.Budget") proto.RegisterType((*ContinuousFund)(nil), "cosmos.protocolpool.v1.ContinuousFund") + proto.RegisterType((*DistributionAmount)(nil), "cosmos.protocolpool.v1.DistributionAmount") + proto.RegisterType((*Params)(nil), "cosmos.protocolpool.v1.Params") } func init() { @@ -192,39 +288,47 @@ func init() { } var fileDescriptor_c1b7d0ea246d7f44 = []byte{ - // 502 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x3d, 0x6f, 0xd3, 0x40, - 0x18, 0x8e, 0x69, 0x88, 0x94, 0x83, 0x94, 0x72, 0xaa, 0x90, 0x1b, 0x24, 0x27, 0x84, 0x25, 0x4b, - 0xcf, 0x0a, 0x48, 0x80, 0xc4, 0x42, 0x9d, 0xf0, 0x31, 0x74, 0x80, 0xd0, 0x89, 0xc5, 0x3a, 0xdb, - 0x6f, 0xdc, 0x13, 0xf6, 0x9d, 0x75, 0x77, 0x8e, 0x9a, 0x95, 0x5f, 0xd0, 0x91, 0x1f, 0xd2, 0x1f, - 0xd1, 0xb1, 0xaa, 0x84, 0x84, 0x18, 0x0a, 0x4a, 0xfe, 0x08, 0x8a, 0xef, 0x12, 0xd2, 0x2e, 0x65, - 0xb3, 0xde, 0xe7, 0xc3, 0xcf, 0xf3, 0x9e, 0x5e, 0xd4, 0x8b, 0x85, 0xca, 0x85, 0xf2, 0x0b, 0x29, - 0xb4, 0x88, 0x45, 0x56, 0x08, 0x91, 0xf9, 0xd3, 0x81, 0xaf, 0x67, 0x05, 0x28, 0x52, 0x4d, 0xf1, - 0x23, 0xc3, 0x21, 0x9b, 0x1c, 0x32, 0x1d, 0xb4, 0x77, 0x53, 0x91, 0x8a, 0x6a, 0xe8, 0x2f, 0xbf, - 0x0c, 0xde, 0xde, 0x33, 0xec, 0xd0, 0x00, 0x9b, 0xd2, 0xb6, 0x67, 0x7f, 0x16, 0x51, 0x05, 0xfe, - 0x74, 0x10, 0x81, 0xa6, 0x03, 0x3f, 0x16, 0x8c, 0x5b, 0xbc, 0x93, 0x0a, 0x91, 0x66, 0x60, 0xc2, - 0x44, 0xe5, 0xc4, 0xd7, 0x2c, 0x07, 0xa5, 0x69, 0x5e, 0xac, 0x0c, 0x6e, 0x12, 0x92, 0x52, 0x52, - 0xcd, 0x84, 0x35, 0xe8, 0x7d, 0xdb, 0x42, 0x8d, 0xa0, 0x4c, 0x52, 0xd0, 0xf8, 0x2d, 0x7a, 0x28, - 0x21, 0x66, 0x05, 0x03, 0xae, 0x43, 0x9a, 0x24, 0x12, 0x94, 0x72, 0x9d, 0xae, 0xd3, 0x6f, 0x06, - 0xee, 0xe5, 0xd9, 0xfe, 0xae, 0x0d, 0x76, 0x60, 0x90, 0xcf, 0x5a, 0x32, 0x9e, 0x8e, 0x77, 0xd6, - 0x12, 0x3b, 0xc7, 0x6f, 0xd0, 0x76, 0x9c, 0x51, 0x96, 0x43, 0x12, 0xd2, 0x5c, 0x94, 0x5c, 0xbb, - 0x77, 0xba, 0x4e, 0xff, 0xde, 0xb3, 0x3d, 0x62, 0x0d, 0x96, 0x5d, 0x88, 0xed, 0x42, 0x86, 0x82, - 0xf1, 0x71, 0xcb, 0x0a, 0x0e, 0x2a, 0x3e, 0xfe, 0x80, 0x1e, 0x64, 0x54, 0xe9, 0x70, 0x6d, 0xa3, - 0xdd, 0xad, 0xca, 0xa2, 0x4d, 0x4c, 0x1b, 0xb2, 0x6a, 0x43, 0x8e, 0x56, 0x75, 0x83, 0xfa, 0xe9, - 0xef, 0x8e, 0x33, 0x6e, 0x2d, 0x85, 0x43, 0xeb, 0xa6, 0xf1, 0x53, 0xd4, 0xd2, 0x92, 0xf2, 0xf8, - 0x18, 0x54, 0x98, 0xc1, 0x44, 0xbb, 0xf5, 0xae, 0xd3, 0xaf, 0x8f, 0xef, 0xaf, 0x86, 0x87, 0x30, - 0xd1, 0xf8, 0x3d, 0xc2, 0x51, 0xb5, 0x81, 0xb0, 0x00, 0x19, 0x5a, 0xc8, 0xbd, 0x7b, 0x5b, 0xe8, - 0x1d, 0x23, 0xfa, 0x08, 0xf2, 0xc8, 0x48, 0xf0, 0x4b, 0xd4, 0x28, 0x40, 0x32, 0x91, 0xb8, 0x0d, - 0x2b, 0xbe, 0x19, 0x77, 0x64, 0x97, 0x1f, 0xd4, 0xbf, 0x2f, 0xd3, 0x5a, 0x7a, 0xef, 0x87, 0x83, - 0xb6, 0x87, 0x82, 0x6b, 0xc6, 0x4b, 0x51, 0xaa, 0x77, 0x25, 0x4f, 0xf0, 0x0b, 0xd4, 0x5c, 0x6f, - 0xf6, 0xd6, 0x47, 0xf8, 0x47, 0xc5, 0x9f, 0x10, 0x2a, 0x40, 0xc6, 0xc0, 0x35, 0x4d, 0xa1, 0xda, - 0x7c, 0x33, 0x18, 0x9c, 0x5f, 0x75, 0x6a, 0xbf, 0xae, 0x3a, 0x8f, 0x8d, 0x58, 0x25, 0x5f, 0x09, - 0x13, 0x7e, 0x4e, 0xf5, 0x31, 0x39, 0x84, 0x94, 0xc6, 0xb3, 0x11, 0xc4, 0x97, 0x67, 0xfb, 0xc8, - 0x7a, 0x8f, 0x20, 0x1e, 0x6f, 0x98, 0xe0, 0x57, 0xa8, 0x01, 0x27, 0x05, 0x93, 0xb3, 0xff, 0x7e, - 0x05, 0xcb, 0x0f, 0x5e, 0x9f, 0xcf, 0x3d, 0xe7, 0x62, 0xee, 0x39, 0x7f, 0xe6, 0x9e, 0x73, 0xba, - 0xf0, 0x6a, 0x17, 0x0b, 0xaf, 0xf6, 0x73, 0xe1, 0xd5, 0xbe, 0x3c, 0xb9, 0x16, 0xe5, 0xe4, 0xfa, - 0x31, 0x55, 0x97, 0x14, 0x35, 0xaa, 0xd9, 0xf3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x86, 0x82, - 0x01, 0x87, 0x70, 0x03, 0x00, 0x00, + // 627 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x41, 0x4b, 0xdc, 0x4c, + 0x18, 0xde, 0x7c, 0xee, 0x17, 0xd8, 0xf9, 0xd4, 0x4f, 0x07, 0x29, 0x71, 0x85, 0xec, 0x76, 0x7b, + 0x59, 0x04, 0x13, 0xb6, 0x85, 0xb6, 0x50, 0x28, 0x35, 0x6e, 0xad, 0x07, 0x0f, 0x36, 0xf5, 0xd4, + 0x4b, 0x98, 0x24, 0xaf, 0x71, 0x30, 0x99, 0x09, 0x33, 0x13, 0x71, 0xaf, 0xfd, 0x03, 0xf5, 0x58, + 0xfa, 0x0b, 0x4a, 0x4f, 0x1e, 0xfc, 0x11, 0x1e, 0x45, 0x28, 0x94, 0x1e, 0xb4, 0xe8, 0xc1, 0xbf, + 0x51, 0x92, 0xcc, 0xda, 0xd5, 0x43, 0xed, 0x65, 0x37, 0xbc, 0xef, 0xf3, 0x3c, 0xf3, 0x3c, 0xef, + 0x9b, 0x09, 0xea, 0x45, 0x5c, 0x66, 0x5c, 0xba, 0xb9, 0xe0, 0x8a, 0x47, 0x3c, 0xcd, 0x39, 0x4f, + 0xdd, 0xfd, 0x81, 0xab, 0x46, 0x39, 0x48, 0xa7, 0xaa, 0xe2, 0x07, 0x35, 0xc6, 0x99, 0xc4, 0x38, + 0xfb, 0x83, 0xf6, 0x42, 0xc2, 0x13, 0x5e, 0x15, 0xdd, 0xf2, 0xa9, 0xee, 0xb7, 0x17, 0x6b, 0x74, + 0x50, 0x37, 0x26, 0xa9, 0x6d, 0x5b, 0x1f, 0x16, 0x12, 0x09, 0xee, 0xfe, 0x20, 0x04, 0x45, 0x06, + 0x6e, 0xc4, 0x29, 0xd3, 0xfd, 0x4e, 0xc2, 0x79, 0x92, 0x42, 0x6d, 0x26, 0x2c, 0x76, 0x5c, 0x45, + 0x33, 0x90, 0x8a, 0x64, 0xf9, 0x58, 0xe0, 0x2e, 0x20, 0x2e, 0x04, 0x51, 0x94, 0x8f, 0x05, 0xe6, + 0x49, 0x46, 0x19, 0x77, 0xab, 0xdf, 0xba, 0xd4, 0xfb, 0x30, 0x85, 0x4c, 0xaf, 0x88, 0x13, 0x50, + 0xf8, 0x35, 0x9a, 0x17, 0x10, 0xd1, 0x9c, 0x02, 0x53, 0x01, 0x89, 0x63, 0x01, 0x52, 0x5a, 0x46, + 0xd7, 0xe8, 0xb7, 0x3c, 0xeb, 0xec, 0x78, 0x65, 0x41, 0x7b, 0x5d, 0xad, 0x3b, 0xef, 0x94, 0xa0, + 0x2c, 0xf1, 0xe7, 0x6e, 0x28, 0xba, 0x8e, 0x5f, 0xa1, 0xd9, 0x28, 0x25, 0x34, 0x83, 0x38, 0x20, + 0x19, 0x2f, 0x98, 0xb2, 0xfe, 0xe9, 0x1a, 0xfd, 0xff, 0x1e, 0x2f, 0x3a, 0x5a, 0xa0, 0x8c, 0xe7, + 0xe8, 0x78, 0xce, 0x1a, 0xa7, 0xcc, 0x9f, 0xd1, 0x84, 0xd5, 0x0a, 0x8f, 0x37, 0xd0, 0xff, 0x29, + 0x91, 0x2a, 0xb8, 0x91, 0x51, 0xd6, 0x54, 0x25, 0xd1, 0x76, 0xea, 0x80, 0xce, 0x38, 0xa0, 0xb3, + 0x3d, 0x9e, 0x80, 0xd7, 0x3c, 0xbc, 0xe8, 0x18, 0xfe, 0x4c, 0x49, 0x5c, 0xd3, 0x6a, 0x0a, 0x3f, + 0x42, 0x33, 0x4a, 0x10, 0x16, 0xed, 0x82, 0x0c, 0x52, 0xd8, 0x51, 0x56, 0xb3, 0x6b, 0xf4, 0x9b, + 0xfe, 0xf4, 0xb8, 0xb8, 0x09, 0x3b, 0x0a, 0xbf, 0x41, 0x38, 0xac, 0x26, 0x10, 0xe4, 0x20, 0x02, + 0xdd, 0xb2, 0xfe, 0xbd, 0xcf, 0xf4, 0x5c, 0x4d, 0xda, 0x02, 0xb1, 0x5d, 0x53, 0xf0, 0x33, 0x64, + 0xe6, 0x20, 0x28, 0x8f, 0x2d, 0x53, 0x93, 0xef, 0xda, 0x1d, 0xea, 0x7d, 0x78, 0xcd, 0x4f, 0xa5, + 0x5b, 0x0d, 0xef, 0x7d, 0x33, 0xd0, 0xec, 0x1a, 0x67, 0x8a, 0xb2, 0x82, 0x17, 0x72, 0xbd, 0x60, + 0x31, 0x7e, 0x8a, 0x5a, 0x37, 0x93, 0xbd, 0x77, 0x09, 0xbf, 0xa1, 0xf8, 0x2d, 0x42, 0x39, 0x88, + 0x08, 0x98, 0x22, 0x09, 0x54, 0x93, 0x6f, 0x79, 0x83, 0x93, 0xf3, 0x4e, 0xe3, 0xc7, 0x79, 0x67, + 0xa9, 0x26, 0xcb, 0x78, 0xcf, 0xa1, 0xdc, 0xcd, 0x88, 0xda, 0x75, 0x36, 0x21, 0x21, 0xd1, 0x68, + 0x08, 0xd1, 0xd9, 0xf1, 0x0a, 0xd2, 0xda, 0x43, 0x88, 0xfc, 0x09, 0x11, 0xfc, 0x1c, 0x99, 0x70, + 0x90, 0x53, 0x31, 0xfa, 0xeb, 0x2d, 0x68, 0x7c, 0xef, 0xa3, 0x81, 0xf0, 0x90, 0x4a, 0x25, 0x68, + 0x58, 0x94, 0xb1, 0xf5, 0x7e, 0x47, 0xc8, 0xd4, 0x6f, 0x86, 0xd1, 0x9d, 0xfa, 0xe3, 0x90, 0xbd, + 0xf5, 0xd2, 0xfa, 0xd7, 0x8b, 0x4e, 0x3f, 0xa1, 0x6a, 0xb7, 0x08, 0x9d, 0x88, 0x67, 0xfa, 0xce, + 0xe8, 0xbf, 0x15, 0x19, 0xef, 0xe9, 0xdb, 0x58, 0x12, 0xe4, 0xe7, 0xeb, 0xa3, 0xe5, 0xe9, 0xb4, + 0x4a, 0x15, 0x94, 0x57, 0x47, 0x7e, 0xb9, 0x3e, 0x5a, 0x36, 0x7c, 0x7d, 0x60, 0x6f, 0x03, 0x99, + 0x5b, 0x44, 0x90, 0x4c, 0xe2, 0x97, 0x68, 0x09, 0x18, 0x09, 0x53, 0x88, 0x83, 0x78, 0xc2, 0x62, + 0x10, 0x03, 0xe3, 0x99, 0xac, 0x9c, 0xb5, 0xfc, 0x45, 0x0d, 0x99, 0x0c, 0x31, 0xac, 0x00, 0xde, + 0x8b, 0x93, 0x4b, 0xdb, 0x38, 0xbd, 0xb4, 0x8d, 0x9f, 0x97, 0xb6, 0x71, 0x78, 0x65, 0x37, 0x4e, + 0xaf, 0xec, 0xc6, 0xf7, 0x2b, 0xbb, 0xf1, 0xfe, 0xe1, 0xad, 0x31, 0x1f, 0xdc, 0xfe, 0x76, 0x54, + 0x56, 0x43, 0xb3, 0xaa, 0x3d, 0xf9, 0x15, 0x00, 0x00, 0xff, 0xff, 0x20, 0xd5, 0xf7, 0x00, 0x5f, + 0x04, 0x00, 0x00, } func (m *Budget) Marshal() (dAtA []byte, err error) { @@ -356,6 +460,75 @@ func (m *ContinuousFund) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *DistributionAmount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DistributionAmount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DistributionAmount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.EnabledDistributionDenoms) > 0 { + for iNdEx := len(m.EnabledDistributionDenoms) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.EnabledDistributionDenoms[iNdEx]) + copy(dAtA[i:], m.EnabledDistributionDenoms[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.EnabledDistributionDenoms[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { offset -= sovTypes(v) base := offset @@ -418,6 +591,36 @@ func (m *ContinuousFund) Size() (n int) { return n } +func (m *DistributionAmount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.EnabledDistributionDenoms) > 0 { + for _, s := range m.EnabledDistributionDenoms { + l = len(s) + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -821,6 +1024,172 @@ func (m *ContinuousFund) Unmarshal(dAtA []byte) error { } return nil } +func (m *DistributionAmount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DistributionAmount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DistributionAmount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EnabledDistributionDenoms", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EnabledDistributionDenoms = append(m.EnabledDistributionDenoms, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0