From abe5a02403845ac73f36ac8af9ce0b28bb38afcf Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 12 Oct 2023 14:10:06 +0530 Subject: [PATCH 01/69] add proto file --- proto/cosmos/protocolpool/v1/budget.proto | 47 +++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 proto/cosmos/protocolpool/v1/budget.proto diff --git a/proto/cosmos/protocolpool/v1/budget.proto b/proto/cosmos/protocolpool/v1/budget.proto new file mode 100644 index 000000000000..0f13f1bd750a --- /dev/null +++ b/proto/cosmos/protocolpool/v1/budget.proto @@ -0,0 +1,47 @@ +// Since: cosmos-sdk 0.50 +syntax = "proto3"; +package cosmos.protocolpool.v1; + +option go_package = "cosmossdk.io/x/protocolpool/types"; + +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; + +// Budget defines budget proposal type. +// +// Since: cosmos-sdk 0.50 +message BudgetProposal { + string recipient_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + cosmos.base.v1beta1.Coin total_budget = 2; + int64 start_time = 3; + int64 remaining_tranches = 4; + int64 period = 5; +} + +// MsgSubmitBudgetProposal defines a message for setting the budget proposal. +// +// Since: cosmos-sdk 0.50 +message MsgSubmitBudgetProposal { + BudgetProposal proposal = 1; + string signer = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];; +} + +// MsgSubmitBudgetProposalResponse defines the response to executing a +// MsgSubmitBudgetProposal message. +// +// Since: cosmos-sdk 0.50 +message MsgSubmitBudgetProposalResponse {} + +message MsgClaimBudget { + option (cosmos.msg.v1.signer) = "recipient_address"; + uint64 proposal_id = 1; + string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +message MsgClaimBudgetResponse { + cosmos.base.v1beta1.Coin amount = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ];; +} \ No newline at end of file From 628c4ba3ef6ae6ad5cbb7f2b69cb27e7e8b343f4 Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Thu, 12 Oct 2023 08:59:38 +0000 Subject: [PATCH 02/69] add proto-gen files --- api/cosmos/protocolpool/v1/budget.pulsar.go | 2851 +++++++++++++++++++ proto/cosmos/protocolpool/v1/budget.proto | 17 +- x/protocolpool/types/budget.pb.go | 1243 ++++++++ 3 files changed, 4103 insertions(+), 8 deletions(-) create mode 100644 api/cosmos/protocolpool/v1/budget.pulsar.go create mode 100644 x/protocolpool/types/budget.pb.go diff --git a/api/cosmos/protocolpool/v1/budget.pulsar.go b/api/cosmos/protocolpool/v1/budget.pulsar.go new file mode 100644 index 000000000000..312cee535cc5 --- /dev/null +++ b/api/cosmos/protocolpool/v1/budget.pulsar.go @@ -0,0 +1,2851 @@ +// 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" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_BudgetProposal protoreflect.MessageDescriptor + fd_BudgetProposal_recipient_address protoreflect.FieldDescriptor + fd_BudgetProposal_total_budget protoreflect.FieldDescriptor + fd_BudgetProposal_start_time protoreflect.FieldDescriptor + fd_BudgetProposal_remaining_tranches protoreflect.FieldDescriptor + fd_BudgetProposal_period protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_budget_proto_init() + md_BudgetProposal = File_cosmos_protocolpool_v1_budget_proto.Messages().ByName("BudgetProposal") + fd_BudgetProposal_recipient_address = md_BudgetProposal.Fields().ByName("recipient_address") + fd_BudgetProposal_total_budget = md_BudgetProposal.Fields().ByName("total_budget") + fd_BudgetProposal_start_time = md_BudgetProposal.Fields().ByName("start_time") + fd_BudgetProposal_remaining_tranches = md_BudgetProposal.Fields().ByName("remaining_tranches") + fd_BudgetProposal_period = md_BudgetProposal.Fields().ByName("period") +} + +var _ protoreflect.Message = (*fastReflection_BudgetProposal)(nil) + +type fastReflection_BudgetProposal BudgetProposal + +func (x *BudgetProposal) ProtoReflect() protoreflect.Message { + return (*fastReflection_BudgetProposal)(x) +} + +func (x *BudgetProposal) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_v1_budget_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_BudgetProposal_messageType fastReflection_BudgetProposal_messageType +var _ protoreflect.MessageType = fastReflection_BudgetProposal_messageType{} + +type fastReflection_BudgetProposal_messageType struct{} + +func (x fastReflection_BudgetProposal_messageType) Zero() protoreflect.Message { + return (*fastReflection_BudgetProposal)(nil) +} +func (x fastReflection_BudgetProposal_messageType) New() protoreflect.Message { + return new(fastReflection_BudgetProposal) +} +func (x fastReflection_BudgetProposal_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_BudgetProposal +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_BudgetProposal) Descriptor() protoreflect.MessageDescriptor { + return md_BudgetProposal +} + +// 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_BudgetProposal) Type() protoreflect.MessageType { + return _fastReflection_BudgetProposal_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_BudgetProposal) New() protoreflect.Message { + return new(fastReflection_BudgetProposal) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_BudgetProposal) Interface() protoreflect.ProtoMessage { + return (*BudgetProposal)(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_BudgetProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.RecipientAddress != "" { + value := protoreflect.ValueOfString(x.RecipientAddress) + if !f(fd_BudgetProposal_recipient_address, value) { + return + } + } + if x.TotalBudget != nil { + value := protoreflect.ValueOfMessage(x.TotalBudget.ProtoReflect()) + if !f(fd_BudgetProposal_total_budget, value) { + return + } + } + if x.StartTime != int64(0) { + value := protoreflect.ValueOfInt64(x.StartTime) + if !f(fd_BudgetProposal_start_time, value) { + return + } + } + if x.RemainingTranches != int64(0) { + value := protoreflect.ValueOfInt64(x.RemainingTranches) + if !f(fd_BudgetProposal_remaining_tranches, value) { + return + } + } + if x.Period != int64(0) { + value := protoreflect.ValueOfInt64(x.Period) + if !f(fd_BudgetProposal_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_BudgetProposal) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.BudgetProposal.recipient_address": + return x.RecipientAddress != "" + case "cosmos.protocolpool.v1.BudgetProposal.total_budget": + return x.TotalBudget != nil + case "cosmos.protocolpool.v1.BudgetProposal.start_time": + return x.StartTime != int64(0) + case "cosmos.protocolpool.v1.BudgetProposal.remaining_tranches": + return x.RemainingTranches != int64(0) + case "cosmos.protocolpool.v1.BudgetProposal.period": + return x.Period != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.BudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.BudgetProposal 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_BudgetProposal) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.BudgetProposal.recipient_address": + x.RecipientAddress = "" + case "cosmos.protocolpool.v1.BudgetProposal.total_budget": + x.TotalBudget = nil + case "cosmos.protocolpool.v1.BudgetProposal.start_time": + x.StartTime = int64(0) + case "cosmos.protocolpool.v1.BudgetProposal.remaining_tranches": + x.RemainingTranches = int64(0) + case "cosmos.protocolpool.v1.BudgetProposal.period": + x.Period = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.BudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.BudgetProposal 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_BudgetProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.BudgetProposal.recipient_address": + value := x.RecipientAddress + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.BudgetProposal.total_budget": + value := x.TotalBudget + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.BudgetProposal.start_time": + value := x.StartTime + return protoreflect.ValueOfInt64(value) + case "cosmos.protocolpool.v1.BudgetProposal.remaining_tranches": + value := x.RemainingTranches + return protoreflect.ValueOfInt64(value) + case "cosmos.protocolpool.v1.BudgetProposal.period": + value := x.Period + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.BudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.BudgetProposal 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_BudgetProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.BudgetProposal.recipient_address": + x.RecipientAddress = value.Interface().(string) + case "cosmos.protocolpool.v1.BudgetProposal.total_budget": + x.TotalBudget = value.Message().Interface().(*v1beta1.Coin) + case "cosmos.protocolpool.v1.BudgetProposal.start_time": + x.StartTime = value.Int() + case "cosmos.protocolpool.v1.BudgetProposal.remaining_tranches": + x.RemainingTranches = value.Int() + case "cosmos.protocolpool.v1.BudgetProposal.period": + x.Period = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.BudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.BudgetProposal 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_BudgetProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.BudgetProposal.total_budget": + if x.TotalBudget == nil { + x.TotalBudget = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.TotalBudget.ProtoReflect()) + case "cosmos.protocolpool.v1.BudgetProposal.recipient_address": + panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.BudgetProposal is not mutable")) + case "cosmos.protocolpool.v1.BudgetProposal.start_time": + panic(fmt.Errorf("field start_time of message cosmos.protocolpool.v1.BudgetProposal is not mutable")) + case "cosmos.protocolpool.v1.BudgetProposal.remaining_tranches": + panic(fmt.Errorf("field remaining_tranches of message cosmos.protocolpool.v1.BudgetProposal is not mutable")) + case "cosmos.protocolpool.v1.BudgetProposal.period": + panic(fmt.Errorf("field period of message cosmos.protocolpool.v1.BudgetProposal is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.BudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.BudgetProposal 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_BudgetProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.BudgetProposal.recipient_address": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.BudgetProposal.total_budget": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.BudgetProposal.start_time": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.protocolpool.v1.BudgetProposal.remaining_tranches": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.protocolpool.v1.BudgetProposal.period": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.BudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.BudgetProposal 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_BudgetProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.BudgetProposal", 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_BudgetProposal) 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_BudgetProposal) 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_BudgetProposal) 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_BudgetProposal) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*BudgetProposal) + 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.TotalBudget != nil { + l = options.Size(x.TotalBudget) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.StartTime != 0 { + n += 1 + runtime.Sov(uint64(x.StartTime)) + } + if x.RemainingTranches != 0 { + n += 1 + runtime.Sov(uint64(x.RemainingTranches)) + } + if x.Period != 0 { + n += 1 + runtime.Sov(uint64(x.Period)) + } + 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().(*BudgetProposal) + 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 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) + i-- + dAtA[i] = 0x28 + } + if x.RemainingTranches != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.RemainingTranches)) + i-- + dAtA[i] = 0x20 + } + if x.StartTime != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.StartTime)) + i-- + dAtA[i] = 0x18 + } + if x.TotalBudget != nil { + encoded, err := options.Marshal(x.TotalBudget) + 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().(*BudgetProposal) + 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: BudgetProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BudgetProposal: 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 TotalBudget", 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.TotalBudget == nil { + x.TotalBudget = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalBudget); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + x.StartTime = 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.StartTime |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RemainingTranches", wireType) + } + x.RemainingTranches = 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.RemainingTranches |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + x.Period = 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.Period |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgSubmitBudgetProposal protoreflect.MessageDescriptor + fd_MsgSubmitBudgetProposal_proposal protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_signer protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_budget_proto_init() + md_MsgSubmitBudgetProposal = File_cosmos_protocolpool_v1_budget_proto.Messages().ByName("MsgSubmitBudgetProposal") + fd_MsgSubmitBudgetProposal_proposal = md_MsgSubmitBudgetProposal.Fields().ByName("proposal") + fd_MsgSubmitBudgetProposal_signer = md_MsgSubmitBudgetProposal.Fields().ByName("signer") +} + +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_budget_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_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.Proposal != nil { + value := protoreflect.ValueOfMessage(x.Proposal.ProtoReflect()) + if !f(fd_MsgSubmitBudgetProposal_proposal, value) { + return + } + } + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgSubmitBudgetProposal_signer, 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.proposal": + return x.Proposal != nil + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.signer": + return x.Signer != "" + 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.proposal": + x.Proposal = nil + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.signer": + x.Signer = "" + 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.proposal": + value := x.Proposal + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + 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.proposal": + x.Proposal = value.Message().Interface().(*BudgetProposal) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.signer": + x.Signer = value.Interface().(string) + 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.proposal": + if x.Proposal == nil { + x.Proposal = new(BudgetProposal) + } + return protoreflect.ValueOfMessage(x.Proposal.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.signer": + panic(fmt.Errorf("field signer 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.proposal": + m := new(BudgetProposal) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.signer": + return protoreflect.ValueOfString("") + 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 + if x.Proposal != nil { + l = options.Size(x.Proposal) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Signer) + 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().(*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 len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0x12 + } + if x.Proposal != nil { + encoded, err := options.Marshal(x.Proposal) + 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().(*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 Proposal", 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.Proposal == nil { + x.Proposal = &BudgetProposal{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proposal); 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 Signer", 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.Signer = 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_MsgSubmitBudgetProposalResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_budget_proto_init() + md_MsgSubmitBudgetProposalResponse = File_cosmos_protocolpool_v1_budget_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_budget_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_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_proposal_id protoreflect.FieldDescriptor + fd_MsgClaimBudget_recipient_address protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_budget_proto_init() + md_MsgClaimBudget = File_cosmos_protocolpool_v1_budget_proto.Messages().ByName("MsgClaimBudget") + fd_MsgClaimBudget_proposal_id = md_MsgClaimBudget.Fields().ByName("proposal_id") + 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_budget_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_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.ProposalId != uint64(0) { + value := protoreflect.ValueOfUint64(x.ProposalId) + if !f(fd_MsgClaimBudget_proposal_id, value) { + return + } + } + 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.proposal_id": + return x.ProposalId != uint64(0) + 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.proposal_id": + x.ProposalId = uint64(0) + 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.proposal_id": + value := x.ProposalId + return protoreflect.ValueOfUint64(value) + 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.proposal_id": + x.ProposalId = value.Uint() + 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.proposal_id": + panic(fmt.Errorf("field proposal_id of message cosmos.protocolpool.v1.MsgClaimBudget is not mutable")) + 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.proposal_id": + return protoreflect.ValueOfUint64(uint64(0)) + 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 + if x.ProposalId != 0 { + n += 1 + runtime.Sov(uint64(x.ProposalId)) + } + 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] = 0x12 + } + if x.ProposalId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*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 != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + x.ProposalId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 ( + md_MsgClaimBudgetResponse protoreflect.MessageDescriptor + fd_MsgClaimBudgetResponse_amount protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_budget_proto_init() + md_MsgClaimBudgetResponse = File_cosmos_protocolpool_v1_budget_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_budget_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_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, + } +} + +// Since: cosmos-sdk 0.50 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/protocolpool/v1/budget.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 budget proposal type. +// +// Since: cosmos-sdk 0.50 +type BudgetProposal 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"` + TotalBudget *v1beta1.Coin `protobuf:"bytes,2,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` + StartTime int64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + RemainingTranches int64 `protobuf:"varint,4,opt,name=remaining_tranches,json=remainingTranches,proto3" json:"remaining_tranches,omitempty"` + Period int64 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"` +} + +func (x *BudgetProposal) Reset() { + *x = BudgetProposal{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_budget_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BudgetProposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BudgetProposal) ProtoMessage() {} + +// Deprecated: Use BudgetProposal.ProtoReflect.Descriptor instead. +func (*BudgetProposal) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_budget_proto_rawDescGZIP(), []int{0} +} + +func (x *BudgetProposal) GetRecipientAddress() string { + if x != nil { + return x.RecipientAddress + } + return "" +} + +func (x *BudgetProposal) GetTotalBudget() *v1beta1.Coin { + if x != nil { + return x.TotalBudget + } + return nil +} + +func (x *BudgetProposal) GetStartTime() int64 { + if x != nil { + return x.StartTime + } + return 0 +} + +func (x *BudgetProposal) GetRemainingTranches() int64 { + if x != nil { + return x.RemainingTranches + } + return 0 +} + +func (x *BudgetProposal) GetPeriod() int64 { + if x != nil { + return x.Period + } + return 0 +} + +// MsgSubmitBudgetProposal defines a message for setting the budget proposal. +// +// Since: cosmos-sdk 0.50 +type MsgSubmitBudgetProposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Proposal *BudgetProposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` + Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (x *MsgSubmitBudgetProposal) Reset() { + *x = MsgSubmitBudgetProposal{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_budget_proto_msgTypes[1] + 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_budget_proto_rawDescGZIP(), []int{1} +} + +func (x *MsgSubmitBudgetProposal) GetProposal() *BudgetProposal { + if x != nil { + return x.Proposal + } + return nil +} + +func (x *MsgSubmitBudgetProposal) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +// MsgSubmitBudgetProposalResponse defines the response to executing a +// MsgSubmitBudgetProposal message. +// +// Since: cosmos-sdk 0.50 +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_budget_proto_msgTypes[2] + 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_budget_proto_rawDescGZIP(), []int{2} +} + +type MsgClaimBudget struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + RecipientAddress string `protobuf:"bytes,2,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_budget_proto_msgTypes[3] + 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_budget_proto_rawDescGZIP(), []int{3} +} + +func (x *MsgClaimBudget) GetProposalId() uint64 { + if x != nil { + return x.ProposalId + } + return 0 +} + +func (x *MsgClaimBudget) GetRecipientAddress() string { + if x != nil { + return x.RecipientAddress + } + return "" +} + +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_budget_proto_msgTypes[4] + 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_budget_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgClaimBudgetResponse) GetAmount() *v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +var File_cosmos_protocolpool_v1_budget_proto protoreflect.FileDescriptor + +var file_cosmos_protocolpool_v1_budget_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 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, 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, 0x22, 0xfb, 0x01, 0x0a, 0x0e, 0x42, 0x75, 0x64, 0x67, + 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 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, 0x3c, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, + 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, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, + 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2d, + 0x0a, 0x12, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x72, 0x61, 0x6e, + 0x63, 0x68, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x61, + 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x8f, 0x01, 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, 0x42, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x01, 0x20, + 0x01, 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, 0x42, 0x75, 0x64, + 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 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, 0x90, 0x01, 0x0a, 0x0e, 0x4d, + 0x73, 0x67, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 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, 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, 0x42, 0xdb, 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, 0x0b, 0x42, 0x75, 0x64, + 0x67, 0x65, 0x74, 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_budget_proto_rawDescOnce sync.Once + file_cosmos_protocolpool_v1_budget_proto_rawDescData = file_cosmos_protocolpool_v1_budget_proto_rawDesc +) + +func file_cosmos_protocolpool_v1_budget_proto_rawDescGZIP() []byte { + file_cosmos_protocolpool_v1_budget_proto_rawDescOnce.Do(func() { + file_cosmos_protocolpool_v1_budget_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_protocolpool_v1_budget_proto_rawDescData) + }) + return file_cosmos_protocolpool_v1_budget_proto_rawDescData +} + +var file_cosmos_protocolpool_v1_budget_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_cosmos_protocolpool_v1_budget_proto_goTypes = []interface{}{ + (*BudgetProposal)(nil), // 0: cosmos.protocolpool.v1.BudgetProposal + (*MsgSubmitBudgetProposal)(nil), // 1: cosmos.protocolpool.v1.MsgSubmitBudgetProposal + (*MsgSubmitBudgetProposalResponse)(nil), // 2: cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse + (*MsgClaimBudget)(nil), // 3: cosmos.protocolpool.v1.MsgClaimBudget + (*MsgClaimBudgetResponse)(nil), // 4: cosmos.protocolpool.v1.MsgClaimBudgetResponse + (*v1beta1.Coin)(nil), // 5: cosmos.base.v1beta1.Coin +} +var file_cosmos_protocolpool_v1_budget_proto_depIdxs = []int32{ + 5, // 0: cosmos.protocolpool.v1.BudgetProposal.total_budget:type_name -> cosmos.base.v1beta1.Coin + 0, // 1: cosmos.protocolpool.v1.MsgSubmitBudgetProposal.proposal:type_name -> cosmos.protocolpool.v1.BudgetProposal + 5, // 2: cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount:type_name -> cosmos.base.v1beta1.Coin + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_cosmos_protocolpool_v1_budget_proto_init() } +func file_cosmos_protocolpool_v1_budget_proto_init() { + if File_cosmos_protocolpool_v1_budget_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_protocolpool_v1_budget_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BudgetProposal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_budget_proto_msgTypes[1].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_budget_proto_msgTypes[2].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_budget_proto_msgTypes[3].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_budget_proto_msgTypes[4].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 + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cosmos_protocolpool_v1_budget_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_protocolpool_v1_budget_proto_goTypes, + DependencyIndexes: file_cosmos_protocolpool_v1_budget_proto_depIdxs, + MessageInfos: file_cosmos_protocolpool_v1_budget_proto_msgTypes, + }.Build() + File_cosmos_protocolpool_v1_budget_proto = out.File + file_cosmos_protocolpool_v1_budget_proto_rawDesc = nil + file_cosmos_protocolpool_v1_budget_proto_goTypes = nil + file_cosmos_protocolpool_v1_budget_proto_depIdxs = nil +} diff --git a/proto/cosmos/protocolpool/v1/budget.proto b/proto/cosmos/protocolpool/v1/budget.proto index 0f13f1bd750a..cf109edf7925 100644 --- a/proto/cosmos/protocolpool/v1/budget.proto +++ b/proto/cosmos/protocolpool/v1/budget.proto @@ -4,8 +4,10 @@ package cosmos.protocolpool.v1; option go_package = "cosmossdk.io/x/protocolpool/types"; +import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; // Budget defines budget proposal type. // @@ -23,7 +25,8 @@ message BudgetProposal { // Since: cosmos-sdk 0.50 message MsgSubmitBudgetProposal { BudgetProposal proposal = 1; - string signer = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];; + string signer = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + ; } // MsgSubmitBudgetProposalResponse defines the response to executing a @@ -34,14 +37,12 @@ message MsgSubmitBudgetProposalResponse {} message MsgClaimBudget { option (cosmos.msg.v1.signer) = "recipient_address"; - uint64 proposal_id = 1; - string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + uint64 proposal_id = 1; + string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } message MsgClaimBudgetResponse { - cosmos.base.v1beta1.Coin amount = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ];; + cosmos.base.v1beta1.Coin amount = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + ; } \ No newline at end of file diff --git a/x/protocolpool/types/budget.pb.go b/x/protocolpool/types/budget.pb.go new file mode 100644 index 000000000000..3890a8c9e839 --- /dev/null +++ b/x/protocolpool/types/budget.pb.go @@ -0,0 +1,1243 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/protocolpool/v1/budget.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Budget defines budget proposal type. +// +// Since: cosmos-sdk 0.50 +type BudgetProposal struct { + RecipientAddress string `protobuf:"bytes,1,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` + TotalBudget *types.Coin `protobuf:"bytes,2,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` + StartTime int64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + RemainingTranches int64 `protobuf:"varint,4,opt,name=remaining_tranches,json=remainingTranches,proto3" json:"remaining_tranches,omitempty"` + Period int64 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"` +} + +func (m *BudgetProposal) Reset() { *m = BudgetProposal{} } +func (m *BudgetProposal) String() string { return proto.CompactTextString(m) } +func (*BudgetProposal) ProtoMessage() {} +func (*BudgetProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_2414eab590ecb8a3, []int{0} +} +func (m *BudgetProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BudgetProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BudgetProposal.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 *BudgetProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_BudgetProposal.Merge(m, src) +} +func (m *BudgetProposal) XXX_Size() int { + return m.Size() +} +func (m *BudgetProposal) XXX_DiscardUnknown() { + xxx_messageInfo_BudgetProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_BudgetProposal proto.InternalMessageInfo + +func (m *BudgetProposal) GetRecipientAddress() string { + if m != nil { + return m.RecipientAddress + } + return "" +} + +func (m *BudgetProposal) GetTotalBudget() *types.Coin { + if m != nil { + return m.TotalBudget + } + return nil +} + +func (m *BudgetProposal) GetStartTime() int64 { + if m != nil { + return m.StartTime + } + return 0 +} + +func (m *BudgetProposal) GetRemainingTranches() int64 { + if m != nil { + return m.RemainingTranches + } + return 0 +} + +func (m *BudgetProposal) GetPeriod() int64 { + if m != nil { + return m.Period + } + return 0 +} + +// MsgSubmitBudgetProposal defines a message for setting the budget proposal. +// +// Since: cosmos-sdk 0.50 +type MsgSubmitBudgetProposal struct { + Proposal *BudgetProposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` + Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (m *MsgSubmitBudgetProposal) Reset() { *m = MsgSubmitBudgetProposal{} } +func (m *MsgSubmitBudgetProposal) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitBudgetProposal) ProtoMessage() {} +func (*MsgSubmitBudgetProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_2414eab590ecb8a3, []int{1} +} +func (m *MsgSubmitBudgetProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubmitBudgetProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubmitBudgetProposal.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 *MsgSubmitBudgetProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitBudgetProposal.Merge(m, src) +} +func (m *MsgSubmitBudgetProposal) XXX_Size() int { + return m.Size() +} +func (m *MsgSubmitBudgetProposal) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitBudgetProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubmitBudgetProposal proto.InternalMessageInfo + +func (m *MsgSubmitBudgetProposal) GetProposal() *BudgetProposal { + if m != nil { + return m.Proposal + } + return nil +} + +func (m *MsgSubmitBudgetProposal) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +// MsgSubmitBudgetProposalResponse defines the response to executing a +// MsgSubmitBudgetProposal message. +// +// Since: cosmos-sdk 0.50 +type MsgSubmitBudgetProposalResponse struct { +} + +func (m *MsgSubmitBudgetProposalResponse) Reset() { *m = MsgSubmitBudgetProposalResponse{} } +func (m *MsgSubmitBudgetProposalResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitBudgetProposalResponse) ProtoMessage() {} +func (*MsgSubmitBudgetProposalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2414eab590ecb8a3, []int{2} +} +func (m *MsgSubmitBudgetProposalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubmitBudgetProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubmitBudgetProposalResponse.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 *MsgSubmitBudgetProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitBudgetProposalResponse.Merge(m, src) +} +func (m *MsgSubmitBudgetProposalResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSubmitBudgetProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitBudgetProposalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubmitBudgetProposalResponse proto.InternalMessageInfo + +type MsgClaimBudget struct { + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` +} + +func (m *MsgClaimBudget) Reset() { *m = MsgClaimBudget{} } +func (m *MsgClaimBudget) String() string { return proto.CompactTextString(m) } +func (*MsgClaimBudget) ProtoMessage() {} +func (*MsgClaimBudget) Descriptor() ([]byte, []int) { + return fileDescriptor_2414eab590ecb8a3, []int{3} +} +func (m *MsgClaimBudget) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClaimBudget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClaimBudget.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 *MsgClaimBudget) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimBudget.Merge(m, src) +} +func (m *MsgClaimBudget) XXX_Size() int { + return m.Size() +} +func (m *MsgClaimBudget) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimBudget.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClaimBudget proto.InternalMessageInfo + +func (m *MsgClaimBudget) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +func (m *MsgClaimBudget) GetRecipientAddress() string { + if m != nil { + return m.RecipientAddress + } + return "" +} + +type MsgClaimBudgetResponse struct { + Amount types.Coin `protobuf:"bytes,1,opt,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *MsgClaimBudgetResponse) Reset() { *m = MsgClaimBudgetResponse{} } +func (m *MsgClaimBudgetResponse) String() string { return proto.CompactTextString(m) } +func (*MsgClaimBudgetResponse) ProtoMessage() {} +func (*MsgClaimBudgetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2414eab590ecb8a3, []int{4} +} +func (m *MsgClaimBudgetResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClaimBudgetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClaimBudgetResponse.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 *MsgClaimBudgetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimBudgetResponse.Merge(m, src) +} +func (m *MsgClaimBudgetResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgClaimBudgetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimBudgetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClaimBudgetResponse proto.InternalMessageInfo + +func (m *MsgClaimBudgetResponse) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +func init() { + proto.RegisterType((*BudgetProposal)(nil), "cosmos.protocolpool.v1.BudgetProposal") + proto.RegisterType((*MsgSubmitBudgetProposal)(nil), "cosmos.protocolpool.v1.MsgSubmitBudgetProposal") + proto.RegisterType((*MsgSubmitBudgetProposalResponse)(nil), "cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse") + proto.RegisterType((*MsgClaimBudget)(nil), "cosmos.protocolpool.v1.MsgClaimBudget") + proto.RegisterType((*MsgClaimBudgetResponse)(nil), "cosmos.protocolpool.v1.MsgClaimBudgetResponse") +} + +func init() { + proto.RegisterFile("cosmos/protocolpool/v1/budget.proto", fileDescriptor_2414eab590ecb8a3) +} + +var fileDescriptor_2414eab590ecb8a3 = []byte{ + // 511 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xcf, 0x6e, 0xd3, 0x30, + 0x18, 0xaf, 0xb7, 0x51, 0x31, 0x17, 0x4d, 0x2c, 0x9a, 0xba, 0xac, 0x12, 0x69, 0x17, 0x24, 0x54, + 0x21, 0xd5, 0x59, 0xc7, 0x0d, 0xb8, 0x90, 0x89, 0x03, 0x87, 0x49, 0x28, 0xdb, 0x89, 0x4b, 0xe4, + 0x24, 0x96, 0x67, 0x2d, 0xb6, 0x23, 0xdb, 0xad, 0xe0, 0xc0, 0x85, 0x17, 0x60, 0xcf, 0xc1, 0x89, + 0x03, 0x0f, 0xb1, 0xe3, 0xc4, 0x89, 0x13, 0xa0, 0xf6, 0xc0, 0x43, 0x70, 0x41, 0x75, 0xdc, 0x6a, + 0x85, 0x15, 0x69, 0xa7, 0x38, 0xdf, 0xef, 0x4f, 0x7e, 0xdf, 0xf7, 0xc5, 0xf0, 0x61, 0x2e, 0x35, + 0x97, 0x3a, 0xaa, 0x94, 0x34, 0x32, 0x97, 0x65, 0x25, 0x65, 0x19, 0x8d, 0x87, 0x51, 0x36, 0x2a, + 0x28, 0x31, 0xc8, 0x96, 0xbd, 0x76, 0x4d, 0x42, 0xd7, 0x49, 0x68, 0x3c, 0xec, 0xec, 0x50, 0x49, + 0xa5, 0x2d, 0x46, 0xb3, 0x53, 0x8d, 0x77, 0x02, 0x67, 0x99, 0x61, 0x4d, 0xa2, 0xf1, 0x30, 0x23, + 0x06, 0x0f, 0xa3, 0x5c, 0x32, 0xe1, 0xf0, 0xbd, 0x1a, 0x4f, 0x6b, 0xe1, 0x75, 0xeb, 0xce, 0xae, + 0x93, 0x72, 0x4d, 0x67, 0x21, 0xb8, 0xa6, 0x35, 0x10, 0xfe, 0x06, 0x70, 0x2b, 0xb6, 0x91, 0x5e, + 0x2b, 0x59, 0x49, 0x8d, 0x4b, 0xef, 0x25, 0xdc, 0x56, 0x24, 0x67, 0x15, 0x23, 0xc2, 0xa4, 0xb8, + 0x28, 0x14, 0xd1, 0xda, 0x07, 0x3d, 0xd0, 0xdf, 0x8c, 0xfd, 0xaf, 0x5f, 0x06, 0x3b, 0xce, 0xf8, + 0x45, 0x8d, 0x9c, 0x18, 0xc5, 0x04, 0x4d, 0xee, 0x2f, 0x24, 0xae, 0xee, 0x3d, 0x87, 0xf7, 0x8c, + 0x34, 0xb8, 0x4c, 0xeb, 0x8e, 0xfd, 0xb5, 0x1e, 0xe8, 0xb7, 0x0e, 0xf7, 0x90, 0x93, 0xcf, 0x9a, + 0x40, 0xae, 0x09, 0x74, 0x24, 0x99, 0x48, 0x5a, 0x96, 0x5e, 0x87, 0xf1, 0x1e, 0x40, 0xa8, 0x0d, + 0x56, 0x26, 0x35, 0x8c, 0x13, 0x7f, 0xbd, 0x07, 0xfa, 0xeb, 0xc9, 0xa6, 0xad, 0x9c, 0x32, 0x4e, + 0xbc, 0x01, 0xf4, 0x14, 0xe1, 0x98, 0x09, 0x26, 0x68, 0x6a, 0x14, 0x16, 0xf9, 0x19, 0xd1, 0xfe, + 0x86, 0xa5, 0x6d, 0x2f, 0x90, 0x53, 0x07, 0x78, 0x6d, 0xd8, 0xac, 0x88, 0x62, 0xb2, 0xf0, 0xef, + 0x58, 0x8a, 0x7b, 0x0b, 0x3f, 0x02, 0xb8, 0x7b, 0xac, 0xe9, 0xc9, 0x28, 0xe3, 0xcc, 0xfc, 0x35, + 0x86, 0x18, 0xde, 0xad, 0xdc, 0xd9, 0x76, 0xdf, 0x3a, 0x7c, 0x84, 0x6e, 0x5e, 0x17, 0x5a, 0x56, + 0x26, 0x0b, 0x9d, 0x77, 0x00, 0x9b, 0x9a, 0x51, 0x41, 0x94, 0xed, 0xfe, 0x7f, 0xf3, 0x73, 0xbc, + 0x70, 0x1f, 0x76, 0x57, 0x04, 0x4a, 0x88, 0xae, 0xa4, 0xd0, 0x24, 0xbc, 0x00, 0x70, 0xeb, 0x58, + 0xd3, 0xa3, 0x12, 0x33, 0xee, 0xa6, 0xd5, 0x85, 0xad, 0xf9, 0x37, 0x53, 0x56, 0xd8, 0xb8, 0x1b, + 0x09, 0x9c, 0x97, 0x5e, 0x15, 0x37, 0xef, 0x74, 0xed, 0xb6, 0x3b, 0x7d, 0xda, 0xfe, 0xf0, 0xeb, + 0xf3, 0xe3, 0x7f, 0x9d, 0xc2, 0xf7, 0xb0, 0xbd, 0x9c, 0x68, 0x1e, 0xd6, 0xcb, 0x61, 0x13, 0x73, + 0x39, 0x12, 0xc6, 0xcd, 0x70, 0xf5, 0xfe, 0xe3, 0x83, 0xcb, 0xef, 0xdd, 0xc6, 0xa7, 0x1f, 0xdd, + 0x3e, 0x65, 0xe6, 0x6c, 0x94, 0xa1, 0x5c, 0x72, 0xf7, 0x13, 0xbb, 0xc7, 0x40, 0x17, 0xe7, 0x91, + 0x79, 0x57, 0x11, 0x6d, 0x05, 0x3a, 0x71, 0xd6, 0xf1, 0xb3, 0xcb, 0x49, 0x00, 0xae, 0x26, 0x01, + 0xf8, 0x39, 0x09, 0xc0, 0xc5, 0x34, 0x68, 0x5c, 0x4d, 0x83, 0xc6, 0xb7, 0x69, 0xd0, 0x78, 0xb3, + 0x5f, 0x2b, 0x75, 0x71, 0x8e, 0x98, 0x8c, 0xde, 0x2e, 0xdf, 0x46, 0x6b, 0x95, 0x35, 0x6d, 0xed, + 0xc9, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6c, 0x64, 0x40, 0x36, 0xb1, 0x03, 0x00, 0x00, +} + +func (m *BudgetProposal) 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 *BudgetProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BudgetProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Period != 0 { + i = encodeVarintBudget(dAtA, i, uint64(m.Period)) + i-- + dAtA[i] = 0x28 + } + if m.RemainingTranches != 0 { + i = encodeVarintBudget(dAtA, i, uint64(m.RemainingTranches)) + i-- + dAtA[i] = 0x20 + } + if m.StartTime != 0 { + i = encodeVarintBudget(dAtA, i, uint64(m.StartTime)) + i-- + dAtA[i] = 0x18 + } + if m.TotalBudget != nil { + { + size, err := m.TotalBudget.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBudget(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.RecipientAddress) > 0 { + i -= len(m.RecipientAddress) + copy(dAtA[i:], m.RecipientAddress) + i = encodeVarintBudget(dAtA, i, uint64(len(m.RecipientAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSubmitBudgetProposal) 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 *MsgSubmitBudgetProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubmitBudgetProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintBudget(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0x12 + } + if m.Proposal != nil { + { + size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBudget(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSubmitBudgetProposalResponse) 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 *MsgSubmitBudgetProposalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubmitBudgetProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgClaimBudget) 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 *MsgClaimBudget) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClaimBudget) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RecipientAddress) > 0 { + i -= len(m.RecipientAddress) + copy(dAtA[i:], m.RecipientAddress) + i = encodeVarintBudget(dAtA, i, uint64(len(m.RecipientAddress))) + i-- + dAtA[i] = 0x12 + } + if m.ProposalId != 0 { + i = encodeVarintBudget(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgClaimBudgetResponse) 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 *MsgClaimBudgetResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClaimBudgetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBudget(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintBudget(dAtA []byte, offset int, v uint64) int { + offset -= sovBudget(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *BudgetProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RecipientAddress) + if l > 0 { + n += 1 + l + sovBudget(uint64(l)) + } + if m.TotalBudget != nil { + l = m.TotalBudget.Size() + n += 1 + l + sovBudget(uint64(l)) + } + if m.StartTime != 0 { + n += 1 + sovBudget(uint64(m.StartTime)) + } + if m.RemainingTranches != 0 { + n += 1 + sovBudget(uint64(m.RemainingTranches)) + } + if m.Period != 0 { + n += 1 + sovBudget(uint64(m.Period)) + } + return n +} + +func (m *MsgSubmitBudgetProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Proposal != nil { + l = m.Proposal.Size() + n += 1 + l + sovBudget(uint64(l)) + } + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovBudget(uint64(l)) + } + return n +} + +func (m *MsgSubmitBudgetProposalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgClaimBudget) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovBudget(uint64(m.ProposalId)) + } + l = len(m.RecipientAddress) + if l > 0 { + n += 1 + l + sovBudget(uint64(l)) + } + return n +} + +func (m *MsgClaimBudgetResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Amount.Size() + n += 1 + l + sovBudget(uint64(l)) + return n +} + +func sovBudget(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozBudget(x uint64) (n int) { + return sovBudget(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *BudgetProposal) 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 ErrIntOverflowBudget + } + 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: BudgetProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BudgetProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecipientAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBudget + } + 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 ErrInvalidLengthBudget + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBudget + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RecipientAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalBudget", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBudget + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBudget + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBudget + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TotalBudget == nil { + m.TotalBudget = &types.Coin{} + } + if err := m.TotalBudget.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + m.StartTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBudget + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StartTime |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RemainingTranches", wireType) + } + m.RemainingTranches = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBudget + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RemainingTranches |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + m.Period = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBudget + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Period |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipBudget(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBudget + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubmitBudgetProposal) 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 ErrIntOverflowBudget + } + 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: MsgSubmitBudgetProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitBudgetProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBudget + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBudget + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBudget + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proposal == nil { + m.Proposal = &BudgetProposal{} + } + if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBudget + } + 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 ErrInvalidLengthBudget + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBudget + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBudget(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBudget + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubmitBudgetProposalResponse) 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 ErrIntOverflowBudget + } + 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: MsgSubmitBudgetProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitBudgetProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipBudget(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBudget + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgClaimBudget) 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 ErrIntOverflowBudget + } + 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: MsgClaimBudget: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgClaimBudget: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + m.ProposalId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBudget + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecipientAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBudget + } + 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 ErrInvalidLengthBudget + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBudget + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RecipientAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBudget(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBudget + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgClaimBudgetResponse) 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 ErrIntOverflowBudget + } + 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: MsgClaimBudgetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgClaimBudgetResponse: 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 ErrIntOverflowBudget + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBudget + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBudget + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBudget(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBudget + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipBudget(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowBudget + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowBudget + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowBudget + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthBudget + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupBudget + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthBudget + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthBudget = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowBudget = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupBudget = fmt.Errorf("proto: unexpected end of group") +) From cbb0e8c36778ade6b7ad827a78f917c2aea13fa4 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 12 Oct 2023 17:08:01 +0530 Subject: [PATCH 03/69] update proto file --- proto/cosmos/protocolpool/v1/budget.proto | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/proto/cosmos/protocolpool/v1/budget.proto b/proto/cosmos/protocolpool/v1/budget.proto index cf109edf7925..232913d25030 100644 --- a/proto/cosmos/protocolpool/v1/budget.proto +++ b/proto/cosmos/protocolpool/v1/budget.proto @@ -20,29 +20,27 @@ message BudgetProposal { int64 period = 5; } -// MsgSubmitBudgetProposal defines a message for setting the budget proposal. +// MsgBudgetProposalResponse defines the response to executing a +// MsgBudgetProposal message. // // Since: cosmos-sdk 0.50 -message MsgSubmitBudgetProposal { - BudgetProposal proposal = 1; - string signer = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - ; -} +message MsgBudgetProposalResponse {} -// MsgSubmitBudgetProposalResponse defines the response to executing a -// MsgSubmitBudgetProposal message. +// MsgClaimBudget defines a message for claiming the distributed budget. // // Since: cosmos-sdk 0.50 -message MsgSubmitBudgetProposalResponse {} - message MsgClaimBudget { option (cosmos.msg.v1.signer) = "recipient_address"; uint64 proposal_id = 1; string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } +// MsgClaimBudgetResponse defines the response to executing a +// MsgClaimBudget message. +// +// Since: cosmos-sdk 0.50 message MsgClaimBudgetResponse { cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; ; -} \ No newline at end of file +} From 7eb944450f6d7c48d8656d9885fe12427589f6fa Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Thu, 12 Oct 2023 12:03:33 +0000 Subject: [PATCH 04/69] run proto-gen --- api/cosmos/protocolpool/v1/budget.pulsar.go | 871 +++----------------- proto/cosmos/protocolpool/v1/budget.proto | 4 +- x/protocolpool/types/budget.pb.go | 389 ++------- 3 files changed, 190 insertions(+), 1074 deletions(-) diff --git a/api/cosmos/protocolpool/v1/budget.pulsar.go b/api/cosmos/protocolpool/v1/budget.pulsar.go index 312cee535cc5..7db0c385b430 100644 --- a/api/cosmos/protocolpool/v1/budget.pulsar.go +++ b/api/cosmos/protocolpool/v1/budget.pulsar.go @@ -660,27 +660,23 @@ func (x *fastReflection_BudgetProposal) ProtoMethods() *protoiface.Methods { } var ( - md_MsgSubmitBudgetProposal protoreflect.MessageDescriptor - fd_MsgSubmitBudgetProposal_proposal protoreflect.FieldDescriptor - fd_MsgSubmitBudgetProposal_signer protoreflect.FieldDescriptor + md_MsgBudgetProposalResponse protoreflect.MessageDescriptor ) func init() { file_cosmos_protocolpool_v1_budget_proto_init() - md_MsgSubmitBudgetProposal = File_cosmos_protocolpool_v1_budget_proto.Messages().ByName("MsgSubmitBudgetProposal") - fd_MsgSubmitBudgetProposal_proposal = md_MsgSubmitBudgetProposal.Fields().ByName("proposal") - fd_MsgSubmitBudgetProposal_signer = md_MsgSubmitBudgetProposal.Fields().ByName("signer") + md_MsgBudgetProposalResponse = File_cosmos_protocolpool_v1_budget_proto.Messages().ByName("MsgBudgetProposalResponse") } -var _ protoreflect.Message = (*fastReflection_MsgSubmitBudgetProposal)(nil) +var _ protoreflect.Message = (*fastReflection_MsgBudgetProposalResponse)(nil) -type fastReflection_MsgSubmitBudgetProposal MsgSubmitBudgetProposal +type fastReflection_MsgBudgetProposalResponse MsgBudgetProposalResponse -func (x *MsgSubmitBudgetProposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitBudgetProposal)(x) +func (x *MsgBudgetProposalResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgBudgetProposalResponse)(x) } -func (x *MsgSubmitBudgetProposal) slowProtoReflect() protoreflect.Message { +func (x *MsgBudgetProposalResponse) slowProtoReflect() protoreflect.Message { mi := &file_cosmos_protocolpool_v1_budget_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -692,43 +688,43 @@ func (x *MsgSubmitBudgetProposal) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgSubmitBudgetProposal_messageType fastReflection_MsgSubmitBudgetProposal_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitBudgetProposal_messageType{} +var _fastReflection_MsgBudgetProposalResponse_messageType fastReflection_MsgBudgetProposalResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgBudgetProposalResponse_messageType{} -type fastReflection_MsgSubmitBudgetProposal_messageType struct{} +type fastReflection_MsgBudgetProposalResponse_messageType struct{} -func (x fastReflection_MsgSubmitBudgetProposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitBudgetProposal)(nil) +func (x fastReflection_MsgBudgetProposalResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgBudgetProposalResponse)(nil) } -func (x fastReflection_MsgSubmitBudgetProposal_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitBudgetProposal) +func (x fastReflection_MsgBudgetProposalResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgBudgetProposalResponse) } -func (x fastReflection_MsgSubmitBudgetProposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitBudgetProposal +func (x fastReflection_MsgBudgetProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBudgetProposalResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgSubmitBudgetProposal) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitBudgetProposal +func (x *fastReflection_MsgBudgetProposalResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBudgetProposalResponse } // 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 +func (x *fastReflection_MsgBudgetProposalResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgBudgetProposalResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitBudgetProposal) New() protoreflect.Message { - return new(fastReflection_MsgSubmitBudgetProposal) +func (x *fastReflection_MsgBudgetProposalResponse) New() protoreflect.Message { + return new(fastReflection_MsgBudgetProposalResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitBudgetProposal) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitBudgetProposal)(x) +func (x *fastReflection_MsgBudgetProposalResponse) Interface() protoreflect.ProtoMessage { + return (*MsgBudgetProposalResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -736,19 +732,7 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Interface() protoreflect.ProtoM // 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.Proposal != nil { - value := protoreflect.ValueOfMessage(x.Proposal.ProtoReflect()) - if !f(fd_MsgSubmitBudgetProposal_proposal, value) { - return - } - } - if x.Signer != "" { - value := protoreflect.ValueOfString(x.Signer) - if !f(fd_MsgSubmitBudgetProposal_signer, value) { - return - } - } +func (x *fastReflection_MsgBudgetProposalResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -762,17 +746,13 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Range(f func(protoreflect.Field // 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 { +func (x *fastReflection_MsgBudgetProposalResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.proposal": - return x.Proposal != nil - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.signer": - return x.Signer != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposalResponse")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposal does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse does not contain field %s", fd.FullName())) } } @@ -782,17 +762,13 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Has(fd protoreflect.FieldDescri // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitBudgetProposal) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgBudgetProposalResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.proposal": - x.Proposal = nil - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.signer": - x.Signer = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposalResponse")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposal does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse does not contain field %s", fd.FullName())) } } @@ -802,19 +778,13 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Clear(fd protoreflect.FieldDesc // 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 { +func (x *fastReflection_MsgBudgetProposalResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.proposal": - value := x.Proposal - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.signer": - value := x.Signer - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposalResponse")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposal does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse does not contain field %s", descriptor.FullName())) } } @@ -828,17 +798,13 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Get(descriptor protoreflect.Fie // 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) { +func (x *fastReflection_MsgBudgetProposalResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.proposal": - x.Proposal = value.Message().Interface().(*BudgetProposal) - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.signer": - x.Signer = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposalResponse")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposal does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse does not contain field %s", fd.FullName())) } } @@ -852,48 +818,36 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Set(fd protoreflect.FieldDescri // 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 { +func (x *fastReflection_MsgBudgetProposalResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.proposal": - if x.Proposal == nil { - x.Proposal = new(BudgetProposal) - } - return protoreflect.ValueOfMessage(x.Proposal.ProtoReflect()) - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.signer": - panic(fmt.Errorf("field signer 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("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposalResponse")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposal does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse 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 { +func (x *fastReflection_MsgBudgetProposalResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.proposal": - m := new(BudgetProposal) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.signer": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposalResponse")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposal does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse 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 { +func (x *fastReflection_MsgBudgetProposalResponse) 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(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgBudgetProposalResponse", d.FullName())) } panic("unreachable") } @@ -901,7 +855,7 @@ func (x *fastReflection_MsgSubmitBudgetProposal) WhichOneof(d protoreflect.Oneof // 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 { +func (x *fastReflection_MsgBudgetProposalResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -912,7 +866,7 @@ func (x *fastReflection_MsgSubmitBudgetProposal) GetUnknown() protoreflect.RawFi // 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) { +func (x *fastReflection_MsgBudgetProposalResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -924,7 +878,7 @@ func (x *fastReflection_MsgSubmitBudgetProposal) SetUnknown(fields protoreflect. // 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 { +func (x *fastReflection_MsgBudgetProposalResponse) IsValid() bool { return x != nil } @@ -934,9 +888,9 @@ func (x *fastReflection_MsgSubmitBudgetProposal) IsValid() bool { // 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 { +func (x *fastReflection_MsgBudgetProposalResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitBudgetProposal) + x := input.Message.Interface().(*MsgBudgetProposalResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -948,14 +902,6 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth var n int var l int _ = l - if x.Proposal != nil { - l = options.Size(x.Proposal) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Signer) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -966,7 +912,7 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitBudgetProposal) + x := input.Message.Interface().(*MsgBudgetProposalResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -985,27 +931,6 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Signer) > 0 { - i -= len(x.Signer) - copy(dAtA[i:], x.Signer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) - i-- - dAtA[i] = 0x12 - } - if x.Proposal != nil { - encoded, err := options.Marshal(x.Proposal) - 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 { @@ -1017,7 +942,7 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitBudgetProposal) + x := input.Message.Interface().(*MsgBudgetProposalResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1049,434 +974,10 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth 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") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBudgetProposalResponse: 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 Proposal", 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.Proposal == nil { - x.Proposal = &BudgetProposal{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proposal); 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 Signer", 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.Signer = 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_MsgSubmitBudgetProposalResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_protocolpool_v1_budget_proto_init() - md_MsgSubmitBudgetProposalResponse = File_cosmos_protocolpool_v1_budget_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_budget_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_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) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBudgetProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1516,14 +1017,12 @@ func (x *fastReflection_MsgSubmitBudgetProposalResponse) ProtoMethods() *protoif var ( md_MsgClaimBudget protoreflect.MessageDescriptor - fd_MsgClaimBudget_proposal_id protoreflect.FieldDescriptor fd_MsgClaimBudget_recipient_address protoreflect.FieldDescriptor ) func init() { file_cosmos_protocolpool_v1_budget_proto_init() md_MsgClaimBudget = File_cosmos_protocolpool_v1_budget_proto.Messages().ByName("MsgClaimBudget") - fd_MsgClaimBudget_proposal_id = md_MsgClaimBudget.Fields().ByName("proposal_id") fd_MsgClaimBudget_recipient_address = md_MsgClaimBudget.Fields().ByName("recipient_address") } @@ -1536,7 +1035,7 @@ func (x *MsgClaimBudget) ProtoReflect() protoreflect.Message { } func (x *MsgClaimBudget) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_protocolpool_v1_budget_proto_msgTypes[3] + mi := &file_cosmos_protocolpool_v1_budget_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1592,12 +1091,6 @@ func (x *fastReflection_MsgClaimBudget) Interface() protoreflect.ProtoMessage { // 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.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_MsgClaimBudget_proposal_id, value) { - return - } - } if x.RecipientAddress != "" { value := protoreflect.ValueOfString(x.RecipientAddress) if !f(fd_MsgClaimBudget_recipient_address, value) { @@ -1619,8 +1112,6 @@ func (x *fastReflection_MsgClaimBudget) Range(f func(protoreflect.FieldDescripto // 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.proposal_id": - return x.ProposalId != uint64(0) case "cosmos.protocolpool.v1.MsgClaimBudget.recipient_address": return x.RecipientAddress != "" default: @@ -1639,8 +1130,6 @@ func (x *fastReflection_MsgClaimBudget) Has(fd protoreflect.FieldDescriptor) boo // 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.proposal_id": - x.ProposalId = uint64(0) case "cosmos.protocolpool.v1.MsgClaimBudget.recipient_address": x.RecipientAddress = "" default: @@ -1659,9 +1148,6 @@ func (x *fastReflection_MsgClaimBudget) Clear(fd protoreflect.FieldDescriptor) { // 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.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) case "cosmos.protocolpool.v1.MsgClaimBudget.recipient_address": value := x.RecipientAddress return protoreflect.ValueOfString(value) @@ -1685,8 +1171,6 @@ func (x *fastReflection_MsgClaimBudget) Get(descriptor protoreflect.FieldDescrip // 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.proposal_id": - x.ProposalId = value.Uint() case "cosmos.protocolpool.v1.MsgClaimBudget.recipient_address": x.RecipientAddress = value.Interface().(string) default: @@ -1709,8 +1193,6 @@ func (x *fastReflection_MsgClaimBudget) Set(fd protoreflect.FieldDescriptor, val // 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.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.protocolpool.v1.MsgClaimBudget is not mutable")) case "cosmos.protocolpool.v1.MsgClaimBudget.recipient_address": panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.MsgClaimBudget is not mutable")) default: @@ -1726,8 +1208,6 @@ func (x *fastReflection_MsgClaimBudget) Mutable(fd protoreflect.FieldDescriptor) // 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.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.MsgClaimBudget.recipient_address": return protoreflect.ValueOfString("") default: @@ -1799,9 +1279,6 @@ func (x *fastReflection_MsgClaimBudget) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } l = len(x.RecipientAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) @@ -1840,12 +1317,7 @@ func (x *fastReflection_MsgClaimBudget) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.RecipientAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RecipientAddress))) i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -1897,25 +1369,6 @@ func (x *fastReflection_MsgClaimBudget) ProtoMethods() *protoiface.Methods { } switch fieldNum { case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RecipientAddress", wireType) } @@ -2002,7 +1455,7 @@ func (x *MsgClaimBudgetResponse) ProtoReflect() protoreflect.Message { } func (x *MsgClaimBudgetResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_protocolpool_v1_budget_proto_msgTypes[4] + mi := &file_cosmos_protocolpool_v1_budget_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2502,20 +1955,18 @@ func (x *BudgetProposal) GetPeriod() int64 { return 0 } -// MsgSubmitBudgetProposal defines a message for setting the budget proposal. +// MsgBudgetProposalResponse defines the response to executing a +// MsgBudgetProposal message. // // Since: cosmos-sdk 0.50 -type MsgSubmitBudgetProposal struct { +type MsgBudgetProposalResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Proposal *BudgetProposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` - Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` } -func (x *MsgSubmitBudgetProposal) Reset() { - *x = MsgSubmitBudgetProposal{} +func (x *MsgBudgetProposalResponse) Reset() { + *x = MsgBudgetProposalResponse{} if protoimpl.UnsafeEnabled { mi := &file_cosmos_protocolpool_v1_budget_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2523,74 +1974,32 @@ func (x *MsgSubmitBudgetProposal) Reset() { } } -func (x *MsgSubmitBudgetProposal) String() string { +func (x *MsgBudgetProposalResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgSubmitBudgetProposal) ProtoMessage() {} +func (*MsgBudgetProposalResponse) ProtoMessage() {} -// Deprecated: Use MsgSubmitBudgetProposal.ProtoReflect.Descriptor instead. -func (*MsgSubmitBudgetProposal) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgBudgetProposalResponse.ProtoReflect.Descriptor instead. +func (*MsgBudgetProposalResponse) Descriptor() ([]byte, []int) { return file_cosmos_protocolpool_v1_budget_proto_rawDescGZIP(), []int{1} } -func (x *MsgSubmitBudgetProposal) GetProposal() *BudgetProposal { - if x != nil { - return x.Proposal - } - return nil -} - -func (x *MsgSubmitBudgetProposal) GetSigner() string { - if x != nil { - return x.Signer - } - return "" -} - -// MsgSubmitBudgetProposalResponse defines the response to executing a -// MsgSubmitBudgetProposal message. +// MsgClaimBudget defines a message for claiming the distributed budget. // // Since: cosmos-sdk 0.50 -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_budget_proto_msgTypes[2] - 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_budget_proto_rawDescGZIP(), []int{2} -} - type MsgClaimBudget struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` + 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_budget_proto_msgTypes[3] + mi := &file_cosmos_protocolpool_v1_budget_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2604,14 +2013,7 @@ func (*MsgClaimBudget) ProtoMessage() {} // Deprecated: Use MsgClaimBudget.ProtoReflect.Descriptor instead. func (*MsgClaimBudget) Descriptor() ([]byte, []int) { - return file_cosmos_protocolpool_v1_budget_proto_rawDescGZIP(), []int{3} -} - -func (x *MsgClaimBudget) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 + return file_cosmos_protocolpool_v1_budget_proto_rawDescGZIP(), []int{2} } func (x *MsgClaimBudget) GetRecipientAddress() string { @@ -2621,6 +2023,10 @@ func (x *MsgClaimBudget) GetRecipientAddress() string { return "" } +// MsgClaimBudgetResponse defines the response to executing a +// MsgClaimBudget message. +// +// Since: cosmos-sdk 0.50 type MsgClaimBudgetResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2632,7 +2038,7 @@ type MsgClaimBudgetResponse struct { func (x *MsgClaimBudgetResponse) Reset() { *x = MsgClaimBudgetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_protocolpool_v1_budget_proto_msgTypes[4] + mi := &file_cosmos_protocolpool_v1_budget_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2646,7 +2052,7 @@ func (*MsgClaimBudgetResponse) ProtoMessage() {} // Deprecated: Use MsgClaimBudgetResponse.ProtoReflect.Descriptor instead. func (*MsgClaimBudgetResponse) Descriptor() ([]byte, []int) { - return file_cosmos_protocolpool_v1_budget_proto_rawDescGZIP(), []int{4} + return file_cosmos_protocolpool_v1_budget_proto_rawDescGZIP(), []int{3} } func (x *MsgClaimBudgetResponse) GetAmount() *v1beta1.Coin { @@ -2669,7 +2075,7 @@ var file_cosmos_protocolpool_v1_budget_proto_rawDesc = []byte{ 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, 0x22, 0xfb, 0x01, 0x0a, 0x0e, 0x42, 0x75, 0x64, 0x67, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x02, 0x0a, 0x0e, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 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, @@ -2685,50 +2091,39 @@ var file_cosmos_protocolpool_v1_budget_proto_rawDesc = []byte{ 0x63, 0x68, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x8f, 0x01, 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, 0x42, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x01, 0x20, - 0x01, 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, 0x42, 0x75, 0x64, - 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 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, 0x90, 0x01, 0x0a, 0x0e, 0x4d, - 0x73, 0x67, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 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, 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, 0x42, 0xdb, 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, 0x0b, 0x42, 0x75, 0x64, - 0x67, 0x65, 0x74, 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, + 0x65, 0x72, 0x69, 0x6f, 0x64, 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, 0x1b, 0x0a, + 0x19, 0x4d, 0x73, 0x67, 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, 0x42, 0xdb, 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, 0x0b, 0x42, 0x75, 0x64, 0x67, 0x65, + 0x74, 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 ( @@ -2743,24 +2138,22 @@ func file_cosmos_protocolpool_v1_budget_proto_rawDescGZIP() []byte { return file_cosmos_protocolpool_v1_budget_proto_rawDescData } -var file_cosmos_protocolpool_v1_budget_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_cosmos_protocolpool_v1_budget_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_cosmos_protocolpool_v1_budget_proto_goTypes = []interface{}{ - (*BudgetProposal)(nil), // 0: cosmos.protocolpool.v1.BudgetProposal - (*MsgSubmitBudgetProposal)(nil), // 1: cosmos.protocolpool.v1.MsgSubmitBudgetProposal - (*MsgSubmitBudgetProposalResponse)(nil), // 2: cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse - (*MsgClaimBudget)(nil), // 3: cosmos.protocolpool.v1.MsgClaimBudget - (*MsgClaimBudgetResponse)(nil), // 4: cosmos.protocolpool.v1.MsgClaimBudgetResponse - (*v1beta1.Coin)(nil), // 5: cosmos.base.v1beta1.Coin + (*BudgetProposal)(nil), // 0: cosmos.protocolpool.v1.BudgetProposal + (*MsgBudgetProposalResponse)(nil), // 1: cosmos.protocolpool.v1.MsgBudgetProposalResponse + (*MsgClaimBudget)(nil), // 2: cosmos.protocolpool.v1.MsgClaimBudget + (*MsgClaimBudgetResponse)(nil), // 3: cosmos.protocolpool.v1.MsgClaimBudgetResponse + (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin } var file_cosmos_protocolpool_v1_budget_proto_depIdxs = []int32{ - 5, // 0: cosmos.protocolpool.v1.BudgetProposal.total_budget:type_name -> cosmos.base.v1beta1.Coin - 0, // 1: cosmos.protocolpool.v1.MsgSubmitBudgetProposal.proposal:type_name -> cosmos.protocolpool.v1.BudgetProposal - 5, // 2: cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount:type_name -> cosmos.base.v1beta1.Coin - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 4, // 0: cosmos.protocolpool.v1.BudgetProposal.total_budget:type_name -> cosmos.base.v1beta1.Coin + 4, // 1: cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount:type_name -> cosmos.base.v1beta1.Coin + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_cosmos_protocolpool_v1_budget_proto_init() } @@ -2782,7 +2175,7 @@ func file_cosmos_protocolpool_v1_budget_proto_init() { } } file_cosmos_protocolpool_v1_budget_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitBudgetProposal); i { + switch v := v.(*MsgBudgetProposalResponse); i { case 0: return &v.state case 1: @@ -2794,18 +2187,6 @@ func file_cosmos_protocolpool_v1_budget_proto_init() { } } file_cosmos_protocolpool_v1_budget_proto_msgTypes[2].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_budget_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgClaimBudget); i { case 0: return &v.state @@ -2817,7 +2198,7 @@ func file_cosmos_protocolpool_v1_budget_proto_init() { return nil } } - file_cosmos_protocolpool_v1_budget_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_cosmos_protocolpool_v1_budget_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgClaimBudgetResponse); i { case 0: return &v.state @@ -2836,7 +2217,7 @@ func file_cosmos_protocolpool_v1_budget_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_protocolpool_v1_budget_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/cosmos/protocolpool/v1/budget.proto b/proto/cosmos/protocolpool/v1/budget.proto index 232913d25030..bd287e007c51 100644 --- a/proto/cosmos/protocolpool/v1/budget.proto +++ b/proto/cosmos/protocolpool/v1/budget.proto @@ -13,6 +13,7 @@ import "cosmos/msg/v1/msg.proto"; // // Since: cosmos-sdk 0.50 message BudgetProposal { + option (cosmos.msg.v1.signer) = "recipient_address"; string recipient_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; cosmos.base.v1beta1.Coin total_budget = 2; int64 start_time = 3; @@ -31,8 +32,7 @@ message MsgBudgetProposalResponse {} // Since: cosmos-sdk 0.50 message MsgClaimBudget { option (cosmos.msg.v1.signer) = "recipient_address"; - uint64 proposal_id = 1; - string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string recipient_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgClaimBudgetResponse defines the response to executing a diff --git a/x/protocolpool/types/budget.pb.go b/x/protocolpool/types/budget.pb.go index 3890a8c9e839..baad64daa2de 100644 --- a/x/protocolpool/types/budget.pb.go +++ b/x/protocolpool/types/budget.pb.go @@ -105,26 +105,25 @@ func (m *BudgetProposal) GetPeriod() int64 { return 0 } -// MsgSubmitBudgetProposal defines a message for setting the budget proposal. +// MsgBudgetProposalResponse defines the response to executing a +// MsgBudgetProposal message. // // Since: cosmos-sdk 0.50 -type MsgSubmitBudgetProposal struct { - Proposal *BudgetProposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` - Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` +type MsgBudgetProposalResponse struct { } -func (m *MsgSubmitBudgetProposal) Reset() { *m = MsgSubmitBudgetProposal{} } -func (m *MsgSubmitBudgetProposal) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitBudgetProposal) ProtoMessage() {} -func (*MsgSubmitBudgetProposal) Descriptor() ([]byte, []int) { +func (m *MsgBudgetProposalResponse) Reset() { *m = MsgBudgetProposalResponse{} } +func (m *MsgBudgetProposalResponse) String() string { return proto.CompactTextString(m) } +func (*MsgBudgetProposalResponse) ProtoMessage() {} +func (*MsgBudgetProposalResponse) Descriptor() ([]byte, []int) { return fileDescriptor_2414eab590ecb8a3, []int{1} } -func (m *MsgSubmitBudgetProposal) XXX_Unmarshal(b []byte) error { +func (m *MsgBudgetProposalResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgSubmitBudgetProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgBudgetProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgSubmitBudgetProposal.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgBudgetProposalResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -134,82 +133,30 @@ func (m *MsgSubmitBudgetProposal) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *MsgSubmitBudgetProposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitBudgetProposal.Merge(m, src) +func (m *MsgBudgetProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBudgetProposalResponse.Merge(m, src) } -func (m *MsgSubmitBudgetProposal) XXX_Size() int { +func (m *MsgBudgetProposalResponse) XXX_Size() int { return m.Size() } -func (m *MsgSubmitBudgetProposal) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitBudgetProposal.DiscardUnknown(m) +func (m *MsgBudgetProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBudgetProposalResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgSubmitBudgetProposal proto.InternalMessageInfo +var xxx_messageInfo_MsgBudgetProposalResponse proto.InternalMessageInfo -func (m *MsgSubmitBudgetProposal) GetProposal() *BudgetProposal { - if m != nil { - return m.Proposal - } - return nil -} - -func (m *MsgSubmitBudgetProposal) GetSigner() string { - if m != nil { - return m.Signer - } - return "" -} - -// MsgSubmitBudgetProposalResponse defines the response to executing a -// MsgSubmitBudgetProposal message. +// MsgClaimBudget defines a message for claiming the distributed budget. // // Since: cosmos-sdk 0.50 -type MsgSubmitBudgetProposalResponse struct { -} - -func (m *MsgSubmitBudgetProposalResponse) Reset() { *m = MsgSubmitBudgetProposalResponse{} } -func (m *MsgSubmitBudgetProposalResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitBudgetProposalResponse) ProtoMessage() {} -func (*MsgSubmitBudgetProposalResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2414eab590ecb8a3, []int{2} -} -func (m *MsgSubmitBudgetProposalResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSubmitBudgetProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSubmitBudgetProposalResponse.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 *MsgSubmitBudgetProposalResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitBudgetProposalResponse.Merge(m, src) -} -func (m *MsgSubmitBudgetProposalResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSubmitBudgetProposalResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitBudgetProposalResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSubmitBudgetProposalResponse proto.InternalMessageInfo - type MsgClaimBudget struct { - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` + RecipientAddress string `protobuf:"bytes,1,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` } func (m *MsgClaimBudget) Reset() { *m = MsgClaimBudget{} } func (m *MsgClaimBudget) String() string { return proto.CompactTextString(m) } func (*MsgClaimBudget) ProtoMessage() {} func (*MsgClaimBudget) Descriptor() ([]byte, []int) { - return fileDescriptor_2414eab590ecb8a3, []int{3} + return fileDescriptor_2414eab590ecb8a3, []int{2} } func (m *MsgClaimBudget) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -238,13 +185,6 @@ func (m *MsgClaimBudget) XXX_DiscardUnknown() { var xxx_messageInfo_MsgClaimBudget proto.InternalMessageInfo -func (m *MsgClaimBudget) GetProposalId() uint64 { - if m != nil { - return m.ProposalId - } - return 0 -} - func (m *MsgClaimBudget) GetRecipientAddress() string { if m != nil { return m.RecipientAddress @@ -252,6 +192,10 @@ func (m *MsgClaimBudget) GetRecipientAddress() string { return "" } +// MsgClaimBudgetResponse defines the response to executing a +// MsgClaimBudget message. +// +// Since: cosmos-sdk 0.50 type MsgClaimBudgetResponse struct { Amount types.Coin `protobuf:"bytes,1,opt,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` } @@ -260,7 +204,7 @@ func (m *MsgClaimBudgetResponse) Reset() { *m = MsgClaimBudgetResponse{} func (m *MsgClaimBudgetResponse) String() string { return proto.CompactTextString(m) } func (*MsgClaimBudgetResponse) ProtoMessage() {} func (*MsgClaimBudgetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2414eab590ecb8a3, []int{4} + return fileDescriptor_2414eab590ecb8a3, []int{3} } func (m *MsgClaimBudgetResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -298,8 +242,7 @@ func (m *MsgClaimBudgetResponse) GetAmount() types.Coin { func init() { proto.RegisterType((*BudgetProposal)(nil), "cosmos.protocolpool.v1.BudgetProposal") - proto.RegisterType((*MsgSubmitBudgetProposal)(nil), "cosmos.protocolpool.v1.MsgSubmitBudgetProposal") - proto.RegisterType((*MsgSubmitBudgetProposalResponse)(nil), "cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse") + proto.RegisterType((*MsgBudgetProposalResponse)(nil), "cosmos.protocolpool.v1.MsgBudgetProposalResponse") proto.RegisterType((*MsgClaimBudget)(nil), "cosmos.protocolpool.v1.MsgClaimBudget") proto.RegisterType((*MsgClaimBudgetResponse)(nil), "cosmos.protocolpool.v1.MsgClaimBudgetResponse") } @@ -309,39 +252,35 @@ func init() { } var fileDescriptor_2414eab590ecb8a3 = []byte{ - // 511 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xcf, 0x6e, 0xd3, 0x30, - 0x18, 0xaf, 0xb7, 0x51, 0x31, 0x17, 0x4d, 0x2c, 0x9a, 0xba, 0xac, 0x12, 0x69, 0x17, 0x24, 0x54, - 0x21, 0xd5, 0x59, 0xc7, 0x0d, 0xb8, 0x90, 0x89, 0x03, 0x87, 0x49, 0x28, 0xdb, 0x89, 0x4b, 0xe4, - 0x24, 0x96, 0x67, 0x2d, 0xb6, 0x23, 0xdb, 0xad, 0xe0, 0xc0, 0x85, 0x17, 0x60, 0xcf, 0xc1, 0x89, - 0x03, 0x0f, 0xb1, 0xe3, 0xc4, 0x89, 0x13, 0xa0, 0xf6, 0xc0, 0x43, 0x70, 0x41, 0x75, 0xdc, 0x6a, - 0x85, 0x15, 0x69, 0xa7, 0x38, 0xdf, 0xef, 0x4f, 0x7e, 0xdf, 0xf7, 0xc5, 0xf0, 0x61, 0x2e, 0x35, - 0x97, 0x3a, 0xaa, 0x94, 0x34, 0x32, 0x97, 0x65, 0x25, 0x65, 0x19, 0x8d, 0x87, 0x51, 0x36, 0x2a, - 0x28, 0x31, 0xc8, 0x96, 0xbd, 0x76, 0x4d, 0x42, 0xd7, 0x49, 0x68, 0x3c, 0xec, 0xec, 0x50, 0x49, - 0xa5, 0x2d, 0x46, 0xb3, 0x53, 0x8d, 0x77, 0x02, 0x67, 0x99, 0x61, 0x4d, 0xa2, 0xf1, 0x30, 0x23, - 0x06, 0x0f, 0xa3, 0x5c, 0x32, 0xe1, 0xf0, 0xbd, 0x1a, 0x4f, 0x6b, 0xe1, 0x75, 0xeb, 0xce, 0xae, - 0x93, 0x72, 0x4d, 0x67, 0x21, 0xb8, 0xa6, 0x35, 0x10, 0xfe, 0x06, 0x70, 0x2b, 0xb6, 0x91, 0x5e, - 0x2b, 0x59, 0x49, 0x8d, 0x4b, 0xef, 0x25, 0xdc, 0x56, 0x24, 0x67, 0x15, 0x23, 0xc2, 0xa4, 0xb8, - 0x28, 0x14, 0xd1, 0xda, 0x07, 0x3d, 0xd0, 0xdf, 0x8c, 0xfd, 0xaf, 0x5f, 0x06, 0x3b, 0xce, 0xf8, - 0x45, 0x8d, 0x9c, 0x18, 0xc5, 0x04, 0x4d, 0xee, 0x2f, 0x24, 0xae, 0xee, 0x3d, 0x87, 0xf7, 0x8c, - 0x34, 0xb8, 0x4c, 0xeb, 0x8e, 0xfd, 0xb5, 0x1e, 0xe8, 0xb7, 0x0e, 0xf7, 0x90, 0x93, 0xcf, 0x9a, - 0x40, 0xae, 0x09, 0x74, 0x24, 0x99, 0x48, 0x5a, 0x96, 0x5e, 0x87, 0xf1, 0x1e, 0x40, 0xa8, 0x0d, - 0x56, 0x26, 0x35, 0x8c, 0x13, 0x7f, 0xbd, 0x07, 0xfa, 0xeb, 0xc9, 0xa6, 0xad, 0x9c, 0x32, 0x4e, - 0xbc, 0x01, 0xf4, 0x14, 0xe1, 0x98, 0x09, 0x26, 0x68, 0x6a, 0x14, 0x16, 0xf9, 0x19, 0xd1, 0xfe, - 0x86, 0xa5, 0x6d, 0x2f, 0x90, 0x53, 0x07, 0x78, 0x6d, 0xd8, 0xac, 0x88, 0x62, 0xb2, 0xf0, 0xef, - 0x58, 0x8a, 0x7b, 0x0b, 0x3f, 0x02, 0xb8, 0x7b, 0xac, 0xe9, 0xc9, 0x28, 0xe3, 0xcc, 0xfc, 0x35, - 0x86, 0x18, 0xde, 0xad, 0xdc, 0xd9, 0x76, 0xdf, 0x3a, 0x7c, 0x84, 0x6e, 0x5e, 0x17, 0x5a, 0x56, - 0x26, 0x0b, 0x9d, 0x77, 0x00, 0x9b, 0x9a, 0x51, 0x41, 0x94, 0xed, 0xfe, 0x7f, 0xf3, 0x73, 0xbc, - 0x70, 0x1f, 0x76, 0x57, 0x04, 0x4a, 0x88, 0xae, 0xa4, 0xd0, 0x24, 0xbc, 0x00, 0x70, 0xeb, 0x58, - 0xd3, 0xa3, 0x12, 0x33, 0xee, 0xa6, 0xd5, 0x85, 0xad, 0xf9, 0x37, 0x53, 0x56, 0xd8, 0xb8, 0x1b, - 0x09, 0x9c, 0x97, 0x5e, 0x15, 0x37, 0xef, 0x74, 0xed, 0xb6, 0x3b, 0x7d, 0xda, 0xfe, 0xf0, 0xeb, - 0xf3, 0xe3, 0x7f, 0x9d, 0xc2, 0xf7, 0xb0, 0xbd, 0x9c, 0x68, 0x1e, 0xd6, 0xcb, 0x61, 0x13, 0x73, - 0x39, 0x12, 0xc6, 0xcd, 0x70, 0xf5, 0xfe, 0xe3, 0x83, 0xcb, 0xef, 0xdd, 0xc6, 0xa7, 0x1f, 0xdd, - 0x3e, 0x65, 0xe6, 0x6c, 0x94, 0xa1, 0x5c, 0x72, 0xf7, 0x13, 0xbb, 0xc7, 0x40, 0x17, 0xe7, 0x91, - 0x79, 0x57, 0x11, 0x6d, 0x05, 0x3a, 0x71, 0xd6, 0xf1, 0xb3, 0xcb, 0x49, 0x00, 0xae, 0x26, 0x01, - 0xf8, 0x39, 0x09, 0xc0, 0xc5, 0x34, 0x68, 0x5c, 0x4d, 0x83, 0xc6, 0xb7, 0x69, 0xd0, 0x78, 0xb3, - 0x5f, 0x2b, 0x75, 0x71, 0x8e, 0x98, 0x8c, 0xde, 0x2e, 0xdf, 0x46, 0x6b, 0x95, 0x35, 0x6d, 0xed, - 0xc9, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6c, 0x64, 0x40, 0x36, 0xb1, 0x03, 0x00, 0x00, + // 445 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0xbf, 0x6e, 0x13, 0x31, + 0x18, 0xcf, 0xb5, 0x10, 0xa9, 0x2e, 0xaa, 0xe8, 0xa9, 0x0a, 0x97, 0x20, 0xae, 0x21, 0x2c, 0x11, + 0x52, 0xce, 0x04, 0x36, 0x60, 0x21, 0x15, 0x63, 0x25, 0x74, 0x74, 0x62, 0x39, 0xf9, 0xee, 0x2c, + 0xd7, 0xea, 0xd9, 0xdf, 0xc9, 0x9f, 0x13, 0xc1, 0xc0, 0xc2, 0x13, 0x20, 0xf1, 0x16, 0x4c, 0x0c, + 0x3c, 0x44, 0xc7, 0x8a, 0x89, 0x09, 0x50, 0x32, 0xf0, 0x1a, 0x28, 0xb6, 0xa9, 0x1a, 0x21, 0x98, + 0x98, 0xee, 0xfc, 0xfb, 0xe7, 0xdf, 0xf7, 0xc9, 0xe4, 0x5e, 0x05, 0xa8, 0x00, 0x69, 0x6b, 0xc0, + 0x42, 0x05, 0x4d, 0x0b, 0xd0, 0xd0, 0xc5, 0x94, 0x96, 0xf3, 0x5a, 0x70, 0x9b, 0x39, 0x38, 0xee, + 0x79, 0x51, 0x76, 0x55, 0x94, 0x2d, 0xa6, 0x83, 0x03, 0x01, 0x02, 0x1c, 0x48, 0xd7, 0x7f, 0x9e, + 0x1f, 0xa4, 0x21, 0xb2, 0x64, 0xc8, 0xe9, 0x62, 0x5a, 0x72, 0xcb, 0xa6, 0xb4, 0x02, 0xa9, 0x03, + 0xdf, 0xf7, 0x7c, 0xe1, 0x8d, 0x57, 0xa3, 0x07, 0xb7, 0x82, 0x55, 0xa1, 0x58, 0x97, 0x50, 0x28, + 0x3c, 0x31, 0xfa, 0xb0, 0x45, 0xf6, 0x66, 0xae, 0xd2, 0x0b, 0x03, 0x2d, 0x20, 0x6b, 0xe2, 0xe7, + 0x64, 0xdf, 0xf0, 0x4a, 0xb6, 0x92, 0x6b, 0x5b, 0xb0, 0xba, 0x36, 0x1c, 0x31, 0x89, 0x86, 0xd1, + 0x78, 0x67, 0x96, 0x7c, 0xf9, 0x3c, 0x39, 0x08, 0xc1, 0xcf, 0x3c, 0xf3, 0xd2, 0x1a, 0xa9, 0x45, + 0x7e, 0xf3, 0xd2, 0x12, 0xf0, 0xf8, 0x29, 0xb9, 0x61, 0xc1, 0xb2, 0xa6, 0xf0, 0x13, 0x27, 0x5b, + 0xc3, 0x68, 0xbc, 0xfb, 0xb0, 0x9f, 0x05, 0xfb, 0x7a, 0x88, 0x2c, 0x0c, 0x91, 0x1d, 0x81, 0xd4, + 0xf9, 0xae, 0x93, 0xfb, 0x32, 0xf1, 0x1d, 0x42, 0xd0, 0x32, 0x63, 0x0b, 0x2b, 0x15, 0x4f, 0xb6, + 0x87, 0xd1, 0x78, 0x3b, 0xdf, 0x71, 0xc8, 0x89, 0x54, 0x3c, 0x9e, 0x90, 0xd8, 0x70, 0xc5, 0xa4, + 0x96, 0x5a, 0x14, 0xd6, 0x30, 0x5d, 0x9d, 0x72, 0x4c, 0xae, 0x39, 0xd9, 0xfe, 0x25, 0x73, 0x12, + 0x88, 0xb8, 0x47, 0xba, 0x2d, 0x37, 0x12, 0xea, 0xe4, 0xba, 0x93, 0x84, 0xd3, 0xe3, 0xde, 0xbb, + 0x9f, 0x9f, 0xee, 0xff, 0x39, 0xed, 0xe8, 0x36, 0xe9, 0x1f, 0xa3, 0xd8, 0xdc, 0x4b, 0xce, 0xb1, + 0x05, 0x8d, 0x7c, 0x04, 0x64, 0xef, 0x18, 0xc5, 0x51, 0xc3, 0xa4, 0x0a, 0x65, 0xff, 0xcf, 0xc6, + 0xfe, 0xda, 0xe6, 0x2d, 0xe9, 0x6d, 0x5e, 0xf8, 0xbb, 0x4a, 0x5c, 0x91, 0x2e, 0x53, 0x30, 0xd7, + 0xd6, 0xdd, 0xf6, 0xaf, 0xed, 0xce, 0x1e, 0x9c, 0x7f, 0x3b, 0xec, 0x7c, 0xfc, 0x7e, 0x38, 0x16, + 0xd2, 0x9e, 0xce, 0xcb, 0xac, 0x02, 0x15, 0x9e, 0x48, 0xf8, 0x4c, 0xb0, 0x3e, 0xa3, 0xf6, 0x4d, + 0xcb, 0xd1, 0x19, 0x30, 0x0f, 0xd1, 0xb3, 0x27, 0xe7, 0xcb, 0x34, 0xba, 0x58, 0xa6, 0xd1, 0x8f, + 0x65, 0x1a, 0xbd, 0x5f, 0xa5, 0x9d, 0x8b, 0x55, 0xda, 0xf9, 0xba, 0x4a, 0x3b, 0xaf, 0xee, 0x7a, + 0x27, 0xd6, 0x67, 0x99, 0x04, 0xfa, 0x7a, 0xf3, 0xad, 0xbb, 0xa8, 0xb2, 0xeb, 0xb0, 0x47, 0xbf, + 0x02, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x5a, 0xc6, 0x92, 0x0f, 0x03, 0x00, 0x00, } func (m *BudgetProposal) Marshal() (dAtA []byte, err error) { @@ -401,7 +340,7 @@ func (m *BudgetProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgSubmitBudgetProposal) Marshal() (dAtA []byte, err error) { +func (m *MsgBudgetProposalResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -411,54 +350,12 @@ func (m *MsgSubmitBudgetProposal) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSubmitBudgetProposal) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgBudgetProposalResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSubmitBudgetProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signer) > 0 { - i -= len(m.Signer) - copy(dAtA[i:], m.Signer) - i = encodeVarintBudget(dAtA, i, uint64(len(m.Signer))) - i-- - dAtA[i] = 0x12 - } - if m.Proposal != nil { - { - size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBudget(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgSubmitBudgetProposalResponse) 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 *MsgSubmitBudgetProposalResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSubmitBudgetProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgBudgetProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -491,12 +388,7 @@ func (m *MsgClaimBudget) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.RecipientAddress) i = encodeVarintBudget(dAtA, i, uint64(len(m.RecipientAddress))) i-- - dAtA[i] = 0x12 - } - if m.ProposalId != 0 { - i = encodeVarintBudget(dAtA, i, uint64(m.ProposalId)) - i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -571,24 +463,7 @@ func (m *BudgetProposal) Size() (n int) { return n } -func (m *MsgSubmitBudgetProposal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proposal != nil { - l = m.Proposal.Size() - n += 1 + l + sovBudget(uint64(l)) - } - l = len(m.Signer) - if l > 0 { - n += 1 + l + sovBudget(uint64(l)) - } - return n -} - -func (m *MsgSubmitBudgetProposalResponse) Size() (n int) { +func (m *MsgBudgetProposalResponse) Size() (n int) { if m == nil { return 0 } @@ -603,9 +478,6 @@ func (m *MsgClaimBudget) Size() (n int) { } var l int _ = l - if m.ProposalId != 0 { - n += 1 + sovBudget(uint64(m.ProposalId)) - } l = len(m.RecipientAddress) if l > 0 { n += 1 + l + sovBudget(uint64(l)) @@ -805,125 +677,7 @@ func (m *BudgetProposal) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSubmitBudgetProposal) 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 ErrIntOverflowBudget - } - 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: MsgSubmitBudgetProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitBudgetProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBudget - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBudget - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBudget - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proposal == nil { - m.Proposal = &BudgetProposal{} - } - if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBudget - } - 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 ErrInvalidLengthBudget - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBudget - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBudget(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthBudget - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSubmitBudgetProposalResponse) Unmarshal(dAtA []byte) error { +func (m *MsgBudgetProposalResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -946,10 +700,10 @@ func (m *MsgSubmitBudgetProposalResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitBudgetProposalResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgBudgetProposalResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitBudgetProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgBudgetProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1003,25 +757,6 @@ func (m *MsgClaimBudget) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - m.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBudget - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RecipientAddress", wireType) } From 9fe659e04f0cb3674fc37d67273c7cdcc8dc54d6 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 12 Oct 2023 18:09:47 +0530 Subject: [PATCH 05/69] feat: Stream Funds from protocolpool --- x/protocolpool/abci.go | 70 +++++++++++++++++++ x/protocolpool/keeper/keeper.go | 101 ++++++++++++++++++++++++++-- x/protocolpool/keeper/msg_server.go | 32 +++++++++ x/protocolpool/types/keys.go | 7 ++ x/protocolpool/types/types.go | 9 +++ 5 files changed, 214 insertions(+), 5 deletions(-) create mode 100644 x/protocolpool/abci.go create mode 100644 x/protocolpool/types/types.go diff --git a/x/protocolpool/abci.go b/x/protocolpool/abci.go new file mode 100644 index 000000000000..ac6902dc2529 --- /dev/null +++ b/x/protocolpool/abci.go @@ -0,0 +1,70 @@ +package protocolpool + +import ( + "fmt" + + "cosmossdk.io/x/protocolpool/keeper" + "cosmossdk.io/x/protocolpool/types" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func EndBlocker(ctx sdk.Context, k keeper.Keeper, authKeeper types.AccountKeeper) error { + err := k.BudgetProposal.Walk(ctx, nil, func(key sdk.AccAddress, budget types.BudgetProposal) (stop bool, err error) { + // check if the distribution is completed + if budget.RemainingTranches <= 0 { + // Log the end of the budget + k.Logger(ctx).Info(fmt.Sprintf("Budget ended for recipient: %s", key.String())) + return false, nil // Continue iterating + } + + currentTime := ctx.BlockTime().Unix() + + // Check if the start time is reached + if currentTime < budget.StartTime { + return false, fmt.Errorf("distribution has not started yet") + } + + // Calculate the number of blocks elapsed since the start time + blocksElapsed := ctx.BlockHeight() - budget.Period + + // Check if its time to distribute funds based on period intervals + if blocksElapsed > 0 && blocksElapsed%budget.Period == 0 { + // Calculate the amount to distribute in each tranche + amountPerTranche := budget.TotalBudget.Amount.QuoRaw(budget.RemainingTranches) + amount := sdk.NewCoin(budget.TotalBudget.Denom, amountPerTranche) + + recipient, err := authKeeper.AddressCodec().StringToBytes(budget.RecipientAddress) + if err != nil { + return false, err + } + + distributionInfo := types.DistributionInfo{ + Address: recipient, + Amount: amount, + } + + // store funds in the DistributionInfo until a claim tx + k.AppendDistributionInfo(ctx, distributionInfo) + + // update the budget's remaining tranches + budget.RemainingTranches-- + + // update the TotalBudget amount + budget.TotalBudget.Amount.Sub(amountPerTranche) + + k.Logger(ctx).Info(fmt.Sprintf("Processing budget for recipient: %s. Amount: %s", budget.RecipientAddress, amountPerTranche.String())) + + // Save the updated budget in the state + err = k.BudgetProposal.Set(ctx, recipient, budget) + if err != nil { + k.Logger(ctx).Error(fmt.Sprintf("Error while updating the budget for recipient %s", budget.RecipientAddress)) + return false, err + } + + } + return false, nil + }) + + return err +} diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 2275634b884f..389afbb4dd92 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -2,8 +2,10 @@ package keeper import ( "context" + "errors" "fmt" + "cosmossdk.io/collections" storetypes "cosmossdk.io/core/store" errorsmod "cosmossdk.io/errors" "cosmossdk.io/log" @@ -19,7 +21,14 @@ type Keeper struct { authKeeper types.AccountKeeper bankKeeper types.BankKeeper + cdc codec.BinaryCodec + authority string + + // State + Schema collections.Schema + BudgetProposal collections.Map[sdk.AccAddress, types.BudgetProposal] + DistrInfo collections.Map[sdk.AccAddress, sdk.Coin] } func NewKeeper(cdc codec.BinaryCodec, storeService storetypes.KVStoreService, @@ -29,12 +38,25 @@ func NewKeeper(cdc codec.BinaryCodec, storeService storetypes.KVStoreService, if addr := ak.GetModuleAddress(types.ModuleName); addr == nil { panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) } - return Keeper{ - storeService: storeService, - authKeeper: ak, - bankKeeper: bk, - authority: authority, + sb := collections.NewSchemaBuilder(storeService) + + keeper := Keeper{ + storeService: storeService, + authKeeper: ak, + bankKeeper: bk, + cdc: cdc, + authority: authority, + BudgetProposal: collections.NewMap(sb, types.BudgetKey, "budget", sdk.AccAddressKey, codec.CollValue[types.BudgetProposal](cdc)), + DistrInfo: collections.NewMap(sb, types.DistrInfoKey, "distribution_info", sdk.AccAddressKey, codec.CollValue[sdk.Coin](cdc)), + } + + schema, err := sb.Build() + if err != nil { + panic(err) } + keeper.Schema = schema + + return keeper } // GetAuthority returns the x/protocolpool module's authority. @@ -67,3 +89,72 @@ func (k Keeper) GetCommunityPool(ctx context.Context) (sdk.Coins, error) { } return k.bankKeeper.GetAllBalances(ctx, moduleAccount.GetAddress()), nil } + +func (k Keeper) AppendDistributionInfo(ctx sdk.Context, distributionInfo types.DistributionInfo) error { + amount, err := k.DistrInfo.Get(ctx, distributionInfo.Address) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + err := k.DistrInfo.Set(ctx, distributionInfo.Address, distributionInfo.Amount) + if err != nil { + return err + } + } else { + return err + } + } + updatedAmount := distributionInfo.Amount.Add(amount) + return k.DistrInfo.Set(ctx, distributionInfo.Address, updatedAmount) +} + +func (k Keeper) ClaimFunds(ctx context.Context, recipient sdk.AccAddress) (amount sdk.Coin, err error) { + // get claimable funds from distribution info + amount, err = k.getClaimableFunds(ctx, recipient) + if err != nil { + return sdk.Coin{}, err + } + + // distribute amount from feepool + err = k.DistributeFromFeePool(ctx, sdk.NewCoins(amount), recipient) + if err != nil { + return sdk.Coin{}, err + } + + // remove the recipient from the DistributionInfo + err = k.DistrInfo.Remove(ctx, recipient) + if err != nil { + return sdk.Coin{}, err + } + + return amount, nil +} + +func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) (amount sdk.Coin, err error) { + amount, err = k.DistrInfo.Get(ctx, recipient) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return sdk.Coin{}, fmt.Errorf("no claimable funds are present for recipient: %s", recipient.String()) + } + return sdk.Coin{}, err + } + return amount, nil +} + +func (k Keeper) validateBudgetProposal(bp types.BudgetProposal) error { + if err := validateAmount(sdk.NewCoins(*bp.TotalBudget)); err != nil { + return err + } + + if bp.StartTime <= 0 { + return fmt.Errorf("start time should be positive") + } + + if bp.RemainingTranches <= 0 { + return fmt.Errorf("cannot set tranches <= 0") + } + + if bp.Period <= 0 { + return fmt.Errorf("period should be a positive integer") + } + + return nil +} diff --git a/x/protocolpool/keeper/msg_server.go b/x/protocolpool/keeper/msg_server.go index f297539ea25f..55e760efd0f0 100644 --- a/x/protocolpool/keeper/msg_server.go +++ b/x/protocolpool/keeper/msg_server.go @@ -22,6 +22,38 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { return &MsgServer{Keeper: keeper} } +func (k MsgServer) MsgClaimBudget(ctx context.Context, msg *types.MsgClaimBudget) (*types.MsgClaimBudgetResponse, error) { + recipient, err := k.Keeper.authKeeper.AddressCodec().StringToBytes(msg.RecipientAddress) + if err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid recipient address: %s", err) + } + + amount, err := k.ClaimFunds(ctx, recipient) + if err != nil { + return nil, err + } + + return &types.MsgClaimBudgetResponse{Amount: amount}, nil +} + +func (k MsgServer) SubmitBudgetProposal(ctx context.Context, msg *types.BudgetProposal) (*types.MsgBudgetProposalResponse, error) { + recipient, err := k.Keeper.authKeeper.AddressCodec().StringToBytes(msg.RecipientAddress) + if err != nil { + return nil, err + } + + if err := k.validateBudgetProposal(*msg); err != nil { + return nil, err + } + + // set budget proposal in state + err = k.BudgetProposal.Set(ctx, recipient, *msg) + if err != nil { + return nil, err + } + return &types.MsgBudgetProposalResponse{}, nil +} + func (k MsgServer) FundCommunityPool(ctx context.Context, msg *types.MsgFundCommunityPool) (*types.MsgFundCommunityPoolResponse, error) { depositor, err := k.authKeeper.AddressCodec().StringToBytes(msg.Depositor) if err != nil { diff --git a/x/protocolpool/types/keys.go b/x/protocolpool/types/keys.go index 2c63627dc040..78ac63aea657 100644 --- a/x/protocolpool/types/keys.go +++ b/x/protocolpool/types/keys.go @@ -1,5 +1,7 @@ package types +import "cosmossdk.io/collections" + const ( // ModuleName is the module name constant used in many places ModuleName = "protocolpool" @@ -13,3 +15,8 @@ const ( // GovModuleName is the name of the gov module GovModuleName = "gov" ) + +var ( + BudgetKey = collections.NewPrefix(0) + DistrInfoKey = collections.NewPrefix(1) +) diff --git a/x/protocolpool/types/types.go b/x/protocolpool/types/types.go new file mode 100644 index 000000000000..bb10458adffd --- /dev/null +++ b/x/protocolpool/types/types.go @@ -0,0 +1,9 @@ +package types + +import sdk "github.com/cosmos/cosmos-sdk/types" + +// DistributionInfo represents the information about distributed funds for a recipient. +type DistributionInfo struct { + Address sdk.AccAddress `json:"address"` + Amount sdk.Coin `json:"amount"` +} From edfc4b8d860ee53b15ab4e03ab9123e1726a3d45 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 12 Oct 2023 18:19:15 +0530 Subject: [PATCH 06/69] wip: add more changes --- x/gov/client/cli/prompt.go | 4 ++++ x/protocolpool/keeper/keeper.go | 17 +++++++++++++---- x/protocolpool/keeper/msg_server.go | 2 +- x/protocolpool/module.go | 7 +++++++ x/protocolpool/types/codec.go | 2 ++ 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/x/gov/client/cli/prompt.go b/x/gov/client/cli/prompt.go index acdb8e447b61..919c14699b6e 100644 --- a/x/gov/client/cli/prompt.go +++ b/x/gov/client/cli/prompt.go @@ -44,6 +44,10 @@ var suggestedProposalTypes = []proposalType{ Name: "cancel-software-upgrade", MsgType: "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", }, + { + Name: "set-budget", + MsgType: "/cosmos.protocolpool.v1.BudgetProposal", + }, { Name: proposalOther, MsgType: "", // user will input the message type diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 389afbb4dd92..720b29dc2a77 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -139,21 +139,30 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) return amount, nil } -func (k Keeper) validateBudgetProposal(bp types.BudgetProposal) error { +func (k Keeper) validateBudgetProposal(ctx context.Context, bp types.BudgetProposal) error { + account := k.authKeeper.GetAccount(ctx, sdk.AccAddress(bp.RecipientAddress)) + if account == nil { + return fmt.Errorf("account not found: %s", bp.RecipientAddress) + } + + if bp.TotalBudget.IsZero() { + return fmt.Errorf("total budget cannot be zero") + } + if err := validateAmount(sdk.NewCoins(*bp.TotalBudget)); err != nil { return err } if bp.StartTime <= 0 { - return fmt.Errorf("start time should be positive") + return fmt.Errorf("start time must be a positive value") } if bp.RemainingTranches <= 0 { - return fmt.Errorf("cannot set tranches <= 0") + return fmt.Errorf("remaining tranches must be a positive value") } if bp.Period <= 0 { - return fmt.Errorf("period should be a positive integer") + return fmt.Errorf("period should be a positive value") } return nil diff --git a/x/protocolpool/keeper/msg_server.go b/x/protocolpool/keeper/msg_server.go index 55e760efd0f0..18372ec63023 100644 --- a/x/protocolpool/keeper/msg_server.go +++ b/x/protocolpool/keeper/msg_server.go @@ -42,7 +42,7 @@ func (k MsgServer) SubmitBudgetProposal(ctx context.Context, msg *types.BudgetPr return nil, err } - if err := k.validateBudgetProposal(*msg); err != nil { + if err := k.validateBudgetProposal(ctx, *msg); err != nil { return nil, err } diff --git a/x/protocolpool/module.go b/x/protocolpool/module.go index 2001029e91cc..76aa93a04a9c 100644 --- a/x/protocolpool/module.go +++ b/x/protocolpool/module.go @@ -16,6 +16,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -92,6 +93,12 @@ func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } +// EndBlock implements the protocolpool module's EndBlock. +func (am AppModule) EndBlock(ctx context.Context) error { + c := sdk.UnwrapSDKContext(ctx) + return EndBlocker(c, am.keeper, am.accountKeeper) +} + // // App Wiring Setup // diff --git a/x/protocolpool/types/codec.go b/x/protocolpool/types/codec.go index b54ccb1ddb00..ca4fa9203c4a 100644 --- a/x/protocolpool/types/codec.go +++ b/x/protocolpool/types/codec.go @@ -11,6 +11,8 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { (*sdk.Msg)(nil), &MsgFundCommunityPool{}, &MsgCommunityPoolSpend{}, + &BudgetProposal{}, + &MsgClaimBudget{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) From 40a8447fa2c8d7a30b39129c43896de69c56f16e Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 12 Oct 2023 18:26:58 +0530 Subject: [PATCH 07/69] add pool module to EndBlocker order --- simapp/app.go | 1 + 1 file changed, 1 insertion(+) diff --git a/simapp/app.go b/simapp/app.go index 4f9e94756fad..86b4eaac6ce6 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -437,6 +437,7 @@ func NewSimApp( genutiltypes.ModuleName, feegrant.ModuleName, group.ModuleName, + pooltypes.ModuleName, ) // NOTE: The genutils module must occur after staking so that pools are From 26fabfa27b10669091ddb73211fe741e2aa77bba Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 12 Oct 2023 19:31:36 +0530 Subject: [PATCH 08/69] fix simulation in protocolpool --- testutil/configurator/configurator.go | 1 + 1 file changed, 1 insertion(+) diff --git a/testutil/configurator/configurator.go b/testutil/configurator/configurator.go index 8fd435488cf9..34b0cec7f5de 100644 --- a/testutil/configurator/configurator.go +++ b/testutil/configurator/configurator.go @@ -81,6 +81,7 @@ func defaultConfig() *Config { "upgrade", "vesting", "circuit", + "protocolpool", }, InitGenesisOrder: []string{ "auth", From f5aa92d858b99dd6144ba8a2f2e8e4e5e1f2d511 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 12 Oct 2023 19:48:24 +0530 Subject: [PATCH 09/69] fix lint and run go mod tidy --- x/protocolpool/abci.go | 5 ++++- x/protocolpool/go.mod | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/x/protocolpool/abci.go b/x/protocolpool/abci.go index ac6902dc2529..9719ac39021c 100644 --- a/x/protocolpool/abci.go +++ b/x/protocolpool/abci.go @@ -45,7 +45,10 @@ func EndBlocker(ctx sdk.Context, k keeper.Keeper, authKeeper types.AccountKeeper } // store funds in the DistributionInfo until a claim tx - k.AppendDistributionInfo(ctx, distributionInfo) + err = k.AppendDistributionInfo(ctx, distributionInfo) + if err != nil { + return false, err + } // update the budget's remaining tranches budget.RemainingTranches-- diff --git a/x/protocolpool/go.mod b/x/protocolpool/go.mod index 5aa4d1fa331d..ad4c4e4a5b40 100644 --- a/x/protocolpool/go.mod +++ b/x/protocolpool/go.mod @@ -4,6 +4,7 @@ go 1.21 require ( cosmossdk.io/api v0.7.2-0.20230927090904-9dd34510e273 + cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/errors v1.0.0 @@ -22,7 +23,6 @@ require ( ) require ( - cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/math v1.1.3-rc.1 // indirect cosmossdk.io/store v1.0.0-rc.0 // indirect cosmossdk.io/x/tx v0.10.0 // indirect From cc2311bc14dbfde19c4836488a0d256aa1ae7f29 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 12 Oct 2023 20:11:36 +0530 Subject: [PATCH 10/69] wip: update module.go --- x/protocolpool/module.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/protocolpool/module.go b/x/protocolpool/module.go index 76aa93a04a9c..914fb3da4040 100644 --- a/x/protocolpool/module.go +++ b/x/protocolpool/module.go @@ -30,6 +30,7 @@ var ( _ module.AppModule = AppModule{} _ module.AppModuleSimulation = AppModule{} + _ appmodule.HasEndBlocker = AppModule{} ) // AppModuleBasic defines the basic application module used by the pool module. From ed6920d75a6489af219989795d540d245f8397d4 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Fri, 13 Oct 2023 11:28:14 +0530 Subject: [PATCH 11/69] fix tests --- simapp/app_config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/simapp/app_config.go b/simapp/app_config.go index 0ae4698170f8..4d0ceb329468 100644 --- a/simapp/app_config.go +++ b/simapp/app_config.go @@ -128,6 +128,7 @@ var ( stakingtypes.ModuleName, feegrant.ModuleName, group.ModuleName, + pooltypes.ModuleName, }, OverrideStoreKeys: []*runtimev1alpha1.StoreKeyConfig{ { From ceecddd3cea8b993593eed53048541a51ebce47a Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Fri, 13 Oct 2023 11:05:53 +0000 Subject: [PATCH 12/69] update proto files --- api/cosmos/protocolpool/v1/budget.pulsar.go | 333 ++++++++++---------- proto/cosmos/protocolpool/v1/budget.proto | 3 +- x/protocolpool/types/budget.pb.go | 114 +++---- 3 files changed, 224 insertions(+), 226 deletions(-) diff --git a/api/cosmos/protocolpool/v1/budget.pulsar.go b/api/cosmos/protocolpool/v1/budget.pulsar.go index 7db0c385b430..a1d5988bccad 100644 --- a/api/cosmos/protocolpool/v1/budget.pulsar.go +++ b/api/cosmos/protocolpool/v1/budget.pulsar.go @@ -17,33 +17,33 @@ import ( ) var ( - md_BudgetProposal protoreflect.MessageDescriptor - fd_BudgetProposal_recipient_address protoreflect.FieldDescriptor - fd_BudgetProposal_total_budget protoreflect.FieldDescriptor - fd_BudgetProposal_start_time protoreflect.FieldDescriptor - fd_BudgetProposal_remaining_tranches protoreflect.FieldDescriptor - fd_BudgetProposal_period protoreflect.FieldDescriptor + md_MsgBudgetProposal protoreflect.MessageDescriptor + fd_MsgBudgetProposal_recipient_address protoreflect.FieldDescriptor + fd_MsgBudgetProposal_total_budget protoreflect.FieldDescriptor + fd_MsgBudgetProposal_start_time protoreflect.FieldDescriptor + fd_MsgBudgetProposal_remaining_tranches protoreflect.FieldDescriptor + fd_MsgBudgetProposal_period protoreflect.FieldDescriptor ) func init() { file_cosmos_protocolpool_v1_budget_proto_init() - md_BudgetProposal = File_cosmos_protocolpool_v1_budget_proto.Messages().ByName("BudgetProposal") - fd_BudgetProposal_recipient_address = md_BudgetProposal.Fields().ByName("recipient_address") - fd_BudgetProposal_total_budget = md_BudgetProposal.Fields().ByName("total_budget") - fd_BudgetProposal_start_time = md_BudgetProposal.Fields().ByName("start_time") - fd_BudgetProposal_remaining_tranches = md_BudgetProposal.Fields().ByName("remaining_tranches") - fd_BudgetProposal_period = md_BudgetProposal.Fields().ByName("period") + md_MsgBudgetProposal = File_cosmos_protocolpool_v1_budget_proto.Messages().ByName("MsgBudgetProposal") + fd_MsgBudgetProposal_recipient_address = md_MsgBudgetProposal.Fields().ByName("recipient_address") + fd_MsgBudgetProposal_total_budget = md_MsgBudgetProposal.Fields().ByName("total_budget") + fd_MsgBudgetProposal_start_time = md_MsgBudgetProposal.Fields().ByName("start_time") + fd_MsgBudgetProposal_remaining_tranches = md_MsgBudgetProposal.Fields().ByName("remaining_tranches") + fd_MsgBudgetProposal_period = md_MsgBudgetProposal.Fields().ByName("period") } -var _ protoreflect.Message = (*fastReflection_BudgetProposal)(nil) +var _ protoreflect.Message = (*fastReflection_MsgBudgetProposal)(nil) -type fastReflection_BudgetProposal BudgetProposal +type fastReflection_MsgBudgetProposal MsgBudgetProposal -func (x *BudgetProposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_BudgetProposal)(x) +func (x *MsgBudgetProposal) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgBudgetProposal)(x) } -func (x *BudgetProposal) slowProtoReflect() protoreflect.Message { +func (x *MsgBudgetProposal) slowProtoReflect() protoreflect.Message { mi := &file_cosmos_protocolpool_v1_budget_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -55,43 +55,43 @@ func (x *BudgetProposal) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_BudgetProposal_messageType fastReflection_BudgetProposal_messageType -var _ protoreflect.MessageType = fastReflection_BudgetProposal_messageType{} +var _fastReflection_MsgBudgetProposal_messageType fastReflection_MsgBudgetProposal_messageType +var _ protoreflect.MessageType = fastReflection_MsgBudgetProposal_messageType{} -type fastReflection_BudgetProposal_messageType struct{} +type fastReflection_MsgBudgetProposal_messageType struct{} -func (x fastReflection_BudgetProposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_BudgetProposal)(nil) +func (x fastReflection_MsgBudgetProposal_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgBudgetProposal)(nil) } -func (x fastReflection_BudgetProposal_messageType) New() protoreflect.Message { - return new(fastReflection_BudgetProposal) +func (x fastReflection_MsgBudgetProposal_messageType) New() protoreflect.Message { + return new(fastReflection_MsgBudgetProposal) } -func (x fastReflection_BudgetProposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BudgetProposal +func (x fastReflection_MsgBudgetProposal_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBudgetProposal } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_BudgetProposal) Descriptor() protoreflect.MessageDescriptor { - return md_BudgetProposal +func (x *fastReflection_MsgBudgetProposal) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBudgetProposal } // 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_BudgetProposal) Type() protoreflect.MessageType { - return _fastReflection_BudgetProposal_messageType +func (x *fastReflection_MsgBudgetProposal) Type() protoreflect.MessageType { + return _fastReflection_MsgBudgetProposal_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_BudgetProposal) New() protoreflect.Message { - return new(fastReflection_BudgetProposal) +func (x *fastReflection_MsgBudgetProposal) New() protoreflect.Message { + return new(fastReflection_MsgBudgetProposal) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_BudgetProposal) Interface() protoreflect.ProtoMessage { - return (*BudgetProposal)(x) +func (x *fastReflection_MsgBudgetProposal) Interface() protoreflect.ProtoMessage { + return (*MsgBudgetProposal)(x) } // Range iterates over every populated field in an undefined order, @@ -99,34 +99,34 @@ func (x *fastReflection_BudgetProposal) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_BudgetProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgBudgetProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.RecipientAddress != "" { value := protoreflect.ValueOfString(x.RecipientAddress) - if !f(fd_BudgetProposal_recipient_address, value) { + if !f(fd_MsgBudgetProposal_recipient_address, value) { return } } if x.TotalBudget != nil { value := protoreflect.ValueOfMessage(x.TotalBudget.ProtoReflect()) - if !f(fd_BudgetProposal_total_budget, value) { + if !f(fd_MsgBudgetProposal_total_budget, value) { return } } if x.StartTime != int64(0) { value := protoreflect.ValueOfInt64(x.StartTime) - if !f(fd_BudgetProposal_start_time, value) { + if !f(fd_MsgBudgetProposal_start_time, value) { return } } if x.RemainingTranches != int64(0) { value := protoreflect.ValueOfInt64(x.RemainingTranches) - if !f(fd_BudgetProposal_remaining_tranches, value) { + if !f(fd_MsgBudgetProposal_remaining_tranches, value) { return } } if x.Period != int64(0) { value := protoreflect.ValueOfInt64(x.Period) - if !f(fd_BudgetProposal_period, value) { + if !f(fd_MsgBudgetProposal_period, value) { return } } @@ -143,23 +143,23 @@ func (x *fastReflection_BudgetProposal) Range(f func(protoreflect.FieldDescripto // 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_BudgetProposal) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgBudgetProposal) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.protocolpool.v1.BudgetProposal.recipient_address": + case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": return x.RecipientAddress != "" - case "cosmos.protocolpool.v1.BudgetProposal.total_budget": + case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": return x.TotalBudget != nil - case "cosmos.protocolpool.v1.BudgetProposal.start_time": + case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": return x.StartTime != int64(0) - case "cosmos.protocolpool.v1.BudgetProposal.remaining_tranches": + case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": return x.RemainingTranches != int64(0) - case "cosmos.protocolpool.v1.BudgetProposal.period": + case "cosmos.protocolpool.v1.MsgBudgetProposal.period": return x.Period != int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.BudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.BudgetProposal does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal does not contain field %s", fd.FullName())) } } @@ -169,23 +169,23 @@ func (x *fastReflection_BudgetProposal) Has(fd protoreflect.FieldDescriptor) boo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BudgetProposal) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgBudgetProposal) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.protocolpool.v1.BudgetProposal.recipient_address": + case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": x.RecipientAddress = "" - case "cosmos.protocolpool.v1.BudgetProposal.total_budget": + case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": x.TotalBudget = nil - case "cosmos.protocolpool.v1.BudgetProposal.start_time": + case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": x.StartTime = int64(0) - case "cosmos.protocolpool.v1.BudgetProposal.remaining_tranches": + case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": x.RemainingTranches = int64(0) - case "cosmos.protocolpool.v1.BudgetProposal.period": + case "cosmos.protocolpool.v1.MsgBudgetProposal.period": x.Period = int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.BudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.BudgetProposal does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal does not contain field %s", fd.FullName())) } } @@ -195,28 +195,28 @@ func (x *fastReflection_BudgetProposal) Clear(fd protoreflect.FieldDescriptor) { // 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_BudgetProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgBudgetProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.protocolpool.v1.BudgetProposal.recipient_address": + case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": value := x.RecipientAddress return protoreflect.ValueOfString(value) - case "cosmos.protocolpool.v1.BudgetProposal.total_budget": + case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": value := x.TotalBudget return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.protocolpool.v1.BudgetProposal.start_time": + case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": value := x.StartTime return protoreflect.ValueOfInt64(value) - case "cosmos.protocolpool.v1.BudgetProposal.remaining_tranches": + case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": value := x.RemainingTranches return protoreflect.ValueOfInt64(value) - case "cosmos.protocolpool.v1.BudgetProposal.period": + case "cosmos.protocolpool.v1.MsgBudgetProposal.period": value := x.Period return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.BudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.BudgetProposal does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal does not contain field %s", descriptor.FullName())) } } @@ -230,23 +230,23 @@ func (x *fastReflection_BudgetProposal) Get(descriptor protoreflect.FieldDescrip // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BudgetProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgBudgetProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.protocolpool.v1.BudgetProposal.recipient_address": + case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": x.RecipientAddress = value.Interface().(string) - case "cosmos.protocolpool.v1.BudgetProposal.total_budget": + case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": x.TotalBudget = value.Message().Interface().(*v1beta1.Coin) - case "cosmos.protocolpool.v1.BudgetProposal.start_time": + case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": x.StartTime = value.Int() - case "cosmos.protocolpool.v1.BudgetProposal.remaining_tranches": + case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": x.RemainingTranches = value.Int() - case "cosmos.protocolpool.v1.BudgetProposal.period": + case "cosmos.protocolpool.v1.MsgBudgetProposal.period": x.Period = value.Int() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.BudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.BudgetProposal does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal does not contain field %s", fd.FullName())) } } @@ -260,60 +260,60 @@ func (x *fastReflection_BudgetProposal) Set(fd protoreflect.FieldDescriptor, val // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BudgetProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgBudgetProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.protocolpool.v1.BudgetProposal.total_budget": + case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": if x.TotalBudget == nil { x.TotalBudget = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.TotalBudget.ProtoReflect()) - case "cosmos.protocolpool.v1.BudgetProposal.recipient_address": - panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.BudgetProposal is not mutable")) - case "cosmos.protocolpool.v1.BudgetProposal.start_time": - panic(fmt.Errorf("field start_time of message cosmos.protocolpool.v1.BudgetProposal is not mutable")) - case "cosmos.protocolpool.v1.BudgetProposal.remaining_tranches": - panic(fmt.Errorf("field remaining_tranches of message cosmos.protocolpool.v1.BudgetProposal is not mutable")) - case "cosmos.protocolpool.v1.BudgetProposal.period": - panic(fmt.Errorf("field period of message cosmos.protocolpool.v1.BudgetProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": + panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": + panic(fmt.Errorf("field start_time of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": + panic(fmt.Errorf("field remaining_tranches of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgBudgetProposal.period": + panic(fmt.Errorf("field period of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.BudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.BudgetProposal does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal 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_BudgetProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgBudgetProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.protocolpool.v1.BudgetProposal.recipient_address": + case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": return protoreflect.ValueOfString("") - case "cosmos.protocolpool.v1.BudgetProposal.total_budget": + case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.protocolpool.v1.BudgetProposal.start_time": + case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.protocolpool.v1.BudgetProposal.remaining_tranches": + case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.protocolpool.v1.BudgetProposal.period": + case "cosmos.protocolpool.v1.MsgBudgetProposal.period": return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.BudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.BudgetProposal does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal 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_BudgetProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgBudgetProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.BudgetProposal", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgBudgetProposal", d.FullName())) } panic("unreachable") } @@ -321,7 +321,7 @@ func (x *fastReflection_BudgetProposal) WhichOneof(d protoreflect.OneofDescripto // 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_BudgetProposal) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgBudgetProposal) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -332,7 +332,7 @@ func (x *fastReflection_BudgetProposal) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BudgetProposal) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgBudgetProposal) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -344,7 +344,7 @@ func (x *fastReflection_BudgetProposal) SetUnknown(fields protoreflect.RawFields // 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_BudgetProposal) IsValid() bool { +func (x *fastReflection_MsgBudgetProposal) IsValid() bool { return x != nil } @@ -354,9 +354,9 @@ func (x *fastReflection_BudgetProposal) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_BudgetProposal) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgBudgetProposal) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BudgetProposal) + x := input.Message.Interface().(*MsgBudgetProposal) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -395,7 +395,7 @@ func (x *fastReflection_BudgetProposal) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*BudgetProposal) + x := input.Message.Interface().(*MsgBudgetProposal) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -461,7 +461,7 @@ func (x *fastReflection_BudgetProposal) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*BudgetProposal) + x := input.Message.Interface().(*MsgBudgetProposal) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -493,10 +493,10 @@ func (x *fastReflection_BudgetProposal) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BudgetProposal: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBudgetProposal: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BudgetProposal: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBudgetProposal: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1888,7 +1888,7 @@ const ( // Budget defines budget proposal type. // // Since: cosmos-sdk 0.50 -type BudgetProposal struct { +type MsgBudgetProposal struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1900,8 +1900,8 @@ type BudgetProposal struct { Period int64 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"` } -func (x *BudgetProposal) Reset() { - *x = BudgetProposal{} +func (x *MsgBudgetProposal) Reset() { + *x = MsgBudgetProposal{} if protoimpl.UnsafeEnabled { mi := &file_cosmos_protocolpool_v1_budget_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1909,46 +1909,46 @@ func (x *BudgetProposal) Reset() { } } -func (x *BudgetProposal) String() string { +func (x *MsgBudgetProposal) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BudgetProposal) ProtoMessage() {} +func (*MsgBudgetProposal) ProtoMessage() {} -// Deprecated: Use BudgetProposal.ProtoReflect.Descriptor instead. -func (*BudgetProposal) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgBudgetProposal.ProtoReflect.Descriptor instead. +func (*MsgBudgetProposal) Descriptor() ([]byte, []int) { return file_cosmos_protocolpool_v1_budget_proto_rawDescGZIP(), []int{0} } -func (x *BudgetProposal) GetRecipientAddress() string { +func (x *MsgBudgetProposal) GetRecipientAddress() string { if x != nil { return x.RecipientAddress } return "" } -func (x *BudgetProposal) GetTotalBudget() *v1beta1.Coin { +func (x *MsgBudgetProposal) GetTotalBudget() *v1beta1.Coin { if x != nil { return x.TotalBudget } return nil } -func (x *BudgetProposal) GetStartTime() int64 { +func (x *MsgBudgetProposal) GetStartTime() int64 { if x != nil { return x.StartTime } return 0 } -func (x *BudgetProposal) GetRemainingTranches() int64 { +func (x *MsgBudgetProposal) GetRemainingTranches() int64 { if x != nil { return x.RemainingTranches } return 0 } -func (x *BudgetProposal) GetPeriod() int64 { +func (x *MsgBudgetProposal) GetPeriod() int64 { if x != nil { return x.Period } @@ -2075,55 +2075,54 @@ var file_cosmos_protocolpool_v1_budget_proto_rawDesc = []byte{ 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, 0x22, 0x93, 0x02, 0x0a, 0x0e, 0x42, 0x75, 0x64, 0x67, - 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 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, 0x3c, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, - 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, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2d, - 0x0a, 0x12, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x72, 0x61, 0x6e, - 0x63, 0x68, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x61, - 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x16, 0x0a, - 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, - 0x65, 0x72, 0x69, 0x6f, 0x64, 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, 0x1b, 0x0a, - 0x19, 0x4d, 0x73, 0x67, 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, 0x42, 0xdb, 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, 0x0b, 0x42, 0x75, 0x64, 0x67, 0x65, - 0x74, 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, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfe, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x42, + 0x75, 0x64, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 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, 0x3c, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x75, + 0x64, 0x67, 0x65, 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, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, + 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x74, + 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x72, + 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, + 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 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, 0x42, 0xdb, 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, 0x0b, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 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 ( @@ -2140,14 +2139,14 @@ func file_cosmos_protocolpool_v1_budget_proto_rawDescGZIP() []byte { var file_cosmos_protocolpool_v1_budget_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_cosmos_protocolpool_v1_budget_proto_goTypes = []interface{}{ - (*BudgetProposal)(nil), // 0: cosmos.protocolpool.v1.BudgetProposal + (*MsgBudgetProposal)(nil), // 0: cosmos.protocolpool.v1.MsgBudgetProposal (*MsgBudgetProposalResponse)(nil), // 1: cosmos.protocolpool.v1.MsgBudgetProposalResponse (*MsgClaimBudget)(nil), // 2: cosmos.protocolpool.v1.MsgClaimBudget (*MsgClaimBudgetResponse)(nil), // 3: cosmos.protocolpool.v1.MsgClaimBudgetResponse (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin } var file_cosmos_protocolpool_v1_budget_proto_depIdxs = []int32{ - 4, // 0: cosmos.protocolpool.v1.BudgetProposal.total_budget:type_name -> cosmos.base.v1beta1.Coin + 4, // 0: cosmos.protocolpool.v1.MsgBudgetProposal.total_budget:type_name -> cosmos.base.v1beta1.Coin 4, // 1: cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount:type_name -> cosmos.base.v1beta1.Coin 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type @@ -2163,7 +2162,7 @@ func file_cosmos_protocolpool_v1_budget_proto_init() { } if !protoimpl.UnsafeEnabled { file_cosmos_protocolpool_v1_budget_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BudgetProposal); i { + switch v := v.(*MsgBudgetProposal); i { case 0: return &v.state case 1: diff --git a/proto/cosmos/protocolpool/v1/budget.proto b/proto/cosmos/protocolpool/v1/budget.proto index bd287e007c51..c270c57ed870 100644 --- a/proto/cosmos/protocolpool/v1/budget.proto +++ b/proto/cosmos/protocolpool/v1/budget.proto @@ -12,8 +12,7 @@ import "cosmos/msg/v1/msg.proto"; // Budget defines budget proposal type. // // Since: cosmos-sdk 0.50 -message BudgetProposal { - option (cosmos.msg.v1.signer) = "recipient_address"; +message MsgBudgetProposal { string recipient_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; cosmos.base.v1beta1.Coin total_budget = 2; int64 start_time = 3; diff --git a/x/protocolpool/types/budget.pb.go b/x/protocolpool/types/budget.pb.go index baad64daa2de..4fcd521e6312 100644 --- a/x/protocolpool/types/budget.pb.go +++ b/x/protocolpool/types/budget.pb.go @@ -29,7 +29,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Budget defines budget proposal type. // // Since: cosmos-sdk 0.50 -type BudgetProposal struct { +type MsgBudgetProposal struct { RecipientAddress string `protobuf:"bytes,1,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` TotalBudget *types.Coin `protobuf:"bytes,2,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` StartTime int64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` @@ -37,18 +37,18 @@ type BudgetProposal struct { Period int64 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"` } -func (m *BudgetProposal) Reset() { *m = BudgetProposal{} } -func (m *BudgetProposal) String() string { return proto.CompactTextString(m) } -func (*BudgetProposal) ProtoMessage() {} -func (*BudgetProposal) Descriptor() ([]byte, []int) { +func (m *MsgBudgetProposal) Reset() { *m = MsgBudgetProposal{} } +func (m *MsgBudgetProposal) String() string { return proto.CompactTextString(m) } +func (*MsgBudgetProposal) ProtoMessage() {} +func (*MsgBudgetProposal) Descriptor() ([]byte, []int) { return fileDescriptor_2414eab590ecb8a3, []int{0} } -func (m *BudgetProposal) XXX_Unmarshal(b []byte) error { +func (m *MsgBudgetProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *BudgetProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgBudgetProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_BudgetProposal.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgBudgetProposal.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -58,47 +58,47 @@ func (m *BudgetProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *BudgetProposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_BudgetProposal.Merge(m, src) +func (m *MsgBudgetProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBudgetProposal.Merge(m, src) } -func (m *BudgetProposal) XXX_Size() int { +func (m *MsgBudgetProposal) XXX_Size() int { return m.Size() } -func (m *BudgetProposal) XXX_DiscardUnknown() { - xxx_messageInfo_BudgetProposal.DiscardUnknown(m) +func (m *MsgBudgetProposal) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBudgetProposal.DiscardUnknown(m) } -var xxx_messageInfo_BudgetProposal proto.InternalMessageInfo +var xxx_messageInfo_MsgBudgetProposal proto.InternalMessageInfo -func (m *BudgetProposal) GetRecipientAddress() string { +func (m *MsgBudgetProposal) GetRecipientAddress() string { if m != nil { return m.RecipientAddress } return "" } -func (m *BudgetProposal) GetTotalBudget() *types.Coin { +func (m *MsgBudgetProposal) GetTotalBudget() *types.Coin { if m != nil { return m.TotalBudget } return nil } -func (m *BudgetProposal) GetStartTime() int64 { +func (m *MsgBudgetProposal) GetStartTime() int64 { if m != nil { return m.StartTime } return 0 } -func (m *BudgetProposal) GetRemainingTranches() int64 { +func (m *MsgBudgetProposal) GetRemainingTranches() int64 { if m != nil { return m.RemainingTranches } return 0 } -func (m *BudgetProposal) GetPeriod() int64 { +func (m *MsgBudgetProposal) GetPeriod() int64 { if m != nil { return m.Period } @@ -241,7 +241,7 @@ func (m *MsgClaimBudgetResponse) GetAmount() types.Coin { } func init() { - proto.RegisterType((*BudgetProposal)(nil), "cosmos.protocolpool.v1.BudgetProposal") + proto.RegisterType((*MsgBudgetProposal)(nil), "cosmos.protocolpool.v1.MsgBudgetProposal") proto.RegisterType((*MsgBudgetProposalResponse)(nil), "cosmos.protocolpool.v1.MsgBudgetProposalResponse") proto.RegisterType((*MsgClaimBudget)(nil), "cosmos.protocolpool.v1.MsgClaimBudget") proto.RegisterType((*MsgClaimBudgetResponse)(nil), "cosmos.protocolpool.v1.MsgClaimBudgetResponse") @@ -252,38 +252,38 @@ func init() { } var fileDescriptor_2414eab590ecb8a3 = []byte{ - // 445 bytes of a gzipped FileDescriptorProto + // 442 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0xbf, 0x6e, 0x13, 0x31, - 0x18, 0xcf, 0xb5, 0x10, 0xa9, 0x2e, 0xaa, 0xe8, 0xa9, 0x0a, 0x97, 0x20, 0xae, 0x21, 0x2c, 0x11, - 0x52, 0xce, 0x04, 0x36, 0x60, 0x21, 0x15, 0x63, 0x25, 0x74, 0x74, 0x62, 0x39, 0xf9, 0xee, 0x2c, - 0xd7, 0xea, 0xd9, 0xdf, 0xc9, 0x9f, 0x13, 0xc1, 0xc0, 0xc2, 0x13, 0x20, 0xf1, 0x16, 0x4c, 0x0c, - 0x3c, 0x44, 0xc7, 0x8a, 0x89, 0x09, 0x50, 0x32, 0xf0, 0x1a, 0x28, 0xb6, 0xa9, 0x1a, 0x21, 0x98, - 0x98, 0xee, 0xfc, 0xfb, 0xe7, 0xdf, 0xf7, 0xc9, 0xe4, 0x5e, 0x05, 0xa8, 0x00, 0x69, 0x6b, 0xc0, - 0x42, 0x05, 0x4d, 0x0b, 0xd0, 0xd0, 0xc5, 0x94, 0x96, 0xf3, 0x5a, 0x70, 0x9b, 0x39, 0x38, 0xee, - 0x79, 0x51, 0x76, 0x55, 0x94, 0x2d, 0xa6, 0x83, 0x03, 0x01, 0x02, 0x1c, 0x48, 0xd7, 0x7f, 0x9e, - 0x1f, 0xa4, 0x21, 0xb2, 0x64, 0xc8, 0xe9, 0x62, 0x5a, 0x72, 0xcb, 0xa6, 0xb4, 0x02, 0xa9, 0x03, - 0xdf, 0xf7, 0x7c, 0xe1, 0x8d, 0x57, 0xa3, 0x07, 0xb7, 0x82, 0x55, 0xa1, 0x58, 0x97, 0x50, 0x28, - 0x3c, 0x31, 0xfa, 0xb0, 0x45, 0xf6, 0x66, 0xae, 0xd2, 0x0b, 0x03, 0x2d, 0x20, 0x6b, 0xe2, 0xe7, - 0x64, 0xdf, 0xf0, 0x4a, 0xb6, 0x92, 0x6b, 0x5b, 0xb0, 0xba, 0x36, 0x1c, 0x31, 0x89, 0x86, 0xd1, - 0x78, 0x67, 0x96, 0x7c, 0xf9, 0x3c, 0x39, 0x08, 0xc1, 0xcf, 0x3c, 0xf3, 0xd2, 0x1a, 0xa9, 0x45, - 0x7e, 0xf3, 0xd2, 0x12, 0xf0, 0xf8, 0x29, 0xb9, 0x61, 0xc1, 0xb2, 0xa6, 0xf0, 0x13, 0x27, 0x5b, - 0xc3, 0x68, 0xbc, 0xfb, 0xb0, 0x9f, 0x05, 0xfb, 0x7a, 0x88, 0x2c, 0x0c, 0x91, 0x1d, 0x81, 0xd4, - 0xf9, 0xae, 0x93, 0xfb, 0x32, 0xf1, 0x1d, 0x42, 0xd0, 0x32, 0x63, 0x0b, 0x2b, 0x15, 0x4f, 0xb6, - 0x87, 0xd1, 0x78, 0x3b, 0xdf, 0x71, 0xc8, 0x89, 0x54, 0x3c, 0x9e, 0x90, 0xd8, 0x70, 0xc5, 0xa4, - 0x96, 0x5a, 0x14, 0xd6, 0x30, 0x5d, 0x9d, 0x72, 0x4c, 0xae, 0x39, 0xd9, 0xfe, 0x25, 0x73, 0x12, - 0x88, 0xb8, 0x47, 0xba, 0x2d, 0x37, 0x12, 0xea, 0xe4, 0xba, 0x93, 0x84, 0xd3, 0xe3, 0xde, 0xbb, - 0x9f, 0x9f, 0xee, 0xff, 0x39, 0xed, 0xe8, 0x36, 0xe9, 0x1f, 0xa3, 0xd8, 0xdc, 0x4b, 0xce, 0xb1, - 0x05, 0x8d, 0x7c, 0x04, 0x64, 0xef, 0x18, 0xc5, 0x51, 0xc3, 0xa4, 0x0a, 0x65, 0xff, 0xcf, 0xc6, - 0xfe, 0xda, 0xe6, 0x2d, 0xe9, 0x6d, 0x5e, 0xf8, 0xbb, 0x4a, 0x5c, 0x91, 0x2e, 0x53, 0x30, 0xd7, - 0xd6, 0xdd, 0xf6, 0xaf, 0xed, 0xce, 0x1e, 0x9c, 0x7f, 0x3b, 0xec, 0x7c, 0xfc, 0x7e, 0x38, 0x16, - 0xd2, 0x9e, 0xce, 0xcb, 0xac, 0x02, 0x15, 0x9e, 0x48, 0xf8, 0x4c, 0xb0, 0x3e, 0xa3, 0xf6, 0x4d, - 0xcb, 0xd1, 0x19, 0x30, 0x0f, 0xd1, 0xb3, 0x27, 0xe7, 0xcb, 0x34, 0xba, 0x58, 0xa6, 0xd1, 0x8f, - 0x65, 0x1a, 0xbd, 0x5f, 0xa5, 0x9d, 0x8b, 0x55, 0xda, 0xf9, 0xba, 0x4a, 0x3b, 0xaf, 0xee, 0x7a, - 0x27, 0xd6, 0x67, 0x99, 0x04, 0xfa, 0x7a, 0xf3, 0xad, 0xbb, 0xa8, 0xb2, 0xeb, 0xb0, 0x47, 0xbf, - 0x02, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x5a, 0xc6, 0x92, 0x0f, 0x03, 0x00, 0x00, -} - -func (m *BudgetProposal) Marshal() (dAtA []byte, err error) { + 0x18, 0xcf, 0x51, 0x88, 0x54, 0x17, 0x21, 0x72, 0xaa, 0xc2, 0x25, 0x88, 0x6b, 0x08, 0x4b, 0x84, + 0x94, 0x33, 0x81, 0x0d, 0x58, 0x48, 0xc5, 0x58, 0x09, 0x1d, 0x9d, 0x58, 0x4e, 0xbe, 0x3b, 0xcb, + 0xb5, 0x7a, 0xf6, 0x77, 0xf2, 0xe7, 0x44, 0x30, 0xb0, 0xf0, 0x04, 0x3c, 0x07, 0x13, 0x03, 0x0f, + 0xd1, 0xb1, 0x62, 0x62, 0x02, 0x94, 0x0c, 0xbc, 0x05, 0x42, 0xb1, 0x4d, 0xd5, 0x2a, 0x12, 0x13, + 0xd3, 0x9d, 0x7f, 0xff, 0xfc, 0xfb, 0xac, 0x8f, 0x3c, 0xa8, 0x00, 0x15, 0x20, 0x6d, 0x0d, 0x58, + 0xa8, 0xa0, 0x69, 0x01, 0x1a, 0xba, 0x9c, 0xd1, 0x72, 0x51, 0x0b, 0x6e, 0x33, 0x07, 0xc7, 0x7d, + 0x2f, 0xca, 0x2e, 0x8b, 0xb2, 0xe5, 0x6c, 0xb8, 0x2f, 0x40, 0x80, 0x03, 0xe9, 0xe6, 0xcf, 0xf3, + 0xc3, 0x34, 0x44, 0x96, 0x0c, 0x39, 0x5d, 0xce, 0x4a, 0x6e, 0xd9, 0x8c, 0x56, 0x20, 0x75, 0xe0, + 0x07, 0x9e, 0x2f, 0xbc, 0xf1, 0x72, 0xf4, 0xf0, 0x4e, 0xb0, 0x2a, 0x14, 0x9b, 0x12, 0x0a, 0x85, + 0x27, 0xc6, 0xbf, 0x23, 0xd2, 0x3b, 0x42, 0x31, 0x77, 0xad, 0x5e, 0x19, 0x68, 0x01, 0x59, 0x13, + 0xbf, 0x24, 0x3d, 0xc3, 0x2b, 0xd9, 0x4a, 0xae, 0x6d, 0xc1, 0xea, 0xda, 0x70, 0xc4, 0x24, 0x1a, + 0x45, 0x93, 0xdd, 0x79, 0xf2, 0xf5, 0xcb, 0x74, 0x3f, 0x64, 0xbf, 0xf0, 0xcc, 0x6b, 0x6b, 0xa4, + 0x16, 0xf9, 0xed, 0x0b, 0x4b, 0xc0, 0xe3, 0xe7, 0xe4, 0xa6, 0x05, 0xcb, 0x9a, 0xc2, 0x0f, 0x9d, + 0x5c, 0x1b, 0x45, 0x93, 0xbd, 0xc7, 0x83, 0x2c, 0xd8, 0x37, 0x73, 0x64, 0x61, 0x8e, 0xec, 0x10, + 0xa4, 0xce, 0xf7, 0x9c, 0xdc, 0x97, 0x89, 0xef, 0x11, 0x82, 0x96, 0x19, 0x5b, 0x58, 0xa9, 0x78, + 0xb2, 0x33, 0x8a, 0x26, 0x3b, 0xf9, 0xae, 0x43, 0x8e, 0xa5, 0xe2, 0xf1, 0x94, 0xc4, 0x86, 0x2b, + 0x26, 0xb5, 0xd4, 0xa2, 0xb0, 0x86, 0xe9, 0xea, 0x84, 0x63, 0x72, 0xdd, 0xc9, 0x7a, 0x17, 0xcc, + 0x71, 0x20, 0xe2, 0x3e, 0xe9, 0xb6, 0xdc, 0x48, 0xa8, 0x93, 0x1b, 0x4e, 0x12, 0x4e, 0xe3, 0xbb, + 0x64, 0xb0, 0x35, 0x7f, 0xce, 0xb1, 0x05, 0x8d, 0x7c, 0x0c, 0xe4, 0xd6, 0x11, 0x8a, 0xc3, 0x86, + 0x49, 0x15, 0x4a, 0xfd, 0x9f, 0x97, 0x79, 0xda, 0xff, 0xf0, 0xeb, 0xf3, 0xc3, 0xed, 0xa4, 0xf1, + 0x7b, 0xd2, 0xbf, 0x7a, 0xe1, 0xdf, 0x2a, 0x71, 0x45, 0xba, 0x4c, 0xc1, 0x42, 0x5b, 0x77, 0xdb, + 0xbf, 0x5e, 0x71, 0xfe, 0xe8, 0xec, 0xfb, 0x41, 0xe7, 0xd3, 0x8f, 0x83, 0x89, 0x90, 0xf6, 0x64, + 0x51, 0x66, 0x15, 0xa8, 0xb0, 0x0d, 0xe1, 0x33, 0xc5, 0xfa, 0x94, 0xda, 0x77, 0x2d, 0x47, 0x67, + 0xc0, 0x3c, 0x44, 0xcf, 0x9f, 0x9d, 0xad, 0xd2, 0xe8, 0x7c, 0x95, 0x46, 0x3f, 0x57, 0x69, 0xf4, + 0x71, 0x9d, 0x76, 0xce, 0xd7, 0x69, 0xe7, 0xdb, 0x3a, 0xed, 0xbc, 0xb9, 0xef, 0x9d, 0x58, 0x9f, + 0x66, 0x12, 0xe8, 0xdb, 0xab, 0x6b, 0xed, 0xa2, 0xca, 0xae, 0xc3, 0x9e, 0xfc, 0x09, 0x00, 0x00, + 0xff, 0xff, 0xb1, 0x01, 0xda, 0xf6, 0xfa, 0x02, 0x00, 0x00, +} + +func (m *MsgBudgetProposal) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -293,12 +293,12 @@ func (m *BudgetProposal) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *BudgetProposal) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgBudgetProposal) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *BudgetProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgBudgetProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -437,7 +437,7 @@ func encodeVarintBudget(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *BudgetProposal) Size() (n int) { +func (m *MsgBudgetProposal) Size() (n int) { if m == nil { return 0 } @@ -502,7 +502,7 @@ func sovBudget(x uint64) (n int) { func sozBudget(x uint64) (n int) { return sovBudget(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *BudgetProposal) Unmarshal(dAtA []byte) error { +func (m *MsgBudgetProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -525,10 +525,10 @@ func (m *BudgetProposal) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BudgetProposal: wiretype end group for non-group") + return fmt.Errorf("proto: MsgBudgetProposal: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BudgetProposal: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgBudgetProposal: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: From 9770289c0b95dd27ce1689515b990330c6def7a3 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Fri, 13 Oct 2023 17:19:45 +0530 Subject: [PATCH 13/69] address review comments: lazy code --- x/gov/client/cli/prompt.go | 2 +- x/protocolpool/abci.go | 73 -------------------------- x/protocolpool/keeper/keeper.go | 79 ++++++++++++++++++----------- x/protocolpool/keeper/msg_server.go | 2 +- x/protocolpool/types/codec.go | 2 +- x/protocolpool/types/keys.go | 5 +- 6 files changed, 54 insertions(+), 109 deletions(-) delete mode 100644 x/protocolpool/abci.go diff --git a/x/gov/client/cli/prompt.go b/x/gov/client/cli/prompt.go index 919c14699b6e..6d114823fc82 100644 --- a/x/gov/client/cli/prompt.go +++ b/x/gov/client/cli/prompt.go @@ -46,7 +46,7 @@ var suggestedProposalTypes = []proposalType{ }, { Name: "set-budget", - MsgType: "/cosmos.protocolpool.v1.BudgetProposal", + MsgType: "/cosmos.protocolpool.v1.MsgBudgetProposal", }, { Name: proposalOther, diff --git a/x/protocolpool/abci.go b/x/protocolpool/abci.go deleted file mode 100644 index 9719ac39021c..000000000000 --- a/x/protocolpool/abci.go +++ /dev/null @@ -1,73 +0,0 @@ -package protocolpool - -import ( - "fmt" - - "cosmossdk.io/x/protocolpool/keeper" - "cosmossdk.io/x/protocolpool/types" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func EndBlocker(ctx sdk.Context, k keeper.Keeper, authKeeper types.AccountKeeper) error { - err := k.BudgetProposal.Walk(ctx, nil, func(key sdk.AccAddress, budget types.BudgetProposal) (stop bool, err error) { - // check if the distribution is completed - if budget.RemainingTranches <= 0 { - // Log the end of the budget - k.Logger(ctx).Info(fmt.Sprintf("Budget ended for recipient: %s", key.String())) - return false, nil // Continue iterating - } - - currentTime := ctx.BlockTime().Unix() - - // Check if the start time is reached - if currentTime < budget.StartTime { - return false, fmt.Errorf("distribution has not started yet") - } - - // Calculate the number of blocks elapsed since the start time - blocksElapsed := ctx.BlockHeight() - budget.Period - - // Check if its time to distribute funds based on period intervals - if blocksElapsed > 0 && blocksElapsed%budget.Period == 0 { - // Calculate the amount to distribute in each tranche - amountPerTranche := budget.TotalBudget.Amount.QuoRaw(budget.RemainingTranches) - amount := sdk.NewCoin(budget.TotalBudget.Denom, amountPerTranche) - - recipient, err := authKeeper.AddressCodec().StringToBytes(budget.RecipientAddress) - if err != nil { - return false, err - } - - distributionInfo := types.DistributionInfo{ - Address: recipient, - Amount: amount, - } - - // store funds in the DistributionInfo until a claim tx - err = k.AppendDistributionInfo(ctx, distributionInfo) - if err != nil { - return false, err - } - - // update the budget's remaining tranches - budget.RemainingTranches-- - - // update the TotalBudget amount - budget.TotalBudget.Amount.Sub(amountPerTranche) - - k.Logger(ctx).Info(fmt.Sprintf("Processing budget for recipient: %s. Amount: %s", budget.RecipientAddress, amountPerTranche.String())) - - // Save the updated budget in the state - err = k.BudgetProposal.Set(ctx, recipient, budget) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Error while updating the budget for recipient %s", budget.RecipientAddress)) - return false, err - } - - } - return false, nil - }) - - return err -} diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 720b29dc2a77..cf3a7d1d8679 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -9,6 +9,7 @@ import ( storetypes "cosmossdk.io/core/store" errorsmod "cosmossdk.io/errors" "cosmossdk.io/log" + "cosmossdk.io/math" "cosmossdk.io/x/protocolpool/types" "github.com/cosmos/cosmos-sdk/codec" @@ -27,8 +28,7 @@ type Keeper struct { // State Schema collections.Schema - BudgetProposal collections.Map[sdk.AccAddress, types.BudgetProposal] - DistrInfo collections.Map[sdk.AccAddress, sdk.Coin] + BudgetProposal collections.Map[sdk.AccAddress, types.MsgBudgetProposal] } func NewKeeper(cdc codec.BinaryCodec, storeService storetypes.KVStoreService, @@ -46,8 +46,7 @@ func NewKeeper(cdc codec.BinaryCodec, storeService storetypes.KVStoreService, bankKeeper: bk, cdc: cdc, authority: authority, - BudgetProposal: collections.NewMap(sb, types.BudgetKey, "budget", sdk.AccAddressKey, codec.CollValue[types.BudgetProposal](cdc)), - DistrInfo: collections.NewMap(sb, types.DistrInfoKey, "distribution_info", sdk.AccAddressKey, codec.CollValue[sdk.Coin](cdc)), + BudgetProposal: collections.NewMap(sb, types.BudgetKey, "budget", sdk.AccAddressKey, codec.CollValue[types.MsgBudgetProposal](cdc)), } schema, err := sb.Build() @@ -90,22 +89,6 @@ func (k Keeper) GetCommunityPool(ctx context.Context) (sdk.Coins, error) { return k.bankKeeper.GetAllBalances(ctx, moduleAccount.GetAddress()), nil } -func (k Keeper) AppendDistributionInfo(ctx sdk.Context, distributionInfo types.DistributionInfo) error { - amount, err := k.DistrInfo.Get(ctx, distributionInfo.Address) - if err != nil { - if errors.Is(err, collections.ErrNotFound) { - err := k.DistrInfo.Set(ctx, distributionInfo.Address, distributionInfo.Amount) - if err != nil { - return err - } - } else { - return err - } - } - updatedAmount := distributionInfo.Amount.Add(amount) - return k.DistrInfo.Set(ctx, distributionInfo.Address, updatedAmount) -} - func (k Keeper) ClaimFunds(ctx context.Context, recipient sdk.AccAddress) (amount sdk.Coin, err error) { // get claimable funds from distribution info amount, err = k.getClaimableFunds(ctx, recipient) @@ -119,27 +102,65 @@ func (k Keeper) ClaimFunds(ctx context.Context, recipient sdk.AccAddress) (amoun return sdk.Coin{}, err } - // remove the recipient from the DistributionInfo - err = k.DistrInfo.Remove(ctx, recipient) - if err != nil { - return sdk.Coin{}, err - } - return amount, nil } func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) (amount sdk.Coin, err error) { - amount, err = k.DistrInfo.Get(ctx, recipient) + sdkCtx := sdk.UnwrapSDKContext(ctx) + + budget, err := k.BudgetProposal.Get(ctx, recipient) if err != nil { if errors.Is(err, collections.ErrNotFound) { return sdk.Coin{}, fmt.Errorf("no claimable funds are present for recipient: %s", recipient.String()) } return sdk.Coin{}, err } - return amount, nil + + // check if the distribution is completed + if budget.RemainingTranches <= 0 { + // Log the end of the budget + k.Logger(ctx).Info(fmt.Sprintf("Budget ended for recipient: %s", recipient.String())) + return sdk.Coin{}, nil + } + + currentTime := sdkCtx.BlockTime().Unix() + + // Check if the start time is reached + if currentTime < budget.StartTime { + return sdk.Coin{}, fmt.Errorf("distribution has not started yet") + } + + // Calculate the number of blocks elapsed since the start time + blocksElapsed := sdkCtx.BlockHeight() - budget.Period + + // Check if its time to distribute funds based on period intervals + if blocksElapsed > 0 && blocksElapsed%budget.Period == 0 { + // Calculate how many periods have passed + periodsPassed := blocksElapsed / budget.Period + + // Calculate the amount to distribute for all passed periods + coinsToDistribute := math.NewInt(periodsPassed).Mul(budget.TotalBudget.Amount.QuoRaw(budget.RemainingTranches)) + amount := sdk.NewCoin(budget.TotalBudget.Denom, coinsToDistribute) + + // update the budget's remaining tranches + budget.RemainingTranches -= periodsPassed + + // update the TotalBudget amount + budget.TotalBudget.Amount.Sub(coinsToDistribute) + + k.Logger(ctx).Info(fmt.Sprintf("Processing budget for recipient: %s. Amount: %s", budget.RecipientAddress, coinsToDistribute.String())) + + // Save the updated budget in the state + err = k.BudgetProposal.Set(ctx, recipient, budget) + if err != nil { + return sdk.Coin{}, fmt.Errorf("error while updating the budget for recipient %s", budget.RecipientAddress) + } + + return amount, nil + } } -func (k Keeper) validateBudgetProposal(ctx context.Context, bp types.BudgetProposal) error { +func (k Keeper) validateBudgetProposal(ctx context.Context, bp types.MsgBudgetProposal) error { account := k.authKeeper.GetAccount(ctx, sdk.AccAddress(bp.RecipientAddress)) if account == nil { return fmt.Errorf("account not found: %s", bp.RecipientAddress) diff --git a/x/protocolpool/keeper/msg_server.go b/x/protocolpool/keeper/msg_server.go index 18372ec63023..f7e8cbffdc15 100644 --- a/x/protocolpool/keeper/msg_server.go +++ b/x/protocolpool/keeper/msg_server.go @@ -36,7 +36,7 @@ func (k MsgServer) MsgClaimBudget(ctx context.Context, msg *types.MsgClaimBudget return &types.MsgClaimBudgetResponse{Amount: amount}, nil } -func (k MsgServer) SubmitBudgetProposal(ctx context.Context, msg *types.BudgetProposal) (*types.MsgBudgetProposalResponse, error) { +func (k MsgServer) SubmitBudgetProposal(ctx context.Context, msg *types.MsgBudgetProposal) (*types.MsgBudgetProposalResponse, error) { recipient, err := k.Keeper.authKeeper.AddressCodec().StringToBytes(msg.RecipientAddress) if err != nil { return nil, err diff --git a/x/protocolpool/types/codec.go b/x/protocolpool/types/codec.go index ca4fa9203c4a..9fcc7276eaf7 100644 --- a/x/protocolpool/types/codec.go +++ b/x/protocolpool/types/codec.go @@ -11,7 +11,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { (*sdk.Msg)(nil), &MsgFundCommunityPool{}, &MsgCommunityPoolSpend{}, - &BudgetProposal{}, + &MsgBudgetProposal{}, &MsgClaimBudget{}, ) diff --git a/x/protocolpool/types/keys.go b/x/protocolpool/types/keys.go index 78ac63aea657..fd07141360c1 100644 --- a/x/protocolpool/types/keys.go +++ b/x/protocolpool/types/keys.go @@ -16,7 +16,4 @@ const ( GovModuleName = "gov" ) -var ( - BudgetKey = collections.NewPrefix(0) - DistrInfoKey = collections.NewPrefix(1) -) +var BudgetKey = collections.NewPrefix(0) From 4ef244615eb8e7e6444b76b53b98483dbb09f29f Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Fri, 13 Oct 2023 17:47:51 +0530 Subject: [PATCH 14/69] wip: fix --- x/protocolpool/keeper/keeper.go | 34 +++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index cf3a7d1d8679..1f77f4b51395 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -134,30 +134,36 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) blocksElapsed := sdkCtx.BlockHeight() - budget.Period // Check if its time to distribute funds based on period intervals - if blocksElapsed > 0 && blocksElapsed%budget.Period == 0 { + if blocksElapsed > 0 { // Calculate how many periods have passed periodsPassed := blocksElapsed / budget.Period - // Calculate the amount to distribute for all passed periods - coinsToDistribute := math.NewInt(periodsPassed).Mul(budget.TotalBudget.Amount.QuoRaw(budget.RemainingTranches)) - amount := sdk.NewCoin(budget.TotalBudget.Denom, coinsToDistribute) + if periodsPassed > 0 { + // Calculate the amount to distribute for all passed periods + coinsToDistribute := math.NewInt(periodsPassed).Mul(budget.TotalBudget.Amount.QuoRaw(budget.RemainingTranches)) + amount := sdk.NewCoin(budget.TotalBudget.Denom, coinsToDistribute) - // update the budget's remaining tranches - budget.RemainingTranches -= periodsPassed + // update the budget's remaining tranches + budget.RemainingTranches -= periodsPassed - // update the TotalBudget amount - budget.TotalBudget.Amount.Sub(coinsToDistribute) + // update the TotalBudget amount + budget.TotalBudget.Amount.Sub(coinsToDistribute) - k.Logger(ctx).Info(fmt.Sprintf("Processing budget for recipient: %s. Amount: %s", budget.RecipientAddress, coinsToDistribute.String())) + k.Logger(ctx).Info(fmt.Sprintf("Processing budget for recipient: %s. Amount: %s", budget.RecipientAddress, coinsToDistribute.String())) - // Save the updated budget in the state - err = k.BudgetProposal.Set(ctx, recipient, budget) - if err != nil { - return sdk.Coin{}, fmt.Errorf("error while updating the budget for recipient %s", budget.RecipientAddress) + // Save the updated budget in the state + err = k.BudgetProposal.Set(ctx, recipient, budget) + if err != nil { + return sdk.Coin{}, fmt.Errorf("error while updating the budget for recipient %s", budget.RecipientAddress) + } + + return amount, nil + } else { + return sdk.Coin{}, fmt.Errorf("budget period has not passed yet") } - return amount, nil } + return sdk.Coin{}, nil } func (k Keeper) validateBudgetProposal(ctx context.Context, bp types.MsgBudgetProposal) error { From 8cd795cbaa1c728fc3884d2ec10923501cc72a7c Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Fri, 13 Oct 2023 17:54:22 +0530 Subject: [PATCH 15/69] fix tests --- x/protocolpool/module.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/x/protocolpool/module.go b/x/protocolpool/module.go index 914fb3da4040..2001029e91cc 100644 --- a/x/protocolpool/module.go +++ b/x/protocolpool/module.go @@ -16,7 +16,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -30,7 +29,6 @@ var ( _ module.AppModule = AppModule{} _ module.AppModuleSimulation = AppModule{} - _ appmodule.HasEndBlocker = AppModule{} ) // AppModuleBasic defines the basic application module used by the pool module. @@ -94,12 +92,6 @@ func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } -// EndBlock implements the protocolpool module's EndBlock. -func (am AppModule) EndBlock(ctx context.Context) error { - c := sdk.UnwrapSDKContext(ctx) - return EndBlocker(c, am.keeper, am.accountKeeper) -} - // // App Wiring Setup // From a9d6f72ef8ec079127db9d76f75bd084095f62c4 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Fri, 13 Oct 2023 19:05:56 +0530 Subject: [PATCH 16/69] wip: address review comments --- proto/cosmos/protocolpool/v1/budget.proto | 45 ---------------------- proto/cosmos/protocolpool/v1/tx.proto | 47 ++++++++++++++++++++++- x/gov/client/cli/prompt.go | 2 +- x/protocolpool/keeper/msg_server.go | 8 +++- 4 files changed, 53 insertions(+), 49 deletions(-) delete mode 100644 proto/cosmos/protocolpool/v1/budget.proto diff --git a/proto/cosmos/protocolpool/v1/budget.proto b/proto/cosmos/protocolpool/v1/budget.proto deleted file mode 100644 index c270c57ed870..000000000000 --- a/proto/cosmos/protocolpool/v1/budget.proto +++ /dev/null @@ -1,45 +0,0 @@ -// Since: cosmos-sdk 0.50 -syntax = "proto3"; -package cosmos.protocolpool.v1; - -option go_package = "cosmossdk.io/x/protocolpool/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; - -// Budget defines budget proposal type. -// -// Since: cosmos-sdk 0.50 -message MsgBudgetProposal { - string recipient_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - cosmos.base.v1beta1.Coin total_budget = 2; - int64 start_time = 3; - int64 remaining_tranches = 4; - int64 period = 5; -} - -// MsgBudgetProposalResponse defines the response to executing a -// MsgBudgetProposal message. -// -// Since: cosmos-sdk 0.50 -message MsgBudgetProposalResponse {} - -// MsgClaimBudget defines a message for claiming the distributed budget. -// -// Since: cosmos-sdk 0.50 -message MsgClaimBudget { - option (cosmos.msg.v1.signer) = "recipient_address"; - string recipient_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgClaimBudgetResponse defines the response to executing a -// MsgClaimBudget message. -// -// Since: cosmos-sdk 0.50 -message MsgClaimBudgetResponse { - cosmos.base.v1beta1.Coin amount = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - ; -} diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index cf4c61954b46..e8483b9697be 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -26,6 +26,13 @@ service Msg { // // Since: cosmos-sdk 0.50 rpc CommunityPoolSpend(MsgCommunityPoolSpend) returns (MsgCommunityPoolSpendResponse); + + // SubmitMsgBudgetProposal defines a method to set a budget proposal. + rpc SubmitMsgBudgetProposal(MsgBudgetProposal) returns (MsgBudgetProposalResponse); + + // ClaimBudget defines a method to claim the distributed budget. + rpc ClaimBudget(MsgClaimBudget) returns (MsgClaimBudgetResponse); + } // MsgFundCommunityPool allows an account to directly @@ -62,4 +69,42 @@ message MsgCommunityPoolSpend { // MsgCommunityPoolSpend message. // // Since: cosmos-sdk 0.50 -message MsgCommunityPoolSpendResponse {} \ No newline at end of file +message MsgCommunityPoolSpendResponse {} + + +// Budget defines budget proposal type. +// +// Since: cosmos-sdk 0.51 +message MsgBudgetProposal { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + cosmos.base.v1beta1.Coin total_budget = 3; + int64 start_time = 4; + int64 remaining_tranches = 5; + int64 period = 6; +} + +// MsgBudgetProposalResponse defines the response to executing a +// MsgBudgetProposal message. +// +// Since: cosmos-sdk 0.51 +message MsgBudgetProposalResponse {} + +// MsgClaimBudget defines a message for claiming the distributed budget. +// +// Since: cosmos-sdk 0.51 +message MsgClaimBudget { + option (cosmos.msg.v1.signer) = "recipient_address"; + string recipient_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgClaimBudgetResponse defines the response to executing a +// MsgClaimBudget message. +// +// Since: cosmos-sdk 0.51 +message MsgClaimBudgetResponse { + cosmos.base.v1beta1.Coin amount = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + ; +} diff --git a/x/gov/client/cli/prompt.go b/x/gov/client/cli/prompt.go index 6d114823fc82..5ee441c5e771 100644 --- a/x/gov/client/cli/prompt.go +++ b/x/gov/client/cli/prompt.go @@ -45,7 +45,7 @@ var suggestedProposalTypes = []proposalType{ MsgType: "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", }, { - Name: "set-budget", + Name: "set-budget-proposal", MsgType: "/cosmos.protocolpool.v1.MsgBudgetProposal", }, { diff --git a/x/protocolpool/keeper/msg_server.go b/x/protocolpool/keeper/msg_server.go index f7e8cbffdc15..8723a34ab61b 100644 --- a/x/protocolpool/keeper/msg_server.go +++ b/x/protocolpool/keeper/msg_server.go @@ -22,7 +22,7 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { return &MsgServer{Keeper: keeper} } -func (k MsgServer) MsgClaimBudget(ctx context.Context, msg *types.MsgClaimBudget) (*types.MsgClaimBudgetResponse, error) { +func (k MsgServer) ClaimBudget(ctx context.Context, msg *types.MsgClaimBudget) (*types.MsgClaimBudgetResponse, error) { recipient, err := k.Keeper.authKeeper.AddressCodec().StringToBytes(msg.RecipientAddress) if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid recipient address: %s", err) @@ -36,7 +36,11 @@ func (k MsgServer) MsgClaimBudget(ctx context.Context, msg *types.MsgClaimBudget return &types.MsgClaimBudgetResponse{Amount: amount}, nil } -func (k MsgServer) SubmitBudgetProposal(ctx context.Context, msg *types.MsgBudgetProposal) (*types.MsgBudgetProposalResponse, error) { +func (k MsgServer) SubmitMsgBudgetProposal(ctx context.Context, msg *types.MsgBudgetProposal) (*types.MsgBudgetProposalResponse, error) { + if err := k.validateAuthority(msg.Authority); err != nil { + return nil, err + } + recipient, err := k.Keeper.authKeeper.AddressCodec().StringToBytes(msg.RecipientAddress) if err != nil { return nil, err From c8b78daac6b3a8df241cd085c93a3189635a3f11 Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Fri, 13 Oct 2023 13:45:01 +0000 Subject: [PATCH 17/69] run proto-gen & remove since comments --- api/cosmos/protocolpool/v1/budget.pulsar.go | 2231 ------------------ api/cosmos/protocolpool/v1/query.pulsar.go | 2 - api/cosmos/protocolpool/v1/query_grpc.pb.go | 2 - api/cosmos/protocolpool/v1/tx.pulsar.go | 2297 ++++++++++++++++++- api/cosmos/protocolpool/v1/tx_grpc.pb.go | 92 +- proto/cosmos/protocolpool/v1/query.proto | 1 - proto/cosmos/protocolpool/v1/tx.proto | 21 +- x/protocolpool/types/tx.pb.go | 1084 ++++++++- 8 files changed, 3336 insertions(+), 2394 deletions(-) delete mode 100644 api/cosmos/protocolpool/v1/budget.pulsar.go diff --git a/api/cosmos/protocolpool/v1/budget.pulsar.go b/api/cosmos/protocolpool/v1/budget.pulsar.go deleted file mode 100644 index a1d5988bccad..000000000000 --- a/api/cosmos/protocolpool/v1/budget.pulsar.go +++ /dev/null @@ -1,2231 +0,0 @@ -// 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" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_MsgBudgetProposal protoreflect.MessageDescriptor - fd_MsgBudgetProposal_recipient_address protoreflect.FieldDescriptor - fd_MsgBudgetProposal_total_budget protoreflect.FieldDescriptor - fd_MsgBudgetProposal_start_time protoreflect.FieldDescriptor - fd_MsgBudgetProposal_remaining_tranches protoreflect.FieldDescriptor - fd_MsgBudgetProposal_period protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_protocolpool_v1_budget_proto_init() - md_MsgBudgetProposal = File_cosmos_protocolpool_v1_budget_proto.Messages().ByName("MsgBudgetProposal") - fd_MsgBudgetProposal_recipient_address = md_MsgBudgetProposal.Fields().ByName("recipient_address") - fd_MsgBudgetProposal_total_budget = md_MsgBudgetProposal.Fields().ByName("total_budget") - fd_MsgBudgetProposal_start_time = md_MsgBudgetProposal.Fields().ByName("start_time") - fd_MsgBudgetProposal_remaining_tranches = md_MsgBudgetProposal.Fields().ByName("remaining_tranches") - fd_MsgBudgetProposal_period = md_MsgBudgetProposal.Fields().ByName("period") -} - -var _ protoreflect.Message = (*fastReflection_MsgBudgetProposal)(nil) - -type fastReflection_MsgBudgetProposal MsgBudgetProposal - -func (x *MsgBudgetProposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgBudgetProposal)(x) -} - -func (x *MsgBudgetProposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_protocolpool_v1_budget_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_MsgBudgetProposal_messageType fastReflection_MsgBudgetProposal_messageType -var _ protoreflect.MessageType = fastReflection_MsgBudgetProposal_messageType{} - -type fastReflection_MsgBudgetProposal_messageType struct{} - -func (x fastReflection_MsgBudgetProposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgBudgetProposal)(nil) -} -func (x fastReflection_MsgBudgetProposal_messageType) New() protoreflect.Message { - return new(fastReflection_MsgBudgetProposal) -} -func (x fastReflection_MsgBudgetProposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBudgetProposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgBudgetProposal) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBudgetProposal -} - -// 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_MsgBudgetProposal) Type() protoreflect.MessageType { - return _fastReflection_MsgBudgetProposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgBudgetProposal) New() protoreflect.Message { - return new(fastReflection_MsgBudgetProposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgBudgetProposal) Interface() protoreflect.ProtoMessage { - return (*MsgBudgetProposal)(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_MsgBudgetProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.RecipientAddress != "" { - value := protoreflect.ValueOfString(x.RecipientAddress) - if !f(fd_MsgBudgetProposal_recipient_address, value) { - return - } - } - if x.TotalBudget != nil { - value := protoreflect.ValueOfMessage(x.TotalBudget.ProtoReflect()) - if !f(fd_MsgBudgetProposal_total_budget, value) { - return - } - } - if x.StartTime != int64(0) { - value := protoreflect.ValueOfInt64(x.StartTime) - if !f(fd_MsgBudgetProposal_start_time, value) { - return - } - } - if x.RemainingTranches != int64(0) { - value := protoreflect.ValueOfInt64(x.RemainingTranches) - if !f(fd_MsgBudgetProposal_remaining_tranches, value) { - return - } - } - if x.Period != int64(0) { - value := protoreflect.ValueOfInt64(x.Period) - if !f(fd_MsgBudgetProposal_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_MsgBudgetProposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": - return x.RecipientAddress != "" - case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": - return x.TotalBudget != nil - case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": - return x.StartTime != int64(0) - case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": - return x.RemainingTranches != int64(0) - case "cosmos.protocolpool.v1.MsgBudgetProposal.period": - return x.Period != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal 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_MsgBudgetProposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": - x.RecipientAddress = "" - case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": - x.TotalBudget = nil - case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": - x.StartTime = int64(0) - case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": - x.RemainingTranches = int64(0) - case "cosmos.protocolpool.v1.MsgBudgetProposal.period": - x.Period = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal 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_MsgBudgetProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": - value := x.RecipientAddress - return protoreflect.ValueOfString(value) - case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": - value := x.TotalBudget - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": - value := x.StartTime - return protoreflect.ValueOfInt64(value) - case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": - value := x.RemainingTranches - return protoreflect.ValueOfInt64(value) - case "cosmos.protocolpool.v1.MsgBudgetProposal.period": - value := x.Period - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal 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_MsgBudgetProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": - x.RecipientAddress = value.Interface().(string) - case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": - x.TotalBudget = value.Message().Interface().(*v1beta1.Coin) - case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": - x.StartTime = value.Int() - case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": - x.RemainingTranches = value.Int() - case "cosmos.protocolpool.v1.MsgBudgetProposal.period": - x.Period = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal 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_MsgBudgetProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": - if x.TotalBudget == nil { - x.TotalBudget = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.TotalBudget.ProtoReflect()) - case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": - panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) - case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": - panic(fmt.Errorf("field start_time of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) - case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": - panic(fmt.Errorf("field remaining_tranches of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) - case "cosmos.protocolpool.v1.MsgBudgetProposal.period": - panic(fmt.Errorf("field period of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal 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_MsgBudgetProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": - return protoreflect.ValueOfString("") - case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.protocolpool.v1.MsgBudgetProposal.period": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal 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_MsgBudgetProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgBudgetProposal", 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_MsgBudgetProposal) 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_MsgBudgetProposal) 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_MsgBudgetProposal) 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_MsgBudgetProposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgBudgetProposal) - 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.TotalBudget != nil { - l = options.Size(x.TotalBudget) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.StartTime != 0 { - n += 1 + runtime.Sov(uint64(x.StartTime)) - } - if x.RemainingTranches != 0 { - n += 1 + runtime.Sov(uint64(x.RemainingTranches)) - } - if x.Period != 0 { - n += 1 + runtime.Sov(uint64(x.Period)) - } - 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().(*MsgBudgetProposal) - 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 != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) - i-- - dAtA[i] = 0x28 - } - if x.RemainingTranches != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.RemainingTranches)) - i-- - dAtA[i] = 0x20 - } - if x.StartTime != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.StartTime)) - i-- - dAtA[i] = 0x18 - } - if x.TotalBudget != nil { - encoded, err := options.Marshal(x.TotalBudget) - 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().(*MsgBudgetProposal) - 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: MsgBudgetProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBudgetProposal: 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 TotalBudget", 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.TotalBudget == nil { - x.TotalBudget = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalBudget); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) - } - x.StartTime = 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.StartTime |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RemainingTranches", wireType) - } - x.RemainingTranches = 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.RemainingTranches |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) - } - x.Period = 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.Period |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgBudgetProposalResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_protocolpool_v1_budget_proto_init() - md_MsgBudgetProposalResponse = File_cosmos_protocolpool_v1_budget_proto.Messages().ByName("MsgBudgetProposalResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgBudgetProposalResponse)(nil) - -type fastReflection_MsgBudgetProposalResponse MsgBudgetProposalResponse - -func (x *MsgBudgetProposalResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgBudgetProposalResponse)(x) -} - -func (x *MsgBudgetProposalResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_protocolpool_v1_budget_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_MsgBudgetProposalResponse_messageType fastReflection_MsgBudgetProposalResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgBudgetProposalResponse_messageType{} - -type fastReflection_MsgBudgetProposalResponse_messageType struct{} - -func (x fastReflection_MsgBudgetProposalResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgBudgetProposalResponse)(nil) -} -func (x fastReflection_MsgBudgetProposalResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgBudgetProposalResponse) -} -func (x fastReflection_MsgBudgetProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBudgetProposalResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgBudgetProposalResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBudgetProposalResponse -} - -// 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_MsgBudgetProposalResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgBudgetProposalResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgBudgetProposalResponse) New() protoreflect.Message { - return new(fastReflection_MsgBudgetProposalResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgBudgetProposalResponse) Interface() protoreflect.ProtoMessage { - return (*MsgBudgetProposalResponse)(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_MsgBudgetProposalResponse) 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_MsgBudgetProposalResponse) 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.MsgBudgetProposalResponse")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse 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_MsgBudgetProposalResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposalResponse")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse 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_MsgBudgetProposalResponse) 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.MsgBudgetProposalResponse")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse 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_MsgBudgetProposalResponse) 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.MsgBudgetProposalResponse")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse 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_MsgBudgetProposalResponse) 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.MsgBudgetProposalResponse")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse 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_MsgBudgetProposalResponse) 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.MsgBudgetProposalResponse")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse 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_MsgBudgetProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgBudgetProposalResponse", 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_MsgBudgetProposalResponse) 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_MsgBudgetProposalResponse) 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_MsgBudgetProposalResponse) 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_MsgBudgetProposalResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgBudgetProposalResponse) - 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().(*MsgBudgetProposalResponse) - 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().(*MsgBudgetProposalResponse) - 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: MsgBudgetProposalResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBudgetProposalResponse: 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_budget_proto_init() - md_MsgClaimBudget = File_cosmos_protocolpool_v1_budget_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_budget_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_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_budget_proto_init() - md_MsgClaimBudgetResponse = File_cosmos_protocolpool_v1_budget_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_budget_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_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, - } -} - -// Since: cosmos-sdk 0.50 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/protocolpool/v1/budget.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 budget proposal type. -// -// Since: cosmos-sdk 0.50 -type MsgBudgetProposal 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"` - TotalBudget *v1beta1.Coin `protobuf:"bytes,2,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` - StartTime int64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - RemainingTranches int64 `protobuf:"varint,4,opt,name=remaining_tranches,json=remainingTranches,proto3" json:"remaining_tranches,omitempty"` - Period int64 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"` -} - -func (x *MsgBudgetProposal) Reset() { - *x = MsgBudgetProposal{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_protocolpool_v1_budget_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgBudgetProposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgBudgetProposal) ProtoMessage() {} - -// Deprecated: Use MsgBudgetProposal.ProtoReflect.Descriptor instead. -func (*MsgBudgetProposal) Descriptor() ([]byte, []int) { - return file_cosmos_protocolpool_v1_budget_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgBudgetProposal) GetRecipientAddress() string { - if x != nil { - return x.RecipientAddress - } - return "" -} - -func (x *MsgBudgetProposal) GetTotalBudget() *v1beta1.Coin { - if x != nil { - return x.TotalBudget - } - return nil -} - -func (x *MsgBudgetProposal) GetStartTime() int64 { - if x != nil { - return x.StartTime - } - return 0 -} - -func (x *MsgBudgetProposal) GetRemainingTranches() int64 { - if x != nil { - return x.RemainingTranches - } - return 0 -} - -func (x *MsgBudgetProposal) GetPeriod() int64 { - if x != nil { - return x.Period - } - return 0 -} - -// MsgBudgetProposalResponse defines the response to executing a -// MsgBudgetProposal message. -// -// Since: cosmos-sdk 0.50 -type MsgBudgetProposalResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgBudgetProposalResponse) Reset() { - *x = MsgBudgetProposalResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_protocolpool_v1_budget_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgBudgetProposalResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgBudgetProposalResponse) ProtoMessage() {} - -// Deprecated: Use MsgBudgetProposalResponse.ProtoReflect.Descriptor instead. -func (*MsgBudgetProposalResponse) Descriptor() ([]byte, []int) { - return file_cosmos_protocolpool_v1_budget_proto_rawDescGZIP(), []int{1} -} - -// MsgClaimBudget defines a message for claiming the distributed budget. -// -// Since: cosmos-sdk 0.50 -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_budget_proto_msgTypes[2] - 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_budget_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgClaimBudget) GetRecipientAddress() string { - if x != nil { - return x.RecipientAddress - } - return "" -} - -// MsgClaimBudgetResponse defines the response to executing a -// MsgClaimBudget message. -// -// Since: cosmos-sdk 0.50 -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_budget_proto_msgTypes[3] - 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_budget_proto_rawDescGZIP(), []int{3} -} - -func (x *MsgClaimBudgetResponse) GetAmount() *v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -var File_cosmos_protocolpool_v1_budget_proto protoreflect.FileDescriptor - -var file_cosmos_protocolpool_v1_budget_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 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, 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, 0x22, 0xfe, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x42, - 0x75, 0x64, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 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, 0x3c, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x75, - 0x64, 0x67, 0x65, 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, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, - 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x74, - 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x72, - 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 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, 0x42, 0xdb, 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, 0x0b, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 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_budget_proto_rawDescOnce sync.Once - file_cosmos_protocolpool_v1_budget_proto_rawDescData = file_cosmos_protocolpool_v1_budget_proto_rawDesc -) - -func file_cosmos_protocolpool_v1_budget_proto_rawDescGZIP() []byte { - file_cosmos_protocolpool_v1_budget_proto_rawDescOnce.Do(func() { - file_cosmos_protocolpool_v1_budget_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_protocolpool_v1_budget_proto_rawDescData) - }) - return file_cosmos_protocolpool_v1_budget_proto_rawDescData -} - -var file_cosmos_protocolpool_v1_budget_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_cosmos_protocolpool_v1_budget_proto_goTypes = []interface{}{ - (*MsgBudgetProposal)(nil), // 0: cosmos.protocolpool.v1.MsgBudgetProposal - (*MsgBudgetProposalResponse)(nil), // 1: cosmos.protocolpool.v1.MsgBudgetProposalResponse - (*MsgClaimBudget)(nil), // 2: cosmos.protocolpool.v1.MsgClaimBudget - (*MsgClaimBudgetResponse)(nil), // 3: cosmos.protocolpool.v1.MsgClaimBudgetResponse - (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin -} -var file_cosmos_protocolpool_v1_budget_proto_depIdxs = []int32{ - 4, // 0: cosmos.protocolpool.v1.MsgBudgetProposal.total_budget:type_name -> cosmos.base.v1beta1.Coin - 4, // 1: cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount:type_name -> cosmos.base.v1beta1.Coin - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_protocolpool_v1_budget_proto_init() } -func file_cosmos_protocolpool_v1_budget_proto_init() { - if File_cosmos_protocolpool_v1_budget_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_protocolpool_v1_budget_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgBudgetProposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_protocolpool_v1_budget_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgBudgetProposalResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_protocolpool_v1_budget_proto_msgTypes[2].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_budget_proto_msgTypes[3].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 - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_protocolpool_v1_budget_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_protocolpool_v1_budget_proto_goTypes, - DependencyIndexes: file_cosmos_protocolpool_v1_budget_proto_depIdxs, - MessageInfos: file_cosmos_protocolpool_v1_budget_proto_msgTypes, - }.Build() - File_cosmos_protocolpool_v1_budget_proto = out.File - file_cosmos_protocolpool_v1_budget_proto_rawDesc = nil - file_cosmos_protocolpool_v1_budget_proto_goTypes = nil - file_cosmos_protocolpool_v1_budget_proto_depIdxs = nil -} diff --git a/api/cosmos/protocolpool/v1/query.pulsar.go b/api/cosmos/protocolpool/v1/query.pulsar.go index 607f98c972c3..b662418c2c3f 100644 --- a/api/cosmos/protocolpool/v1/query.pulsar.go +++ b/api/cosmos/protocolpool/v1/query.pulsar.go @@ -865,8 +865,6 @@ func (x *fastReflection_QueryCommunityPoolResponse) ProtoMethods() *protoiface.M } } -// Since: cosmos-sdk 0.50 - // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 diff --git a/api/cosmos/protocolpool/v1/query_grpc.pb.go b/api/cosmos/protocolpool/v1/query_grpc.pb.go index f3d5020db973..dec2c11ea7f0 100644 --- a/api/cosmos/protocolpool/v1/query_grpc.pb.go +++ b/api/cosmos/protocolpool/v1/query_grpc.pb.go @@ -1,5 +1,3 @@ -// Since: cosmos-sdk 0.50 - // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 diff --git a/api/cosmos/protocolpool/v1/tx.pulsar.go b/api/cosmos/protocolpool/v1/tx.pulsar.go index c770e4e69c01..541a4a3a5942 100644 --- a/api/cosmos/protocolpool/v1/tx.pulsar.go +++ b/api/cosmos/protocolpool/v1/tx.pulsar.go @@ -1908,7 +1908,1923 @@ func (x *fastReflection_MsgCommunityPoolSpendResponse) ProtoMethods() *protoifac } } -// Since: cosmos-sdk 0.50 +var ( + md_MsgBudgetProposal protoreflect.MessageDescriptor + fd_MsgBudgetProposal_authority protoreflect.FieldDescriptor + fd_MsgBudgetProposal_recipient_address protoreflect.FieldDescriptor + fd_MsgBudgetProposal_total_budget protoreflect.FieldDescriptor + fd_MsgBudgetProposal_start_time protoreflect.FieldDescriptor + fd_MsgBudgetProposal_remaining_tranches protoreflect.FieldDescriptor + fd_MsgBudgetProposal_period protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgBudgetProposal = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgBudgetProposal") + fd_MsgBudgetProposal_authority = md_MsgBudgetProposal.Fields().ByName("authority") + fd_MsgBudgetProposal_recipient_address = md_MsgBudgetProposal.Fields().ByName("recipient_address") + fd_MsgBudgetProposal_total_budget = md_MsgBudgetProposal.Fields().ByName("total_budget") + fd_MsgBudgetProposal_start_time = md_MsgBudgetProposal.Fields().ByName("start_time") + fd_MsgBudgetProposal_remaining_tranches = md_MsgBudgetProposal.Fields().ByName("remaining_tranches") + fd_MsgBudgetProposal_period = md_MsgBudgetProposal.Fields().ByName("period") +} + +var _ protoreflect.Message = (*fastReflection_MsgBudgetProposal)(nil) + +type fastReflection_MsgBudgetProposal MsgBudgetProposal + +func (x *MsgBudgetProposal) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgBudgetProposal)(x) +} + +func (x *MsgBudgetProposal) 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_MsgBudgetProposal_messageType fastReflection_MsgBudgetProposal_messageType +var _ protoreflect.MessageType = fastReflection_MsgBudgetProposal_messageType{} + +type fastReflection_MsgBudgetProposal_messageType struct{} + +func (x fastReflection_MsgBudgetProposal_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgBudgetProposal)(nil) +} +func (x fastReflection_MsgBudgetProposal_messageType) New() protoreflect.Message { + return new(fastReflection_MsgBudgetProposal) +} +func (x fastReflection_MsgBudgetProposal_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBudgetProposal +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgBudgetProposal) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBudgetProposal +} + +// 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_MsgBudgetProposal) Type() protoreflect.MessageType { + return _fastReflection_MsgBudgetProposal_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgBudgetProposal) New() protoreflect.Message { + return new(fastReflection_MsgBudgetProposal) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgBudgetProposal) Interface() protoreflect.ProtoMessage { + return (*MsgBudgetProposal)(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_MsgBudgetProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgBudgetProposal_authority, value) { + return + } + } + if x.RecipientAddress != "" { + value := protoreflect.ValueOfString(x.RecipientAddress) + if !f(fd_MsgBudgetProposal_recipient_address, value) { + return + } + } + if x.TotalBudget != nil { + value := protoreflect.ValueOfMessage(x.TotalBudget.ProtoReflect()) + if !f(fd_MsgBudgetProposal_total_budget, value) { + return + } + } + if x.StartTime != int64(0) { + value := protoreflect.ValueOfInt64(x.StartTime) + if !f(fd_MsgBudgetProposal_start_time, value) { + return + } + } + if x.RemainingTranches != int64(0) { + value := protoreflect.ValueOfInt64(x.RemainingTranches) + if !f(fd_MsgBudgetProposal_remaining_tranches, value) { + return + } + } + if x.Period != int64(0) { + value := protoreflect.ValueOfInt64(x.Period) + if !f(fd_MsgBudgetProposal_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_MsgBudgetProposal) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgBudgetProposal.authority": + return x.Authority != "" + case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": + return x.RecipientAddress != "" + case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": + return x.TotalBudget != nil + case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": + return x.StartTime != int64(0) + case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": + return x.RemainingTranches != int64(0) + case "cosmos.protocolpool.v1.MsgBudgetProposal.period": + return x.Period != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal 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_MsgBudgetProposal) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgBudgetProposal.authority": + x.Authority = "" + case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": + x.RecipientAddress = "" + case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": + x.TotalBudget = nil + case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": + x.StartTime = int64(0) + case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": + x.RemainingTranches = int64(0) + case "cosmos.protocolpool.v1.MsgBudgetProposal.period": + x.Period = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal 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_MsgBudgetProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.MsgBudgetProposal.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": + value := x.RecipientAddress + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": + value := x.TotalBudget + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": + value := x.StartTime + return protoreflect.ValueOfInt64(value) + case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": + value := x.RemainingTranches + return protoreflect.ValueOfInt64(value) + case "cosmos.protocolpool.v1.MsgBudgetProposal.period": + value := x.Period + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal 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_MsgBudgetProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgBudgetProposal.authority": + x.Authority = value.Interface().(string) + case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": + x.RecipientAddress = value.Interface().(string) + case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": + x.TotalBudget = value.Message().Interface().(*v1beta1.Coin) + case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": + x.StartTime = value.Int() + case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": + x.RemainingTranches = value.Int() + case "cosmos.protocolpool.v1.MsgBudgetProposal.period": + x.Period = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal 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_MsgBudgetProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": + if x.TotalBudget == nil { + x.TotalBudget = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.TotalBudget.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgBudgetProposal.authority": + panic(fmt.Errorf("field authority of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": + panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": + panic(fmt.Errorf("field start_time of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": + panic(fmt.Errorf("field remaining_tranches of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgBudgetProposal.period": + panic(fmt.Errorf("field period of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal 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_MsgBudgetProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgBudgetProposal.authority": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.protocolpool.v1.MsgBudgetProposal.period": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal 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_MsgBudgetProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgBudgetProposal", 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_MsgBudgetProposal) 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_MsgBudgetProposal) 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_MsgBudgetProposal) 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_MsgBudgetProposal) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgBudgetProposal) + 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.TotalBudget != nil { + l = options.Size(x.TotalBudget) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.StartTime != 0 { + n += 1 + runtime.Sov(uint64(x.StartTime)) + } + if x.RemainingTranches != 0 { + n += 1 + runtime.Sov(uint64(x.RemainingTranches)) + } + if x.Period != 0 { + n += 1 + runtime.Sov(uint64(x.Period)) + } + 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().(*MsgBudgetProposal) + 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 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) + i-- + dAtA[i] = 0x30 + } + if x.RemainingTranches != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.RemainingTranches)) + i-- + dAtA[i] = 0x28 + } + if x.StartTime != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.StartTime)) + i-- + dAtA[i] = 0x20 + } + if x.TotalBudget != nil { + encoded, err := options.Marshal(x.TotalBudget) + 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().(*MsgBudgetProposal) + 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: MsgBudgetProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBudgetProposal: 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 TotalBudget", 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.TotalBudget == nil { + x.TotalBudget = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalBudget); 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 StartTime", wireType) + } + x.StartTime = 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.StartTime |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RemainingTranches", wireType) + } + x.RemainingTranches = 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.RemainingTranches |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + x.Period = 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.Period |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgBudgetProposalResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgBudgetProposalResponse = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgBudgetProposalResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgBudgetProposalResponse)(nil) + +type fastReflection_MsgBudgetProposalResponse MsgBudgetProposalResponse + +func (x *MsgBudgetProposalResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgBudgetProposalResponse)(x) +} + +func (x *MsgBudgetProposalResponse) 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_MsgBudgetProposalResponse_messageType fastReflection_MsgBudgetProposalResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgBudgetProposalResponse_messageType{} + +type fastReflection_MsgBudgetProposalResponse_messageType struct{} + +func (x fastReflection_MsgBudgetProposalResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgBudgetProposalResponse)(nil) +} +func (x fastReflection_MsgBudgetProposalResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgBudgetProposalResponse) +} +func (x fastReflection_MsgBudgetProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBudgetProposalResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgBudgetProposalResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBudgetProposalResponse +} + +// 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_MsgBudgetProposalResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgBudgetProposalResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgBudgetProposalResponse) New() protoreflect.Message { + return new(fastReflection_MsgBudgetProposalResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgBudgetProposalResponse) Interface() protoreflect.ProtoMessage { + return (*MsgBudgetProposalResponse)(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_MsgBudgetProposalResponse) 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_MsgBudgetProposalResponse) 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.MsgBudgetProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse 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_MsgBudgetProposalResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse 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_MsgBudgetProposalResponse) 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.MsgBudgetProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse 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_MsgBudgetProposalResponse) 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.MsgBudgetProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse 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_MsgBudgetProposalResponse) 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.MsgBudgetProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse 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_MsgBudgetProposalResponse) 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.MsgBudgetProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse 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_MsgBudgetProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgBudgetProposalResponse", 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_MsgBudgetProposalResponse) 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_MsgBudgetProposalResponse) 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_MsgBudgetProposalResponse) 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_MsgBudgetProposalResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgBudgetProposalResponse) + 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().(*MsgBudgetProposalResponse) + 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().(*MsgBudgetProposalResponse) + 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: MsgBudgetProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBudgetProposalResponse: 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, + } +} // Code generated by protoc-gen-go. DO NOT EDIT. // versions: @@ -1998,8 +3914,6 @@ func (*MsgFundCommunityPoolResponse) Descriptor() ([]byte, []int) { // 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. -// -// Since: cosmos-sdk 0.50 type MsgCommunityPoolSpend struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2054,8 +3968,6 @@ func (x *MsgCommunityPoolSpend) GetAmount() []*v1beta1.Coin { // MsgCommunityPoolSpendResponse defines the response to executing a // MsgCommunityPoolSpend message. -// -// Since: cosmos-sdk 0.50 type MsgCommunityPoolSpendResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2082,6 +3994,184 @@ func (*MsgCommunityPoolSpendResponse) Descriptor() ([]byte, []int) { return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{3} } +// Budget defines budget proposal type. +type MsgBudgetProposal 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 string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` + TotalBudget *v1beta1.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` + StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + RemainingTranches int64 `protobuf:"varint,5,opt,name=remaining_tranches,json=remainingTranches,proto3" json:"remaining_tranches,omitempty"` + Period int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` +} + +func (x *MsgBudgetProposal) Reset() { + *x = MsgBudgetProposal{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgBudgetProposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgBudgetProposal) ProtoMessage() {} + +// Deprecated: Use MsgBudgetProposal.ProtoReflect.Descriptor instead. +func (*MsgBudgetProposal) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgBudgetProposal) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgBudgetProposal) GetRecipientAddress() string { + if x != nil { + return x.RecipientAddress + } + return "" +} + +func (x *MsgBudgetProposal) GetTotalBudget() *v1beta1.Coin { + if x != nil { + return x.TotalBudget + } + return nil +} + +func (x *MsgBudgetProposal) GetStartTime() int64 { + if x != nil { + return x.StartTime + } + return 0 +} + +func (x *MsgBudgetProposal) GetRemainingTranches() int64 { + if x != nil { + return x.RemainingTranches + } + return 0 +} + +func (x *MsgBudgetProposal) GetPeriod() int64 { + if x != nil { + return x.Period + } + return 0 +} + +// MsgBudgetProposalResponse defines the response to executing a +// MsgBudgetProposal message. +type MsgBudgetProposalResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgBudgetProposalResponse) Reset() { + *x = MsgBudgetProposalResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgBudgetProposalResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgBudgetProposalResponse) ProtoMessage() {} + +// Deprecated: Use MsgBudgetProposalResponse.ProtoReflect.Descriptor instead. +func (*MsgBudgetProposalResponse) 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 +} + var File_cosmos_protocolpool_v1_tx_proto protoreflect.FileDescriptor var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ @@ -2126,37 +4216,88 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 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, 0x32, 0x81, 0x02, 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, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb6, 0x02, 0x0a, 0x11, 0x4d, 0x73, 0x67, 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, 0x3c, 0x0a, 0x0c, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 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, 0x0b, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x6d, + 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, + 0x54, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 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, 0x32, 0xe1, 0x03, + 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, 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, 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, + 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, 0x77, 0x0a, 0x17, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x29, 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, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x1a, 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, 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, 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 ( @@ -2171,26 +4312,36 @@ func file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP() []byte { return file_cosmos_protocolpool_v1_tx_proto_rawDescData } -var file_cosmos_protocolpool_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_cosmos_protocolpool_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) 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 - (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin + (*MsgBudgetProposal)(nil), // 4: cosmos.protocolpool.v1.MsgBudgetProposal + (*MsgBudgetProposalResponse)(nil), // 5: cosmos.protocolpool.v1.MsgBudgetProposalResponse + (*MsgClaimBudget)(nil), // 6: cosmos.protocolpool.v1.MsgClaimBudget + (*MsgClaimBudgetResponse)(nil), // 7: cosmos.protocolpool.v1.MsgClaimBudgetResponse + (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin } var file_cosmos_protocolpool_v1_tx_proto_depIdxs = []int32{ - 4, // 0: cosmos.protocolpool.v1.MsgFundCommunityPool.amount:type_name -> cosmos.base.v1beta1.Coin - 4, // 1: cosmos.protocolpool.v1.MsgCommunityPoolSpend.amount:type_name -> cosmos.base.v1beta1.Coin - 0, // 2: cosmos.protocolpool.v1.Msg.FundCommunityPool:input_type -> cosmos.protocolpool.v1.MsgFundCommunityPool - 2, // 3: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:input_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpend - 1, // 4: cosmos.protocolpool.v1.Msg.FundCommunityPool:output_type -> cosmos.protocolpool.v1.MsgFundCommunityPoolResponse - 3, // 5: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:output_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse - 4, // [4:6] is the sub-list for method output_type - 2, // [2:4] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 8, // 0: cosmos.protocolpool.v1.MsgFundCommunityPool.amount:type_name -> cosmos.base.v1beta1.Coin + 8, // 1: cosmos.protocolpool.v1.MsgCommunityPoolSpend.amount:type_name -> cosmos.base.v1beta1.Coin + 8, // 2: cosmos.protocolpool.v1.MsgBudgetProposal.total_budget:type_name -> cosmos.base.v1beta1.Coin + 8, // 3: cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount:type_name -> cosmos.base.v1beta1.Coin + 0, // 4: cosmos.protocolpool.v1.Msg.FundCommunityPool:input_type -> cosmos.protocolpool.v1.MsgFundCommunityPool + 2, // 5: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:input_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpend + 4, // 6: cosmos.protocolpool.v1.Msg.SubmitMsgBudgetProposal:input_type -> cosmos.protocolpool.v1.MsgBudgetProposal + 6, // 7: cosmos.protocolpool.v1.Msg.ClaimBudget:input_type -> cosmos.protocolpool.v1.MsgClaimBudget + 1, // 8: cosmos.protocolpool.v1.Msg.FundCommunityPool:output_type -> cosmos.protocolpool.v1.MsgFundCommunityPoolResponse + 3, // 9: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:output_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse + 5, // 10: cosmos.protocolpool.v1.Msg.SubmitMsgBudgetProposal:output_type -> cosmos.protocolpool.v1.MsgBudgetProposalResponse + 7, // 11: cosmos.protocolpool.v1.Msg.ClaimBudget:output_type -> cosmos.protocolpool.v1.MsgClaimBudgetResponse + 8, // [8:12] is the sub-list for method output_type + 4, // [4:8] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_cosmos_protocolpool_v1_tx_proto_init() } @@ -2247,6 +4398,54 @@ func file_cosmos_protocolpool_v1_tx_proto_init() { return nil } } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgBudgetProposal); 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.(*MsgBudgetProposalResponse); 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 + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2254,7 +4453,7 @@ func file_cosmos_protocolpool_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_protocolpool_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/protocolpool/v1/tx_grpc.pb.go b/api/cosmos/protocolpool/v1/tx_grpc.pb.go index 9b1644a1d474..c409950c7123 100644 --- a/api/cosmos/protocolpool/v1/tx_grpc.pb.go +++ b/api/cosmos/protocolpool/v1/tx_grpc.pb.go @@ -1,5 +1,3 @@ -// Since: cosmos-sdk 0.50 - // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 @@ -21,8 +19,10 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_FundCommunityPool_FullMethodName = "/cosmos.protocolpool.v1.Msg/FundCommunityPool" - Msg_CommunityPoolSpend_FullMethodName = "/cosmos.protocolpool.v1.Msg/CommunityPoolSpend" + Msg_FundCommunityPool_FullMethodName = "/cosmos.protocolpool.v1.Msg/FundCommunityPool" + Msg_CommunityPoolSpend_FullMethodName = "/cosmos.protocolpool.v1.Msg/CommunityPoolSpend" + Msg_SubmitMsgBudgetProposal_FullMethodName = "/cosmos.protocolpool.v1.Msg/SubmitMsgBudgetProposal" + Msg_ClaimBudget_FullMethodName = "/cosmos.protocolpool.v1.Msg/ClaimBudget" ) // MsgClient is the client API for Msg service. @@ -31,16 +31,16 @@ const ( type MsgClient interface { // FundCommunityPool defines a method to allow an account to directly // fund the community pool. - // - // Since: cosmos-sdk 0.50 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. - // - // Since: cosmos-sdk 0.50 CommunityPoolSpend(ctx context.Context, in *MsgCommunityPoolSpend, opts ...grpc.CallOption) (*MsgCommunityPoolSpendResponse, error) + // SubmitMsgBudgetProposal defines a method to set a budget proposal. + SubmitMsgBudgetProposal(ctx context.Context, in *MsgBudgetProposal, opts ...grpc.CallOption) (*MsgBudgetProposalResponse, error) + // ClaimBudget defines a method to claim the distributed budget. + ClaimBudget(ctx context.Context, in *MsgClaimBudget, opts ...grpc.CallOption) (*MsgClaimBudgetResponse, error) } type msgClient struct { @@ -69,22 +69,40 @@ func (c *msgClient) CommunityPoolSpend(ctx context.Context, in *MsgCommunityPool return out, nil } +func (c *msgClient) SubmitMsgBudgetProposal(ctx context.Context, in *MsgBudgetProposal, opts ...grpc.CallOption) (*MsgBudgetProposalResponse, error) { + out := new(MsgBudgetProposalResponse) + err := c.cc.Invoke(ctx, Msg_SubmitMsgBudgetProposal_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ClaimBudget(ctx context.Context, in *MsgClaimBudget, opts ...grpc.CallOption) (*MsgClaimBudgetResponse, error) { + out := new(MsgClaimBudgetResponse) + err := c.cc.Invoke(ctx, Msg_ClaimBudget_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility type MsgServer interface { // FundCommunityPool defines a method to allow an account to directly // fund the community pool. - // - // Since: cosmos-sdk 0.50 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. - // - // Since: cosmos-sdk 0.50 CommunityPoolSpend(context.Context, *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) + // SubmitMsgBudgetProposal defines a method to set a budget proposal. + SubmitMsgBudgetProposal(context.Context, *MsgBudgetProposal) (*MsgBudgetProposalResponse, error) + // ClaimBudget defines a method to claim the distributed budget. + ClaimBudget(context.Context, *MsgClaimBudget) (*MsgClaimBudgetResponse, error) mustEmbedUnimplementedMsgServer() } @@ -98,6 +116,12 @@ func (UnimplementedMsgServer) FundCommunityPool(context.Context, *MsgFundCommuni func (UnimplementedMsgServer) CommunityPoolSpend(context.Context, *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CommunityPoolSpend not implemented") } +func (UnimplementedMsgServer) SubmitMsgBudgetProposal(context.Context, *MsgBudgetProposal) (*MsgBudgetProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitMsgBudgetProposal not implemented") +} +func (UnimplementedMsgServer) ClaimBudget(context.Context, *MsgClaimBudget) (*MsgClaimBudgetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClaimBudget not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -147,6 +171,42 @@ func _Msg_CommunityPoolSpend_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Msg_SubmitMsgBudgetProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBudgetProposal) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SubmitMsgBudgetProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_SubmitMsgBudgetProposal_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SubmitMsgBudgetProposal(ctx, req.(*MsgBudgetProposal)) + } + 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) +} + // 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) @@ -162,6 +222,14 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "CommunityPoolSpend", Handler: _Msg_CommunityPoolSpend_Handler, }, + { + MethodName: "SubmitMsgBudgetProposal", + Handler: _Msg_SubmitMsgBudgetProposal_Handler, + }, + { + MethodName: "ClaimBudget", + Handler: _Msg_ClaimBudget_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/protocolpool/v1/tx.proto", diff --git a/proto/cosmos/protocolpool/v1/query.proto b/proto/cosmos/protocolpool/v1/query.proto index 462851c390e2..e2529692f8af 100644 --- a/proto/cosmos/protocolpool/v1/query.proto +++ b/proto/cosmos/protocolpool/v1/query.proto @@ -1,4 +1,3 @@ -// Since: cosmos-sdk 0.50 syntax = "proto3"; package cosmos.protocolpool.v1; diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index e8483b9697be..e0850db3319a 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -1,4 +1,3 @@ -// Since: cosmos-sdk 0.50 syntax = "proto3"; package cosmos.protocolpool.v1; @@ -15,16 +14,12 @@ service Msg { // FundCommunityPool defines a method to allow an account to directly // fund the community pool. - // - // Since: cosmos-sdk 0.50 rpc FundCommunityPool(MsgFundCommunityPool) returns (MsgFundCommunityPoolResponse); // 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. - // - // Since: cosmos-sdk 0.50 rpc CommunityPoolSpend(MsgCommunityPoolSpend) returns (MsgCommunityPoolSpendResponse); // SubmitMsgBudgetProposal defines a method to set a budget proposal. @@ -32,7 +27,6 @@ service Msg { // ClaimBudget defines a method to claim the distributed budget. rpc ClaimBudget(MsgClaimBudget) returns (MsgClaimBudgetResponse); - } // MsgFundCommunityPool allows an account to directly @@ -53,8 +47,6 @@ message MsgFundCommunityPoolResponse {} // 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. -// -// Since: cosmos-sdk 0.50 message MsgCommunityPoolSpend { option (cosmos.msg.v1.signer) = "authority"; @@ -67,17 +59,12 @@ message MsgCommunityPoolSpend { // MsgCommunityPoolSpendResponse defines the response to executing a // MsgCommunityPoolSpend message. -// -// Since: cosmos-sdk 0.50 message MsgCommunityPoolSpendResponse {} - // Budget defines budget proposal type. -// -// Since: cosmos-sdk 0.51 message MsgBudgetProposal { // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; cosmos.base.v1beta1.Coin total_budget = 3; int64 start_time = 4; @@ -87,13 +74,9 @@ message MsgBudgetProposal { // MsgBudgetProposalResponse defines the response to executing a // MsgBudgetProposal message. -// -// Since: cosmos-sdk 0.51 message MsgBudgetProposalResponse {} // MsgClaimBudget defines a message for claiming the distributed budget. -// -// Since: cosmos-sdk 0.51 message MsgClaimBudget { option (cosmos.msg.v1.signer) = "recipient_address"; string recipient_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; @@ -101,8 +84,6 @@ message MsgClaimBudget { // MsgClaimBudgetResponse defines the response to executing a // MsgClaimBudget message. -// -// Since: cosmos-sdk 0.51 message MsgClaimBudgetResponse { cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; diff --git a/x/protocolpool/types/tx.pb.go b/x/protocolpool/types/tx.pb.go index 732288ead31c..31e0f89a3f15 100644 --- a/x/protocolpool/types/tx.pb.go +++ b/x/protocolpool/types/tx.pb.go @@ -112,8 +112,6 @@ var xxx_messageInfo_MsgFundCommunityPoolResponse proto.InternalMessageInfo // 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. -// -// Since: cosmos-sdk 0.50 type MsgCommunityPoolSpend 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"` @@ -177,8 +175,6 @@ func (m *MsgCommunityPoolSpend) GetAmount() github_com_cosmos_cosmos_sdk_types.C // MsgCommunityPoolSpendResponse defines the response to executing a // MsgCommunityPoolSpend message. -// -// Since: cosmos-sdk 0.50 type MsgCommunityPoolSpendResponse struct { } @@ -215,47 +211,278 @@ func (m *MsgCommunityPoolSpendResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCommunityPoolSpendResponse proto.InternalMessageInfo +// Budget defines budget proposal type. +type MsgBudgetProposal 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"` + RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` + TotalBudget *types.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` + StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + RemainingTranches int64 `protobuf:"varint,5,opt,name=remaining_tranches,json=remainingTranches,proto3" json:"remaining_tranches,omitempty"` + Period int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` +} + +func (m *MsgBudgetProposal) Reset() { *m = MsgBudgetProposal{} } +func (m *MsgBudgetProposal) String() string { return proto.CompactTextString(m) } +func (*MsgBudgetProposal) ProtoMessage() {} +func (*MsgBudgetProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_09efe14517e7f6dc, []int{4} +} +func (m *MsgBudgetProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBudgetProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBudgetProposal.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 *MsgBudgetProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBudgetProposal.Merge(m, src) +} +func (m *MsgBudgetProposal) XXX_Size() int { + return m.Size() +} +func (m *MsgBudgetProposal) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBudgetProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBudgetProposal proto.InternalMessageInfo + +func (m *MsgBudgetProposal) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgBudgetProposal) GetRecipientAddress() string { + if m != nil { + return m.RecipientAddress + } + return "" +} + +func (m *MsgBudgetProposal) GetTotalBudget() *types.Coin { + if m != nil { + return m.TotalBudget + } + return nil +} + +func (m *MsgBudgetProposal) GetStartTime() int64 { + if m != nil { + return m.StartTime + } + return 0 +} + +func (m *MsgBudgetProposal) GetRemainingTranches() int64 { + if m != nil { + return m.RemainingTranches + } + return 0 +} + +func (m *MsgBudgetProposal) GetPeriod() int64 { + if m != nil { + return m.Period + } + return 0 +} + +// MsgBudgetProposalResponse defines the response to executing a +// MsgBudgetProposal message. +type MsgBudgetProposalResponse struct { +} + +func (m *MsgBudgetProposalResponse) Reset() { *m = MsgBudgetProposalResponse{} } +func (m *MsgBudgetProposalResponse) String() string { return proto.CompactTextString(m) } +func (*MsgBudgetProposalResponse) ProtoMessage() {} +func (*MsgBudgetProposalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_09efe14517e7f6dc, []int{5} +} +func (m *MsgBudgetProposalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBudgetProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBudgetProposalResponse.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 *MsgBudgetProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBudgetProposalResponse.Merge(m, src) +} +func (m *MsgBudgetProposalResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgBudgetProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBudgetProposalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBudgetProposalResponse proto.InternalMessageInfo + +// MsgClaimBudget defines a message for claiming the distributed budget. +type MsgClaimBudget struct { + RecipientAddress string `protobuf:"bytes,1,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` +} + +func (m *MsgClaimBudget) Reset() { *m = MsgClaimBudget{} } +func (m *MsgClaimBudget) String() string { return proto.CompactTextString(m) } +func (*MsgClaimBudget) ProtoMessage() {} +func (*MsgClaimBudget) Descriptor() ([]byte, []int) { + return fileDescriptor_09efe14517e7f6dc, []int{6} +} +func (m *MsgClaimBudget) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClaimBudget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClaimBudget.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 *MsgClaimBudget) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimBudget.Merge(m, src) +} +func (m *MsgClaimBudget) XXX_Size() int { + return m.Size() +} +func (m *MsgClaimBudget) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimBudget.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClaimBudget proto.InternalMessageInfo + +func (m *MsgClaimBudget) GetRecipientAddress() string { + if m != nil { + return m.RecipientAddress + } + return "" +} + +// MsgClaimBudgetResponse defines the response to executing a +// MsgClaimBudget message. +type MsgClaimBudgetResponse struct { + Amount types.Coin `protobuf:"bytes,1,opt,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *MsgClaimBudgetResponse) Reset() { *m = MsgClaimBudgetResponse{} } +func (m *MsgClaimBudgetResponse) String() string { return proto.CompactTextString(m) } +func (*MsgClaimBudgetResponse) ProtoMessage() {} +func (*MsgClaimBudgetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_09efe14517e7f6dc, []int{7} +} +func (m *MsgClaimBudgetResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClaimBudgetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClaimBudgetResponse.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 *MsgClaimBudgetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimBudgetResponse.Merge(m, src) +} +func (m *MsgClaimBudgetResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgClaimBudgetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimBudgetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClaimBudgetResponse proto.InternalMessageInfo + +func (m *MsgClaimBudgetResponse) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + func init() { proto.RegisterType((*MsgFundCommunityPool)(nil), "cosmos.protocolpool.v1.MsgFundCommunityPool") proto.RegisterType((*MsgFundCommunityPoolResponse)(nil), "cosmos.protocolpool.v1.MsgFundCommunityPoolResponse") proto.RegisterType((*MsgCommunityPoolSpend)(nil), "cosmos.protocolpool.v1.MsgCommunityPoolSpend") proto.RegisterType((*MsgCommunityPoolSpendResponse)(nil), "cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse") + proto.RegisterType((*MsgBudgetProposal)(nil), "cosmos.protocolpool.v1.MsgBudgetProposal") + proto.RegisterType((*MsgBudgetProposalResponse)(nil), "cosmos.protocolpool.v1.MsgBudgetProposalResponse") + proto.RegisterType((*MsgClaimBudget)(nil), "cosmos.protocolpool.v1.MsgClaimBudget") + proto.RegisterType((*MsgClaimBudgetResponse)(nil), "cosmos.protocolpool.v1.MsgClaimBudgetResponse") } func init() { proto.RegisterFile("cosmos/protocolpool/v1/tx.proto", fileDescriptor_09efe14517e7f6dc) } var fileDescriptor_09efe14517e7f6dc = []byte{ - // 466 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0xbf, 0x6f, 0xd3, 0x40, - 0x18, 0xf5, 0x35, 0xa2, 0x52, 0x0e, 0x09, 0x09, 0x2b, 0x94, 0xd4, 0x2a, 0x76, 0xc9, 0x14, 0x55, - 0xe4, 0x8e, 0x94, 0x1f, 0x43, 0x99, 0x48, 0x25, 0xb6, 0x48, 0x28, 0xdd, 0x58, 0x50, 0x62, 0x9f, - 0xae, 0xa7, 0xc6, 0xf7, 0x59, 0xfe, 0xce, 0xa1, 0x61, 0x02, 0x26, 0x46, 0xfe, 0x84, 0xce, 0x4c, - 0x1d, 0xf8, 0x23, 0x2a, 0xb1, 0x54, 0x4c, 0x4c, 0x80, 0x92, 0xa1, 0xfc, 0x19, 0x28, 0xf6, 0xa5, - 0x49, 0x55, 0x0b, 0x94, 0x81, 0xc9, 0xd6, 0xf7, 0xde, 0xbd, 0xf7, 0xbe, 0x77, 0x36, 0x0d, 0x42, - 0xc0, 0x18, 0x90, 0x27, 0x29, 0x18, 0x08, 0x61, 0x98, 0x00, 0x0c, 0xf9, 0xa8, 0xcd, 0xcd, 0x31, - 0xcb, 0x47, 0xee, 0x46, 0x41, 0x60, 0xcb, 0x04, 0x36, 0x6a, 0x7b, 0x35, 0x09, 0x12, 0xf2, 0x21, - 0x9f, 0xbd, 0x15, 0xb8, 0xe7, 0x5b, 0xb9, 0x41, 0x1f, 0x05, 0x1f, 0xb5, 0x07, 0xc2, 0xf4, 0xdb, - 0x3c, 0x04, 0xa5, 0x2d, 0xbe, 0x59, 0xe0, 0xaf, 0x8b, 0x83, 0xcb, 0xd2, 0xde, 0x5d, 0x7b, 0x34, - 0x46, 0x39, 0x0b, 0x10, 0xa3, 0x2c, 0x80, 0xc6, 0x57, 0x42, 0x6b, 0x5d, 0x94, 0x2f, 0x32, 0x1d, - 0xed, 0x43, 0x1c, 0x67, 0x5a, 0x99, 0xf1, 0x4b, 0x80, 0xa1, 0x1b, 0xd2, 0xf5, 0x7e, 0x0c, 0x99, - 0x36, 0x75, 0xb2, 0x5d, 0x69, 0xde, 0xdc, 0xdd, 0x64, 0x56, 0x70, 0xe6, 0xce, 0xac, 0x3b, 0xdb, - 0x07, 0xa5, 0x3b, 0x0f, 0xcf, 0x7e, 0x04, 0xce, 0xe7, 0x9f, 0x41, 0x53, 0x2a, 0x73, 0x98, 0x0d, - 0x58, 0x08, 0xb1, 0x75, 0xb7, 0x8f, 0x16, 0x46, 0x47, 0xdc, 0x8c, 0x13, 0x81, 0xf9, 0x01, 0xec, - 0x59, 0x69, 0xf7, 0x29, 0xad, 0x46, 0x22, 0x01, 0x54, 0x06, 0xd2, 0xfa, 0xda, 0x36, 0x69, 0x56, - 0x3b, 0xf5, 0x6f, 0x5f, 0x5a, 0x35, 0x6b, 0xf5, 0x3c, 0x8a, 0x52, 0x81, 0x78, 0x60, 0x52, 0xa5, - 0x65, 0x6f, 0x41, 0xdd, 0xdb, 0xf8, 0x78, 0x12, 0x38, 0xbf, 0x4f, 0x02, 0xe7, 0xc3, 0xc5, 0xe9, - 0xce, 0x62, 0xde, 0xf0, 0xe9, 0x56, 0xd9, 0x32, 0x3d, 0x81, 0x09, 0x68, 0x14, 0x8d, 0x09, 0xa1, - 0x77, 0xba, 0x28, 0xaf, 0x80, 0x07, 0x89, 0xd0, 0xd1, 0x2c, 0x49, 0x3f, 0x33, 0x87, 0x90, 0x2a, - 0x33, 0xae, 0x93, 0x7f, 0x25, 0xb9, 0xa4, 0xba, 0x5b, 0xb4, 0x9a, 0x8a, 0x50, 0x25, 0x4a, 0x68, - 0x53, 0x6c, 0xd0, 0x5b, 0x0c, 0x96, 0x4a, 0xac, 0xfc, 0xb7, 0x12, 0xf7, 0x6e, 0xe5, 0x25, 0x5c, - 0x46, 0x6a, 0x04, 0xf4, 0x5e, 0xe9, 0x8e, 0xf3, 0x16, 0x76, 0xdf, 0xaf, 0xd1, 0x4a, 0x17, 0xa5, - 0xfb, 0x86, 0xde, 0xbe, 0x7e, 0xef, 0x0f, 0x58, 0xf9, 0x37, 0xc9, 0xca, 0x8a, 0xf5, 0x1e, 0xaf, - 0xc2, 0x9e, 0x07, 0x70, 0xdf, 0x52, 0xb7, 0xe4, 0x0a, 0x5a, 0x7f, 0xd1, 0xba, 0x4e, 0xf7, 0x9e, - 0xac, 0x44, 0x9f, 0x7b, 0x7b, 0x37, 0xde, 0x5d, 0x9c, 0xee, 0x90, 0xce, 0xb3, 0xb3, 0x89, 0x4f, - 0xce, 0x27, 0x3e, 0xf9, 0x35, 0xf1, 0xc9, 0xa7, 0xa9, 0xef, 0x9c, 0x4f, 0x7d, 0xe7, 0xfb, 0xd4, - 0x77, 0x5e, 0xdd, 0x2f, 0x64, 0x31, 0x3a, 0x62, 0x0a, 0xf8, 0xf1, 0xd5, 0x9f, 0x37, 0xef, 0x7f, - 0xb0, 0x9e, 0xcf, 0x1e, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x54, 0x0b, 0xeb, 0xe0, 0x03, - 0x00, 0x00, + // 669 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0xcd, 0x34, 0x5f, 0x23, 0x65, 0xfa, 0xa9, 0x22, 0x56, 0x49, 0x5d, 0xd3, 0x3a, 0x21, 0x0b, + 0x14, 0x2a, 0x62, 0x93, 0xf2, 0xb3, 0x28, 0x6c, 0x48, 0x05, 0xbb, 0x48, 0x55, 0xda, 0x15, 0x9b, + 0xc8, 0xb1, 0x47, 0xee, 0xa8, 0x99, 0xb9, 0x96, 0x67, 0xdc, 0x1f, 0x24, 0x24, 0xc4, 0x8a, 0x25, + 0x8f, 0xd0, 0x35, 0xab, 0x2e, 0x10, 0xcf, 0x50, 0x89, 0x4d, 0xc5, 0x8a, 0x15, 0x3f, 0xe9, 0xa2, + 0x3c, 0x06, 0x8a, 0x3d, 0x75, 0x12, 0x25, 0x4a, 0x5b, 0xa4, 0xae, 0x92, 0xdc, 0x7b, 0xe6, 0x9c, + 0x73, 0x8f, 0xe7, 0x3a, 0xb8, 0xe4, 0x82, 0x60, 0x20, 0xec, 0x20, 0x04, 0x09, 0x2e, 0x74, 0x03, + 0x80, 0xae, 0xbd, 0x57, 0xb7, 0xe5, 0x81, 0x15, 0x97, 0xb4, 0x62, 0x02, 0xb0, 0x86, 0x01, 0xd6, + 0x5e, 0xdd, 0x58, 0xf0, 0xc1, 0x87, 0xb8, 0x68, 0xf7, 0xbf, 0x25, 0x7d, 0xc3, 0x54, 0x74, 0x1d, + 0x47, 0x10, 0x7b, 0xaf, 0xde, 0x21, 0xd2, 0xa9, 0xdb, 0x2e, 0x50, 0xae, 0xfa, 0x4b, 0x49, 0xbf, + 0x9d, 0x1c, 0x1c, 0xa6, 0x36, 0x16, 0xd5, 0x51, 0x26, 0xfc, 0xbe, 0x01, 0x26, 0xfc, 0xa4, 0x51, + 0xf9, 0x8a, 0xf0, 0x42, 0x53, 0xf8, 0xaf, 0x22, 0xee, 0x6d, 0x00, 0x63, 0x11, 0xa7, 0xf2, 0x70, + 0x13, 0xa0, 0xab, 0xb9, 0x38, 0xe7, 0x30, 0x88, 0xb8, 0xd4, 0x51, 0x39, 0x5b, 0x9d, 0x5b, 0x5b, + 0xb2, 0x14, 0x61, 0x5f, 0xdd, 0x52, 0xea, 0xd6, 0x06, 0x50, 0xde, 0x78, 0x78, 0xf2, 0xa3, 0x94, + 0xf9, 0xf4, 0xb3, 0x54, 0xf5, 0xa9, 0xdc, 0x89, 0x3a, 0x96, 0x0b, 0x4c, 0xa9, 0xab, 0x8f, 0x9a, + 0xf0, 0x76, 0x6d, 0x79, 0x18, 0x10, 0x11, 0x1f, 0x10, 0x2d, 0x45, 0xad, 0x3d, 0xc5, 0x79, 0x8f, + 0x04, 0x20, 0xa8, 0x84, 0x50, 0x9f, 0x29, 0xa3, 0x6a, 0xbe, 0xa1, 0x7f, 0xfb, 0x5c, 0x5b, 0x50, + 0x52, 0x2f, 0x3c, 0x2f, 0x24, 0x42, 0x6c, 0xc9, 0x90, 0x72, 0xbf, 0x35, 0x80, 0xae, 0x17, 0x3f, + 0x1c, 0x95, 0x32, 0x7f, 0x8e, 0x4a, 0x99, 0xf7, 0xe7, 0xc7, 0xab, 0x83, 0x7a, 0xc5, 0xc4, 0xcb, + 0x93, 0x86, 0x69, 0x11, 0x11, 0x00, 0x17, 0xa4, 0xd2, 0x43, 0xf8, 0x76, 0x53, 0xf8, 0x23, 0xcd, + 0xad, 0x80, 0x70, 0xaf, 0xef, 0xc4, 0x89, 0xe4, 0x0e, 0x84, 0x54, 0x1e, 0xea, 0xe8, 0x32, 0x27, + 0x29, 0x54, 0x5b, 0xc6, 0xf9, 0x90, 0xb8, 0x34, 0xa0, 0x84, 0xcb, 0x64, 0x82, 0xd6, 0xa0, 0x30, + 0x14, 0x62, 0xf6, 0xc6, 0x42, 0x5c, 0x9f, 0x8f, 0x43, 0x48, 0x2d, 0x55, 0x4a, 0x78, 0x65, 0xe2, + 0x8c, 0x69, 0x0a, 0x5f, 0x66, 0x70, 0xa1, 0x29, 0xfc, 0x46, 0xe4, 0xf9, 0x44, 0x6e, 0x86, 0x10, + 0x80, 0x70, 0xba, 0xff, 0x9c, 0xc0, 0x4b, 0x5c, 0x48, 0x07, 0x6e, 0x3b, 0x09, 0xea, 0xd2, 0x67, + 0x79, 0x2b, 0x3d, 0xa2, 0xea, 0xda, 0x73, 0xfc, 0xbf, 0x04, 0xe9, 0x74, 0xdb, 0x9d, 0xd8, 0x96, + 0x9e, 0x2d, 0xa3, 0xa9, 0x81, 0xb5, 0xe6, 0x62, 0x78, 0x32, 0x84, 0xb6, 0x82, 0xb1, 0x90, 0x4e, + 0x28, 0xdb, 0x92, 0x32, 0xa2, 0xff, 0x57, 0x46, 0xd5, 0x6c, 0x2b, 0x1f, 0x57, 0xb6, 0x29, 0x23, + 0x5a, 0x0d, 0x6b, 0x21, 0x61, 0x0e, 0xe5, 0x94, 0xfb, 0x6d, 0x19, 0x3a, 0xdc, 0xdd, 0x21, 0x42, + 0x9f, 0x8d, 0x61, 0x85, 0xb4, 0xb3, 0xad, 0x1a, 0x5a, 0x11, 0xe7, 0x02, 0x12, 0x52, 0xf0, 0xf4, + 0x5c, 0x0c, 0x51, 0xbf, 0x2a, 0x77, 0xf0, 0xd2, 0x58, 0x6e, 0x69, 0xaa, 0x80, 0xe7, 0xfb, 0xb1, + 0x77, 0x1d, 0xca, 0x94, 0xa9, 0x89, 0xc9, 0xa0, 0xeb, 0x26, 0xb3, 0x5e, 0xec, 0x3f, 0xdf, 0x71, + 0xa6, 0xca, 0x5b, 0x5c, 0x1c, 0x15, 0xbc, 0xb0, 0x32, 0xb2, 0xbb, 0xe8, 0x86, 0xae, 0xdd, 0xda, + 0xef, 0x2c, 0xce, 0x36, 0x85, 0xaf, 0xed, 0xe3, 0xc2, 0xf8, 0xdb, 0xe3, 0x81, 0x35, 0xf9, 0xcd, + 0x66, 0x4d, 0x5a, 0x4f, 0xe3, 0xf1, 0x75, 0xd0, 0xe9, 0x94, 0x6f, 0xb0, 0x36, 0x61, 0x91, 0x6b, + 0x53, 0xb8, 0xc6, 0xe1, 0xc6, 0x93, 0x6b, 0xc1, 0x53, 0xed, 0x7d, 0xbc, 0xb8, 0x15, 0x75, 0x18, + 0x95, 0xe3, 0x7b, 0x74, 0x7f, 0x0a, 0xe3, 0x28, 0xd4, 0xa8, 0x5f, 0x19, 0x9a, 0x0a, 0x13, 0x3c, + 0x37, 0x7c, 0xc5, 0xee, 0x4d, 0xb3, 0x3f, 0xc0, 0x19, 0xd6, 0xd5, 0x70, 0x17, 0x32, 0xc6, 0xec, + 0xbb, 0xf3, 0xe3, 0x55, 0xd4, 0x78, 0x76, 0xd2, 0x33, 0xd1, 0x69, 0xcf, 0x44, 0xbf, 0x7a, 0x26, + 0xfa, 0x78, 0x66, 0x66, 0x4e, 0xcf, 0xcc, 0xcc, 0xf7, 0x33, 0x33, 0xf3, 0xfa, 0x6e, 0xc2, 0x27, + 0xbc, 0x5d, 0x8b, 0x82, 0x7d, 0x30, 0xfa, 0x17, 0x17, 0x5f, 0x97, 0x4e, 0x2e, 0xae, 0x3d, 0xfa, + 0x1b, 0x00, 0x00, 0xff, 0xff, 0xa5, 0xc3, 0x68, 0xc2, 0x06, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -272,16 +499,16 @@ const _ = grpc.SupportPackageIsVersion4 type MsgClient interface { // FundCommunityPool defines a method to allow an account to directly // fund the community pool. - // - // Since: cosmos-sdk 0.50 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. - // - // Since: cosmos-sdk 0.50 CommunityPoolSpend(ctx context.Context, in *MsgCommunityPoolSpend, opts ...grpc.CallOption) (*MsgCommunityPoolSpendResponse, error) + // SubmitMsgBudgetProposal defines a method to set a budget proposal. + SubmitMsgBudgetProposal(ctx context.Context, in *MsgBudgetProposal, opts ...grpc.CallOption) (*MsgBudgetProposalResponse, error) + // ClaimBudget defines a method to claim the distributed budget. + ClaimBudget(ctx context.Context, in *MsgClaimBudget, opts ...grpc.CallOption) (*MsgClaimBudgetResponse, error) } type msgClient struct { @@ -310,20 +537,38 @@ func (c *msgClient) CommunityPoolSpend(ctx context.Context, in *MsgCommunityPool return out, nil } +func (c *msgClient) SubmitMsgBudgetProposal(ctx context.Context, in *MsgBudgetProposal, opts ...grpc.CallOption) (*MsgBudgetProposalResponse, error) { + out := new(MsgBudgetProposalResponse) + err := c.cc.Invoke(ctx, "/cosmos.protocolpool.v1.Msg/SubmitMsgBudgetProposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ClaimBudget(ctx context.Context, in *MsgClaimBudget, opts ...grpc.CallOption) (*MsgClaimBudgetResponse, error) { + out := new(MsgClaimBudgetResponse) + err := c.cc.Invoke(ctx, "/cosmos.protocolpool.v1.Msg/ClaimBudget", 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 // fund the community pool. - // - // Since: cosmos-sdk 0.50 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. - // - // Since: cosmos-sdk 0.50 CommunityPoolSpend(context.Context, *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) + // SubmitMsgBudgetProposal defines a method to set a budget proposal. + SubmitMsgBudgetProposal(context.Context, *MsgBudgetProposal) (*MsgBudgetProposalResponse, error) + // ClaimBudget defines a method to claim the distributed budget. + ClaimBudget(context.Context, *MsgClaimBudget) (*MsgClaimBudgetResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -336,6 +581,12 @@ func (*UnimplementedMsgServer) FundCommunityPool(ctx context.Context, req *MsgFu func (*UnimplementedMsgServer) CommunityPoolSpend(ctx context.Context, req *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CommunityPoolSpend not implemented") } +func (*UnimplementedMsgServer) SubmitMsgBudgetProposal(ctx context.Context, req *MsgBudgetProposal) (*MsgBudgetProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitMsgBudgetProposal not implemented") +} +func (*UnimplementedMsgServer) ClaimBudget(ctx context.Context, req *MsgClaimBudget) (*MsgClaimBudgetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClaimBudget not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -377,6 +628,42 @@ func _Msg_CommunityPoolSpend_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Msg_SubmitMsgBudgetProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBudgetProposal) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SubmitMsgBudgetProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.protocolpool.v1.Msg/SubmitMsgBudgetProposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SubmitMsgBudgetProposal(ctx, req.(*MsgBudgetProposal)) + } + 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: "/cosmos.protocolpool.v1.Msg/ClaimBudget", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ClaimBudget(ctx, req.(*MsgClaimBudget)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.protocolpool.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -389,6 +676,14 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "CommunityPoolSpend", Handler: _Msg_CommunityPoolSpend_Handler, }, + { + MethodName: "SubmitMsgBudgetProposal", + Handler: _Msg_SubmitMsgBudgetProposal_Handler, + }, + { + MethodName: "ClaimBudget", + Handler: _Msg_ClaimBudget_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/protocolpool/v1/tx.proto", @@ -535,54 +830,204 @@ func (m *MsgCommunityPoolSpendResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *MsgBudgetProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *MsgFundCommunityPool) Size() (n int) { - if m == nil { - return 0 - } + +func (m *MsgBudgetProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBudgetProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Amount) > 0 { - for _, e := range m.Amount { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) + if m.Period != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Period)) + i-- + dAtA[i] = 0x30 + } + if m.RemainingTranches != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.RemainingTranches)) + i-- + dAtA[i] = 0x28 + } + if m.StartTime != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.StartTime)) + i-- + dAtA[i] = 0x20 + } + if m.TotalBudget != nil { + { + size, err := m.TotalBudget.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a } - l = len(m.Depositor) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.RecipientAddress) > 0 { + i -= len(m.RecipientAddress) + copy(dAtA[i:], m.RecipientAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.RecipientAddress))) + i-- + dAtA[i] = 0x12 } - return n + 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 *MsgFundCommunityPoolResponse) Size() (n int) { - if m == nil { - return 0 +func (m *MsgBudgetProposalResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *MsgCommunityPoolSpend) Size() (n int) { - if m == nil { - return 0 - } +func (m *MsgBudgetProposalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBudgetProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *MsgClaimBudget) 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 *MsgClaimBudget) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClaimBudget) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RecipientAddress) > 0 { + i -= len(m.RecipientAddress) + copy(dAtA[i:], m.RecipientAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.RecipientAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgClaimBudgetResponse) 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 *MsgClaimBudgetResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClaimBudgetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.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 encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgFundCommunityPool) 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 + sovTx(uint64(l)) + } + } + l = len(m.Depositor) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgFundCommunityPoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCommunityPoolSpend) 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 = len(m.Recipient) if l > 0 { @@ -606,6 +1051,69 @@ func (m *MsgCommunityPoolSpendResponse) Size() (n int) { return n } +func (m *MsgBudgetProposal) 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 = len(m.RecipientAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.TotalBudget != nil { + l = m.TotalBudget.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.StartTime != 0 { + n += 1 + sovTx(uint64(m.StartTime)) + } + if m.RemainingTranches != 0 { + n += 1 + sovTx(uint64(m.RemainingTranches)) + } + if m.Period != 0 { + n += 1 + sovTx(uint64(m.Period)) + } + return n +} + +func (m *MsgBudgetProposalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgClaimBudget) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RecipientAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgClaimBudgetResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -976,6 +1484,428 @@ func (m *MsgCommunityPoolSpendResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgBudgetProposal) 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: MsgBudgetProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBudgetProposal: 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 RecipientAddress", 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.RecipientAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalBudget", 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 m.TotalBudget == nil { + m.TotalBudget = &types.Coin{} + } + if err := m.TotalBudget.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + m.StartTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StartTime |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RemainingTranches", wireType) + } + m.RemainingTranches = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RemainingTranches |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + m.Period = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Period |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *MsgBudgetProposalResponse) 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: MsgBudgetProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBudgetProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgClaimBudget) 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: MsgClaimBudget: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgClaimBudget: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecipientAddress", 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.RecipientAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgClaimBudgetResponse) 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: MsgClaimBudgetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgClaimBudgetResponse: 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 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.Amount.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 skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From a02bde8749ecf9e8eb975aea922de228745e8f63 Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Fri, 13 Oct 2023 13:49:39 +0000 Subject: [PATCH 18/69] make authority as signer --- api/cosmos/protocolpool/v1/tx.pulsar.go | 3 ++- proto/cosmos/protocolpool/v1/tx.proto | 2 ++ x/protocolpool/types/tx.pb.go | 28 ++++++++++++------------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/api/cosmos/protocolpool/v1/tx.pulsar.go b/api/cosmos/protocolpool/v1/tx.pulsar.go index 541a4a3a5942..91ada4cc40db 100644 --- a/api/cosmos/protocolpool/v1/tx.pulsar.go +++ b/api/cosmos/protocolpool/v1/tx.pulsar.go @@ -4216,7 +4216,7 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 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, 0xb6, 0x02, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x42, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc6, 0x02, 0x0a, 0x11, 0x4d, 0x73, 0x67, 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, @@ -4236,6 +4236,7 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 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, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 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, diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index e0850db3319a..793711ca6329 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -63,6 +63,8 @@ message MsgCommunityPoolSpendResponse {} // Budget defines budget proposal type. message MsgBudgetProposal { + 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"]; string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; diff --git a/x/protocolpool/types/tx.pb.go b/x/protocolpool/types/tx.pb.go index 31e0f89a3f15..d2d6aa18b263 100644 --- a/x/protocolpool/types/tx.pb.go +++ b/x/protocolpool/types/tx.pb.go @@ -440,12 +440,12 @@ func init() { func init() { proto.RegisterFile("cosmos/protocolpool/v1/tx.proto", fileDescriptor_09efe14517e7f6dc) } var fileDescriptor_09efe14517e7f6dc = []byte{ - // 669 bytes of a gzipped FileDescriptorProto + // 671 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x6e, 0xd3, 0x4c, 0x14, 0xcd, 0x34, 0x5f, 0x23, 0x65, 0xfa, 0xa9, 0x22, 0x56, 0x49, 0x5d, 0xd3, 0x3a, 0x21, 0x0b, 0x14, 0x2a, 0x62, 0x93, 0xf2, 0xb3, 0x28, 0x6c, 0x48, 0x05, 0xbb, 0x48, 0x55, 0xda, 0x15, 0x9b, 0xc8, 0xb1, 0x47, 0xee, 0xa8, 0x99, 0xb9, 0x96, 0x67, 0xdc, 0x1f, 0x24, 0x24, 0xc4, 0x8a, 0x25, - 0x8f, 0xd0, 0x35, 0xab, 0x2e, 0x10, 0xcf, 0x50, 0x89, 0x4d, 0xc5, 0x8a, 0x15, 0x3f, 0xe9, 0xa2, + 0x8f, 0xd0, 0x35, 0xab, 0x2e, 0x78, 0x06, 0x54, 0x89, 0x4d, 0xc5, 0x8a, 0x15, 0x3f, 0xe9, 0xa2, 0x3c, 0x06, 0x8a, 0x3d, 0x75, 0x12, 0x25, 0x4a, 0x5b, 0xa4, 0xae, 0x92, 0xdc, 0x7b, 0xe6, 0x9c, 0x73, 0x8f, 0xe7, 0x3a, 0xb8, 0xe4, 0x82, 0x60, 0x20, 0xec, 0x20, 0x04, 0x09, 0x2e, 0x74, 0x03, 0x80, 0xae, 0xbd, 0x57, 0xb7, 0xe5, 0x81, 0x15, 0x97, 0xb4, 0x62, 0x02, 0xb0, 0x86, 0x01, 0xd6, @@ -471,18 +471,18 @@ var fileDescriptor_09efe14517e7f6dc = []byte{ 0x28, 0xdb, 0x92, 0x32, 0xa2, 0xff, 0x57, 0x46, 0xd5, 0x6c, 0x2b, 0x1f, 0x57, 0xb6, 0x29, 0x23, 0x5a, 0x0d, 0x6b, 0x21, 0x61, 0x0e, 0xe5, 0x94, 0xfb, 0x6d, 0x19, 0x3a, 0xdc, 0xdd, 0x21, 0x42, 0x9f, 0x8d, 0x61, 0x85, 0xb4, 0xb3, 0xad, 0x1a, 0x5a, 0x11, 0xe7, 0x02, 0x12, 0x52, 0xf0, 0xf4, - 0x5c, 0x0c, 0x51, 0xbf, 0x2a, 0x77, 0xf0, 0xd2, 0x58, 0x6e, 0x69, 0xaa, 0x80, 0xe7, 0xfb, 0xb1, - 0x77, 0x1d, 0xca, 0x94, 0xa9, 0x89, 0xc9, 0xa0, 0xeb, 0x26, 0xb3, 0x5e, 0xec, 0x3f, 0xdf, 0x71, - 0xa6, 0xca, 0x5b, 0x5c, 0x1c, 0x15, 0xbc, 0xb0, 0x32, 0xb2, 0xbb, 0xe8, 0x86, 0xae, 0xdd, 0xda, - 0xef, 0x2c, 0xce, 0x36, 0x85, 0xaf, 0xed, 0xe3, 0xc2, 0xf8, 0xdb, 0xe3, 0x81, 0x35, 0xf9, 0xcd, - 0x66, 0x4d, 0x5a, 0x4f, 0xe3, 0xf1, 0x75, 0xd0, 0xe9, 0x94, 0x6f, 0xb0, 0x36, 0x61, 0x91, 0x6b, - 0x53, 0xb8, 0xc6, 0xe1, 0xc6, 0x93, 0x6b, 0xc1, 0x53, 0xed, 0x7d, 0xbc, 0xb8, 0x15, 0x75, 0x18, - 0x95, 0xe3, 0x7b, 0x74, 0x7f, 0x0a, 0xe3, 0x28, 0xd4, 0xa8, 0x5f, 0x19, 0x9a, 0x0a, 0x13, 0x3c, - 0x37, 0x7c, 0xc5, 0xee, 0x4d, 0xb3, 0x3f, 0xc0, 0x19, 0xd6, 0xd5, 0x70, 0x17, 0x32, 0xc6, 0xec, - 0xbb, 0xf3, 0xe3, 0x55, 0xd4, 0x78, 0x76, 0xd2, 0x33, 0xd1, 0x69, 0xcf, 0x44, 0xbf, 0x7a, 0x26, - 0xfa, 0x78, 0x66, 0x66, 0x4e, 0xcf, 0xcc, 0xcc, 0xf7, 0x33, 0x33, 0xf3, 0xfa, 0x6e, 0xc2, 0x27, - 0xbc, 0x5d, 0x8b, 0x82, 0x7d, 0x30, 0xfa, 0x17, 0x17, 0x5f, 0x97, 0x4e, 0x2e, 0xae, 0x3d, 0xfa, - 0x1b, 0x00, 0x00, 0xff, 0xff, 0xa5, 0xc3, 0x68, 0xc2, 0x06, 0x07, 0x00, 0x00, + 0x5c, 0x0c, 0x51, 0xbf, 0xc6, 0x92, 0xbe, 0x83, 0x97, 0xc6, 0x72, 0x4c, 0x53, 0x06, 0x3c, 0xdf, + 0x7f, 0x0c, 0x5d, 0x87, 0x32, 0x65, 0x72, 0x62, 0x52, 0xe8, 0xba, 0x49, 0xad, 0x17, 0xfb, 0x2e, + 0xc6, 0x99, 0x2a, 0x6f, 0x71, 0x71, 0x54, 0xf0, 0xc2, 0xca, 0xc8, 0x2e, 0xa3, 0x1b, 0xba, 0x86, + 0x6b, 0xbf, 0xb3, 0x38, 0xdb, 0x14, 0xbe, 0xb6, 0x8f, 0x0b, 0xe3, 0x6f, 0x93, 0x07, 0xd6, 0xe4, + 0x37, 0x9d, 0x35, 0x69, 0x5d, 0x8d, 0xc7, 0xd7, 0x41, 0xa7, 0x53, 0xbe, 0xc1, 0xda, 0x84, 0xc5, + 0xae, 0x4d, 0xe1, 0x1a, 0x87, 0x1b, 0x4f, 0xae, 0x05, 0x4f, 0xb5, 0xf7, 0xf1, 0xe2, 0x56, 0xd4, + 0x61, 0x54, 0x8e, 0xef, 0xd5, 0xfd, 0x29, 0x8c, 0xa3, 0x50, 0xa3, 0x7e, 0x65, 0x68, 0x2a, 0x4c, + 0xf0, 0xdc, 0xf0, 0x15, 0xbb, 0x37, 0xcd, 0xfe, 0x00, 0x67, 0x58, 0x57, 0xc3, 0x5d, 0xc8, 0x18, + 0xb3, 0xef, 0xce, 0x8f, 0x57, 0x51, 0xe3, 0xd9, 0x49, 0xcf, 0x44, 0xa7, 0x3d, 0x13, 0xfd, 0xea, + 0x99, 0xe8, 0xe3, 0x99, 0x99, 0x39, 0x3d, 0x33, 0x33, 0xdf, 0xcf, 0xcc, 0xcc, 0xeb, 0xbb, 0x09, + 0x9f, 0xf0, 0x76, 0x2d, 0x0a, 0xf6, 0xc1, 0xe8, 0x5f, 0x5e, 0x7c, 0x5d, 0x3a, 0xb9, 0xb8, 0xf6, + 0xe8, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x8e, 0x58, 0x02, 0x16, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From abe1df73571bf1130f3b1f1a56f17f9282f09157 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Fri, 13 Oct 2023 19:49:45 +0530 Subject: [PATCH 19/69] add budget query --- proto/cosmos/protocolpool/v1/query.proto | 20 ++++++++++++++++++++ x/protocolpool/keeper/msg_server.go | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/proto/cosmos/protocolpool/v1/query.proto b/proto/cosmos/protocolpool/v1/query.proto index e2529692f8af..7ee13fa09f26 100644 --- a/proto/cosmos/protocolpool/v1/query.proto +++ b/proto/cosmos/protocolpool/v1/query.proto @@ -13,6 +13,11 @@ service Query { rpc CommunityPool(QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) { option (google.api.http).get = "/cosmos/protocolpool/v1/community_pool"; } + + // UnclaimedBudget queries the remaining budget left to be claimed. + rpc UnclaimedBudget(QueryUnclaimedBudgetRequest) returns (QueryUnclaimedBudgetResponse) { + option (google.api.http).get = "/cosmos/protocolpool/v1/unclaimed_budget"; + } } // QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC @@ -26,3 +31,18 @@ message QueryCommunityPoolResponse { repeated cosmos.base.v1beta1.DecCoin pool = 1 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; } + +// QueryUnclaimedBudgetRequest is the request type for the Query/UnclaimedBudgetRequest +// RPC method. +message QueryUnclaimedBudgetRequest { + // address is the recipient address to query unclaimed budget amount for. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + +} + +// QueryUnclaimedBudgetResponse is the response type for the Query/UnclaimedBudget +// RPC method. +message QueryUnclaimedBudgetResponse { + // unclaimed_amount is the remaining budget amount that is unclaimed by the recipient + cosmos.base.v1beta1.Coin unclaimed_amount = 1; +} \ No newline at end of file diff --git a/x/protocolpool/keeper/msg_server.go b/x/protocolpool/keeper/msg_server.go index 8723a34ab61b..42ba393318c2 100644 --- a/x/protocolpool/keeper/msg_server.go +++ b/x/protocolpool/keeper/msg_server.go @@ -37,7 +37,7 @@ func (k MsgServer) ClaimBudget(ctx context.Context, msg *types.MsgClaimBudget) ( } func (k MsgServer) SubmitMsgBudgetProposal(ctx context.Context, msg *types.MsgBudgetProposal) (*types.MsgBudgetProposalResponse, error) { - if err := k.validateAuthority(msg.Authority); err != nil { + if err := k.validateAuthority(msg.GetAuthority()); err != nil { return nil, err } From eb841ff5b510a873fe966ded012f98383474efbc Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Fri, 13 Oct 2023 14:24:44 +0000 Subject: [PATCH 20/69] add proto-gen files --- api/cosmos/protocolpool/v1/query.pulsar.go | 1084 ++++++++++++++++++- api/cosmos/protocolpool/v1/query_grpc.pb.go | 41 +- proto/cosmos/protocolpool/v1/query.proto | 4 +- x/protocolpool/types/query.pb.go | 447 +++++++- x/protocolpool/types/query.pb.gw.go | 83 ++ 5 files changed, 1585 insertions(+), 74 deletions(-) diff --git a/api/cosmos/protocolpool/v1/query.pulsar.go b/api/cosmos/protocolpool/v1/query.pulsar.go index b662418c2c3f..698c5a694ad1 100644 --- a/api/cosmos/protocolpool/v1/query.pulsar.go +++ b/api/cosmos/protocolpool/v1/query.pulsar.go @@ -4,6 +4,7 @@ package protocolpoolv1 import ( 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" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -865,6 +866,861 @@ func (x *fastReflection_QueryCommunityPoolResponse) ProtoMethods() *protoiface.M } } +var ( + md_QueryUnclaimedBudgetRequest protoreflect.MessageDescriptor + fd_QueryUnclaimedBudgetRequest_address protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_query_proto_init() + md_QueryUnclaimedBudgetRequest = File_cosmos_protocolpool_v1_query_proto.Messages().ByName("QueryUnclaimedBudgetRequest") + fd_QueryUnclaimedBudgetRequest_address = md_QueryUnclaimedBudgetRequest.Fields().ByName("address") +} + +var _ protoreflect.Message = (*fastReflection_QueryUnclaimedBudgetRequest)(nil) + +type fastReflection_QueryUnclaimedBudgetRequest QueryUnclaimedBudgetRequest + +func (x *QueryUnclaimedBudgetRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryUnclaimedBudgetRequest)(x) +} + +func (x *QueryUnclaimedBudgetRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_v1_query_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryUnclaimedBudgetRequest_messageType fastReflection_QueryUnclaimedBudgetRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryUnclaimedBudgetRequest_messageType{} + +type fastReflection_QueryUnclaimedBudgetRequest_messageType struct{} + +func (x fastReflection_QueryUnclaimedBudgetRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryUnclaimedBudgetRequest)(nil) +} +func (x fastReflection_QueryUnclaimedBudgetRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryUnclaimedBudgetRequest) +} +func (x fastReflection_QueryUnclaimedBudgetRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUnclaimedBudgetRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryUnclaimedBudgetRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUnclaimedBudgetRequest +} + +// 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_QueryUnclaimedBudgetRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryUnclaimedBudgetRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryUnclaimedBudgetRequest) New() protoreflect.Message { + return new(fastReflection_QueryUnclaimedBudgetRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryUnclaimedBudgetRequest) Interface() protoreflect.ProtoMessage { + return (*QueryUnclaimedBudgetRequest)(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_QueryUnclaimedBudgetRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_QueryUnclaimedBudgetRequest_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_QueryUnclaimedBudgetRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest.address": + return x.Address != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest 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_QueryUnclaimedBudgetRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest.address": + x.Address = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest 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_QueryUnclaimedBudgetRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest.address": + value := x.Address + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest 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_QueryUnclaimedBudgetRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest.address": + x.Address = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest 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_QueryUnclaimedBudgetRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest.address": + panic(fmt.Errorf("field address of message cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest 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_QueryUnclaimedBudgetRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest.address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest 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_QueryUnclaimedBudgetRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest", 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_QueryUnclaimedBudgetRequest) 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_QueryUnclaimedBudgetRequest) 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_QueryUnclaimedBudgetRequest) 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_QueryUnclaimedBudgetRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryUnclaimedBudgetRequest) + 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.Address) + 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().(*QueryUnclaimedBudgetRequest) + 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.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + 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().(*QueryUnclaimedBudgetRequest) + 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: QueryUnclaimedBudgetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUnclaimedBudgetRequest: 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 Address", 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.Address = 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_QueryUnclaimedBudgetResponse protoreflect.MessageDescriptor + fd_QueryUnclaimedBudgetResponse_unclaimed_amount protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_query_proto_init() + md_QueryUnclaimedBudgetResponse = File_cosmos_protocolpool_v1_query_proto.Messages().ByName("QueryUnclaimedBudgetResponse") + fd_QueryUnclaimedBudgetResponse_unclaimed_amount = md_QueryUnclaimedBudgetResponse.Fields().ByName("unclaimed_amount") +} + +var _ protoreflect.Message = (*fastReflection_QueryUnclaimedBudgetResponse)(nil) + +type fastReflection_QueryUnclaimedBudgetResponse QueryUnclaimedBudgetResponse + +func (x *QueryUnclaimedBudgetResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryUnclaimedBudgetResponse)(x) +} + +func (x *QueryUnclaimedBudgetResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_protocolpool_v1_query_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryUnclaimedBudgetResponse_messageType fastReflection_QueryUnclaimedBudgetResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryUnclaimedBudgetResponse_messageType{} + +type fastReflection_QueryUnclaimedBudgetResponse_messageType struct{} + +func (x fastReflection_QueryUnclaimedBudgetResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryUnclaimedBudgetResponse)(nil) +} +func (x fastReflection_QueryUnclaimedBudgetResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryUnclaimedBudgetResponse) +} +func (x fastReflection_QueryUnclaimedBudgetResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUnclaimedBudgetResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryUnclaimedBudgetResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUnclaimedBudgetResponse +} + +// 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_QueryUnclaimedBudgetResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryUnclaimedBudgetResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryUnclaimedBudgetResponse) New() protoreflect.Message { + return new(fastReflection_QueryUnclaimedBudgetResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryUnclaimedBudgetResponse) Interface() protoreflect.ProtoMessage { + return (*QueryUnclaimedBudgetResponse)(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_QueryUnclaimedBudgetResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.UnclaimedAmount != nil { + value := protoreflect.ValueOfMessage(x.UnclaimedAmount.ProtoReflect()) + if !f(fd_QueryUnclaimedBudgetResponse_unclaimed_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_QueryUnclaimedBudgetResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.unclaimed_amount": + return x.UnclaimedAmount != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse 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_QueryUnclaimedBudgetResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.unclaimed_amount": + x.UnclaimedAmount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse 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_QueryUnclaimedBudgetResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.unclaimed_amount": + value := x.UnclaimedAmount + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse 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_QueryUnclaimedBudgetResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.unclaimed_amount": + x.UnclaimedAmount = value.Message().Interface().(*v1beta1.Coin) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse 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_QueryUnclaimedBudgetResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.unclaimed_amount": + if x.UnclaimedAmount == nil { + x.UnclaimedAmount = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.UnclaimedAmount.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse 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_QueryUnclaimedBudgetResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.unclaimed_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.QueryUnclaimedBudgetResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse 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_QueryUnclaimedBudgetResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse", 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_QueryUnclaimedBudgetResponse) 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_QueryUnclaimedBudgetResponse) 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_QueryUnclaimedBudgetResponse) 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_QueryUnclaimedBudgetResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryUnclaimedBudgetResponse) + 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.UnclaimedAmount != nil { + l = options.Size(x.UnclaimedAmount) + 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().(*QueryUnclaimedBudgetResponse) + 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.UnclaimedAmount != nil { + encoded, err := options.Marshal(x.UnclaimedAmount) + 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().(*QueryUnclaimedBudgetResponse) + 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: QueryUnclaimedBudgetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUnclaimedBudgetResponse: 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 UnclaimedAmount", 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.UnclaimedAmount == nil { + x.UnclaimedAmount = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UnclaimedAmount); 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 @@ -944,6 +1800,82 @@ func (x *QueryCommunityPoolResponse) GetPool() []*v1beta1.DecCoin { return nil } +// QueryUnclaimedBudgetRequest is the request type for the Query/UnclaimedBudgetRequest +// RPC method. +type QueryUnclaimedBudgetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // address is the recipient address to query unclaimed budget amount for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *QueryUnclaimedBudgetRequest) Reset() { + *x = QueryUnclaimedBudgetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryUnclaimedBudgetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryUnclaimedBudgetRequest) ProtoMessage() {} + +// Deprecated: Use QueryUnclaimedBudgetRequest.ProtoReflect.Descriptor instead. +func (*QueryUnclaimedBudgetRequest) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_query_proto_rawDescGZIP(), []int{2} +} + +func (x *QueryUnclaimedBudgetRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// QueryUnclaimedBudgetResponse is the response type for the Query/UnclaimedBudget +// RPC method. +type QueryUnclaimedBudgetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // unclaimed_amount is the remaining budget amount that is unclaimed by the recipient + UnclaimedAmount *v1beta1.Coin `protobuf:"bytes,1,opt,name=unclaimed_amount,json=unclaimedAmount,proto3" json:"unclaimed_amount,omitempty"` +} + +func (x *QueryUnclaimedBudgetResponse) Reset() { + *x = QueryUnclaimedBudgetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryUnclaimedBudgetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryUnclaimedBudgetResponse) ProtoMessage() {} + +// Deprecated: Use QueryUnclaimedBudgetResponse.ProtoReflect.Descriptor instead. +func (*QueryUnclaimedBudgetResponse) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryUnclaimedBudgetResponse) GetUnclaimedAmount() *v1beta1.Coin { + if x != nil { + return x.UnclaimedAmount + } + return nil +} + var File_cosmos_protocolpool_v1_query_proto protoreflect.FileDescriptor var file_cosmos_protocolpool_v1_query_proto_rawDesc = []byte{ @@ -956,42 +1888,66 @@ var file_cosmos_protocolpool_v1_query_proto_rawDesc = []byte{ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, - 0x22, 0x1b, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, - 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x83, 0x01, - 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, - 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x04, - 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, - 0x1f, 0x2b, 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, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x04, 0x70, - 0x6f, 0x6f, 0x6c, 0x32, 0xb0, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xa6, 0x01, - 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, - 0x79, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 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, + 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, 0x22, 0x1b, 0x0a, 0x19, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, + 0x6f, 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 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, + 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x51, + 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, + 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, + 0x07, 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, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x22, 0x64, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x63, 0x6c, 0x61, 0x69, + 0x6d, 0x65, 0x64, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x44, 0x0a, 0x10, 0x75, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x5f, 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, 0x52, 0x0f, 0x75, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, + 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xe1, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x12, 0xa6, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, + 0x6f, 0x6f, 0x6c, 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, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, + 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0xae, 0x01, 0x0a, 0x0f, 0x55, + 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x33, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x63, + 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 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, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x55, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x42, 0x75, 0x64, 0x67, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2a, 0x12, 0x28, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x6e, 0x63, 0x6c, 0x61, + 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 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, 0x51, 0x75, 0x65, 0x72, + 0x79, 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 ( @@ -1006,21 +1962,27 @@ func file_cosmos_protocolpool_v1_query_proto_rawDescGZIP() []byte { return file_cosmos_protocolpool_v1_query_proto_rawDescData } -var file_cosmos_protocolpool_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cosmos_protocolpool_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_cosmos_protocolpool_v1_query_proto_goTypes = []interface{}{ - (*QueryCommunityPoolRequest)(nil), // 0: cosmos.protocolpool.v1.QueryCommunityPoolRequest - (*QueryCommunityPoolResponse)(nil), // 1: cosmos.protocolpool.v1.QueryCommunityPoolResponse - (*v1beta1.DecCoin)(nil), // 2: cosmos.base.v1beta1.DecCoin + (*QueryCommunityPoolRequest)(nil), // 0: cosmos.protocolpool.v1.QueryCommunityPoolRequest + (*QueryCommunityPoolResponse)(nil), // 1: cosmos.protocolpool.v1.QueryCommunityPoolResponse + (*QueryUnclaimedBudgetRequest)(nil), // 2: cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest + (*QueryUnclaimedBudgetResponse)(nil), // 3: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse + (*v1beta1.DecCoin)(nil), // 4: cosmos.base.v1beta1.DecCoin + (*v1beta1.Coin)(nil), // 5: cosmos.base.v1beta1.Coin } var file_cosmos_protocolpool_v1_query_proto_depIdxs = []int32{ - 2, // 0: cosmos.protocolpool.v1.QueryCommunityPoolResponse.pool:type_name -> cosmos.base.v1beta1.DecCoin - 0, // 1: cosmos.protocolpool.v1.Query.CommunityPool:input_type -> cosmos.protocolpool.v1.QueryCommunityPoolRequest - 1, // 2: cosmos.protocolpool.v1.Query.CommunityPool:output_type -> cosmos.protocolpool.v1.QueryCommunityPoolResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 4, // 0: cosmos.protocolpool.v1.QueryCommunityPoolResponse.pool:type_name -> cosmos.base.v1beta1.DecCoin + 5, // 1: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.unclaimed_amount:type_name -> cosmos.base.v1beta1.Coin + 0, // 2: cosmos.protocolpool.v1.Query.CommunityPool:input_type -> cosmos.protocolpool.v1.QueryCommunityPoolRequest + 2, // 3: cosmos.protocolpool.v1.Query.UnclaimedBudget:input_type -> cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest + 1, // 4: cosmos.protocolpool.v1.Query.CommunityPool:output_type -> cosmos.protocolpool.v1.QueryCommunityPoolResponse + 3, // 5: cosmos.protocolpool.v1.Query.UnclaimedBudget:output_type -> cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_cosmos_protocolpool_v1_query_proto_init() } @@ -1053,6 +2015,30 @@ func file_cosmos_protocolpool_v1_query_proto_init() { return nil } } + file_cosmos_protocolpool_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryUnclaimedBudgetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_protocolpool_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryUnclaimedBudgetResponse); 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{ @@ -1060,7 +2046,7 @@ func file_cosmos_protocolpool_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_protocolpool_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/protocolpool/v1/query_grpc.pb.go b/api/cosmos/protocolpool/v1/query_grpc.pb.go index dec2c11ea7f0..b46097fc295e 100644 --- a/api/cosmos/protocolpool/v1/query_grpc.pb.go +++ b/api/cosmos/protocolpool/v1/query_grpc.pb.go @@ -19,7 +19,8 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_CommunityPool_FullMethodName = "/cosmos.protocolpool.v1.Query/CommunityPool" + Query_CommunityPool_FullMethodName = "/cosmos.protocolpool.v1.Query/CommunityPool" + Query_UnclaimedBudget_FullMethodName = "/cosmos.protocolpool.v1.Query/UnclaimedBudget" ) // QueryClient is the client API for Query service. @@ -28,6 +29,8 @@ const ( type QueryClient interface { // CommunityPool queries the community pool coins. CommunityPool(ctx context.Context, in *QueryCommunityPoolRequest, opts ...grpc.CallOption) (*QueryCommunityPoolResponse, error) + // UnclaimedBudget queries the remaining budget left to be claimed. + UnclaimedBudget(ctx context.Context, in *QueryUnclaimedBudgetRequest, opts ...grpc.CallOption) (*QueryUnclaimedBudgetResponse, error) } type queryClient struct { @@ -47,12 +50,23 @@ func (c *queryClient) CommunityPool(ctx context.Context, in *QueryCommunityPoolR return out, nil } +func (c *queryClient) UnclaimedBudget(ctx context.Context, in *QueryUnclaimedBudgetRequest, opts ...grpc.CallOption) (*QueryUnclaimedBudgetResponse, error) { + out := new(QueryUnclaimedBudgetResponse) + err := c.cc.Invoke(ctx, Query_UnclaimedBudget_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility type QueryServer interface { // CommunityPool queries the community pool coins. CommunityPool(context.Context, *QueryCommunityPoolRequest) (*QueryCommunityPoolResponse, error) + // UnclaimedBudget queries the remaining budget left to be claimed. + UnclaimedBudget(context.Context, *QueryUnclaimedBudgetRequest) (*QueryUnclaimedBudgetResponse, error) mustEmbedUnimplementedQueryServer() } @@ -63,6 +77,9 @@ type UnimplementedQueryServer struct { func (UnimplementedQueryServer) CommunityPool(context.Context, *QueryCommunityPoolRequest) (*QueryCommunityPoolResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CommunityPool not implemented") } +func (UnimplementedQueryServer) UnclaimedBudget(context.Context, *QueryUnclaimedBudgetRequest) (*QueryUnclaimedBudgetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnclaimedBudget not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -94,6 +111,24 @@ func _Query_CommunityPool_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Query_UnclaimedBudget_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryUnclaimedBudgetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).UnclaimedBudget(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_UnclaimedBudget_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UnclaimedBudget(ctx, req.(*QueryUnclaimedBudgetRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -105,6 +140,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "CommunityPool", Handler: _Query_CommunityPool_Handler, }, + { + MethodName: "UnclaimedBudget", + Handler: _Query_UnclaimedBudget_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/protocolpool/v1/query.proto", diff --git a/proto/cosmos/protocolpool/v1/query.proto b/proto/cosmos/protocolpool/v1/query.proto index 7ee13fa09f26..a19eb7ff0021 100644 --- a/proto/cosmos/protocolpool/v1/query.proto +++ b/proto/cosmos/protocolpool/v1/query.proto @@ -6,6 +6,7 @@ option go_package = "cosmossdk.io/x/protocolpool/types"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; // Query defines the gRPC querier service for community pool module. service Query { @@ -32,12 +33,11 @@ message QueryCommunityPoolResponse { [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; } -// QueryUnclaimedBudgetRequest is the request type for the Query/UnclaimedBudgetRequest +// QueryUnclaimedBudgetRequest is the request type for the Query/UnclaimedBudgetRequest // RPC method. message QueryUnclaimedBudgetRequest { // address is the recipient address to query unclaimed budget amount for. string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - } // QueryUnclaimedBudgetResponse is the response type for the Query/UnclaimedBudget diff --git a/x/protocolpool/types/query.pb.go b/x/protocolpool/types/query.pb.go index d1fd1bb0c927..e797491354ac 100644 --- a/x/protocolpool/types/query.pb.go +++ b/x/protocolpool/types/query.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" 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/gogoproto/gogoproto" @@ -116,9 +117,105 @@ func (m *QueryCommunityPoolResponse) GetPool() github_com_cosmos_cosmos_sdk_type return nil } +// QueryUnclaimedBudgetRequest is the request type for the Query/UnclaimedBudgetRequest +// RPC method. +type QueryUnclaimedBudgetRequest struct { + // address is the recipient address to query unclaimed budget amount for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryUnclaimedBudgetRequest) Reset() { *m = QueryUnclaimedBudgetRequest{} } +func (m *QueryUnclaimedBudgetRequest) String() string { return proto.CompactTextString(m) } +func (*QueryUnclaimedBudgetRequest) ProtoMessage() {} +func (*QueryUnclaimedBudgetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_51500a0a77d57843, []int{2} +} +func (m *QueryUnclaimedBudgetRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryUnclaimedBudgetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryUnclaimedBudgetRequest.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 *QueryUnclaimedBudgetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUnclaimedBudgetRequest.Merge(m, src) +} +func (m *QueryUnclaimedBudgetRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryUnclaimedBudgetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUnclaimedBudgetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryUnclaimedBudgetRequest proto.InternalMessageInfo + +func (m *QueryUnclaimedBudgetRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +// QueryUnclaimedBudgetResponse is the response type for the Query/UnclaimedBudget +// RPC method. +type QueryUnclaimedBudgetResponse struct { + // unclaimed_amount is the remaining budget amount that is unclaimed by the recipient + UnclaimedAmount *types.Coin `protobuf:"bytes,1,opt,name=unclaimed_amount,json=unclaimedAmount,proto3" json:"unclaimed_amount,omitempty"` +} + +func (m *QueryUnclaimedBudgetResponse) Reset() { *m = QueryUnclaimedBudgetResponse{} } +func (m *QueryUnclaimedBudgetResponse) String() string { return proto.CompactTextString(m) } +func (*QueryUnclaimedBudgetResponse) ProtoMessage() {} +func (*QueryUnclaimedBudgetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_51500a0a77d57843, []int{3} +} +func (m *QueryUnclaimedBudgetResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryUnclaimedBudgetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryUnclaimedBudgetResponse.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 *QueryUnclaimedBudgetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUnclaimedBudgetResponse.Merge(m, src) +} +func (m *QueryUnclaimedBudgetResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryUnclaimedBudgetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUnclaimedBudgetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryUnclaimedBudgetResponse proto.InternalMessageInfo + +func (m *QueryUnclaimedBudgetResponse) GetUnclaimedAmount() *types.Coin { + if m != nil { + return m.UnclaimedAmount + } + return nil +} + func init() { proto.RegisterType((*QueryCommunityPoolRequest)(nil), "cosmos.protocolpool.v1.QueryCommunityPoolRequest") proto.RegisterType((*QueryCommunityPoolResponse)(nil), "cosmos.protocolpool.v1.QueryCommunityPoolResponse") + proto.RegisterType((*QueryUnclaimedBudgetRequest)(nil), "cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest") + proto.RegisterType((*QueryUnclaimedBudgetResponse)(nil), "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse") } func init() { @@ -126,28 +223,37 @@ func init() { } var fileDescriptor_51500a0a77d57843 = []byte{ - // 335 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x51, 0x3f, 0x4e, 0xf3, 0x30, - 0x14, 0x8f, 0xbf, 0x0f, 0x18, 0x82, 0x58, 0x22, 0x84, 0x20, 0x54, 0x2e, 0x64, 0x40, 0x95, 0x10, - 0x7e, 0x4a, 0x3b, 0xb2, 0xb5, 0x1c, 0x00, 0x3a, 0xb2, 0xa0, 0x24, 0xb5, 0x82, 0xd5, 0xc4, 0x2f, - 0xad, 0x9d, 0x8a, 0xae, 0x70, 0x01, 0x24, 0xee, 0xc0, 0xc0, 0xc4, 0x31, 0x3a, 0x56, 0x62, 0x61, - 0x02, 0xd4, 0x72, 0x10, 0x94, 0x38, 0x95, 0xa8, 0xd4, 0x0e, 0x4c, 0xb6, 0x7e, 0xef, 0xfd, 0xfe, - 0xd9, 0xb6, 0x17, 0xa1, 0x4a, 0x51, 0x41, 0x36, 0x44, 0x8d, 0x11, 0x26, 0x19, 0x62, 0x02, 0x23, - 0x1f, 0x06, 0x39, 0x1f, 0x8e, 0x59, 0x89, 0x3a, 0x7b, 0x66, 0x87, 0xfd, 0xde, 0x61, 0x23, 0xdf, - 0xdd, 0x8d, 0x31, 0xc6, 0x12, 0x84, 0xe2, 0x66, 0xe6, 0x6e, 0x2d, 0x46, 0x8c, 0x13, 0x0e, 0x41, - 0x26, 0x20, 0x90, 0x12, 0x75, 0xa0, 0x05, 0xca, 0x8a, 0xed, 0xd2, 0xca, 0x2f, 0x0c, 0x14, 0x87, - 0x91, 0x1f, 0x72, 0x1d, 0xf8, 0x10, 0xa1, 0x90, 0x66, 0xee, 0x1d, 0xda, 0x07, 0x57, 0x85, 0x75, - 0x07, 0xd3, 0x34, 0x97, 0x42, 0x8f, 0x2f, 0x11, 0x93, 0x2e, 0x1f, 0xe4, 0x5c, 0x69, 0xef, 0x81, - 0xd8, 0xee, 0xaa, 0xa9, 0xca, 0x50, 0x2a, 0xee, 0x70, 0x7b, 0xa3, 0x88, 0xb6, 0x4f, 0x8e, 0xfe, - 0x37, 0xb6, 0x9b, 0x35, 0x56, 0xc5, 0x2e, 0xac, 0x58, 0x65, 0xc5, 0x2e, 0x78, 0xd4, 0x41, 0x21, - 0xdb, 0xad, 0xc9, 0x47, 0xdd, 0x7a, 0xf9, 0xac, 0x9f, 0xc6, 0x42, 0xdf, 0xe6, 0x21, 0x8b, 0x30, - 0x85, 0x2a, 0x9a, 0x39, 0xce, 0x54, 0xaf, 0x0f, 0x7a, 0x9c, 0x71, 0xb5, 0xe0, 0xa8, 0x6e, 0x29, - 0xdf, 0x7c, 0x25, 0xf6, 0x66, 0x99, 0xc2, 0x79, 0x26, 0xf6, 0xce, 0x52, 0x14, 0xc7, 0x67, 0xab, - 0xdf, 0x8a, 0xad, 0x2d, 0xe5, 0x36, 0xff, 0x42, 0x31, 0x4d, 0x3d, 0x76, 0xff, 0xf6, 0xfd, 0xf4, - 0xaf, 0xe1, 0x9c, 0xc0, 0x9a, 0xef, 0x8b, 0x16, 0xb4, 0x9b, 0x02, 0x69, 0x9f, 0x4f, 0x66, 0x94, - 0x4c, 0x67, 0x94, 0x7c, 0xcd, 0x28, 0x79, 0x9c, 0x53, 0x6b, 0x3a, 0xa7, 0xd6, 0xfb, 0x9c, 0x5a, - 0xd7, 0xc7, 0x46, 0x40, 0xf5, 0xfa, 0x4c, 0x20, 0xdc, 0x2d, 0x0b, 0x95, 0xf5, 0xc3, 0xad, 0x12, - 0x6b, 0xfd, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8a, 0xc7, 0xae, 0xa2, 0x2b, 0x02, 0x00, 0x00, + // 468 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcb, 0x6e, 0xd3, 0x40, + 0x14, 0x86, 0x33, 0xe5, 0x26, 0xa6, 0x42, 0x45, 0xa3, 0x0a, 0x25, 0x6e, 0xe4, 0x16, 0x2f, 0x50, + 0x04, 0xea, 0x0c, 0x76, 0xd8, 0xb1, 0x6a, 0xda, 0x07, 0xa0, 0x41, 0x6c, 0xd8, 0x44, 0xbe, 0x8c, + 0xcc, 0xa8, 0xf6, 0x1c, 0x37, 0x33, 0x8e, 0xc8, 0x16, 0x5e, 0x00, 0x89, 0x77, 0x60, 0xc1, 0x82, + 0x15, 0x0f, 0xd1, 0x65, 0x05, 0x1b, 0x56, 0x5c, 0x12, 0x1e, 0x04, 0x79, 0x3c, 0x86, 0x16, 0x39, + 0x95, 0xb2, 0xb2, 0x75, 0xfe, 0xf9, 0xff, 0xf3, 0x9d, 0x39, 0x83, 0xbd, 0x18, 0x54, 0x0e, 0x8a, + 0x15, 0x53, 0xd0, 0x10, 0x43, 0x56, 0x00, 0x64, 0x6c, 0xe6, 0xb3, 0xd3, 0x92, 0x4f, 0xe7, 0xd4, + 0x54, 0xc9, 0xbd, 0xfa, 0x0c, 0xbd, 0x78, 0x86, 0xce, 0x7c, 0x67, 0x3b, 0x85, 0x14, 0x4c, 0x91, + 0x55, 0x7f, 0xb5, 0xee, 0xf4, 0x53, 0x80, 0x34, 0xe3, 0x2c, 0x2c, 0x04, 0x0b, 0xa5, 0x04, 0x1d, + 0x6a, 0x01, 0xd2, 0xba, 0x1d, 0xd7, 0xf6, 0x8b, 0x42, 0xc5, 0xd9, 0xcc, 0x8f, 0xb8, 0x0e, 0x7d, + 0x16, 0x83, 0x90, 0x56, 0xef, 0xd5, 0xfa, 0xa4, 0x8e, 0xbd, 0xd8, 0xd8, 0xdb, 0xc1, 0xbd, 0xe3, + 0x8a, 0xea, 0x10, 0xf2, 0xbc, 0x94, 0x42, 0xcf, 0x9f, 0x01, 0x64, 0x63, 0x7e, 0x5a, 0x72, 0xa5, + 0xbd, 0xb7, 0x08, 0x3b, 0x6d, 0xaa, 0x2a, 0x40, 0x2a, 0x4e, 0x38, 0xbe, 0x5e, 0x51, 0x77, 0xd1, + 0xde, 0xb5, 0xc1, 0x66, 0xd0, 0xa7, 0x36, 0xb8, 0xa2, 0xa0, 0x96, 0x82, 0x1e, 0xf1, 0xf8, 0x10, + 0x84, 0x1c, 0x0d, 0xcf, 0xbe, 0xef, 0x76, 0x3e, 0xfe, 0xd8, 0x7d, 0x94, 0x0a, 0xfd, 0xaa, 0x8c, + 0x68, 0x0c, 0xb9, 0x05, 0xb1, 0x9f, 0x7d, 0x95, 0x9c, 0x30, 0x3d, 0x2f, 0xb8, 0x6a, 0x3c, 0x6a, + 0x6c, 0xe2, 0xbd, 0x63, 0xbc, 0x63, 0x20, 0x5e, 0xc8, 0x38, 0x0b, 0x45, 0xce, 0x93, 0x51, 0x99, + 0xa4, 0x5c, 0x5b, 0x48, 0x12, 0xe0, 0x5b, 0x61, 0x92, 0x4c, 0xb9, 0x52, 0x5d, 0xb4, 0x87, 0x06, + 0xb7, 0x47, 0xdd, 0x2f, 0x9f, 0xf7, 0xb7, 0x2d, 0xcb, 0x41, 0xad, 0x3c, 0xd7, 0x53, 0x21, 0xd3, + 0x71, 0x73, 0xd0, 0x4b, 0x70, 0xbf, 0x3d, 0xd2, 0x4e, 0x76, 0x84, 0xef, 0x96, 0x8d, 0x34, 0x09, + 0x73, 0x28, 0xa5, 0x36, 0xe1, 0x9b, 0x41, 0xaf, 0x75, 0xca, 0x0a, 0x77, 0xbc, 0xf5, 0xd7, 0x72, + 0x60, 0x1c, 0xc1, 0xaf, 0x0d, 0x7c, 0xc3, 0xb4, 0x21, 0x1f, 0x10, 0xbe, 0x73, 0xe9, 0x0e, 0x89, + 0x4f, 0xdb, 0xf7, 0x4f, 0x57, 0x6e, 0xc3, 0x09, 0xd6, 0xb1, 0xd4, 0x83, 0x78, 0xf4, 0xcd, 0xd7, + 0xdf, 0xef, 0x37, 0x06, 0xe4, 0x01, 0x5b, 0xf1, 0x24, 0xe3, 0xc6, 0x36, 0xa9, 0x2a, 0xe4, 0x13, + 0xc2, 0x5b, 0xff, 0x5d, 0x0a, 0x19, 0x5e, 0xd9, 0xb7, 0x7d, 0x2b, 0xce, 0x93, 0xf5, 0x4c, 0x16, + 0xf7, 0xb1, 0xc1, 0x7d, 0x48, 0x06, 0xab, 0x70, 0xff, 0x6d, 0x25, 0x32, 0xce, 0xd1, 0xd3, 0xb3, + 0x85, 0x8b, 0xce, 0x17, 0x2e, 0xfa, 0xb9, 0x70, 0xd1, 0xbb, 0xa5, 0xdb, 0x39, 0x5f, 0xba, 0x9d, + 0x6f, 0x4b, 0xb7, 0xf3, 0xf2, 0x7e, 0x1d, 0xa1, 0x92, 0x13, 0x2a, 0x80, 0xbd, 0xbe, 0x1c, 0x65, + 0x1e, 0x5a, 0x74, 0xd3, 0xd4, 0x86, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x7f, 0x77, 0xbf, + 0xb0, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -164,6 +270,8 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // CommunityPool queries the community pool coins. CommunityPool(ctx context.Context, in *QueryCommunityPoolRequest, opts ...grpc.CallOption) (*QueryCommunityPoolResponse, error) + // UnclaimedBudget queries the remaining budget left to be claimed. + UnclaimedBudget(ctx context.Context, in *QueryUnclaimedBudgetRequest, opts ...grpc.CallOption) (*QueryUnclaimedBudgetResponse, error) } type queryClient struct { @@ -183,10 +291,21 @@ func (c *queryClient) CommunityPool(ctx context.Context, in *QueryCommunityPoolR return out, nil } +func (c *queryClient) UnclaimedBudget(ctx context.Context, in *QueryUnclaimedBudgetRequest, opts ...grpc.CallOption) (*QueryUnclaimedBudgetResponse, error) { + out := new(QueryUnclaimedBudgetResponse) + err := c.cc.Invoke(ctx, "/cosmos.protocolpool.v1.Query/UnclaimedBudget", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // CommunityPool queries the community pool coins. CommunityPool(context.Context, *QueryCommunityPoolRequest) (*QueryCommunityPoolResponse, error) + // UnclaimedBudget queries the remaining budget left to be claimed. + UnclaimedBudget(context.Context, *QueryUnclaimedBudgetRequest) (*QueryUnclaimedBudgetResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -196,6 +315,9 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) CommunityPool(ctx context.Context, req *QueryCommunityPoolRequest) (*QueryCommunityPoolResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CommunityPool not implemented") } +func (*UnimplementedQueryServer) UnclaimedBudget(ctx context.Context, req *QueryUnclaimedBudgetRequest) (*QueryUnclaimedBudgetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnclaimedBudget not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -219,6 +341,24 @@ func _Query_CommunityPool_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Query_UnclaimedBudget_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryUnclaimedBudgetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).UnclaimedBudget(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.protocolpool.v1.Query/UnclaimedBudget", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UnclaimedBudget(ctx, req.(*QueryUnclaimedBudgetRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.protocolpool.v1.Query", HandlerType: (*QueryServer)(nil), @@ -227,6 +367,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "CommunityPool", Handler: _Query_CommunityPool_Handler, }, + { + MethodName: "UnclaimedBudget", + Handler: _Query_UnclaimedBudget_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/protocolpool/v1/query.proto", @@ -292,6 +436,71 @@ func (m *QueryCommunityPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *QueryUnclaimedBudgetRequest) 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 *QueryUnclaimedBudgetRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryUnclaimedBudgetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryUnclaimedBudgetResponse) 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 *QueryUnclaimedBudgetResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryUnclaimedBudgetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UnclaimedAmount != nil { + { + size, err := m.UnclaimedAmount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -327,6 +536,32 @@ func (m *QueryCommunityPoolResponse) Size() (n int) { return n } +func (m *QueryUnclaimedBudgetRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryUnclaimedBudgetResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UnclaimedAmount != nil { + l = m.UnclaimedAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -467,6 +702,174 @@ func (m *QueryCommunityPoolResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryUnclaimedBudgetRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryUnclaimedBudgetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryUnclaimedBudgetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryUnclaimedBudgetResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryUnclaimedBudgetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryUnclaimedBudgetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnclaimedAmount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UnclaimedAmount == nil { + m.UnclaimedAmount = &types.Coin{} + } + if err := m.UnclaimedAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/protocolpool/types/query.pb.gw.go b/x/protocolpool/types/query.pb.gw.go index 589b60aa8b40..9116e71c9741 100644 --- a/x/protocolpool/types/query.pb.gw.go +++ b/x/protocolpool/types/query.pb.gw.go @@ -51,6 +51,42 @@ func local_request_Query_CommunityPool_0(ctx context.Context, marshaler runtime. } +var ( + filter_Query_UnclaimedBudget_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_UnclaimedBudget_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryUnclaimedBudgetRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UnclaimedBudget_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UnclaimedBudget(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_UnclaimedBudget_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryUnclaimedBudgetRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UnclaimedBudget_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UnclaimedBudget(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -80,6 +116,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_UnclaimedBudget_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_UnclaimedBudget_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_UnclaimedBudget_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -141,13 +200,37 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_UnclaimedBudget_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_UnclaimedBudget_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_UnclaimedBudget_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( pattern_Query_CommunityPool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "protocolpool", "v1", "community_pool"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_UnclaimedBudget_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "protocolpool", "v1", "unclaimed_budget"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( forward_Query_CommunityPool_0 = runtime.ForwardResponseMessage + + forward_Query_UnclaimedBudget_0 = runtime.ForwardResponseMessage ) From 6b0675f0c2161d84d99828129b73bcdba4d5fbaa Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Fri, 13 Oct 2023 19:57:10 +0530 Subject: [PATCH 21/69] add grpc query implementation --- x/protocolpool/keeper/grpc_query.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/x/protocolpool/keeper/grpc_query.go b/x/protocolpool/keeper/grpc_query.go index d1e9abcb760e..c1cccf2bc4fc 100644 --- a/x/protocolpool/keeper/grpc_query.go +++ b/x/protocolpool/keeper/grpc_query.go @@ -2,8 +2,12 @@ package keeper import ( "context" + "errors" + "cosmossdk.io/collections" "cosmossdk.io/x/protocolpool/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -27,3 +31,21 @@ func (k Querier) CommunityPool(ctx context.Context, req *types.QueryCommunityPoo decCoins := sdk.NewDecCoinsFromCoins(amount...) return &types.QueryCommunityPoolResponse{Pool: decCoins}, nil } + +func (k Querier) UnclaimedBudget(ctx context.Context, req *types.QueryUnclaimedBudgetRequest) (*types.QueryUnclaimedBudgetResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + address, err := k.Keeper.authKeeper.AddressCodec().StringToBytes(req.Address) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "invalid address: %s", err.Error()) + } + budget, err := k.Keeper.BudgetProposal.Get(ctx, address) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return nil, status.Errorf(codes.NotFound, "no budget proposal found for address: %s", req.Address) + } + return nil, err + } + return &types.QueryUnclaimedBudgetResponse{budget.TotalBudget}, nil +} From d7235cd3106b9486dcadd0ac14b1fb81a1b2c68b Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Fri, 13 Oct 2023 19:59:02 +0530 Subject: [PATCH 22/69] fix nit --- x/protocolpool/keeper/grpc_query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/protocolpool/keeper/grpc_query.go b/x/protocolpool/keeper/grpc_query.go index c1cccf2bc4fc..d0384964c624 100644 --- a/x/protocolpool/keeper/grpc_query.go +++ b/x/protocolpool/keeper/grpc_query.go @@ -47,5 +47,5 @@ func (k Querier) UnclaimedBudget(ctx context.Context, req *types.QueryUnclaimedB } return nil, err } - return &types.QueryUnclaimedBudgetResponse{budget.TotalBudget}, nil + return &types.QueryUnclaimedBudgetResponse{UnclaimedAmount: budget.TotalBudget}, nil } From 8782ff8fae7951aff47b8fca576f18b1ff987fca Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Fri, 13 Oct 2023 20:00:23 +0530 Subject: [PATCH 23/69] delete unused distrinfo struct --- x/protocolpool/types/types.go | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 x/protocolpool/types/types.go diff --git a/x/protocolpool/types/types.go b/x/protocolpool/types/types.go deleted file mode 100644 index bb10458adffd..000000000000 --- a/x/protocolpool/types/types.go +++ /dev/null @@ -1,9 +0,0 @@ -package types - -import sdk "github.com/cosmos/cosmos-sdk/types" - -// DistributionInfo represents the information about distributed funds for a recipient. -type DistributionInfo struct { - Address sdk.AccAddress `json:"address"` - Amount sdk.Coin `json:"amount"` -} From 43b4778f6aa2df82c3d0ea8bb007edf503eccee2 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Fri, 13 Oct 2023 20:05:46 +0530 Subject: [PATCH 24/69] simplify naming --- proto/cosmos/protocolpool/v1/tx.proto | 4 ++-- x/protocolpool/keeper/msg_server.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index 793711ca6329..9451b42d3b24 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -22,8 +22,8 @@ service Msg { // keeper. rpc CommunityPoolSpend(MsgCommunityPoolSpend) returns (MsgCommunityPoolSpendResponse); - // SubmitMsgBudgetProposal defines a method to set a budget proposal. - rpc SubmitMsgBudgetProposal(MsgBudgetProposal) returns (MsgBudgetProposalResponse); + // BudgetProposal defines a method to set a budget proposal. + rpc BudgetProposal(MsgBudgetProposal) returns (MsgBudgetProposalResponse); // ClaimBudget defines a method to claim the distributed budget. rpc ClaimBudget(MsgClaimBudget) returns (MsgClaimBudgetResponse); diff --git a/x/protocolpool/keeper/msg_server.go b/x/protocolpool/keeper/msg_server.go index 42ba393318c2..a9b73af25756 100644 --- a/x/protocolpool/keeper/msg_server.go +++ b/x/protocolpool/keeper/msg_server.go @@ -36,7 +36,7 @@ func (k MsgServer) ClaimBudget(ctx context.Context, msg *types.MsgClaimBudget) ( return &types.MsgClaimBudgetResponse{Amount: amount}, nil } -func (k MsgServer) SubmitMsgBudgetProposal(ctx context.Context, msg *types.MsgBudgetProposal) (*types.MsgBudgetProposalResponse, error) { +func (k MsgServer) BudgetProposal(ctx context.Context, msg *types.MsgBudgetProposal) (*types.MsgBudgetProposalResponse, error) { if err := k.validateAuthority(msg.GetAuthority()); err != nil { return nil, err } From 924ada5b3c320da6bda323d0c9150cab09577ba4 Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Fri, 13 Oct 2023 14:38:20 +0000 Subject: [PATCH 25/69] run proto-gen --- api/cosmos/protocolpool/v1/tx.pulsar.go | 63 ++++++------- api/cosmos/protocolpool/v1/tx_grpc.pb.go | 36 +++---- x/protocolpool/types/tx.pb.go | 114 +++++++++++------------ 3 files changed, 106 insertions(+), 107 deletions(-) diff --git a/api/cosmos/protocolpool/v1/tx.pulsar.go b/api/cosmos/protocolpool/v1/tx.pulsar.go index 91ada4cc40db..81334509a89b 100644 --- a/api/cosmos/protocolpool/v1/tx.pulsar.go +++ b/api/cosmos/protocolpool/v1/tx.pulsar.go @@ -4253,7 +4253,7 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 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, 0x32, 0xe1, 0x03, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xd8, 0x03, 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, @@ -4269,36 +4269,35 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 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, 0x77, 0x0a, 0x17, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x29, 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, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x1a, 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, 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, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, - 0x01, 0x42, 0xd7, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x0e, 0x42, 0x75, + 0x64, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x29, 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, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x31, 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, + 0x2e, 0x4d, 0x73, 0x67, 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, 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 ( @@ -4332,11 +4331,11 @@ var file_cosmos_protocolpool_v1_tx_proto_depIdxs = []int32{ 8, // 3: cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount:type_name -> cosmos.base.v1beta1.Coin 0, // 4: cosmos.protocolpool.v1.Msg.FundCommunityPool:input_type -> cosmos.protocolpool.v1.MsgFundCommunityPool 2, // 5: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:input_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpend - 4, // 6: cosmos.protocolpool.v1.Msg.SubmitMsgBudgetProposal:input_type -> cosmos.protocolpool.v1.MsgBudgetProposal + 4, // 6: cosmos.protocolpool.v1.Msg.BudgetProposal:input_type -> cosmos.protocolpool.v1.MsgBudgetProposal 6, // 7: cosmos.protocolpool.v1.Msg.ClaimBudget:input_type -> cosmos.protocolpool.v1.MsgClaimBudget 1, // 8: cosmos.protocolpool.v1.Msg.FundCommunityPool:output_type -> cosmos.protocolpool.v1.MsgFundCommunityPoolResponse 3, // 9: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:output_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse - 5, // 10: cosmos.protocolpool.v1.Msg.SubmitMsgBudgetProposal:output_type -> cosmos.protocolpool.v1.MsgBudgetProposalResponse + 5, // 10: cosmos.protocolpool.v1.Msg.BudgetProposal:output_type -> cosmos.protocolpool.v1.MsgBudgetProposalResponse 7, // 11: cosmos.protocolpool.v1.Msg.ClaimBudget:output_type -> cosmos.protocolpool.v1.MsgClaimBudgetResponse 8, // [8:12] is the sub-list for method output_type 4, // [4:8] is the sub-list for method input_type diff --git a/api/cosmos/protocolpool/v1/tx_grpc.pb.go b/api/cosmos/protocolpool/v1/tx_grpc.pb.go index c409950c7123..d39209d82896 100644 --- a/api/cosmos/protocolpool/v1/tx_grpc.pb.go +++ b/api/cosmos/protocolpool/v1/tx_grpc.pb.go @@ -19,10 +19,10 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_FundCommunityPool_FullMethodName = "/cosmos.protocolpool.v1.Msg/FundCommunityPool" - Msg_CommunityPoolSpend_FullMethodName = "/cosmos.protocolpool.v1.Msg/CommunityPoolSpend" - Msg_SubmitMsgBudgetProposal_FullMethodName = "/cosmos.protocolpool.v1.Msg/SubmitMsgBudgetProposal" - Msg_ClaimBudget_FullMethodName = "/cosmos.protocolpool.v1.Msg/ClaimBudget" + Msg_FundCommunityPool_FullMethodName = "/cosmos.protocolpool.v1.Msg/FundCommunityPool" + Msg_CommunityPoolSpend_FullMethodName = "/cosmos.protocolpool.v1.Msg/CommunityPoolSpend" + Msg_BudgetProposal_FullMethodName = "/cosmos.protocolpool.v1.Msg/BudgetProposal" + Msg_ClaimBudget_FullMethodName = "/cosmos.protocolpool.v1.Msg/ClaimBudget" ) // MsgClient is the client API for Msg service. @@ -37,8 +37,8 @@ type MsgClient interface { // could be the governance module itself. The authority is defined in the // keeper. CommunityPoolSpend(ctx context.Context, in *MsgCommunityPoolSpend, opts ...grpc.CallOption) (*MsgCommunityPoolSpendResponse, error) - // SubmitMsgBudgetProposal defines a method to set a budget proposal. - SubmitMsgBudgetProposal(ctx context.Context, in *MsgBudgetProposal, opts ...grpc.CallOption) (*MsgBudgetProposalResponse, error) + // BudgetProposal defines a method to set a budget proposal. + BudgetProposal(ctx context.Context, in *MsgBudgetProposal, opts ...grpc.CallOption) (*MsgBudgetProposalResponse, error) // ClaimBudget defines a method to claim the distributed budget. ClaimBudget(ctx context.Context, in *MsgClaimBudget, opts ...grpc.CallOption) (*MsgClaimBudgetResponse, error) } @@ -69,9 +69,9 @@ func (c *msgClient) CommunityPoolSpend(ctx context.Context, in *MsgCommunityPool return out, nil } -func (c *msgClient) SubmitMsgBudgetProposal(ctx context.Context, in *MsgBudgetProposal, opts ...grpc.CallOption) (*MsgBudgetProposalResponse, error) { +func (c *msgClient) BudgetProposal(ctx context.Context, in *MsgBudgetProposal, opts ...grpc.CallOption) (*MsgBudgetProposalResponse, error) { out := new(MsgBudgetProposalResponse) - err := c.cc.Invoke(ctx, Msg_SubmitMsgBudgetProposal_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Msg_BudgetProposal_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -99,8 +99,8 @@ type MsgServer interface { // could be the governance module itself. The authority is defined in the // keeper. CommunityPoolSpend(context.Context, *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) - // SubmitMsgBudgetProposal defines a method to set a budget proposal. - SubmitMsgBudgetProposal(context.Context, *MsgBudgetProposal) (*MsgBudgetProposalResponse, error) + // BudgetProposal defines a method to set a budget proposal. + BudgetProposal(context.Context, *MsgBudgetProposal) (*MsgBudgetProposalResponse, error) // ClaimBudget defines a method to claim the distributed budget. ClaimBudget(context.Context, *MsgClaimBudget) (*MsgClaimBudgetResponse, error) mustEmbedUnimplementedMsgServer() @@ -116,8 +116,8 @@ func (UnimplementedMsgServer) FundCommunityPool(context.Context, *MsgFundCommuni func (UnimplementedMsgServer) CommunityPoolSpend(context.Context, *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CommunityPoolSpend not implemented") } -func (UnimplementedMsgServer) SubmitMsgBudgetProposal(context.Context, *MsgBudgetProposal) (*MsgBudgetProposalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitMsgBudgetProposal not implemented") +func (UnimplementedMsgServer) BudgetProposal(context.Context, *MsgBudgetProposal) (*MsgBudgetProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BudgetProposal not implemented") } func (UnimplementedMsgServer) ClaimBudget(context.Context, *MsgClaimBudget) (*MsgClaimBudgetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClaimBudget not implemented") @@ -171,20 +171,20 @@ func _Msg_CommunityPoolSpend_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } -func _Msg_SubmitMsgBudgetProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Msg_BudgetProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgBudgetProposal) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).SubmitMsgBudgetProposal(ctx, in) + return srv.(MsgServer).BudgetProposal(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_SubmitMsgBudgetProposal_FullMethodName, + FullMethod: Msg_BudgetProposal_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitMsgBudgetProposal(ctx, req.(*MsgBudgetProposal)) + return srv.(MsgServer).BudgetProposal(ctx, req.(*MsgBudgetProposal)) } return interceptor(ctx, in, info, handler) } @@ -223,8 +223,8 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ Handler: _Msg_CommunityPoolSpend_Handler, }, { - MethodName: "SubmitMsgBudgetProposal", - Handler: _Msg_SubmitMsgBudgetProposal_Handler, + MethodName: "BudgetProposal", + Handler: _Msg_BudgetProposal_Handler, }, { MethodName: "ClaimBudget", diff --git a/x/protocolpool/types/tx.pb.go b/x/protocolpool/types/tx.pb.go index d2d6aa18b263..9316aa4bf5c2 100644 --- a/x/protocolpool/types/tx.pb.go +++ b/x/protocolpool/types/tx.pb.go @@ -440,49 +440,49 @@ func init() { func init() { proto.RegisterFile("cosmos/protocolpool/v1/tx.proto", fileDescriptor_09efe14517e7f6dc) } var fileDescriptor_09efe14517e7f6dc = []byte{ - // 671 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x6e, 0xd3, 0x4c, - 0x14, 0xcd, 0x34, 0x5f, 0x23, 0x65, 0xfa, 0xa9, 0x22, 0x56, 0x49, 0x5d, 0xd3, 0x3a, 0x21, 0x0b, - 0x14, 0x2a, 0x62, 0x93, 0xf2, 0xb3, 0x28, 0x6c, 0x48, 0x05, 0xbb, 0x48, 0x55, 0xda, 0x15, 0x9b, - 0xc8, 0xb1, 0x47, 0xee, 0xa8, 0x99, 0xb9, 0x96, 0x67, 0xdc, 0x1f, 0x24, 0x24, 0xc4, 0x8a, 0x25, - 0x8f, 0xd0, 0x35, 0xab, 0x2e, 0x78, 0x06, 0x54, 0x89, 0x4d, 0xc5, 0x8a, 0x15, 0x3f, 0xe9, 0xa2, - 0x3c, 0x06, 0x8a, 0x3d, 0x75, 0x12, 0x25, 0x4a, 0x5b, 0xa4, 0xae, 0x92, 0xdc, 0x7b, 0xe6, 0x9c, - 0x73, 0x8f, 0xe7, 0x3a, 0xb8, 0xe4, 0x82, 0x60, 0x20, 0xec, 0x20, 0x04, 0x09, 0x2e, 0x74, 0x03, - 0x80, 0xae, 0xbd, 0x57, 0xb7, 0xe5, 0x81, 0x15, 0x97, 0xb4, 0x62, 0x02, 0xb0, 0x86, 0x01, 0xd6, - 0x5e, 0xdd, 0x58, 0xf0, 0xc1, 0x87, 0xb8, 0x68, 0xf7, 0xbf, 0x25, 0x7d, 0xc3, 0x54, 0x74, 0x1d, - 0x47, 0x10, 0x7b, 0xaf, 0xde, 0x21, 0xd2, 0xa9, 0xdb, 0x2e, 0x50, 0xae, 0xfa, 0x4b, 0x49, 0xbf, - 0x9d, 0x1c, 0x1c, 0xa6, 0x36, 0x16, 0xd5, 0x51, 0x26, 0xfc, 0xbe, 0x01, 0x26, 0xfc, 0xa4, 0x51, - 0xf9, 0x8a, 0xf0, 0x42, 0x53, 0xf8, 0xaf, 0x22, 0xee, 0x6d, 0x00, 0x63, 0x11, 0xa7, 0xf2, 0x70, - 0x13, 0xa0, 0xab, 0xb9, 0x38, 0xe7, 0x30, 0x88, 0xb8, 0xd4, 0x51, 0x39, 0x5b, 0x9d, 0x5b, 0x5b, - 0xb2, 0x14, 0x61, 0x5f, 0xdd, 0x52, 0xea, 0xd6, 0x06, 0x50, 0xde, 0x78, 0x78, 0xf2, 0xa3, 0x94, - 0xf9, 0xf4, 0xb3, 0x54, 0xf5, 0xa9, 0xdc, 0x89, 0x3a, 0x96, 0x0b, 0x4c, 0xa9, 0xab, 0x8f, 0x9a, - 0xf0, 0x76, 0x6d, 0x79, 0x18, 0x10, 0x11, 0x1f, 0x10, 0x2d, 0x45, 0xad, 0x3d, 0xc5, 0x79, 0x8f, - 0x04, 0x20, 0xa8, 0x84, 0x50, 0x9f, 0x29, 0xa3, 0x6a, 0xbe, 0xa1, 0x7f, 0xfb, 0x5c, 0x5b, 0x50, - 0x52, 0x2f, 0x3c, 0x2f, 0x24, 0x42, 0x6c, 0xc9, 0x90, 0x72, 0xbf, 0x35, 0x80, 0xae, 0x17, 0x3f, - 0x1c, 0x95, 0x32, 0x7f, 0x8e, 0x4a, 0x99, 0xf7, 0xe7, 0xc7, 0xab, 0x83, 0x7a, 0xc5, 0xc4, 0xcb, - 0x93, 0x86, 0x69, 0x11, 0x11, 0x00, 0x17, 0xa4, 0xd2, 0x43, 0xf8, 0x76, 0x53, 0xf8, 0x23, 0xcd, - 0xad, 0x80, 0x70, 0xaf, 0xef, 0xc4, 0x89, 0xe4, 0x0e, 0x84, 0x54, 0x1e, 0xea, 0xe8, 0x32, 0x27, - 0x29, 0x54, 0x5b, 0xc6, 0xf9, 0x90, 0xb8, 0x34, 0xa0, 0x84, 0xcb, 0x64, 0x82, 0xd6, 0xa0, 0x30, - 0x14, 0x62, 0xf6, 0xc6, 0x42, 0x5c, 0x9f, 0x8f, 0x43, 0x48, 0x2d, 0x55, 0x4a, 0x78, 0x65, 0xe2, - 0x8c, 0x69, 0x0a, 0x5f, 0x66, 0x70, 0xa1, 0x29, 0xfc, 0x46, 0xe4, 0xf9, 0x44, 0x6e, 0x86, 0x10, - 0x80, 0x70, 0xba, 0xff, 0x9c, 0xc0, 0x4b, 0x5c, 0x48, 0x07, 0x6e, 0x3b, 0x09, 0xea, 0xd2, 0x67, - 0x79, 0x2b, 0x3d, 0xa2, 0xea, 0xda, 0x73, 0xfc, 0xbf, 0x04, 0xe9, 0x74, 0xdb, 0x9d, 0xd8, 0x96, - 0x9e, 0x2d, 0xa3, 0xa9, 0x81, 0xb5, 0xe6, 0x62, 0x78, 0x32, 0x84, 0xb6, 0x82, 0xb1, 0x90, 0x4e, - 0x28, 0xdb, 0x92, 0x32, 0xa2, 0xff, 0x57, 0x46, 0xd5, 0x6c, 0x2b, 0x1f, 0x57, 0xb6, 0x29, 0x23, - 0x5a, 0x0d, 0x6b, 0x21, 0x61, 0x0e, 0xe5, 0x94, 0xfb, 0x6d, 0x19, 0x3a, 0xdc, 0xdd, 0x21, 0x42, - 0x9f, 0x8d, 0x61, 0x85, 0xb4, 0xb3, 0xad, 0x1a, 0x5a, 0x11, 0xe7, 0x02, 0x12, 0x52, 0xf0, 0xf4, - 0x5c, 0x0c, 0x51, 0xbf, 0xc6, 0x92, 0xbe, 0x83, 0x97, 0xc6, 0x72, 0x4c, 0x53, 0x06, 0x3c, 0xdf, - 0x7f, 0x0c, 0x5d, 0x87, 0x32, 0x65, 0x72, 0x62, 0x52, 0xe8, 0xba, 0x49, 0xad, 0x17, 0xfb, 0x2e, - 0xc6, 0x99, 0x2a, 0x6f, 0x71, 0x71, 0x54, 0xf0, 0xc2, 0xca, 0xc8, 0x2e, 0xa3, 0x1b, 0xba, 0x86, - 0x6b, 0xbf, 0xb3, 0x38, 0xdb, 0x14, 0xbe, 0xb6, 0x8f, 0x0b, 0xe3, 0x6f, 0x93, 0x07, 0xd6, 0xe4, - 0x37, 0x9d, 0x35, 0x69, 0x5d, 0x8d, 0xc7, 0xd7, 0x41, 0xa7, 0x53, 0xbe, 0xc1, 0xda, 0x84, 0xc5, - 0xae, 0x4d, 0xe1, 0x1a, 0x87, 0x1b, 0x4f, 0xae, 0x05, 0x4f, 0xb5, 0xf7, 0xf1, 0xe2, 0x56, 0xd4, - 0x61, 0x54, 0x8e, 0xef, 0xd5, 0xfd, 0x29, 0x8c, 0xa3, 0x50, 0xa3, 0x7e, 0x65, 0x68, 0x2a, 0x4c, - 0xf0, 0xdc, 0xf0, 0x15, 0xbb, 0x37, 0xcd, 0xfe, 0x00, 0x67, 0x58, 0x57, 0xc3, 0x5d, 0xc8, 0x18, - 0xb3, 0xef, 0xce, 0x8f, 0x57, 0x51, 0xe3, 0xd9, 0x49, 0xcf, 0x44, 0xa7, 0x3d, 0x13, 0xfd, 0xea, - 0x99, 0xe8, 0xe3, 0x99, 0x99, 0x39, 0x3d, 0x33, 0x33, 0xdf, 0xcf, 0xcc, 0xcc, 0xeb, 0xbb, 0x09, - 0x9f, 0xf0, 0x76, 0x2d, 0x0a, 0xf6, 0xc1, 0xe8, 0x5f, 0x5e, 0x7c, 0x5d, 0x3a, 0xb9, 0xb8, 0xf6, - 0xe8, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x8e, 0x58, 0x02, 0x16, 0x07, 0x00, 0x00, + // 664 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xce, 0x35, 0x34, 0x52, 0xae, 0xa8, 0x22, 0x56, 0x09, 0xae, 0x69, 0x9d, 0x90, 0x01, 0x85, + 0x8a, 0xd8, 0xa4, 0xfc, 0x18, 0x0a, 0x0b, 0xa9, 0x60, 0x8b, 0x54, 0xa5, 0x9d, 0x58, 0x22, 0xc7, + 0x3e, 0x5d, 0x4f, 0x8d, 0xef, 0x59, 0xbe, 0x4b, 0x69, 0x91, 0x90, 0x10, 0x13, 0x23, 0x7f, 0x42, + 0x67, 0xa6, 0x0e, 0xfc, 0x0d, 0xa8, 0x12, 0x4b, 0xc5, 0xd4, 0x09, 0x50, 0x3a, 0x94, 0x3f, 0x03, + 0xc5, 0xbe, 0x3a, 0x09, 0xb1, 0xd2, 0x16, 0xa9, 0x53, 0x92, 0xf7, 0xbe, 0xfb, 0xbe, 0xef, 0x7d, + 0xbe, 0xe7, 0xe0, 0x92, 0x0b, 0xc2, 0x07, 0x61, 0x07, 0x21, 0x48, 0x70, 0xa1, 0x1b, 0x00, 0x74, + 0xed, 0xdd, 0xba, 0x2d, 0xf7, 0xac, 0xa8, 0xa4, 0x15, 0x63, 0x80, 0x35, 0x0a, 0xb0, 0x76, 0xeb, + 0xc6, 0x02, 0x05, 0x0a, 0x51, 0xd1, 0x1e, 0x7c, 0x8b, 0xfb, 0x86, 0xa9, 0xe8, 0x3a, 0x8e, 0x20, + 0xf6, 0x6e, 0xbd, 0x43, 0xa4, 0x53, 0xb7, 0x5d, 0x60, 0x5c, 0xf5, 0x17, 0xe3, 0x7e, 0x3b, 0x3e, + 0x38, 0x4a, 0x6d, 0xdc, 0x51, 0x47, 0x7d, 0x41, 0x07, 0x06, 0x7c, 0x41, 0xe3, 0x46, 0xe5, 0x3b, + 0xc2, 0x0b, 0x4d, 0x41, 0x5f, 0xf7, 0xb8, 0xb7, 0x0e, 0xbe, 0xdf, 0xe3, 0x4c, 0xee, 0x6f, 0x00, + 0x74, 0x35, 0x17, 0xe7, 0x1c, 0x1f, 0x7a, 0x5c, 0xea, 0xa8, 0x9c, 0xad, 0xce, 0xad, 0x2e, 0x5a, + 0x8a, 0x70, 0xa0, 0x6e, 0x29, 0x75, 0x6b, 0x1d, 0x18, 0x6f, 0x3c, 0x3a, 0xfa, 0x59, 0xca, 0x7c, + 0xf9, 0x55, 0xaa, 0x52, 0x26, 0xb7, 0x7b, 0x1d, 0xcb, 0x05, 0x5f, 0xa9, 0xab, 0x8f, 0x9a, 0xf0, + 0x76, 0x6c, 0xb9, 0x1f, 0x10, 0x11, 0x1d, 0x10, 0x2d, 0x45, 0xad, 0x3d, 0xc3, 0x79, 0x8f, 0x04, + 0x20, 0x98, 0x84, 0x50, 0x9f, 0x29, 0xa3, 0x6a, 0xbe, 0xa1, 0xff, 0xf8, 0x5a, 0x5b, 0x50, 0x52, + 0x2f, 0x3d, 0x2f, 0x24, 0x42, 0x6c, 0xca, 0x90, 0x71, 0xda, 0x1a, 0x42, 0xd7, 0x8a, 0x9f, 0x0e, + 0x4a, 0x99, 0x3f, 0x07, 0xa5, 0xcc, 0xc7, 0xb3, 0xc3, 0x95, 0x61, 0xbd, 0x62, 0xe2, 0xa5, 0xb4, + 0x61, 0x5a, 0x44, 0x04, 0xc0, 0x05, 0xa9, 0xf4, 0x11, 0xbe, 0xdd, 0x14, 0x74, 0xac, 0xb9, 0x19, + 0x10, 0xee, 0x0d, 0x9c, 0x38, 0x3d, 0xb9, 0x0d, 0x21, 0x93, 0xfb, 0x3a, 0xba, 0xc8, 0x49, 0x02, + 0xd5, 0x96, 0x70, 0x3e, 0x24, 0x2e, 0x0b, 0x18, 0xe1, 0x32, 0x9e, 0xa0, 0x35, 0x2c, 0x8c, 0x84, + 0x98, 0xbd, 0xb6, 0x10, 0xd7, 0xe6, 0xa3, 0x10, 0x12, 0x4b, 0x95, 0x12, 0x5e, 0x4e, 0x9d, 0x31, + 0x49, 0xe1, 0xdb, 0x0c, 0x2e, 0x34, 0x05, 0x6d, 0xf4, 0x3c, 0x4a, 0xe4, 0x46, 0x08, 0x01, 0x08, + 0xa7, 0xfb, 0xdf, 0x09, 0xbc, 0xc2, 0x85, 0x64, 0xe0, 0xb6, 0x13, 0xa3, 0x2e, 0x7c, 0x96, 0xb7, + 0x92, 0x23, 0xaa, 0xae, 0xbd, 0xc0, 0x37, 0x25, 0x48, 0xa7, 0xdb, 0xee, 0x44, 0xb6, 0xf4, 0x6c, + 0x19, 0x4d, 0x0d, 0xac, 0x35, 0x17, 0xc1, 0xe3, 0x21, 0xb4, 0x65, 0x8c, 0x85, 0x74, 0x42, 0xd9, + 0x96, 0xcc, 0x27, 0xfa, 0x8d, 0x32, 0xaa, 0x66, 0x5b, 0xf9, 0xa8, 0xb2, 0xc5, 0x7c, 0xa2, 0xd5, + 0xb0, 0x16, 0x12, 0xdf, 0x61, 0x9c, 0x71, 0xda, 0x96, 0xa1, 0xc3, 0xdd, 0x6d, 0x22, 0xf4, 0xd9, + 0x08, 0x56, 0x48, 0x3a, 0x5b, 0xaa, 0xa1, 0x15, 0x71, 0x2e, 0x20, 0x21, 0x03, 0x4f, 0xcf, 0x45, + 0x10, 0xf5, 0x6b, 0x22, 0xe9, 0xbb, 0x78, 0x71, 0x22, 0xc7, 0x24, 0x65, 0xc0, 0xf3, 0x83, 0xc7, + 0xd0, 0x75, 0x98, 0xaf, 0x4c, 0xa6, 0x26, 0x85, 0xae, 0x9a, 0xd4, 0x5a, 0x71, 0xe0, 0x62, 0x92, + 0xa9, 0xf2, 0x1e, 0x17, 0xc7, 0x05, 0xcf, 0xad, 0x8c, 0xed, 0x32, 0xba, 0xa6, 0x6b, 0xb8, 0x7a, + 0x92, 0xc5, 0xd9, 0xa6, 0xa0, 0xda, 0x5b, 0x5c, 0x98, 0x7c, 0x9b, 0x3c, 0xb4, 0xd2, 0xdf, 0x74, + 0x56, 0xda, 0xba, 0x1a, 0x4f, 0xae, 0x82, 0x4e, 0xa6, 0x7c, 0x87, 0xb5, 0x94, 0xc5, 0xae, 0x4d, + 0xe1, 0x9a, 0x84, 0x1b, 0x4f, 0xaf, 0x04, 0x4f, 0xb4, 0x39, 0x9e, 0xff, 0x67, 0x9d, 0x1e, 0x4c, + 0x21, 0x1a, 0x87, 0x1a, 0xf5, 0x4b, 0x43, 0x13, 0x3d, 0x82, 0xe7, 0x46, 0x6f, 0xd6, 0xfd, 0x69, + 0xae, 0x87, 0x38, 0xc3, 0xba, 0x1c, 0xee, 0x5c, 0xc6, 0x98, 0xfd, 0x70, 0x76, 0xb8, 0x82, 0x1a, + 0xcf, 0x8f, 0xfa, 0x26, 0x3a, 0xee, 0x9b, 0xe8, 0x77, 0xdf, 0x44, 0x9f, 0x4f, 0xcd, 0xcc, 0xf1, + 0xa9, 0x99, 0x39, 0x39, 0x35, 0x33, 0x6f, 0xee, 0xc5, 0x7c, 0xc2, 0xdb, 0xb1, 0x18, 0xd8, 0x7b, + 0xe3, 0xff, 0x74, 0xd1, 0x2d, 0xe9, 0xe4, 0xa2, 0xda, 0xe3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, + 0xdc, 0xdb, 0x13, 0x0b, 0x0d, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -505,8 +505,8 @@ type MsgClient interface { // could be the governance module itself. The authority is defined in the // keeper. CommunityPoolSpend(ctx context.Context, in *MsgCommunityPoolSpend, opts ...grpc.CallOption) (*MsgCommunityPoolSpendResponse, error) - // SubmitMsgBudgetProposal defines a method to set a budget proposal. - SubmitMsgBudgetProposal(ctx context.Context, in *MsgBudgetProposal, opts ...grpc.CallOption) (*MsgBudgetProposalResponse, error) + // BudgetProposal defines a method to set a budget proposal. + BudgetProposal(ctx context.Context, in *MsgBudgetProposal, opts ...grpc.CallOption) (*MsgBudgetProposalResponse, error) // ClaimBudget defines a method to claim the distributed budget. ClaimBudget(ctx context.Context, in *MsgClaimBudget, opts ...grpc.CallOption) (*MsgClaimBudgetResponse, error) } @@ -537,9 +537,9 @@ func (c *msgClient) CommunityPoolSpend(ctx context.Context, in *MsgCommunityPool return out, nil } -func (c *msgClient) SubmitMsgBudgetProposal(ctx context.Context, in *MsgBudgetProposal, opts ...grpc.CallOption) (*MsgBudgetProposalResponse, error) { +func (c *msgClient) BudgetProposal(ctx context.Context, in *MsgBudgetProposal, opts ...grpc.CallOption) (*MsgBudgetProposalResponse, error) { out := new(MsgBudgetProposalResponse) - err := c.cc.Invoke(ctx, "/cosmos.protocolpool.v1.Msg/SubmitMsgBudgetProposal", in, out, opts...) + err := c.cc.Invoke(ctx, "/cosmos.protocolpool.v1.Msg/BudgetProposal", in, out, opts...) if err != nil { return nil, err } @@ -565,8 +565,8 @@ type MsgServer interface { // could be the governance module itself. The authority is defined in the // keeper. CommunityPoolSpend(context.Context, *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) - // SubmitMsgBudgetProposal defines a method to set a budget proposal. - SubmitMsgBudgetProposal(context.Context, *MsgBudgetProposal) (*MsgBudgetProposalResponse, error) + // BudgetProposal defines a method to set a budget proposal. + BudgetProposal(context.Context, *MsgBudgetProposal) (*MsgBudgetProposalResponse, error) // ClaimBudget defines a method to claim the distributed budget. ClaimBudget(context.Context, *MsgClaimBudget) (*MsgClaimBudgetResponse, error) } @@ -581,8 +581,8 @@ func (*UnimplementedMsgServer) FundCommunityPool(ctx context.Context, req *MsgFu func (*UnimplementedMsgServer) CommunityPoolSpend(ctx context.Context, req *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CommunityPoolSpend not implemented") } -func (*UnimplementedMsgServer) SubmitMsgBudgetProposal(ctx context.Context, req *MsgBudgetProposal) (*MsgBudgetProposalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitMsgBudgetProposal not implemented") +func (*UnimplementedMsgServer) BudgetProposal(ctx context.Context, req *MsgBudgetProposal) (*MsgBudgetProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BudgetProposal not implemented") } func (*UnimplementedMsgServer) ClaimBudget(ctx context.Context, req *MsgClaimBudget) (*MsgClaimBudgetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClaimBudget not implemented") @@ -628,20 +628,20 @@ func _Msg_CommunityPoolSpend_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } -func _Msg_SubmitMsgBudgetProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Msg_BudgetProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgBudgetProposal) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).SubmitMsgBudgetProposal(ctx, in) + return srv.(MsgServer).BudgetProposal(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.protocolpool.v1.Msg/SubmitMsgBudgetProposal", + FullMethod: "/cosmos.protocolpool.v1.Msg/BudgetProposal", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitMsgBudgetProposal(ctx, req.(*MsgBudgetProposal)) + return srv.(MsgServer).BudgetProposal(ctx, req.(*MsgBudgetProposal)) } return interceptor(ctx, in, info, handler) } @@ -677,8 +677,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_CommunityPoolSpend_Handler, }, { - MethodName: "SubmitMsgBudgetProposal", - Handler: _Msg_SubmitMsgBudgetProposal_Handler, + MethodName: "BudgetProposal", + Handler: _Msg_BudgetProposal_Handler, }, { MethodName: "ClaimBudget", From d339520ed8fbbad4751f94e1de847dd2bc32e30c Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Fri, 13 Oct 2023 14:44:39 +0000 Subject: [PATCH 26/69] code cleanup --- api/cosmos/protocolpool/v1/tx.pulsar.go | 564 ++++++++++++----------- api/cosmos/protocolpool/v1/tx_grpc.pb.go | 36 +- proto/cosmos/protocolpool/v1/tx.proto | 6 +- x/protocolpool/keeper/msg_server.go | 4 +- x/protocolpool/types/tx.pb.go | 214 ++++----- 5 files changed, 413 insertions(+), 411 deletions(-) diff --git a/api/cosmos/protocolpool/v1/tx.pulsar.go b/api/cosmos/protocolpool/v1/tx.pulsar.go index 81334509a89b..0dac5248985c 100644 --- a/api/cosmos/protocolpool/v1/tx.pulsar.go +++ b/api/cosmos/protocolpool/v1/tx.pulsar.go @@ -1909,35 +1909,35 @@ func (x *fastReflection_MsgCommunityPoolSpendResponse) ProtoMethods() *protoifac } var ( - md_MsgBudgetProposal protoreflect.MessageDescriptor - fd_MsgBudgetProposal_authority protoreflect.FieldDescriptor - fd_MsgBudgetProposal_recipient_address protoreflect.FieldDescriptor - fd_MsgBudgetProposal_total_budget protoreflect.FieldDescriptor - fd_MsgBudgetProposal_start_time protoreflect.FieldDescriptor - fd_MsgBudgetProposal_remaining_tranches protoreflect.FieldDescriptor - fd_MsgBudgetProposal_period protoreflect.FieldDescriptor + md_MsgSubmitBudgetProposal protoreflect.MessageDescriptor + fd_MsgSubmitBudgetProposal_authority protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_recipient_address protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_total_budget protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_start_time protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_remaining_tranches protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_period protoreflect.FieldDescriptor ) func init() { file_cosmos_protocolpool_v1_tx_proto_init() - md_MsgBudgetProposal = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgBudgetProposal") - fd_MsgBudgetProposal_authority = md_MsgBudgetProposal.Fields().ByName("authority") - fd_MsgBudgetProposal_recipient_address = md_MsgBudgetProposal.Fields().ByName("recipient_address") - fd_MsgBudgetProposal_total_budget = md_MsgBudgetProposal.Fields().ByName("total_budget") - fd_MsgBudgetProposal_start_time = md_MsgBudgetProposal.Fields().ByName("start_time") - fd_MsgBudgetProposal_remaining_tranches = md_MsgBudgetProposal.Fields().ByName("remaining_tranches") - fd_MsgBudgetProposal_period = md_MsgBudgetProposal.Fields().ByName("period") + 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_total_budget = md_MsgSubmitBudgetProposal.Fields().ByName("total_budget") + fd_MsgSubmitBudgetProposal_start_time = md_MsgSubmitBudgetProposal.Fields().ByName("start_time") + fd_MsgSubmitBudgetProposal_remaining_tranches = md_MsgSubmitBudgetProposal.Fields().ByName("remaining_tranches") + fd_MsgSubmitBudgetProposal_period = md_MsgSubmitBudgetProposal.Fields().ByName("period") } -var _ protoreflect.Message = (*fastReflection_MsgBudgetProposal)(nil) +var _ protoreflect.Message = (*fastReflection_MsgSubmitBudgetProposal)(nil) -type fastReflection_MsgBudgetProposal MsgBudgetProposal +type fastReflection_MsgSubmitBudgetProposal MsgSubmitBudgetProposal -func (x *MsgBudgetProposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgBudgetProposal)(x) +func (x *MsgSubmitBudgetProposal) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSubmitBudgetProposal)(x) } -func (x *MsgBudgetProposal) slowProtoReflect() protoreflect.Message { +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)) @@ -1949,43 +1949,43 @@ func (x *MsgBudgetProposal) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgBudgetProposal_messageType fastReflection_MsgBudgetProposal_messageType -var _ protoreflect.MessageType = fastReflection_MsgBudgetProposal_messageType{} +var _fastReflection_MsgSubmitBudgetProposal_messageType fastReflection_MsgSubmitBudgetProposal_messageType +var _ protoreflect.MessageType = fastReflection_MsgSubmitBudgetProposal_messageType{} -type fastReflection_MsgBudgetProposal_messageType struct{} +type fastReflection_MsgSubmitBudgetProposal_messageType struct{} -func (x fastReflection_MsgBudgetProposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgBudgetProposal)(nil) +func (x fastReflection_MsgSubmitBudgetProposal_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSubmitBudgetProposal)(nil) } -func (x fastReflection_MsgBudgetProposal_messageType) New() protoreflect.Message { - return new(fastReflection_MsgBudgetProposal) +func (x fastReflection_MsgSubmitBudgetProposal_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSubmitBudgetProposal) } -func (x fastReflection_MsgBudgetProposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBudgetProposal +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_MsgBudgetProposal) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBudgetProposal +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_MsgBudgetProposal) Type() protoreflect.MessageType { - return _fastReflection_MsgBudgetProposal_messageType +func (x *fastReflection_MsgSubmitBudgetProposal) Type() protoreflect.MessageType { + return _fastReflection_MsgSubmitBudgetProposal_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgBudgetProposal) New() protoreflect.Message { - return new(fastReflection_MsgBudgetProposal) +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_MsgBudgetProposal) Interface() protoreflect.ProtoMessage { - return (*MsgBudgetProposal)(x) +func (x *fastReflection_MsgSubmitBudgetProposal) Interface() protoreflect.ProtoMessage { + return (*MsgSubmitBudgetProposal)(x) } // Range iterates over every populated field in an undefined order, @@ -1993,40 +1993,40 @@ func (x *fastReflection_MsgBudgetProposal) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgBudgetProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgSubmitBudgetProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Authority != "" { value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgBudgetProposal_authority, value) { + if !f(fd_MsgSubmitBudgetProposal_authority, value) { return } } if x.RecipientAddress != "" { value := protoreflect.ValueOfString(x.RecipientAddress) - if !f(fd_MsgBudgetProposal_recipient_address, value) { + if !f(fd_MsgSubmitBudgetProposal_recipient_address, value) { return } } if x.TotalBudget != nil { value := protoreflect.ValueOfMessage(x.TotalBudget.ProtoReflect()) - if !f(fd_MsgBudgetProposal_total_budget, value) { + if !f(fd_MsgSubmitBudgetProposal_total_budget, value) { return } } if x.StartTime != int64(0) { value := protoreflect.ValueOfInt64(x.StartTime) - if !f(fd_MsgBudgetProposal_start_time, value) { + if !f(fd_MsgSubmitBudgetProposal_start_time, value) { return } } if x.RemainingTranches != int64(0) { value := protoreflect.ValueOfInt64(x.RemainingTranches) - if !f(fd_MsgBudgetProposal_remaining_tranches, value) { + if !f(fd_MsgSubmitBudgetProposal_remaining_tranches, value) { return } } if x.Period != int64(0) { value := protoreflect.ValueOfInt64(x.Period) - if !f(fd_MsgBudgetProposal_period, value) { + if !f(fd_MsgSubmitBudgetProposal_period, value) { return } } @@ -2043,25 +2043,25 @@ func (x *fastReflection_MsgBudgetProposal) Range(f func(protoreflect.FieldDescri // 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_MsgBudgetProposal) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgSubmitBudgetProposal) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgBudgetProposal.authority": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.authority": return x.Authority != "" - case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.recipient_address": return x.RecipientAddress != "" - case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget": return x.TotalBudget != nil - case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": return x.StartTime != int64(0) - case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.remaining_tranches": return x.RemainingTranches != int64(0) - case "cosmos.protocolpool.v1.MsgBudgetProposal.period": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": return x.Period != int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposal does not contain field %s", fd.FullName())) } } @@ -2071,25 +2071,25 @@ func (x *fastReflection_MsgBudgetProposal) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBudgetProposal) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgSubmitBudgetProposal) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgBudgetProposal.authority": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.authority": x.Authority = "" - case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.recipient_address": x.RecipientAddress = "" - case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget": x.TotalBudget = nil - case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": x.StartTime = int64(0) - case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.remaining_tranches": x.RemainingTranches = int64(0) - case "cosmos.protocolpool.v1.MsgBudgetProposal.period": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": x.Period = int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposal does not contain field %s", fd.FullName())) } } @@ -2099,31 +2099,31 @@ func (x *fastReflection_MsgBudgetProposal) Clear(fd protoreflect.FieldDescriptor // 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_MsgBudgetProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgSubmitBudgetProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.protocolpool.v1.MsgBudgetProposal.authority": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.authority": value := x.Authority return protoreflect.ValueOfString(value) - case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.recipient_address": value := x.RecipientAddress return protoreflect.ValueOfString(value) - case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget": value := x.TotalBudget return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": value := x.StartTime return protoreflect.ValueOfInt64(value) - case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.remaining_tranches": value := x.RemainingTranches return protoreflect.ValueOfInt64(value) - case "cosmos.protocolpool.v1.MsgBudgetProposal.period": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": value := x.Period return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposal does not contain field %s", descriptor.FullName())) } } @@ -2137,25 +2137,25 @@ func (x *fastReflection_MsgBudgetProposal) Get(descriptor protoreflect.FieldDesc // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBudgetProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgSubmitBudgetProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgBudgetProposal.authority": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.authority": x.Authority = value.Interface().(string) - case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.recipient_address": x.RecipientAddress = value.Interface().(string) - case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget": x.TotalBudget = value.Message().Interface().(*v1beta1.Coin) - case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": x.StartTime = value.Int() - case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.remaining_tranches": x.RemainingTranches = value.Int() - case "cosmos.protocolpool.v1.MsgBudgetProposal.period": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": x.Period = value.Int() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposal does not contain field %s", fd.FullName())) } } @@ -2169,64 +2169,64 @@ func (x *fastReflection_MsgBudgetProposal) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBudgetProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgSubmitBudgetProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget": if x.TotalBudget == nil { x.TotalBudget = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.TotalBudget.ProtoReflect()) - case "cosmos.protocolpool.v1.MsgBudgetProposal.authority": - panic(fmt.Errorf("field authority of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) - case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": - panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) - case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": - panic(fmt.Errorf("field start_time of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) - case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": - panic(fmt.Errorf("field remaining_tranches of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) - case "cosmos.protocolpool.v1.MsgBudgetProposal.period": - panic(fmt.Errorf("field period of message cosmos.protocolpool.v1.MsgBudgetProposal is not mutable")) + 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.start_time": + panic(fmt.Errorf("field start_time of message cosmos.protocolpool.v1.MsgSubmitBudgetProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.remaining_tranches": + panic(fmt.Errorf("field remaining_tranches of message cosmos.protocolpool.v1.MsgSubmitBudgetProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": + panic(fmt.Errorf("field period 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.MsgBudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal does not contain field %s", fd.FullName())) + 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_MsgBudgetProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgSubmitBudgetProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgBudgetProposal.authority": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.authority": return protoreflect.ValueOfString("") - case "cosmos.protocolpool.v1.MsgBudgetProposal.recipient_address": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.recipient_address": return protoreflect.ValueOfString("") - case "cosmos.protocolpool.v1.MsgBudgetProposal.total_budget": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.protocolpool.v1.MsgBudgetProposal.start_time": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.protocolpool.v1.MsgBudgetProposal.remaining_tranches": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.remaining_tranches": return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.protocolpool.v1.MsgBudgetProposal.period": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgBudgetProposal")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposal does not contain field %s", fd.FullName())) + 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_MsgBudgetProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +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.MsgBudgetProposal", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgSubmitBudgetProposal", d.FullName())) } panic("unreachable") } @@ -2234,7 +2234,7 @@ func (x *fastReflection_MsgBudgetProposal) WhichOneof(d protoreflect.OneofDescri // 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_MsgBudgetProposal) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgSubmitBudgetProposal) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2245,7 +2245,7 @@ func (x *fastReflection_MsgBudgetProposal) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBudgetProposal) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgSubmitBudgetProposal) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2257,7 +2257,7 @@ func (x *fastReflection_MsgBudgetProposal) SetUnknown(fields protoreflect.RawFie // 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_MsgBudgetProposal) IsValid() bool { +func (x *fastReflection_MsgSubmitBudgetProposal) IsValid() bool { return x != nil } @@ -2267,9 +2267,9 @@ func (x *fastReflection_MsgBudgetProposal) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgBudgetProposal) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgBudgetProposal) + x := input.Message.Interface().(*MsgSubmitBudgetProposal) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2312,7 +2312,7 @@ func (x *fastReflection_MsgBudgetProposal) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgBudgetProposal) + x := input.Message.Interface().(*MsgSubmitBudgetProposal) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2385,7 +2385,7 @@ func (x *fastReflection_MsgBudgetProposal) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgBudgetProposal) + x := input.Message.Interface().(*MsgSubmitBudgetProposal) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2417,10 +2417,10 @@ func (x *fastReflection_MsgBudgetProposal) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBudgetProposal: wiretype end group for non-group") + 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: MsgBudgetProposal: illegal tag %d (wire type %d)", fieldNum, wire) + 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: @@ -2616,23 +2616,23 @@ func (x *fastReflection_MsgBudgetProposal) ProtoMethods() *protoiface.Methods { } var ( - md_MsgBudgetProposalResponse protoreflect.MessageDescriptor + md_MsgSubmitBudgetProposalResponse protoreflect.MessageDescriptor ) func init() { file_cosmos_protocolpool_v1_tx_proto_init() - md_MsgBudgetProposalResponse = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgBudgetProposalResponse") + md_MsgSubmitBudgetProposalResponse = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgSubmitBudgetProposalResponse") } -var _ protoreflect.Message = (*fastReflection_MsgBudgetProposalResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgSubmitBudgetProposalResponse)(nil) -type fastReflection_MsgBudgetProposalResponse MsgBudgetProposalResponse +type fastReflection_MsgSubmitBudgetProposalResponse MsgSubmitBudgetProposalResponse -func (x *MsgBudgetProposalResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgBudgetProposalResponse)(x) +func (x *MsgSubmitBudgetProposalResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSubmitBudgetProposalResponse)(x) } -func (x *MsgBudgetProposalResponse) slowProtoReflect() protoreflect.Message { +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)) @@ -2644,43 +2644,43 @@ func (x *MsgBudgetProposalResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgBudgetProposalResponse_messageType fastReflection_MsgBudgetProposalResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgBudgetProposalResponse_messageType{} +var _fastReflection_MsgSubmitBudgetProposalResponse_messageType fastReflection_MsgSubmitBudgetProposalResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgSubmitBudgetProposalResponse_messageType{} -type fastReflection_MsgBudgetProposalResponse_messageType struct{} +type fastReflection_MsgSubmitBudgetProposalResponse_messageType struct{} -func (x fastReflection_MsgBudgetProposalResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgBudgetProposalResponse)(nil) +func (x fastReflection_MsgSubmitBudgetProposalResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSubmitBudgetProposalResponse)(nil) } -func (x fastReflection_MsgBudgetProposalResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgBudgetProposalResponse) +func (x fastReflection_MsgSubmitBudgetProposalResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSubmitBudgetProposalResponse) } -func (x fastReflection_MsgBudgetProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBudgetProposalResponse +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_MsgBudgetProposalResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBudgetProposalResponse +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_MsgBudgetProposalResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgBudgetProposalResponse_messageType +func (x *fastReflection_MsgSubmitBudgetProposalResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgSubmitBudgetProposalResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgBudgetProposalResponse) New() protoreflect.Message { - return new(fastReflection_MsgBudgetProposalResponse) +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_MsgBudgetProposalResponse) Interface() protoreflect.ProtoMessage { - return (*MsgBudgetProposalResponse)(x) +func (x *fastReflection_MsgSubmitBudgetProposalResponse) Interface() protoreflect.ProtoMessage { + return (*MsgSubmitBudgetProposalResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -2688,7 +2688,7 @@ func (x *fastReflection_MsgBudgetProposalResponse) Interface() protoreflect.Prot // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgBudgetProposalResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgSubmitBudgetProposalResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -2702,13 +2702,13 @@ func (x *fastReflection_MsgBudgetProposalResponse) Range(f func(protoreflect.Fie // 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_MsgBudgetProposalResponse) Has(fd protoreflect.FieldDescriptor) bool { +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.MsgBudgetProposalResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse does not contain field %s", fd.FullName())) } } @@ -2718,13 +2718,13 @@ func (x *fastReflection_MsgBudgetProposalResponse) Has(fd protoreflect.FieldDesc // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBudgetProposalResponse) Clear(fd protoreflect.FieldDescriptor) { +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.MsgBudgetProposalResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse does not contain field %s", fd.FullName())) } } @@ -2734,13 +2734,13 @@ func (x *fastReflection_MsgBudgetProposalResponse) Clear(fd protoreflect.FieldDe // 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_MsgBudgetProposalResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +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.MsgBudgetProposalResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse does not contain field %s", descriptor.FullName())) } } @@ -2754,13 +2754,13 @@ func (x *fastReflection_MsgBudgetProposalResponse) Get(descriptor protoreflect.F // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBudgetProposalResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +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.MsgBudgetProposalResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse does not contain field %s", fd.FullName())) } } @@ -2774,36 +2774,36 @@ func (x *fastReflection_MsgBudgetProposalResponse) Set(fd protoreflect.FieldDesc // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBudgetProposalResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +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.MsgBudgetProposalResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse does not contain field %s", fd.FullName())) + 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_MsgBudgetProposalResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.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.MsgBudgetProposalResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse")) } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgBudgetProposalResponse does not contain field %s", fd.FullName())) + 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_MsgBudgetProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +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.MsgBudgetProposalResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse", d.FullName())) } panic("unreachable") } @@ -2811,7 +2811,7 @@ func (x *fastReflection_MsgBudgetProposalResponse) WhichOneof(d protoreflect.One // 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_MsgBudgetProposalResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgSubmitBudgetProposalResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2822,7 +2822,7 @@ func (x *fastReflection_MsgBudgetProposalResponse) GetUnknown() protoreflect.Raw // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBudgetProposalResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgSubmitBudgetProposalResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2834,7 +2834,7 @@ func (x *fastReflection_MsgBudgetProposalResponse) SetUnknown(fields protoreflec // 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_MsgBudgetProposalResponse) IsValid() bool { +func (x *fastReflection_MsgSubmitBudgetProposalResponse) IsValid() bool { return x != nil } @@ -2844,9 +2844,9 @@ func (x *fastReflection_MsgBudgetProposalResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgBudgetProposalResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgSubmitBudgetProposalResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgBudgetProposalResponse) + x := input.Message.Interface().(*MsgSubmitBudgetProposalResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2868,7 +2868,7 @@ func (x *fastReflection_MsgBudgetProposalResponse) ProtoMethods() *protoiface.Me } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgBudgetProposalResponse) + x := input.Message.Interface().(*MsgSubmitBudgetProposalResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2898,7 +2898,7 @@ func (x *fastReflection_MsgBudgetProposalResponse) ProtoMethods() *protoiface.Me }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgBudgetProposalResponse) + x := input.Message.Interface().(*MsgSubmitBudgetProposalResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2930,10 +2930,10 @@ func (x *fastReflection_MsgBudgetProposalResponse) ProtoMethods() *protoiface.Me fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBudgetProposalResponse: wiretype end group for non-group") + 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: MsgBudgetProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitBudgetProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3995,7 +3995,7 @@ func (*MsgCommunityPoolSpendResponse) Descriptor() ([]byte, []int) { } // Budget defines budget proposal type. -type MsgBudgetProposal struct { +type MsgSubmitBudgetProposal struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -4009,8 +4009,8 @@ type MsgBudgetProposal struct { Period int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` } -func (x *MsgBudgetProposal) Reset() { - *x = MsgBudgetProposal{} +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)) @@ -4018,53 +4018,53 @@ func (x *MsgBudgetProposal) Reset() { } } -func (x *MsgBudgetProposal) String() string { +func (x *MsgSubmitBudgetProposal) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgBudgetProposal) ProtoMessage() {} +func (*MsgSubmitBudgetProposal) ProtoMessage() {} -// Deprecated: Use MsgBudgetProposal.ProtoReflect.Descriptor instead. -func (*MsgBudgetProposal) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgSubmitBudgetProposal.ProtoReflect.Descriptor instead. +func (*MsgSubmitBudgetProposal) Descriptor() ([]byte, []int) { return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{4} } -func (x *MsgBudgetProposal) GetAuthority() string { +func (x *MsgSubmitBudgetProposal) GetAuthority() string { if x != nil { return x.Authority } return "" } -func (x *MsgBudgetProposal) GetRecipientAddress() string { +func (x *MsgSubmitBudgetProposal) GetRecipientAddress() string { if x != nil { return x.RecipientAddress } return "" } -func (x *MsgBudgetProposal) GetTotalBudget() *v1beta1.Coin { +func (x *MsgSubmitBudgetProposal) GetTotalBudget() *v1beta1.Coin { if x != nil { return x.TotalBudget } return nil } -func (x *MsgBudgetProposal) GetStartTime() int64 { +func (x *MsgSubmitBudgetProposal) GetStartTime() int64 { if x != nil { return x.StartTime } return 0 } -func (x *MsgBudgetProposal) GetRemainingTranches() int64 { +func (x *MsgSubmitBudgetProposal) GetRemainingTranches() int64 { if x != nil { return x.RemainingTranches } return 0 } -func (x *MsgBudgetProposal) GetPeriod() int64 { +func (x *MsgSubmitBudgetProposal) GetPeriod() int64 { if x != nil { return x.Period } @@ -4073,14 +4073,14 @@ func (x *MsgBudgetProposal) GetPeriod() int64 { // MsgBudgetProposalResponse defines the response to executing a // MsgBudgetProposal message. -type MsgBudgetProposalResponse struct { +type MsgSubmitBudgetProposalResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *MsgBudgetProposalResponse) Reset() { - *x = MsgBudgetProposalResponse{} +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)) @@ -4088,14 +4088,14 @@ func (x *MsgBudgetProposalResponse) Reset() { } } -func (x *MsgBudgetProposalResponse) String() string { +func (x *MsgSubmitBudgetProposalResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgBudgetProposalResponse) ProtoMessage() {} +func (*MsgSubmitBudgetProposalResponse) ProtoMessage() {} -// Deprecated: Use MsgBudgetProposalResponse.ProtoReflect.Descriptor instead. -func (*MsgBudgetProposalResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgSubmitBudgetProposalResponse.ProtoReflect.Descriptor instead. +func (*MsgSubmitBudgetProposalResponse) Descriptor() ([]byte, []int) { return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{5} } @@ -4216,88 +4216,90 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 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, 0xc6, 0x02, 0x0a, 0x11, 0x4d, 0x73, 0x67, 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, 0x3c, 0x0a, 0x0c, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 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, 0x0b, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x6d, - 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, - 0x54, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 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, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 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, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcc, 0x02, 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, 0x3c, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x64, 0x67, + 0x65, 0x74, 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, 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, 0x32, 0xd8, 0x03, - 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, 0x69, 0x6e, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x72, 0x61, + 0x6e, 0x63, 0x68, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x72, 0x65, 0x6d, + 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 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, 0x32, 0xeb, 0x03, 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, 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, 0x6e, 0x0a, 0x0e, 0x42, 0x75, - 0x64, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x29, 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, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 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, 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, 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, + 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, + 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 ( @@ -4314,28 +4316,28 @@ func file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP() []byte { var file_cosmos_protocolpool_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) 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 - (*MsgBudgetProposal)(nil), // 4: cosmos.protocolpool.v1.MsgBudgetProposal - (*MsgBudgetProposalResponse)(nil), // 5: cosmos.protocolpool.v1.MsgBudgetProposalResponse - (*MsgClaimBudget)(nil), // 6: cosmos.protocolpool.v1.MsgClaimBudget - (*MsgClaimBudgetResponse)(nil), // 7: cosmos.protocolpool.v1.MsgClaimBudgetResponse - (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin + (*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 + (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin } var file_cosmos_protocolpool_v1_tx_proto_depIdxs = []int32{ 8, // 0: cosmos.protocolpool.v1.MsgFundCommunityPool.amount:type_name -> cosmos.base.v1beta1.Coin 8, // 1: cosmos.protocolpool.v1.MsgCommunityPoolSpend.amount:type_name -> cosmos.base.v1beta1.Coin - 8, // 2: cosmos.protocolpool.v1.MsgBudgetProposal.total_budget:type_name -> cosmos.base.v1beta1.Coin + 8, // 2: cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget:type_name -> cosmos.base.v1beta1.Coin 8, // 3: cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount:type_name -> cosmos.base.v1beta1.Coin 0, // 4: cosmos.protocolpool.v1.Msg.FundCommunityPool:input_type -> cosmos.protocolpool.v1.MsgFundCommunityPool 2, // 5: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:input_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpend - 4, // 6: cosmos.protocolpool.v1.Msg.BudgetProposal:input_type -> cosmos.protocolpool.v1.MsgBudgetProposal + 4, // 6: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:input_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposal 6, // 7: cosmos.protocolpool.v1.Msg.ClaimBudget:input_type -> cosmos.protocolpool.v1.MsgClaimBudget 1, // 8: cosmos.protocolpool.v1.Msg.FundCommunityPool:output_type -> cosmos.protocolpool.v1.MsgFundCommunityPoolResponse 3, // 9: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:output_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse - 5, // 10: cosmos.protocolpool.v1.Msg.BudgetProposal:output_type -> cosmos.protocolpool.v1.MsgBudgetProposalResponse + 5, // 10: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:output_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse 7, // 11: cosmos.protocolpool.v1.Msg.ClaimBudget:output_type -> cosmos.protocolpool.v1.MsgClaimBudgetResponse 8, // [8:12] is the sub-list for method output_type 4, // [4:8] is the sub-list for method input_type @@ -4399,7 +4401,7 @@ func file_cosmos_protocolpool_v1_tx_proto_init() { } } file_cosmos_protocolpool_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgBudgetProposal); i { + switch v := v.(*MsgSubmitBudgetProposal); i { case 0: return &v.state case 1: @@ -4411,7 +4413,7 @@ func file_cosmos_protocolpool_v1_tx_proto_init() { } } file_cosmos_protocolpool_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgBudgetProposalResponse); i { + switch v := v.(*MsgSubmitBudgetProposalResponse); i { case 0: return &v.state case 1: diff --git a/api/cosmos/protocolpool/v1/tx_grpc.pb.go b/api/cosmos/protocolpool/v1/tx_grpc.pb.go index d39209d82896..24474d707a51 100644 --- a/api/cosmos/protocolpool/v1/tx_grpc.pb.go +++ b/api/cosmos/protocolpool/v1/tx_grpc.pb.go @@ -19,10 +19,10 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_FundCommunityPool_FullMethodName = "/cosmos.protocolpool.v1.Msg/FundCommunityPool" - Msg_CommunityPoolSpend_FullMethodName = "/cosmos.protocolpool.v1.Msg/CommunityPoolSpend" - Msg_BudgetProposal_FullMethodName = "/cosmos.protocolpool.v1.Msg/BudgetProposal" - Msg_ClaimBudget_FullMethodName = "/cosmos.protocolpool.v1.Msg/ClaimBudget" + 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" ) // MsgClient is the client API for Msg service. @@ -38,7 +38,7 @@ type MsgClient interface { // keeper. CommunityPoolSpend(ctx context.Context, in *MsgCommunityPoolSpend, opts ...grpc.CallOption) (*MsgCommunityPoolSpendResponse, error) // BudgetProposal defines a method to set a budget proposal. - BudgetProposal(ctx context.Context, in *MsgBudgetProposal, opts ...grpc.CallOption) (*MsgBudgetProposalResponse, error) + 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) } @@ -69,9 +69,9 @@ func (c *msgClient) CommunityPoolSpend(ctx context.Context, in *MsgCommunityPool return out, nil } -func (c *msgClient) BudgetProposal(ctx context.Context, in *MsgBudgetProposal, opts ...grpc.CallOption) (*MsgBudgetProposalResponse, error) { - out := new(MsgBudgetProposalResponse) - err := c.cc.Invoke(ctx, Msg_BudgetProposal_FullMethodName, in, out, opts...) +func (c *msgClient) SubmitBudgetProposal(ctx context.Context, in *MsgSubmitBudgetProposal, opts ...grpc.CallOption) (*MsgSubmitBudgetProposalResponse, error) { + out := new(MsgSubmitBudgetProposalResponse) + err := c.cc.Invoke(ctx, Msg_SubmitBudgetProposal_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -100,7 +100,7 @@ type MsgServer interface { // keeper. CommunityPoolSpend(context.Context, *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) // BudgetProposal defines a method to set a budget proposal. - BudgetProposal(context.Context, *MsgBudgetProposal) (*MsgBudgetProposalResponse, error) + SubmitBudgetProposal(context.Context, *MsgSubmitBudgetProposal) (*MsgSubmitBudgetProposalResponse, error) // ClaimBudget defines a method to claim the distributed budget. ClaimBudget(context.Context, *MsgClaimBudget) (*MsgClaimBudgetResponse, error) mustEmbedUnimplementedMsgServer() @@ -116,8 +116,8 @@ func (UnimplementedMsgServer) FundCommunityPool(context.Context, *MsgFundCommuni func (UnimplementedMsgServer) CommunityPoolSpend(context.Context, *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CommunityPoolSpend not implemented") } -func (UnimplementedMsgServer) BudgetProposal(context.Context, *MsgBudgetProposal) (*MsgBudgetProposalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BudgetProposal 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") @@ -171,20 +171,20 @@ func _Msg_CommunityPoolSpend_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } -func _Msg_BudgetProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgBudgetProposal) +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).BudgetProposal(ctx, in) + return srv.(MsgServer).SubmitBudgetProposal(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_BudgetProposal_FullMethodName, + FullMethod: Msg_SubmitBudgetProposal_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).BudgetProposal(ctx, req.(*MsgBudgetProposal)) + return srv.(MsgServer).SubmitBudgetProposal(ctx, req.(*MsgSubmitBudgetProposal)) } return interceptor(ctx, in, info, handler) } @@ -223,8 +223,8 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ Handler: _Msg_CommunityPoolSpend_Handler, }, { - MethodName: "BudgetProposal", - Handler: _Msg_BudgetProposal_Handler, + MethodName: "SubmitBudgetProposal", + Handler: _Msg_SubmitBudgetProposal_Handler, }, { MethodName: "ClaimBudget", diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index 9451b42d3b24..944955997ddd 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -23,7 +23,7 @@ service Msg { rpc CommunityPoolSpend(MsgCommunityPoolSpend) returns (MsgCommunityPoolSpendResponse); // BudgetProposal defines a method to set a budget proposal. - rpc BudgetProposal(MsgBudgetProposal) returns (MsgBudgetProposalResponse); + rpc SubmitBudgetProposal(MsgSubmitBudgetProposal) returns (MsgSubmitBudgetProposalResponse); // ClaimBudget defines a method to claim the distributed budget. rpc ClaimBudget(MsgClaimBudget) returns (MsgClaimBudgetResponse); @@ -62,7 +62,7 @@ message MsgCommunityPoolSpend { message MsgCommunityPoolSpendResponse {} // Budget defines budget proposal type. -message MsgBudgetProposal { +message MsgSubmitBudgetProposal { option (cosmos.msg.v1.signer) = "authority"; // authority is the address that controls the module (defaults to x/gov unless overwritten). @@ -76,7 +76,7 @@ message MsgBudgetProposal { // MsgBudgetProposalResponse defines the response to executing a // MsgBudgetProposal message. -message MsgBudgetProposalResponse {} +message MsgSubmitBudgetProposalResponse {} // MsgClaimBudget defines a message for claiming the distributed budget. message MsgClaimBudget { diff --git a/x/protocolpool/keeper/msg_server.go b/x/protocolpool/keeper/msg_server.go index a9b73af25756..34f6fdced101 100644 --- a/x/protocolpool/keeper/msg_server.go +++ b/x/protocolpool/keeper/msg_server.go @@ -36,7 +36,7 @@ func (k MsgServer) ClaimBudget(ctx context.Context, msg *types.MsgClaimBudget) ( return &types.MsgClaimBudgetResponse{Amount: amount}, nil } -func (k MsgServer) BudgetProposal(ctx context.Context, msg *types.MsgBudgetProposal) (*types.MsgBudgetProposalResponse, error) { +func (k MsgServer) SubmitBudgetProposal(ctx context.Context, msg *types.MsgSubmitBudgetProposal) (*types.MsgSubmitBudgetProposalResponse, error) { if err := k.validateAuthority(msg.GetAuthority()); err != nil { return nil, err } @@ -55,7 +55,7 @@ func (k MsgServer) BudgetProposal(ctx context.Context, msg *types.MsgBudgetPropo if err != nil { return nil, err } - return &types.MsgBudgetProposalResponse{}, nil + return &types.MsgSubmitBudgetProposalResponse{}, nil } func (k MsgServer) FundCommunityPool(ctx context.Context, msg *types.MsgFundCommunityPool) (*types.MsgFundCommunityPoolResponse, error) { diff --git a/x/protocolpool/types/tx.pb.go b/x/protocolpool/types/tx.pb.go index 9316aa4bf5c2..bc3e5d7af918 100644 --- a/x/protocolpool/types/tx.pb.go +++ b/x/protocolpool/types/tx.pb.go @@ -212,7 +212,7 @@ func (m *MsgCommunityPoolSpendResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCommunityPoolSpendResponse proto.InternalMessageInfo // Budget defines budget proposal type. -type MsgBudgetProposal struct { +type MsgSubmitBudgetProposal 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"` RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` @@ -222,18 +222,18 @@ type MsgBudgetProposal struct { Period int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` } -func (m *MsgBudgetProposal) Reset() { *m = MsgBudgetProposal{} } -func (m *MsgBudgetProposal) String() string { return proto.CompactTextString(m) } -func (*MsgBudgetProposal) ProtoMessage() {} -func (*MsgBudgetProposal) Descriptor() ([]byte, []int) { +func (m *MsgSubmitBudgetProposal) Reset() { *m = MsgSubmitBudgetProposal{} } +func (m *MsgSubmitBudgetProposal) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitBudgetProposal) ProtoMessage() {} +func (*MsgSubmitBudgetProposal) Descriptor() ([]byte, []int) { return fileDescriptor_09efe14517e7f6dc, []int{4} } -func (m *MsgBudgetProposal) XXX_Unmarshal(b []byte) error { +func (m *MsgSubmitBudgetProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgBudgetProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgSubmitBudgetProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgBudgetProposal.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgSubmitBudgetProposal.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -243,54 +243,54 @@ func (m *MsgBudgetProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *MsgBudgetProposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgBudgetProposal.Merge(m, src) +func (m *MsgSubmitBudgetProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitBudgetProposal.Merge(m, src) } -func (m *MsgBudgetProposal) XXX_Size() int { +func (m *MsgSubmitBudgetProposal) XXX_Size() int { return m.Size() } -func (m *MsgBudgetProposal) XXX_DiscardUnknown() { - xxx_messageInfo_MsgBudgetProposal.DiscardUnknown(m) +func (m *MsgSubmitBudgetProposal) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitBudgetProposal.DiscardUnknown(m) } -var xxx_messageInfo_MsgBudgetProposal proto.InternalMessageInfo +var xxx_messageInfo_MsgSubmitBudgetProposal proto.InternalMessageInfo -func (m *MsgBudgetProposal) GetAuthority() string { +func (m *MsgSubmitBudgetProposal) GetAuthority() string { if m != nil { return m.Authority } return "" } -func (m *MsgBudgetProposal) GetRecipientAddress() string { +func (m *MsgSubmitBudgetProposal) GetRecipientAddress() string { if m != nil { return m.RecipientAddress } return "" } -func (m *MsgBudgetProposal) GetTotalBudget() *types.Coin { +func (m *MsgSubmitBudgetProposal) GetTotalBudget() *types.Coin { if m != nil { return m.TotalBudget } return nil } -func (m *MsgBudgetProposal) GetStartTime() int64 { +func (m *MsgSubmitBudgetProposal) GetStartTime() int64 { if m != nil { return m.StartTime } return 0 } -func (m *MsgBudgetProposal) GetRemainingTranches() int64 { +func (m *MsgSubmitBudgetProposal) GetRemainingTranches() int64 { if m != nil { return m.RemainingTranches } return 0 } -func (m *MsgBudgetProposal) GetPeriod() int64 { +func (m *MsgSubmitBudgetProposal) GetPeriod() int64 { if m != nil { return m.Period } @@ -299,21 +299,21 @@ func (m *MsgBudgetProposal) GetPeriod() int64 { // MsgBudgetProposalResponse defines the response to executing a // MsgBudgetProposal message. -type MsgBudgetProposalResponse struct { +type MsgSubmitBudgetProposalResponse struct { } -func (m *MsgBudgetProposalResponse) Reset() { *m = MsgBudgetProposalResponse{} } -func (m *MsgBudgetProposalResponse) String() string { return proto.CompactTextString(m) } -func (*MsgBudgetProposalResponse) ProtoMessage() {} -func (*MsgBudgetProposalResponse) Descriptor() ([]byte, []int) { +func (m *MsgSubmitBudgetProposalResponse) Reset() { *m = MsgSubmitBudgetProposalResponse{} } +func (m *MsgSubmitBudgetProposalResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitBudgetProposalResponse) ProtoMessage() {} +func (*MsgSubmitBudgetProposalResponse) Descriptor() ([]byte, []int) { return fileDescriptor_09efe14517e7f6dc, []int{5} } -func (m *MsgBudgetProposalResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgSubmitBudgetProposalResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgBudgetProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgSubmitBudgetProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgBudgetProposalResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgSubmitBudgetProposalResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -323,17 +323,17 @@ func (m *MsgBudgetProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *MsgBudgetProposalResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgBudgetProposalResponse.Merge(m, src) +func (m *MsgSubmitBudgetProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitBudgetProposalResponse.Merge(m, src) } -func (m *MsgBudgetProposalResponse) XXX_Size() int { +func (m *MsgSubmitBudgetProposalResponse) XXX_Size() int { return m.Size() } -func (m *MsgBudgetProposalResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgBudgetProposalResponse.DiscardUnknown(m) +func (m *MsgSubmitBudgetProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitBudgetProposalResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgBudgetProposalResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgSubmitBudgetProposalResponse proto.InternalMessageInfo // MsgClaimBudget defines a message for claiming the distributed budget. type MsgClaimBudget struct { @@ -431,8 +431,8 @@ func init() { proto.RegisterType((*MsgFundCommunityPoolResponse)(nil), "cosmos.protocolpool.v1.MsgFundCommunityPoolResponse") proto.RegisterType((*MsgCommunityPoolSpend)(nil), "cosmos.protocolpool.v1.MsgCommunityPoolSpend") proto.RegisterType((*MsgCommunityPoolSpendResponse)(nil), "cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse") - proto.RegisterType((*MsgBudgetProposal)(nil), "cosmos.protocolpool.v1.MsgBudgetProposal") - proto.RegisterType((*MsgBudgetProposalResponse)(nil), "cosmos.protocolpool.v1.MsgBudgetProposalResponse") + proto.RegisterType((*MsgSubmitBudgetProposal)(nil), "cosmos.protocolpool.v1.MsgSubmitBudgetProposal") + proto.RegisterType((*MsgSubmitBudgetProposalResponse)(nil), "cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse") proto.RegisterType((*MsgClaimBudget)(nil), "cosmos.protocolpool.v1.MsgClaimBudget") proto.RegisterType((*MsgClaimBudgetResponse)(nil), "cosmos.protocolpool.v1.MsgClaimBudgetResponse") } @@ -440,49 +440,49 @@ func init() { func init() { proto.RegisterFile("cosmos/protocolpool/v1/tx.proto", fileDescriptor_09efe14517e7f6dc) } var fileDescriptor_09efe14517e7f6dc = []byte{ - // 664 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xce, 0x35, 0x34, 0x52, 0xae, 0xa8, 0x22, 0x56, 0x09, 0xae, 0x69, 0x9d, 0x90, 0x01, 0x85, - 0x8a, 0xd8, 0xa4, 0xfc, 0x18, 0x0a, 0x0b, 0xa9, 0x60, 0x8b, 0x54, 0xa5, 0x9d, 0x58, 0x22, 0xc7, - 0x3e, 0x5d, 0x4f, 0x8d, 0xef, 0x59, 0xbe, 0x4b, 0x69, 0x91, 0x90, 0x10, 0x13, 0x23, 0x7f, 0x42, - 0x67, 0xa6, 0x0e, 0xfc, 0x0d, 0xa8, 0x12, 0x4b, 0xc5, 0xd4, 0x09, 0x50, 0x3a, 0x94, 0x3f, 0x03, - 0xc5, 0xbe, 0x3a, 0x09, 0xb1, 0xd2, 0x16, 0xa9, 0x53, 0x92, 0xf7, 0xbe, 0xfb, 0xbe, 0xef, 0x7d, - 0xbe, 0xe7, 0xe0, 0x92, 0x0b, 0xc2, 0x07, 0x61, 0x07, 0x21, 0x48, 0x70, 0xa1, 0x1b, 0x00, 0x74, - 0xed, 0xdd, 0xba, 0x2d, 0xf7, 0xac, 0xa8, 0xa4, 0x15, 0x63, 0x80, 0x35, 0x0a, 0xb0, 0x76, 0xeb, - 0xc6, 0x02, 0x05, 0x0a, 0x51, 0xd1, 0x1e, 0x7c, 0x8b, 0xfb, 0x86, 0xa9, 0xe8, 0x3a, 0x8e, 0x20, - 0xf6, 0x6e, 0xbd, 0x43, 0xa4, 0x53, 0xb7, 0x5d, 0x60, 0x5c, 0xf5, 0x17, 0xe3, 0x7e, 0x3b, 0x3e, - 0x38, 0x4a, 0x6d, 0xdc, 0x51, 0x47, 0x7d, 0x41, 0x07, 0x06, 0x7c, 0x41, 0xe3, 0x46, 0xe5, 0x3b, - 0xc2, 0x0b, 0x4d, 0x41, 0x5f, 0xf7, 0xb8, 0xb7, 0x0e, 0xbe, 0xdf, 0xe3, 0x4c, 0xee, 0x6f, 0x00, - 0x74, 0x35, 0x17, 0xe7, 0x1c, 0x1f, 0x7a, 0x5c, 0xea, 0xa8, 0x9c, 0xad, 0xce, 0xad, 0x2e, 0x5a, - 0x8a, 0x70, 0xa0, 0x6e, 0x29, 0x75, 0x6b, 0x1d, 0x18, 0x6f, 0x3c, 0x3a, 0xfa, 0x59, 0xca, 0x7c, - 0xf9, 0x55, 0xaa, 0x52, 0x26, 0xb7, 0x7b, 0x1d, 0xcb, 0x05, 0x5f, 0xa9, 0xab, 0x8f, 0x9a, 0xf0, - 0x76, 0x6c, 0xb9, 0x1f, 0x10, 0x11, 0x1d, 0x10, 0x2d, 0x45, 0xad, 0x3d, 0xc3, 0x79, 0x8f, 0x04, - 0x20, 0x98, 0x84, 0x50, 0x9f, 0x29, 0xa3, 0x6a, 0xbe, 0xa1, 0xff, 0xf8, 0x5a, 0x5b, 0x50, 0x52, - 0x2f, 0x3d, 0x2f, 0x24, 0x42, 0x6c, 0xca, 0x90, 0x71, 0xda, 0x1a, 0x42, 0xd7, 0x8a, 0x9f, 0x0e, - 0x4a, 0x99, 0x3f, 0x07, 0xa5, 0xcc, 0xc7, 0xb3, 0xc3, 0x95, 0x61, 0xbd, 0x62, 0xe2, 0xa5, 0xb4, - 0x61, 0x5a, 0x44, 0x04, 0xc0, 0x05, 0xa9, 0xf4, 0x11, 0xbe, 0xdd, 0x14, 0x74, 0xac, 0xb9, 0x19, - 0x10, 0xee, 0x0d, 0x9c, 0x38, 0x3d, 0xb9, 0x0d, 0x21, 0x93, 0xfb, 0x3a, 0xba, 0xc8, 0x49, 0x02, - 0xd5, 0x96, 0x70, 0x3e, 0x24, 0x2e, 0x0b, 0x18, 0xe1, 0x32, 0x9e, 0xa0, 0x35, 0x2c, 0x8c, 0x84, - 0x98, 0xbd, 0xb6, 0x10, 0xd7, 0xe6, 0xa3, 0x10, 0x12, 0x4b, 0x95, 0x12, 0x5e, 0x4e, 0x9d, 0x31, - 0x49, 0xe1, 0xdb, 0x0c, 0x2e, 0x34, 0x05, 0x6d, 0xf4, 0x3c, 0x4a, 0xe4, 0x46, 0x08, 0x01, 0x08, - 0xa7, 0xfb, 0xdf, 0x09, 0xbc, 0xc2, 0x85, 0x64, 0xe0, 0xb6, 0x13, 0xa3, 0x2e, 0x7c, 0x96, 0xb7, - 0x92, 0x23, 0xaa, 0xae, 0xbd, 0xc0, 0x37, 0x25, 0x48, 0xa7, 0xdb, 0xee, 0x44, 0xb6, 0xf4, 0x6c, - 0x19, 0x4d, 0x0d, 0xac, 0x35, 0x17, 0xc1, 0xe3, 0x21, 0xb4, 0x65, 0x8c, 0x85, 0x74, 0x42, 0xd9, - 0x96, 0xcc, 0x27, 0xfa, 0x8d, 0x32, 0xaa, 0x66, 0x5b, 0xf9, 0xa8, 0xb2, 0xc5, 0x7c, 0xa2, 0xd5, - 0xb0, 0x16, 0x12, 0xdf, 0x61, 0x9c, 0x71, 0xda, 0x96, 0xa1, 0xc3, 0xdd, 0x6d, 0x22, 0xf4, 0xd9, - 0x08, 0x56, 0x48, 0x3a, 0x5b, 0xaa, 0xa1, 0x15, 0x71, 0x2e, 0x20, 0x21, 0x03, 0x4f, 0xcf, 0x45, - 0x10, 0xf5, 0x6b, 0x22, 0xe9, 0xbb, 0x78, 0x71, 0x22, 0xc7, 0x24, 0x65, 0xc0, 0xf3, 0x83, 0xc7, - 0xd0, 0x75, 0x98, 0xaf, 0x4c, 0xa6, 0x26, 0x85, 0xae, 0x9a, 0xd4, 0x5a, 0x71, 0xe0, 0x62, 0x92, - 0xa9, 0xf2, 0x1e, 0x17, 0xc7, 0x05, 0xcf, 0xad, 0x8c, 0xed, 0x32, 0xba, 0xa6, 0x6b, 0xb8, 0x7a, - 0x92, 0xc5, 0xd9, 0xa6, 0xa0, 0xda, 0x5b, 0x5c, 0x98, 0x7c, 0x9b, 0x3c, 0xb4, 0xd2, 0xdf, 0x74, - 0x56, 0xda, 0xba, 0x1a, 0x4f, 0xae, 0x82, 0x4e, 0xa6, 0x7c, 0x87, 0xb5, 0x94, 0xc5, 0xae, 0x4d, - 0xe1, 0x9a, 0x84, 0x1b, 0x4f, 0xaf, 0x04, 0x4f, 0xb4, 0x39, 0x9e, 0xff, 0x67, 0x9d, 0x1e, 0x4c, - 0x21, 0x1a, 0x87, 0x1a, 0xf5, 0x4b, 0x43, 0x13, 0x3d, 0x82, 0xe7, 0x46, 0x6f, 0xd6, 0xfd, 0x69, - 0xae, 0x87, 0x38, 0xc3, 0xba, 0x1c, 0xee, 0x5c, 0xc6, 0x98, 0xfd, 0x70, 0x76, 0xb8, 0x82, 0x1a, - 0xcf, 0x8f, 0xfa, 0x26, 0x3a, 0xee, 0x9b, 0xe8, 0x77, 0xdf, 0x44, 0x9f, 0x4f, 0xcd, 0xcc, 0xf1, - 0xa9, 0x99, 0x39, 0x39, 0x35, 0x33, 0x6f, 0xee, 0xc5, 0x7c, 0xc2, 0xdb, 0xb1, 0x18, 0xd8, 0x7b, - 0xe3, 0xff, 0x74, 0xd1, 0x2d, 0xe9, 0xe4, 0xa2, 0xda, 0xe3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, - 0xdc, 0xdb, 0x13, 0x0b, 0x0d, 0x07, 0x00, 0x00, + // 672 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4f, 0x6b, 0xdb, 0x4e, + 0x10, 0xf5, 0xc6, 0xbf, 0x18, 0xbc, 0xf9, 0x11, 0x1a, 0xe1, 0x3a, 0x8a, 0x48, 0x24, 0xc7, 0x87, + 0x62, 0x42, 0x2d, 0xd5, 0xe9, 0x3f, 0x48, 0x7b, 0xa9, 0x43, 0x7b, 0x33, 0x04, 0x27, 0xa7, 0x5e, + 0x8c, 0x2c, 0x2d, 0xca, 0x12, 0x4b, 0x23, 0xb4, 0xab, 0x34, 0x29, 0x14, 0x42, 0x4f, 0x3d, 0xf6, + 0x23, 0xe4, 0xdc, 0x53, 0x0e, 0xfd, 0x10, 0x81, 0xf6, 0x10, 0x7a, 0xea, 0xa9, 0x2d, 0xf6, 0x21, + 0x85, 0x7e, 0x89, 0x22, 0x69, 0x23, 0xdb, 0x58, 0x75, 0xea, 0x42, 0x4e, 0xb6, 0x67, 0xde, 0xbc, + 0x79, 0xf3, 0x76, 0x67, 0x8d, 0x35, 0x0b, 0x98, 0x0b, 0xcc, 0xf0, 0x03, 0xe0, 0x60, 0x41, 0xcf, + 0x07, 0xe8, 0x19, 0x87, 0x0d, 0x83, 0x1f, 0xe9, 0x71, 0x48, 0x2a, 0x27, 0x00, 0x7d, 0x14, 0xa0, + 0x1f, 0x36, 0x94, 0x92, 0x03, 0x0e, 0xc4, 0x41, 0x23, 0xfa, 0x96, 0xe4, 0x15, 0x55, 0xd0, 0x75, + 0x4d, 0x46, 0x8c, 0xc3, 0x46, 0x97, 0x70, 0xb3, 0x61, 0x58, 0x40, 0x3d, 0x91, 0x5f, 0x49, 0xf2, + 0x9d, 0xa4, 0x70, 0x94, 0x5a, 0x59, 0x16, 0xa5, 0x2e, 0x73, 0x22, 0x01, 0x2e, 0x73, 0x92, 0x44, + 0xf5, 0x13, 0xc2, 0xa5, 0x16, 0x73, 0x5e, 0x84, 0x9e, 0xbd, 0x0d, 0xae, 0x1b, 0x7a, 0x94, 0x1f, + 0xef, 0x00, 0xf4, 0x24, 0x0b, 0x17, 0x4c, 0x17, 0x42, 0x8f, 0xcb, 0xa8, 0x92, 0xaf, 0x2d, 0x6c, + 0xae, 0xe8, 0x82, 0x30, 0xea, 0xae, 0x8b, 0xee, 0xfa, 0x36, 0x50, 0xaf, 0x79, 0xef, 0xfc, 0x9b, + 0x96, 0xfb, 0xf0, 0x5d, 0xab, 0x39, 0x94, 0xef, 0x87, 0x5d, 0xdd, 0x02, 0x57, 0x74, 0x17, 0x1f, + 0x75, 0x66, 0x1f, 0x18, 0xfc, 0xd8, 0x27, 0x2c, 0x2e, 0x60, 0x6d, 0x41, 0x2d, 0x3d, 0xc2, 0x45, + 0x9b, 0xf8, 0xc0, 0x28, 0x87, 0x40, 0x9e, 0xab, 0xa0, 0x5a, 0xb1, 0x29, 0x7f, 0xf9, 0x58, 0x2f, + 0x89, 0x56, 0xcf, 0x6c, 0x3b, 0x20, 0x8c, 0xed, 0xf2, 0x80, 0x7a, 0x4e, 0x7b, 0x08, 0xdd, 0x2a, + 0xbf, 0x3b, 0xd5, 0x72, 0x3f, 0x4f, 0xb5, 0xdc, 0xdb, 0xcb, 0xb3, 0x8d, 0x61, 0xbc, 0xaa, 0xe2, + 0xd5, 0xac, 0x61, 0xda, 0x84, 0xf9, 0xe0, 0x31, 0x52, 0xed, 0x23, 0x7c, 0xbb, 0xc5, 0x9c, 0xb1, + 0xe4, 0xae, 0x4f, 0x3c, 0x3b, 0x52, 0x62, 0x86, 0x7c, 0x1f, 0x02, 0xca, 0x8f, 0x65, 0x74, 0x9d, + 0x92, 0x14, 0x2a, 0xad, 0xe2, 0x62, 0x40, 0x2c, 0xea, 0x53, 0xe2, 0xf1, 0x64, 0x82, 0xf6, 0x30, + 0x30, 0x62, 0x62, 0xfe, 0xc6, 0x4c, 0xdc, 0x5a, 0x8c, 0x4d, 0x48, 0x25, 0x55, 0x35, 0xbc, 0x96, + 0x39, 0x63, 0xea, 0xc2, 0xe7, 0x39, 0xbc, 0xdc, 0x62, 0xce, 0x6e, 0xd8, 0x75, 0x29, 0x6f, 0x86, + 0xb6, 0x43, 0xf8, 0x4e, 0x00, 0x3e, 0x30, 0xb3, 0xf7, 0xcf, 0x3e, 0x3c, 0xc7, 0x4b, 0xe9, 0xd8, + 0x1d, 0x33, 0x41, 0x5d, 0x7b, 0xa2, 0xb7, 0xd2, 0x12, 0x11, 0x97, 0x9e, 0xe2, 0xff, 0x39, 0x70, + 0xb3, 0xd7, 0xe9, 0xc6, 0xb2, 0xe4, 0x7c, 0x05, 0x4d, 0xb5, 0xad, 0xbd, 0x10, 0xc3, 0x93, 0x21, + 0xa4, 0x35, 0x8c, 0x19, 0x37, 0x03, 0xde, 0xe1, 0xd4, 0x25, 0xf2, 0x7f, 0x15, 0x54, 0xcb, 0xb7, + 0x8b, 0x71, 0x64, 0x8f, 0xba, 0x44, 0xaa, 0x63, 0x29, 0x20, 0xae, 0x49, 0x3d, 0xea, 0x39, 0x1d, + 0x1e, 0x98, 0x9e, 0xb5, 0x4f, 0x98, 0x3c, 0x1f, 0xc3, 0x96, 0xd2, 0xcc, 0x9e, 0x48, 0x48, 0x65, + 0x5c, 0xf0, 0x49, 0x40, 0xc1, 0x96, 0x0b, 0x31, 0x44, 0xfc, 0x9a, 0xf0, 0x7b, 0x1d, 0x6b, 0x7f, + 0x70, 0x33, 0x75, 0x1c, 0xf0, 0x62, 0x74, 0x24, 0x3d, 0x93, 0xba, 0x42, 0x6a, 0xa6, 0x5f, 0x68, + 0x56, 0xbf, 0xb6, 0xca, 0x91, 0x96, 0x49, 0xa6, 0xea, 0x1b, 0x5c, 0x1e, 0x6f, 0x78, 0x25, 0x65, + 0x6c, 0xaf, 0xd1, 0x0d, 0x5d, 0xc9, 0xcd, 0x5f, 0x79, 0x9c, 0x6f, 0x31, 0x47, 0x7a, 0x85, 0x97, + 0x26, 0x5f, 0x96, 0xbb, 0x7a, 0xf6, 0xab, 0xa7, 0x67, 0xad, 0xae, 0xf2, 0x60, 0x16, 0x74, 0x3a, + 0xe5, 0x6b, 0x2c, 0x65, 0x2c, 0x79, 0x7d, 0x0a, 0xd7, 0x24, 0x5c, 0x79, 0x38, 0x13, 0x3c, 0xed, + 0x7d, 0x82, 0x70, 0x29, 0x73, 0xb7, 0x8c, 0x29, 0x7c, 0x59, 0x05, 0xca, 0xe3, 0x19, 0x0b, 0x52, + 0x09, 0x04, 0x2f, 0x8c, 0x5e, 0xb6, 0x3b, 0xd3, 0x06, 0x19, 0xe2, 0x14, 0xfd, 0xef, 0x70, 0x57, + 0x6d, 0x94, 0xf9, 0x93, 0xcb, 0xb3, 0x0d, 0xd4, 0x7c, 0x72, 0xde, 0x57, 0xd1, 0x45, 0x5f, 0x45, + 0x3f, 0xfa, 0x2a, 0x7a, 0x3f, 0x50, 0x73, 0x17, 0x03, 0x35, 0xf7, 0x75, 0xa0, 0xe6, 0x5e, 0xae, + 0x27, 0x7c, 0xcc, 0x3e, 0xd0, 0x29, 0x18, 0x47, 0xe3, 0x7f, 0x84, 0xf1, 0xc5, 0xe9, 0x16, 0xe2, + 0xd8, 0xfd, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x20, 0xb0, 0xd3, 0xf8, 0x2c, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -506,7 +506,7 @@ type MsgClient interface { // keeper. CommunityPoolSpend(ctx context.Context, in *MsgCommunityPoolSpend, opts ...grpc.CallOption) (*MsgCommunityPoolSpendResponse, error) // BudgetProposal defines a method to set a budget proposal. - BudgetProposal(ctx context.Context, in *MsgBudgetProposal, opts ...grpc.CallOption) (*MsgBudgetProposalResponse, error) + 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) } @@ -537,9 +537,9 @@ func (c *msgClient) CommunityPoolSpend(ctx context.Context, in *MsgCommunityPool return out, nil } -func (c *msgClient) BudgetProposal(ctx context.Context, in *MsgBudgetProposal, opts ...grpc.CallOption) (*MsgBudgetProposalResponse, error) { - out := new(MsgBudgetProposalResponse) - err := c.cc.Invoke(ctx, "/cosmos.protocolpool.v1.Msg/BudgetProposal", in, out, opts...) +func (c *msgClient) SubmitBudgetProposal(ctx context.Context, in *MsgSubmitBudgetProposal, opts ...grpc.CallOption) (*MsgSubmitBudgetProposalResponse, error) { + out := new(MsgSubmitBudgetProposalResponse) + err := c.cc.Invoke(ctx, "/cosmos.protocolpool.v1.Msg/SubmitBudgetProposal", in, out, opts...) if err != nil { return nil, err } @@ -566,7 +566,7 @@ type MsgServer interface { // keeper. CommunityPoolSpend(context.Context, *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) // BudgetProposal defines a method to set a budget proposal. - BudgetProposal(context.Context, *MsgBudgetProposal) (*MsgBudgetProposalResponse, error) + SubmitBudgetProposal(context.Context, *MsgSubmitBudgetProposal) (*MsgSubmitBudgetProposalResponse, error) // ClaimBudget defines a method to claim the distributed budget. ClaimBudget(context.Context, *MsgClaimBudget) (*MsgClaimBudgetResponse, error) } @@ -581,8 +581,8 @@ func (*UnimplementedMsgServer) FundCommunityPool(ctx context.Context, req *MsgFu func (*UnimplementedMsgServer) CommunityPoolSpend(ctx context.Context, req *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CommunityPoolSpend not implemented") } -func (*UnimplementedMsgServer) BudgetProposal(ctx context.Context, req *MsgBudgetProposal) (*MsgBudgetProposalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BudgetProposal not implemented") +func (*UnimplementedMsgServer) SubmitBudgetProposal(ctx context.Context, req *MsgSubmitBudgetProposal) (*MsgSubmitBudgetProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitBudgetProposal not implemented") } func (*UnimplementedMsgServer) ClaimBudget(ctx context.Context, req *MsgClaimBudget) (*MsgClaimBudgetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClaimBudget not implemented") @@ -628,20 +628,20 @@ func _Msg_CommunityPoolSpend_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } -func _Msg_BudgetProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgBudgetProposal) +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).BudgetProposal(ctx, in) + return srv.(MsgServer).SubmitBudgetProposal(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.protocolpool.v1.Msg/BudgetProposal", + FullMethod: "/cosmos.protocolpool.v1.Msg/SubmitBudgetProposal", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).BudgetProposal(ctx, req.(*MsgBudgetProposal)) + return srv.(MsgServer).SubmitBudgetProposal(ctx, req.(*MsgSubmitBudgetProposal)) } return interceptor(ctx, in, info, handler) } @@ -677,8 +677,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_CommunityPoolSpend_Handler, }, { - MethodName: "BudgetProposal", - Handler: _Msg_BudgetProposal_Handler, + MethodName: "SubmitBudgetProposal", + Handler: _Msg_SubmitBudgetProposal_Handler, }, { MethodName: "ClaimBudget", @@ -830,7 +830,7 @@ func (m *MsgCommunityPoolSpendResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *MsgBudgetProposal) Marshal() (dAtA []byte, err error) { +func (m *MsgSubmitBudgetProposal) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -840,12 +840,12 @@ func (m *MsgBudgetProposal) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgBudgetProposal) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgSubmitBudgetProposal) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgBudgetProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgSubmitBudgetProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -894,7 +894,7 @@ func (m *MsgBudgetProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgBudgetProposalResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgSubmitBudgetProposalResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -904,12 +904,12 @@ func (m *MsgBudgetProposalResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgBudgetProposalResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgSubmitBudgetProposalResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgBudgetProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgSubmitBudgetProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1051,7 +1051,7 @@ func (m *MsgCommunityPoolSpendResponse) Size() (n int) { return n } -func (m *MsgBudgetProposal) Size() (n int) { +func (m *MsgSubmitBudgetProposal) Size() (n int) { if m == nil { return 0 } @@ -1081,7 +1081,7 @@ func (m *MsgBudgetProposal) Size() (n int) { return n } -func (m *MsgBudgetProposalResponse) Size() (n int) { +func (m *MsgSubmitBudgetProposalResponse) Size() (n int) { if m == nil { return 0 } @@ -1484,7 +1484,7 @@ func (m *MsgCommunityPoolSpendResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgBudgetProposal) Unmarshal(dAtA []byte) error { +func (m *MsgSubmitBudgetProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1507,10 +1507,10 @@ func (m *MsgBudgetProposal) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgBudgetProposal: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSubmitBudgetProposal: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBudgetProposal: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSubmitBudgetProposal: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1691,7 +1691,7 @@ func (m *MsgBudgetProposal) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgBudgetProposalResponse) Unmarshal(dAtA []byte) error { +func (m *MsgSubmitBudgetProposalResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1714,10 +1714,10 @@ func (m *MsgBudgetProposalResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgBudgetProposalResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSubmitBudgetProposalResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBudgetProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSubmitBudgetProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: From 4309b780bfb5f9ea297aefd10fa7b0c4ce0bd81f Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Fri, 13 Oct 2023 14:51:21 +0000 Subject: [PATCH 27/69] wip: cleanup --- api/cosmos/protocolpool/v1/tx.pulsar.go | 6 +- api/cosmos/protocolpool/v1/tx_grpc.pb.go | 4 +- proto/cosmos/protocolpool/v1/tx.proto | 8 +- x/gov/client/cli/prompt.go | 2 +- x/protocolpool/keeper/keeper.go | 6 +- x/protocolpool/types/budget.pb.go | 978 ----------------------- x/protocolpool/types/codec.go | 2 +- x/protocolpool/types/tx.pb.go | 10 +- 8 files changed, 19 insertions(+), 997 deletions(-) delete mode 100644 x/protocolpool/types/budget.pb.go diff --git a/api/cosmos/protocolpool/v1/tx.pulsar.go b/api/cosmos/protocolpool/v1/tx.pulsar.go index 0dac5248985c..83b0b3044fa7 100644 --- a/api/cosmos/protocolpool/v1/tx.pulsar.go +++ b/api/cosmos/protocolpool/v1/tx.pulsar.go @@ -3994,7 +3994,7 @@ func (*MsgCommunityPoolSpendResponse) Descriptor() ([]byte, []int) { return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{3} } -// Budget defines budget proposal type. +// MsgSubmitBudgetProposal defines budget proposal type. type MsgSubmitBudgetProposal struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4071,8 +4071,8 @@ func (x *MsgSubmitBudgetProposal) GetPeriod() int64 { return 0 } -// MsgBudgetProposalResponse defines the response to executing a -// MsgBudgetProposal message. +// MsgSubmitBudgetProposalResponse defines the response to executing a +// MsgSubmitBudgetProposal message. type MsgSubmitBudgetProposalResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/api/cosmos/protocolpool/v1/tx_grpc.pb.go b/api/cosmos/protocolpool/v1/tx_grpc.pb.go index 24474d707a51..38ab855506b2 100644 --- a/api/cosmos/protocolpool/v1/tx_grpc.pb.go +++ b/api/cosmos/protocolpool/v1/tx_grpc.pb.go @@ -37,7 +37,7 @@ type MsgClient interface { // could be the governance module itself. The authority is defined in the // keeper. CommunityPoolSpend(ctx context.Context, in *MsgCommunityPoolSpend, opts ...grpc.CallOption) (*MsgCommunityPoolSpendResponse, error) - // BudgetProposal defines a method to set a budget proposal. + // 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) @@ -99,7 +99,7 @@ type MsgServer interface { // could be the governance module itself. The authority is defined in the // keeper. CommunityPoolSpend(context.Context, *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) - // BudgetProposal defines a method to set a budget proposal. + // 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) diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index 944955997ddd..838d744ebe91 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -22,7 +22,7 @@ service Msg { // keeper. rpc CommunityPoolSpend(MsgCommunityPoolSpend) returns (MsgCommunityPoolSpendResponse); - // BudgetProposal defines a method to set a budget proposal. + // SubmitBudgetProposal defines a method to set a budget proposal. rpc SubmitBudgetProposal(MsgSubmitBudgetProposal) returns (MsgSubmitBudgetProposalResponse); // ClaimBudget defines a method to claim the distributed budget. @@ -61,7 +61,7 @@ message MsgCommunityPoolSpend { // MsgCommunityPoolSpend message. message MsgCommunityPoolSpendResponse {} -// Budget defines budget proposal type. +// MsgSubmitBudgetProposal defines budget proposal type. message MsgSubmitBudgetProposal { option (cosmos.msg.v1.signer) = "authority"; @@ -74,8 +74,8 @@ message MsgSubmitBudgetProposal { int64 period = 6; } -// MsgBudgetProposalResponse defines the response to executing a -// MsgBudgetProposal message. +// MsgSubmitBudgetProposalResponse defines the response to executing a +// MsgSubmitBudgetProposal message. message MsgSubmitBudgetProposalResponse {} // MsgClaimBudget defines a message for claiming the distributed budget. diff --git a/x/gov/client/cli/prompt.go b/x/gov/client/cli/prompt.go index 5ee441c5e771..7680ae1cacc8 100644 --- a/x/gov/client/cli/prompt.go +++ b/x/gov/client/cli/prompt.go @@ -46,7 +46,7 @@ var suggestedProposalTypes = []proposalType{ }, { Name: "set-budget-proposal", - MsgType: "/cosmos.protocolpool.v1.MsgBudgetProposal", + MsgType: "/cosmos.protocolpool.v1.MsgSubmitBudgetProposal", }, { Name: proposalOther, diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 1f77f4b51395..93d511266d62 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -28,7 +28,7 @@ type Keeper struct { // State Schema collections.Schema - BudgetProposal collections.Map[sdk.AccAddress, types.MsgBudgetProposal] + BudgetProposal collections.Map[sdk.AccAddress, types.MsgSubmitBudgetProposal] } func NewKeeper(cdc codec.BinaryCodec, storeService storetypes.KVStoreService, @@ -46,7 +46,7 @@ func NewKeeper(cdc codec.BinaryCodec, storeService storetypes.KVStoreService, bankKeeper: bk, cdc: cdc, authority: authority, - BudgetProposal: collections.NewMap(sb, types.BudgetKey, "budget", sdk.AccAddressKey, codec.CollValue[types.MsgBudgetProposal](cdc)), + BudgetProposal: collections.NewMap(sb, types.BudgetKey, "budget", sdk.AccAddressKey, codec.CollValue[types.MsgSubmitBudgetProposal](cdc)), } schema, err := sb.Build() @@ -166,7 +166,7 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) return sdk.Coin{}, nil } -func (k Keeper) validateBudgetProposal(ctx context.Context, bp types.MsgBudgetProposal) error { +func (k Keeper) validateBudgetProposal(ctx context.Context, bp types.MsgSubmitBudgetProposal) error { account := k.authKeeper.GetAccount(ctx, sdk.AccAddress(bp.RecipientAddress)) if account == nil { return fmt.Errorf("account not found: %s", bp.RecipientAddress) diff --git a/x/protocolpool/types/budget.pb.go b/x/protocolpool/types/budget.pb.go deleted file mode 100644 index 4fcd521e6312..000000000000 --- a/x/protocolpool/types/budget.pb.go +++ /dev/null @@ -1,978 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/protocolpool/v1/budget.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/cosmos-sdk/types/msgservice" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Budget defines budget proposal type. -// -// Since: cosmos-sdk 0.50 -type MsgBudgetProposal struct { - RecipientAddress string `protobuf:"bytes,1,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` - TotalBudget *types.Coin `protobuf:"bytes,2,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` - StartTime int64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - RemainingTranches int64 `protobuf:"varint,4,opt,name=remaining_tranches,json=remainingTranches,proto3" json:"remaining_tranches,omitempty"` - Period int64 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"` -} - -func (m *MsgBudgetProposal) Reset() { *m = MsgBudgetProposal{} } -func (m *MsgBudgetProposal) String() string { return proto.CompactTextString(m) } -func (*MsgBudgetProposal) ProtoMessage() {} -func (*MsgBudgetProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_2414eab590ecb8a3, []int{0} -} -func (m *MsgBudgetProposal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgBudgetProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgBudgetProposal.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 *MsgBudgetProposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgBudgetProposal.Merge(m, src) -} -func (m *MsgBudgetProposal) XXX_Size() int { - return m.Size() -} -func (m *MsgBudgetProposal) XXX_DiscardUnknown() { - xxx_messageInfo_MsgBudgetProposal.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgBudgetProposal proto.InternalMessageInfo - -func (m *MsgBudgetProposal) GetRecipientAddress() string { - if m != nil { - return m.RecipientAddress - } - return "" -} - -func (m *MsgBudgetProposal) GetTotalBudget() *types.Coin { - if m != nil { - return m.TotalBudget - } - return nil -} - -func (m *MsgBudgetProposal) GetStartTime() int64 { - if m != nil { - return m.StartTime - } - return 0 -} - -func (m *MsgBudgetProposal) GetRemainingTranches() int64 { - if m != nil { - return m.RemainingTranches - } - return 0 -} - -func (m *MsgBudgetProposal) GetPeriod() int64 { - if m != nil { - return m.Period - } - return 0 -} - -// MsgBudgetProposalResponse defines the response to executing a -// MsgBudgetProposal message. -// -// Since: cosmos-sdk 0.50 -type MsgBudgetProposalResponse struct { -} - -func (m *MsgBudgetProposalResponse) Reset() { *m = MsgBudgetProposalResponse{} } -func (m *MsgBudgetProposalResponse) String() string { return proto.CompactTextString(m) } -func (*MsgBudgetProposalResponse) ProtoMessage() {} -func (*MsgBudgetProposalResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2414eab590ecb8a3, []int{1} -} -func (m *MsgBudgetProposalResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgBudgetProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgBudgetProposalResponse.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 *MsgBudgetProposalResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgBudgetProposalResponse.Merge(m, src) -} -func (m *MsgBudgetProposalResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgBudgetProposalResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgBudgetProposalResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgBudgetProposalResponse proto.InternalMessageInfo - -// MsgClaimBudget defines a message for claiming the distributed budget. -// -// Since: cosmos-sdk 0.50 -type MsgClaimBudget struct { - RecipientAddress string `protobuf:"bytes,1,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` -} - -func (m *MsgClaimBudget) Reset() { *m = MsgClaimBudget{} } -func (m *MsgClaimBudget) String() string { return proto.CompactTextString(m) } -func (*MsgClaimBudget) ProtoMessage() {} -func (*MsgClaimBudget) Descriptor() ([]byte, []int) { - return fileDescriptor_2414eab590ecb8a3, []int{2} -} -func (m *MsgClaimBudget) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgClaimBudget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgClaimBudget.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 *MsgClaimBudget) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgClaimBudget.Merge(m, src) -} -func (m *MsgClaimBudget) XXX_Size() int { - return m.Size() -} -func (m *MsgClaimBudget) XXX_DiscardUnknown() { - xxx_messageInfo_MsgClaimBudget.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgClaimBudget proto.InternalMessageInfo - -func (m *MsgClaimBudget) GetRecipientAddress() string { - if m != nil { - return m.RecipientAddress - } - return "" -} - -// MsgClaimBudgetResponse defines the response to executing a -// MsgClaimBudget message. -// -// Since: cosmos-sdk 0.50 -type MsgClaimBudgetResponse struct { - Amount types.Coin `protobuf:"bytes,1,opt,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` -} - -func (m *MsgClaimBudgetResponse) Reset() { *m = MsgClaimBudgetResponse{} } -func (m *MsgClaimBudgetResponse) String() string { return proto.CompactTextString(m) } -func (*MsgClaimBudgetResponse) ProtoMessage() {} -func (*MsgClaimBudgetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2414eab590ecb8a3, []int{3} -} -func (m *MsgClaimBudgetResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgClaimBudgetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgClaimBudgetResponse.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 *MsgClaimBudgetResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgClaimBudgetResponse.Merge(m, src) -} -func (m *MsgClaimBudgetResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgClaimBudgetResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgClaimBudgetResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgClaimBudgetResponse proto.InternalMessageInfo - -func (m *MsgClaimBudgetResponse) GetAmount() types.Coin { - if m != nil { - return m.Amount - } - return types.Coin{} -} - -func init() { - proto.RegisterType((*MsgBudgetProposal)(nil), "cosmos.protocolpool.v1.MsgBudgetProposal") - proto.RegisterType((*MsgBudgetProposalResponse)(nil), "cosmos.protocolpool.v1.MsgBudgetProposalResponse") - proto.RegisterType((*MsgClaimBudget)(nil), "cosmos.protocolpool.v1.MsgClaimBudget") - proto.RegisterType((*MsgClaimBudgetResponse)(nil), "cosmos.protocolpool.v1.MsgClaimBudgetResponse") -} - -func init() { - proto.RegisterFile("cosmos/protocolpool/v1/budget.proto", fileDescriptor_2414eab590ecb8a3) -} - -var fileDescriptor_2414eab590ecb8a3 = []byte{ - // 442 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0xbf, 0x6e, 0x13, 0x31, - 0x18, 0xcf, 0x51, 0x88, 0x54, 0x17, 0x21, 0x72, 0xaa, 0xc2, 0x25, 0x88, 0x6b, 0x08, 0x4b, 0x84, - 0x94, 0x33, 0x81, 0x0d, 0x58, 0x48, 0xc5, 0x58, 0x09, 0x1d, 0x9d, 0x58, 0x4e, 0xbe, 0x3b, 0xcb, - 0xb5, 0x7a, 0xf6, 0x77, 0xf2, 0xe7, 0x44, 0x30, 0xb0, 0xf0, 0x04, 0x3c, 0x07, 0x13, 0x03, 0x0f, - 0xd1, 0xb1, 0x62, 0x62, 0x02, 0x94, 0x0c, 0xbc, 0x05, 0x42, 0xb1, 0x4d, 0xd5, 0x2a, 0x12, 0x13, - 0xd3, 0x9d, 0x7f, 0xff, 0xfc, 0xfb, 0xac, 0x8f, 0x3c, 0xa8, 0x00, 0x15, 0x20, 0x6d, 0x0d, 0x58, - 0xa8, 0xa0, 0x69, 0x01, 0x1a, 0xba, 0x9c, 0xd1, 0x72, 0x51, 0x0b, 0x6e, 0x33, 0x07, 0xc7, 0x7d, - 0x2f, 0xca, 0x2e, 0x8b, 0xb2, 0xe5, 0x6c, 0xb8, 0x2f, 0x40, 0x80, 0x03, 0xe9, 0xe6, 0xcf, 0xf3, - 0xc3, 0x34, 0x44, 0x96, 0x0c, 0x39, 0x5d, 0xce, 0x4a, 0x6e, 0xd9, 0x8c, 0x56, 0x20, 0x75, 0xe0, - 0x07, 0x9e, 0x2f, 0xbc, 0xf1, 0x72, 0xf4, 0xf0, 0x4e, 0xb0, 0x2a, 0x14, 0x9b, 0x12, 0x0a, 0x85, - 0x27, 0xc6, 0xbf, 0x23, 0xd2, 0x3b, 0x42, 0x31, 0x77, 0xad, 0x5e, 0x19, 0x68, 0x01, 0x59, 0x13, - 0xbf, 0x24, 0x3d, 0xc3, 0x2b, 0xd9, 0x4a, 0xae, 0x6d, 0xc1, 0xea, 0xda, 0x70, 0xc4, 0x24, 0x1a, - 0x45, 0x93, 0xdd, 0x79, 0xf2, 0xf5, 0xcb, 0x74, 0x3f, 0x64, 0xbf, 0xf0, 0xcc, 0x6b, 0x6b, 0xa4, - 0x16, 0xf9, 0xed, 0x0b, 0x4b, 0xc0, 0xe3, 0xe7, 0xe4, 0xa6, 0x05, 0xcb, 0x9a, 0xc2, 0x0f, 0x9d, - 0x5c, 0x1b, 0x45, 0x93, 0xbd, 0xc7, 0x83, 0x2c, 0xd8, 0x37, 0x73, 0x64, 0x61, 0x8e, 0xec, 0x10, - 0xa4, 0xce, 0xf7, 0x9c, 0xdc, 0x97, 0x89, 0xef, 0x11, 0x82, 0x96, 0x19, 0x5b, 0x58, 0xa9, 0x78, - 0xb2, 0x33, 0x8a, 0x26, 0x3b, 0xf9, 0xae, 0x43, 0x8e, 0xa5, 0xe2, 0xf1, 0x94, 0xc4, 0x86, 0x2b, - 0x26, 0xb5, 0xd4, 0xa2, 0xb0, 0x86, 0xe9, 0xea, 0x84, 0x63, 0x72, 0xdd, 0xc9, 0x7a, 0x17, 0xcc, - 0x71, 0x20, 0xe2, 0x3e, 0xe9, 0xb6, 0xdc, 0x48, 0xa8, 0x93, 0x1b, 0x4e, 0x12, 0x4e, 0xe3, 0xbb, - 0x64, 0xb0, 0x35, 0x7f, 0xce, 0xb1, 0x05, 0x8d, 0x7c, 0x0c, 0xe4, 0xd6, 0x11, 0x8a, 0xc3, 0x86, - 0x49, 0x15, 0x4a, 0xfd, 0x9f, 0x97, 0x79, 0xda, 0xff, 0xf0, 0xeb, 0xf3, 0xc3, 0xed, 0xa4, 0xf1, - 0x7b, 0xd2, 0xbf, 0x7a, 0xe1, 0xdf, 0x2a, 0x71, 0x45, 0xba, 0x4c, 0xc1, 0x42, 0x5b, 0x77, 0xdb, - 0xbf, 0x5e, 0x71, 0xfe, 0xe8, 0xec, 0xfb, 0x41, 0xe7, 0xd3, 0x8f, 0x83, 0x89, 0x90, 0xf6, 0x64, - 0x51, 0x66, 0x15, 0xa8, 0xb0, 0x0d, 0xe1, 0x33, 0xc5, 0xfa, 0x94, 0xda, 0x77, 0x2d, 0x47, 0x67, - 0xc0, 0x3c, 0x44, 0xcf, 0x9f, 0x9d, 0xad, 0xd2, 0xe8, 0x7c, 0x95, 0x46, 0x3f, 0x57, 0x69, 0xf4, - 0x71, 0x9d, 0x76, 0xce, 0xd7, 0x69, 0xe7, 0xdb, 0x3a, 0xed, 0xbc, 0xb9, 0xef, 0x9d, 0x58, 0x9f, - 0x66, 0x12, 0xe8, 0xdb, 0xab, 0x6b, 0xed, 0xa2, 0xca, 0xae, 0xc3, 0x9e, 0xfc, 0x09, 0x00, 0x00, - 0xff, 0xff, 0xb1, 0x01, 0xda, 0xf6, 0xfa, 0x02, 0x00, 0x00, -} - -func (m *MsgBudgetProposal) 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 *MsgBudgetProposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgBudgetProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Period != 0 { - i = encodeVarintBudget(dAtA, i, uint64(m.Period)) - i-- - dAtA[i] = 0x28 - } - if m.RemainingTranches != 0 { - i = encodeVarintBudget(dAtA, i, uint64(m.RemainingTranches)) - i-- - dAtA[i] = 0x20 - } - if m.StartTime != 0 { - i = encodeVarintBudget(dAtA, i, uint64(m.StartTime)) - i-- - dAtA[i] = 0x18 - } - if m.TotalBudget != nil { - { - size, err := m.TotalBudget.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBudget(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.RecipientAddress) > 0 { - i -= len(m.RecipientAddress) - copy(dAtA[i:], m.RecipientAddress) - i = encodeVarintBudget(dAtA, i, uint64(len(m.RecipientAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgBudgetProposalResponse) 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 *MsgBudgetProposalResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgBudgetProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgClaimBudget) 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 *MsgClaimBudget) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgClaimBudget) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RecipientAddress) > 0 { - i -= len(m.RecipientAddress) - copy(dAtA[i:], m.RecipientAddress) - i = encodeVarintBudget(dAtA, i, uint64(len(m.RecipientAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgClaimBudgetResponse) 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 *MsgClaimBudgetResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgClaimBudgetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBudget(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintBudget(dAtA []byte, offset int, v uint64) int { - offset -= sovBudget(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgBudgetProposal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RecipientAddress) - if l > 0 { - n += 1 + l + sovBudget(uint64(l)) - } - if m.TotalBudget != nil { - l = m.TotalBudget.Size() - n += 1 + l + sovBudget(uint64(l)) - } - if m.StartTime != 0 { - n += 1 + sovBudget(uint64(m.StartTime)) - } - if m.RemainingTranches != 0 { - n += 1 + sovBudget(uint64(m.RemainingTranches)) - } - if m.Period != 0 { - n += 1 + sovBudget(uint64(m.Period)) - } - return n -} - -func (m *MsgBudgetProposalResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgClaimBudget) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RecipientAddress) - if l > 0 { - n += 1 + l + sovBudget(uint64(l)) - } - return n -} - -func (m *MsgClaimBudgetResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Amount.Size() - n += 1 + l + sovBudget(uint64(l)) - return n -} - -func sovBudget(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozBudget(x uint64) (n int) { - return sovBudget(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgBudgetProposal) 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 ErrIntOverflowBudget - } - 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: MsgBudgetProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBudgetProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RecipientAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBudget - } - 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 ErrInvalidLengthBudget - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBudget - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RecipientAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalBudget", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBudget - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBudget - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBudget - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TotalBudget == nil { - m.TotalBudget = &types.Coin{} - } - if err := m.TotalBudget.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) - } - m.StartTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBudget - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartTime |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RemainingTranches", wireType) - } - m.RemainingTranches = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBudget - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RemainingTranches |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) - } - m.Period = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBudget - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Period |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBudget(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthBudget - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgBudgetProposalResponse) 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 ErrIntOverflowBudget - } - 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: MsgBudgetProposalResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBudgetProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipBudget(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthBudget - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgClaimBudget) 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 ErrIntOverflowBudget - } - 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: MsgClaimBudget: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgClaimBudget: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RecipientAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBudget - } - 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 ErrInvalidLengthBudget - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBudget - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RecipientAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBudget(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthBudget - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgClaimBudgetResponse) 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 ErrIntOverflowBudget - } - 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: MsgClaimBudgetResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgClaimBudgetResponse: 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 ErrIntOverflowBudget - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBudget - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBudget - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBudget(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthBudget - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipBudget(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBudget - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBudget - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBudget - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthBudget - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupBudget - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthBudget - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthBudget = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowBudget = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupBudget = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/protocolpool/types/codec.go b/x/protocolpool/types/codec.go index 9fcc7276eaf7..461d1bbd10af 100644 --- a/x/protocolpool/types/codec.go +++ b/x/protocolpool/types/codec.go @@ -11,7 +11,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { (*sdk.Msg)(nil), &MsgFundCommunityPool{}, &MsgCommunityPoolSpend{}, - &MsgBudgetProposal{}, + &MsgSubmitBudgetProposal{}, &MsgClaimBudget{}, ) diff --git a/x/protocolpool/types/tx.pb.go b/x/protocolpool/types/tx.pb.go index bc3e5d7af918..e8830be9026c 100644 --- a/x/protocolpool/types/tx.pb.go +++ b/x/protocolpool/types/tx.pb.go @@ -211,7 +211,7 @@ func (m *MsgCommunityPoolSpendResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCommunityPoolSpendResponse proto.InternalMessageInfo -// Budget defines budget proposal type. +// MsgSubmitBudgetProposal defines budget proposal type. type MsgSubmitBudgetProposal 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"` @@ -297,8 +297,8 @@ func (m *MsgSubmitBudgetProposal) GetPeriod() int64 { return 0 } -// MsgBudgetProposalResponse defines the response to executing a -// MsgBudgetProposal message. +// MsgSubmitBudgetProposalResponse defines the response to executing a +// MsgSubmitBudgetProposal message. type MsgSubmitBudgetProposalResponse struct { } @@ -505,7 +505,7 @@ type MsgClient interface { // could be the governance module itself. The authority is defined in the // keeper. CommunityPoolSpend(ctx context.Context, in *MsgCommunityPoolSpend, opts ...grpc.CallOption) (*MsgCommunityPoolSpendResponse, error) - // BudgetProposal defines a method to set a budget proposal. + // 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) @@ -565,7 +565,7 @@ type MsgServer interface { // could be the governance module itself. The authority is defined in the // keeper. CommunityPoolSpend(context.Context, *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) - // BudgetProposal defines a method to set a budget proposal. + // 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) From 273be81e7d29510079434bb647dff0bdc8c77c81 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Fri, 13 Oct 2023 20:24:34 +0530 Subject: [PATCH 28/69] change proposal prompt name --- x/gov/client/cli/prompt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/gov/client/cli/prompt.go b/x/gov/client/cli/prompt.go index 7680ae1cacc8..4e403cdd1fcd 100644 --- a/x/gov/client/cli/prompt.go +++ b/x/gov/client/cli/prompt.go @@ -45,7 +45,7 @@ var suggestedProposalTypes = []proposalType{ MsgType: "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", }, { - Name: "set-budget-proposal", + Name: "submit-budget-proposal", MsgType: "/cosmos.protocolpool.v1.MsgSubmitBudgetProposal", }, { From d8c686b4e6ccf552f430e691fcd509f28d06e46c Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Fri, 13 Oct 2023 20:35:28 +0530 Subject: [PATCH 29/69] fix lint --- x/protocolpool/keeper/grpc_query.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/x/protocolpool/keeper/grpc_query.go b/x/protocolpool/keeper/grpc_query.go index d0384964c624..8cd0e78946af 100644 --- a/x/protocolpool/keeper/grpc_query.go +++ b/x/protocolpool/keeper/grpc_query.go @@ -4,11 +4,12 @@ import ( "context" "errors" - "cosmossdk.io/collections" - "cosmossdk.io/x/protocolpool/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "cosmossdk.io/collections" + "cosmossdk.io/x/protocolpool/types" + sdk "github.com/cosmos/cosmos-sdk/types" ) From 7c306d25e946d9ccf36fa8f71b241b6e80dd1d33 Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Thu, 19 Oct 2023 09:30:35 +0000 Subject: [PATCH 30/69] add MsgFundDispensationProposal proto msg --- api/cosmos/protocolpool/v1/tx.pulsar.go | 1402 +++++++++++++++++++++-- proto/cosmos/protocolpool/v1/tx.proto | 15 + x/protocolpool/types/tx.pb.go | 584 +++++++++- 3 files changed, 1885 insertions(+), 116 deletions(-) diff --git a/api/cosmos/protocolpool/v1/tx.pulsar.go b/api/cosmos/protocolpool/v1/tx.pulsar.go index 83b0b3044fa7..e34e5a399f23 100644 --- a/api/cosmos/protocolpool/v1/tx.pulsar.go +++ b/api/cosmos/protocolpool/v1/tx.pulsar.go @@ -3826,6 +3826,1111 @@ func (x *fastReflection_MsgClaimBudgetResponse) ProtoMethods() *protoiface.Metho } } +var _ protoreflect.List = (*_MsgFundDispensationProposal_4_list)(nil) + +type _MsgFundDispensationProposal_4_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgFundDispensationProposal_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgFundDispensationProposal_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgFundDispensationProposal_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgFundDispensationProposal_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgFundDispensationProposal_4_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgFundDispensationProposal_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgFundDispensationProposal_4_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgFundDispensationProposal_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgFundDispensationProposal protoreflect.MessageDescriptor + fd_MsgFundDispensationProposal_authority protoreflect.FieldDescriptor + fd_MsgFundDispensationProposal_destination protoreflect.FieldDescriptor + fd_MsgFundDispensationProposal_percentage protoreflect.FieldDescriptor + fd_MsgFundDispensationProposal_cap protoreflect.FieldDescriptor + fd_MsgFundDispensationProposal_expiration protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgFundDispensationProposal = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgFundDispensationProposal") + fd_MsgFundDispensationProposal_authority = md_MsgFundDispensationProposal.Fields().ByName("authority") + fd_MsgFundDispensationProposal_destination = md_MsgFundDispensationProposal.Fields().ByName("destination") + fd_MsgFundDispensationProposal_percentage = md_MsgFundDispensationProposal.Fields().ByName("percentage") + fd_MsgFundDispensationProposal_cap = md_MsgFundDispensationProposal.Fields().ByName("cap") + fd_MsgFundDispensationProposal_expiration = md_MsgFundDispensationProposal.Fields().ByName("expiration") +} + +var _ protoreflect.Message = (*fastReflection_MsgFundDispensationProposal)(nil) + +type fastReflection_MsgFundDispensationProposal MsgFundDispensationProposal + +func (x *MsgFundDispensationProposal) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgFundDispensationProposal)(x) +} + +func (x *MsgFundDispensationProposal) 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_MsgFundDispensationProposal_messageType fastReflection_MsgFundDispensationProposal_messageType +var _ protoreflect.MessageType = fastReflection_MsgFundDispensationProposal_messageType{} + +type fastReflection_MsgFundDispensationProposal_messageType struct{} + +func (x fastReflection_MsgFundDispensationProposal_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgFundDispensationProposal)(nil) +} +func (x fastReflection_MsgFundDispensationProposal_messageType) New() protoreflect.Message { + return new(fastReflection_MsgFundDispensationProposal) +} +func (x fastReflection_MsgFundDispensationProposal_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgFundDispensationProposal +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgFundDispensationProposal) Descriptor() protoreflect.MessageDescriptor { + return md_MsgFundDispensationProposal +} + +// 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_MsgFundDispensationProposal) Type() protoreflect.MessageType { + return _fastReflection_MsgFundDispensationProposal_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgFundDispensationProposal) New() protoreflect.Message { + return new(fastReflection_MsgFundDispensationProposal) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgFundDispensationProposal) Interface() protoreflect.ProtoMessage { + return (*MsgFundDispensationProposal)(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_MsgFundDispensationProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgFundDispensationProposal_authority, value) { + return + } + } + if x.Destination != "" { + value := protoreflect.ValueOfString(x.Destination) + if !f(fd_MsgFundDispensationProposal_destination, value) { + return + } + } + if x.Percentage != nil { + value := protoreflect.ValueOfMessage(x.Percentage.ProtoReflect()) + if !f(fd_MsgFundDispensationProposal_percentage, value) { + return + } + } + if len(x.Cap) != 0 { + value := protoreflect.ValueOfList(&_MsgFundDispensationProposal_4_list{list: &x.Cap}) + if !f(fd_MsgFundDispensationProposal_cap, value) { + return + } + } + if x.Expiration != int64(0) { + value := protoreflect.ValueOfInt64(x.Expiration) + if !f(fd_MsgFundDispensationProposal_expiration, 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_MsgFundDispensationProposal) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": + return x.Authority != "" + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": + return x.Destination != "" + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": + return x.Percentage != nil + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": + return len(x.Cap) != 0 + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.expiration": + return x.Expiration != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundDispensationProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposal 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_MsgFundDispensationProposal) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": + x.Authority = "" + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": + x.Destination = "" + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": + x.Percentage = nil + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": + x.Cap = nil + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.expiration": + x.Expiration = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundDispensationProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposal 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_MsgFundDispensationProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": + value := x.Destination + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": + value := x.Percentage + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": + if len(x.Cap) == 0 { + return protoreflect.ValueOfList(&_MsgFundDispensationProposal_4_list{}) + } + listValue := &_MsgFundDispensationProposal_4_list{list: &x.Cap} + return protoreflect.ValueOfList(listValue) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.expiration": + value := x.Expiration + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundDispensationProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposal 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_MsgFundDispensationProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": + x.Authority = value.Interface().(string) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": + x.Destination = value.Interface().(string) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": + x.Percentage = value.Message().Interface().(*v1beta1.DecCoin) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": + lv := value.List() + clv := lv.(*_MsgFundDispensationProposal_4_list) + x.Cap = *clv.list + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.expiration": + x.Expiration = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundDispensationProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposal 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_MsgFundDispensationProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": + if x.Percentage == nil { + x.Percentage = new(v1beta1.DecCoin) + } + return protoreflect.ValueOfMessage(x.Percentage.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": + if x.Cap == nil { + x.Cap = []*v1beta1.Coin{} + } + value := &_MsgFundDispensationProposal_4_list{list: &x.Cap} + return protoreflect.ValueOfList(value) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": + panic(fmt.Errorf("field authority of message cosmos.protocolpool.v1.MsgFundDispensationProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": + panic(fmt.Errorf("field destination of message cosmos.protocolpool.v1.MsgFundDispensationProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.expiration": + panic(fmt.Errorf("field expiration of message cosmos.protocolpool.v1.MsgFundDispensationProposal is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundDispensationProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposal 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_MsgFundDispensationProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": + m := new(v1beta1.DecCoin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgFundDispensationProposal_4_list{list: &list}) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.expiration": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundDispensationProposal")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposal 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_MsgFundDispensationProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgFundDispensationProposal", 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_MsgFundDispensationProposal) 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_MsgFundDispensationProposal) 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_MsgFundDispensationProposal) 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_MsgFundDispensationProposal) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgFundDispensationProposal) + 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.Destination) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Percentage != nil { + l = options.Size(x.Percentage) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Cap) > 0 { + for _, e := range x.Cap { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Expiration != 0 { + n += 1 + runtime.Sov(uint64(x.Expiration)) + } + 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().(*MsgFundDispensationProposal) + 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.Expiration != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Expiration)) + i-- + dAtA[i] = 0x28 + } + if len(x.Cap) > 0 { + for iNdEx := len(x.Cap) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Cap[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.Percentage != nil { + encoded, err := options.Marshal(x.Percentage) + 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.Destination) > 0 { + i -= len(x.Destination) + copy(dAtA[i:], x.Destination) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Destination))) + 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().(*MsgFundDispensationProposal) + 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: MsgFundDispensationProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgFundDispensationProposal: 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 Destination", 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.Destination = 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 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.Percentage == nil { + x.Percentage = &v1beta1.DecCoin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Percentage); 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 Cap", 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.Cap = append(x.Cap, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Cap[len(x.Cap)-1]); 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 Expiration", wireType) + } + x.Expiration = 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.Expiration |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgFundDispensationProposalResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_protocolpool_v1_tx_proto_init() + md_MsgFundDispensationProposalResponse = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgFundDispensationProposalResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgFundDispensationProposalResponse)(nil) + +type fastReflection_MsgFundDispensationProposalResponse MsgFundDispensationProposalResponse + +func (x *MsgFundDispensationProposalResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgFundDispensationProposalResponse)(x) +} + +func (x *MsgFundDispensationProposalResponse) 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_MsgFundDispensationProposalResponse_messageType fastReflection_MsgFundDispensationProposalResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgFundDispensationProposalResponse_messageType{} + +type fastReflection_MsgFundDispensationProposalResponse_messageType struct{} + +func (x fastReflection_MsgFundDispensationProposalResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgFundDispensationProposalResponse)(nil) +} +func (x fastReflection_MsgFundDispensationProposalResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgFundDispensationProposalResponse) +} +func (x fastReflection_MsgFundDispensationProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgFundDispensationProposalResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgFundDispensationProposalResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgFundDispensationProposalResponse +} + +// 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_MsgFundDispensationProposalResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgFundDispensationProposalResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgFundDispensationProposalResponse) New() protoreflect.Message { + return new(fastReflection_MsgFundDispensationProposalResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgFundDispensationProposalResponse) Interface() protoreflect.ProtoMessage { + return (*MsgFundDispensationProposalResponse)(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_MsgFundDispensationProposalResponse) 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_MsgFundDispensationProposalResponse) 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.MsgFundDispensationProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposalResponse 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_MsgFundDispensationProposalResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundDispensationProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposalResponse 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_MsgFundDispensationProposalResponse) 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.MsgFundDispensationProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposalResponse 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_MsgFundDispensationProposalResponse) 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.MsgFundDispensationProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposalResponse 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_MsgFundDispensationProposalResponse) 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.MsgFundDispensationProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposalResponse 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_MsgFundDispensationProposalResponse) 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.MsgFundDispensationProposalResponse")) + } + panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposalResponse 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_MsgFundDispensationProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgFundDispensationProposalResponse", 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_MsgFundDispensationProposalResponse) 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_MsgFundDispensationProposalResponse) 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_MsgFundDispensationProposalResponse) 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_MsgFundDispensationProposalResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgFundDispensationProposalResponse) + 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().(*MsgFundDispensationProposalResponse) + 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().(*MsgFundDispensationProposalResponse) + 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: MsgFundDispensationProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgFundDispensationProposalResponse: 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 @@ -4172,6 +5277,100 @@ func (x *MsgClaimBudgetResponse) GetAmount() *v1beta1.Coin { return nil } +type MsgFundDispensationProposal 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"` + Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` + Percentage *v1beta1.DecCoin `protobuf:"bytes,3,opt,name=percentage,proto3" json:"percentage,omitempty"` + Cap []*v1beta1.Coin `protobuf:"bytes,4,rep,name=cap,proto3" json:"cap,omitempty"` + Expiration int64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` +} + +func (x *MsgFundDispensationProposal) Reset() { + *x = MsgFundDispensationProposal{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgFundDispensationProposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgFundDispensationProposal) ProtoMessage() {} + +// Deprecated: Use MsgFundDispensationProposal.ProtoReflect.Descriptor instead. +func (*MsgFundDispensationProposal) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{8} +} + +func (x *MsgFundDispensationProposal) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgFundDispensationProposal) GetDestination() string { + if x != nil { + return x.Destination + } + return "" +} + +func (x *MsgFundDispensationProposal) GetPercentage() *v1beta1.DecCoin { + if x != nil { + return x.Percentage + } + return nil +} + +func (x *MsgFundDispensationProposal) GetCap() []*v1beta1.Coin { + if x != nil { + return x.Cap + } + return nil +} + +func (x *MsgFundDispensationProposal) GetExpiration() int64 { + if x != nil { + return x.Expiration + } + return 0 +} + +type MsgFundDispensationProposalResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgFundDispensationProposalResponse) Reset() { + *x = MsgFundDispensationProposalResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgFundDispensationProposalResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgFundDispensationProposalResponse) ProtoMessage() {} + +// Deprecated: Use MsgFundDispensationProposalResponse.ProtoReflect.Descriptor instead. +func (*MsgFundDispensationProposalResponse) Descriptor() ([]byte, []int) { + return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{9} +} + var File_cosmos_protocolpool_v1_tx_proto protoreflect.FileDescriptor var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ @@ -4254,52 +5453,80 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 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, 0x32, 0xeb, 0x03, 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, - 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd7, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, + 0x73, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, 0x03, 0x0a, 0x1b, 0x4d, 0x73, + 0x67, 0x46, 0x75, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 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, 0x3a, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 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, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x71, 0x0a, + 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, + 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 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, 0x44, 0x65, 0x63, 0x43, + 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, + 0x12, 0x5d, 0x0a, 0x03, 0x63, 0x61, 0x70, 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, 0x03, 0x63, 0x61, 0x70, 0x12, + 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, + 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, + 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x65, 0x6e, + 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xeb, 0x03, 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, 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, + 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, 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 ( @@ -4314,36 +5541,41 @@ func file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP() []byte { return file_cosmos_protocolpool_v1_tx_proto_rawDescData } -var file_cosmos_protocolpool_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_cosmos_protocolpool_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 10) 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 - (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin + (*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 + (*MsgFundDispensationProposal)(nil), // 8: cosmos.protocolpool.v1.MsgFundDispensationProposal + (*MsgFundDispensationProposalResponse)(nil), // 9: cosmos.protocolpool.v1.MsgFundDispensationProposalResponse + (*v1beta1.Coin)(nil), // 10: cosmos.base.v1beta1.Coin + (*v1beta1.DecCoin)(nil), // 11: cosmos.base.v1beta1.DecCoin } var file_cosmos_protocolpool_v1_tx_proto_depIdxs = []int32{ - 8, // 0: cosmos.protocolpool.v1.MsgFundCommunityPool.amount:type_name -> cosmos.base.v1beta1.Coin - 8, // 1: cosmos.protocolpool.v1.MsgCommunityPoolSpend.amount:type_name -> cosmos.base.v1beta1.Coin - 8, // 2: cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget:type_name -> cosmos.base.v1beta1.Coin - 8, // 3: cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount:type_name -> cosmos.base.v1beta1.Coin - 0, // 4: cosmos.protocolpool.v1.Msg.FundCommunityPool:input_type -> cosmos.protocolpool.v1.MsgFundCommunityPool - 2, // 5: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:input_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpend - 4, // 6: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:input_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposal - 6, // 7: cosmos.protocolpool.v1.Msg.ClaimBudget:input_type -> cosmos.protocolpool.v1.MsgClaimBudget - 1, // 8: cosmos.protocolpool.v1.Msg.FundCommunityPool:output_type -> cosmos.protocolpool.v1.MsgFundCommunityPoolResponse - 3, // 9: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:output_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse - 5, // 10: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:output_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse - 7, // 11: cosmos.protocolpool.v1.Msg.ClaimBudget:output_type -> cosmos.protocolpool.v1.MsgClaimBudgetResponse - 8, // [8:12] is the sub-list for method output_type - 4, // [4:8] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 10, // 0: cosmos.protocolpool.v1.MsgFundCommunityPool.amount:type_name -> cosmos.base.v1beta1.Coin + 10, // 1: cosmos.protocolpool.v1.MsgCommunityPoolSpend.amount:type_name -> cosmos.base.v1beta1.Coin + 10, // 2: cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget:type_name -> cosmos.base.v1beta1.Coin + 10, // 3: cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount:type_name -> cosmos.base.v1beta1.Coin + 11, // 4: cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage:type_name -> cosmos.base.v1beta1.DecCoin + 10, // 5: cosmos.protocolpool.v1.MsgFundDispensationProposal.cap:type_name -> cosmos.base.v1beta1.Coin + 0, // 6: cosmos.protocolpool.v1.Msg.FundCommunityPool:input_type -> cosmos.protocolpool.v1.MsgFundCommunityPool + 2, // 7: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:input_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpend + 4, // 8: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:input_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposal + 6, // 9: cosmos.protocolpool.v1.Msg.ClaimBudget:input_type -> cosmos.protocolpool.v1.MsgClaimBudget + 1, // 10: cosmos.protocolpool.v1.Msg.FundCommunityPool:output_type -> cosmos.protocolpool.v1.MsgFundCommunityPoolResponse + 3, // 11: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:output_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse + 5, // 12: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:output_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse + 7, // 13: cosmos.protocolpool.v1.Msg.ClaimBudget:output_type -> cosmos.protocolpool.v1.MsgClaimBudgetResponse + 10, // [10:14] is the sub-list for method output_type + 6, // [6:10] 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_tx_proto_init() } @@ -4448,6 +5680,30 @@ func file_cosmos_protocolpool_v1_tx_proto_init() { return nil } } + file_cosmos_protocolpool_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgFundDispensationProposal); 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.(*MsgFundDispensationProposalResponse); 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{ @@ -4455,7 +5711,7 @@ func file_cosmos_protocolpool_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_protocolpool_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index 838d744ebe91..7b6eee4a9ca6 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -91,3 +91,18 @@ message MsgClaimBudgetResponse { [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; ; } + +message MsgFundDispensationProposal { + 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"]; + string destination = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + cosmos.base.v1beta1.DecCoin percentage = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; + repeated cosmos.base.v1beta1.Coin cap = 4 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + int64 expiration = 5; +} + +message MsgFundDispensationProposalResponse {} \ No newline at end of file diff --git a/x/protocolpool/types/tx.pb.go b/x/protocolpool/types/tx.pb.go index e8830be9026c..5e1c628f9a52 100644 --- a/x/protocolpool/types/tx.pb.go +++ b/x/protocolpool/types/tx.pb.go @@ -426,6 +426,119 @@ func (m *MsgClaimBudgetResponse) GetAmount() types.Coin { return types.Coin{} } +type MsgFundDispensationProposal 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"` + Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` + Percentage types.DecCoin `protobuf:"bytes,3,opt,name=percentage,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"percentage"` + Cap github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=cap,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"cap"` + Expiration int64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` +} + +func (m *MsgFundDispensationProposal) Reset() { *m = MsgFundDispensationProposal{} } +func (m *MsgFundDispensationProposal) String() string { return proto.CompactTextString(m) } +func (*MsgFundDispensationProposal) ProtoMessage() {} +func (*MsgFundDispensationProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_09efe14517e7f6dc, []int{8} +} +func (m *MsgFundDispensationProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgFundDispensationProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgFundDispensationProposal.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 *MsgFundDispensationProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgFundDispensationProposal.Merge(m, src) +} +func (m *MsgFundDispensationProposal) XXX_Size() int { + return m.Size() +} +func (m *MsgFundDispensationProposal) XXX_DiscardUnknown() { + xxx_messageInfo_MsgFundDispensationProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgFundDispensationProposal proto.InternalMessageInfo + +func (m *MsgFundDispensationProposal) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgFundDispensationProposal) GetDestination() string { + if m != nil { + return m.Destination + } + return "" +} + +func (m *MsgFundDispensationProposal) GetPercentage() types.DecCoin { + if m != nil { + return m.Percentage + } + return types.DecCoin{} +} + +func (m *MsgFundDispensationProposal) GetCap() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Cap + } + return nil +} + +func (m *MsgFundDispensationProposal) GetExpiration() int64 { + if m != nil { + return m.Expiration + } + return 0 +} + +type MsgFundDispensationProposalResponse struct { +} + +func (m *MsgFundDispensationProposalResponse) Reset() { *m = MsgFundDispensationProposalResponse{} } +func (m *MsgFundDispensationProposalResponse) String() string { return proto.CompactTextString(m) } +func (*MsgFundDispensationProposalResponse) ProtoMessage() {} +func (*MsgFundDispensationProposalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_09efe14517e7f6dc, []int{9} +} +func (m *MsgFundDispensationProposalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgFundDispensationProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgFundDispensationProposalResponse.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 *MsgFundDispensationProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgFundDispensationProposalResponse.Merge(m, src) +} +func (m *MsgFundDispensationProposalResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgFundDispensationProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgFundDispensationProposalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgFundDispensationProposalResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgFundCommunityPool)(nil), "cosmos.protocolpool.v1.MsgFundCommunityPool") proto.RegisterType((*MsgFundCommunityPoolResponse)(nil), "cosmos.protocolpool.v1.MsgFundCommunityPoolResponse") @@ -435,54 +548,63 @@ func init() { proto.RegisterType((*MsgSubmitBudgetProposalResponse)(nil), "cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse") proto.RegisterType((*MsgClaimBudget)(nil), "cosmos.protocolpool.v1.MsgClaimBudget") proto.RegisterType((*MsgClaimBudgetResponse)(nil), "cosmos.protocolpool.v1.MsgClaimBudgetResponse") + proto.RegisterType((*MsgFundDispensationProposal)(nil), "cosmos.protocolpool.v1.MsgFundDispensationProposal") + proto.RegisterType((*MsgFundDispensationProposalResponse)(nil), "cosmos.protocolpool.v1.MsgFundDispensationProposalResponse") } func init() { proto.RegisterFile("cosmos/protocolpool/v1/tx.proto", fileDescriptor_09efe14517e7f6dc) } var fileDescriptor_09efe14517e7f6dc = []byte{ - // 672 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4f, 0x6b, 0xdb, 0x4e, - 0x10, 0xf5, 0xc6, 0xbf, 0x18, 0xbc, 0xf9, 0x11, 0x1a, 0xe1, 0x3a, 0x8a, 0x48, 0x24, 0xc7, 0x87, - 0x62, 0x42, 0x2d, 0xd5, 0xe9, 0x3f, 0x48, 0x7b, 0xa9, 0x43, 0x7b, 0x33, 0x04, 0x27, 0xa7, 0x5e, - 0x8c, 0x2c, 0x2d, 0xca, 0x12, 0x4b, 0x23, 0xb4, 0xab, 0x34, 0x29, 0x14, 0x42, 0x4f, 0x3d, 0xf6, - 0x23, 0xe4, 0xdc, 0x53, 0x0e, 0xfd, 0x10, 0x81, 0xf6, 0x10, 0x7a, 0xea, 0xa9, 0x2d, 0xf6, 0x21, - 0x85, 0x7e, 0x89, 0x22, 0x69, 0x23, 0xdb, 0x58, 0x75, 0xea, 0x42, 0x4e, 0xb6, 0x67, 0xde, 0xbc, - 0x79, 0xf3, 0x76, 0x67, 0x8d, 0x35, 0x0b, 0x98, 0x0b, 0xcc, 0xf0, 0x03, 0xe0, 0x60, 0x41, 0xcf, - 0x07, 0xe8, 0x19, 0x87, 0x0d, 0x83, 0x1f, 0xe9, 0x71, 0x48, 0x2a, 0x27, 0x00, 0x7d, 0x14, 0xa0, - 0x1f, 0x36, 0x94, 0x92, 0x03, 0x0e, 0xc4, 0x41, 0x23, 0xfa, 0x96, 0xe4, 0x15, 0x55, 0xd0, 0x75, - 0x4d, 0x46, 0x8c, 0xc3, 0x46, 0x97, 0x70, 0xb3, 0x61, 0x58, 0x40, 0x3d, 0x91, 0x5f, 0x49, 0xf2, - 0x9d, 0xa4, 0x70, 0x94, 0x5a, 0x59, 0x16, 0xa5, 0x2e, 0x73, 0x22, 0x01, 0x2e, 0x73, 0x92, 0x44, - 0xf5, 0x13, 0xc2, 0xa5, 0x16, 0x73, 0x5e, 0x84, 0x9e, 0xbd, 0x0d, 0xae, 0x1b, 0x7a, 0x94, 0x1f, - 0xef, 0x00, 0xf4, 0x24, 0x0b, 0x17, 0x4c, 0x17, 0x42, 0x8f, 0xcb, 0xa8, 0x92, 0xaf, 0x2d, 0x6c, - 0xae, 0xe8, 0x82, 0x30, 0xea, 0xae, 0x8b, 0xee, 0xfa, 0x36, 0x50, 0xaf, 0x79, 0xef, 0xfc, 0x9b, - 0x96, 0xfb, 0xf0, 0x5d, 0xab, 0x39, 0x94, 0xef, 0x87, 0x5d, 0xdd, 0x02, 0x57, 0x74, 0x17, 0x1f, - 0x75, 0x66, 0x1f, 0x18, 0xfc, 0xd8, 0x27, 0x2c, 0x2e, 0x60, 0x6d, 0x41, 0x2d, 0x3d, 0xc2, 0x45, - 0x9b, 0xf8, 0xc0, 0x28, 0x87, 0x40, 0x9e, 0xab, 0xa0, 0x5a, 0xb1, 0x29, 0x7f, 0xf9, 0x58, 0x2f, - 0x89, 0x56, 0xcf, 0x6c, 0x3b, 0x20, 0x8c, 0xed, 0xf2, 0x80, 0x7a, 0x4e, 0x7b, 0x08, 0xdd, 0x2a, - 0xbf, 0x3b, 0xd5, 0x72, 0x3f, 0x4f, 0xb5, 0xdc, 0xdb, 0xcb, 0xb3, 0x8d, 0x61, 0xbc, 0xaa, 0xe2, - 0xd5, 0xac, 0x61, 0xda, 0x84, 0xf9, 0xe0, 0x31, 0x52, 0xed, 0x23, 0x7c, 0xbb, 0xc5, 0x9c, 0xb1, - 0xe4, 0xae, 0x4f, 0x3c, 0x3b, 0x52, 0x62, 0x86, 0x7c, 0x1f, 0x02, 0xca, 0x8f, 0x65, 0x74, 0x9d, - 0x92, 0x14, 0x2a, 0xad, 0xe2, 0x62, 0x40, 0x2c, 0xea, 0x53, 0xe2, 0xf1, 0x64, 0x82, 0xf6, 0x30, - 0x30, 0x62, 0x62, 0xfe, 0xc6, 0x4c, 0xdc, 0x5a, 0x8c, 0x4d, 0x48, 0x25, 0x55, 0x35, 0xbc, 0x96, - 0x39, 0x63, 0xea, 0xc2, 0xe7, 0x39, 0xbc, 0xdc, 0x62, 0xce, 0x6e, 0xd8, 0x75, 0x29, 0x6f, 0x86, - 0xb6, 0x43, 0xf8, 0x4e, 0x00, 0x3e, 0x30, 0xb3, 0xf7, 0xcf, 0x3e, 0x3c, 0xc7, 0x4b, 0xe9, 0xd8, - 0x1d, 0x33, 0x41, 0x5d, 0x7b, 0xa2, 0xb7, 0xd2, 0x12, 0x11, 0x97, 0x9e, 0xe2, 0xff, 0x39, 0x70, - 0xb3, 0xd7, 0xe9, 0xc6, 0xb2, 0xe4, 0x7c, 0x05, 0x4d, 0xb5, 0xad, 0xbd, 0x10, 0xc3, 0x93, 0x21, - 0xa4, 0x35, 0x8c, 0x19, 0x37, 0x03, 0xde, 0xe1, 0xd4, 0x25, 0xf2, 0x7f, 0x15, 0x54, 0xcb, 0xb7, - 0x8b, 0x71, 0x64, 0x8f, 0xba, 0x44, 0xaa, 0x63, 0x29, 0x20, 0xae, 0x49, 0x3d, 0xea, 0x39, 0x1d, - 0x1e, 0x98, 0x9e, 0xb5, 0x4f, 0x98, 0x3c, 0x1f, 0xc3, 0x96, 0xd2, 0xcc, 0x9e, 0x48, 0x48, 0x65, - 0x5c, 0xf0, 0x49, 0x40, 0xc1, 0x96, 0x0b, 0x31, 0x44, 0xfc, 0x9a, 0xf0, 0x7b, 0x1d, 0x6b, 0x7f, - 0x70, 0x33, 0x75, 0x1c, 0xf0, 0x62, 0x74, 0x24, 0x3d, 0x93, 0xba, 0x42, 0x6a, 0xa6, 0x5f, 0x68, - 0x56, 0xbf, 0xb6, 0xca, 0x91, 0x96, 0x49, 0xa6, 0xea, 0x1b, 0x5c, 0x1e, 0x6f, 0x78, 0x25, 0x65, - 0x6c, 0xaf, 0xd1, 0x0d, 0x5d, 0xc9, 0xcd, 0x5f, 0x79, 0x9c, 0x6f, 0x31, 0x47, 0x7a, 0x85, 0x97, - 0x26, 0x5f, 0x96, 0xbb, 0x7a, 0xf6, 0xab, 0xa7, 0x67, 0xad, 0xae, 0xf2, 0x60, 0x16, 0x74, 0x3a, - 0xe5, 0x6b, 0x2c, 0x65, 0x2c, 0x79, 0x7d, 0x0a, 0xd7, 0x24, 0x5c, 0x79, 0x38, 0x13, 0x3c, 0xed, - 0x7d, 0x82, 0x70, 0x29, 0x73, 0xb7, 0x8c, 0x29, 0x7c, 0x59, 0x05, 0xca, 0xe3, 0x19, 0x0b, 0x52, - 0x09, 0x04, 0x2f, 0x8c, 0x5e, 0xb6, 0x3b, 0xd3, 0x06, 0x19, 0xe2, 0x14, 0xfd, 0xef, 0x70, 0x57, - 0x6d, 0x94, 0xf9, 0x93, 0xcb, 0xb3, 0x0d, 0xd4, 0x7c, 0x72, 0xde, 0x57, 0xd1, 0x45, 0x5f, 0x45, - 0x3f, 0xfa, 0x2a, 0x7a, 0x3f, 0x50, 0x73, 0x17, 0x03, 0x35, 0xf7, 0x75, 0xa0, 0xe6, 0x5e, 0xae, - 0x27, 0x7c, 0xcc, 0x3e, 0xd0, 0x29, 0x18, 0x47, 0xe3, 0x7f, 0x84, 0xf1, 0xc5, 0xe9, 0x16, 0xe2, - 0xd8, 0xfd, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x20, 0xb0, 0xd3, 0xf8, 0x2c, 0x07, 0x00, 0x00, + // 779 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x4f, 0xdb, 0x48, + 0x14, 0x8e, 0x31, 0x44, 0xca, 0xcb, 0x0a, 0x2d, 0x56, 0x36, 0x18, 0x2f, 0x38, 0x21, 0xab, 0x5d, + 0x45, 0xec, 0xc6, 0xde, 0xc0, 0xfe, 0x90, 0xb2, 0x7b, 0xd9, 0xc0, 0xf6, 0x16, 0x09, 0x05, 0x4e, + 0x95, 0xaa, 0xc8, 0xb1, 0x47, 0x66, 0x44, 0x3c, 0xe3, 0x7a, 0x26, 0x14, 0x2a, 0x55, 0x42, 0x3d, + 0xf5, 0x58, 0xa9, 0xff, 0x00, 0xe7, 0x9e, 0x38, 0xf4, 0x8f, 0x40, 0x6a, 0x0f, 0xa8, 0xa7, 0x9e, + 0xda, 0x2a, 0x1c, 0xa8, 0xd4, 0x7f, 0xa2, 0x8a, 0x3d, 0x38, 0x89, 0xe2, 0x06, 0xd2, 0x96, 0x53, + 0x92, 0xf7, 0xbe, 0xf7, 0xbd, 0xf7, 0x7d, 0x7e, 0x33, 0x0e, 0x14, 0x6c, 0xca, 0x3c, 0xca, 0x4c, + 0x3f, 0xa0, 0x9c, 0xda, 0xb4, 0xe3, 0x53, 0xda, 0x31, 0x0f, 0xaa, 0x26, 0x3f, 0x34, 0xc2, 0x90, + 0x92, 0x8f, 0x00, 0xc6, 0x30, 0xc0, 0x38, 0xa8, 0x6a, 0x39, 0x97, 0xba, 0x34, 0x0c, 0x9a, 0xfd, + 0x6f, 0x51, 0x5e, 0xd3, 0x05, 0x5d, 0xdb, 0x62, 0xc8, 0x3c, 0xa8, 0xb6, 0x11, 0xb7, 0xaa, 0xa6, + 0x4d, 0x31, 0x11, 0xf9, 0xa5, 0x28, 0xdf, 0x8a, 0x0a, 0x87, 0xa9, 0xb5, 0x45, 0x51, 0xea, 0x31, + 0xb7, 0x3f, 0x80, 0xc7, 0xdc, 0x28, 0x51, 0x7a, 0x29, 0x41, 0xae, 0xc1, 0xdc, 0x3b, 0x5d, 0xe2, + 0x6c, 0x52, 0xcf, 0xeb, 0x12, 0xcc, 0x8f, 0xb6, 0x29, 0xed, 0x28, 0x36, 0xa4, 0x2d, 0x8f, 0x76, + 0x09, 0x57, 0xa5, 0xa2, 0x5c, 0xce, 0xae, 0x2f, 0x19, 0x82, 0xb0, 0xdf, 0xdd, 0x10, 0xdd, 0x8d, + 0x4d, 0x8a, 0x49, 0xfd, 0xf7, 0xb3, 0xb7, 0x85, 0xd4, 0xf3, 0x77, 0x85, 0xb2, 0x8b, 0xf9, 0x5e, + 0xb7, 0x6d, 0xd8, 0xd4, 0x13, 0xdd, 0xc5, 0x47, 0x85, 0x39, 0xfb, 0x26, 0x3f, 0xf2, 0x11, 0x0b, + 0x0b, 0x58, 0x53, 0x50, 0x2b, 0x7f, 0x41, 0xc6, 0x41, 0x3e, 0x65, 0x98, 0xd3, 0x40, 0x9d, 0x29, + 0x4a, 0xe5, 0x4c, 0x5d, 0x7d, 0xfd, 0xa2, 0x92, 0x13, 0xad, 0xfe, 0x73, 0x9c, 0x00, 0x31, 0xb6, + 0xc3, 0x03, 0x4c, 0xdc, 0xe6, 0x00, 0x5a, 0xcb, 0x3f, 0x39, 0x29, 0xa4, 0x3e, 0x9c, 0x14, 0x52, + 0x8f, 0x2f, 0x4f, 0xd7, 0x06, 0xf1, 0x92, 0x0e, 0xcb, 0x49, 0x62, 0x9a, 0x88, 0xf9, 0x94, 0x30, + 0x54, 0xea, 0x49, 0xf0, 0x43, 0x83, 0xb9, 0x23, 0xc9, 0x1d, 0x1f, 0x11, 0xa7, 0x3f, 0x89, 0xd5, + 0xe5, 0x7b, 0x34, 0xc0, 0xfc, 0x48, 0x95, 0xae, 0x9b, 0x24, 0x86, 0x2a, 0xcb, 0x90, 0x09, 0x90, + 0x8d, 0x7d, 0x8c, 0x08, 0x8f, 0x14, 0x34, 0x07, 0x81, 0x21, 0x13, 0xe5, 0x5b, 0x33, 0xb1, 0x36, + 0x1f, 0x9a, 0x10, 0x8f, 0x54, 0x2a, 0xc0, 0x4a, 0xa2, 0xc6, 0xd8, 0x85, 0x57, 0x33, 0xb0, 0xd8, + 0x60, 0xee, 0x4e, 0xb7, 0xed, 0x61, 0x5e, 0xef, 0x3a, 0x2e, 0xe2, 0xdb, 0x01, 0xf5, 0x29, 0xb3, + 0x3a, 0x5f, 0xec, 0xc3, 0xff, 0xb0, 0x10, 0xcb, 0x6e, 0x59, 0x11, 0xea, 0xda, 0x27, 0xfa, 0x7d, + 0x5c, 0x22, 0xe2, 0xca, 0xbf, 0xf0, 0x1d, 0xa7, 0xdc, 0xea, 0xb4, 0xda, 0xe1, 0x58, 0xaa, 0x5c, + 0x94, 0x26, 0xda, 0xd6, 0xcc, 0x86, 0xf0, 0x48, 0x84, 0xb2, 0x02, 0xc0, 0xb8, 0x15, 0xf0, 0x16, + 0xc7, 0x1e, 0x52, 0x67, 0x8b, 0x52, 0x59, 0x6e, 0x66, 0xc2, 0xc8, 0x2e, 0xf6, 0x90, 0x52, 0x01, + 0x25, 0x40, 0x9e, 0x85, 0x09, 0x26, 0x6e, 0x8b, 0x07, 0x16, 0xb1, 0xf7, 0x10, 0x53, 0xe7, 0x42, + 0xd8, 0x42, 0x9c, 0xd9, 0x15, 0x09, 0x25, 0x0f, 0x69, 0x1f, 0x05, 0x98, 0x3a, 0x6a, 0x3a, 0x84, + 0x88, 0x5f, 0x63, 0x7e, 0xaf, 0x42, 0xe1, 0x33, 0x6e, 0xc6, 0x8e, 0x53, 0x98, 0xef, 0x3f, 0x92, + 0x8e, 0x85, 0x3d, 0x31, 0x6a, 0xa2, 0x5f, 0xd2, 0xb4, 0x7e, 0xd5, 0xf2, 0xfd, 0x59, 0xc6, 0x99, + 0x4a, 0x8f, 0x20, 0x3f, 0xda, 0xf0, 0x6a, 0x94, 0x91, 0x73, 0x2d, 0xdd, 0xd2, 0x4a, 0x96, 0x9e, + 0xc9, 0xf0, 0xa3, 0x38, 0x88, 0x5b, 0x98, 0xf9, 0x88, 0x30, 0x8b, 0x63, 0x4a, 0xbe, 0x7a, 0xcb, + 0x6a, 0x90, 0x75, 0x10, 0xe3, 0x98, 0x84, 0x74, 0xd7, 0xee, 0xd7, 0x30, 0x58, 0xb9, 0x0f, 0xe0, + 0xa3, 0xc0, 0x46, 0x84, 0x5b, 0x2e, 0x12, 0x8b, 0xb5, 0x9c, 0x28, 0x7e, 0x0b, 0xd9, 0xa1, 0xfe, + 0x0d, 0xa1, 0xff, 0xd7, 0x1b, 0xe8, 0x17, 0x35, 0xac, 0x39, 0xd4, 0x44, 0xb9, 0x07, 0xb2, 0x6d, + 0xf9, 0xea, 0xec, 0xb7, 0x3f, 0xfb, 0x7d, 0x5e, 0x45, 0x07, 0x40, 0x87, 0x3e, 0x0e, 0x22, 0x33, + 0xa2, 0x3d, 0x1e, 0x8a, 0x8c, 0x2d, 0xea, 0xcf, 0xf0, 0xd3, 0x84, 0x87, 0x72, 0xb5, 0x21, 0xeb, + 0x1f, 0x65, 0x90, 0x1b, 0xcc, 0x55, 0x1e, 0xc0, 0xc2, 0xf8, 0x6b, 0xe1, 0x37, 0x23, 0xf9, 0x95, + 0x65, 0x24, 0xdd, 0xbb, 0xda, 0x1f, 0xd3, 0xa0, 0xe3, 0x15, 0x7d, 0x08, 0x4a, 0xc2, 0x0d, 0x5d, + 0x99, 0xc0, 0x35, 0x0e, 0xd7, 0xfe, 0x9c, 0x0a, 0x1e, 0xf7, 0x3e, 0x96, 0x20, 0x97, 0x78, 0x31, + 0x9a, 0x13, 0xf8, 0x92, 0x0a, 0xb4, 0xbf, 0xa7, 0x2c, 0x88, 0x47, 0x40, 0x90, 0x1d, 0xbe, 0x29, + 0x7e, 0x99, 0x24, 0x64, 0x80, 0xd3, 0x8c, 0x9b, 0xe1, 0xae, 0xda, 0x68, 0x73, 0xc7, 0x97, 0xa7, + 0x6b, 0x52, 0xfd, 0x9f, 0xb3, 0x9e, 0x2e, 0x9d, 0xf7, 0x74, 0xe9, 0x7d, 0x4f, 0x97, 0x9e, 0x5e, + 0xe8, 0xa9, 0xf3, 0x0b, 0x3d, 0xf5, 0xe6, 0x42, 0x4f, 0xdd, 0x5d, 0x8d, 0xf8, 0x98, 0xb3, 0x6f, + 0x60, 0x6a, 0x1e, 0x8e, 0xfe, 0x8b, 0x09, 0x97, 0xb1, 0x9d, 0x0e, 0x63, 0x1b, 0x9f, 0x02, 0x00, + 0x00, 0xff, 0xff, 0x82, 0x8c, 0x58, 0xc5, 0xe9, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -980,6 +1102,95 @@ func (m *MsgClaimBudgetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *MsgFundDispensationProposal) 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 *MsgFundDispensationProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgFundDispensationProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Expiration != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Expiration)) + i-- + dAtA[i] = 0x28 + } + if len(m.Cap) > 0 { + for iNdEx := len(m.Cap) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Cap[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + { + size, err := m.Percentage.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Destination) > 0 { + i -= len(m.Destination) + copy(dAtA[i:], m.Destination) + i = encodeVarintTx(dAtA, i, uint64(len(m.Destination))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgFundDispensationProposalResponse) 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 *MsgFundDispensationProposalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgFundDispensationProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -1114,6 +1325,43 @@ func (m *MsgClaimBudgetResponse) Size() (n int) { return n } +func (m *MsgFundDispensationProposal) 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 = len(m.Destination) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Percentage.Size() + n += 1 + l + sovTx(uint64(l)) + if len(m.Cap) > 0 { + for _, e := range m.Cap { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + if m.Expiration != 0 { + n += 1 + sovTx(uint64(m.Expiration)) + } + return n +} + +func (m *MsgFundDispensationProposalResponse) 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 } @@ -1906,6 +2154,256 @@ func (m *MsgClaimBudgetResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgFundDispensationProposal) 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: MsgFundDispensationProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgFundDispensationProposal: 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 Destination", 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.Destination = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Percentage", 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.Percentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cap", 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 + } + m.Cap = append(m.Cap, types.Coin{}) + if err := m.Cap[len(m.Cap)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) + } + m.Expiration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Expiration |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *MsgFundDispensationProposalResponse) 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: MsgFundDispensationProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgFundDispensationProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From dfcb89cec8cb27deb4d4fea3dd744b97be1183f4 Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Thu, 19 Oct 2023 09:38:02 +0000 Subject: [PATCH 31/69] update proto msg --- api/cosmos/protocolpool/v1/tx.pulsar.go | 225 ++++++++++++----------- api/cosmos/protocolpool/v1/tx_grpc.pb.go | 45 ++++- proto/cosmos/protocolpool/v1/tx.proto | 8 +- x/protocolpool/types/tx.pb.go | 165 ++++++++++------- 4 files changed, 265 insertions(+), 178 deletions(-) diff --git a/api/cosmos/protocolpool/v1/tx.pulsar.go b/api/cosmos/protocolpool/v1/tx.pulsar.go index e34e5a399f23..354678c4f7b4 100644 --- a/api/cosmos/protocolpool/v1/tx.pulsar.go +++ b/api/cosmos/protocolpool/v1/tx.pulsar.go @@ -3878,19 +3878,19 @@ func (x *_MsgFundDispensationProposal_4_list) IsValid() bool { } var ( - md_MsgFundDispensationProposal protoreflect.MessageDescriptor - fd_MsgFundDispensationProposal_authority protoreflect.FieldDescriptor - fd_MsgFundDispensationProposal_destination protoreflect.FieldDescriptor - fd_MsgFundDispensationProposal_percentage protoreflect.FieldDescriptor - fd_MsgFundDispensationProposal_cap protoreflect.FieldDescriptor - fd_MsgFundDispensationProposal_expiration protoreflect.FieldDescriptor + md_MsgFundDispensationProposal protoreflect.MessageDescriptor + fd_MsgFundDispensationProposal_authority protoreflect.FieldDescriptor + fd_MsgFundDispensationProposal_recipient_address protoreflect.FieldDescriptor + fd_MsgFundDispensationProposal_percentage protoreflect.FieldDescriptor + fd_MsgFundDispensationProposal_cap protoreflect.FieldDescriptor + fd_MsgFundDispensationProposal_expiration protoreflect.FieldDescriptor ) func init() { file_cosmos_protocolpool_v1_tx_proto_init() md_MsgFundDispensationProposal = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgFundDispensationProposal") fd_MsgFundDispensationProposal_authority = md_MsgFundDispensationProposal.Fields().ByName("authority") - fd_MsgFundDispensationProposal_destination = md_MsgFundDispensationProposal.Fields().ByName("destination") + fd_MsgFundDispensationProposal_recipient_address = md_MsgFundDispensationProposal.Fields().ByName("recipient_address") fd_MsgFundDispensationProposal_percentage = md_MsgFundDispensationProposal.Fields().ByName("percentage") fd_MsgFundDispensationProposal_cap = md_MsgFundDispensationProposal.Fields().ByName("cap") fd_MsgFundDispensationProposal_expiration = md_MsgFundDispensationProposal.Fields().ByName("expiration") @@ -3967,9 +3967,9 @@ func (x *fastReflection_MsgFundDispensationProposal) Range(f func(protoreflect.F return } } - if x.Destination != "" { - value := protoreflect.ValueOfString(x.Destination) - if !f(fd_MsgFundDispensationProposal_destination, value) { + if x.RecipientAddress != "" { + value := protoreflect.ValueOfString(x.RecipientAddress) + if !f(fd_MsgFundDispensationProposal_recipient_address, value) { return } } @@ -4008,8 +4008,8 @@ func (x *fastReflection_MsgFundDispensationProposal) Has(fd protoreflect.FieldDe switch fd.FullName() { case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": return x.Authority != "" - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": - return x.Destination != "" + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.recipient_address": + return x.RecipientAddress != "" case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": return x.Percentage != nil case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": @@ -4034,8 +4034,8 @@ func (x *fastReflection_MsgFundDispensationProposal) Clear(fd protoreflect.Field switch fd.FullName() { case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": x.Authority = "" - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": - x.Destination = "" + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.recipient_address": + x.RecipientAddress = "" case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": x.Percentage = nil case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": @@ -4061,8 +4061,8 @@ func (x *fastReflection_MsgFundDispensationProposal) Get(descriptor protoreflect case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": value := x.Authority return protoreflect.ValueOfString(value) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": - value := x.Destination + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.recipient_address": + value := x.RecipientAddress return protoreflect.ValueOfString(value) case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": value := x.Percentage @@ -4098,8 +4098,8 @@ func (x *fastReflection_MsgFundDispensationProposal) Set(fd protoreflect.FieldDe switch fd.FullName() { case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": x.Authority = value.Interface().(string) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": - x.Destination = value.Interface().(string) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.recipient_address": + x.RecipientAddress = value.Interface().(string) case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": x.Percentage = value.Message().Interface().(*v1beta1.DecCoin) case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": @@ -4141,8 +4141,8 @@ func (x *fastReflection_MsgFundDispensationProposal) Mutable(fd protoreflect.Fie return protoreflect.ValueOfList(value) case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": panic(fmt.Errorf("field authority of message cosmos.protocolpool.v1.MsgFundDispensationProposal is not mutable")) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": - panic(fmt.Errorf("field destination of message cosmos.protocolpool.v1.MsgFundDispensationProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.recipient_address": + panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.MsgFundDispensationProposal is not mutable")) case "cosmos.protocolpool.v1.MsgFundDispensationProposal.expiration": panic(fmt.Errorf("field expiration of message cosmos.protocolpool.v1.MsgFundDispensationProposal is not mutable")) default: @@ -4160,7 +4160,7 @@ func (x *fastReflection_MsgFundDispensationProposal) NewField(fd protoreflect.Fi switch fd.FullName() { case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": return protoreflect.ValueOfString("") - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.recipient_address": return protoreflect.ValueOfString("") case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": m := new(v1beta1.DecCoin) @@ -4243,7 +4243,7 @@ func (x *fastReflection_MsgFundDispensationProposal) ProtoMethods() *protoiface. if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Destination) + l = len(x.RecipientAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -4324,10 +4324,10 @@ func (x *fastReflection_MsgFundDispensationProposal) ProtoMethods() *protoiface. i-- dAtA[i] = 0x1a } - if len(x.Destination) > 0 { - i -= len(x.Destination) - copy(dAtA[i:], x.Destination) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Destination))) + 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 } @@ -4421,7 +4421,7 @@ func (x *fastReflection_MsgFundDispensationProposal) ProtoMethods() *protoiface. iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType) + 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 { @@ -4449,7 +4449,7 @@ func (x *fastReflection_MsgFundDispensationProposal) ProtoMethods() *protoiface. if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Destination = string(dAtA[iNdEx:postIndex]) + x.RecipientAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -5283,11 +5283,11 @@ type MsgFundDispensationProposal struct { 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"` - Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` - Percentage *v1beta1.DecCoin `protobuf:"bytes,3,opt,name=percentage,proto3" json:"percentage,omitempty"` - Cap []*v1beta1.Coin `protobuf:"bytes,4,rep,name=cap,proto3" json:"cap,omitempty"` - Expiration int64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` + Percentage *v1beta1.DecCoin `protobuf:"bytes,3,opt,name=percentage,proto3" json:"percentage,omitempty"` + Cap []*v1beta1.Coin `protobuf:"bytes,4,rep,name=cap,proto3" json:"cap,omitempty"` + Expiration int64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` } func (x *MsgFundDispensationProposal) Reset() { @@ -5317,9 +5317,9 @@ func (x *MsgFundDispensationProposal) GetAuthority() string { return "" } -func (x *MsgFundDispensationProposal) GetDestination() string { +func (x *MsgFundDispensationProposal) GetRecipientAddress() string { if x != nil { - return x.Destination + return x.RecipientAddress } return "" } @@ -5453,80 +5453,89 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 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, 0x93, 0x03, 0x0a, 0x1b, 0x4d, 0x73, + 0x73, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9e, 0x03, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x3a, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 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, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x71, 0x0a, - 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, - 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 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, 0x44, 0x65, 0x63, 0x43, - 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, - 0x12, 0x5d, 0x0a, 0x03, 0x63, 0x61, 0x70, 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, 0x03, 0x63, 0x61, 0x70, 0x12, - 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, - 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, - 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x65, 0x6e, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xeb, 0x03, 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, + 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, 0x71, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, + 0xaa, 0xdf, 0x1f, 0x2b, 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, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, + 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x5d, 0x0a, 0x03, 0x63, + 0x61, 0x70, 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, 0x03, 0x63, 0x61, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, + 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x73, + 0x67, 0x46, 0x75, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x32, 0xfa, 0x04, 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, 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, + 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, 0x8c, 0x01, 0x0a, 0x18, 0x46, 0x75, 0x6e, + 0x64, 0x44, 0x69, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x33, 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, 0x1a, 0x05, 0x80, - 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd7, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, + 0x73, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x3b, 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, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x65, + 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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 ( @@ -5567,12 +5576,14 @@ var file_cosmos_protocolpool_v1_tx_proto_depIdxs = []int32{ 2, // 7: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:input_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpend 4, // 8: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:input_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposal 6, // 9: cosmos.protocolpool.v1.Msg.ClaimBudget:input_type -> cosmos.protocolpool.v1.MsgClaimBudget - 1, // 10: cosmos.protocolpool.v1.Msg.FundCommunityPool:output_type -> cosmos.protocolpool.v1.MsgFundCommunityPoolResponse - 3, // 11: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:output_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse - 5, // 12: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:output_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse - 7, // 13: cosmos.protocolpool.v1.Msg.ClaimBudget:output_type -> cosmos.protocolpool.v1.MsgClaimBudgetResponse - 10, // [10:14] is the sub-list for method output_type - 6, // [6:10] is the sub-list for method input_type + 8, // 10: cosmos.protocolpool.v1.Msg.FundDispensationProposal:input_type -> cosmos.protocolpool.v1.MsgFundDispensationProposal + 1, // 11: cosmos.protocolpool.v1.Msg.FundCommunityPool:output_type -> cosmos.protocolpool.v1.MsgFundCommunityPoolResponse + 3, // 12: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:output_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse + 5, // 13: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:output_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse + 7, // 14: cosmos.protocolpool.v1.Msg.ClaimBudget:output_type -> cosmos.protocolpool.v1.MsgClaimBudgetResponse + 9, // 15: cosmos.protocolpool.v1.Msg.FundDispensationProposal:output_type -> cosmos.protocolpool.v1.MsgFundDispensationProposalResponse + 11, // [11:16] is the sub-list for method output_type + 6, // [6:11] 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 diff --git a/api/cosmos/protocolpool/v1/tx_grpc.pb.go b/api/cosmos/protocolpool/v1/tx_grpc.pb.go index 38ab855506b2..b63e3511036f 100644 --- a/api/cosmos/protocolpool/v1/tx_grpc.pb.go +++ b/api/cosmos/protocolpool/v1/tx_grpc.pb.go @@ -19,10 +19,11 @@ import ( const _ = grpc.SupportPackageIsVersion7 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_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_FundDispensationProposal_FullMethodName = "/cosmos.protocolpool.v1.Msg/FundDispensationProposal" ) // MsgClient is the client API for Msg service. @@ -41,6 +42,7 @@ type MsgClient interface { 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) + FundDispensationProposal(ctx context.Context, in *MsgFundDispensationProposal, opts ...grpc.CallOption) (*MsgFundDispensationProposalResponse, error) } type msgClient struct { @@ -87,6 +89,15 @@ func (c *msgClient) ClaimBudget(ctx context.Context, in *MsgClaimBudget, opts .. return out, nil } +func (c *msgClient) FundDispensationProposal(ctx context.Context, in *MsgFundDispensationProposal, opts ...grpc.CallOption) (*MsgFundDispensationProposalResponse, error) { + out := new(MsgFundDispensationProposalResponse) + err := c.cc.Invoke(ctx, Msg_FundDispensationProposal_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -103,6 +114,7 @@ type MsgServer interface { SubmitBudgetProposal(context.Context, *MsgSubmitBudgetProposal) (*MsgSubmitBudgetProposalResponse, error) // ClaimBudget defines a method to claim the distributed budget. ClaimBudget(context.Context, *MsgClaimBudget) (*MsgClaimBudgetResponse, error) + FundDispensationProposal(context.Context, *MsgFundDispensationProposal) (*MsgFundDispensationProposalResponse, error) mustEmbedUnimplementedMsgServer() } @@ -122,6 +134,9 @@ func (UnimplementedMsgServer) SubmitBudgetProposal(context.Context, *MsgSubmitBu func (UnimplementedMsgServer) ClaimBudget(context.Context, *MsgClaimBudget) (*MsgClaimBudgetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClaimBudget not implemented") } +func (UnimplementedMsgServer) FundDispensationProposal(context.Context, *MsgFundDispensationProposal) (*MsgFundDispensationProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FundDispensationProposal not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -207,6 +222,24 @@ func _Msg_ClaimBudget_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Msg_FundDispensationProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgFundDispensationProposal) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).FundDispensationProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_FundDispensationProposal_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).FundDispensationProposal(ctx, req.(*MsgFundDispensationProposal)) + } + 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) @@ -230,6 +263,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "ClaimBudget", Handler: _Msg_ClaimBudget_Handler, }, + { + MethodName: "FundDispensationProposal", + Handler: _Msg_FundDispensationProposal_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/protocolpool/v1/tx.proto", diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index 7b6eee4a9ca6..d74b809cc365 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -27,6 +27,8 @@ service Msg { // ClaimBudget defines a method to claim the distributed budget. rpc ClaimBudget(MsgClaimBudget) returns (MsgClaimBudgetResponse); + + rpc FundDispensationProposal(MsgFundDispensationProposal) returns (MsgFundDispensationProposalResponse); } // MsgFundCommunityPool allows an account to directly @@ -96,9 +98,9 @@ message MsgFundDispensationProposal { 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"]; - string destination = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - cosmos.base.v1beta1.DecCoin percentage = 3 + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + cosmos.base.v1beta1.DecCoin percentage = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; repeated cosmos.base.v1beta1.Coin cap = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; diff --git a/x/protocolpool/types/tx.pb.go b/x/protocolpool/types/tx.pb.go index 5e1c628f9a52..e62bf4df914f 100644 --- a/x/protocolpool/types/tx.pb.go +++ b/x/protocolpool/types/tx.pb.go @@ -428,11 +428,11 @@ func (m *MsgClaimBudgetResponse) GetAmount() types.Coin { type MsgFundDispensationProposal 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"` - Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` - Percentage types.DecCoin `protobuf:"bytes,3,opt,name=percentage,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"percentage"` - Cap github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=cap,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"cap"` - Expiration int64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` + Percentage types.DecCoin `protobuf:"bytes,3,opt,name=percentage,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"percentage"` + Cap github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=cap,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"cap"` + Expiration int64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` } func (m *MsgFundDispensationProposal) Reset() { *m = MsgFundDispensationProposal{} } @@ -475,9 +475,9 @@ func (m *MsgFundDispensationProposal) GetAuthority() string { return "" } -func (m *MsgFundDispensationProposal) GetDestination() string { +func (m *MsgFundDispensationProposal) GetRecipientAddress() string { if m != nil { - return m.Destination + return m.RecipientAddress } return "" } @@ -555,56 +555,57 @@ func init() { func init() { proto.RegisterFile("cosmos/protocolpool/v1/tx.proto", fileDescriptor_09efe14517e7f6dc) } var fileDescriptor_09efe14517e7f6dc = []byte{ - // 779 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x4f, 0xdb, 0x48, - 0x14, 0x8e, 0x31, 0x44, 0xca, 0xcb, 0x0a, 0x2d, 0x56, 0x36, 0x18, 0x2f, 0x38, 0x21, 0xab, 0x5d, - 0x45, 0xec, 0xc6, 0xde, 0xc0, 0xfe, 0x90, 0xb2, 0x7b, 0xd9, 0xc0, 0xf6, 0x16, 0x09, 0x05, 0x4e, - 0x95, 0xaa, 0xc8, 0xb1, 0x47, 0x66, 0x44, 0x3c, 0xe3, 0x7a, 0x26, 0x14, 0x2a, 0x55, 0x42, 0x3d, - 0xf5, 0x58, 0xa9, 0xff, 0x00, 0xe7, 0x9e, 0x38, 0xf4, 0x8f, 0x40, 0x6a, 0x0f, 0xa8, 0xa7, 0x9e, - 0xda, 0x2a, 0x1c, 0xa8, 0xd4, 0x7f, 0xa2, 0x8a, 0x3d, 0x38, 0x89, 0xe2, 0x06, 0xd2, 0x96, 0x53, - 0x92, 0xf7, 0xbe, 0xf7, 0xbd, 0xf7, 0x7d, 0x7e, 0x33, 0x0e, 0x14, 0x6c, 0xca, 0x3c, 0xca, 0x4c, - 0x3f, 0xa0, 0x9c, 0xda, 0xb4, 0xe3, 0x53, 0xda, 0x31, 0x0f, 0xaa, 0x26, 0x3f, 0x34, 0xc2, 0x90, - 0x92, 0x8f, 0x00, 0xc6, 0x30, 0xc0, 0x38, 0xa8, 0x6a, 0x39, 0x97, 0xba, 0x34, 0x0c, 0x9a, 0xfd, - 0x6f, 0x51, 0x5e, 0xd3, 0x05, 0x5d, 0xdb, 0x62, 0xc8, 0x3c, 0xa8, 0xb6, 0x11, 0xb7, 0xaa, 0xa6, - 0x4d, 0x31, 0x11, 0xf9, 0xa5, 0x28, 0xdf, 0x8a, 0x0a, 0x87, 0xa9, 0xb5, 0x45, 0x51, 0xea, 0x31, - 0xb7, 0x3f, 0x80, 0xc7, 0xdc, 0x28, 0x51, 0x7a, 0x29, 0x41, 0xae, 0xc1, 0xdc, 0x3b, 0x5d, 0xe2, - 0x6c, 0x52, 0xcf, 0xeb, 0x12, 0xcc, 0x8f, 0xb6, 0x29, 0xed, 0x28, 0x36, 0xa4, 0x2d, 0x8f, 0x76, - 0x09, 0x57, 0xa5, 0xa2, 0x5c, 0xce, 0xae, 0x2f, 0x19, 0x82, 0xb0, 0xdf, 0xdd, 0x10, 0xdd, 0x8d, - 0x4d, 0x8a, 0x49, 0xfd, 0xf7, 0xb3, 0xb7, 0x85, 0xd4, 0xf3, 0x77, 0x85, 0xb2, 0x8b, 0xf9, 0x5e, - 0xb7, 0x6d, 0xd8, 0xd4, 0x13, 0xdd, 0xc5, 0x47, 0x85, 0x39, 0xfb, 0x26, 0x3f, 0xf2, 0x11, 0x0b, - 0x0b, 0x58, 0x53, 0x50, 0x2b, 0x7f, 0x41, 0xc6, 0x41, 0x3e, 0x65, 0x98, 0xd3, 0x40, 0x9d, 0x29, - 0x4a, 0xe5, 0x4c, 0x5d, 0x7d, 0xfd, 0xa2, 0x92, 0x13, 0xad, 0xfe, 0x73, 0x9c, 0x00, 0x31, 0xb6, - 0xc3, 0x03, 0x4c, 0xdc, 0xe6, 0x00, 0x5a, 0xcb, 0x3f, 0x39, 0x29, 0xa4, 0x3e, 0x9c, 0x14, 0x52, - 0x8f, 0x2f, 0x4f, 0xd7, 0x06, 0xf1, 0x92, 0x0e, 0xcb, 0x49, 0x62, 0x9a, 0x88, 0xf9, 0x94, 0x30, - 0x54, 0xea, 0x49, 0xf0, 0x43, 0x83, 0xb9, 0x23, 0xc9, 0x1d, 0x1f, 0x11, 0xa7, 0x3f, 0x89, 0xd5, - 0xe5, 0x7b, 0x34, 0xc0, 0xfc, 0x48, 0x95, 0xae, 0x9b, 0x24, 0x86, 0x2a, 0xcb, 0x90, 0x09, 0x90, - 0x8d, 0x7d, 0x8c, 0x08, 0x8f, 0x14, 0x34, 0x07, 0x81, 0x21, 0x13, 0xe5, 0x5b, 0x33, 0xb1, 0x36, - 0x1f, 0x9a, 0x10, 0x8f, 0x54, 0x2a, 0xc0, 0x4a, 0xa2, 0xc6, 0xd8, 0x85, 0x57, 0x33, 0xb0, 0xd8, - 0x60, 0xee, 0x4e, 0xb7, 0xed, 0x61, 0x5e, 0xef, 0x3a, 0x2e, 0xe2, 0xdb, 0x01, 0xf5, 0x29, 0xb3, - 0x3a, 0x5f, 0xec, 0xc3, 0xff, 0xb0, 0x10, 0xcb, 0x6e, 0x59, 0x11, 0xea, 0xda, 0x27, 0xfa, 0x7d, - 0x5c, 0x22, 0xe2, 0xca, 0xbf, 0xf0, 0x1d, 0xa7, 0xdc, 0xea, 0xb4, 0xda, 0xe1, 0x58, 0xaa, 0x5c, - 0x94, 0x26, 0xda, 0xd6, 0xcc, 0x86, 0xf0, 0x48, 0x84, 0xb2, 0x02, 0xc0, 0xb8, 0x15, 0xf0, 0x16, - 0xc7, 0x1e, 0x52, 0x67, 0x8b, 0x52, 0x59, 0x6e, 0x66, 0xc2, 0xc8, 0x2e, 0xf6, 0x90, 0x52, 0x01, - 0x25, 0x40, 0x9e, 0x85, 0x09, 0x26, 0x6e, 0x8b, 0x07, 0x16, 0xb1, 0xf7, 0x10, 0x53, 0xe7, 0x42, - 0xd8, 0x42, 0x9c, 0xd9, 0x15, 0x09, 0x25, 0x0f, 0x69, 0x1f, 0x05, 0x98, 0x3a, 0x6a, 0x3a, 0x84, - 0x88, 0x5f, 0x63, 0x7e, 0xaf, 0x42, 0xe1, 0x33, 0x6e, 0xc6, 0x8e, 0x53, 0x98, 0xef, 0x3f, 0x92, - 0x8e, 0x85, 0x3d, 0x31, 0x6a, 0xa2, 0x5f, 0xd2, 0xb4, 0x7e, 0xd5, 0xf2, 0xfd, 0x59, 0xc6, 0x99, - 0x4a, 0x8f, 0x20, 0x3f, 0xda, 0xf0, 0x6a, 0x94, 0x91, 0x73, 0x2d, 0xdd, 0xd2, 0x4a, 0x96, 0x9e, - 0xc9, 0xf0, 0xa3, 0x38, 0x88, 0x5b, 0x98, 0xf9, 0x88, 0x30, 0x8b, 0x63, 0x4a, 0xbe, 0x7a, 0xcb, - 0x6a, 0x90, 0x75, 0x10, 0xe3, 0x98, 0x84, 0x74, 0xd7, 0xee, 0xd7, 0x30, 0x58, 0xb9, 0x0f, 0xe0, - 0xa3, 0xc0, 0x46, 0x84, 0x5b, 0x2e, 0x12, 0x8b, 0xb5, 0x9c, 0x28, 0x7e, 0x0b, 0xd9, 0xa1, 0xfe, - 0x0d, 0xa1, 0xff, 0xd7, 0x1b, 0xe8, 0x17, 0x35, 0xac, 0x39, 0xd4, 0x44, 0xb9, 0x07, 0xb2, 0x6d, - 0xf9, 0xea, 0xec, 0xb7, 0x3f, 0xfb, 0x7d, 0x5e, 0x45, 0x07, 0x40, 0x87, 0x3e, 0x0e, 0x22, 0x33, - 0xa2, 0x3d, 0x1e, 0x8a, 0x8c, 0x2d, 0xea, 0xcf, 0xf0, 0xd3, 0x84, 0x87, 0x72, 0xb5, 0x21, 0xeb, - 0x1f, 0x65, 0x90, 0x1b, 0xcc, 0x55, 0x1e, 0xc0, 0xc2, 0xf8, 0x6b, 0xe1, 0x37, 0x23, 0xf9, 0x95, - 0x65, 0x24, 0xdd, 0xbb, 0xda, 0x1f, 0xd3, 0xa0, 0xe3, 0x15, 0x7d, 0x08, 0x4a, 0xc2, 0x0d, 0x5d, - 0x99, 0xc0, 0x35, 0x0e, 0xd7, 0xfe, 0x9c, 0x0a, 0x1e, 0xf7, 0x3e, 0x96, 0x20, 0x97, 0x78, 0x31, - 0x9a, 0x13, 0xf8, 0x92, 0x0a, 0xb4, 0xbf, 0xa7, 0x2c, 0x88, 0x47, 0x40, 0x90, 0x1d, 0xbe, 0x29, - 0x7e, 0x99, 0x24, 0x64, 0x80, 0xd3, 0x8c, 0x9b, 0xe1, 0xae, 0xda, 0x68, 0x73, 0xc7, 0x97, 0xa7, - 0x6b, 0x52, 0xfd, 0x9f, 0xb3, 0x9e, 0x2e, 0x9d, 0xf7, 0x74, 0xe9, 0x7d, 0x4f, 0x97, 0x9e, 0x5e, - 0xe8, 0xa9, 0xf3, 0x0b, 0x3d, 0xf5, 0xe6, 0x42, 0x4f, 0xdd, 0x5d, 0x8d, 0xf8, 0x98, 0xb3, 0x6f, - 0x60, 0x6a, 0x1e, 0x8e, 0xfe, 0x8b, 0x09, 0x97, 0xb1, 0x9d, 0x0e, 0x63, 0x1b, 0x9f, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x82, 0x8c, 0x58, 0xc5, 0xe9, 0x08, 0x00, 0x00, + // 785 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x4f, 0xdb, 0x48, + 0x14, 0x8f, 0x09, 0x44, 0xca, 0x63, 0x85, 0x16, 0x2b, 0x1b, 0x8c, 0x17, 0x9c, 0x90, 0xd5, 0xae, + 0x22, 0x76, 0x63, 0x6f, 0xa0, 0x7f, 0x24, 0xe8, 0xa5, 0x81, 0xf6, 0x16, 0x09, 0x05, 0x4e, 0x95, + 0xaa, 0xc8, 0xb1, 0x47, 0x66, 0x44, 0x3c, 0xe3, 0x7a, 0x26, 0x14, 0x2a, 0x55, 0x42, 0x3d, 0xf5, + 0xd0, 0x43, 0x3f, 0x41, 0xc5, 0xb9, 0x27, 0x0e, 0xfd, 0x10, 0x48, 0xed, 0x01, 0xf5, 0xd4, 0x53, + 0x5b, 0x85, 0x03, 0xfd, 0x0c, 0x3d, 0x55, 0xb1, 0x07, 0x27, 0x51, 0x4c, 0x20, 0xa8, 0x48, 0x3d, + 0x25, 0x79, 0xef, 0xf7, 0xde, 0xfb, 0xbd, 0xdf, 0xbc, 0x79, 0x13, 0xc8, 0x59, 0x94, 0xb9, 0x94, + 0x19, 0x9e, 0x4f, 0x39, 0xb5, 0x68, 0xd3, 0xa3, 0xb4, 0x69, 0xec, 0x96, 0x0d, 0xbe, 0xa7, 0x07, + 0x26, 0x39, 0x1b, 0x02, 0xf4, 0x5e, 0x80, 0xbe, 0x5b, 0x56, 0x33, 0x0e, 0x75, 0x68, 0x60, 0x34, + 0x3a, 0xdf, 0x42, 0xbf, 0xaa, 0x89, 0x74, 0x0d, 0x93, 0x21, 0x63, 0xb7, 0xdc, 0x40, 0xdc, 0x2c, + 0x1b, 0x16, 0xc5, 0x44, 0xf8, 0x67, 0x43, 0x7f, 0x3d, 0x0c, 0xec, 0x4d, 0xad, 0xce, 0x88, 0x50, + 0x97, 0x39, 0x1d, 0x02, 0x2e, 0x73, 0x42, 0x47, 0xe1, 0xbd, 0x04, 0x99, 0x2a, 0x73, 0x1e, 0xb6, + 0x88, 0xbd, 0x46, 0x5d, 0xb7, 0x45, 0x30, 0xdf, 0xdf, 0xa0, 0xb4, 0x29, 0x5b, 0x90, 0x32, 0x5d, + 0xda, 0x22, 0x5c, 0x91, 0xf2, 0xc9, 0xe2, 0xe4, 0xd2, 0xac, 0x2e, 0x12, 0x76, 0xaa, 0xeb, 0xa2, + 0xba, 0xbe, 0x46, 0x31, 0xa9, 0xfc, 0x7f, 0xfc, 0x39, 0x97, 0x78, 0xfb, 0x25, 0x57, 0x74, 0x30, + 0xdf, 0x6e, 0x35, 0x74, 0x8b, 0xba, 0xa2, 0xba, 0xf8, 0x28, 0x31, 0x7b, 0xc7, 0xe0, 0xfb, 0x1e, + 0x62, 0x41, 0x00, 0xab, 0x89, 0xd4, 0xf2, 0x1d, 0x48, 0xdb, 0xc8, 0xa3, 0x0c, 0x73, 0xea, 0x2b, + 0x63, 0x79, 0xa9, 0x98, 0xae, 0x28, 0x1f, 0xdf, 0x95, 0x32, 0xa2, 0xd4, 0x7d, 0xdb, 0xf6, 0x11, + 0x63, 0x9b, 0xdc, 0xc7, 0xc4, 0xa9, 0x75, 0xa1, 0x2b, 0xd9, 0x97, 0x87, 0xb9, 0xc4, 0xb7, 0xc3, + 0x5c, 0xe2, 0xc5, 0xd9, 0xd1, 0x62, 0xd7, 0x5e, 0xd0, 0x60, 0x2e, 0xae, 0x99, 0x1a, 0x62, 0x1e, + 0x25, 0x0c, 0x15, 0xda, 0x12, 0xfc, 0x51, 0x65, 0x4e, 0x9f, 0x73, 0xd3, 0x43, 0xc4, 0xee, 0x30, + 0x31, 0x5b, 0x7c, 0x9b, 0xfa, 0x98, 0xef, 0x2b, 0xd2, 0x65, 0x4c, 0x22, 0xa8, 0x3c, 0x07, 0x69, + 0x1f, 0x59, 0xd8, 0xc3, 0x88, 0xf0, 0xb0, 0x83, 0x5a, 0xd7, 0xd0, 0x23, 0x62, 0xf2, 0xc6, 0x44, + 0x5c, 0x99, 0x0a, 0x44, 0x88, 0x28, 0x15, 0x72, 0x30, 0x1f, 0xdb, 0x63, 0xa4, 0xc2, 0x87, 0x31, + 0x98, 0xa9, 0x32, 0x67, 0xb3, 0xd5, 0x70, 0x31, 0xaf, 0xb4, 0x6c, 0x07, 0xf1, 0x0d, 0x9f, 0x7a, + 0x94, 0x99, 0xcd, 0x6b, 0xeb, 0xf0, 0x00, 0xa6, 0xa3, 0xb6, 0xeb, 0x66, 0x88, 0xba, 0xf4, 0x44, + 0x7f, 0x8f, 0x42, 0x84, 0x5d, 0xbe, 0x07, 0xbf, 0x71, 0xca, 0xcd, 0x66, 0xbd, 0x11, 0xd0, 0x52, + 0x92, 0x79, 0x69, 0xa8, 0x6c, 0xb5, 0xc9, 0x00, 0x1e, 0x36, 0x21, 0xcf, 0x03, 0x30, 0x6e, 0xfa, + 0xbc, 0xce, 0xb1, 0x8b, 0x94, 0xf1, 0xbc, 0x54, 0x4c, 0xd6, 0xd2, 0x81, 0x65, 0x0b, 0xbb, 0x48, + 0x2e, 0x81, 0xec, 0x23, 0xd7, 0xc4, 0x04, 0x13, 0xa7, 0xce, 0x7d, 0x93, 0x58, 0xdb, 0x88, 0x29, + 0x13, 0x01, 0x6c, 0x3a, 0xf2, 0x6c, 0x09, 0x87, 0x9c, 0x85, 0x94, 0x87, 0x7c, 0x4c, 0x6d, 0x25, + 0x15, 0x40, 0xc4, 0xaf, 0x01, 0xbd, 0x17, 0x20, 0x77, 0x81, 0x9a, 0x91, 0xe2, 0x14, 0xa6, 0x3a, + 0x47, 0xd2, 0x34, 0xb1, 0x2b, 0xa8, 0xc6, 0xea, 0x25, 0x8d, 0xaa, 0xd7, 0x4a, 0xb6, 0xc3, 0x65, + 0x30, 0x53, 0xe1, 0x39, 0x64, 0xfb, 0x0b, 0x9e, 0x53, 0xe9, 0xbb, 0xd7, 0xd2, 0x0d, 0x8d, 0x64, + 0xe1, 0x4d, 0x12, 0xfe, 0x14, 0x17, 0x71, 0x1d, 0x33, 0x0f, 0x11, 0x66, 0x72, 0x4c, 0xc9, 0xaf, + 0x32, 0x65, 0x4f, 0x00, 0x3c, 0xe4, 0x5b, 0x88, 0x70, 0xd3, 0x41, 0x62, 0xc6, 0xe6, 0x62, 0x75, + 0x58, 0x47, 0x56, 0x20, 0xc5, 0xb2, 0x90, 0xe2, 0xdf, 0x2b, 0x48, 0x21, 0x62, 0x58, 0xad, 0xa7, + 0x88, 0xfc, 0x18, 0x92, 0x96, 0xe9, 0x29, 0xe3, 0x3f, 0x7f, 0x0d, 0x74, 0xf2, 0xca, 0x1a, 0x00, + 0xda, 0xf3, 0xb0, 0x1f, 0xc8, 0x2c, 0x46, 0xba, 0xc7, 0x32, 0x30, 0xb3, 0x7f, 0xc3, 0x5f, 0x43, + 0xce, 0xe7, 0x7c, 0x58, 0x96, 0xbe, 0x8f, 0x43, 0xb2, 0xca, 0x1c, 0xf9, 0x29, 0x4c, 0x0f, 0xbe, + 0x10, 0xff, 0xe9, 0xf1, 0xaf, 0x97, 0x1e, 0xb7, 0x82, 0xd5, 0x5b, 0xa3, 0xa0, 0xa3, 0x69, 0x7d, + 0x06, 0x72, 0xcc, 0xb2, 0x2e, 0x0d, 0xc9, 0x35, 0x08, 0x57, 0x6f, 0x8f, 0x04, 0x8f, 0x6a, 0x1f, + 0x48, 0x90, 0x89, 0xdd, 0x91, 0xc6, 0x90, 0x7c, 0x71, 0x01, 0xea, 0xdd, 0x11, 0x03, 0x22, 0x0a, + 0x08, 0x26, 0x7b, 0x97, 0xc6, 0x3f, 0xc3, 0x1a, 0xe9, 0xe2, 0x54, 0xfd, 0x6a, 0xb8, 0xa8, 0xcc, + 0x2b, 0x09, 0x94, 0x0b, 0xef, 0xea, 0xf2, 0x25, 0x07, 0x17, 0x17, 0xa4, 0xae, 0x5e, 0x23, 0xe8, + 0x9c, 0x8e, 0x3a, 0x71, 0x70, 0x76, 0xb4, 0x28, 0x55, 0x56, 0x8f, 0xdb, 0x9a, 0x74, 0xd2, 0xd6, + 0xa4, 0xaf, 0x6d, 0x4d, 0x7a, 0x7d, 0xaa, 0x25, 0x4e, 0x4e, 0xb5, 0xc4, 0xa7, 0x53, 0x2d, 0xf1, + 0x68, 0x21, 0x4c, 0xce, 0xec, 0x1d, 0x1d, 0x53, 0x63, 0xaf, 0xff, 0xff, 0x55, 0x70, 0x37, 0x1a, + 0xa9, 0xc0, 0xb6, 0xfc, 0x23, 0x00, 0x00, 0xff, 0xff, 0x57, 0xaa, 0x23, 0x2e, 0x83, 0x09, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -631,6 +632,7 @@ type MsgClient interface { 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) + FundDispensationProposal(ctx context.Context, in *MsgFundDispensationProposal, opts ...grpc.CallOption) (*MsgFundDispensationProposalResponse, error) } type msgClient struct { @@ -677,6 +679,15 @@ func (c *msgClient) ClaimBudget(ctx context.Context, in *MsgClaimBudget, opts .. return out, nil } +func (c *msgClient) FundDispensationProposal(ctx context.Context, in *MsgFundDispensationProposal, opts ...grpc.CallOption) (*MsgFundDispensationProposalResponse, error) { + out := new(MsgFundDispensationProposalResponse) + err := c.cc.Invoke(ctx, "/cosmos.protocolpool.v1.Msg/FundDispensationProposal", 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 @@ -691,6 +702,7 @@ type MsgServer interface { SubmitBudgetProposal(context.Context, *MsgSubmitBudgetProposal) (*MsgSubmitBudgetProposalResponse, error) // ClaimBudget defines a method to claim the distributed budget. ClaimBudget(context.Context, *MsgClaimBudget) (*MsgClaimBudgetResponse, error) + FundDispensationProposal(context.Context, *MsgFundDispensationProposal) (*MsgFundDispensationProposalResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -709,6 +721,9 @@ func (*UnimplementedMsgServer) SubmitBudgetProposal(ctx context.Context, req *Ms func (*UnimplementedMsgServer) ClaimBudget(ctx context.Context, req *MsgClaimBudget) (*MsgClaimBudgetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClaimBudget not implemented") } +func (*UnimplementedMsgServer) FundDispensationProposal(ctx context.Context, req *MsgFundDispensationProposal) (*MsgFundDispensationProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FundDispensationProposal not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -786,6 +801,24 @@ func _Msg_ClaimBudget_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Msg_FundDispensationProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgFundDispensationProposal) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).FundDispensationProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.protocolpool.v1.Msg/FundDispensationProposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).FundDispensationProposal(ctx, req.(*MsgFundDispensationProposal)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.protocolpool.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -806,6 +839,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "ClaimBudget", Handler: _Msg_ClaimBudget_Handler, }, + { + MethodName: "FundDispensationProposal", + Handler: _Msg_FundDispensationProposal_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/protocolpool/v1/tx.proto", @@ -1151,10 +1188,10 @@ func (m *MsgFundDispensationProposal) MarshalToSizedBuffer(dAtA []byte) (int, er } i-- dAtA[i] = 0x1a - if len(m.Destination) > 0 { - i -= len(m.Destination) - copy(dAtA[i:], m.Destination) - i = encodeVarintTx(dAtA, i, uint64(len(m.Destination))) + if len(m.RecipientAddress) > 0 { + i -= len(m.RecipientAddress) + copy(dAtA[i:], m.RecipientAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.RecipientAddress))) i-- dAtA[i] = 0x12 } @@ -1335,7 +1372,7 @@ func (m *MsgFundDispensationProposal) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Destination) + l = len(m.RecipientAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2217,7 +2254,7 @@ func (m *MsgFundDispensationProposal) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RecipientAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2245,7 +2282,7 @@ func (m *MsgFundDispensationProposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Destination = string(dAtA[iNdEx:postIndex]) + m.RecipientAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { From 81c83e88abc198af2227a738523e6eace1517e43 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Tue, 24 Oct 2023 15:17:19 +0530 Subject: [PATCH 32/69] Revert "update proto msg" This reverts commit dfcb89cec8cb27deb4d4fea3dd744b97be1183f4. --- api/cosmos/protocolpool/v1/tx.pulsar.go | 225 +++++++++++------------ api/cosmos/protocolpool/v1/tx_grpc.pb.go | 45 +---- proto/cosmos/protocolpool/v1/tx.proto | 8 +- x/protocolpool/types/tx.pb.go | 165 +++++++---------- 4 files changed, 178 insertions(+), 265 deletions(-) diff --git a/api/cosmos/protocolpool/v1/tx.pulsar.go b/api/cosmos/protocolpool/v1/tx.pulsar.go index 354678c4f7b4..e34e5a399f23 100644 --- a/api/cosmos/protocolpool/v1/tx.pulsar.go +++ b/api/cosmos/protocolpool/v1/tx.pulsar.go @@ -3878,19 +3878,19 @@ func (x *_MsgFundDispensationProposal_4_list) IsValid() bool { } var ( - md_MsgFundDispensationProposal protoreflect.MessageDescriptor - fd_MsgFundDispensationProposal_authority protoreflect.FieldDescriptor - fd_MsgFundDispensationProposal_recipient_address protoreflect.FieldDescriptor - fd_MsgFundDispensationProposal_percentage protoreflect.FieldDescriptor - fd_MsgFundDispensationProposal_cap protoreflect.FieldDescriptor - fd_MsgFundDispensationProposal_expiration protoreflect.FieldDescriptor + md_MsgFundDispensationProposal protoreflect.MessageDescriptor + fd_MsgFundDispensationProposal_authority protoreflect.FieldDescriptor + fd_MsgFundDispensationProposal_destination protoreflect.FieldDescriptor + fd_MsgFundDispensationProposal_percentage protoreflect.FieldDescriptor + fd_MsgFundDispensationProposal_cap protoreflect.FieldDescriptor + fd_MsgFundDispensationProposal_expiration protoreflect.FieldDescriptor ) func init() { file_cosmos_protocolpool_v1_tx_proto_init() md_MsgFundDispensationProposal = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgFundDispensationProposal") fd_MsgFundDispensationProposal_authority = md_MsgFundDispensationProposal.Fields().ByName("authority") - fd_MsgFundDispensationProposal_recipient_address = md_MsgFundDispensationProposal.Fields().ByName("recipient_address") + fd_MsgFundDispensationProposal_destination = md_MsgFundDispensationProposal.Fields().ByName("destination") fd_MsgFundDispensationProposal_percentage = md_MsgFundDispensationProposal.Fields().ByName("percentage") fd_MsgFundDispensationProposal_cap = md_MsgFundDispensationProposal.Fields().ByName("cap") fd_MsgFundDispensationProposal_expiration = md_MsgFundDispensationProposal.Fields().ByName("expiration") @@ -3967,9 +3967,9 @@ func (x *fastReflection_MsgFundDispensationProposal) Range(f func(protoreflect.F return } } - if x.RecipientAddress != "" { - value := protoreflect.ValueOfString(x.RecipientAddress) - if !f(fd_MsgFundDispensationProposal_recipient_address, value) { + if x.Destination != "" { + value := protoreflect.ValueOfString(x.Destination) + if !f(fd_MsgFundDispensationProposal_destination, value) { return } } @@ -4008,8 +4008,8 @@ func (x *fastReflection_MsgFundDispensationProposal) Has(fd protoreflect.FieldDe switch fd.FullName() { case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": return x.Authority != "" - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.recipient_address": - return x.RecipientAddress != "" + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": + return x.Destination != "" case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": return x.Percentage != nil case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": @@ -4034,8 +4034,8 @@ func (x *fastReflection_MsgFundDispensationProposal) Clear(fd protoreflect.Field switch fd.FullName() { case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": x.Authority = "" - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.recipient_address": - x.RecipientAddress = "" + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": + x.Destination = "" case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": x.Percentage = nil case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": @@ -4061,8 +4061,8 @@ func (x *fastReflection_MsgFundDispensationProposal) Get(descriptor protoreflect case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": value := x.Authority return protoreflect.ValueOfString(value) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.recipient_address": - value := x.RecipientAddress + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": + value := x.Destination return protoreflect.ValueOfString(value) case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": value := x.Percentage @@ -4098,8 +4098,8 @@ func (x *fastReflection_MsgFundDispensationProposal) Set(fd protoreflect.FieldDe switch fd.FullName() { case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": x.Authority = value.Interface().(string) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.recipient_address": - x.RecipientAddress = value.Interface().(string) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": + x.Destination = value.Interface().(string) case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": x.Percentage = value.Message().Interface().(*v1beta1.DecCoin) case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": @@ -4141,8 +4141,8 @@ func (x *fastReflection_MsgFundDispensationProposal) Mutable(fd protoreflect.Fie return protoreflect.ValueOfList(value) case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": panic(fmt.Errorf("field authority of message cosmos.protocolpool.v1.MsgFundDispensationProposal is not mutable")) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.recipient_address": - panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.MsgFundDispensationProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": + panic(fmt.Errorf("field destination of message cosmos.protocolpool.v1.MsgFundDispensationProposal is not mutable")) case "cosmos.protocolpool.v1.MsgFundDispensationProposal.expiration": panic(fmt.Errorf("field expiration of message cosmos.protocolpool.v1.MsgFundDispensationProposal is not mutable")) default: @@ -4160,7 +4160,7 @@ func (x *fastReflection_MsgFundDispensationProposal) NewField(fd protoreflect.Fi switch fd.FullName() { case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": return protoreflect.ValueOfString("") - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.recipient_address": + case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": return protoreflect.ValueOfString("") case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": m := new(v1beta1.DecCoin) @@ -4243,7 +4243,7 @@ func (x *fastReflection_MsgFundDispensationProposal) ProtoMethods() *protoiface. if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.RecipientAddress) + l = len(x.Destination) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -4324,10 +4324,10 @@ func (x *fastReflection_MsgFundDispensationProposal) ProtoMethods() *protoiface. 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))) + if len(x.Destination) > 0 { + i -= len(x.Destination) + copy(dAtA[i:], x.Destination) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Destination))) i-- dAtA[i] = 0x12 } @@ -4421,7 +4421,7 @@ func (x *fastReflection_MsgFundDispensationProposal) ProtoMethods() *protoiface. 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) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4449,7 +4449,7 @@ func (x *fastReflection_MsgFundDispensationProposal) ProtoMethods() *protoiface. if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.RecipientAddress = string(dAtA[iNdEx:postIndex]) + x.Destination = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -5283,11 +5283,11 @@ type MsgFundDispensationProposal struct { 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 string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` - Percentage *v1beta1.DecCoin `protobuf:"bytes,3,opt,name=percentage,proto3" json:"percentage,omitempty"` - Cap []*v1beta1.Coin `protobuf:"bytes,4,rep,name=cap,proto3" json:"cap,omitempty"` - Expiration int64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` + Percentage *v1beta1.DecCoin `protobuf:"bytes,3,opt,name=percentage,proto3" json:"percentage,omitempty"` + Cap []*v1beta1.Coin `protobuf:"bytes,4,rep,name=cap,proto3" json:"cap,omitempty"` + Expiration int64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` } func (x *MsgFundDispensationProposal) Reset() { @@ -5317,9 +5317,9 @@ func (x *MsgFundDispensationProposal) GetAuthority() string { return "" } -func (x *MsgFundDispensationProposal) GetRecipientAddress() string { +func (x *MsgFundDispensationProposal) GetDestination() string { if x != nil { - return x.RecipientAddress + return x.Destination } return "" } @@ -5453,89 +5453,80 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 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, 0x9e, 0x03, 0x0a, 0x1b, 0x4d, 0x73, + 0x73, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, 0x03, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x71, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, - 0xaa, 0xdf, 0x1f, 0x2b, 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, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, - 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x5d, 0x0a, 0x03, 0x63, - 0x61, 0x70, 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, 0x03, 0x63, 0x61, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, - 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x73, - 0x67, 0x46, 0x75, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x32, 0xfa, 0x04, 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, + 0x79, 0x12, 0x3a, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 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, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x71, 0x0a, + 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, + 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 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, 0x44, 0x65, 0x63, 0x43, + 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, + 0x12, 0x5d, 0x0a, 0x03, 0x63, 0x61, 0x70, 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, 0x03, 0x63, 0x61, 0x70, 0x12, + 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, + 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, + 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x65, 0x6e, + 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xeb, 0x03, 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, 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, 0x8c, 0x01, 0x0a, 0x18, 0x46, 0x75, 0x6e, - 0x64, 0x44, 0x69, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, + 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, 0x46, 0x75, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x3b, 0x2e, 0x63, 0x6f, 0x73, + 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, 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, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x65, - 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, + 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 ( @@ -5576,14 +5567,12 @@ var file_cosmos_protocolpool_v1_tx_proto_depIdxs = []int32{ 2, // 7: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:input_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpend 4, // 8: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:input_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposal 6, // 9: cosmos.protocolpool.v1.Msg.ClaimBudget:input_type -> cosmos.protocolpool.v1.MsgClaimBudget - 8, // 10: cosmos.protocolpool.v1.Msg.FundDispensationProposal:input_type -> cosmos.protocolpool.v1.MsgFundDispensationProposal - 1, // 11: cosmos.protocolpool.v1.Msg.FundCommunityPool:output_type -> cosmos.protocolpool.v1.MsgFundCommunityPoolResponse - 3, // 12: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:output_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse - 5, // 13: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:output_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse - 7, // 14: cosmos.protocolpool.v1.Msg.ClaimBudget:output_type -> cosmos.protocolpool.v1.MsgClaimBudgetResponse - 9, // 15: cosmos.protocolpool.v1.Msg.FundDispensationProposal:output_type -> cosmos.protocolpool.v1.MsgFundDispensationProposalResponse - 11, // [11:16] is the sub-list for method output_type - 6, // [6:11] is the sub-list for method input_type + 1, // 10: cosmos.protocolpool.v1.Msg.FundCommunityPool:output_type -> cosmos.protocolpool.v1.MsgFundCommunityPoolResponse + 3, // 11: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:output_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse + 5, // 12: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:output_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse + 7, // 13: cosmos.protocolpool.v1.Msg.ClaimBudget:output_type -> cosmos.protocolpool.v1.MsgClaimBudgetResponse + 10, // [10:14] is the sub-list for method output_type + 6, // [6:10] 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 diff --git a/api/cosmos/protocolpool/v1/tx_grpc.pb.go b/api/cosmos/protocolpool/v1/tx_grpc.pb.go index b63e3511036f..38ab855506b2 100644 --- a/api/cosmos/protocolpool/v1/tx_grpc.pb.go +++ b/api/cosmos/protocolpool/v1/tx_grpc.pb.go @@ -19,11 +19,10 @@ import ( const _ = grpc.SupportPackageIsVersion7 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_FundDispensationProposal_FullMethodName = "/cosmos.protocolpool.v1.Msg/FundDispensationProposal" + 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" ) // MsgClient is the client API for Msg service. @@ -42,7 +41,6 @@ type MsgClient interface { 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) - FundDispensationProposal(ctx context.Context, in *MsgFundDispensationProposal, opts ...grpc.CallOption) (*MsgFundDispensationProposalResponse, error) } type msgClient struct { @@ -89,15 +87,6 @@ func (c *msgClient) ClaimBudget(ctx context.Context, in *MsgClaimBudget, opts .. return out, nil } -func (c *msgClient) FundDispensationProposal(ctx context.Context, in *MsgFundDispensationProposal, opts ...grpc.CallOption) (*MsgFundDispensationProposalResponse, error) { - out := new(MsgFundDispensationProposalResponse) - err := c.cc.Invoke(ctx, Msg_FundDispensationProposal_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -114,7 +103,6 @@ type MsgServer interface { SubmitBudgetProposal(context.Context, *MsgSubmitBudgetProposal) (*MsgSubmitBudgetProposalResponse, error) // ClaimBudget defines a method to claim the distributed budget. ClaimBudget(context.Context, *MsgClaimBudget) (*MsgClaimBudgetResponse, error) - FundDispensationProposal(context.Context, *MsgFundDispensationProposal) (*MsgFundDispensationProposalResponse, error) mustEmbedUnimplementedMsgServer() } @@ -134,9 +122,6 @@ func (UnimplementedMsgServer) SubmitBudgetProposal(context.Context, *MsgSubmitBu func (UnimplementedMsgServer) ClaimBudget(context.Context, *MsgClaimBudget) (*MsgClaimBudgetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClaimBudget not implemented") } -func (UnimplementedMsgServer) FundDispensationProposal(context.Context, *MsgFundDispensationProposal) (*MsgFundDispensationProposalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FundDispensationProposal not implemented") -} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -222,24 +207,6 @@ func _Msg_ClaimBudget_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } -func _Msg_FundDispensationProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgFundDispensationProposal) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).FundDispensationProposal(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_FundDispensationProposal_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).FundDispensationProposal(ctx, req.(*MsgFundDispensationProposal)) - } - 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) @@ -263,10 +230,6 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "ClaimBudget", Handler: _Msg_ClaimBudget_Handler, }, - { - MethodName: "FundDispensationProposal", - Handler: _Msg_FundDispensationProposal_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/protocolpool/v1/tx.proto", diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index d74b809cc365..7b6eee4a9ca6 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -27,8 +27,6 @@ service Msg { // ClaimBudget defines a method to claim the distributed budget. rpc ClaimBudget(MsgClaimBudget) returns (MsgClaimBudgetResponse); - - rpc FundDispensationProposal(MsgFundDispensationProposal) returns (MsgFundDispensationProposalResponse); } // MsgFundCommunityPool allows an account to directly @@ -98,9 +96,9 @@ message MsgFundDispensationProposal { 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"]; - string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - cosmos.base.v1beta1.DecCoin percentage = 3 + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string destination = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + cosmos.base.v1beta1.DecCoin percentage = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; repeated cosmos.base.v1beta1.Coin cap = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; diff --git a/x/protocolpool/types/tx.pb.go b/x/protocolpool/types/tx.pb.go index e62bf4df914f..5e1c628f9a52 100644 --- a/x/protocolpool/types/tx.pb.go +++ b/x/protocolpool/types/tx.pb.go @@ -428,11 +428,11 @@ func (m *MsgClaimBudgetResponse) GetAmount() types.Coin { type MsgFundDispensationProposal 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"` - RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` - Percentage types.DecCoin `protobuf:"bytes,3,opt,name=percentage,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"percentage"` - Cap github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=cap,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"cap"` - Expiration int64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` + Percentage types.DecCoin `protobuf:"bytes,3,opt,name=percentage,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"percentage"` + Cap github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=cap,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"cap"` + Expiration int64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` } func (m *MsgFundDispensationProposal) Reset() { *m = MsgFundDispensationProposal{} } @@ -475,9 +475,9 @@ func (m *MsgFundDispensationProposal) GetAuthority() string { return "" } -func (m *MsgFundDispensationProposal) GetRecipientAddress() string { +func (m *MsgFundDispensationProposal) GetDestination() string { if m != nil { - return m.RecipientAddress + return m.Destination } return "" } @@ -555,57 +555,56 @@ func init() { func init() { proto.RegisterFile("cosmos/protocolpool/v1/tx.proto", fileDescriptor_09efe14517e7f6dc) } var fileDescriptor_09efe14517e7f6dc = []byte{ - // 785 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x4f, 0xdb, 0x48, - 0x14, 0x8f, 0x09, 0x44, 0xca, 0x63, 0x85, 0x16, 0x2b, 0x1b, 0x8c, 0x17, 0x9c, 0x90, 0xd5, 0xae, - 0x22, 0x76, 0x63, 0x6f, 0xa0, 0x7f, 0x24, 0xe8, 0xa5, 0x81, 0xf6, 0x16, 0x09, 0x05, 0x4e, 0x95, - 0xaa, 0xc8, 0xb1, 0x47, 0x66, 0x44, 0x3c, 0xe3, 0x7a, 0x26, 0x14, 0x2a, 0x55, 0x42, 0x3d, 0xf5, - 0xd0, 0x43, 0x3f, 0x41, 0xc5, 0xb9, 0x27, 0x0e, 0xfd, 0x10, 0x48, 0xed, 0x01, 0xf5, 0xd4, 0x53, - 0x5b, 0x85, 0x03, 0xfd, 0x0c, 0x3d, 0x55, 0xb1, 0x07, 0x27, 0x51, 0x4c, 0x20, 0xa8, 0x48, 0x3d, - 0x25, 0x79, 0xef, 0xf7, 0xde, 0xfb, 0xbd, 0xdf, 0xbc, 0x79, 0x13, 0xc8, 0x59, 0x94, 0xb9, 0x94, - 0x19, 0x9e, 0x4f, 0x39, 0xb5, 0x68, 0xd3, 0xa3, 0xb4, 0x69, 0xec, 0x96, 0x0d, 0xbe, 0xa7, 0x07, - 0x26, 0x39, 0x1b, 0x02, 0xf4, 0x5e, 0x80, 0xbe, 0x5b, 0x56, 0x33, 0x0e, 0x75, 0x68, 0x60, 0x34, - 0x3a, 0xdf, 0x42, 0xbf, 0xaa, 0x89, 0x74, 0x0d, 0x93, 0x21, 0x63, 0xb7, 0xdc, 0x40, 0xdc, 0x2c, - 0x1b, 0x16, 0xc5, 0x44, 0xf8, 0x67, 0x43, 0x7f, 0x3d, 0x0c, 0xec, 0x4d, 0xad, 0xce, 0x88, 0x50, - 0x97, 0x39, 0x1d, 0x02, 0x2e, 0x73, 0x42, 0x47, 0xe1, 0xbd, 0x04, 0x99, 0x2a, 0x73, 0x1e, 0xb6, - 0x88, 0xbd, 0x46, 0x5d, 0xb7, 0x45, 0x30, 0xdf, 0xdf, 0xa0, 0xb4, 0x29, 0x5b, 0x90, 0x32, 0x5d, - 0xda, 0x22, 0x5c, 0x91, 0xf2, 0xc9, 0xe2, 0xe4, 0xd2, 0xac, 0x2e, 0x12, 0x76, 0xaa, 0xeb, 0xa2, - 0xba, 0xbe, 0x46, 0x31, 0xa9, 0xfc, 0x7f, 0xfc, 0x39, 0x97, 0x78, 0xfb, 0x25, 0x57, 0x74, 0x30, - 0xdf, 0x6e, 0x35, 0x74, 0x8b, 0xba, 0xa2, 0xba, 0xf8, 0x28, 0x31, 0x7b, 0xc7, 0xe0, 0xfb, 0x1e, - 0x62, 0x41, 0x00, 0xab, 0x89, 0xd4, 0xf2, 0x1d, 0x48, 0xdb, 0xc8, 0xa3, 0x0c, 0x73, 0xea, 0x2b, - 0x63, 0x79, 0xa9, 0x98, 0xae, 0x28, 0x1f, 0xdf, 0x95, 0x32, 0xa2, 0xd4, 0x7d, 0xdb, 0xf6, 0x11, - 0x63, 0x9b, 0xdc, 0xc7, 0xc4, 0xa9, 0x75, 0xa1, 0x2b, 0xd9, 0x97, 0x87, 0xb9, 0xc4, 0xb7, 0xc3, - 0x5c, 0xe2, 0xc5, 0xd9, 0xd1, 0x62, 0xd7, 0x5e, 0xd0, 0x60, 0x2e, 0xae, 0x99, 0x1a, 0x62, 0x1e, - 0x25, 0x0c, 0x15, 0xda, 0x12, 0xfc, 0x51, 0x65, 0x4e, 0x9f, 0x73, 0xd3, 0x43, 0xc4, 0xee, 0x30, - 0x31, 0x5b, 0x7c, 0x9b, 0xfa, 0x98, 0xef, 0x2b, 0xd2, 0x65, 0x4c, 0x22, 0xa8, 0x3c, 0x07, 0x69, - 0x1f, 0x59, 0xd8, 0xc3, 0x88, 0xf0, 0xb0, 0x83, 0x5a, 0xd7, 0xd0, 0x23, 0x62, 0xf2, 0xc6, 0x44, - 0x5c, 0x99, 0x0a, 0x44, 0x88, 0x28, 0x15, 0x72, 0x30, 0x1f, 0xdb, 0x63, 0xa4, 0xc2, 0x87, 0x31, - 0x98, 0xa9, 0x32, 0x67, 0xb3, 0xd5, 0x70, 0x31, 0xaf, 0xb4, 0x6c, 0x07, 0xf1, 0x0d, 0x9f, 0x7a, - 0x94, 0x99, 0xcd, 0x6b, 0xeb, 0xf0, 0x00, 0xa6, 0xa3, 0xb6, 0xeb, 0x66, 0x88, 0xba, 0xf4, 0x44, - 0x7f, 0x8f, 0x42, 0x84, 0x5d, 0xbe, 0x07, 0xbf, 0x71, 0xca, 0xcd, 0x66, 0xbd, 0x11, 0xd0, 0x52, - 0x92, 0x79, 0x69, 0xa8, 0x6c, 0xb5, 0xc9, 0x00, 0x1e, 0x36, 0x21, 0xcf, 0x03, 0x30, 0x6e, 0xfa, - 0xbc, 0xce, 0xb1, 0x8b, 0x94, 0xf1, 0xbc, 0x54, 0x4c, 0xd6, 0xd2, 0x81, 0x65, 0x0b, 0xbb, 0x48, - 0x2e, 0x81, 0xec, 0x23, 0xd7, 0xc4, 0x04, 0x13, 0xa7, 0xce, 0x7d, 0x93, 0x58, 0xdb, 0x88, 0x29, - 0x13, 0x01, 0x6c, 0x3a, 0xf2, 0x6c, 0x09, 0x87, 0x9c, 0x85, 0x94, 0x87, 0x7c, 0x4c, 0x6d, 0x25, - 0x15, 0x40, 0xc4, 0xaf, 0x01, 0xbd, 0x17, 0x20, 0x77, 0x81, 0x9a, 0x91, 0xe2, 0x14, 0xa6, 0x3a, - 0x47, 0xd2, 0x34, 0xb1, 0x2b, 0xa8, 0xc6, 0xea, 0x25, 0x8d, 0xaa, 0xd7, 0x4a, 0xb6, 0xc3, 0x65, - 0x30, 0x53, 0xe1, 0x39, 0x64, 0xfb, 0x0b, 0x9e, 0x53, 0xe9, 0xbb, 0xd7, 0xd2, 0x0d, 0x8d, 0x64, - 0xe1, 0x4d, 0x12, 0xfe, 0x14, 0x17, 0x71, 0x1d, 0x33, 0x0f, 0x11, 0x66, 0x72, 0x4c, 0xc9, 0xaf, - 0x32, 0x65, 0x4f, 0x00, 0x3c, 0xe4, 0x5b, 0x88, 0x70, 0xd3, 0x41, 0x62, 0xc6, 0xe6, 0x62, 0x75, - 0x58, 0x47, 0x56, 0x20, 0xc5, 0xb2, 0x90, 0xe2, 0xdf, 0x2b, 0x48, 0x21, 0x62, 0x58, 0xad, 0xa7, - 0x88, 0xfc, 0x18, 0x92, 0x96, 0xe9, 0x29, 0xe3, 0x3f, 0x7f, 0x0d, 0x74, 0xf2, 0xca, 0x1a, 0x00, - 0xda, 0xf3, 0xb0, 0x1f, 0xc8, 0x2c, 0x46, 0xba, 0xc7, 0x32, 0x30, 0xb3, 0x7f, 0xc3, 0x5f, 0x43, - 0xce, 0xe7, 0x7c, 0x58, 0x96, 0xbe, 0x8f, 0x43, 0xb2, 0xca, 0x1c, 0xf9, 0x29, 0x4c, 0x0f, 0xbe, - 0x10, 0xff, 0xe9, 0xf1, 0xaf, 0x97, 0x1e, 0xb7, 0x82, 0xd5, 0x5b, 0xa3, 0xa0, 0xa3, 0x69, 0x7d, - 0x06, 0x72, 0xcc, 0xb2, 0x2e, 0x0d, 0xc9, 0x35, 0x08, 0x57, 0x6f, 0x8f, 0x04, 0x8f, 0x6a, 0x1f, - 0x48, 0x90, 0x89, 0xdd, 0x91, 0xc6, 0x90, 0x7c, 0x71, 0x01, 0xea, 0xdd, 0x11, 0x03, 0x22, 0x0a, - 0x08, 0x26, 0x7b, 0x97, 0xc6, 0x3f, 0xc3, 0x1a, 0xe9, 0xe2, 0x54, 0xfd, 0x6a, 0xb8, 0xa8, 0xcc, - 0x2b, 0x09, 0x94, 0x0b, 0xef, 0xea, 0xf2, 0x25, 0x07, 0x17, 0x17, 0xa4, 0xae, 0x5e, 0x23, 0xe8, - 0x9c, 0x8e, 0x3a, 0x71, 0x70, 0x76, 0xb4, 0x28, 0x55, 0x56, 0x8f, 0xdb, 0x9a, 0x74, 0xd2, 0xd6, - 0xa4, 0xaf, 0x6d, 0x4d, 0x7a, 0x7d, 0xaa, 0x25, 0x4e, 0x4e, 0xb5, 0xc4, 0xa7, 0x53, 0x2d, 0xf1, - 0x68, 0x21, 0x4c, 0xce, 0xec, 0x1d, 0x1d, 0x53, 0x63, 0xaf, 0xff, 0xff, 0x55, 0x70, 0x37, 0x1a, - 0xa9, 0xc0, 0xb6, 0xfc, 0x23, 0x00, 0x00, 0xff, 0xff, 0x57, 0xaa, 0x23, 0x2e, 0x83, 0x09, 0x00, - 0x00, + // 779 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x4f, 0xdb, 0x48, + 0x14, 0x8e, 0x31, 0x44, 0xca, 0xcb, 0x0a, 0x2d, 0x56, 0x36, 0x18, 0x2f, 0x38, 0x21, 0xab, 0x5d, + 0x45, 0xec, 0xc6, 0xde, 0xc0, 0xfe, 0x90, 0xb2, 0x7b, 0xd9, 0xc0, 0xf6, 0x16, 0x09, 0x05, 0x4e, + 0x95, 0xaa, 0xc8, 0xb1, 0x47, 0x66, 0x44, 0x3c, 0xe3, 0x7a, 0x26, 0x14, 0x2a, 0x55, 0x42, 0x3d, + 0xf5, 0x58, 0xa9, 0xff, 0x00, 0xe7, 0x9e, 0x38, 0xf4, 0x8f, 0x40, 0x6a, 0x0f, 0xa8, 0xa7, 0x9e, + 0xda, 0x2a, 0x1c, 0xa8, 0xd4, 0x7f, 0xa2, 0x8a, 0x3d, 0x38, 0x89, 0xe2, 0x06, 0xd2, 0x96, 0x53, + 0x92, 0xf7, 0xbe, 0xf7, 0xbd, 0xf7, 0x7d, 0x7e, 0x33, 0x0e, 0x14, 0x6c, 0xca, 0x3c, 0xca, 0x4c, + 0x3f, 0xa0, 0x9c, 0xda, 0xb4, 0xe3, 0x53, 0xda, 0x31, 0x0f, 0xaa, 0x26, 0x3f, 0x34, 0xc2, 0x90, + 0x92, 0x8f, 0x00, 0xc6, 0x30, 0xc0, 0x38, 0xa8, 0x6a, 0x39, 0x97, 0xba, 0x34, 0x0c, 0x9a, 0xfd, + 0x6f, 0x51, 0x5e, 0xd3, 0x05, 0x5d, 0xdb, 0x62, 0xc8, 0x3c, 0xa8, 0xb6, 0x11, 0xb7, 0xaa, 0xa6, + 0x4d, 0x31, 0x11, 0xf9, 0xa5, 0x28, 0xdf, 0x8a, 0x0a, 0x87, 0xa9, 0xb5, 0x45, 0x51, 0xea, 0x31, + 0xb7, 0x3f, 0x80, 0xc7, 0xdc, 0x28, 0x51, 0x7a, 0x29, 0x41, 0xae, 0xc1, 0xdc, 0x3b, 0x5d, 0xe2, + 0x6c, 0x52, 0xcf, 0xeb, 0x12, 0xcc, 0x8f, 0xb6, 0x29, 0xed, 0x28, 0x36, 0xa4, 0x2d, 0x8f, 0x76, + 0x09, 0x57, 0xa5, 0xa2, 0x5c, 0xce, 0xae, 0x2f, 0x19, 0x82, 0xb0, 0xdf, 0xdd, 0x10, 0xdd, 0x8d, + 0x4d, 0x8a, 0x49, 0xfd, 0xf7, 0xb3, 0xb7, 0x85, 0xd4, 0xf3, 0x77, 0x85, 0xb2, 0x8b, 0xf9, 0x5e, + 0xb7, 0x6d, 0xd8, 0xd4, 0x13, 0xdd, 0xc5, 0x47, 0x85, 0x39, 0xfb, 0x26, 0x3f, 0xf2, 0x11, 0x0b, + 0x0b, 0x58, 0x53, 0x50, 0x2b, 0x7f, 0x41, 0xc6, 0x41, 0x3e, 0x65, 0x98, 0xd3, 0x40, 0x9d, 0x29, + 0x4a, 0xe5, 0x4c, 0x5d, 0x7d, 0xfd, 0xa2, 0x92, 0x13, 0xad, 0xfe, 0x73, 0x9c, 0x00, 0x31, 0xb6, + 0xc3, 0x03, 0x4c, 0xdc, 0xe6, 0x00, 0x5a, 0xcb, 0x3f, 0x39, 0x29, 0xa4, 0x3e, 0x9c, 0x14, 0x52, + 0x8f, 0x2f, 0x4f, 0xd7, 0x06, 0xf1, 0x92, 0x0e, 0xcb, 0x49, 0x62, 0x9a, 0x88, 0xf9, 0x94, 0x30, + 0x54, 0xea, 0x49, 0xf0, 0x43, 0x83, 0xb9, 0x23, 0xc9, 0x1d, 0x1f, 0x11, 0xa7, 0x3f, 0x89, 0xd5, + 0xe5, 0x7b, 0x34, 0xc0, 0xfc, 0x48, 0x95, 0xae, 0x9b, 0x24, 0x86, 0x2a, 0xcb, 0x90, 0x09, 0x90, + 0x8d, 0x7d, 0x8c, 0x08, 0x8f, 0x14, 0x34, 0x07, 0x81, 0x21, 0x13, 0xe5, 0x5b, 0x33, 0xb1, 0x36, + 0x1f, 0x9a, 0x10, 0x8f, 0x54, 0x2a, 0xc0, 0x4a, 0xa2, 0xc6, 0xd8, 0x85, 0x57, 0x33, 0xb0, 0xd8, + 0x60, 0xee, 0x4e, 0xb7, 0xed, 0x61, 0x5e, 0xef, 0x3a, 0x2e, 0xe2, 0xdb, 0x01, 0xf5, 0x29, 0xb3, + 0x3a, 0x5f, 0xec, 0xc3, 0xff, 0xb0, 0x10, 0xcb, 0x6e, 0x59, 0x11, 0xea, 0xda, 0x27, 0xfa, 0x7d, + 0x5c, 0x22, 0xe2, 0xca, 0xbf, 0xf0, 0x1d, 0xa7, 0xdc, 0xea, 0xb4, 0xda, 0xe1, 0x58, 0xaa, 0x5c, + 0x94, 0x26, 0xda, 0xd6, 0xcc, 0x86, 0xf0, 0x48, 0x84, 0xb2, 0x02, 0xc0, 0xb8, 0x15, 0xf0, 0x16, + 0xc7, 0x1e, 0x52, 0x67, 0x8b, 0x52, 0x59, 0x6e, 0x66, 0xc2, 0xc8, 0x2e, 0xf6, 0x90, 0x52, 0x01, + 0x25, 0x40, 0x9e, 0x85, 0x09, 0x26, 0x6e, 0x8b, 0x07, 0x16, 0xb1, 0xf7, 0x10, 0x53, 0xe7, 0x42, + 0xd8, 0x42, 0x9c, 0xd9, 0x15, 0x09, 0x25, 0x0f, 0x69, 0x1f, 0x05, 0x98, 0x3a, 0x6a, 0x3a, 0x84, + 0x88, 0x5f, 0x63, 0x7e, 0xaf, 0x42, 0xe1, 0x33, 0x6e, 0xc6, 0x8e, 0x53, 0x98, 0xef, 0x3f, 0x92, + 0x8e, 0x85, 0x3d, 0x31, 0x6a, 0xa2, 0x5f, 0xd2, 0xb4, 0x7e, 0xd5, 0xf2, 0xfd, 0x59, 0xc6, 0x99, + 0x4a, 0x8f, 0x20, 0x3f, 0xda, 0xf0, 0x6a, 0x94, 0x91, 0x73, 0x2d, 0xdd, 0xd2, 0x4a, 0x96, 0x9e, + 0xc9, 0xf0, 0xa3, 0x38, 0x88, 0x5b, 0x98, 0xf9, 0x88, 0x30, 0x8b, 0x63, 0x4a, 0xbe, 0x7a, 0xcb, + 0x6a, 0x90, 0x75, 0x10, 0xe3, 0x98, 0x84, 0x74, 0xd7, 0xee, 0xd7, 0x30, 0x58, 0xb9, 0x0f, 0xe0, + 0xa3, 0xc0, 0x46, 0x84, 0x5b, 0x2e, 0x12, 0x8b, 0xb5, 0x9c, 0x28, 0x7e, 0x0b, 0xd9, 0xa1, 0xfe, + 0x0d, 0xa1, 0xff, 0xd7, 0x1b, 0xe8, 0x17, 0x35, 0xac, 0x39, 0xd4, 0x44, 0xb9, 0x07, 0xb2, 0x6d, + 0xf9, 0xea, 0xec, 0xb7, 0x3f, 0xfb, 0x7d, 0x5e, 0x45, 0x07, 0x40, 0x87, 0x3e, 0x0e, 0x22, 0x33, + 0xa2, 0x3d, 0x1e, 0x8a, 0x8c, 0x2d, 0xea, 0xcf, 0xf0, 0xd3, 0x84, 0x87, 0x72, 0xb5, 0x21, 0xeb, + 0x1f, 0x65, 0x90, 0x1b, 0xcc, 0x55, 0x1e, 0xc0, 0xc2, 0xf8, 0x6b, 0xe1, 0x37, 0x23, 0xf9, 0x95, + 0x65, 0x24, 0xdd, 0xbb, 0xda, 0x1f, 0xd3, 0xa0, 0xe3, 0x15, 0x7d, 0x08, 0x4a, 0xc2, 0x0d, 0x5d, + 0x99, 0xc0, 0x35, 0x0e, 0xd7, 0xfe, 0x9c, 0x0a, 0x1e, 0xf7, 0x3e, 0x96, 0x20, 0x97, 0x78, 0x31, + 0x9a, 0x13, 0xf8, 0x92, 0x0a, 0xb4, 0xbf, 0xa7, 0x2c, 0x88, 0x47, 0x40, 0x90, 0x1d, 0xbe, 0x29, + 0x7e, 0x99, 0x24, 0x64, 0x80, 0xd3, 0x8c, 0x9b, 0xe1, 0xae, 0xda, 0x68, 0x73, 0xc7, 0x97, 0xa7, + 0x6b, 0x52, 0xfd, 0x9f, 0xb3, 0x9e, 0x2e, 0x9d, 0xf7, 0x74, 0xe9, 0x7d, 0x4f, 0x97, 0x9e, 0x5e, + 0xe8, 0xa9, 0xf3, 0x0b, 0x3d, 0xf5, 0xe6, 0x42, 0x4f, 0xdd, 0x5d, 0x8d, 0xf8, 0x98, 0xb3, 0x6f, + 0x60, 0x6a, 0x1e, 0x8e, 0xfe, 0x8b, 0x09, 0x97, 0xb1, 0x9d, 0x0e, 0x63, 0x1b, 0x9f, 0x02, 0x00, + 0x00, 0xff, 0xff, 0x82, 0x8c, 0x58, 0xc5, 0xe9, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -632,7 +631,6 @@ type MsgClient interface { 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) - FundDispensationProposal(ctx context.Context, in *MsgFundDispensationProposal, opts ...grpc.CallOption) (*MsgFundDispensationProposalResponse, error) } type msgClient struct { @@ -679,15 +677,6 @@ func (c *msgClient) ClaimBudget(ctx context.Context, in *MsgClaimBudget, opts .. return out, nil } -func (c *msgClient) FundDispensationProposal(ctx context.Context, in *MsgFundDispensationProposal, opts ...grpc.CallOption) (*MsgFundDispensationProposalResponse, error) { - out := new(MsgFundDispensationProposalResponse) - err := c.cc.Invoke(ctx, "/cosmos.protocolpool.v1.Msg/FundDispensationProposal", 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 @@ -702,7 +691,6 @@ type MsgServer interface { SubmitBudgetProposal(context.Context, *MsgSubmitBudgetProposal) (*MsgSubmitBudgetProposalResponse, error) // ClaimBudget defines a method to claim the distributed budget. ClaimBudget(context.Context, *MsgClaimBudget) (*MsgClaimBudgetResponse, error) - FundDispensationProposal(context.Context, *MsgFundDispensationProposal) (*MsgFundDispensationProposalResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -721,9 +709,6 @@ func (*UnimplementedMsgServer) SubmitBudgetProposal(ctx context.Context, req *Ms func (*UnimplementedMsgServer) ClaimBudget(ctx context.Context, req *MsgClaimBudget) (*MsgClaimBudgetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClaimBudget not implemented") } -func (*UnimplementedMsgServer) FundDispensationProposal(ctx context.Context, req *MsgFundDispensationProposal) (*MsgFundDispensationProposalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FundDispensationProposal not implemented") -} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -801,24 +786,6 @@ func _Msg_ClaimBudget_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } -func _Msg_FundDispensationProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgFundDispensationProposal) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).FundDispensationProposal(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.protocolpool.v1.Msg/FundDispensationProposal", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).FundDispensationProposal(ctx, req.(*MsgFundDispensationProposal)) - } - return interceptor(ctx, in, info, handler) -} - var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.protocolpool.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -839,10 +806,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "ClaimBudget", Handler: _Msg_ClaimBudget_Handler, }, - { - MethodName: "FundDispensationProposal", - Handler: _Msg_FundDispensationProposal_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/protocolpool/v1/tx.proto", @@ -1188,10 +1151,10 @@ func (m *MsgFundDispensationProposal) MarshalToSizedBuffer(dAtA []byte) (int, er } i-- dAtA[i] = 0x1a - if len(m.RecipientAddress) > 0 { - i -= len(m.RecipientAddress) - copy(dAtA[i:], m.RecipientAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.RecipientAddress))) + if len(m.Destination) > 0 { + i -= len(m.Destination) + copy(dAtA[i:], m.Destination) + i = encodeVarintTx(dAtA, i, uint64(len(m.Destination))) i-- dAtA[i] = 0x12 } @@ -1372,7 +1335,7 @@ func (m *MsgFundDispensationProposal) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.RecipientAddress) + l = len(m.Destination) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2254,7 +2217,7 @@ func (m *MsgFundDispensationProposal) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RecipientAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2282,7 +2245,7 @@ func (m *MsgFundDispensationProposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RecipientAddress = string(dAtA[iNdEx:postIndex]) + m.Destination = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { From 599303e952e13edbac5ad85ff3f2b5b070a29416 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Tue, 24 Oct 2023 15:19:29 +0530 Subject: [PATCH 33/69] Revert "add MsgFundDispensationProposal proto msg" This reverts commit 7c306d25e946d9ccf36fa8f71b241b6e80dd1d33. --- api/cosmos/protocolpool/v1/tx.pulsar.go | 1402 ++--------------------- proto/cosmos/protocolpool/v1/tx.proto | 15 - x/protocolpool/types/tx.pb.go | 584 +--------- 3 files changed, 116 insertions(+), 1885 deletions(-) diff --git a/api/cosmos/protocolpool/v1/tx.pulsar.go b/api/cosmos/protocolpool/v1/tx.pulsar.go index e34e5a399f23..83b0b3044fa7 100644 --- a/api/cosmos/protocolpool/v1/tx.pulsar.go +++ b/api/cosmos/protocolpool/v1/tx.pulsar.go @@ -3826,1111 +3826,6 @@ func (x *fastReflection_MsgClaimBudgetResponse) ProtoMethods() *protoiface.Metho } } -var _ protoreflect.List = (*_MsgFundDispensationProposal_4_list)(nil) - -type _MsgFundDispensationProposal_4_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgFundDispensationProposal_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgFundDispensationProposal_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgFundDispensationProposal_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgFundDispensationProposal_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgFundDispensationProposal_4_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgFundDispensationProposal_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgFundDispensationProposal_4_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgFundDispensationProposal_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgFundDispensationProposal protoreflect.MessageDescriptor - fd_MsgFundDispensationProposal_authority protoreflect.FieldDescriptor - fd_MsgFundDispensationProposal_destination protoreflect.FieldDescriptor - fd_MsgFundDispensationProposal_percentage protoreflect.FieldDescriptor - fd_MsgFundDispensationProposal_cap protoreflect.FieldDescriptor - fd_MsgFundDispensationProposal_expiration protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_protocolpool_v1_tx_proto_init() - md_MsgFundDispensationProposal = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgFundDispensationProposal") - fd_MsgFundDispensationProposal_authority = md_MsgFundDispensationProposal.Fields().ByName("authority") - fd_MsgFundDispensationProposal_destination = md_MsgFundDispensationProposal.Fields().ByName("destination") - fd_MsgFundDispensationProposal_percentage = md_MsgFundDispensationProposal.Fields().ByName("percentage") - fd_MsgFundDispensationProposal_cap = md_MsgFundDispensationProposal.Fields().ByName("cap") - fd_MsgFundDispensationProposal_expiration = md_MsgFundDispensationProposal.Fields().ByName("expiration") -} - -var _ protoreflect.Message = (*fastReflection_MsgFundDispensationProposal)(nil) - -type fastReflection_MsgFundDispensationProposal MsgFundDispensationProposal - -func (x *MsgFundDispensationProposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgFundDispensationProposal)(x) -} - -func (x *MsgFundDispensationProposal) 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_MsgFundDispensationProposal_messageType fastReflection_MsgFundDispensationProposal_messageType -var _ protoreflect.MessageType = fastReflection_MsgFundDispensationProposal_messageType{} - -type fastReflection_MsgFundDispensationProposal_messageType struct{} - -func (x fastReflection_MsgFundDispensationProposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgFundDispensationProposal)(nil) -} -func (x fastReflection_MsgFundDispensationProposal_messageType) New() protoreflect.Message { - return new(fastReflection_MsgFundDispensationProposal) -} -func (x fastReflection_MsgFundDispensationProposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgFundDispensationProposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgFundDispensationProposal) Descriptor() protoreflect.MessageDescriptor { - return md_MsgFundDispensationProposal -} - -// 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_MsgFundDispensationProposal) Type() protoreflect.MessageType { - return _fastReflection_MsgFundDispensationProposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgFundDispensationProposal) New() protoreflect.Message { - return new(fastReflection_MsgFundDispensationProposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgFundDispensationProposal) Interface() protoreflect.ProtoMessage { - return (*MsgFundDispensationProposal)(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_MsgFundDispensationProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgFundDispensationProposal_authority, value) { - return - } - } - if x.Destination != "" { - value := protoreflect.ValueOfString(x.Destination) - if !f(fd_MsgFundDispensationProposal_destination, value) { - return - } - } - if x.Percentage != nil { - value := protoreflect.ValueOfMessage(x.Percentage.ProtoReflect()) - if !f(fd_MsgFundDispensationProposal_percentage, value) { - return - } - } - if len(x.Cap) != 0 { - value := protoreflect.ValueOfList(&_MsgFundDispensationProposal_4_list{list: &x.Cap}) - if !f(fd_MsgFundDispensationProposal_cap, value) { - return - } - } - if x.Expiration != int64(0) { - value := protoreflect.ValueOfInt64(x.Expiration) - if !f(fd_MsgFundDispensationProposal_expiration, 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_MsgFundDispensationProposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": - return x.Authority != "" - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": - return x.Destination != "" - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": - return x.Percentage != nil - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": - return len(x.Cap) != 0 - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.expiration": - return x.Expiration != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundDispensationProposal")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposal 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_MsgFundDispensationProposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": - x.Authority = "" - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": - x.Destination = "" - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": - x.Percentage = nil - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": - x.Cap = nil - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.expiration": - x.Expiration = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundDispensationProposal")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposal 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_MsgFundDispensationProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": - value := x.Destination - return protoreflect.ValueOfString(value) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": - value := x.Percentage - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": - if len(x.Cap) == 0 { - return protoreflect.ValueOfList(&_MsgFundDispensationProposal_4_list{}) - } - listValue := &_MsgFundDispensationProposal_4_list{list: &x.Cap} - return protoreflect.ValueOfList(listValue) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.expiration": - value := x.Expiration - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundDispensationProposal")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposal 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_MsgFundDispensationProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": - x.Authority = value.Interface().(string) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": - x.Destination = value.Interface().(string) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": - x.Percentage = value.Message().Interface().(*v1beta1.DecCoin) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": - lv := value.List() - clv := lv.(*_MsgFundDispensationProposal_4_list) - x.Cap = *clv.list - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.expiration": - x.Expiration = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundDispensationProposal")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposal 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_MsgFundDispensationProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": - if x.Percentage == nil { - x.Percentage = new(v1beta1.DecCoin) - } - return protoreflect.ValueOfMessage(x.Percentage.ProtoReflect()) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": - if x.Cap == nil { - x.Cap = []*v1beta1.Coin{} - } - value := &_MsgFundDispensationProposal_4_list{list: &x.Cap} - return protoreflect.ValueOfList(value) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": - panic(fmt.Errorf("field authority of message cosmos.protocolpool.v1.MsgFundDispensationProposal is not mutable")) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": - panic(fmt.Errorf("field destination of message cosmos.protocolpool.v1.MsgFundDispensationProposal is not mutable")) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.expiration": - panic(fmt.Errorf("field expiration of message cosmos.protocolpool.v1.MsgFundDispensationProposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundDispensationProposal")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposal 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_MsgFundDispensationProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.authority": - return protoreflect.ValueOfString("") - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.destination": - return protoreflect.ValueOfString("") - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage": - m := new(v1beta1.DecCoin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.cap": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgFundDispensationProposal_4_list{list: &list}) - case "cosmos.protocolpool.v1.MsgFundDispensationProposal.expiration": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundDispensationProposal")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposal 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_MsgFundDispensationProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgFundDispensationProposal", 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_MsgFundDispensationProposal) 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_MsgFundDispensationProposal) 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_MsgFundDispensationProposal) 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_MsgFundDispensationProposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgFundDispensationProposal) - 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.Destination) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Percentage != nil { - l = options.Size(x.Percentage) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Cap) > 0 { - for _, e := range x.Cap { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Expiration != 0 { - n += 1 + runtime.Sov(uint64(x.Expiration)) - } - 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().(*MsgFundDispensationProposal) - 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.Expiration != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Expiration)) - i-- - dAtA[i] = 0x28 - } - if len(x.Cap) > 0 { - for iNdEx := len(x.Cap) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Cap[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.Percentage != nil { - encoded, err := options.Marshal(x.Percentage) - 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.Destination) > 0 { - i -= len(x.Destination) - copy(dAtA[i:], x.Destination) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Destination))) - 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().(*MsgFundDispensationProposal) - 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: MsgFundDispensationProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgFundDispensationProposal: 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 Destination", 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.Destination = 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 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.Percentage == nil { - x.Percentage = &v1beta1.DecCoin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Percentage); 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 Cap", 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.Cap = append(x.Cap, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Cap[len(x.Cap)-1]); 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 Expiration", wireType) - } - x.Expiration = 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.Expiration |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgFundDispensationProposalResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_protocolpool_v1_tx_proto_init() - md_MsgFundDispensationProposalResponse = File_cosmos_protocolpool_v1_tx_proto.Messages().ByName("MsgFundDispensationProposalResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgFundDispensationProposalResponse)(nil) - -type fastReflection_MsgFundDispensationProposalResponse MsgFundDispensationProposalResponse - -func (x *MsgFundDispensationProposalResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgFundDispensationProposalResponse)(x) -} - -func (x *MsgFundDispensationProposalResponse) 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_MsgFundDispensationProposalResponse_messageType fastReflection_MsgFundDispensationProposalResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgFundDispensationProposalResponse_messageType{} - -type fastReflection_MsgFundDispensationProposalResponse_messageType struct{} - -func (x fastReflection_MsgFundDispensationProposalResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgFundDispensationProposalResponse)(nil) -} -func (x fastReflection_MsgFundDispensationProposalResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgFundDispensationProposalResponse) -} -func (x fastReflection_MsgFundDispensationProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgFundDispensationProposalResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgFundDispensationProposalResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgFundDispensationProposalResponse -} - -// 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_MsgFundDispensationProposalResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgFundDispensationProposalResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgFundDispensationProposalResponse) New() protoreflect.Message { - return new(fastReflection_MsgFundDispensationProposalResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgFundDispensationProposalResponse) Interface() protoreflect.ProtoMessage { - return (*MsgFundDispensationProposalResponse)(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_MsgFundDispensationProposalResponse) 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_MsgFundDispensationProposalResponse) 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.MsgFundDispensationProposalResponse")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposalResponse 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_MsgFundDispensationProposalResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgFundDispensationProposalResponse")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposalResponse 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_MsgFundDispensationProposalResponse) 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.MsgFundDispensationProposalResponse")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposalResponse 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_MsgFundDispensationProposalResponse) 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.MsgFundDispensationProposalResponse")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposalResponse 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_MsgFundDispensationProposalResponse) 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.MsgFundDispensationProposalResponse")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposalResponse 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_MsgFundDispensationProposalResponse) 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.MsgFundDispensationProposalResponse")) - } - panic(fmt.Errorf("message cosmos.protocolpool.v1.MsgFundDispensationProposalResponse 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_MsgFundDispensationProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.protocolpool.v1.MsgFundDispensationProposalResponse", 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_MsgFundDispensationProposalResponse) 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_MsgFundDispensationProposalResponse) 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_MsgFundDispensationProposalResponse) 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_MsgFundDispensationProposalResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgFundDispensationProposalResponse) - 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().(*MsgFundDispensationProposalResponse) - 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().(*MsgFundDispensationProposalResponse) - 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: MsgFundDispensationProposalResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgFundDispensationProposalResponse: 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 @@ -5277,100 +4172,6 @@ func (x *MsgClaimBudgetResponse) GetAmount() *v1beta1.Coin { return nil } -type MsgFundDispensationProposal 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"` - Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` - Percentage *v1beta1.DecCoin `protobuf:"bytes,3,opt,name=percentage,proto3" json:"percentage,omitempty"` - Cap []*v1beta1.Coin `protobuf:"bytes,4,rep,name=cap,proto3" json:"cap,omitempty"` - Expiration int64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` -} - -func (x *MsgFundDispensationProposal) Reset() { - *x = MsgFundDispensationProposal{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgFundDispensationProposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgFundDispensationProposal) ProtoMessage() {} - -// Deprecated: Use MsgFundDispensationProposal.ProtoReflect.Descriptor instead. -func (*MsgFundDispensationProposal) Descriptor() ([]byte, []int) { - return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{8} -} - -func (x *MsgFundDispensationProposal) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgFundDispensationProposal) GetDestination() string { - if x != nil { - return x.Destination - } - return "" -} - -func (x *MsgFundDispensationProposal) GetPercentage() *v1beta1.DecCoin { - if x != nil { - return x.Percentage - } - return nil -} - -func (x *MsgFundDispensationProposal) GetCap() []*v1beta1.Coin { - if x != nil { - return x.Cap - } - return nil -} - -func (x *MsgFundDispensationProposal) GetExpiration() int64 { - if x != nil { - return x.Expiration - } - return 0 -} - -type MsgFundDispensationProposalResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgFundDispensationProposalResponse) Reset() { - *x = MsgFundDispensationProposalResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_protocolpool_v1_tx_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgFundDispensationProposalResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgFundDispensationProposalResponse) ProtoMessage() {} - -// Deprecated: Use MsgFundDispensationProposalResponse.ProtoReflect.Descriptor instead. -func (*MsgFundDispensationProposalResponse) Descriptor() ([]byte, []int) { - return file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP(), []int{9} -} - var File_cosmos_protocolpool_v1_tx_proto protoreflect.FileDescriptor var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ @@ -5453,80 +4254,52 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 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, 0x93, 0x03, 0x0a, 0x1b, 0x4d, 0x73, - 0x67, 0x46, 0x75, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 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, 0x3a, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 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, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x71, 0x0a, - 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, - 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 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, 0x44, 0x65, 0x63, 0x43, - 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, - 0x12, 0x5d, 0x0a, 0x03, 0x63, 0x61, 0x70, 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, 0x03, 0x63, 0x61, 0x70, 0x12, - 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, - 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, - 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x65, 0x6e, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xeb, 0x03, 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, + 0x73, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xeb, 0x03, 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, + 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, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x42, - 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, + 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 ( @@ -5541,41 +4314,36 @@ func file_cosmos_protocolpool_v1_tx_proto_rawDescGZIP() []byte { return file_cosmos_protocolpool_v1_tx_proto_rawDescData } -var file_cosmos_protocolpool_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_cosmos_protocolpool_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) 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 - (*MsgFundDispensationProposal)(nil), // 8: cosmos.protocolpool.v1.MsgFundDispensationProposal - (*MsgFundDispensationProposalResponse)(nil), // 9: cosmos.protocolpool.v1.MsgFundDispensationProposalResponse - (*v1beta1.Coin)(nil), // 10: cosmos.base.v1beta1.Coin - (*v1beta1.DecCoin)(nil), // 11: cosmos.base.v1beta1.DecCoin + (*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 + (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin } var file_cosmos_protocolpool_v1_tx_proto_depIdxs = []int32{ - 10, // 0: cosmos.protocolpool.v1.MsgFundCommunityPool.amount:type_name -> cosmos.base.v1beta1.Coin - 10, // 1: cosmos.protocolpool.v1.MsgCommunityPoolSpend.amount:type_name -> cosmos.base.v1beta1.Coin - 10, // 2: cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget:type_name -> cosmos.base.v1beta1.Coin - 10, // 3: cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount:type_name -> cosmos.base.v1beta1.Coin - 11, // 4: cosmos.protocolpool.v1.MsgFundDispensationProposal.percentage:type_name -> cosmos.base.v1beta1.DecCoin - 10, // 5: cosmos.protocolpool.v1.MsgFundDispensationProposal.cap:type_name -> cosmos.base.v1beta1.Coin - 0, // 6: cosmos.protocolpool.v1.Msg.FundCommunityPool:input_type -> cosmos.protocolpool.v1.MsgFundCommunityPool - 2, // 7: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:input_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpend - 4, // 8: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:input_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposal - 6, // 9: cosmos.protocolpool.v1.Msg.ClaimBudget:input_type -> cosmos.protocolpool.v1.MsgClaimBudget - 1, // 10: cosmos.protocolpool.v1.Msg.FundCommunityPool:output_type -> cosmos.protocolpool.v1.MsgFundCommunityPoolResponse - 3, // 11: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:output_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse - 5, // 12: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:output_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse - 7, // 13: cosmos.protocolpool.v1.Msg.ClaimBudget:output_type -> cosmos.protocolpool.v1.MsgClaimBudgetResponse - 10, // [10:14] is the sub-list for method output_type - 6, // [6:10] 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 + 8, // 0: cosmos.protocolpool.v1.MsgFundCommunityPool.amount:type_name -> cosmos.base.v1beta1.Coin + 8, // 1: cosmos.protocolpool.v1.MsgCommunityPoolSpend.amount:type_name -> cosmos.base.v1beta1.Coin + 8, // 2: cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget:type_name -> cosmos.base.v1beta1.Coin + 8, // 3: cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount:type_name -> cosmos.base.v1beta1.Coin + 0, // 4: cosmos.protocolpool.v1.Msg.FundCommunityPool:input_type -> cosmos.protocolpool.v1.MsgFundCommunityPool + 2, // 5: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:input_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpend + 4, // 6: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:input_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposal + 6, // 7: cosmos.protocolpool.v1.Msg.ClaimBudget:input_type -> cosmos.protocolpool.v1.MsgClaimBudget + 1, // 8: cosmos.protocolpool.v1.Msg.FundCommunityPool:output_type -> cosmos.protocolpool.v1.MsgFundCommunityPoolResponse + 3, // 9: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:output_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse + 5, // 10: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:output_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse + 7, // 11: cosmos.protocolpool.v1.Msg.ClaimBudget:output_type -> cosmos.protocolpool.v1.MsgClaimBudgetResponse + 8, // [8:12] is the sub-list for method output_type + 4, // [4:8] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_cosmos_protocolpool_v1_tx_proto_init() } @@ -5680,30 +4448,6 @@ func file_cosmos_protocolpool_v1_tx_proto_init() { return nil } } - file_cosmos_protocolpool_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgFundDispensationProposal); 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.(*MsgFundDispensationProposalResponse); 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{ @@ -5711,7 +4455,7 @@ func file_cosmos_protocolpool_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_protocolpool_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index 7b6eee4a9ca6..838d744ebe91 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -91,18 +91,3 @@ message MsgClaimBudgetResponse { [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; ; } - -message MsgFundDispensationProposal { - 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"]; - string destination = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - cosmos.base.v1beta1.DecCoin percentage = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; - repeated cosmos.base.v1beta1.Coin cap = 4 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - int64 expiration = 5; -} - -message MsgFundDispensationProposalResponse {} \ No newline at end of file diff --git a/x/protocolpool/types/tx.pb.go b/x/protocolpool/types/tx.pb.go index 5e1c628f9a52..e8830be9026c 100644 --- a/x/protocolpool/types/tx.pb.go +++ b/x/protocolpool/types/tx.pb.go @@ -426,119 +426,6 @@ func (m *MsgClaimBudgetResponse) GetAmount() types.Coin { return types.Coin{} } -type MsgFundDispensationProposal 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"` - Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` - Percentage types.DecCoin `protobuf:"bytes,3,opt,name=percentage,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"percentage"` - Cap github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=cap,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"cap"` - Expiration int64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` -} - -func (m *MsgFundDispensationProposal) Reset() { *m = MsgFundDispensationProposal{} } -func (m *MsgFundDispensationProposal) String() string { return proto.CompactTextString(m) } -func (*MsgFundDispensationProposal) ProtoMessage() {} -func (*MsgFundDispensationProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_09efe14517e7f6dc, []int{8} -} -func (m *MsgFundDispensationProposal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgFundDispensationProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgFundDispensationProposal.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 *MsgFundDispensationProposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgFundDispensationProposal.Merge(m, src) -} -func (m *MsgFundDispensationProposal) XXX_Size() int { - return m.Size() -} -func (m *MsgFundDispensationProposal) XXX_DiscardUnknown() { - xxx_messageInfo_MsgFundDispensationProposal.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgFundDispensationProposal proto.InternalMessageInfo - -func (m *MsgFundDispensationProposal) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgFundDispensationProposal) GetDestination() string { - if m != nil { - return m.Destination - } - return "" -} - -func (m *MsgFundDispensationProposal) GetPercentage() types.DecCoin { - if m != nil { - return m.Percentage - } - return types.DecCoin{} -} - -func (m *MsgFundDispensationProposal) GetCap() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.Cap - } - return nil -} - -func (m *MsgFundDispensationProposal) GetExpiration() int64 { - if m != nil { - return m.Expiration - } - return 0 -} - -type MsgFundDispensationProposalResponse struct { -} - -func (m *MsgFundDispensationProposalResponse) Reset() { *m = MsgFundDispensationProposalResponse{} } -func (m *MsgFundDispensationProposalResponse) String() string { return proto.CompactTextString(m) } -func (*MsgFundDispensationProposalResponse) ProtoMessage() {} -func (*MsgFundDispensationProposalResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_09efe14517e7f6dc, []int{9} -} -func (m *MsgFundDispensationProposalResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgFundDispensationProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgFundDispensationProposalResponse.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 *MsgFundDispensationProposalResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgFundDispensationProposalResponse.Merge(m, src) -} -func (m *MsgFundDispensationProposalResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgFundDispensationProposalResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgFundDispensationProposalResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgFundDispensationProposalResponse proto.InternalMessageInfo - func init() { proto.RegisterType((*MsgFundCommunityPool)(nil), "cosmos.protocolpool.v1.MsgFundCommunityPool") proto.RegisterType((*MsgFundCommunityPoolResponse)(nil), "cosmos.protocolpool.v1.MsgFundCommunityPoolResponse") @@ -548,63 +435,54 @@ func init() { proto.RegisterType((*MsgSubmitBudgetProposalResponse)(nil), "cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse") proto.RegisterType((*MsgClaimBudget)(nil), "cosmos.protocolpool.v1.MsgClaimBudget") proto.RegisterType((*MsgClaimBudgetResponse)(nil), "cosmos.protocolpool.v1.MsgClaimBudgetResponse") - proto.RegisterType((*MsgFundDispensationProposal)(nil), "cosmos.protocolpool.v1.MsgFundDispensationProposal") - proto.RegisterType((*MsgFundDispensationProposalResponse)(nil), "cosmos.protocolpool.v1.MsgFundDispensationProposalResponse") } func init() { proto.RegisterFile("cosmos/protocolpool/v1/tx.proto", fileDescriptor_09efe14517e7f6dc) } var fileDescriptor_09efe14517e7f6dc = []byte{ - // 779 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x4f, 0xdb, 0x48, - 0x14, 0x8e, 0x31, 0x44, 0xca, 0xcb, 0x0a, 0x2d, 0x56, 0x36, 0x18, 0x2f, 0x38, 0x21, 0xab, 0x5d, - 0x45, 0xec, 0xc6, 0xde, 0xc0, 0xfe, 0x90, 0xb2, 0x7b, 0xd9, 0xc0, 0xf6, 0x16, 0x09, 0x05, 0x4e, - 0x95, 0xaa, 0xc8, 0xb1, 0x47, 0x66, 0x44, 0x3c, 0xe3, 0x7a, 0x26, 0x14, 0x2a, 0x55, 0x42, 0x3d, - 0xf5, 0x58, 0xa9, 0xff, 0x00, 0xe7, 0x9e, 0x38, 0xf4, 0x8f, 0x40, 0x6a, 0x0f, 0xa8, 0xa7, 0x9e, - 0xda, 0x2a, 0x1c, 0xa8, 0xd4, 0x7f, 0xa2, 0x8a, 0x3d, 0x38, 0x89, 0xe2, 0x06, 0xd2, 0x96, 0x53, - 0x92, 0xf7, 0xbe, 0xf7, 0xbd, 0xf7, 0x7d, 0x7e, 0x33, 0x0e, 0x14, 0x6c, 0xca, 0x3c, 0xca, 0x4c, - 0x3f, 0xa0, 0x9c, 0xda, 0xb4, 0xe3, 0x53, 0xda, 0x31, 0x0f, 0xaa, 0x26, 0x3f, 0x34, 0xc2, 0x90, - 0x92, 0x8f, 0x00, 0xc6, 0x30, 0xc0, 0x38, 0xa8, 0x6a, 0x39, 0x97, 0xba, 0x34, 0x0c, 0x9a, 0xfd, - 0x6f, 0x51, 0x5e, 0xd3, 0x05, 0x5d, 0xdb, 0x62, 0xc8, 0x3c, 0xa8, 0xb6, 0x11, 0xb7, 0xaa, 0xa6, - 0x4d, 0x31, 0x11, 0xf9, 0xa5, 0x28, 0xdf, 0x8a, 0x0a, 0x87, 0xa9, 0xb5, 0x45, 0x51, 0xea, 0x31, - 0xb7, 0x3f, 0x80, 0xc7, 0xdc, 0x28, 0x51, 0x7a, 0x29, 0x41, 0xae, 0xc1, 0xdc, 0x3b, 0x5d, 0xe2, - 0x6c, 0x52, 0xcf, 0xeb, 0x12, 0xcc, 0x8f, 0xb6, 0x29, 0xed, 0x28, 0x36, 0xa4, 0x2d, 0x8f, 0x76, - 0x09, 0x57, 0xa5, 0xa2, 0x5c, 0xce, 0xae, 0x2f, 0x19, 0x82, 0xb0, 0xdf, 0xdd, 0x10, 0xdd, 0x8d, - 0x4d, 0x8a, 0x49, 0xfd, 0xf7, 0xb3, 0xb7, 0x85, 0xd4, 0xf3, 0x77, 0x85, 0xb2, 0x8b, 0xf9, 0x5e, - 0xb7, 0x6d, 0xd8, 0xd4, 0x13, 0xdd, 0xc5, 0x47, 0x85, 0x39, 0xfb, 0x26, 0x3f, 0xf2, 0x11, 0x0b, - 0x0b, 0x58, 0x53, 0x50, 0x2b, 0x7f, 0x41, 0xc6, 0x41, 0x3e, 0x65, 0x98, 0xd3, 0x40, 0x9d, 0x29, - 0x4a, 0xe5, 0x4c, 0x5d, 0x7d, 0xfd, 0xa2, 0x92, 0x13, 0xad, 0xfe, 0x73, 0x9c, 0x00, 0x31, 0xb6, - 0xc3, 0x03, 0x4c, 0xdc, 0xe6, 0x00, 0x5a, 0xcb, 0x3f, 0x39, 0x29, 0xa4, 0x3e, 0x9c, 0x14, 0x52, - 0x8f, 0x2f, 0x4f, 0xd7, 0x06, 0xf1, 0x92, 0x0e, 0xcb, 0x49, 0x62, 0x9a, 0x88, 0xf9, 0x94, 0x30, - 0x54, 0xea, 0x49, 0xf0, 0x43, 0x83, 0xb9, 0x23, 0xc9, 0x1d, 0x1f, 0x11, 0xa7, 0x3f, 0x89, 0xd5, - 0xe5, 0x7b, 0x34, 0xc0, 0xfc, 0x48, 0x95, 0xae, 0x9b, 0x24, 0x86, 0x2a, 0xcb, 0x90, 0x09, 0x90, - 0x8d, 0x7d, 0x8c, 0x08, 0x8f, 0x14, 0x34, 0x07, 0x81, 0x21, 0x13, 0xe5, 0x5b, 0x33, 0xb1, 0x36, - 0x1f, 0x9a, 0x10, 0x8f, 0x54, 0x2a, 0xc0, 0x4a, 0xa2, 0xc6, 0xd8, 0x85, 0x57, 0x33, 0xb0, 0xd8, - 0x60, 0xee, 0x4e, 0xb7, 0xed, 0x61, 0x5e, 0xef, 0x3a, 0x2e, 0xe2, 0xdb, 0x01, 0xf5, 0x29, 0xb3, - 0x3a, 0x5f, 0xec, 0xc3, 0xff, 0xb0, 0x10, 0xcb, 0x6e, 0x59, 0x11, 0xea, 0xda, 0x27, 0xfa, 0x7d, - 0x5c, 0x22, 0xe2, 0xca, 0xbf, 0xf0, 0x1d, 0xa7, 0xdc, 0xea, 0xb4, 0xda, 0xe1, 0x58, 0xaa, 0x5c, - 0x94, 0x26, 0xda, 0xd6, 0xcc, 0x86, 0xf0, 0x48, 0x84, 0xb2, 0x02, 0xc0, 0xb8, 0x15, 0xf0, 0x16, - 0xc7, 0x1e, 0x52, 0x67, 0x8b, 0x52, 0x59, 0x6e, 0x66, 0xc2, 0xc8, 0x2e, 0xf6, 0x90, 0x52, 0x01, - 0x25, 0x40, 0x9e, 0x85, 0x09, 0x26, 0x6e, 0x8b, 0x07, 0x16, 0xb1, 0xf7, 0x10, 0x53, 0xe7, 0x42, - 0xd8, 0x42, 0x9c, 0xd9, 0x15, 0x09, 0x25, 0x0f, 0x69, 0x1f, 0x05, 0x98, 0x3a, 0x6a, 0x3a, 0x84, - 0x88, 0x5f, 0x63, 0x7e, 0xaf, 0x42, 0xe1, 0x33, 0x6e, 0xc6, 0x8e, 0x53, 0x98, 0xef, 0x3f, 0x92, - 0x8e, 0x85, 0x3d, 0x31, 0x6a, 0xa2, 0x5f, 0xd2, 0xb4, 0x7e, 0xd5, 0xf2, 0xfd, 0x59, 0xc6, 0x99, - 0x4a, 0x8f, 0x20, 0x3f, 0xda, 0xf0, 0x6a, 0x94, 0x91, 0x73, 0x2d, 0xdd, 0xd2, 0x4a, 0x96, 0x9e, - 0xc9, 0xf0, 0xa3, 0x38, 0x88, 0x5b, 0x98, 0xf9, 0x88, 0x30, 0x8b, 0x63, 0x4a, 0xbe, 0x7a, 0xcb, - 0x6a, 0x90, 0x75, 0x10, 0xe3, 0x98, 0x84, 0x74, 0xd7, 0xee, 0xd7, 0x30, 0x58, 0xb9, 0x0f, 0xe0, - 0xa3, 0xc0, 0x46, 0x84, 0x5b, 0x2e, 0x12, 0x8b, 0xb5, 0x9c, 0x28, 0x7e, 0x0b, 0xd9, 0xa1, 0xfe, - 0x0d, 0xa1, 0xff, 0xd7, 0x1b, 0xe8, 0x17, 0x35, 0xac, 0x39, 0xd4, 0x44, 0xb9, 0x07, 0xb2, 0x6d, - 0xf9, 0xea, 0xec, 0xb7, 0x3f, 0xfb, 0x7d, 0x5e, 0x45, 0x07, 0x40, 0x87, 0x3e, 0x0e, 0x22, 0x33, - 0xa2, 0x3d, 0x1e, 0x8a, 0x8c, 0x2d, 0xea, 0xcf, 0xf0, 0xd3, 0x84, 0x87, 0x72, 0xb5, 0x21, 0xeb, - 0x1f, 0x65, 0x90, 0x1b, 0xcc, 0x55, 0x1e, 0xc0, 0xc2, 0xf8, 0x6b, 0xe1, 0x37, 0x23, 0xf9, 0x95, - 0x65, 0x24, 0xdd, 0xbb, 0xda, 0x1f, 0xd3, 0xa0, 0xe3, 0x15, 0x7d, 0x08, 0x4a, 0xc2, 0x0d, 0x5d, - 0x99, 0xc0, 0x35, 0x0e, 0xd7, 0xfe, 0x9c, 0x0a, 0x1e, 0xf7, 0x3e, 0x96, 0x20, 0x97, 0x78, 0x31, - 0x9a, 0x13, 0xf8, 0x92, 0x0a, 0xb4, 0xbf, 0xa7, 0x2c, 0x88, 0x47, 0x40, 0x90, 0x1d, 0xbe, 0x29, - 0x7e, 0x99, 0x24, 0x64, 0x80, 0xd3, 0x8c, 0x9b, 0xe1, 0xae, 0xda, 0x68, 0x73, 0xc7, 0x97, 0xa7, - 0x6b, 0x52, 0xfd, 0x9f, 0xb3, 0x9e, 0x2e, 0x9d, 0xf7, 0x74, 0xe9, 0x7d, 0x4f, 0x97, 0x9e, 0x5e, - 0xe8, 0xa9, 0xf3, 0x0b, 0x3d, 0xf5, 0xe6, 0x42, 0x4f, 0xdd, 0x5d, 0x8d, 0xf8, 0x98, 0xb3, 0x6f, - 0x60, 0x6a, 0x1e, 0x8e, 0xfe, 0x8b, 0x09, 0x97, 0xb1, 0x9d, 0x0e, 0x63, 0x1b, 0x9f, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x82, 0x8c, 0x58, 0xc5, 0xe9, 0x08, 0x00, 0x00, + // 672 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4f, 0x6b, 0xdb, 0x4e, + 0x10, 0xf5, 0xc6, 0xbf, 0x18, 0xbc, 0xf9, 0x11, 0x1a, 0xe1, 0x3a, 0x8a, 0x48, 0x24, 0xc7, 0x87, + 0x62, 0x42, 0x2d, 0xd5, 0xe9, 0x3f, 0x48, 0x7b, 0xa9, 0x43, 0x7b, 0x33, 0x04, 0x27, 0xa7, 0x5e, + 0x8c, 0x2c, 0x2d, 0xca, 0x12, 0x4b, 0x23, 0xb4, 0xab, 0x34, 0x29, 0x14, 0x42, 0x4f, 0x3d, 0xf6, + 0x23, 0xe4, 0xdc, 0x53, 0x0e, 0xfd, 0x10, 0x81, 0xf6, 0x10, 0x7a, 0xea, 0xa9, 0x2d, 0xf6, 0x21, + 0x85, 0x7e, 0x89, 0x22, 0x69, 0x23, 0xdb, 0x58, 0x75, 0xea, 0x42, 0x4e, 0xb6, 0x67, 0xde, 0xbc, + 0x79, 0xf3, 0x76, 0x67, 0x8d, 0x35, 0x0b, 0x98, 0x0b, 0xcc, 0xf0, 0x03, 0xe0, 0x60, 0x41, 0xcf, + 0x07, 0xe8, 0x19, 0x87, 0x0d, 0x83, 0x1f, 0xe9, 0x71, 0x48, 0x2a, 0x27, 0x00, 0x7d, 0x14, 0xa0, + 0x1f, 0x36, 0x94, 0x92, 0x03, 0x0e, 0xc4, 0x41, 0x23, 0xfa, 0x96, 0xe4, 0x15, 0x55, 0xd0, 0x75, + 0x4d, 0x46, 0x8c, 0xc3, 0x46, 0x97, 0x70, 0xb3, 0x61, 0x58, 0x40, 0x3d, 0x91, 0x5f, 0x49, 0xf2, + 0x9d, 0xa4, 0x70, 0x94, 0x5a, 0x59, 0x16, 0xa5, 0x2e, 0x73, 0x22, 0x01, 0x2e, 0x73, 0x92, 0x44, + 0xf5, 0x13, 0xc2, 0xa5, 0x16, 0x73, 0x5e, 0x84, 0x9e, 0xbd, 0x0d, 0xae, 0x1b, 0x7a, 0x94, 0x1f, + 0xef, 0x00, 0xf4, 0x24, 0x0b, 0x17, 0x4c, 0x17, 0x42, 0x8f, 0xcb, 0xa8, 0x92, 0xaf, 0x2d, 0x6c, + 0xae, 0xe8, 0x82, 0x30, 0xea, 0xae, 0x8b, 0xee, 0xfa, 0x36, 0x50, 0xaf, 0x79, 0xef, 0xfc, 0x9b, + 0x96, 0xfb, 0xf0, 0x5d, 0xab, 0x39, 0x94, 0xef, 0x87, 0x5d, 0xdd, 0x02, 0x57, 0x74, 0x17, 0x1f, + 0x75, 0x66, 0x1f, 0x18, 0xfc, 0xd8, 0x27, 0x2c, 0x2e, 0x60, 0x6d, 0x41, 0x2d, 0x3d, 0xc2, 0x45, + 0x9b, 0xf8, 0xc0, 0x28, 0x87, 0x40, 0x9e, 0xab, 0xa0, 0x5a, 0xb1, 0x29, 0x7f, 0xf9, 0x58, 0x2f, + 0x89, 0x56, 0xcf, 0x6c, 0x3b, 0x20, 0x8c, 0xed, 0xf2, 0x80, 0x7a, 0x4e, 0x7b, 0x08, 0xdd, 0x2a, + 0xbf, 0x3b, 0xd5, 0x72, 0x3f, 0x4f, 0xb5, 0xdc, 0xdb, 0xcb, 0xb3, 0x8d, 0x61, 0xbc, 0xaa, 0xe2, + 0xd5, 0xac, 0x61, 0xda, 0x84, 0xf9, 0xe0, 0x31, 0x52, 0xed, 0x23, 0x7c, 0xbb, 0xc5, 0x9c, 0xb1, + 0xe4, 0xae, 0x4f, 0x3c, 0x3b, 0x52, 0x62, 0x86, 0x7c, 0x1f, 0x02, 0xca, 0x8f, 0x65, 0x74, 0x9d, + 0x92, 0x14, 0x2a, 0xad, 0xe2, 0x62, 0x40, 0x2c, 0xea, 0x53, 0xe2, 0xf1, 0x64, 0x82, 0xf6, 0x30, + 0x30, 0x62, 0x62, 0xfe, 0xc6, 0x4c, 0xdc, 0x5a, 0x8c, 0x4d, 0x48, 0x25, 0x55, 0x35, 0xbc, 0x96, + 0x39, 0x63, 0xea, 0xc2, 0xe7, 0x39, 0xbc, 0xdc, 0x62, 0xce, 0x6e, 0xd8, 0x75, 0x29, 0x6f, 0x86, + 0xb6, 0x43, 0xf8, 0x4e, 0x00, 0x3e, 0x30, 0xb3, 0xf7, 0xcf, 0x3e, 0x3c, 0xc7, 0x4b, 0xe9, 0xd8, + 0x1d, 0x33, 0x41, 0x5d, 0x7b, 0xa2, 0xb7, 0xd2, 0x12, 0x11, 0x97, 0x9e, 0xe2, 0xff, 0x39, 0x70, + 0xb3, 0xd7, 0xe9, 0xc6, 0xb2, 0xe4, 0x7c, 0x05, 0x4d, 0xb5, 0xad, 0xbd, 0x10, 0xc3, 0x93, 0x21, + 0xa4, 0x35, 0x8c, 0x19, 0x37, 0x03, 0xde, 0xe1, 0xd4, 0x25, 0xf2, 0x7f, 0x15, 0x54, 0xcb, 0xb7, + 0x8b, 0x71, 0x64, 0x8f, 0xba, 0x44, 0xaa, 0x63, 0x29, 0x20, 0xae, 0x49, 0x3d, 0xea, 0x39, 0x1d, + 0x1e, 0x98, 0x9e, 0xb5, 0x4f, 0x98, 0x3c, 0x1f, 0xc3, 0x96, 0xd2, 0xcc, 0x9e, 0x48, 0x48, 0x65, + 0x5c, 0xf0, 0x49, 0x40, 0xc1, 0x96, 0x0b, 0x31, 0x44, 0xfc, 0x9a, 0xf0, 0x7b, 0x1d, 0x6b, 0x7f, + 0x70, 0x33, 0x75, 0x1c, 0xf0, 0x62, 0x74, 0x24, 0x3d, 0x93, 0xba, 0x42, 0x6a, 0xa6, 0x5f, 0x68, + 0x56, 0xbf, 0xb6, 0xca, 0x91, 0x96, 0x49, 0xa6, 0xea, 0x1b, 0x5c, 0x1e, 0x6f, 0x78, 0x25, 0x65, + 0x6c, 0xaf, 0xd1, 0x0d, 0x5d, 0xc9, 0xcd, 0x5f, 0x79, 0x9c, 0x6f, 0x31, 0x47, 0x7a, 0x85, 0x97, + 0x26, 0x5f, 0x96, 0xbb, 0x7a, 0xf6, 0xab, 0xa7, 0x67, 0xad, 0xae, 0xf2, 0x60, 0x16, 0x74, 0x3a, + 0xe5, 0x6b, 0x2c, 0x65, 0x2c, 0x79, 0x7d, 0x0a, 0xd7, 0x24, 0x5c, 0x79, 0x38, 0x13, 0x3c, 0xed, + 0x7d, 0x82, 0x70, 0x29, 0x73, 0xb7, 0x8c, 0x29, 0x7c, 0x59, 0x05, 0xca, 0xe3, 0x19, 0x0b, 0x52, + 0x09, 0x04, 0x2f, 0x8c, 0x5e, 0xb6, 0x3b, 0xd3, 0x06, 0x19, 0xe2, 0x14, 0xfd, 0xef, 0x70, 0x57, + 0x6d, 0x94, 0xf9, 0x93, 0xcb, 0xb3, 0x0d, 0xd4, 0x7c, 0x72, 0xde, 0x57, 0xd1, 0x45, 0x5f, 0x45, + 0x3f, 0xfa, 0x2a, 0x7a, 0x3f, 0x50, 0x73, 0x17, 0x03, 0x35, 0xf7, 0x75, 0xa0, 0xe6, 0x5e, 0xae, + 0x27, 0x7c, 0xcc, 0x3e, 0xd0, 0x29, 0x18, 0x47, 0xe3, 0x7f, 0x84, 0xf1, 0xc5, 0xe9, 0x16, 0xe2, + 0xd8, 0xfd, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x20, 0xb0, 0xd3, 0xf8, 0x2c, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1102,95 +980,6 @@ func (m *MsgClaimBudgetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgFundDispensationProposal) 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 *MsgFundDispensationProposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgFundDispensationProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Expiration != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Expiration)) - i-- - dAtA[i] = 0x28 - } - if len(m.Cap) > 0 { - for iNdEx := len(m.Cap) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Cap[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - { - size, err := m.Percentage.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.Destination) > 0 { - i -= len(m.Destination) - copy(dAtA[i:], m.Destination) - i = encodeVarintTx(dAtA, i, uint64(len(m.Destination))) - i-- - dAtA[i] = 0x12 - } - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgFundDispensationProposalResponse) 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 *MsgFundDispensationProposalResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgFundDispensationProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -1325,43 +1114,6 @@ func (m *MsgClaimBudgetResponse) Size() (n int) { return n } -func (m *MsgFundDispensationProposal) 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 = len(m.Destination) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Percentage.Size() - n += 1 + l + sovTx(uint64(l)) - if len(m.Cap) > 0 { - for _, e := range m.Cap { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - if m.Expiration != 0 { - n += 1 + sovTx(uint64(m.Expiration)) - } - return n -} - -func (m *MsgFundDispensationProposalResponse) 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 } @@ -2154,256 +1906,6 @@ func (m *MsgClaimBudgetResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgFundDispensationProposal) 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: MsgFundDispensationProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgFundDispensationProposal: 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 Destination", 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.Destination = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Percentage", 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.Percentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cap", 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 - } - m.Cap = append(m.Cap, types.Coin{}) - if err := m.Cap[len(m.Cap)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) - } - m.Expiration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Expiration |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 *MsgFundDispensationProposalResponse) 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: MsgFundDispensationProposalResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgFundDispensationProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From 0b9d201ab8ddfd9c2d3607348abd77b68dbb0539 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 26 Oct 2023 11:15:20 +0530 Subject: [PATCH 34/69] address few comments --- x/protocolpool/autocli.go | 29 ++++++++++++++++++++++++++++- x/protocolpool/keeper/keeper.go | 12 ++++++------ x/protocolpool/types/keys.go | 2 +- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/x/protocolpool/autocli.go b/x/protocolpool/autocli.go index f8fbaa4c6139..619aa36fbd88 100644 --- a/x/protocolpool/autocli.go +++ b/x/protocolpool/autocli.go @@ -19,7 +19,14 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { RpcMethod: "CommunityPool", Use: "community-pool", Short: "Query the amount of coins in the community pool", - Example: fmt.Sprintf(`$ %s query pool community-pool`, version.AppName), + Example: fmt.Sprintf(`$ %s query protocolpool community-pool`, version.AppName), + }, + { + RpcMethod: "UnclaimedBudget", + Use: "unclaimed-budget [recipient-address]", + Short: "Query the remaining budget left to be claimed", + Example: fmt.Sprintf(`$ %s query protocolpool unclaimed-budget cosmos1...`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "address"}}, }, }, }, @@ -33,6 +40,26 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Example: fmt.Sprintf(`$ %s tx protocolpool fund-community-pool 100uatom --from mykey`, version.AppName), PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "amount"}}, }, + { + RpcMethod: "SubmitBudgetProposal", + Use: "submit-budget-proposal [recipient] [total-budget] [start-time] [tranches] [period]", + Short: "Submit a budget proposal", + Example: fmt.Sprintf(`$ %s tx protocolpool submit-budget-proposal cosmos1... 1000000uatom 1600000000 10 1000 --from mykey`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "recipient_address"}, + {ProtoField: "total_budget"}, + {ProtoField: "start_time"}, + {ProtoField: "tranches"}, + {ProtoField: "period"}, + }, + }, + { + RpcMethod: "ClaimBudget", + Use: "claim-budget [recipient]", + Short: "Claim the distributed budget", + Example: fmt.Sprintf(`$ %s tx protocolpool claim-budget cosmos1... --from mykey`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "recipient_address"}}, + }, }, }, } diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 93d511266d62..b0ad16991185 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -118,8 +118,13 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) // check if the distribution is completed if budget.RemainingTranches <= 0 { + // remove the entry of budget ended recipient + err := k.BudgetProposal.Remove(ctx, recipient) + if err != nil { + return sdk.Coin{}, err + } // Log the end of the budget - k.Logger(ctx).Info(fmt.Sprintf("Budget ended for recipient: %s", recipient.String())) + k.Logger(ctx).Debug(fmt.Sprintf("Budget ended for recipient: %s", recipient.String())) return sdk.Coin{}, nil } @@ -167,11 +172,6 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) } func (k Keeper) validateBudgetProposal(ctx context.Context, bp types.MsgSubmitBudgetProposal) error { - account := k.authKeeper.GetAccount(ctx, sdk.AccAddress(bp.RecipientAddress)) - if account == nil { - return fmt.Errorf("account not found: %s", bp.RecipientAddress) - } - if bp.TotalBudget.IsZero() { return fmt.Errorf("total budget cannot be zero") } diff --git a/x/protocolpool/types/keys.go b/x/protocolpool/types/keys.go index fd07141360c1..e9427489c754 100644 --- a/x/protocolpool/types/keys.go +++ b/x/protocolpool/types/keys.go @@ -16,4 +16,4 @@ const ( GovModuleName = "gov" ) -var BudgetKey = collections.NewPrefix(0) +var BudgetKey = collections.NewPrefix(2) From e3cc5d5e147e148dccc01da539d7d74091142643 Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Thu, 26 Oct 2023 06:16:03 +0000 Subject: [PATCH 35/69] add proto changes --- api/cosmos/protocolpool/v1/tx.pulsar.go | 209 +++-- api/cosmos/protocolpool/v1/types.pulsar.go | 902 +++++++++++++++++++++ proto/cosmos/protocolpool/v1/tx.proto | 12 +- proto/cosmos/protocolpool/v1/types.proto | 17 + x/protocolpool/types/tx.pb.go | 116 +-- x/protocolpool/types/types.pb.go | 529 ++++++++++++ 6 files changed, 1616 insertions(+), 169 deletions(-) create mode 100644 api/cosmos/protocolpool/v1/types.pulsar.go create mode 100644 proto/cosmos/protocolpool/v1/types.proto create mode 100644 x/protocolpool/types/types.pb.go diff --git a/api/cosmos/protocolpool/v1/tx.pulsar.go b/api/cosmos/protocolpool/v1/tx.pulsar.go index 83b0b3044fa7..7d48829afd9c 100644 --- a/api/cosmos/protocolpool/v1/tx.pulsar.go +++ b/api/cosmos/protocolpool/v1/tx.pulsar.go @@ -1909,13 +1909,13 @@ func (x *fastReflection_MsgCommunityPoolSpendResponse) ProtoMethods() *protoifac } var ( - md_MsgSubmitBudgetProposal protoreflect.MessageDescriptor - fd_MsgSubmitBudgetProposal_authority protoreflect.FieldDescriptor - fd_MsgSubmitBudgetProposal_recipient_address protoreflect.FieldDescriptor - fd_MsgSubmitBudgetProposal_total_budget protoreflect.FieldDescriptor - fd_MsgSubmitBudgetProposal_start_time protoreflect.FieldDescriptor - fd_MsgSubmitBudgetProposal_remaining_tranches protoreflect.FieldDescriptor - fd_MsgSubmitBudgetProposal_period protoreflect.FieldDescriptor + md_MsgSubmitBudgetProposal protoreflect.MessageDescriptor + fd_MsgSubmitBudgetProposal_authority protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_recipient_address protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_total_budget protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_start_time protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_tranches protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_period protoreflect.FieldDescriptor ) func init() { @@ -1925,7 +1925,7 @@ func init() { fd_MsgSubmitBudgetProposal_recipient_address = md_MsgSubmitBudgetProposal.Fields().ByName("recipient_address") fd_MsgSubmitBudgetProposal_total_budget = md_MsgSubmitBudgetProposal.Fields().ByName("total_budget") fd_MsgSubmitBudgetProposal_start_time = md_MsgSubmitBudgetProposal.Fields().ByName("start_time") - fd_MsgSubmitBudgetProposal_remaining_tranches = md_MsgSubmitBudgetProposal.Fields().ByName("remaining_tranches") + fd_MsgSubmitBudgetProposal_tranches = md_MsgSubmitBudgetProposal.Fields().ByName("tranches") fd_MsgSubmitBudgetProposal_period = md_MsgSubmitBudgetProposal.Fields().ByName("period") } @@ -2018,9 +2018,9 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Range(f func(protoreflect.Field return } } - if x.RemainingTranches != int64(0) { - value := protoreflect.ValueOfInt64(x.RemainingTranches) - if !f(fd_MsgSubmitBudgetProposal_remaining_tranches, value) { + if x.Tranches != int64(0) { + value := protoreflect.ValueOfInt64(x.Tranches) + if !f(fd_MsgSubmitBudgetProposal_tranches, value) { return } } @@ -2053,8 +2053,8 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Has(fd protoreflect.FieldDescri return x.TotalBudget != nil case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": return x.StartTime != int64(0) - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.remaining_tranches": - return x.RemainingTranches != int64(0) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": + return x.Tranches != int64(0) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": return x.Period != int64(0) default: @@ -2081,8 +2081,8 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Clear(fd protoreflect.FieldDesc x.TotalBudget = nil case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": x.StartTime = int64(0) - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.remaining_tranches": - x.RemainingTranches = int64(0) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": + x.Tranches = int64(0) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": x.Period = int64(0) default: @@ -2113,8 +2113,8 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Get(descriptor protoreflect.Fie case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": value := x.StartTime return protoreflect.ValueOfInt64(value) - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.remaining_tranches": - value := x.RemainingTranches + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": + value := x.Tranches return protoreflect.ValueOfInt64(value) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": value := x.Period @@ -2147,8 +2147,8 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Set(fd protoreflect.FieldDescri x.TotalBudget = value.Message().Interface().(*v1beta1.Coin) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": x.StartTime = value.Int() - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.remaining_tranches": - x.RemainingTranches = value.Int() + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": + x.Tranches = value.Int() case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": x.Period = value.Int() default: @@ -2182,8 +2182,8 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Mutable(fd protoreflect.FieldDe panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.MsgSubmitBudgetProposal is not mutable")) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": panic(fmt.Errorf("field start_time of message cosmos.protocolpool.v1.MsgSubmitBudgetProposal is not mutable")) - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.remaining_tranches": - panic(fmt.Errorf("field remaining_tranches 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")) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": panic(fmt.Errorf("field period of message cosmos.protocolpool.v1.MsgSubmitBudgetProposal is not mutable")) default: @@ -2208,7 +2208,7 @@ func (x *fastReflection_MsgSubmitBudgetProposal) NewField(fd protoreflect.FieldD return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.remaining_tranches": + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": return protoreflect.ValueOfInt64(int64(0)) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": return protoreflect.ValueOfInt64(int64(0)) @@ -2296,8 +2296,8 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth if x.StartTime != 0 { n += 1 + runtime.Sov(uint64(x.StartTime)) } - if x.RemainingTranches != 0 { - n += 1 + runtime.Sov(uint64(x.RemainingTranches)) + if x.Tranches != 0 { + n += 1 + runtime.Sov(uint64(x.Tranches)) } if x.Period != 0 { n += 1 + runtime.Sov(uint64(x.Period)) @@ -2336,8 +2336,8 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth i-- dAtA[i] = 0x30 } - if x.RemainingTranches != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.RemainingTranches)) + if x.Tranches != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Tranches)) i-- dAtA[i] = 0x28 } @@ -2544,9 +2544,9 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth } case 5: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RemainingTranches", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) } - x.RemainingTranches = 0 + x.Tranches = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2556,7 +2556,7 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth } b := dAtA[iNdEx] iNdEx++ - x.RemainingTranches |= int64(b&0x7F) << shift + x.Tranches |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -4001,12 +4001,12 @@ type MsgSubmitBudgetProposal struct { 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 string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` - TotalBudget *v1beta1.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` - StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - RemainingTranches int64 `protobuf:"varint,5,opt,name=remaining_tranches,json=remainingTranches,proto3" json:"remaining_tranches,omitempty"` - Period int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` // recipient address + TotalBudget *v1beta1.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` // total budget amount + StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // start_time in seconds + Tranches int64 `protobuf:"varint,5,opt,name=tranches,proto3" json:"tranches,omitempty"` // tranches are the no. of times the distribution needs to be done on the total amount. + Period int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` // period is the interval of blocks funds are distributed } func (x *MsgSubmitBudgetProposal) Reset() { @@ -4057,9 +4057,9 @@ func (x *MsgSubmitBudgetProposal) GetStartTime() int64 { return 0 } -func (x *MsgSubmitBudgetProposal) GetRemainingTranches() int64 { +func (x *MsgSubmitBudgetProposal) GetTranches() int64 { if x != nil { - return x.RemainingTranches + return x.Tranches } return 0 } @@ -4216,7 +4216,7 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 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, 0xcc, 0x02, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x53, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb9, 0x02, 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, @@ -4232,74 +4232,73 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x69, 0x6e, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x72, 0x61, - 0x6e, 0x63, 0x68, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x72, 0x65, 0x6d, - 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x16, - 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 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, 0x32, 0xeb, 0x03, 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, - 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd7, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, + 0x1a, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 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, 0x32, 0xeb, 0x03, 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, 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, + 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, 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 ( diff --git a/api/cosmos/protocolpool/v1/types.pulsar.go b/api/cosmos/protocolpool/v1/types.pulsar.go new file mode 100644 index 000000000000..d089f8a2f5bc --- /dev/null +++ b/api/cosmos/protocolpool/v1/types.pulsar.go @@ -0,0 +1,902 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package protocolpoolv1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Budget protoreflect.MessageDescriptor + fd_Budget_id protoreflect.FieldDescriptor + fd_Budget_recipient_address protoreflect.FieldDescriptor + fd_Budget_total_budget protoreflect.FieldDescriptor + fd_Budget_start_time protoreflect.FieldDescriptor + fd_Budget_tranches 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_id = md_Budget.Fields().ByName("id") + fd_Budget_recipient_address = md_Budget.Fields().ByName("recipient_address") + fd_Budget_total_budget = md_Budget.Fields().ByName("total_budget") + fd_Budget_start_time = md_Budget.Fields().ByName("start_time") + fd_Budget_tranches = md_Budget.Fields().ByName("tranches") + 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.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_Budget_id, value) { + return + } + } + if x.RecipientAddress != "" { + value := protoreflect.ValueOfString(x.RecipientAddress) + if !f(fd_Budget_recipient_address, value) { + return + } + } + if x.TotalBudget != nil { + value := protoreflect.ValueOfMessage(x.TotalBudget.ProtoReflect()) + if !f(fd_Budget_total_budget, value) { + return + } + } + if x.StartTime != int64(0) { + value := protoreflect.ValueOfInt64(x.StartTime) + if !f(fd_Budget_start_time, value) { + return + } + } + if x.Tranches != int64(0) { + value := protoreflect.ValueOfInt64(x.Tranches) + if !f(fd_Budget_tranches, value) { + return + } + } + if x.Period != int64(0) { + value := protoreflect.ValueOfInt64(x.Period) + 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.id": + return x.Id != uint64(0) + case "cosmos.protocolpool.v1.Budget.recipient_address": + return x.RecipientAddress != "" + case "cosmos.protocolpool.v1.Budget.total_budget": + return x.TotalBudget != nil + case "cosmos.protocolpool.v1.Budget.start_time": + return x.StartTime != int64(0) + case "cosmos.protocolpool.v1.Budget.tranches": + return x.Tranches != int64(0) + case "cosmos.protocolpool.v1.Budget.period": + return x.Period != int64(0) + 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.id": + x.Id = uint64(0) + case "cosmos.protocolpool.v1.Budget.recipient_address": + x.RecipientAddress = "" + case "cosmos.protocolpool.v1.Budget.total_budget": + x.TotalBudget = nil + case "cosmos.protocolpool.v1.Budget.start_time": + x.StartTime = int64(0) + case "cosmos.protocolpool.v1.Budget.tranches": + x.Tranches = int64(0) + case "cosmos.protocolpool.v1.Budget.period": + x.Period = int64(0) + 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.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + case "cosmos.protocolpool.v1.Budget.recipient_address": + value := x.RecipientAddress + return protoreflect.ValueOfString(value) + case "cosmos.protocolpool.v1.Budget.total_budget": + value := x.TotalBudget + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.Budget.start_time": + value := x.StartTime + return protoreflect.ValueOfInt64(value) + case "cosmos.protocolpool.v1.Budget.tranches": + value := x.Tranches + return protoreflect.ValueOfInt64(value) + case "cosmos.protocolpool.v1.Budget.period": + value := x.Period + return protoreflect.ValueOfInt64(value) + 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.id": + x.Id = value.Uint() + case "cosmos.protocolpool.v1.Budget.recipient_address": + x.RecipientAddress = value.Interface().(string) + case "cosmos.protocolpool.v1.Budget.total_budget": + x.TotalBudget = value.Message().Interface().(*v1beta1.Coin) + case "cosmos.protocolpool.v1.Budget.start_time": + x.StartTime = value.Int() + case "cosmos.protocolpool.v1.Budget.tranches": + x.Tranches = value.Int() + case "cosmos.protocolpool.v1.Budget.period": + x.Period = value.Int() + 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.total_budget": + if x.TotalBudget == nil { + x.TotalBudget = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.TotalBudget.ProtoReflect()) + case "cosmos.protocolpool.v1.Budget.id": + panic(fmt.Errorf("field id of message cosmos.protocolpool.v1.Budget is not mutable")) + 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.start_time": + panic(fmt.Errorf("field start_time of message cosmos.protocolpool.v1.Budget is not mutable")) + case "cosmos.protocolpool.v1.Budget.tranches": + panic(fmt.Errorf("field tranches of message cosmos.protocolpool.v1.Budget is not mutable")) + case "cosmos.protocolpool.v1.Budget.period": + panic(fmt.Errorf("field period 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.id": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.protocolpool.v1.Budget.recipient_address": + return protoreflect.ValueOfString("") + case "cosmos.protocolpool.v1.Budget.total_budget": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.Budget.start_time": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.protocolpool.v1.Budget.tranches": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.protocolpool.v1.Budget.period": + return protoreflect.ValueOfInt64(int64(0)) + 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 + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + l = len(x.RecipientAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.TotalBudget != nil { + l = options.Size(x.TotalBudget) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.StartTime != 0 { + n += 1 + runtime.Sov(uint64(x.StartTime)) + } + if x.Tranches != 0 { + n += 1 + runtime.Sov(uint64(x.Tranches)) + } + if x.Period != 0 { + n += 1 + runtime.Sov(uint64(x.Period)) + } + 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 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) + i-- + dAtA[i] = 0x30 + } + if x.Tranches != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Tranches)) + i-- + dAtA[i] = 0x28 + } + if x.StartTime != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.StartTime)) + i-- + dAtA[i] = 0x20 + } + if x.TotalBudget != nil { + encoded, err := options.Marshal(x.TotalBudget) + 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 x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*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 != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 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.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 TotalBudget", 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.TotalBudget == nil { + x.TotalBudget = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalBudget); 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 StartTime", wireType) + } + x.StartTime = 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.StartTime |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + x.Period = 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.Period |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: 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) +) + +type Budget struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // id defines the unique id of the budget. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` // recipient address + TotalBudget *v1beta1.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` // total budget amount + StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // start_time in seconds + Tranches int64 `protobuf:"varint,5,opt,name=tranches,proto3" json:"tranches,omitempty"` // tranches are the no. of times the distribution needs to be done on the total amount. + Period int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` // period is the interval of blocks funds are distributed +} + +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) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Budget) GetRecipientAddress() string { + if x != nil { + return x.RecipientAddress + } + return "" +} + +func (x *Budget) GetTotalBudget() *v1beta1.Coin { + if x != nil { + return x.TotalBudget + } + return nil +} + +func (x *Budget) GetStartTime() int64 { + if x != nil { + return x.StartTime + } + return 0 +} + +func (x *Budget) GetTranches() int64 { + if x != nil { + return x.Tranches + } + return 0 +} + +func (x *Budget) GetPeriod() int64 { + if x != nil { + return x.Period + } + return 0 +} + +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, 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, 0x22, 0xf0, 0x01, 0x0a, 0x06, 0x42, 0x75, 0x64, 0x67, + 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, + 0x69, 0x64, 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, 0x3c, 0x0a, 0x0c, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 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, 0x0b, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 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, 0x03, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 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, 1) +var file_cosmos_protocolpool_v1_types_proto_goTypes = []interface{}{ + (*Budget)(nil), // 0: cosmos.protocolpool.v1.Budget + (*v1beta1.Coin)(nil), // 1: cosmos.base.v1beta1.Coin +} +var file_cosmos_protocolpool_v1_types_proto_depIdxs = []int32{ + 1, // 0: cosmos.protocolpool.v1.Budget.total_budget:type_name -> cosmos.base.v1beta1.Coin + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_cosmos_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 + } + } + } + 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: 1, + 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/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index 838d744ebe91..976a2975b02b 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -66,12 +66,12 @@ message MsgSubmitBudgetProposal { 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"]; - string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - cosmos.base.v1beta1.Coin total_budget = 3; - int64 start_time = 4; - int64 remaining_tranches = 5; - int64 period = 6; + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // recipient address + cosmos.base.v1beta1.Coin total_budget = 3; // total budget amount + int64 start_time = 4; // start_time in seconds + int64 tranches = 5; // tranches are the no. of times the distribution needs to be done on the total amount. + int64 period = 6; // period is the interval of blocks funds are distributed } // MsgSubmitBudgetProposalResponse defines the response to executing a diff --git a/proto/cosmos/protocolpool/v1/types.proto b/proto/cosmos/protocolpool/v1/types.proto new file mode 100644 index 000000000000..42cb706955b1 --- /dev/null +++ b/proto/cosmos/protocolpool/v1/types.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package cosmos.protocolpool.v1; + +option go_package = "cosmossdk.io/x/protocolpool/types"; + +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +message Budget { + // id defines the unique id of the budget. + uint64 id = 1; + string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // recipient address + cosmos.base.v1beta1.Coin total_budget = 3; // total budget amount + int64 start_time = 4; // start_time in seconds + int64 tranches = 5; // tranches are the no. of times the distribution needs to be done on the total amount. + int64 period = 6; // period is the interval of blocks funds are distributed +} \ No newline at end of file diff --git a/x/protocolpool/types/tx.pb.go b/x/protocolpool/types/tx.pb.go index e8830be9026c..dc1c049ee024 100644 --- a/x/protocolpool/types/tx.pb.go +++ b/x/protocolpool/types/tx.pb.go @@ -214,12 +214,12 @@ var xxx_messageInfo_MsgCommunityPoolSpendResponse proto.InternalMessageInfo // MsgSubmitBudgetProposal defines budget proposal type. type MsgSubmitBudgetProposal 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"` - RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` - TotalBudget *types.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` - StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - RemainingTranches int64 `protobuf:"varint,5,opt,name=remaining_tranches,json=remainingTranches,proto3" json:"remaining_tranches,omitempty"` - Period int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` + TotalBudget *types.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` + StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + Tranches int64 `protobuf:"varint,5,opt,name=tranches,proto3" json:"tranches,omitempty"` + Period int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` } func (m *MsgSubmitBudgetProposal) Reset() { *m = MsgSubmitBudgetProposal{} } @@ -283,9 +283,9 @@ func (m *MsgSubmitBudgetProposal) GetStartTime() int64 { return 0 } -func (m *MsgSubmitBudgetProposal) GetRemainingTranches() int64 { +func (m *MsgSubmitBudgetProposal) GetTranches() int64 { if m != nil { - return m.RemainingTranches + return m.Tranches } return 0 } @@ -440,49 +440,49 @@ func init() { func init() { proto.RegisterFile("cosmos/protocolpool/v1/tx.proto", fileDescriptor_09efe14517e7f6dc) } var fileDescriptor_09efe14517e7f6dc = []byte{ - // 672 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4f, 0x6b, 0xdb, 0x4e, - 0x10, 0xf5, 0xc6, 0xbf, 0x18, 0xbc, 0xf9, 0x11, 0x1a, 0xe1, 0x3a, 0x8a, 0x48, 0x24, 0xc7, 0x87, - 0x62, 0x42, 0x2d, 0xd5, 0xe9, 0x3f, 0x48, 0x7b, 0xa9, 0x43, 0x7b, 0x33, 0x04, 0x27, 0xa7, 0x5e, - 0x8c, 0x2c, 0x2d, 0xca, 0x12, 0x4b, 0x23, 0xb4, 0xab, 0x34, 0x29, 0x14, 0x42, 0x4f, 0x3d, 0xf6, - 0x23, 0xe4, 0xdc, 0x53, 0x0e, 0xfd, 0x10, 0x81, 0xf6, 0x10, 0x7a, 0xea, 0xa9, 0x2d, 0xf6, 0x21, - 0x85, 0x7e, 0x89, 0x22, 0x69, 0x23, 0xdb, 0x58, 0x75, 0xea, 0x42, 0x4e, 0xb6, 0x67, 0xde, 0xbc, - 0x79, 0xf3, 0x76, 0x67, 0x8d, 0x35, 0x0b, 0x98, 0x0b, 0xcc, 0xf0, 0x03, 0xe0, 0x60, 0x41, 0xcf, - 0x07, 0xe8, 0x19, 0x87, 0x0d, 0x83, 0x1f, 0xe9, 0x71, 0x48, 0x2a, 0x27, 0x00, 0x7d, 0x14, 0xa0, - 0x1f, 0x36, 0x94, 0x92, 0x03, 0x0e, 0xc4, 0x41, 0x23, 0xfa, 0x96, 0xe4, 0x15, 0x55, 0xd0, 0x75, - 0x4d, 0x46, 0x8c, 0xc3, 0x46, 0x97, 0x70, 0xb3, 0x61, 0x58, 0x40, 0x3d, 0x91, 0x5f, 0x49, 0xf2, - 0x9d, 0xa4, 0x70, 0x94, 0x5a, 0x59, 0x16, 0xa5, 0x2e, 0x73, 0x22, 0x01, 0x2e, 0x73, 0x92, 0x44, - 0xf5, 0x13, 0xc2, 0xa5, 0x16, 0x73, 0x5e, 0x84, 0x9e, 0xbd, 0x0d, 0xae, 0x1b, 0x7a, 0x94, 0x1f, - 0xef, 0x00, 0xf4, 0x24, 0x0b, 0x17, 0x4c, 0x17, 0x42, 0x8f, 0xcb, 0xa8, 0x92, 0xaf, 0x2d, 0x6c, - 0xae, 0xe8, 0x82, 0x30, 0xea, 0xae, 0x8b, 0xee, 0xfa, 0x36, 0x50, 0xaf, 0x79, 0xef, 0xfc, 0x9b, - 0x96, 0xfb, 0xf0, 0x5d, 0xab, 0x39, 0x94, 0xef, 0x87, 0x5d, 0xdd, 0x02, 0x57, 0x74, 0x17, 0x1f, - 0x75, 0x66, 0x1f, 0x18, 0xfc, 0xd8, 0x27, 0x2c, 0x2e, 0x60, 0x6d, 0x41, 0x2d, 0x3d, 0xc2, 0x45, - 0x9b, 0xf8, 0xc0, 0x28, 0x87, 0x40, 0x9e, 0xab, 0xa0, 0x5a, 0xb1, 0x29, 0x7f, 0xf9, 0x58, 0x2f, - 0x89, 0x56, 0xcf, 0x6c, 0x3b, 0x20, 0x8c, 0xed, 0xf2, 0x80, 0x7a, 0x4e, 0x7b, 0x08, 0xdd, 0x2a, - 0xbf, 0x3b, 0xd5, 0x72, 0x3f, 0x4f, 0xb5, 0xdc, 0xdb, 0xcb, 0xb3, 0x8d, 0x61, 0xbc, 0xaa, 0xe2, - 0xd5, 0xac, 0x61, 0xda, 0x84, 0xf9, 0xe0, 0x31, 0x52, 0xed, 0x23, 0x7c, 0xbb, 0xc5, 0x9c, 0xb1, - 0xe4, 0xae, 0x4f, 0x3c, 0x3b, 0x52, 0x62, 0x86, 0x7c, 0x1f, 0x02, 0xca, 0x8f, 0x65, 0x74, 0x9d, - 0x92, 0x14, 0x2a, 0xad, 0xe2, 0x62, 0x40, 0x2c, 0xea, 0x53, 0xe2, 0xf1, 0x64, 0x82, 0xf6, 0x30, - 0x30, 0x62, 0x62, 0xfe, 0xc6, 0x4c, 0xdc, 0x5a, 0x8c, 0x4d, 0x48, 0x25, 0x55, 0x35, 0xbc, 0x96, - 0x39, 0x63, 0xea, 0xc2, 0xe7, 0x39, 0xbc, 0xdc, 0x62, 0xce, 0x6e, 0xd8, 0x75, 0x29, 0x6f, 0x86, - 0xb6, 0x43, 0xf8, 0x4e, 0x00, 0x3e, 0x30, 0xb3, 0xf7, 0xcf, 0x3e, 0x3c, 0xc7, 0x4b, 0xe9, 0xd8, - 0x1d, 0x33, 0x41, 0x5d, 0x7b, 0xa2, 0xb7, 0xd2, 0x12, 0x11, 0x97, 0x9e, 0xe2, 0xff, 0x39, 0x70, - 0xb3, 0xd7, 0xe9, 0xc6, 0xb2, 0xe4, 0x7c, 0x05, 0x4d, 0xb5, 0xad, 0xbd, 0x10, 0xc3, 0x93, 0x21, - 0xa4, 0x35, 0x8c, 0x19, 0x37, 0x03, 0xde, 0xe1, 0xd4, 0x25, 0xf2, 0x7f, 0x15, 0x54, 0xcb, 0xb7, - 0x8b, 0x71, 0x64, 0x8f, 0xba, 0x44, 0xaa, 0x63, 0x29, 0x20, 0xae, 0x49, 0x3d, 0xea, 0x39, 0x1d, - 0x1e, 0x98, 0x9e, 0xb5, 0x4f, 0x98, 0x3c, 0x1f, 0xc3, 0x96, 0xd2, 0xcc, 0x9e, 0x48, 0x48, 0x65, - 0x5c, 0xf0, 0x49, 0x40, 0xc1, 0x96, 0x0b, 0x31, 0x44, 0xfc, 0x9a, 0xf0, 0x7b, 0x1d, 0x6b, 0x7f, - 0x70, 0x33, 0x75, 0x1c, 0xf0, 0x62, 0x74, 0x24, 0x3d, 0x93, 0xba, 0x42, 0x6a, 0xa6, 0x5f, 0x68, - 0x56, 0xbf, 0xb6, 0xca, 0x91, 0x96, 0x49, 0xa6, 0xea, 0x1b, 0x5c, 0x1e, 0x6f, 0x78, 0x25, 0x65, - 0x6c, 0xaf, 0xd1, 0x0d, 0x5d, 0xc9, 0xcd, 0x5f, 0x79, 0x9c, 0x6f, 0x31, 0x47, 0x7a, 0x85, 0x97, - 0x26, 0x5f, 0x96, 0xbb, 0x7a, 0xf6, 0xab, 0xa7, 0x67, 0xad, 0xae, 0xf2, 0x60, 0x16, 0x74, 0x3a, - 0xe5, 0x6b, 0x2c, 0x65, 0x2c, 0x79, 0x7d, 0x0a, 0xd7, 0x24, 0x5c, 0x79, 0x38, 0x13, 0x3c, 0xed, - 0x7d, 0x82, 0x70, 0x29, 0x73, 0xb7, 0x8c, 0x29, 0x7c, 0x59, 0x05, 0xca, 0xe3, 0x19, 0x0b, 0x52, - 0x09, 0x04, 0x2f, 0x8c, 0x5e, 0xb6, 0x3b, 0xd3, 0x06, 0x19, 0xe2, 0x14, 0xfd, 0xef, 0x70, 0x57, - 0x6d, 0x94, 0xf9, 0x93, 0xcb, 0xb3, 0x0d, 0xd4, 0x7c, 0x72, 0xde, 0x57, 0xd1, 0x45, 0x5f, 0x45, - 0x3f, 0xfa, 0x2a, 0x7a, 0x3f, 0x50, 0x73, 0x17, 0x03, 0x35, 0xf7, 0x75, 0xa0, 0xe6, 0x5e, 0xae, - 0x27, 0x7c, 0xcc, 0x3e, 0xd0, 0x29, 0x18, 0x47, 0xe3, 0x7f, 0x84, 0xf1, 0xc5, 0xe9, 0x16, 0xe2, - 0xd8, 0xfd, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x20, 0xb0, 0xd3, 0xf8, 0x2c, 0x07, 0x00, 0x00, + // 662 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4f, 0x6f, 0xd3, 0x4e, + 0x10, 0xcd, 0x36, 0xbf, 0x46, 0xbf, 0x6c, 0x51, 0x45, 0xad, 0x90, 0xba, 0x56, 0x6b, 0xa7, 0x39, + 0xa0, 0xa8, 0xa2, 0x36, 0x29, 0xff, 0xa4, 0xc2, 0x85, 0x54, 0x70, 0x8b, 0x54, 0xa5, 0x9c, 0xb8, + 0x44, 0x8e, 0xbd, 0x72, 0x57, 0xb5, 0x3d, 0x96, 0x77, 0x5d, 0x5a, 0x24, 0xa4, 0x8a, 0x13, 0x47, + 0x3e, 0x42, 0xcf, 0x9c, 0x7a, 0xe0, 0xc2, 0x37, 0xa8, 0xc4, 0xa5, 0xe2, 0xc4, 0x09, 0x50, 0x7a, + 0x28, 0x12, 0x5f, 0x02, 0xd9, 0xde, 0x3a, 0x89, 0x62, 0x52, 0x82, 0xd4, 0x53, 0xb2, 0x33, 0x6f, + 0xde, 0xbc, 0x79, 0xd9, 0xd9, 0x60, 0xcd, 0x02, 0xe6, 0x01, 0x33, 0x82, 0x10, 0x38, 0x58, 0xe0, + 0x06, 0x00, 0xae, 0xb1, 0xdf, 0x34, 0xf8, 0x81, 0x9e, 0x84, 0xa4, 0x6a, 0x0a, 0xd0, 0x87, 0x01, + 0xfa, 0x7e, 0x53, 0xa9, 0x38, 0xe0, 0x40, 0x12, 0x34, 0xe2, 0x6f, 0x69, 0x5e, 0x51, 0x05, 0x5d, + 0xcf, 0x64, 0xc4, 0xd8, 0x6f, 0xf6, 0x08, 0x37, 0x9b, 0x86, 0x05, 0xd4, 0x17, 0xf9, 0xa5, 0x34, + 0xdf, 0x4d, 0x0b, 0x87, 0xa9, 0x95, 0x45, 0x51, 0xea, 0x31, 0x27, 0x16, 0xe0, 0x31, 0x27, 0x4d, + 0xd4, 0x3f, 0x23, 0x5c, 0x69, 0x33, 0xe7, 0x79, 0xe4, 0xdb, 0x5b, 0xe0, 0x79, 0x91, 0x4f, 0xf9, + 0xe1, 0x36, 0x80, 0x2b, 0x59, 0xb8, 0x64, 0x7a, 0x10, 0xf9, 0x5c, 0x46, 0xb5, 0x62, 0x63, 0x6e, + 0x63, 0x49, 0x17, 0x84, 0x71, 0x77, 0x5d, 0x74, 0xd7, 0xb7, 0x80, 0xfa, 0xad, 0xbb, 0xa7, 0xdf, + 0xb4, 0xc2, 0x87, 0xef, 0x5a, 0xc3, 0xa1, 0x7c, 0x37, 0xea, 0xe9, 0x16, 0x78, 0xa2, 0xbb, 0xf8, + 0x58, 0x67, 0xf6, 0x9e, 0xc1, 0x0f, 0x03, 0xc2, 0x92, 0x02, 0xd6, 0x11, 0xd4, 0xd2, 0x43, 0x5c, + 0xb6, 0x49, 0x00, 0x8c, 0x72, 0x08, 0xe5, 0x99, 0x1a, 0x6a, 0x94, 0x5b, 0xf2, 0x97, 0x8f, 0xeb, + 0x15, 0xd1, 0xea, 0xa9, 0x6d, 0x87, 0x84, 0xb1, 0x1d, 0x1e, 0x52, 0xdf, 0xe9, 0x0c, 0xa0, 0x9b, + 0xd5, 0x77, 0xc7, 0x5a, 0xe1, 0xe7, 0xb1, 0x56, 0x78, 0x7b, 0x71, 0xb2, 0x36, 0x88, 0xd7, 0x55, + 0xbc, 0x9c, 0x37, 0x4c, 0x87, 0xb0, 0x00, 0x7c, 0x46, 0xea, 0x7d, 0x84, 0x6f, 0xb5, 0x99, 0x33, + 0x92, 0xdc, 0x09, 0x88, 0x6f, 0xc7, 0x4a, 0xcc, 0x88, 0xef, 0x42, 0x48, 0xf9, 0xa1, 0x8c, 0xae, + 0x52, 0x92, 0x41, 0xa5, 0x65, 0x5c, 0x0e, 0x89, 0x45, 0x03, 0x4a, 0x7c, 0x9e, 0x4e, 0xd0, 0x19, + 0x04, 0x86, 0x4c, 0x2c, 0x5e, 0x9b, 0x89, 0x9b, 0xf3, 0x89, 0x09, 0x99, 0xa4, 0xba, 0x86, 0x57, + 0x72, 0x67, 0xcc, 0x5c, 0xf8, 0x34, 0x83, 0x17, 0xdb, 0xcc, 0xd9, 0x89, 0x7a, 0x1e, 0xe5, 0xad, + 0xc8, 0x76, 0x08, 0xdf, 0x0e, 0x21, 0x00, 0x66, 0xba, 0xff, 0xec, 0xc3, 0x33, 0xbc, 0x90, 0x8d, + 0xdd, 0x35, 0x53, 0xd4, 0x95, 0xbf, 0xe8, 0xcd, 0xac, 0x44, 0xc4, 0xa5, 0x27, 0xf8, 0x06, 0x07, + 0x6e, 0xba, 0xdd, 0x5e, 0x22, 0x4b, 0x2e, 0xd6, 0xd0, 0x44, 0xdb, 0x3a, 0x73, 0x09, 0x3c, 0x1d, + 0x42, 0x5a, 0xc1, 0x98, 0x71, 0x33, 0xe4, 0x5d, 0x4e, 0x3d, 0x22, 0xff, 0x57, 0x43, 0x8d, 0x62, + 0xa7, 0x9c, 0x44, 0x5e, 0x50, 0x8f, 0x48, 0x0a, 0xfe, 0x9f, 0x87, 0xa6, 0x6f, 0xed, 0x12, 0x26, + 0xcf, 0x26, 0xc9, 0xec, 0x2c, 0x55, 0x71, 0x29, 0x20, 0x21, 0x05, 0x5b, 0x2e, 0x25, 0x19, 0x71, + 0x1a, 0x33, 0x77, 0x15, 0x6b, 0x7f, 0xb0, 0x2e, 0xb3, 0x17, 0xf0, 0x7c, 0xec, 0xbf, 0x6b, 0x52, + 0x4f, 0xe8, 0xca, 0x35, 0x07, 0x4d, 0x6b, 0xce, 0x66, 0x35, 0xd6, 0x32, 0xce, 0x54, 0x7f, 0x83, + 0xab, 0xa3, 0x0d, 0x2f, 0xa5, 0x8c, 0x2c, 0x31, 0xba, 0xa6, 0xfb, 0xb7, 0xf1, 0xab, 0x88, 0x8b, + 0x6d, 0xe6, 0x48, 0xaf, 0xf0, 0xc2, 0xf8, 0x33, 0x72, 0x47, 0xcf, 0x7f, 0xe2, 0xf4, 0xbc, 0x3d, + 0x55, 0xee, 0x4f, 0x83, 0xce, 0xa6, 0x7c, 0x8d, 0xa5, 0x9c, 0x8d, 0x5e, 0x9f, 0xc0, 0x35, 0x0e, + 0x57, 0x1e, 0x4c, 0x05, 0xcf, 0x7a, 0x1f, 0x21, 0x5c, 0xc9, 0x5d, 0x24, 0x63, 0x02, 0x5f, 0x5e, + 0x81, 0xf2, 0x68, 0xca, 0x82, 0x4c, 0x02, 0xc1, 0x73, 0xc3, 0x97, 0xed, 0xf6, 0xa4, 0x41, 0x06, + 0x38, 0x45, 0xff, 0x3b, 0xdc, 0x65, 0x1b, 0x65, 0xf6, 0xe8, 0xe2, 0x64, 0x0d, 0xb5, 0x1e, 0x9f, + 0xf6, 0x55, 0x74, 0xd6, 0x57, 0xd1, 0x8f, 0xbe, 0x8a, 0xde, 0x9f, 0xab, 0x85, 0xb3, 0x73, 0xb5, + 0xf0, 0xf5, 0x5c, 0x2d, 0xbc, 0x5c, 0x4d, 0xf9, 0x98, 0xbd, 0xa7, 0x53, 0x30, 0x0e, 0x46, 0xff, + 0xf5, 0x92, 0x8b, 0xd3, 0x2b, 0x25, 0xb1, 0x7b, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xef, 0x33, + 0x08, 0x1b, 0x19, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -855,8 +855,8 @@ func (m *MsgSubmitBudgetProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x30 } - if m.RemainingTranches != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.RemainingTranches)) + if m.Tranches != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Tranches)) i-- dAtA[i] = 0x28 } @@ -1072,8 +1072,8 @@ func (m *MsgSubmitBudgetProposal) Size() (n int) { if m.StartTime != 0 { n += 1 + sovTx(uint64(m.StartTime)) } - if m.RemainingTranches != 0 { - n += 1 + sovTx(uint64(m.RemainingTranches)) + if m.Tranches != 0 { + n += 1 + sovTx(uint64(m.Tranches)) } if m.Period != 0 { n += 1 + sovTx(uint64(m.Period)) @@ -1634,9 +1634,9 @@ func (m *MsgSubmitBudgetProposal) Unmarshal(dAtA []byte) error { } case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RemainingTranches", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) } - m.RemainingTranches = 0 + m.Tranches = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1646,7 +1646,7 @@ func (m *MsgSubmitBudgetProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RemainingTranches |= int64(b&0x7F) << shift + m.Tranches |= int64(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/protocolpool/types/types.pb.go b/x/protocolpool/types/types.pb.go new file mode 100644 index 000000000000..0dd9811b8e29 --- /dev/null +++ b/x/protocolpool/types/types.pb.go @@ -0,0 +1,529 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/protocolpool/v1/types.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Budget struct { + // id defines the unique id of the budget. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` + TotalBudget *types.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` + StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + Tranches int64 `protobuf:"varint,5,opt,name=tranches,proto3" json:"tranches,omitempty"` + Period int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` +} + +func (m *Budget) Reset() { *m = Budget{} } +func (m *Budget) String() string { return proto.CompactTextString(m) } +func (*Budget) ProtoMessage() {} +func (*Budget) Descriptor() ([]byte, []int) { + return fileDescriptor_c1b7d0ea246d7f44, []int{0} +} +func (m *Budget) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Budget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Budget.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 *Budget) XXX_Merge(src proto.Message) { + xxx_messageInfo_Budget.Merge(m, src) +} +func (m *Budget) XXX_Size() int { + return m.Size() +} +func (m *Budget) XXX_DiscardUnknown() { + xxx_messageInfo_Budget.DiscardUnknown(m) +} + +var xxx_messageInfo_Budget proto.InternalMessageInfo + +func (m *Budget) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Budget) GetRecipientAddress() string { + if m != nil { + return m.RecipientAddress + } + return "" +} + +func (m *Budget) GetTotalBudget() *types.Coin { + if m != nil { + return m.TotalBudget + } + return nil +} + +func (m *Budget) GetStartTime() int64 { + if m != nil { + return m.StartTime + } + return 0 +} + +func (m *Budget) GetTranches() int64 { + if m != nil { + return m.Tranches + } + return 0 +} + +func (m *Budget) GetPeriod() int64 { + if m != nil { + return m.Period + } + return 0 +} + +func init() { + proto.RegisterType((*Budget)(nil), "cosmos.protocolpool.v1.Budget") +} + +func init() { + proto.RegisterFile("cosmos/protocolpool/v1/types.proto", fileDescriptor_c1b7d0ea246d7f44) +} + +var fileDescriptor_c1b7d0ea246d7f44 = []byte{ + // 317 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0x41, 0x4e, 0xf3, 0x30, + 0x10, 0x85, 0xeb, 0xb6, 0x7f, 0xf4, 0xd7, 0x45, 0x08, 0x22, 0x54, 0xb9, 0x95, 0xb0, 0x42, 0x57, + 0xd9, 0x60, 0x2b, 0xb0, 0x84, 0x0d, 0x45, 0x5c, 0x20, 0xb0, 0x62, 0x13, 0x25, 0xb1, 0x55, 0x2c, + 0xda, 0x38, 0xb2, 0x87, 0x0a, 0x6e, 0xc1, 0x61, 0x38, 0x04, 0xcb, 0x8a, 0x15, 0x4b, 0xd4, 0x5c, + 0x80, 0x23, 0x20, 0x1c, 0xab, 0x2a, 0xcb, 0xf9, 0xde, 0x9b, 0x99, 0x27, 0x3d, 0x3c, 0x2d, 0xb5, + 0x5d, 0x6a, 0xcb, 0x6b, 0xa3, 0x41, 0x97, 0x7a, 0x51, 0x6b, 0xbd, 0xe0, 0xab, 0x84, 0xc3, 0x4b, + 0x2d, 0x2d, 0x73, 0x34, 0x1c, 0xb5, 0x1e, 0xb6, 0xeb, 0x61, 0xab, 0x64, 0x32, 0x6e, 0x79, 0xe6, + 0x38, 0xdf, 0x35, 0x4d, 0xa8, 0x3f, 0x5b, 0xe4, 0x56, 0xf2, 0x55, 0x52, 0x48, 0xc8, 0x13, 0x5e, + 0x6a, 0x55, 0xb5, 0xfa, 0xf4, 0x1b, 0xe1, 0x60, 0xf6, 0x24, 0xe6, 0x12, 0xc2, 0x7d, 0xdc, 0x55, + 0x82, 0xa0, 0x08, 0xc5, 0xfd, 0xb4, 0xab, 0x44, 0x78, 0x83, 0x0f, 0x8d, 0x2c, 0x55, 0xad, 0x64, + 0x05, 0x59, 0x2e, 0x84, 0x91, 0xd6, 0x92, 0x6e, 0x84, 0xe2, 0xc1, 0x8c, 0x7c, 0xbc, 0x9d, 0x1e, + 0xf9, 0x3f, 0x57, 0xad, 0x72, 0x0b, 0x46, 0x55, 0xf3, 0xf4, 0x60, 0xbb, 0xe2, 0x79, 0x78, 0x89, + 0xf7, 0x40, 0x43, 0xbe, 0xc8, 0x0a, 0xf7, 0x86, 0xf4, 0x22, 0x14, 0x0f, 0xcf, 0xc6, 0xcc, 0xaf, + 0xff, 0x06, 0x63, 0x3e, 0x18, 0xbb, 0xd6, 0xaa, 0x4a, 0x87, 0xce, 0xee, 0x43, 0x1d, 0x63, 0x6c, + 0x21, 0x37, 0x90, 0x81, 0x5a, 0x4a, 0xd2, 0x8f, 0x50, 0xdc, 0x4b, 0x07, 0x8e, 0xdc, 0xa9, 0xa5, + 0x0c, 0x27, 0xf8, 0x3f, 0x98, 0xbc, 0x2a, 0x1f, 0xa4, 0x25, 0xff, 0x9c, 0xb8, 0x9d, 0xc3, 0x11, + 0x0e, 0x6a, 0x69, 0x94, 0x16, 0x24, 0x70, 0x8a, 0x9f, 0x66, 0x17, 0xef, 0x1b, 0x8a, 0xd6, 0x1b, + 0x8a, 0xbe, 0x36, 0x14, 0xbd, 0x36, 0xb4, 0xb3, 0x6e, 0x68, 0xe7, 0xb3, 0xa1, 0x9d, 0xfb, 0x93, + 0x36, 0x93, 0x15, 0x8f, 0x4c, 0x69, 0xfe, 0xfc, 0xb7, 0x0b, 0x57, 0x44, 0x11, 0x38, 0x76, 0xfe, + 0x13, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x39, 0x0b, 0x40, 0xaf, 0x01, 0x00, 0x00, +} + +func (m *Budget) 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 *Budget) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Budget) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Period != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Period)) + i-- + dAtA[i] = 0x30 + } + if m.Tranches != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Tranches)) + i-- + dAtA[i] = 0x28 + } + if m.StartTime != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.StartTime)) + i-- + dAtA[i] = 0x20 + } + if m.TotalBudget != nil { + { + size, err := m.TotalBudget.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.RecipientAddress) > 0 { + i -= len(m.RecipientAddress) + copy(dAtA[i:], m.RecipientAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.RecipientAddress))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Budget) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovTypes(uint64(m.Id)) + } + l = len(m.RecipientAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.TotalBudget != nil { + l = m.TotalBudget.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.StartTime != 0 { + n += 1 + sovTypes(uint64(m.StartTime)) + } + if m.Tranches != 0 { + n += 1 + sovTypes(uint64(m.Tranches)) + } + if m.Period != 0 { + n += 1 + sovTypes(uint64(m.Period)) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Budget) 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: Budget: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Budget: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecipientAddress", 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.RecipientAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalBudget", 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 + } + if m.TotalBudget == nil { + m.TotalBudget = &types.Coin{} + } + if err := m.TotalBudget.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + m.StartTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StartTime |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) + } + m.Tranches = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Tranches |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + m.Period = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Period |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) From a015286091562c4ea3e64313e1dfb6215ca4eed5 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 26 Oct 2023 12:24:53 +0530 Subject: [PATCH 36/69] more updates --- x/protocolpool/keeper/keeper.go | 24 ++++++++++++++++++------ x/protocolpool/keeper/msg_server.go | 3 +-- x/protocolpool/types/msg.go | 10 ++++++++++ 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index b0ad16991185..9a5076affc64 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -28,7 +28,7 @@ type Keeper struct { // State Schema collections.Schema - BudgetProposal collections.Map[sdk.AccAddress, types.MsgSubmitBudgetProposal] + BudgetProposal collections.Map[sdk.AccAddress, types.Budget] } func NewKeeper(cdc codec.BinaryCodec, storeService storetypes.KVStoreService, @@ -46,7 +46,7 @@ func NewKeeper(cdc codec.BinaryCodec, storeService storetypes.KVStoreService, bankKeeper: bk, cdc: cdc, authority: authority, - BudgetProposal: collections.NewMap(sb, types.BudgetKey, "budget", sdk.AccAddressKey, codec.CollValue[types.MsgSubmitBudgetProposal](cdc)), + BudgetProposal: collections.NewMap(sb, types.BudgetKey, "budget", sdk.AccAddressKey, codec.CollValue[types.Budget](cdc)), } schema, err := sb.Build() @@ -105,6 +105,18 @@ func (k Keeper) ClaimFunds(ctx context.Context, recipient sdk.AccAddress) (amoun return amount, nil } +func (k Keeper) SubmitBudgetProposal(ctx context.Context, recipient sdk.AccAddress, totalBudget sdk.Coin, startTime, tranches, period int64) (types.Budget, error) { + budgetProposal := types.NewBudgetProposal(recipient, totalBudget, startTime, tranches, period) + + // set budget proposal in state + err := k.BudgetProposal.Set(ctx, recipient, *budgetProposal) + if err != nil { + return types.Budget{}, err + } + + return *budgetProposal, nil +} + func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) (amount sdk.Coin, err error) { sdkCtx := sdk.UnwrapSDKContext(ctx) @@ -117,7 +129,7 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) } // check if the distribution is completed - if budget.RemainingTranches <= 0 { + if budget.Tranches <= 0 { // remove the entry of budget ended recipient err := k.BudgetProposal.Remove(ctx, recipient) if err != nil { @@ -145,11 +157,11 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) if periodsPassed > 0 { // Calculate the amount to distribute for all passed periods - coinsToDistribute := math.NewInt(periodsPassed).Mul(budget.TotalBudget.Amount.QuoRaw(budget.RemainingTranches)) + coinsToDistribute := math.NewInt(periodsPassed).Mul(budget.TotalBudget.Amount.QuoRaw(budget.Tranches)) amount := sdk.NewCoin(budget.TotalBudget.Denom, coinsToDistribute) // update the budget's remaining tranches - budget.RemainingTranches -= periodsPassed + budget.Tranches -= periodsPassed // update the TotalBudget amount budget.TotalBudget.Amount.Sub(coinsToDistribute) @@ -184,7 +196,7 @@ func (k Keeper) validateBudgetProposal(ctx context.Context, bp types.MsgSubmitBu return fmt.Errorf("start time must be a positive value") } - if bp.RemainingTranches <= 0 { + if bp.Tranches <= 0 { return fmt.Errorf("remaining tranches must be a positive value") } diff --git a/x/protocolpool/keeper/msg_server.go b/x/protocolpool/keeper/msg_server.go index 34f6fdced101..b3bc9ae3c8ba 100644 --- a/x/protocolpool/keeper/msg_server.go +++ b/x/protocolpool/keeper/msg_server.go @@ -50,8 +50,7 @@ func (k MsgServer) SubmitBudgetProposal(ctx context.Context, msg *types.MsgSubmi return nil, err } - // set budget proposal in state - err = k.BudgetProposal.Set(ctx, recipient, *msg) + _, err = k.Keeper.SubmitBudgetProposal(ctx, recipient, *msg.TotalBudget, msg.StartTime, msg.Tranches, msg.Period) if err != nil { return nil, err } diff --git a/x/protocolpool/types/msg.go b/x/protocolpool/types/msg.go index c25616d8b584..66b06185d084 100644 --- a/x/protocolpool/types/msg.go +++ b/x/protocolpool/types/msg.go @@ -27,3 +27,13 @@ func NewCommunityPoolSpend(amount sdk.Coins, authority, recipient string) *MsgCo Amount: amount, } } + +func NewBudgetProposal(recipient sdk.AccAddress, totalBudget sdk.Coin, startTime, tranches, period int64) *Budget { + return &Budget{ + RecipientAddress: recipient.String(), + TotalBudget: &totalBudget, + StartTime: startTime, + Tranches: tranches, + Period: period, + } +} From 19d1cff010c4710cb6996c5837d8031c401da58a Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Thu, 26 Oct 2023 07:04:10 +0000 Subject: [PATCH 37/69] cleanup --- api/cosmos/protocolpool/v1/types.pulsar.go | 105 +++++--------------- proto/cosmos/protocolpool/v1/types.proto | 17 ++-- x/protocolpool/types/types.pb.go | 110 ++++++++------------- 3 files changed, 75 insertions(+), 157 deletions(-) diff --git a/api/cosmos/protocolpool/v1/types.pulsar.go b/api/cosmos/protocolpool/v1/types.pulsar.go index d089f8a2f5bc..7f76ea45239a 100644 --- a/api/cosmos/protocolpool/v1/types.pulsar.go +++ b/api/cosmos/protocolpool/v1/types.pulsar.go @@ -16,7 +16,6 @@ import ( var ( md_Budget protoreflect.MessageDescriptor - fd_Budget_id protoreflect.FieldDescriptor fd_Budget_recipient_address protoreflect.FieldDescriptor fd_Budget_total_budget protoreflect.FieldDescriptor fd_Budget_start_time protoreflect.FieldDescriptor @@ -27,7 +26,6 @@ var ( func init() { file_cosmos_protocolpool_v1_types_proto_init() md_Budget = File_cosmos_protocolpool_v1_types_proto.Messages().ByName("Budget") - fd_Budget_id = md_Budget.Fields().ByName("id") fd_Budget_recipient_address = md_Budget.Fields().ByName("recipient_address") fd_Budget_total_budget = md_Budget.Fields().ByName("total_budget") fd_Budget_start_time = md_Budget.Fields().ByName("start_time") @@ -100,12 +98,6 @@ func (x *fastReflection_Budget) Interface() protoreflect.ProtoMessage { // 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.Id != uint64(0) { - value := protoreflect.ValueOfUint64(x.Id) - if !f(fd_Budget_id, value) { - return - } - } if x.RecipientAddress != "" { value := protoreflect.ValueOfString(x.RecipientAddress) if !f(fd_Budget_recipient_address, value) { @@ -151,8 +143,6 @@ func (x *fastReflection_Budget) Range(f func(protoreflect.FieldDescriptor, proto // 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.id": - return x.Id != uint64(0) case "cosmos.protocolpool.v1.Budget.recipient_address": return x.RecipientAddress != "" case "cosmos.protocolpool.v1.Budget.total_budget": @@ -179,8 +169,6 @@ func (x *fastReflection_Budget) Has(fd protoreflect.FieldDescriptor) bool { // 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.id": - x.Id = uint64(0) case "cosmos.protocolpool.v1.Budget.recipient_address": x.RecipientAddress = "" case "cosmos.protocolpool.v1.Budget.total_budget": @@ -207,9 +195,6 @@ func (x *fastReflection_Budget) Clear(fd protoreflect.FieldDescriptor) { // 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.id": - value := x.Id - return protoreflect.ValueOfUint64(value) case "cosmos.protocolpool.v1.Budget.recipient_address": value := x.RecipientAddress return protoreflect.ValueOfString(value) @@ -245,8 +230,6 @@ func (x *fastReflection_Budget) Get(descriptor protoreflect.FieldDescriptor) pro // 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.id": - x.Id = value.Uint() case "cosmos.protocolpool.v1.Budget.recipient_address": x.RecipientAddress = value.Interface().(string) case "cosmos.protocolpool.v1.Budget.total_budget": @@ -282,8 +265,6 @@ func (x *fastReflection_Budget) Mutable(fd protoreflect.FieldDescriptor) protore x.TotalBudget = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.TotalBudget.ProtoReflect()) - case "cosmos.protocolpool.v1.Budget.id": - panic(fmt.Errorf("field id of message cosmos.protocolpool.v1.Budget is not mutable")) 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.start_time": @@ -305,8 +286,6 @@ func (x *fastReflection_Budget) Mutable(fd protoreflect.FieldDescriptor) protore // 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.id": - return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.Budget.recipient_address": return protoreflect.ValueOfString("") case "cosmos.protocolpool.v1.Budget.total_budget": @@ -387,9 +366,6 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } l = len(x.RecipientAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) @@ -439,17 +415,17 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { if x.Period != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x28 } if x.Tranches != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Tranches)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x20 } if x.StartTime != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.StartTime)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x18 } if x.TotalBudget != nil { encoded, err := options.Marshal(x.TotalBudget) @@ -463,19 +439,14 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x1a + 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] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -527,25 +498,6 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { } switch fieldNum { case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 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.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RecipientAddress", wireType) } @@ -577,7 +529,7 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { } x.RecipientAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalBudget", wireType) } @@ -613,7 +565,7 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 4: + case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) } @@ -632,7 +584,7 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { break } } - case 5: + case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) } @@ -651,7 +603,7 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { break } } - case 6: + case 5: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } @@ -723,13 +675,16 @@ type Budget struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // id defines the unique id of the budget. - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` // recipient address - TotalBudget *v1beta1.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` // total budget amount - StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // start_time in seconds - Tranches int64 `protobuf:"varint,5,opt,name=tranches,proto3" json:"tranches,omitempty"` // tranches are the no. of times the distribution needs to be done on the total amount. - Period int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` // period is the interval of blocks funds are distributed + // 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"` + // total_budget is the total amount allocated for the budget. + TotalBudget *v1beta1.Coin `protobuf:"bytes,2,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` + // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. + StartTime int64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // tranches is the number of times the total budget amount is to be distributed. + Tranches int64 `protobuf:"varint,4,opt,name=tranches,proto3" json:"tranches,omitempty"` + // period is the interval (in blocks) between each distribution of funds. + Period int64 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"` } func (x *Budget) Reset() { @@ -752,13 +707,6 @@ func (*Budget) Descriptor() ([]byte, []int) { return file_cosmos_protocolpool_v1_types_proto_rawDescGZIP(), []int{0} } -func (x *Budget) GetId() uint64 { - if x != nil { - return x.Id - } - return 0 -} - func (x *Budget) GetRecipientAddress() string { if x != nil { return x.RecipientAddress @@ -804,21 +752,20 @@ var file_cosmos_protocolpool_v1_types_proto_rawDesc = []byte{ 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, 0x22, 0xf0, 0x01, 0x0a, 0x06, 0x42, 0x75, 0x64, 0x67, - 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, - 0x69, 0x64, 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, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe0, 0x01, 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, 0x3c, 0x0a, 0x0c, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 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, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 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, 0x03, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, - 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 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, diff --git a/proto/cosmos/protocolpool/v1/types.proto b/proto/cosmos/protocolpool/v1/types.proto index 42cb706955b1..d2bf7f256627 100644 --- a/proto/cosmos/protocolpool/v1/types.proto +++ b/proto/cosmos/protocolpool/v1/types.proto @@ -7,11 +7,14 @@ import "cosmos_proto/cosmos.proto"; import "cosmos/base/v1beta1/coin.proto"; message Budget { - // id defines the unique id of the budget. - uint64 id = 1; - string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // recipient address - cosmos.base.v1beta1.Coin total_budget = 3; // total budget amount - int64 start_time = 4; // start_time in seconds - int64 tranches = 5; // tranches are the no. of times the distribution needs to be done on the total amount. - int64 period = 6; // period is the interval of blocks funds are distributed + // recipient_address is the address of the recipient who can claim the budget. + string recipient_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // total_budget is the total amount allocated for the budget. + cosmos.base.v1beta1.Coin total_budget = 2; + // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. + int64 start_time = 3; + // tranches is the number of times the total budget amount is to be distributed. + int64 tranches = 4; + // period is the interval (in blocks) between each distribution of funds. + int64 period = 5; } \ No newline at end of file diff --git a/x/protocolpool/types/types.pb.go b/x/protocolpool/types/types.pb.go index 0dd9811b8e29..bec63d164fbd 100644 --- a/x/protocolpool/types/types.pb.go +++ b/x/protocolpool/types/types.pb.go @@ -25,13 +25,16 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Budget struct { - // id defines the unique id of the budget. - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` - TotalBudget *types.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` - StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - Tranches int64 `protobuf:"varint,5,opt,name=tranches,proto3" json:"tranches,omitempty"` - Period int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` + // 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"` + // total_budget is the total amount allocated for the budget. + TotalBudget *types.Coin `protobuf:"bytes,2,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` + // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. + StartTime int64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // tranches is the number of times the total budget amount is to be distributed. + Tranches int64 `protobuf:"varint,4,opt,name=tranches,proto3" json:"tranches,omitempty"` + // period is the interval (in blocks) between each distribution of funds. + Period int64 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"` } func (m *Budget) Reset() { *m = Budget{} } @@ -67,13 +70,6 @@ func (m *Budget) XXX_DiscardUnknown() { var xxx_messageInfo_Budget proto.InternalMessageInfo -func (m *Budget) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - func (m *Budget) GetRecipientAddress() string { if m != nil { return m.RecipientAddress @@ -118,27 +114,26 @@ func init() { } var fileDescriptor_c1b7d0ea246d7f44 = []byte{ - // 317 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0x41, 0x4e, 0xf3, 0x30, - 0x10, 0x85, 0xeb, 0xb6, 0x7f, 0xf4, 0xd7, 0x45, 0x08, 0x22, 0x54, 0xb9, 0x95, 0xb0, 0x42, 0x57, - 0xd9, 0x60, 0x2b, 0xb0, 0x84, 0x0d, 0x45, 0x5c, 0x20, 0xb0, 0x62, 0x13, 0x25, 0xb1, 0x55, 0x2c, - 0xda, 0x38, 0xb2, 0x87, 0x0a, 0x6e, 0xc1, 0x61, 0x38, 0x04, 0xcb, 0x8a, 0x15, 0x4b, 0xd4, 0x5c, - 0x80, 0x23, 0x20, 0x1c, 0xab, 0x2a, 0xcb, 0xf9, 0xde, 0x9b, 0x99, 0x27, 0x3d, 0x3c, 0x2d, 0xb5, - 0x5d, 0x6a, 0xcb, 0x6b, 0xa3, 0x41, 0x97, 0x7a, 0x51, 0x6b, 0xbd, 0xe0, 0xab, 0x84, 0xc3, 0x4b, - 0x2d, 0x2d, 0x73, 0x34, 0x1c, 0xb5, 0x1e, 0xb6, 0xeb, 0x61, 0xab, 0x64, 0x32, 0x6e, 0x79, 0xe6, - 0x38, 0xdf, 0x35, 0x4d, 0xa8, 0x3f, 0x5b, 0xe4, 0x56, 0xf2, 0x55, 0x52, 0x48, 0xc8, 0x13, 0x5e, - 0x6a, 0x55, 0xb5, 0xfa, 0xf4, 0x1b, 0xe1, 0x60, 0xf6, 0x24, 0xe6, 0x12, 0xc2, 0x7d, 0xdc, 0x55, - 0x82, 0xa0, 0x08, 0xc5, 0xfd, 0xb4, 0xab, 0x44, 0x78, 0x83, 0x0f, 0x8d, 0x2c, 0x55, 0xad, 0x64, - 0x05, 0x59, 0x2e, 0x84, 0x91, 0xd6, 0x92, 0x6e, 0x84, 0xe2, 0xc1, 0x8c, 0x7c, 0xbc, 0x9d, 0x1e, - 0xf9, 0x3f, 0x57, 0xad, 0x72, 0x0b, 0x46, 0x55, 0xf3, 0xf4, 0x60, 0xbb, 0xe2, 0x79, 0x78, 0x89, - 0xf7, 0x40, 0x43, 0xbe, 0xc8, 0x0a, 0xf7, 0x86, 0xf4, 0x22, 0x14, 0x0f, 0xcf, 0xc6, 0xcc, 0xaf, - 0xff, 0x06, 0x63, 0x3e, 0x18, 0xbb, 0xd6, 0xaa, 0x4a, 0x87, 0xce, 0xee, 0x43, 0x1d, 0x63, 0x6c, - 0x21, 0x37, 0x90, 0x81, 0x5a, 0x4a, 0xd2, 0x8f, 0x50, 0xdc, 0x4b, 0x07, 0x8e, 0xdc, 0xa9, 0xa5, - 0x0c, 0x27, 0xf8, 0x3f, 0x98, 0xbc, 0x2a, 0x1f, 0xa4, 0x25, 0xff, 0x9c, 0xb8, 0x9d, 0xc3, 0x11, - 0x0e, 0x6a, 0x69, 0x94, 0x16, 0x24, 0x70, 0x8a, 0x9f, 0x66, 0x17, 0xef, 0x1b, 0x8a, 0xd6, 0x1b, - 0x8a, 0xbe, 0x36, 0x14, 0xbd, 0x36, 0xb4, 0xb3, 0x6e, 0x68, 0xe7, 0xb3, 0xa1, 0x9d, 0xfb, 0x93, - 0x36, 0x93, 0x15, 0x8f, 0x4c, 0x69, 0xfe, 0xfc, 0xb7, 0x0b, 0x57, 0x44, 0x11, 0x38, 0x76, 0xfe, - 0x13, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x39, 0x0b, 0x40, 0xaf, 0x01, 0x00, 0x00, + // 301 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0x31, 0x4e, 0xc3, 0x30, + 0x18, 0x85, 0x6b, 0x0a, 0x15, 0x75, 0x19, 0x20, 0x42, 0x95, 0x5b, 0x09, 0xab, 0x74, 0xea, 0x82, + 0xad, 0xc0, 0x08, 0x0b, 0x45, 0x5c, 0xa0, 0x30, 0xb1, 0x44, 0x4e, 0x62, 0x15, 0x8b, 0x36, 0x7f, + 0x64, 0xff, 0x54, 0x70, 0x0b, 0x0e, 0xc3, 0x21, 0x18, 0x2b, 0x26, 0xc6, 0x2a, 0xb9, 0x08, 0xc2, + 0xb1, 0xaa, 0x32, 0xfe, 0xdf, 0x7b, 0xff, 0xd3, 0xd3, 0xa3, 0xe3, 0x0c, 0xdc, 0x12, 0x9c, 0x2c, + 0x2d, 0x20, 0x64, 0xb0, 0x28, 0x01, 0x16, 0x72, 0x15, 0x4b, 0x7c, 0x2f, 0xb5, 0x13, 0x9e, 0x46, + 0xfd, 0xc6, 0x23, 0x76, 0x3d, 0x62, 0x15, 0x0f, 0x07, 0x0d, 0x4f, 0x3c, 0x97, 0xbb, 0xa6, 0x21, + 0x0f, 0xb1, 0xa9, 0x72, 0x5a, 0xae, 0xe2, 0x54, 0xa3, 0x8a, 0x65, 0x06, 0xa6, 0x68, 0xf4, 0xf1, + 0x86, 0xd0, 0xce, 0xf4, 0x35, 0x9f, 0x6b, 0x8c, 0xee, 0xe9, 0x89, 0xd5, 0x99, 0x29, 0x8d, 0x2e, + 0x30, 0x51, 0x79, 0x6e, 0xb5, 0x73, 0x8c, 0x8c, 0xc8, 0xa4, 0x3b, 0x65, 0xdf, 0x9f, 0x17, 0xa7, + 0x21, 0xf7, 0xb6, 0x51, 0x1e, 0xd0, 0x9a, 0x62, 0x3e, 0x3b, 0xde, 0xbe, 0x04, 0x1e, 0xdd, 0xd0, + 0x23, 0x04, 0x54, 0x8b, 0x24, 0xf5, 0xb1, 0x6c, 0x6f, 0x44, 0x26, 0xbd, 0xcb, 0x81, 0x08, 0xef, + 0x7f, 0x45, 0x44, 0x28, 0x22, 0xee, 0xc0, 0x14, 0xb3, 0x9e, 0xb7, 0x87, 0x12, 0x67, 0x94, 0x3a, + 0x54, 0x16, 0x13, 0x34, 0x4b, 0xcd, 0xda, 0x23, 0x32, 0x69, 0xcf, 0xba, 0x9e, 0x3c, 0x9a, 0xa5, + 0x8e, 0x86, 0xf4, 0x10, 0xad, 0x2a, 0xb2, 0x67, 0xed, 0xd8, 0xbe, 0x17, 0xb7, 0x77, 0xd4, 0xa7, + 0x9d, 0x52, 0x5b, 0x03, 0x39, 0x3b, 0xf0, 0x4a, 0xb8, 0xa6, 0xd7, 0x5f, 0x15, 0x27, 0xeb, 0x8a, + 0x93, 0x4d, 0xc5, 0xc9, 0x47, 0xcd, 0x5b, 0xeb, 0x9a, 0xb7, 0x7e, 0x6a, 0xde, 0x7a, 0x3a, 0x6f, + 0x3a, 0xb9, 0xfc, 0x45, 0x18, 0x90, 0x6f, 0xff, 0xb7, 0xf7, 0xc3, 0xa7, 0x1d, 0xcf, 0xae, 0x7e, + 0x03, 0x00, 0x00, 0xff, 0xff, 0x80, 0x41, 0xe5, 0x25, 0x9f, 0x01, 0x00, 0x00, } func (m *Budget) Marshal() (dAtA []byte, err error) { @@ -164,17 +159,17 @@ func (m *Budget) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.Period != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Period)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x28 } if m.Tranches != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Tranches)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x20 } if m.StartTime != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.StartTime)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x18 } if m.TotalBudget != nil { { @@ -186,19 +181,14 @@ func (m *Budget) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } if len(m.RecipientAddress) > 0 { i -= len(m.RecipientAddress) copy(dAtA[i:], m.RecipientAddress) i = encodeVarintTypes(dAtA, i, uint64(len(m.RecipientAddress))) i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -220,9 +210,6 @@ func (m *Budget) Size() (n int) { } var l int _ = l - if m.Id != 0 { - n += 1 + sovTypes(uint64(m.Id)) - } l = len(m.RecipientAddress) if l > 0 { n += 1 + l + sovTypes(uint64(l)) @@ -279,25 +266,6 @@ func (m *Budget) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RecipientAddress", wireType) } @@ -329,7 +297,7 @@ func (m *Budget) Unmarshal(dAtA []byte) error { } m.RecipientAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TotalBudget", wireType) } @@ -365,7 +333,7 @@ func (m *Budget) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) } @@ -384,7 +352,7 @@ func (m *Budget) Unmarshal(dAtA []byte) error { break } } - case 5: + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) } @@ -403,7 +371,7 @@ func (m *Budget) Unmarshal(dAtA []byte) error { break } } - case 6: + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } From 0ede17af0271b7e85afc617992a6380184f2b2e0 Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Thu, 26 Oct 2023 08:01:28 +0000 Subject: [PATCH 38/69] more proto changes --- api/cosmos/protocolpool/v1/query.pulsar.go | 39 +++++++------- api/cosmos/protocolpool/v1/types.pulsar.go | 1 + proto/cosmos/protocolpool/v1/query.proto | 2 +- proto/cosmos/protocolpool/v1/types.proto | 1 + x/protocolpool/types/query.pb.go | 62 +++++++++++----------- x/protocolpool/types/query.pb.gw.go | 44 ++++++++++----- x/protocolpool/types/types.pb.go | 1 + 7 files changed, 86 insertions(+), 64 deletions(-) diff --git a/api/cosmos/protocolpool/v1/query.pulsar.go b/api/cosmos/protocolpool/v1/query.pulsar.go index 698c5a694ad1..da14ea0d6bf5 100644 --- a/api/cosmos/protocolpool/v1/query.pulsar.go +++ b/api/cosmos/protocolpool/v1/query.pulsar.go @@ -1911,7 +1911,7 @@ var file_cosmos_protocolpool_v1_query_proto_rawDesc = []byte{ 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, 0x52, 0x0f, 0x75, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, - 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xe1, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, + 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xeb, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xa6, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 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, 0x51, 0x75, 0x65, @@ -1922,7 +1922,7 @@ var file_cosmos_protocolpool_v1_query_proto_rawDesc = []byte{ 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0xae, 0x01, 0x0a, 0x0f, 0x55, + 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0xb8, 0x01, 0x0a, 0x0f, 0x55, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x63, @@ -1930,24 +1930,25 @@ var file_cosmos_protocolpool_v1_query_proto_rawDesc = []byte{ 0x65, 0x73, 0x74, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x42, 0x75, 0x64, 0x67, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2a, 0x12, 0x28, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x34, 0x12, 0x32, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x6e, 0x63, 0x6c, 0x61, - 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 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, 0x51, 0x75, 0x65, 0x72, - 0x79, 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, + 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x2f, 0x7b, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x7d, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 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 ( diff --git a/api/cosmos/protocolpool/v1/types.pulsar.go b/api/cosmos/protocolpool/v1/types.pulsar.go index 7f76ea45239a..ddba447e56f8 100644 --- a/api/cosmos/protocolpool/v1/types.pulsar.go +++ b/api/cosmos/protocolpool/v1/types.pulsar.go @@ -670,6 +670,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Budget defines the fields of a budget proposal. type Budget struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/proto/cosmos/protocolpool/v1/query.proto b/proto/cosmos/protocolpool/v1/query.proto index a19eb7ff0021..b09c71e3c64b 100644 --- a/proto/cosmos/protocolpool/v1/query.proto +++ b/proto/cosmos/protocolpool/v1/query.proto @@ -17,7 +17,7 @@ service Query { // UnclaimedBudget queries the remaining budget left to be claimed. rpc UnclaimedBudget(QueryUnclaimedBudgetRequest) returns (QueryUnclaimedBudgetResponse) { - option (google.api.http).get = "/cosmos/protocolpool/v1/unclaimed_budget"; + option (google.api.http).get = "/cosmos/protocolpool/v1/unclaimed_budget/{address}"; } } diff --git a/proto/cosmos/protocolpool/v1/types.proto b/proto/cosmos/protocolpool/v1/types.proto index d2bf7f256627..c8c6f8ff8749 100644 --- a/proto/cosmos/protocolpool/v1/types.proto +++ b/proto/cosmos/protocolpool/v1/types.proto @@ -6,6 +6,7 @@ option go_package = "cosmossdk.io/x/protocolpool/types"; import "cosmos_proto/cosmos.proto"; import "cosmos/base/v1beta1/coin.proto"; +// Budget defines the fields of a budget proposal. message Budget { // recipient_address is the address of the recipient who can claim the budget. string recipient_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; diff --git a/x/protocolpool/types/query.pb.go b/x/protocolpool/types/query.pb.go index e797491354ac..4b2de8f916d5 100644 --- a/x/protocolpool/types/query.pb.go +++ b/x/protocolpool/types/query.pb.go @@ -223,37 +223,37 @@ func init() { } var fileDescriptor_51500a0a77d57843 = []byte{ - // 468 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcb, 0x6e, 0xd3, 0x40, - 0x14, 0x86, 0x33, 0xe5, 0x26, 0xa6, 0x42, 0x45, 0xa3, 0x0a, 0x25, 0x6e, 0xe4, 0x16, 0x2f, 0x50, - 0x04, 0xea, 0x0c, 0x76, 0xd8, 0xb1, 0x6a, 0xda, 0x07, 0xa0, 0x41, 0x6c, 0xd8, 0x44, 0xbe, 0x8c, - 0xcc, 0xa8, 0xf6, 0x1c, 0x37, 0x33, 0x8e, 0xc8, 0x16, 0x5e, 0x00, 0x89, 0x77, 0x60, 0xc1, 0x82, - 0x15, 0x0f, 0xd1, 0x65, 0x05, 0x1b, 0x56, 0x5c, 0x12, 0x1e, 0x04, 0x79, 0x3c, 0x86, 0x16, 0x39, - 0x95, 0xb2, 0xb2, 0x75, 0xfe, 0xf9, 0xff, 0xf3, 0x9d, 0x39, 0x83, 0xbd, 0x18, 0x54, 0x0e, 0x8a, - 0x15, 0x53, 0xd0, 0x10, 0x43, 0x56, 0x00, 0x64, 0x6c, 0xe6, 0xb3, 0xd3, 0x92, 0x4f, 0xe7, 0xd4, - 0x54, 0xc9, 0xbd, 0xfa, 0x0c, 0xbd, 0x78, 0x86, 0xce, 0x7c, 0x67, 0x3b, 0x85, 0x14, 0x4c, 0x91, - 0x55, 0x7f, 0xb5, 0xee, 0xf4, 0x53, 0x80, 0x34, 0xe3, 0x2c, 0x2c, 0x04, 0x0b, 0xa5, 0x04, 0x1d, - 0x6a, 0x01, 0xd2, 0xba, 0x1d, 0xd7, 0xf6, 0x8b, 0x42, 0xc5, 0xd9, 0xcc, 0x8f, 0xb8, 0x0e, 0x7d, - 0x16, 0x83, 0x90, 0x56, 0xef, 0xd5, 0xfa, 0xa4, 0x8e, 0xbd, 0xd8, 0xd8, 0xdb, 0xc1, 0xbd, 0xe3, - 0x8a, 0xea, 0x10, 0xf2, 0xbc, 0x94, 0x42, 0xcf, 0x9f, 0x01, 0x64, 0x63, 0x7e, 0x5a, 0x72, 0xa5, - 0xbd, 0xb7, 0x08, 0x3b, 0x6d, 0xaa, 0x2a, 0x40, 0x2a, 0x4e, 0x38, 0xbe, 0x5e, 0x51, 0x77, 0xd1, - 0xde, 0xb5, 0xc1, 0x66, 0xd0, 0xa7, 0x36, 0xb8, 0xa2, 0xa0, 0x96, 0x82, 0x1e, 0xf1, 0xf8, 0x10, - 0x84, 0x1c, 0x0d, 0xcf, 0xbe, 0xef, 0x76, 0x3e, 0xfe, 0xd8, 0x7d, 0x94, 0x0a, 0xfd, 0xaa, 0x8c, - 0x68, 0x0c, 0xb9, 0x05, 0xb1, 0x9f, 0x7d, 0x95, 0x9c, 0x30, 0x3d, 0x2f, 0xb8, 0x6a, 0x3c, 0x6a, - 0x6c, 0xe2, 0xbd, 0x63, 0xbc, 0x63, 0x20, 0x5e, 0xc8, 0x38, 0x0b, 0x45, 0xce, 0x93, 0x51, 0x99, - 0xa4, 0x5c, 0x5b, 0x48, 0x12, 0xe0, 0x5b, 0x61, 0x92, 0x4c, 0xb9, 0x52, 0x5d, 0xb4, 0x87, 0x06, - 0xb7, 0x47, 0xdd, 0x2f, 0x9f, 0xf7, 0xb7, 0x2d, 0xcb, 0x41, 0xad, 0x3c, 0xd7, 0x53, 0x21, 0xd3, - 0x71, 0x73, 0xd0, 0x4b, 0x70, 0xbf, 0x3d, 0xd2, 0x4e, 0x76, 0x84, 0xef, 0x96, 0x8d, 0x34, 0x09, - 0x73, 0x28, 0xa5, 0x36, 0xe1, 0x9b, 0x41, 0xaf, 0x75, 0xca, 0x0a, 0x77, 0xbc, 0xf5, 0xd7, 0x72, - 0x60, 0x1c, 0xc1, 0xaf, 0x0d, 0x7c, 0xc3, 0xb4, 0x21, 0x1f, 0x10, 0xbe, 0x73, 0xe9, 0x0e, 0x89, - 0x4f, 0xdb, 0xf7, 0x4f, 0x57, 0x6e, 0xc3, 0x09, 0xd6, 0xb1, 0xd4, 0x83, 0x78, 0xf4, 0xcd, 0xd7, - 0xdf, 0xef, 0x37, 0x06, 0xe4, 0x01, 0x5b, 0xf1, 0x24, 0xe3, 0xc6, 0x36, 0xa9, 0x2a, 0xe4, 0x13, - 0xc2, 0x5b, 0xff, 0x5d, 0x0a, 0x19, 0x5e, 0xd9, 0xb7, 0x7d, 0x2b, 0xce, 0x93, 0xf5, 0x4c, 0x16, - 0xf7, 0xb1, 0xc1, 0x7d, 0x48, 0x06, 0xab, 0x70, 0xff, 0x6d, 0x25, 0x32, 0xce, 0xd1, 0xd3, 0xb3, - 0x85, 0x8b, 0xce, 0x17, 0x2e, 0xfa, 0xb9, 0x70, 0xd1, 0xbb, 0xa5, 0xdb, 0x39, 0x5f, 0xba, 0x9d, - 0x6f, 0x4b, 0xb7, 0xf3, 0xf2, 0x7e, 0x1d, 0xa1, 0x92, 0x13, 0x2a, 0x80, 0xbd, 0xbe, 0x1c, 0x65, - 0x1e, 0x5a, 0x74, 0xd3, 0xd4, 0x86, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x7f, 0x77, 0xbf, - 0xb0, 0x03, 0x00, 0x00, + // 476 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcd, 0x6e, 0xd3, 0x40, + 0x14, 0x85, 0x33, 0xe5, 0x4f, 0x4c, 0x85, 0x8a, 0x46, 0x15, 0x4a, 0xdc, 0xc8, 0x2d, 0x5e, 0xa0, + 0x48, 0xa8, 0x33, 0xb2, 0xd3, 0x15, 0xac, 0x9a, 0xf6, 0x01, 0x68, 0x10, 0x1b, 0x36, 0x91, 0x7f, + 0x46, 0x66, 0x54, 0x7b, 0xae, 0x9b, 0x19, 0x47, 0x44, 0x88, 0x0d, 0xbc, 0x00, 0x12, 0xef, 0xc0, + 0x82, 0x35, 0x0b, 0x1e, 0xa1, 0xcb, 0x0a, 0x36, 0xac, 0x00, 0x25, 0xec, 0x78, 0x09, 0xe4, 0xf1, + 0x18, 0x5a, 0xe4, 0x54, 0xea, 0xca, 0xd6, 0x3d, 0x73, 0xce, 0xfd, 0xee, 0xdc, 0xc1, 0x5e, 0x0c, + 0x2a, 0x07, 0xc5, 0x8a, 0x29, 0x68, 0x88, 0x21, 0x2b, 0x00, 0x32, 0x36, 0xf3, 0xd9, 0x49, 0xc9, + 0xa7, 0x73, 0x6a, 0xaa, 0xe4, 0x5e, 0x7d, 0x86, 0x9e, 0x3f, 0x43, 0x67, 0xbe, 0xb3, 0x99, 0x42, + 0x0a, 0xa6, 0xc8, 0xaa, 0xbf, 0x5a, 0x77, 0xfa, 0x29, 0x40, 0x9a, 0x71, 0x16, 0x16, 0x82, 0x85, + 0x52, 0x82, 0x0e, 0xb5, 0x00, 0x69, 0xdd, 0x8e, 0x6b, 0xfb, 0x45, 0xa1, 0xe2, 0x6c, 0xe6, 0x47, + 0x5c, 0x87, 0x3e, 0x8b, 0x41, 0x48, 0xab, 0xf7, 0x6a, 0x7d, 0x52, 0xc7, 0x9e, 0x6f, 0xec, 0x6d, + 0xe1, 0xde, 0x51, 0x45, 0x75, 0x00, 0x79, 0x5e, 0x4a, 0xa1, 0xe7, 0x4f, 0x00, 0xb2, 0x31, 0x3f, + 0x29, 0xb9, 0xd2, 0xde, 0x5b, 0x84, 0x9d, 0x36, 0x55, 0x15, 0x20, 0x15, 0x27, 0x1c, 0x5f, 0xaf, + 0xa8, 0xbb, 0x68, 0xe7, 0xda, 0x60, 0x3d, 0xe8, 0x53, 0x1b, 0x5c, 0x51, 0x50, 0x4b, 0x41, 0x0f, + 0x79, 0x7c, 0x00, 0x42, 0x8e, 0x86, 0xa7, 0xdf, 0xb7, 0x3b, 0x1f, 0x7f, 0x6c, 0x3f, 0x4c, 0x85, + 0x7e, 0x51, 0x46, 0x34, 0x86, 0xdc, 0x82, 0xd8, 0xcf, 0xae, 0x4a, 0x8e, 0x99, 0x9e, 0x17, 0x5c, + 0x35, 0x1e, 0x35, 0x36, 0xf1, 0xde, 0x11, 0xde, 0x32, 0x10, 0xcf, 0x64, 0x9c, 0x85, 0x22, 0xe7, + 0xc9, 0xa8, 0x4c, 0x52, 0xae, 0x2d, 0x24, 0x09, 0xf0, 0xad, 0x30, 0x49, 0xa6, 0x5c, 0xa9, 0x2e, + 0xda, 0x41, 0x83, 0xdb, 0xa3, 0xee, 0x97, 0x4f, 0xbb, 0x9b, 0x96, 0x65, 0xbf, 0x56, 0x9e, 0xea, + 0xa9, 0x90, 0xe9, 0xb8, 0x39, 0xe8, 0x25, 0xb8, 0xdf, 0x1e, 0x69, 0x27, 0x3b, 0xc4, 0x77, 0xcb, + 0x46, 0x9a, 0x84, 0x39, 0x94, 0x52, 0x9b, 0xf0, 0xf5, 0xa0, 0xd7, 0x3a, 0x65, 0x85, 0x3b, 0xde, + 0xf8, 0x6b, 0xd9, 0x37, 0x8e, 0xe0, 0xf7, 0x1a, 0xbe, 0x61, 0xda, 0x90, 0x0f, 0x08, 0xdf, 0xb9, + 0x70, 0x87, 0xc4, 0xa7, 0xed, 0xfb, 0xa7, 0x2b, 0xb7, 0xe1, 0x04, 0x57, 0xb1, 0xd4, 0x83, 0x78, + 0xf4, 0xcd, 0xd7, 0x5f, 0xef, 0xd7, 0x06, 0xe4, 0x01, 0x5b, 0xf1, 0x24, 0xe3, 0xc6, 0x36, 0xa9, + 0x2a, 0xe4, 0x33, 0xc2, 0x1b, 0xff, 0x5d, 0x0a, 0x19, 0x5e, 0xda, 0xb7, 0x7d, 0x2b, 0xce, 0xde, + 0xd5, 0x4c, 0x16, 0xf7, 0x91, 0xc1, 0xdd, 0x23, 0xc1, 0x2a, 0xdc, 0x7f, 0x5b, 0x89, 0x8c, 0x93, + 0xbd, 0xb2, 0x2b, 0x7d, 0x3d, 0x7a, 0x7c, 0xba, 0x70, 0xd1, 0xd9, 0xc2, 0x45, 0x3f, 0x17, 0x2e, + 0x7a, 0xb7, 0x74, 0x3b, 0x67, 0x4b, 0xb7, 0xf3, 0x6d, 0xe9, 0x76, 0x9e, 0xdf, 0xaf, 0xc3, 0x54, + 0x72, 0x4c, 0x05, 0xb0, 0x97, 0x17, 0x43, 0xcd, 0x93, 0x8b, 0x6e, 0x9a, 0xda, 0xf0, 0x4f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xf3, 0x35, 0xd6, 0x68, 0xba, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/protocolpool/types/query.pb.gw.go b/x/protocolpool/types/query.pb.gw.go index 9116e71c9741..a107cd3de92e 100644 --- a/x/protocolpool/types/query.pb.gw.go +++ b/x/protocolpool/types/query.pb.gw.go @@ -51,19 +51,26 @@ func local_request_Query_CommunityPool_0(ctx context.Context, marshaler runtime. } -var ( - filter_Query_UnclaimedBudget_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - func request_Query_UnclaimedBudget_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryUnclaimedBudgetRequest var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UnclaimedBudget_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } msg, err := client.UnclaimedBudget(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -75,11 +82,22 @@ func local_request_Query_UnclaimedBudget_0(ctx context.Context, marshaler runtim var protoReq QueryUnclaimedBudgetRequest var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UnclaimedBudget_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } msg, err := server.UnclaimedBudget(ctx, &protoReq) @@ -226,7 +244,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_CommunityPool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "protocolpool", "v1", "community_pool"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_UnclaimedBudget_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "protocolpool", "v1", "unclaimed_budget"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_UnclaimedBudget_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "protocolpool", "v1", "unclaimed_budget", "address"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/protocolpool/types/types.pb.go b/x/protocolpool/types/types.pb.go index bec63d164fbd..7f758d5e3e73 100644 --- a/x/protocolpool/types/types.pb.go +++ b/x/protocolpool/types/types.pb.go @@ -24,6 +24,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Budget defines the fields of a budget proposal. type Budget struct { // 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"` From 7323da31dd113388f106b7a7815096db4e270810 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 26 Oct 2023 14:47:37 +0530 Subject: [PATCH 39/69] address few comments --- x/protocolpool/keeper/grpc_query.go | 1 + x/protocolpool/keeper/keeper.go | 14 +------------- x/protocolpool/keeper/msg_server.go | 7 +++++-- x/protocolpool/types/msg.go | 4 ++-- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/x/protocolpool/keeper/grpc_query.go b/x/protocolpool/keeper/grpc_query.go index 8cd0e78946af..f701684d1100 100644 --- a/x/protocolpool/keeper/grpc_query.go +++ b/x/protocolpool/keeper/grpc_query.go @@ -33,6 +33,7 @@ func (k Querier) CommunityPool(ctx context.Context, req *types.QueryCommunityPoo return &types.QueryCommunityPoolResponse{Pool: decCoins}, nil } +// UnclaimedBudget queries the unclaimed budget for given recipient func (k Querier) UnclaimedBudget(ctx context.Context, req *types.QueryUnclaimedBudgetRequest) (*types.QueryUnclaimedBudgetResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 9a5076affc64..5c050822c954 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -89,7 +89,7 @@ func (k Keeper) GetCommunityPool(ctx context.Context) (sdk.Coins, error) { return k.bankKeeper.GetAllBalances(ctx, moduleAccount.GetAddress()), nil } -func (k Keeper) ClaimFunds(ctx context.Context, recipient sdk.AccAddress) (amount sdk.Coin, err error) { +func (k Keeper) claimFunds(ctx context.Context, recipient sdk.AccAddress) (amount sdk.Coin, err error) { // get claimable funds from distribution info amount, err = k.getClaimableFunds(ctx, recipient) if err != nil { @@ -105,18 +105,6 @@ func (k Keeper) ClaimFunds(ctx context.Context, recipient sdk.AccAddress) (amoun return amount, nil } -func (k Keeper) SubmitBudgetProposal(ctx context.Context, recipient sdk.AccAddress, totalBudget sdk.Coin, startTime, tranches, period int64) (types.Budget, error) { - budgetProposal := types.NewBudgetProposal(recipient, totalBudget, startTime, tranches, period) - - // set budget proposal in state - err := k.BudgetProposal.Set(ctx, recipient, *budgetProposal) - if err != nil { - return types.Budget{}, err - } - - return *budgetProposal, nil -} - func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) (amount sdk.Coin, err error) { sdkCtx := sdk.UnwrapSDKContext(ctx) diff --git a/x/protocolpool/keeper/msg_server.go b/x/protocolpool/keeper/msg_server.go index b3bc9ae3c8ba..42a1a76d57c9 100644 --- a/x/protocolpool/keeper/msg_server.go +++ b/x/protocolpool/keeper/msg_server.go @@ -28,7 +28,7 @@ func (k MsgServer) ClaimBudget(ctx context.Context, msg *types.MsgClaimBudget) ( return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid recipient address: %s", err) } - amount, err := k.ClaimFunds(ctx, recipient) + amount, err := k.claimFunds(ctx, recipient) if err != nil { return nil, err } @@ -50,7 +50,10 @@ func (k MsgServer) SubmitBudgetProposal(ctx context.Context, msg *types.MsgSubmi return nil, err } - _, err = k.Keeper.SubmitBudgetProposal(ctx, recipient, *msg.TotalBudget, msg.StartTime, msg.Tranches, msg.Period) + budgetProposal := types.NewBudgetProposal(msg.RecipientAddress, *msg.TotalBudget, msg.StartTime, msg.Tranches, msg.Period) + + // set budget proposal in state + err = k.BudgetProposal.Set(ctx, recipient, *budgetProposal) if err != nil { return nil, err } diff --git a/x/protocolpool/types/msg.go b/x/protocolpool/types/msg.go index 66b06185d084..668b154fb34d 100644 --- a/x/protocolpool/types/msg.go +++ b/x/protocolpool/types/msg.go @@ -28,9 +28,9 @@ func NewCommunityPoolSpend(amount sdk.Coins, authority, recipient string) *MsgCo } } -func NewBudgetProposal(recipient sdk.AccAddress, totalBudget sdk.Coin, startTime, tranches, period int64) *Budget { +func NewBudgetProposal(recipient string, totalBudget sdk.Coin, startTime, tranches, period int64) *Budget { return &Budget{ - RecipientAddress: recipient.String(), + RecipientAddress: recipient, TotalBudget: &totalBudget, StartTime: startTime, Tranches: tranches, From 8eeb1e7e7f6ccbe402901f8f5425ff7375dca017 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 26 Oct 2023 16:09:59 +0530 Subject: [PATCH 40/69] fix claim funds logic --- proto/cosmos/protocolpool/v1/tx.proto | 17 +++++++++++----- proto/cosmos/protocolpool/v1/types.proto | 4 +++- x/protocolpool/keeper/keeper.go | 26 +++++++++++++----------- 3 files changed, 29 insertions(+), 18 deletions(-) diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index 976a2975b02b..6b91bc7b328a 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -67,11 +67,18 @@ message MsgSubmitBudgetProposal { // authority is the address that controls the module (defaults to x/gov unless overwritten). string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // recipient address - cosmos.base.v1beta1.Coin total_budget = 3; // total budget amount - int64 start_time = 4; // start_time in seconds - int64 tranches = 5; // tranches are the no. of times the distribution needs to be done on the total amount. - int64 period = 6; // period is the interval of blocks funds are distributed + // recipient_address is the address of the recipient who can claim the budget. + string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // total_budget is the total amount allocated for the budget. + cosmos.base.v1beta1.Coin total_budget = 3; + // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. + int64 start_time = 4; + // tranches is the number of times the total budget amount is to be distributed. + int64 tranches = 5; + // 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). + int64 period = 6; } // MsgSubmitBudgetProposalResponse defines the response to executing a diff --git a/proto/cosmos/protocolpool/v1/types.proto b/proto/cosmos/protocolpool/v1/types.proto index c8c6f8ff8749..a566613dc350 100644 --- a/proto/cosmos/protocolpool/v1/types.proto +++ b/proto/cosmos/protocolpool/v1/types.proto @@ -16,6 +16,8 @@ message Budget { int64 start_time = 3; // tranches is the number of times the total budget amount is to be distributed. int64 tranches = 4; - // period is the interval (in blocks) between each distribution of funds. + // 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). int64 period = 5; } \ No newline at end of file diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 5c050822c954..f0e063e5f6a8 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -129,19 +129,21 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) } currentTime := sdkCtx.BlockTime().Unix() - + startTime := budget.StartTime + if budget.StartTime == 0 { + startTime = sdkCtx.HeaderInfo().Time.Unix() + } // Check if the start time is reached - if currentTime < budget.StartTime { + if currentTime < startTime { return sdk.Coin{}, fmt.Errorf("distribution has not started yet") } - // Calculate the number of blocks elapsed since the start time - blocksElapsed := sdkCtx.BlockHeight() - budget.Period - - // Check if its time to distribute funds based on period intervals - if blocksElapsed > 0 { + // Calculate the time elapsed since the start time + timeElapsed := currentTime - startTime + // Check the time elapsed has passed period length + if timeElapsed >= budget.Period { // Calculate how many periods have passed - periodsPassed := blocksElapsed / budget.Period + periodsPassed := timeElapsed / budget.Period if periodsPassed > 0 { // Calculate the amount to distribute for all passed periods @@ -180,16 +182,16 @@ func (k Keeper) validateBudgetProposal(ctx context.Context, bp types.MsgSubmitBu return err } - if bp.StartTime <= 0 { - return fmt.Errorf("start time must be a positive value") + if bp.StartTime < 0 { + return fmt.Errorf("invalid start time") } if bp.Tranches <= 0 { - return fmt.Errorf("remaining tranches must be a positive value") + return fmt.Errorf("tranches must be a positive value") } if bp.Period <= 0 { - return fmt.Errorf("period should be a positive value") + return fmt.Errorf("period length should be a positive value") } return nil From 6faa47cd1823701e62ebf2ebe7016a6d9008fff5 Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Thu, 26 Oct 2023 10:45:10 +0000 Subject: [PATCH 41/69] run proto-gen --- api/cosmos/protocolpool/v1/tx.pulsar.go | 19 +++++++++++++------ api/cosmos/protocolpool/v1/types.pulsar.go | 4 +++- proto/cosmos/protocolpool/v1/tx.proto | 10 +++++----- x/protocolpool/types/tx.pb.go | 19 +++++++++++++------ x/protocolpool/types/types.pb.go | 4 +++- 5 files changed, 37 insertions(+), 19 deletions(-) diff --git a/api/cosmos/protocolpool/v1/tx.pulsar.go b/api/cosmos/protocolpool/v1/tx.pulsar.go index 7d48829afd9c..debb91bc246c 100644 --- a/api/cosmos/protocolpool/v1/tx.pulsar.go +++ b/api/cosmos/protocolpool/v1/tx.pulsar.go @@ -4001,12 +4001,19 @@ type MsgSubmitBudgetProposal struct { 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 string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` // recipient address - TotalBudget *v1beta1.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` // total budget amount - StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // start_time in seconds - Tranches int64 `protobuf:"varint,5,opt,name=tranches,proto3" json:"tranches,omitempty"` // tranches are the no. of times the distribution needs to be done on the total amount. - Period int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` // period is the interval of blocks funds are distributed + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // recipient_address 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"` + // total_budget is the total amount allocated for the budget. + TotalBudget *v1beta1.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` + // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. + StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // tranches is the number of times the total budget amount is to be distributed. + Tranches int64 `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 int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` } func (x *MsgSubmitBudgetProposal) Reset() { diff --git a/api/cosmos/protocolpool/v1/types.pulsar.go b/api/cosmos/protocolpool/v1/types.pulsar.go index ddba447e56f8..b7066d0f5b2d 100644 --- a/api/cosmos/protocolpool/v1/types.pulsar.go +++ b/api/cosmos/protocolpool/v1/types.pulsar.go @@ -684,7 +684,9 @@ type Budget struct { StartTime int64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // tranches is the number of times the total budget amount is to be distributed. Tranches int64 `protobuf:"varint,4,opt,name=tranches,proto3" json:"tranches,omitempty"` - // period is the interval (in blocks) between each distribution of funds. + // 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 int64 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"` } diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index 6b91bc7b328a..da7cde5b564c 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -66,19 +66,19 @@ message MsgSubmitBudgetProposal { 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"]; + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // recipient_address is the address of the recipient who can claim the budget. - string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // total_budget is the total amount allocated for the budget. - cosmos.base.v1beta1.Coin total_budget = 3; + cosmos.base.v1beta1.Coin total_budget = 3; // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. - int64 start_time = 4; + int64 start_time = 4; // tranches is the number of times the total budget amount is to be distributed. int64 tranches = 5; // 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). - int64 period = 6; + int64 period = 6; } // MsgSubmitBudgetProposalResponse defines the response to executing a diff --git a/x/protocolpool/types/tx.pb.go b/x/protocolpool/types/tx.pb.go index dc1c049ee024..b03c5ee53b92 100644 --- a/x/protocolpool/types/tx.pb.go +++ b/x/protocolpool/types/tx.pb.go @@ -214,12 +214,19 @@ var xxx_messageInfo_MsgCommunityPoolSpendResponse proto.InternalMessageInfo // MsgSubmitBudgetProposal defines budget proposal type. type MsgSubmitBudgetProposal 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"` - RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` - TotalBudget *types.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` - StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - Tranches int64 `protobuf:"varint,5,opt,name=tranches,proto3" json:"tranches,omitempty"` - Period int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // recipient_address 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"` + // total_budget is the total amount allocated for the budget. + TotalBudget *types.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` + // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. + StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // tranches is the number of times the total budget amount is to be distributed. + Tranches int64 `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 int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` } func (m *MsgSubmitBudgetProposal) Reset() { *m = MsgSubmitBudgetProposal{} } diff --git a/x/protocolpool/types/types.pb.go b/x/protocolpool/types/types.pb.go index 7f758d5e3e73..9709aa40466d 100644 --- a/x/protocolpool/types/types.pb.go +++ b/x/protocolpool/types/types.pb.go @@ -34,7 +34,9 @@ type Budget struct { StartTime int64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // tranches is the number of times the total budget amount is to be distributed. Tranches int64 `protobuf:"varint,4,opt,name=tranches,proto3" json:"tranches,omitempty"` - // period is the interval (in blocks) between each distribution of funds. + // 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 int64 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"` } From df4f3caccfa5f6286593bda02ad523223071c754 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Mon, 30 Oct 2023 13:55:59 +0530 Subject: [PATCH 42/69] add tests --- x/protocolpool/keeper/grpc_query.go | 2 +- x/protocolpool/keeper/grpc_query_test.go | 67 +++++++ x/protocolpool/keeper/keeper.go | 6 +- x/protocolpool/keeper/keeper_test.go | 71 ++++++++ x/protocolpool/keeper/msg_server_test.go | 220 +++++++++++++++++++++++ 5 files changed, 362 insertions(+), 4 deletions(-) create mode 100644 x/protocolpool/keeper/grpc_query_test.go create mode 100644 x/protocolpool/keeper/keeper_test.go create mode 100644 x/protocolpool/keeper/msg_server_test.go diff --git a/x/protocolpool/keeper/grpc_query.go b/x/protocolpool/keeper/grpc_query.go index f701684d1100..5366f360f974 100644 --- a/x/protocolpool/keeper/grpc_query.go +++ b/x/protocolpool/keeper/grpc_query.go @@ -40,7 +40,7 @@ func (k Querier) UnclaimedBudget(ctx context.Context, req *types.QueryUnclaimedB } address, err := k.Keeper.authKeeper.AddressCodec().StringToBytes(req.Address) if err != nil { - return nil, status.Errorf(codes.InvalidArgument, "invalid address: %s", err.Error()) + return nil, status.Errorf(codes.InvalidArgument, "invalid recipient address: %s", err.Error()) } budget, err := k.Keeper.BudgetProposal.Get(ctx, address) if err != nil { diff --git a/x/protocolpool/keeper/grpc_query_test.go b/x/protocolpool/keeper/grpc_query_test.go new file mode 100644 index 000000000000..935dc20e29ae --- /dev/null +++ b/x/protocolpool/keeper/grpc_query_test.go @@ -0,0 +1,67 @@ +package keeper_test + +import ( + "cosmossdk.io/x/protocolpool/keeper" + "cosmossdk.io/x/protocolpool/types" +) + +func (suite *KeeperTestSuite) TestUnclaimedBudget() { + queryServer := keeper.NewQuerier(suite.poolKeeper) + testCases := []struct { + name string + preRun func() + req *types.QueryUnclaimedBudgetRequest + expErr bool + expErrMsg string + }{ + { + name: "empty recipient address", + req: &types.QueryUnclaimedBudgetRequest{ + Address: "", + }, + expErr: true, + expErrMsg: "empty address string is not allowed", + }, + { + name: "no budget proposal found", + req: &types.QueryUnclaimedBudgetRequest{ + Address: recipientAddr.String(), + }, + expErr: true, + expErrMsg: "no budget proposal found for address", + }, + { + name: "valid case", + preRun: func() { + // Prepare a valid budget proposal + budget := types.Budget{ + RecipientAddress: recipientAddr.String(), + TotalBudget: &fooCoin, + StartTime: suite.ctx.BlockTime().Unix() - 70, + Tranches: 2, + Period: 60, + } + suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) + }, + req: &types.QueryUnclaimedBudgetRequest{ + Address: recipientAddr.String(), + }, + expErr: false, + }, + } + for _, tc := range testCases { + suite.Run(tc.name, func() { + if tc.preRun != nil { + tc.preRun() + } + resp, err := queryServer.UnclaimedBudget(suite.ctx, tc.req) + if tc.expErr { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expErrMsg) + } else { + suite.Require().NoError(err) + suite.Require().Equal(resp.UnclaimedAmount, &fooCoin) + } + }) + } +} diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index f0e063e5f6a8..1e48f0958a66 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -165,11 +165,11 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) } return amount, nil - } else { - return sdk.Coin{}, fmt.Errorf("budget period has not passed yet") } - + } else { + return sdk.Coin{}, fmt.Errorf("budget period has not passed yet") } + return sdk.Coin{}, nil } diff --git a/x/protocolpool/keeper/keeper_test.go b/x/protocolpool/keeper/keeper_test.go new file mode 100644 index 000000000000..84419a65bc2c --- /dev/null +++ b/x/protocolpool/keeper/keeper_test.go @@ -0,0 +1,71 @@ +package keeper_test + +import ( + "testing" + "time" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/suite" + + "cosmossdk.io/core/header" + storetypes "cosmossdk.io/store/types" + poolkeeper "cosmossdk.io/x/protocolpool/keeper" + pooltestutil "cosmossdk.io/x/protocolpool/testutil" + pooltypes "cosmossdk.io/x/protocolpool/types" + + "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +var poolAcc = authtypes.NewEmptyModuleAccount(pooltypes.ModuleName) + +type KeeperTestSuite struct { + suite.Suite + + ctx sdk.Context + poolKeeper poolkeeper.Keeper + bankKeeper *pooltestutil.MockBankKeeper + msgServer pooltypes.MsgServer +} + +func (s *KeeperTestSuite) SetupTest() { + key := storetypes.NewKVStoreKey(pooltypes.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) + ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) + encCfg := moduletestutil.MakeTestEncodingConfig() + + // gomock initializations + ctrl := gomock.NewController(s.T()) + accountKeeper := pooltestutil.NewMockAccountKeeper(ctrl) + accountKeeper.EXPECT().GetModuleAddress(pooltypes.ModuleName).Return(poolAcc.GetAddress()) + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() + + bankKeeper := pooltestutil.NewMockBankKeeper(ctrl) + s.bankKeeper = bankKeeper + + poolKeeper := poolkeeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + authtypes.NewModuleAddress(pooltypes.GovModuleName).String(), + ) + s.ctx = ctx + s.poolKeeper = poolKeeper + + pooltypes.RegisterInterfaces(encCfg.InterfaceRegistry) + s.msgServer = poolkeeper.NewMsgServerImpl(poolKeeper) +} + +func (s *KeeperTestSuite) mockSendCoinsFromModuleToAccount(accAddr sdk.AccAddress) { + s.bankKeeper.EXPECT().SendCoinsFromModuleToAccount(s.ctx, pooltypes.ModuleName, accAddr, gomock.Any()).AnyTimes() +} + +func TestKeeperTestSuite(t *testing.T) { + suite.Run(t, new(KeeperTestSuite)) +} diff --git a/x/protocolpool/keeper/msg_server_test.go b/x/protocolpool/keeper/msg_server_test.go new file mode 100644 index 000000000000..54417e5b8b19 --- /dev/null +++ b/x/protocolpool/keeper/msg_server_test.go @@ -0,0 +1,220 @@ +package keeper_test + +import ( + "cosmossdk.io/x/protocolpool/types" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var ( + recipientAddr = sdk.AccAddress([]byte("to1__________________")) + + fooCoin = sdk.NewInt64Coin("foo", 100) +) + +func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { + invalidCoin := sdk.NewInt64Coin("foo", 0) + testCases := map[string]struct { + preRun func() + input *types.MsgSubmitBudgetProposal + expErr bool + expErrMsg string + }{ + "empty recipient address": { + input: &types.MsgSubmitBudgetProposal{ + Authority: suite.poolKeeper.GetAuthority(), + RecipientAddress: "", + TotalBudget: &fooCoin, + StartTime: suite.ctx.BlockTime().Unix(), + Tranches: 2, + Period: 60, + }, + expErr: true, + expErrMsg: "empty address string is not allowed", + }, + "empty authority": { + input: &types.MsgSubmitBudgetProposal{ + Authority: "", + RecipientAddress: recipientAddr.String(), + TotalBudget: &fooCoin, + StartTime: suite.ctx.BlockTime().Unix(), + Tranches: 2, + Period: 60, + }, + expErr: true, + expErrMsg: "empty address string is not allowed", + }, + "invalid authority": { + input: &types.MsgSubmitBudgetProposal{ + Authority: "invalid_authority", + RecipientAddress: recipientAddr.String(), + TotalBudget: &fooCoin, + StartTime: suite.ctx.BlockTime().Unix(), + Tranches: 2, + Period: 60, + }, + expErr: true, + expErrMsg: "invalid authority", + }, + "invalid budget": { + input: &types.MsgSubmitBudgetProposal{ + Authority: suite.poolKeeper.GetAuthority(), + RecipientAddress: recipientAddr.String(), + TotalBudget: &invalidCoin, + StartTime: suite.ctx.BlockTime().Unix(), + Tranches: 2, + Period: 60, + }, + expErr: true, + expErrMsg: "total budget cannot be zero", + }, + "invalid start time": { + input: &types.MsgSubmitBudgetProposal{ + Authority: suite.poolKeeper.GetAuthority(), + RecipientAddress: recipientAddr.String(), + TotalBudget: &fooCoin, + StartTime: -10, + Tranches: 2, + Period: 60, + }, + expErr: true, + expErrMsg: "invalid start time", + }, + "invalid tranches": { + input: &types.MsgSubmitBudgetProposal{ + Authority: suite.poolKeeper.GetAuthority(), + RecipientAddress: recipientAddr.String(), + TotalBudget: &fooCoin, + StartTime: suite.ctx.BlockTime().Unix(), + Tranches: 0, + Period: 60, + }, + expErr: true, + expErrMsg: "tranches must be a positive value", + }, + "invalid period": { + input: &types.MsgSubmitBudgetProposal{ + Authority: suite.poolKeeper.GetAuthority(), + RecipientAddress: recipientAddr.String(), + TotalBudget: &fooCoin, + StartTime: suite.ctx.BlockTime().Unix(), + Tranches: 2, + Period: 0, + }, + expErr: true, + expErrMsg: "period length should be a positive value", + }, + "all good": { + input: &types.MsgSubmitBudgetProposal{ + Authority: suite.poolKeeper.GetAuthority(), + RecipientAddress: recipientAddr.String(), + TotalBudget: &fooCoin, + StartTime: suite.ctx.BlockTime().Unix(), + Tranches: 2, + Period: 60, + }, + expErr: false, + }, + } + + for name, tc := range testCases { + suite.Run(name, func() { + if tc.preRun != nil { + tc.preRun() + } + _, err := suite.msgServer.SubmitBudgetProposal(suite.ctx, tc.input) + if tc.expErr { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expErrMsg) + } else { + suite.Require().NoError(err) + } + }) + } +} + +func (suite *KeeperTestSuite) TestMsgClaimBudget() { + testCases := map[string]struct { + preRun func() + recipientAddress sdk.AccAddress + expErr bool + expErrMsg string + }{ + "empty recipient addr": { + recipientAddress: sdk.AccAddress(""), + expErr: true, + expErrMsg: "invalid recipient address: empty address string is not allowed", + }, + "no budget found": { + recipientAddress: sdk.AccAddress([]byte("acc1__________")), + expErr: true, + expErrMsg: "no claimable funds are present for recipient", + }, + "claiming before start time": { + preRun: func() { + // Prepare the budget proposal with a future start time + budget := types.Budget{ + RecipientAddress: recipientAddr.String(), + TotalBudget: &fooCoin, + StartTime: suite.ctx.BlockTime().Unix() + 3600, + Tranches: 2, + Period: 60, + } + suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) + }, + recipientAddress: recipientAddr, + expErr: true, + expErrMsg: "distribution has not started yet", + }, + "budget period has not passed": { + preRun: func() { + // Prepare the budget proposal with start time and a short period + budget := types.Budget{ + RecipientAddress: recipientAddr.String(), + TotalBudget: &fooCoin, + StartTime: suite.ctx.BlockTime().Unix() - 50, + Tranches: 1, + Period: 60, + } + suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) + }, + recipientAddress: recipientAddr, + expErr: true, + expErrMsg: "budget period has not passed yet", + }, + "valid claim": { + preRun: func() { + // Prepare the budget proposal with valid start time and period + budget := types.Budget{ + RecipientAddress: recipientAddr.String(), + TotalBudget: &fooCoin, + StartTime: suite.ctx.BlockTime().Unix() - 70, + Tranches: 2, + Period: 60, + } + suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) + }, + recipientAddress: recipientAddr, + expErr: false, + }, + } + + for name, tc := range testCases { + suite.Run(name, func() { + if tc.preRun != nil { + tc.preRun() + } + msg := &types.MsgClaimBudget{ + RecipientAddress: tc.recipientAddress.String(), + } + suite.mockSendCoinsFromModuleToAccount(tc.recipientAddress) + _, err := suite.msgServer.ClaimBudget(suite.ctx, msg) + if tc.expErr { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expErrMsg) + } else { + suite.Require().NoError(err) + } + }) + } +} From d5017bbc20b4129d47f15b814635463f49e68408 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Mon, 30 Oct 2023 14:19:09 +0530 Subject: [PATCH 43/69] fix lint and tests --- simapp/go.mod | 1 + simapp/go.sum | 2 -- x/protocolpool/keeper/grpc_query_test.go | 3 ++- x/protocolpool/keeper/msg_server_test.go | 9 ++++++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/simapp/go.mod b/simapp/go.mod index 70a5e8a31838..f78600ba4bd3 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -213,6 +213,7 @@ require ( // SimApp on main always tests the latest extracted SDK modules importing the sdk replace ( + cosmossdk.io/api => ../api cosmossdk.io/client/v2 => ../client/v2 cosmossdk.io/tools/confix => ../tools/confix cosmossdk.io/x/authz => ../x/authz diff --git a/simapp/go.sum b/simapp/go.sum index b5f41857b155..16354abe7ce6 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -187,8 +187,6 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/protocolpool/keeper/grpc_query_test.go b/x/protocolpool/keeper/grpc_query_test.go index 935dc20e29ae..877c09da98f1 100644 --- a/x/protocolpool/keeper/grpc_query_test.go +++ b/x/protocolpool/keeper/grpc_query_test.go @@ -41,7 +41,8 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { Tranches: 2, Period: 60, } - suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) + err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) + suite.Require().NoError(err) }, req: &types.QueryUnclaimedBudgetRequest{ Address: recipientAddr.String(), diff --git a/x/protocolpool/keeper/msg_server_test.go b/x/protocolpool/keeper/msg_server_test.go index 54417e5b8b19..0130ff5cf738 100644 --- a/x/protocolpool/keeper/msg_server_test.go +++ b/x/protocolpool/keeper/msg_server_test.go @@ -160,7 +160,8 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { Tranches: 2, Period: 60, } - suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) + err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) + suite.Require().NoError(err) }, recipientAddress: recipientAddr, expErr: true, @@ -176,7 +177,8 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { Tranches: 1, Period: 60, } - suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) + err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) + suite.Require().NoError(err) }, recipientAddress: recipientAddr, expErr: true, @@ -192,7 +194,8 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { Tranches: 2, Period: 60, } - suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) + err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) + suite.Require().NoError(err) }, recipientAddress: recipientAddr, expErr: false, From a74253db141f71cd4b1205b252df06d77d995e64 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Mon, 30 Oct 2023 14:36:10 +0530 Subject: [PATCH 44/69] run go mod tidy --- simapp/gomod2nix.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/simapp/gomod2nix.toml b/simapp/gomod2nix.toml index d4962a77a6a8..2cded1b22002 100644 --- a/simapp/gomod2nix.toml +++ b/simapp/gomod2nix.toml @@ -16,9 +16,6 @@ schema = 3 [mod."cloud.google.com/go/storage"] version = "v1.33.0" hash = "sha256-oW2OubL84ZHjw7/XD6Pjl6pdUPkAqtFS2bXQKVUec6A=" - [mod."cosmossdk.io/api"] - version = "v0.7.2" - hash = "sha256-iJOdaqOqjXHZtfUOrUxJAYP5bUshIOMMaXcZ5ZFy2ZA=" [mod."cosmossdk.io/collections"] version = "v0.4.0" hash = "sha256-minFyzgO/D+Oda4E3B1qvOAN5qd65SjS6nmjca4cp/8=" From 0c758877e5f572d26fc0eb61105ca9f4d196cedf Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Mon, 30 Oct 2023 18:17:36 +0530 Subject: [PATCH 45/69] update docs --- proto/cosmos/protocolpool/v1/tx.proto | 1 + x/protocolpool/README.md | 67 ++++++++++++++++++++++++++- 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index da7cde5b564c..69ae1b57a617 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -72,6 +72,7 @@ message MsgSubmitBudgetProposal { // total_budget is the total amount allocated for the budget. cosmos.base.v1beta1.Coin total_budget = 3; // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. + // A value of `0` means the budget becomes claimable at the time of the first claim or governance proposal execution. int64 start_time = 4; // tranches is the number of times the total budget amount is to be distributed. int64 tranches = 5; diff --git a/x/protocolpool/README.md b/x/protocolpool/README.md index ec05e64a89a7..a1d52cfe4798 100644 --- a/x/protocolpool/README.md +++ b/x/protocolpool/README.md @@ -8,6 +8,8 @@ sidebar_position: 1 Protopool is a module that handle functionality around community pool funds. This provides a separate module account for community pool making it easier to track the pool assets. We no longer track community pool assets in distribution module, but instead in this protocolpool module. Funds are migrated from the distribution module's community pool to protocolpool's module account. +The module is also designed with a lazy "claim-based" system, which means that users are required to actively claim allocated funds from allocated budget if any budget proposal has been submitted and passed. The module does not automatically distribute funds to recipients. This design choice allows for more flexibility and control over fund distribution. + ## State Transitions ### FundCommunityPool @@ -32,6 +34,27 @@ CommunityPoolSpend can be called by the module authority (default governance mod rpc CommunityPoolSpend(MsgCommunityPoolSpend) returns (MsgCommunityPoolSpendResponse); ``` +### SubmitBudgetProposal + +SubmitBudgetProposal is a message used to propose a budget allocation for a specific recipient. The proposed funds will be distributed periodically over a specified time frame. + +It's the responsibility of users to actively claim their allocated funds based on the terms of the approved budget proposals. + +```protobuf + // SubmitBudgetProposal defines a method to set a budget proposal. + rpc SubmitBudgetProposal(MsgSubmitBudgetProposal) returns (MsgSubmitBudgetProposalResponse); +``` + +### ClaimBudget + +ClaimBudget is a message used to claim funds from a previously submitted budget proposal. When a budget proposal is approved and funds are allocated, recipients can use this message to claim their share of the budget. Funds are distributed in tranches over specific periods, and users can claim their share of budget at the appropriate time. + +```protobuf + // ClaimBudget defines a method to claim the distributed budget. + rpc ClaimBudget(MsgClaimBudget) returns (MsgClaimBudgetResponse); + +``` + ## Messages ### MsgFundCommunityPool @@ -43,7 +66,7 @@ If you know the protocolpool module account address, you can directly use bank ` :::: ```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/9dd34510e27376005e7e7ff3628eab9dbc8ad6dc/proto/cosmos/protocolpool/v1/tx.proto#L31-L41 +https://github.com/cosmos/cosmos-sdk/blob/97724493d792517ba2be8969078b5f92ad04d79c/proto/cosmos/protocolpool/v1/tx.proto#L32-L42 ``` * The msg will fail if the amount cannot be transferred from the sender to the protocolpool module account. @@ -59,7 +82,7 @@ func (k Keeper) FundCommunityPool(ctx context.Context, amount sdk.Coins, sender This message distributes funds from the protocolpool module account to the recipient using `DistributeFromFeePool` keeper method. ```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/9dd34510e27376005e7e7ff3628eab9dbc8ad6dc/proto/cosmos/protocolpool/v1/tx.proto#L46-L59 +https://github.com/cosmos/cosmos-sdk/blob/97724493d792517ba2be8969078b5f92ad04d79c/proto/cosmos/protocolpool/v1/tx.proto#L47-L58 ``` The message will fail under the following conditions: @@ -73,6 +96,46 @@ func (k Keeper) DistributeFromFeePool(ctx context.Context, amount sdk.Coins, rec } ``` +### MsgSubmitBudgetProposal + +This message is used to submit a budget proposal to allocate funds for a specific recipient. The proposed funds will be distributed periodically over a specified time frame. + +```protobuf reference +https://github.com/cosmos/cosmos-sdk/blob/97724493d792517ba2be8969078b5f92ad04d79c/proto/cosmos/protocolpool/v1/tx.proto#L64-L82 +``` + +The message will fail under the following conditions: + +* The total budget is zero. +* The recipient address is empty or restricted. +* The start time is negative. +* The number of tranches is not a positive value. +* The period length is not a positive value. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/97724493d792517ba2be8969078b5f92ad04d79c/x/protocolpool/keeper/msg_server.go#L39-l61 +``` + +### MsgClaimBudget + +This message is used to claim funds from a previously submitted budget proposal. When a budget proposal is passed and funds are allocated, recipients can use this message to claim their share of the budget. + +```protobuf reference +https://github.com/cosmos/cosmos-sdk/blob/97724493d792517ba2be8969078b5f92ad04d79c/proto/cosmos/protocolpool/v1/tx.proto#L88-L92 +``` + +The message will fail under the following conditions: + +- The recipient address is empty or restricted. +- The budget proposal for the recipient does not exist. +- The budget proposal has not reached its distribution start time. +- The budget proposal's distribution period has not passed yet. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/97724493d792517ba2be8969078b5f92ad04d79c/x/protocolpool/keeper/msg_server.go#L25-L37 +``` + + ## Client It takes the advantage of `AutoCLI` From 50bbe5d6d3e3cbdafafd2dcaafebeda9ec6e7dd1 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Mon, 30 Oct 2023 18:59:01 +0530 Subject: [PATCH 46/69] more checks --- x/protocolpool/keeper/keeper.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 1e48f0958a66..778847c96796 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -130,9 +130,6 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) currentTime := sdkCtx.BlockTime().Unix() startTime := budget.StartTime - if budget.StartTime == 0 { - startTime = sdkCtx.HeaderInfo().Time.Unix() - } // Check if the start time is reached if currentTime < startTime { return sdk.Coin{}, fmt.Errorf("distribution has not started yet") @@ -154,9 +151,12 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) budget.Tranches -= periodsPassed // update the TotalBudget amount - budget.TotalBudget.Amount.Sub(coinsToDistribute) + budget.TotalBudget.Amount = budget.TotalBudget.Amount.Sub(coinsToDistribute) + + // Update the start time for the budget + budget.StartTime = budget.StartTime + budget.Period - k.Logger(ctx).Info(fmt.Sprintf("Processing budget for recipient: %s. Amount: %s", budget.RecipientAddress, coinsToDistribute.String())) + k.Logger(ctx).Debug(fmt.Sprintf("Processing budget for recipient: %s. Amount: %s", budget.RecipientAddress, coinsToDistribute.String())) // Save the updated budget in the state err = k.BudgetProposal.Set(ctx, recipient, budget) @@ -182,8 +182,8 @@ func (k Keeper) validateBudgetProposal(ctx context.Context, bp types.MsgSubmitBu return err } - if bp.StartTime < 0 { - return fmt.Errorf("invalid start time") + if bp.StartTime <= sdk.UnwrapSDKContext(ctx).BlockTime().Unix() { + return fmt.Errorf("start time cannot be less than current block time") } if bp.Tranches <= 0 { From 8bacc42658ebffe1e558d0227e2ca1e9ea0bc76e Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Mon, 30 Oct 2023 19:19:33 +0530 Subject: [PATCH 47/69] wip: test --- x/protocolpool/keeper/msg_server_test.go | 40 ++++++++++++++++++++---- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/x/protocolpool/keeper/msg_server_test.go b/x/protocolpool/keeper/msg_server_test.go index 0130ff5cf738..221d4b782031 100644 --- a/x/protocolpool/keeper/msg_server_test.go +++ b/x/protocolpool/keeper/msg_server_test.go @@ -73,19 +73,19 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: suite.poolKeeper.GetAuthority(), RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: -10, + StartTime: suite.ctx.BlockTime().Unix() - 5, Tranches: 2, Period: 60, }, expErr: true, - expErrMsg: "invalid start time", + expErrMsg: "start time cannot be less than current block time", }, "invalid tranches": { input: &types.MsgSubmitBudgetProposal{ Authority: suite.poolKeeper.GetAuthority(), RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: suite.ctx.BlockTime().Unix(), + StartTime: suite.ctx.BlockTime().Unix() + 10, Tranches: 0, Period: 60, }, @@ -97,7 +97,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: suite.poolKeeper.GetAuthority(), RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: suite.ctx.BlockTime().Unix(), + StartTime: suite.ctx.BlockTime().Unix() + 10, Tranches: 2, Period: 0, }, @@ -109,7 +109,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: suite.poolKeeper.GetAuthority(), RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: suite.ctx.BlockTime().Unix(), + StartTime: suite.ctx.BlockTime().Unix() + 10, Tranches: 2, Period: 60, }, @@ -139,6 +139,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { recipientAddress sdk.AccAddress expErr bool expErrMsg string + claimableFunds sdk.Coin }{ "empty recipient addr": { recipientAddress: sdk.AccAddress(""), @@ -199,6 +200,32 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { }, recipientAddress: recipientAddr, expErr: false, + claimableFunds: sdk.NewInt64Coin("foo", 50), + }, + "double claim attempt with budget period not passed": { + preRun: func() { + // Prepare the budget proposal with valid start time and period + budget := types.Budget{ + RecipientAddress: recipientAddr.String(), + TotalBudget: &fooCoin, + StartTime: suite.ctx.BlockTime().Unix() - 70, + Tranches: 2, + Period: 60, + } + err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) + suite.Require().NoError(err) + + // Claim the funds once + msg := &types.MsgClaimBudget{ + RecipientAddress: recipientAddr.String(), + } + suite.mockSendCoinsFromModuleToAccount(recipientAddr) + _, err = suite.msgServer.ClaimBudget(suite.ctx, msg) + suite.Require().NoError(err) + }, + recipientAddress: recipientAddr, + expErr: true, + expErrMsg: "budget period has not passed yet", }, } @@ -211,12 +238,13 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { RecipientAddress: tc.recipientAddress.String(), } suite.mockSendCoinsFromModuleToAccount(tc.recipientAddress) - _, err := suite.msgServer.ClaimBudget(suite.ctx, msg) + resp, err := suite.msgServer.ClaimBudget(suite.ctx, msg) if tc.expErr { suite.Require().Error(err) suite.Require().Contains(err.Error(), tc.expErrMsg) } else { suite.Require().NoError(err) + suite.Require().Equal(tc.claimableFunds, resp.Amount) } }) } From e67601aba27d74e9d9c2c6bcf31207dd11337005 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Mon, 30 Oct 2023 19:30:05 +0530 Subject: [PATCH 48/69] wip --- proto/cosmos/protocolpool/v1/tx.proto | 8 ++++---- x/protocolpool/keeper/keeper.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index 69ae1b57a617..8a39eab8778d 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -72,14 +72,14 @@ message MsgSubmitBudgetProposal { // total_budget is the total amount allocated for the budget. cosmos.base.v1beta1.Coin total_budget = 3; // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. - // A value of `0` means the budget becomes claimable at the time of the first claim or governance proposal execution. - int64 start_time = 4; + // If start_time is less than the current block time, proposal will not be accepted. + uint64 start_time = 4; // tranches is the number of times the total budget amount is to be distributed. - int64 tranches = 5; + uint64 tranches = 5; // 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). - int64 period = 6; + uint64 period = 6; } // MsgSubmitBudgetProposalResponse defines the response to executing a diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 778847c96796..ceefe03059c6 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -154,7 +154,7 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) budget.TotalBudget.Amount = budget.TotalBudget.Amount.Sub(coinsToDistribute) // Update the start time for the budget - budget.StartTime = budget.StartTime + budget.Period + budget.StartTime += budget.Period k.Logger(ctx).Debug(fmt.Sprintf("Processing budget for recipient: %s. Amount: %s", budget.RecipientAddress, coinsToDistribute.String())) From fc855d9733a320f24c8d316a7cfb808bb22a37b2 Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Mon, 30 Oct 2023 14:09:31 +0000 Subject: [PATCH 49/69] add proto-gen files --- api/cosmos/protocolpool/v1/tx.pulsar.go | 67 +++++++-------- x/protocolpool/types/tx.pb.go | 105 ++++++++++++------------ 2 files changed, 87 insertions(+), 85 deletions(-) diff --git a/api/cosmos/protocolpool/v1/tx.pulsar.go b/api/cosmos/protocolpool/v1/tx.pulsar.go index debb91bc246c..ec1b58778f1f 100644 --- a/api/cosmos/protocolpool/v1/tx.pulsar.go +++ b/api/cosmos/protocolpool/v1/tx.pulsar.go @@ -2012,20 +2012,20 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Range(f func(protoreflect.Field return } } - if x.StartTime != int64(0) { - value := protoreflect.ValueOfInt64(x.StartTime) + if x.StartTime != uint64(0) { + value := protoreflect.ValueOfUint64(x.StartTime) if !f(fd_MsgSubmitBudgetProposal_start_time, value) { return } } - if x.Tranches != int64(0) { - value := protoreflect.ValueOfInt64(x.Tranches) + if x.Tranches != uint64(0) { + value := protoreflect.ValueOfUint64(x.Tranches) if !f(fd_MsgSubmitBudgetProposal_tranches, value) { return } } - if x.Period != int64(0) { - value := protoreflect.ValueOfInt64(x.Period) + if x.Period != uint64(0) { + value := protoreflect.ValueOfUint64(x.Period) if !f(fd_MsgSubmitBudgetProposal_period, value) { return } @@ -2052,11 +2052,11 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Has(fd protoreflect.FieldDescri case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget": return x.TotalBudget != nil case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": - return x.StartTime != int64(0) + return x.StartTime != uint64(0) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": - return x.Tranches != int64(0) + return x.Tranches != uint64(0) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": - return x.Period != int64(0) + return x.Period != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) @@ -2080,11 +2080,11 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Clear(fd protoreflect.FieldDesc case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget": x.TotalBudget = nil case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": - x.StartTime = int64(0) + x.StartTime = uint64(0) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": - x.Tranches = int64(0) + x.Tranches = uint64(0) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": - x.Period = int64(0) + x.Period = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) @@ -2112,13 +2112,13 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Get(descriptor protoreflect.Fie return protoreflect.ValueOfMessage(value.ProtoReflect()) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": value := x.StartTime - return protoreflect.ValueOfInt64(value) + return protoreflect.ValueOfUint64(value) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": value := x.Tranches - return protoreflect.ValueOfInt64(value) + return protoreflect.ValueOfUint64(value) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": value := x.Period - return protoreflect.ValueOfInt64(value) + return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) @@ -2146,11 +2146,11 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Set(fd protoreflect.FieldDescri case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget": x.TotalBudget = value.Message().Interface().(*v1beta1.Coin) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": - x.StartTime = value.Int() + x.StartTime = value.Uint() case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": - x.Tranches = value.Int() + x.Tranches = value.Uint() case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": - x.Period = value.Int() + x.Period = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) @@ -2207,11 +2207,11 @@ func (x *fastReflection_MsgSubmitBudgetProposal) NewField(fd protoreflect.FieldD m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": - return protoreflect.ValueOfInt64(int64(0)) + return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": - return protoreflect.ValueOfInt64(int64(0)) + return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": - return protoreflect.ValueOfInt64(int64(0)) + return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) @@ -2537,7 +2537,7 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth } b := dAtA[iNdEx] iNdEx++ - x.StartTime |= int64(b&0x7F) << shift + x.StartTime |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2556,7 +2556,7 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth } b := dAtA[iNdEx] iNdEx++ - x.Tranches |= int64(b&0x7F) << shift + x.Tranches |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2575,7 +2575,7 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth } b := dAtA[iNdEx] iNdEx++ - x.Period |= int64(b&0x7F) << shift + x.Period |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4007,13 +4007,14 @@ type MsgSubmitBudgetProposal struct { // total_budget is the total amount allocated for the budget. TotalBudget *v1beta1.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. - StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // If start_time is less than the current block time, proposal will not be accepted. + StartTime uint64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // tranches is the number of times the total budget amount is to be distributed. - Tranches int64 `protobuf:"varint,5,opt,name=tranches,proto3" json:"tranches,omitempty"` + 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 int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` + Period uint64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` } func (x *MsgSubmitBudgetProposal) Reset() { @@ -4057,21 +4058,21 @@ func (x *MsgSubmitBudgetProposal) GetTotalBudget() *v1beta1.Coin { return nil } -func (x *MsgSubmitBudgetProposal) GetStartTime() int64 { +func (x *MsgSubmitBudgetProposal) GetStartTime() uint64 { if x != nil { return x.StartTime } return 0 } -func (x *MsgSubmitBudgetProposal) GetTranches() int64 { +func (x *MsgSubmitBudgetProposal) GetTranches() uint64 { if x != nil { return x.Tranches } return 0 } -func (x *MsgSubmitBudgetProposal) GetPeriod() int64 { +func (x *MsgSubmitBudgetProposal) GetPeriod() uint64 { if x != nil { return x.Period } @@ -4238,10 +4239,10 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x20, 0x01, 0x28, 0x04, 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, - 0x03, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x65, 0x72, + 0x04, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 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, diff --git a/x/protocolpool/types/tx.pb.go b/x/protocolpool/types/tx.pb.go index b03c5ee53b92..2ba0fcd7409d 100644 --- a/x/protocolpool/types/tx.pb.go +++ b/x/protocolpool/types/tx.pb.go @@ -220,13 +220,14 @@ type MsgSubmitBudgetProposal struct { // total_budget is the total amount allocated for the budget. TotalBudget *types.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. - StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // If start_time is less than the current block time, proposal will not be accepted. + StartTime uint64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // tranches is the number of times the total budget amount is to be distributed. - Tranches int64 `protobuf:"varint,5,opt,name=tranches,proto3" json:"tranches,omitempty"` + 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 int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` + Period uint64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` } func (m *MsgSubmitBudgetProposal) Reset() { *m = MsgSubmitBudgetProposal{} } @@ -283,21 +284,21 @@ func (m *MsgSubmitBudgetProposal) GetTotalBudget() *types.Coin { return nil } -func (m *MsgSubmitBudgetProposal) GetStartTime() int64 { +func (m *MsgSubmitBudgetProposal) GetStartTime() uint64 { if m != nil { return m.StartTime } return 0 } -func (m *MsgSubmitBudgetProposal) GetTranches() int64 { +func (m *MsgSubmitBudgetProposal) GetTranches() uint64 { if m != nil { return m.Tranches } return 0 } -func (m *MsgSubmitBudgetProposal) GetPeriod() int64 { +func (m *MsgSubmitBudgetProposal) GetPeriod() uint64 { if m != nil { return m.Period } @@ -447,49 +448,49 @@ func init() { func init() { proto.RegisterFile("cosmos/protocolpool/v1/tx.proto", fileDescriptor_09efe14517e7f6dc) } var fileDescriptor_09efe14517e7f6dc = []byte{ - // 662 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4f, 0x6f, 0xd3, 0x4e, - 0x10, 0xcd, 0x36, 0xbf, 0x46, 0xbf, 0x6c, 0x51, 0x45, 0xad, 0x90, 0xba, 0x56, 0x6b, 0xa7, 0x39, - 0xa0, 0xa8, 0xa2, 0x36, 0x29, 0xff, 0xa4, 0xc2, 0x85, 0x54, 0x70, 0x8b, 0x54, 0xa5, 0x9c, 0xb8, - 0x44, 0x8e, 0xbd, 0x72, 0x57, 0xb5, 0x3d, 0x96, 0x77, 0x5d, 0x5a, 0x24, 0xa4, 0x8a, 0x13, 0x47, - 0x3e, 0x42, 0xcf, 0x9c, 0x7a, 0xe0, 0xc2, 0x37, 0xa8, 0xc4, 0xa5, 0xe2, 0xc4, 0x09, 0x50, 0x7a, - 0x28, 0x12, 0x5f, 0x02, 0xd9, 0xde, 0x3a, 0x89, 0x62, 0x52, 0x82, 0xd4, 0x53, 0xb2, 0x33, 0x6f, - 0xde, 0xbc, 0x79, 0xd9, 0xd9, 0x60, 0xcd, 0x02, 0xe6, 0x01, 0x33, 0x82, 0x10, 0x38, 0x58, 0xe0, - 0x06, 0x00, 0xae, 0xb1, 0xdf, 0x34, 0xf8, 0x81, 0x9e, 0x84, 0xa4, 0x6a, 0x0a, 0xd0, 0x87, 0x01, - 0xfa, 0x7e, 0x53, 0xa9, 0x38, 0xe0, 0x40, 0x12, 0x34, 0xe2, 0x6f, 0x69, 0x5e, 0x51, 0x05, 0x5d, - 0xcf, 0x64, 0xc4, 0xd8, 0x6f, 0xf6, 0x08, 0x37, 0x9b, 0x86, 0x05, 0xd4, 0x17, 0xf9, 0xa5, 0x34, - 0xdf, 0x4d, 0x0b, 0x87, 0xa9, 0x95, 0x45, 0x51, 0xea, 0x31, 0x27, 0x16, 0xe0, 0x31, 0x27, 0x4d, - 0xd4, 0x3f, 0x23, 0x5c, 0x69, 0x33, 0xe7, 0x79, 0xe4, 0xdb, 0x5b, 0xe0, 0x79, 0x91, 0x4f, 0xf9, - 0xe1, 0x36, 0x80, 0x2b, 0x59, 0xb8, 0x64, 0x7a, 0x10, 0xf9, 0x5c, 0x46, 0xb5, 0x62, 0x63, 0x6e, - 0x63, 0x49, 0x17, 0x84, 0x71, 0x77, 0x5d, 0x74, 0xd7, 0xb7, 0x80, 0xfa, 0xad, 0xbb, 0xa7, 0xdf, - 0xb4, 0xc2, 0x87, 0xef, 0x5a, 0xc3, 0xa1, 0x7c, 0x37, 0xea, 0xe9, 0x16, 0x78, 0xa2, 0xbb, 0xf8, - 0x58, 0x67, 0xf6, 0x9e, 0xc1, 0x0f, 0x03, 0xc2, 0x92, 0x02, 0xd6, 0x11, 0xd4, 0xd2, 0x43, 0x5c, - 0xb6, 0x49, 0x00, 0x8c, 0x72, 0x08, 0xe5, 0x99, 0x1a, 0x6a, 0x94, 0x5b, 0xf2, 0x97, 0x8f, 0xeb, - 0x15, 0xd1, 0xea, 0xa9, 0x6d, 0x87, 0x84, 0xb1, 0x1d, 0x1e, 0x52, 0xdf, 0xe9, 0x0c, 0xa0, 0x9b, - 0xd5, 0x77, 0xc7, 0x5a, 0xe1, 0xe7, 0xb1, 0x56, 0x78, 0x7b, 0x71, 0xb2, 0x36, 0x88, 0xd7, 0x55, - 0xbc, 0x9c, 0x37, 0x4c, 0x87, 0xb0, 0x00, 0x7c, 0x46, 0xea, 0x7d, 0x84, 0x6f, 0xb5, 0x99, 0x33, - 0x92, 0xdc, 0x09, 0x88, 0x6f, 0xc7, 0x4a, 0xcc, 0x88, 0xef, 0x42, 0x48, 0xf9, 0xa1, 0x8c, 0xae, - 0x52, 0x92, 0x41, 0xa5, 0x65, 0x5c, 0x0e, 0x89, 0x45, 0x03, 0x4a, 0x7c, 0x9e, 0x4e, 0xd0, 0x19, - 0x04, 0x86, 0x4c, 0x2c, 0x5e, 0x9b, 0x89, 0x9b, 0xf3, 0x89, 0x09, 0x99, 0xa4, 0xba, 0x86, 0x57, - 0x72, 0x67, 0xcc, 0x5c, 0xf8, 0x34, 0x83, 0x17, 0xdb, 0xcc, 0xd9, 0x89, 0x7a, 0x1e, 0xe5, 0xad, - 0xc8, 0x76, 0x08, 0xdf, 0x0e, 0x21, 0x00, 0x66, 0xba, 0xff, 0xec, 0xc3, 0x33, 0xbc, 0x90, 0x8d, - 0xdd, 0x35, 0x53, 0xd4, 0x95, 0xbf, 0xe8, 0xcd, 0xac, 0x44, 0xc4, 0xa5, 0x27, 0xf8, 0x06, 0x07, - 0x6e, 0xba, 0xdd, 0x5e, 0x22, 0x4b, 0x2e, 0xd6, 0xd0, 0x44, 0xdb, 0x3a, 0x73, 0x09, 0x3c, 0x1d, - 0x42, 0x5a, 0xc1, 0x98, 0x71, 0x33, 0xe4, 0x5d, 0x4e, 0x3d, 0x22, 0xff, 0x57, 0x43, 0x8d, 0x62, - 0xa7, 0x9c, 0x44, 0x5e, 0x50, 0x8f, 0x48, 0x0a, 0xfe, 0x9f, 0x87, 0xa6, 0x6f, 0xed, 0x12, 0x26, - 0xcf, 0x26, 0xc9, 0xec, 0x2c, 0x55, 0x71, 0x29, 0x20, 0x21, 0x05, 0x5b, 0x2e, 0x25, 0x19, 0x71, - 0x1a, 0x33, 0x77, 0x15, 0x6b, 0x7f, 0xb0, 0x2e, 0xb3, 0x17, 0xf0, 0x7c, 0xec, 0xbf, 0x6b, 0x52, - 0x4f, 0xe8, 0xca, 0x35, 0x07, 0x4d, 0x6b, 0xce, 0x66, 0x35, 0xd6, 0x32, 0xce, 0x54, 0x7f, 0x83, - 0xab, 0xa3, 0x0d, 0x2f, 0xa5, 0x8c, 0x2c, 0x31, 0xba, 0xa6, 0xfb, 0xb7, 0xf1, 0xab, 0x88, 0x8b, - 0x6d, 0xe6, 0x48, 0xaf, 0xf0, 0xc2, 0xf8, 0x33, 0x72, 0x47, 0xcf, 0x7f, 0xe2, 0xf4, 0xbc, 0x3d, - 0x55, 0xee, 0x4f, 0x83, 0xce, 0xa6, 0x7c, 0x8d, 0xa5, 0x9c, 0x8d, 0x5e, 0x9f, 0xc0, 0x35, 0x0e, - 0x57, 0x1e, 0x4c, 0x05, 0xcf, 0x7a, 0x1f, 0x21, 0x5c, 0xc9, 0x5d, 0x24, 0x63, 0x02, 0x5f, 0x5e, - 0x81, 0xf2, 0x68, 0xca, 0x82, 0x4c, 0x02, 0xc1, 0x73, 0xc3, 0x97, 0xed, 0xf6, 0xa4, 0x41, 0x06, - 0x38, 0x45, 0xff, 0x3b, 0xdc, 0x65, 0x1b, 0x65, 0xf6, 0xe8, 0xe2, 0x64, 0x0d, 0xb5, 0x1e, 0x9f, - 0xf6, 0x55, 0x74, 0xd6, 0x57, 0xd1, 0x8f, 0xbe, 0x8a, 0xde, 0x9f, 0xab, 0x85, 0xb3, 0x73, 0xb5, - 0xf0, 0xf5, 0x5c, 0x2d, 0xbc, 0x5c, 0x4d, 0xf9, 0x98, 0xbd, 0xa7, 0x53, 0x30, 0x0e, 0x46, 0xff, - 0xf5, 0x92, 0x8b, 0xd3, 0x2b, 0x25, 0xb1, 0x7b, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xef, 0x33, - 0x08, 0x1b, 0x19, 0x07, 0x00, 0x00, + // 661 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xce, 0x35, 0x6d, 0x44, 0xae, 0xa8, 0xa2, 0x56, 0x48, 0x5d, 0xab, 0xb5, 0xd3, 0x0c, 0x28, + 0xaa, 0xa8, 0x4d, 0xca, 0x2f, 0xa9, 0xb0, 0x90, 0x0a, 0xb6, 0x48, 0x55, 0xca, 0xc4, 0x12, 0x39, + 0xf6, 0xc9, 0x3d, 0x35, 0xf6, 0xb3, 0x7c, 0xe7, 0xd2, 0x22, 0x21, 0x55, 0x4c, 0x8c, 0xfc, 0x09, + 0x9d, 0x99, 0x3a, 0xb0, 0xf0, 0x1f, 0x54, 0x62, 0xa9, 0x98, 0x98, 0x00, 0x25, 0x43, 0x91, 0xf8, + 0x27, 0x90, 0xed, 0xab, 0x93, 0x28, 0x26, 0x25, 0x48, 0x9d, 0x92, 0x7b, 0xef, 0x7b, 0xdf, 0xfb, + 0xde, 0x97, 0x7b, 0x17, 0xac, 0x59, 0xc0, 0x5c, 0x60, 0x86, 0x1f, 0x00, 0x07, 0x0b, 0xba, 0x3e, + 0x40, 0xd7, 0x38, 0xa8, 0x1b, 0xfc, 0x50, 0x8f, 0x43, 0x52, 0x39, 0x01, 0xe8, 0xc3, 0x00, 0xfd, + 0xa0, 0xae, 0x94, 0x1c, 0x70, 0x20, 0x0e, 0x1a, 0xd1, 0xb7, 0x24, 0xaf, 0xa8, 0x82, 0xae, 0x63, + 0x32, 0x62, 0x1c, 0xd4, 0x3b, 0x84, 0x9b, 0x75, 0xc3, 0x02, 0xea, 0x89, 0xfc, 0x72, 0x92, 0x6f, + 0x27, 0x85, 0xc3, 0xd4, 0xca, 0x92, 0x28, 0x75, 0x99, 0x13, 0x09, 0x70, 0x99, 0x93, 0x24, 0xaa, + 0x5f, 0x10, 0x2e, 0x35, 0x99, 0xf3, 0x22, 0xf4, 0xec, 0x6d, 0x70, 0xdd, 0xd0, 0xa3, 0xfc, 0x68, + 0x07, 0xa0, 0x2b, 0x59, 0xb8, 0x60, 0xba, 0x10, 0x7a, 0x5c, 0x46, 0x95, 0x7c, 0x6d, 0x7e, 0x73, + 0x59, 0x17, 0x84, 0x51, 0x77, 0x5d, 0x74, 0xd7, 0xb7, 0x81, 0x7a, 0x8d, 0x7b, 0x67, 0xdf, 0xb5, + 0xdc, 0xc7, 0x1f, 0x5a, 0xcd, 0xa1, 0x7c, 0x2f, 0xec, 0xe8, 0x16, 0xb8, 0xa2, 0xbb, 0xf8, 0xd8, + 0x60, 0xf6, 0xbe, 0xc1, 0x8f, 0x7c, 0xc2, 0xe2, 0x02, 0xd6, 0x12, 0xd4, 0xd2, 0x23, 0x5c, 0xb4, + 0x89, 0x0f, 0x8c, 0x72, 0x08, 0xe4, 0x99, 0x0a, 0xaa, 0x15, 0x1b, 0xf2, 0xd7, 0x4f, 0x1b, 0x25, + 0xd1, 0xea, 0x99, 0x6d, 0x07, 0x84, 0xb1, 0x5d, 0x1e, 0x50, 0xcf, 0x69, 0x0d, 0xa0, 0x5b, 0xe5, + 0xf7, 0x27, 0x5a, 0xee, 0xd7, 0x89, 0x96, 0x7b, 0x77, 0x71, 0xba, 0x3e, 0x88, 0x57, 0x55, 0xbc, + 0x92, 0x35, 0x4c, 0x8b, 0x30, 0x1f, 0x3c, 0x46, 0xaa, 0x3d, 0x84, 0x6f, 0x37, 0x99, 0x33, 0x92, + 0xdc, 0xf5, 0x89, 0x67, 0x47, 0x4a, 0xcc, 0x90, 0xef, 0x41, 0x40, 0xf9, 0x91, 0x8c, 0xae, 0x52, + 0x92, 0x42, 0xa5, 0x15, 0x5c, 0x0c, 0x88, 0x45, 0x7d, 0x4a, 0x3c, 0x9e, 0x4c, 0xd0, 0x1a, 0x04, + 0x86, 0x4c, 0xcc, 0x5f, 0x9b, 0x89, 0x5b, 0x0b, 0xb1, 0x09, 0xa9, 0xa4, 0xaa, 0x86, 0x57, 0x33, + 0x67, 0x4c, 0x5d, 0xf8, 0x3c, 0x83, 0x97, 0x9a, 0xcc, 0xd9, 0x0d, 0x3b, 0x2e, 0xe5, 0x8d, 0xd0, + 0x76, 0x08, 0xdf, 0x09, 0xc0, 0x07, 0x66, 0x76, 0xff, 0xdb, 0x87, 0xe7, 0x78, 0x31, 0x1d, 0xbb, + 0x6d, 0x26, 0xa8, 0x2b, 0x7f, 0xd1, 0x5b, 0x69, 0x89, 0x88, 0x4b, 0x4f, 0xf1, 0x4d, 0x0e, 0xdc, + 0xec, 0xb6, 0x3b, 0xb1, 0x2c, 0x39, 0x5f, 0x41, 0x13, 0x6d, 0x6b, 0xcd, 0xc7, 0xf0, 0x64, 0x08, + 0x69, 0x15, 0x63, 0xc6, 0xcd, 0x80, 0xb7, 0x39, 0x75, 0x89, 0x3c, 0x5b, 0x41, 0xb5, 0xd9, 0x56, + 0x31, 0x8e, 0xbc, 0xa4, 0x2e, 0x91, 0x14, 0x7c, 0x83, 0x07, 0xa6, 0x67, 0xed, 0x11, 0x26, 0xcf, + 0xc5, 0xc9, 0xf4, 0x2c, 0x95, 0x71, 0xc1, 0x27, 0x01, 0x05, 0x5b, 0x2e, 0xc4, 0x19, 0x71, 0x1a, + 0x33, 0x77, 0x0d, 0x6b, 0x7f, 0xb1, 0x2e, 0xb5, 0x17, 0xf0, 0x42, 0xe4, 0x7f, 0xd7, 0xa4, 0xae, + 0xd0, 0x95, 0x69, 0x0e, 0x9a, 0xd6, 0x9c, 0xad, 0x72, 0xa4, 0x65, 0x9c, 0xa9, 0xfa, 0x16, 0x97, + 0x47, 0x1b, 0x5e, 0x4a, 0x19, 0x59, 0x62, 0x74, 0x4d, 0xf7, 0x6f, 0xf3, 0x77, 0x1e, 0xe7, 0x9b, + 0xcc, 0x91, 0x5e, 0xe3, 0xc5, 0xf1, 0x67, 0xe4, 0xae, 0x9e, 0xfd, 0xc4, 0xe9, 0x59, 0x7b, 0xaa, + 0x3c, 0x98, 0x06, 0x9d, 0x4e, 0xf9, 0x06, 0x4b, 0x19, 0x1b, 0xbd, 0x31, 0x81, 0x6b, 0x1c, 0xae, + 0x3c, 0x9c, 0x0a, 0x9e, 0xf6, 0x3e, 0x46, 0xb8, 0x94, 0xb9, 0x48, 0xc6, 0x04, 0xbe, 0xac, 0x02, + 0xe5, 0xf1, 0x94, 0x05, 0xa9, 0x04, 0x82, 0xe7, 0x87, 0x2f, 0xdb, 0x9d, 0x49, 0x83, 0x0c, 0x70, + 0x8a, 0xfe, 0x6f, 0xb8, 0xcb, 0x36, 0xca, 0xdc, 0xf1, 0xc5, 0xe9, 0x3a, 0x6a, 0x3c, 0x39, 0xeb, + 0xa9, 0xe8, 0xbc, 0xa7, 0xa2, 0x9f, 0x3d, 0x15, 0x7d, 0xe8, 0xab, 0xb9, 0xf3, 0xbe, 0x9a, 0xfb, + 0xd6, 0x57, 0x73, 0xaf, 0xd6, 0x12, 0x3e, 0x66, 0xef, 0xeb, 0x14, 0x8c, 0xc3, 0xd1, 0x7f, 0xbd, + 0xf8, 0xe2, 0x74, 0x0a, 0x71, 0xec, 0xfe, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x9a, 0x22, + 0xf8, 0x19, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1634,7 +1635,7 @@ func (m *MsgSubmitBudgetProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.StartTime |= int64(b&0x7F) << shift + m.StartTime |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1653,7 +1654,7 @@ func (m *MsgSubmitBudgetProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Tranches |= int64(b&0x7F) << shift + m.Tranches |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1672,7 +1673,7 @@ func (m *MsgSubmitBudgetProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Period |= int64(b&0x7F) << shift + m.Period |= uint64(b&0x7F) << shift if b < 0x80 { break } From ed779bc99735808cbb0ee22d13c70e752610447b Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Mon, 30 Oct 2023 14:14:39 +0000 Subject: [PATCH 50/69] more changes --- api/cosmos/protocolpool/v1/types.pulsar.go | 66 +++++++++++----------- proto/cosmos/protocolpool/v1/types.proto | 6 +- x/protocolpool/types/msg.go | 2 +- x/protocolpool/types/types.pb.go | 26 ++++----- 4 files changed, 50 insertions(+), 50 deletions(-) diff --git a/api/cosmos/protocolpool/v1/types.pulsar.go b/api/cosmos/protocolpool/v1/types.pulsar.go index b7066d0f5b2d..5452554453f0 100644 --- a/api/cosmos/protocolpool/v1/types.pulsar.go +++ b/api/cosmos/protocolpool/v1/types.pulsar.go @@ -110,20 +110,20 @@ func (x *fastReflection_Budget) Range(f func(protoreflect.FieldDescriptor, proto return } } - if x.StartTime != int64(0) { - value := protoreflect.ValueOfInt64(x.StartTime) + if x.StartTime != uint64(0) { + value := protoreflect.ValueOfUint64(x.StartTime) if !f(fd_Budget_start_time, value) { return } } - if x.Tranches != int64(0) { - value := protoreflect.ValueOfInt64(x.Tranches) + if x.Tranches != uint64(0) { + value := protoreflect.ValueOfUint64(x.Tranches) if !f(fd_Budget_tranches, value) { return } } - if x.Period != int64(0) { - value := protoreflect.ValueOfInt64(x.Period) + if x.Period != uint64(0) { + value := protoreflect.ValueOfUint64(x.Period) if !f(fd_Budget_period, value) { return } @@ -148,11 +148,11 @@ func (x *fastReflection_Budget) Has(fd protoreflect.FieldDescriptor) bool { case "cosmos.protocolpool.v1.Budget.total_budget": return x.TotalBudget != nil case "cosmos.protocolpool.v1.Budget.start_time": - return x.StartTime != int64(0) + return x.StartTime != uint64(0) case "cosmos.protocolpool.v1.Budget.tranches": - return x.Tranches != int64(0) + return x.Tranches != uint64(0) case "cosmos.protocolpool.v1.Budget.period": - return x.Period != int64(0) + return x.Period != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Budget")) @@ -174,11 +174,11 @@ func (x *fastReflection_Budget) Clear(fd protoreflect.FieldDescriptor) { case "cosmos.protocolpool.v1.Budget.total_budget": x.TotalBudget = nil case "cosmos.protocolpool.v1.Budget.start_time": - x.StartTime = int64(0) + x.StartTime = uint64(0) case "cosmos.protocolpool.v1.Budget.tranches": - x.Tranches = int64(0) + x.Tranches = uint64(0) case "cosmos.protocolpool.v1.Budget.period": - x.Period = int64(0) + x.Period = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Budget")) @@ -203,13 +203,13 @@ func (x *fastReflection_Budget) Get(descriptor protoreflect.FieldDescriptor) pro return protoreflect.ValueOfMessage(value.ProtoReflect()) case "cosmos.protocolpool.v1.Budget.start_time": value := x.StartTime - return protoreflect.ValueOfInt64(value) + return protoreflect.ValueOfUint64(value) case "cosmos.protocolpool.v1.Budget.tranches": value := x.Tranches - return protoreflect.ValueOfInt64(value) + return protoreflect.ValueOfUint64(value) case "cosmos.protocolpool.v1.Budget.period": value := x.Period - return protoreflect.ValueOfInt64(value) + return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Budget")) @@ -235,11 +235,11 @@ func (x *fastReflection_Budget) Set(fd protoreflect.FieldDescriptor, value proto case "cosmos.protocolpool.v1.Budget.total_budget": x.TotalBudget = value.Message().Interface().(*v1beta1.Coin) case "cosmos.protocolpool.v1.Budget.start_time": - x.StartTime = value.Int() + x.StartTime = value.Uint() case "cosmos.protocolpool.v1.Budget.tranches": - x.Tranches = value.Int() + x.Tranches = value.Uint() case "cosmos.protocolpool.v1.Budget.period": - x.Period = value.Int() + x.Period = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Budget")) @@ -292,11 +292,11 @@ func (x *fastReflection_Budget) NewField(fd protoreflect.FieldDescriptor) protor m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.protocolpool.v1.Budget.start_time": - return protoreflect.ValueOfInt64(int64(0)) + return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.Budget.tranches": - return protoreflect.ValueOfInt64(int64(0)) + return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.Budget.period": - return protoreflect.ValueOfInt64(int64(0)) + return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Budget")) @@ -579,7 +579,7 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.StartTime |= int64(b&0x7F) << shift + x.StartTime |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -598,7 +598,7 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Tranches |= int64(b&0x7F) << shift + x.Tranches |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -617,7 +617,7 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Period |= int64(b&0x7F) << shift + x.Period |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -681,13 +681,13 @@ type Budget struct { // total_budget is the total amount allocated for the budget. TotalBudget *v1beta1.Coin `protobuf:"bytes,2,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. - StartTime int64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + StartTime uint64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // tranches is the number of times the total budget amount is to be distributed. - Tranches int64 `protobuf:"varint,4,opt,name=tranches,proto3" json:"tranches,omitempty"` + Tranches uint64 `protobuf:"varint,4,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 int64 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"` + Period uint64 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"` } func (x *Budget) Reset() { @@ -724,21 +724,21 @@ func (x *Budget) GetTotalBudget() *v1beta1.Coin { return nil } -func (x *Budget) GetStartTime() int64 { +func (x *Budget) GetStartTime() uint64 { if x != nil { return x.StartTime } return 0 } -func (x *Budget) GetTranches() int64 { +func (x *Budget) GetTranches() uint64 { if x != nil { return x.Tranches } return 0 } -func (x *Budget) GetPeriod() int64 { +func (x *Budget) GetPeriod() uint64 { if x != nil { return x.Period } @@ -765,11 +765,11 @@ var file_cosmos_protocolpool_v1_types_proto_rawDesc = []byte{ 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, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, - 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x42, 0xda, 0x01, 0x0a, 0x1a, 0x63, + 0x28, 0x04, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 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, diff --git a/proto/cosmos/protocolpool/v1/types.proto b/proto/cosmos/protocolpool/v1/types.proto index a566613dc350..1e1e07121736 100644 --- a/proto/cosmos/protocolpool/v1/types.proto +++ b/proto/cosmos/protocolpool/v1/types.proto @@ -13,11 +13,11 @@ message Budget { // total_budget is the total amount allocated for the budget. cosmos.base.v1beta1.Coin total_budget = 2; // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. - int64 start_time = 3; + uint64 start_time = 3; // tranches is the number of times the total budget amount is to be distributed. - int64 tranches = 4; + uint64 tranches = 4; // 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). - int64 period = 5; + uint64 period = 5; } \ No newline at end of file diff --git a/x/protocolpool/types/msg.go b/x/protocolpool/types/msg.go index 668b154fb34d..6931a070c2bb 100644 --- a/x/protocolpool/types/msg.go +++ b/x/protocolpool/types/msg.go @@ -28,7 +28,7 @@ func NewCommunityPoolSpend(amount sdk.Coins, authority, recipient string) *MsgCo } } -func NewBudgetProposal(recipient string, totalBudget sdk.Coin, startTime, tranches, period int64) *Budget { +func NewBudgetProposal(recipient string, totalBudget sdk.Coin, startTime, tranches, period uint64) *Budget { return &Budget{ RecipientAddress: recipient, TotalBudget: &totalBudget, diff --git a/x/protocolpool/types/types.pb.go b/x/protocolpool/types/types.pb.go index 9709aa40466d..ac499ebf0fb8 100644 --- a/x/protocolpool/types/types.pb.go +++ b/x/protocolpool/types/types.pb.go @@ -31,13 +31,13 @@ type Budget struct { // total_budget is the total amount allocated for the budget. TotalBudget *types.Coin `protobuf:"bytes,2,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. - StartTime int64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + StartTime uint64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // tranches is the number of times the total budget amount is to be distributed. - Tranches int64 `protobuf:"varint,4,opt,name=tranches,proto3" json:"tranches,omitempty"` + Tranches uint64 `protobuf:"varint,4,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 int64 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"` + Period uint64 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"` } func (m *Budget) Reset() { *m = Budget{} } @@ -87,21 +87,21 @@ func (m *Budget) GetTotalBudget() *types.Coin { return nil } -func (m *Budget) GetStartTime() int64 { +func (m *Budget) GetStartTime() uint64 { if m != nil { return m.StartTime } return 0 } -func (m *Budget) GetTranches() int64 { +func (m *Budget) GetTranches() uint64 { if m != nil { return m.Tranches } return 0 } -func (m *Budget) GetPeriod() int64 { +func (m *Budget) GetPeriod() uint64 { if m != nil { return m.Period } @@ -119,7 +119,7 @@ func init() { var fileDescriptor_c1b7d0ea246d7f44 = []byte{ // 301 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0x31, 0x4e, 0xc3, 0x30, - 0x18, 0x85, 0x6b, 0x0a, 0x15, 0x75, 0x19, 0x20, 0x42, 0x95, 0x5b, 0x09, 0xab, 0x74, 0xea, 0x82, + 0x18, 0x85, 0x6b, 0x28, 0x15, 0x75, 0x19, 0x20, 0x42, 0x95, 0x5b, 0x09, 0xab, 0x74, 0xea, 0x82, 0xad, 0xc0, 0x08, 0x0b, 0x45, 0x5c, 0xa0, 0x30, 0xb1, 0x44, 0x4e, 0x62, 0x15, 0x8b, 0x36, 0x7f, 0x64, 0xff, 0x54, 0x70, 0x0b, 0x0e, 0xc3, 0x21, 0x18, 0x2b, 0x26, 0xc6, 0x2a, 0xb9, 0x08, 0xc2, 0xb1, 0xaa, 0x32, 0xfe, 0xdf, 0x7b, 0xff, 0xd3, 0xd3, 0xa3, 0xe3, 0x0c, 0xdc, 0x12, 0x9c, 0x2c, @@ -131,12 +131,12 @@ var fileDescriptor_c1b7d0ea246d7f44 = []byte{ 0x21, 0xf7, 0xb6, 0x51, 0x1e, 0xd0, 0x9a, 0x62, 0x3e, 0x3b, 0xde, 0xbe, 0x04, 0x1e, 0xdd, 0xd0, 0x23, 0x04, 0x54, 0x8b, 0x24, 0xf5, 0xb1, 0x6c, 0x6f, 0x44, 0x26, 0xbd, 0xcb, 0x81, 0x08, 0xef, 0x7f, 0x45, 0x44, 0x28, 0x22, 0xee, 0xc0, 0x14, 0xb3, 0x9e, 0xb7, 0x87, 0x12, 0x67, 0x94, 0x3a, - 0x54, 0x16, 0x13, 0x34, 0x4b, 0xcd, 0xda, 0x23, 0x32, 0x69, 0xcf, 0xba, 0x9e, 0x3c, 0x9a, 0xa5, - 0x8e, 0x86, 0xf4, 0x10, 0xad, 0x2a, 0xb2, 0x67, 0xed, 0xd8, 0xbe, 0x17, 0xb7, 0x77, 0xd4, 0xa7, + 0x54, 0x16, 0x13, 0x34, 0x4b, 0xcd, 0xf6, 0x47, 0x64, 0xd2, 0x9e, 0x75, 0x3d, 0x79, 0x34, 0x4b, + 0x1d, 0x0d, 0xe9, 0x21, 0x5a, 0x55, 0x64, 0xcf, 0xda, 0xb1, 0xb6, 0x17, 0xb7, 0x77, 0xd4, 0xa7, 0x9d, 0x52, 0x5b, 0x03, 0x39, 0x3b, 0xf0, 0x4a, 0xb8, 0xa6, 0xd7, 0x5f, 0x15, 0x27, 0xeb, 0x8a, 0x93, 0x4d, 0xc5, 0xc9, 0x47, 0xcd, 0x5b, 0xeb, 0x9a, 0xb7, 0x7e, 0x6a, 0xde, 0x7a, 0x3a, 0x6f, 0x3a, 0xb9, 0xfc, 0x45, 0x18, 0x90, 0x6f, 0xff, 0xb7, 0xf7, 0xc3, 0xa7, 0x1d, 0xcf, 0xae, 0x7e, - 0x03, 0x00, 0x00, 0xff, 0xff, 0x80, 0x41, 0xe5, 0x25, 0x9f, 0x01, 0x00, 0x00, + 0x03, 0x00, 0x00, 0xff, 0xff, 0x61, 0x20, 0x50, 0xce, 0x9f, 0x01, 0x00, 0x00, } func (m *Budget) Marshal() (dAtA []byte, err error) { @@ -350,7 +350,7 @@ func (m *Budget) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.StartTime |= int64(b&0x7F) << shift + m.StartTime |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -369,7 +369,7 @@ func (m *Budget) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Tranches |= int64(b&0x7F) << shift + m.Tranches |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -388,7 +388,7 @@ func (m *Budget) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Period |= int64(b&0x7F) << shift + m.Period |= uint64(b&0x7F) << shift if b < 0x80 { break } From 4cffd2b61a2c82613dad89794a27919428fb761b Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Mon, 30 Oct 2023 19:54:09 +0530 Subject: [PATCH 51/69] fix tests --- x/protocolpool/keeper/grpc_query_test.go | 2 +- x/protocolpool/keeper/keeper.go | 16 +++++++------- x/protocolpool/keeper/msg_server_test.go | 28 ++++++++++++------------ 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/x/protocolpool/keeper/grpc_query_test.go b/x/protocolpool/keeper/grpc_query_test.go index 877c09da98f1..fbe031b55b51 100644 --- a/x/protocolpool/keeper/grpc_query_test.go +++ b/x/protocolpool/keeper/grpc_query_test.go @@ -37,7 +37,7 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { budget := types.Budget{ RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: suite.ctx.BlockTime().Unix() - 70, + StartTime: uint64(suite.ctx.BlockTime().Unix() - 70), Tranches: 2, Period: 60, } diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index ceefe03059c6..85f1dc9f532d 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -131,12 +131,12 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) currentTime := sdkCtx.BlockTime().Unix() startTime := budget.StartTime // Check if the start time is reached - if currentTime < startTime { + if uint64(currentTime) < startTime { return sdk.Coin{}, fmt.Errorf("distribution has not started yet") } // Calculate the time elapsed since the start time - timeElapsed := currentTime - startTime + timeElapsed := uint64(currentTime) - startTime // Check the time elapsed has passed period length if timeElapsed >= budget.Period { // Calculate how many periods have passed @@ -144,7 +144,7 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) if periodsPassed > 0 { // Calculate the amount to distribute for all passed periods - coinsToDistribute := math.NewInt(periodsPassed).Mul(budget.TotalBudget.Amount.QuoRaw(budget.Tranches)) + coinsToDistribute := math.NewInt(int64(periodsPassed)).Mul(budget.TotalBudget.Amount.QuoRaw(int64(budget.Tranches))) amount := sdk.NewCoin(budget.TotalBudget.Denom, coinsToDistribute) // update the budget's remaining tranches @@ -182,16 +182,16 @@ func (k Keeper) validateBudgetProposal(ctx context.Context, bp types.MsgSubmitBu return err } - if bp.StartTime <= sdk.UnwrapSDKContext(ctx).BlockTime().Unix() { + if int64(bp.StartTime) <= sdk.UnwrapSDKContext(ctx).BlockTime().Unix() { return fmt.Errorf("start time cannot be less than current block time") } - if bp.Tranches <= 0 { - return fmt.Errorf("tranches must be a positive value") + if bp.Tranches == 0 { + return fmt.Errorf("tranches must be greater than zero") } - if bp.Period <= 0 { - return fmt.Errorf("period length should be a positive value") + if bp.Period == 0 { + return fmt.Errorf("period length should be greater than zero") } return nil diff --git a/x/protocolpool/keeper/msg_server_test.go b/x/protocolpool/keeper/msg_server_test.go index 221d4b782031..180195ee43e5 100644 --- a/x/protocolpool/keeper/msg_server_test.go +++ b/x/protocolpool/keeper/msg_server_test.go @@ -25,7 +25,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: suite.poolKeeper.GetAuthority(), RecipientAddress: "", TotalBudget: &fooCoin, - StartTime: suite.ctx.BlockTime().Unix(), + StartTime: uint64(suite.ctx.BlockTime().Unix()), Tranches: 2, Period: 60, }, @@ -37,7 +37,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: "", RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: suite.ctx.BlockTime().Unix(), + StartTime: uint64(suite.ctx.BlockTime().Unix()), Tranches: 2, Period: 60, }, @@ -49,7 +49,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: "invalid_authority", RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: suite.ctx.BlockTime().Unix(), + StartTime: uint64(suite.ctx.BlockTime().Unix()), Tranches: 2, Period: 60, }, @@ -61,7 +61,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: suite.poolKeeper.GetAuthority(), RecipientAddress: recipientAddr.String(), TotalBudget: &invalidCoin, - StartTime: suite.ctx.BlockTime().Unix(), + StartTime: uint64(suite.ctx.BlockTime().Unix()), Tranches: 2, Period: 60, }, @@ -73,7 +73,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: suite.poolKeeper.GetAuthority(), RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: suite.ctx.BlockTime().Unix() - 5, + StartTime: uint64(suite.ctx.BlockTime().Unix() - 5), Tranches: 2, Period: 60, }, @@ -85,31 +85,31 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: suite.poolKeeper.GetAuthority(), RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: suite.ctx.BlockTime().Unix() + 10, + StartTime: uint64(suite.ctx.BlockTime().Unix() + 10), Tranches: 0, Period: 60, }, expErr: true, - expErrMsg: "tranches must be a positive value", + expErrMsg: "tranches must be greater than zero", }, "invalid period": { input: &types.MsgSubmitBudgetProposal{ Authority: suite.poolKeeper.GetAuthority(), RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: suite.ctx.BlockTime().Unix() + 10, + StartTime: uint64(suite.ctx.BlockTime().Unix() + 10), Tranches: 2, Period: 0, }, expErr: true, - expErrMsg: "period length should be a positive value", + expErrMsg: "period length should be greater than zero", }, "all good": { input: &types.MsgSubmitBudgetProposal{ Authority: suite.poolKeeper.GetAuthority(), RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: suite.ctx.BlockTime().Unix() + 10, + StartTime: uint64(suite.ctx.BlockTime().Unix() + 10), Tranches: 2, Period: 60, }, @@ -157,7 +157,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { budget := types.Budget{ RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: suite.ctx.BlockTime().Unix() + 3600, + StartTime: uint64(suite.ctx.BlockTime().Unix() + 3600), Tranches: 2, Period: 60, } @@ -174,7 +174,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { budget := types.Budget{ RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: suite.ctx.BlockTime().Unix() - 50, + StartTime: uint64(suite.ctx.BlockTime().Unix() - 50), Tranches: 1, Period: 60, } @@ -191,7 +191,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { budget := types.Budget{ RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: suite.ctx.BlockTime().Unix() - 70, + StartTime: uint64(suite.ctx.BlockTime().Unix() - 70), Tranches: 2, Period: 60, } @@ -208,7 +208,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { budget := types.Budget{ RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: suite.ctx.BlockTime().Unix() - 70, + StartTime: uint64(suite.ctx.BlockTime().Unix() - 70), Tranches: 2, Period: 60, } From 497a2b4fccc5e183abd15a2734227561c84c77e5 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Tue, 31 Oct 2023 11:05:05 +0530 Subject: [PATCH 52/69] add double claim testcases --- x/protocolpool/keeper/keeper.go | 7 +-- x/protocolpool/keeper/msg_server_test.go | 75 +++++++++++++++++++++++- 2 files changed, 77 insertions(+), 5 deletions(-) diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 85f1dc9f532d..b6073224787f 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -111,7 +111,7 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) budget, err := k.BudgetProposal.Get(ctx, recipient) if err != nil { if errors.Is(err, collections.ErrNotFound) { - return sdk.Coin{}, fmt.Errorf("no claimable funds are present for recipient: %s", recipient.String()) + return sdk.Coin{}, fmt.Errorf("no budget found for recipient: %s", recipient.String()) } return sdk.Coin{}, err } @@ -123,9 +123,8 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) if err != nil { return sdk.Coin{}, err } - // Log the end of the budget - k.Logger(ctx).Debug(fmt.Sprintf("Budget ended for recipient: %s", recipient.String())) - return sdk.Coin{}, nil + // Return the end of the budget + return sdk.Coin{}, fmt.Errorf("budget ended for recipient: %s", recipient.String()) } currentTime := sdkCtx.BlockTime().Unix() diff --git a/x/protocolpool/keeper/msg_server_test.go b/x/protocolpool/keeper/msg_server_test.go index 180195ee43e5..c4fc57b3857a 100644 --- a/x/protocolpool/keeper/msg_server_test.go +++ b/x/protocolpool/keeper/msg_server_test.go @@ -1,6 +1,9 @@ package keeper_test import ( + "time" + + "cosmossdk.io/core/header" "cosmossdk.io/x/protocolpool/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -149,7 +152,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { "no budget found": { recipientAddress: sdk.AccAddress([]byte("acc1__________")), expErr: true, - expErrMsg: "no claimable funds are present for recipient", + expErrMsg: "no budget found for recipient", }, "claiming before start time": { preRun: func() { @@ -227,6 +230,76 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { expErr: true, expErrMsg: "budget period has not passed yet", }, + "valid double claim attempt": { + preRun: func() { + // Prepare the budget proposal with valid start time and period + budget := types.Budget{ + RecipientAddress: recipientAddr.String(), + TotalBudget: &fooCoin, + StartTime: uint64(suite.ctx.BlockTime().Unix() - 70), + Tranches: 2, + Period: 60, + } + err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) + suite.Require().NoError(err) + + // Claim the funds once + msg := &types.MsgClaimBudget{ + RecipientAddress: recipientAddr.String(), + } + suite.mockSendCoinsFromModuleToAccount(recipientAddr) + _, err = suite.msgServer.ClaimBudget(suite.ctx, msg) + suite.Require().NoError(err) + + // Create a new context with an updated block time to simulate a delay + newBlockTime := suite.ctx.BlockTime().Add(60 * time.Second) + suite.ctx = suite.ctx.WithHeaderInfo(header.Info{ + Time: newBlockTime, + }) + }, + recipientAddress: recipientAddr, + expErr: false, + claimableFunds: sdk.NewInt64Coin("foo", 50), + }, + "budget ended for recipient": { + preRun: func() { + // Prepare the budget proposal with valid start time and period + budget := types.Budget{ + RecipientAddress: recipientAddr.String(), + TotalBudget: &fooCoin, + StartTime: uint64(suite.ctx.BlockTime().Unix() - 70), + Tranches: 2, + Period: 60, + } + err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) + suite.Require().NoError(err) + + // Claim the funds once + msg := &types.MsgClaimBudget{ + RecipientAddress: recipientAddr.String(), + } + suite.mockSendCoinsFromModuleToAccount(recipientAddr) + _, err = suite.msgServer.ClaimBudget(suite.ctx, msg) + suite.Require().NoError(err) + + // Create a new context with an updated block time to simulate a delay + newBlockTime := suite.ctx.BlockTime().Add(60 * time.Second) + suite.ctx = suite.ctx.WithHeaderInfo(header.Info{ + Time: newBlockTime, + }) + + // Claim the funds twitce + msg = &types.MsgClaimBudget{ + RecipientAddress: recipientAddr.String(), + } + suite.mockSendCoinsFromModuleToAccount(recipientAddr) + _, err = suite.msgServer.ClaimBudget(suite.ctx, msg) + suite.Require().NoError(err) + }, + recipientAddress: recipientAddr, + expErr: true, + expErrMsg: "budget ended for recipient", + }, } for name, tc := range testCases { From 638b106eb745412f61219c64a2ae1c058cdd8e8c Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Wed, 1 Nov 2023 09:24:44 +0000 Subject: [PATCH 53/69] update proto file --- api/cosmos/protocolpool/v1/tx.pulsar.go | 199 ++++++++++++++------- api/cosmos/protocolpool/v1/types.pulsar.go | 108 ++++++++--- proto/cosmos/protocolpool/v1/tx.proto | 8 +- proto/cosmos/protocolpool/v1/types.proto | 8 +- x/protocolpool/types/tx.pb.go | 133 +++++++++----- x/protocolpool/types/types.pb.go | 88 ++++++--- 6 files changed, 377 insertions(+), 167 deletions(-) diff --git a/api/cosmos/protocolpool/v1/tx.pulsar.go b/api/cosmos/protocolpool/v1/tx.pulsar.go index ec1b58778f1f..fb8f36f9186a 100644 --- a/api/cosmos/protocolpool/v1/tx.pulsar.go +++ b/api/cosmos/protocolpool/v1/tx.pulsar.go @@ -1914,6 +1914,7 @@ var ( fd_MsgSubmitBudgetProposal_recipient_address protoreflect.FieldDescriptor fd_MsgSubmitBudgetProposal_total_budget protoreflect.FieldDescriptor fd_MsgSubmitBudgetProposal_start_time protoreflect.FieldDescriptor + fd_MsgSubmitBudgetProposal_last_claim_time protoreflect.FieldDescriptor fd_MsgSubmitBudgetProposal_tranches protoreflect.FieldDescriptor fd_MsgSubmitBudgetProposal_period protoreflect.FieldDescriptor ) @@ -1925,6 +1926,7 @@ func init() { fd_MsgSubmitBudgetProposal_recipient_address = md_MsgSubmitBudgetProposal.Fields().ByName("recipient_address") fd_MsgSubmitBudgetProposal_total_budget = md_MsgSubmitBudgetProposal.Fields().ByName("total_budget") fd_MsgSubmitBudgetProposal_start_time = md_MsgSubmitBudgetProposal.Fields().ByName("start_time") + fd_MsgSubmitBudgetProposal_last_claim_time = md_MsgSubmitBudgetProposal.Fields().ByName("last_claim_time") fd_MsgSubmitBudgetProposal_tranches = md_MsgSubmitBudgetProposal.Fields().ByName("tranches") fd_MsgSubmitBudgetProposal_period = md_MsgSubmitBudgetProposal.Fields().ByName("period") } @@ -2018,6 +2020,12 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Range(f func(protoreflect.Field return } } + if x.LastClaimTime != uint64(0) { + value := protoreflect.ValueOfUint64(x.LastClaimTime) + if !f(fd_MsgSubmitBudgetProposal_last_claim_time, value) { + return + } + } if x.Tranches != uint64(0) { value := protoreflect.ValueOfUint64(x.Tranches) if !f(fd_MsgSubmitBudgetProposal_tranches, value) { @@ -2053,6 +2061,8 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Has(fd protoreflect.FieldDescri return x.TotalBudget != nil case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": return x.StartTime != uint64(0) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.last_claim_time": + return x.LastClaimTime != uint64(0) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": return x.Tranches != uint64(0) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": @@ -2081,6 +2091,8 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Clear(fd protoreflect.FieldDesc x.TotalBudget = nil case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": x.StartTime = uint64(0) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.last_claim_time": + x.LastClaimTime = uint64(0) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": x.Tranches = uint64(0) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": @@ -2113,6 +2125,9 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Get(descriptor protoreflect.Fie case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": value := x.StartTime return protoreflect.ValueOfUint64(value) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.last_claim_time": + value := x.LastClaimTime + return protoreflect.ValueOfUint64(value) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": value := x.Tranches return protoreflect.ValueOfUint64(value) @@ -2147,6 +2162,8 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Set(fd protoreflect.FieldDescri x.TotalBudget = value.Message().Interface().(*v1beta1.Coin) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": x.StartTime = value.Uint() + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.last_claim_time": + x.LastClaimTime = value.Uint() case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": x.Tranches = value.Uint() case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": @@ -2182,6 +2199,8 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Mutable(fd protoreflect.FieldDe panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.MsgSubmitBudgetProposal is not mutable")) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": panic(fmt.Errorf("field start_time of message cosmos.protocolpool.v1.MsgSubmitBudgetProposal is not mutable")) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.last_claim_time": + panic(fmt.Errorf("field last_claim_time 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")) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": @@ -2208,6 +2227,8 @@ func (x *fastReflection_MsgSubmitBudgetProposal) NewField(fd protoreflect.FieldD return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.last_claim_time": + return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": @@ -2296,6 +2317,9 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth if x.StartTime != 0 { n += 1 + runtime.Sov(uint64(x.StartTime)) } + if x.LastClaimTime != 0 { + n += 1 + runtime.Sov(uint64(x.LastClaimTime)) + } if x.Tranches != 0 { n += 1 + runtime.Sov(uint64(x.Tranches)) } @@ -2334,11 +2358,16 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth if x.Period != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x38 } if x.Tranches != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Tranches)) i-- + dAtA[i] = 0x30 + } + if x.LastClaimTime != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.LastClaimTime)) + i-- dAtA[i] = 0x28 } if x.StartTime != 0 { @@ -2543,6 +2572,25 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth } } case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastClaimTime", wireType) + } + x.LastClaimTime = 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.LastClaimTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) } @@ -2561,7 +2609,7 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth break } } - case 6: + case 7: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } @@ -4009,12 +4057,16 @@ type MsgSubmitBudgetProposal struct { // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. // If start_time is less than the current block time, proposal will not be accepted. StartTime uint64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // last_claim_time is the time when the budget was last successfully claimed or distributed, + // represented in seconds since the Unix epoch. It is used to track the last claim time for fund distribution. + // If set, it cannot be less than start_time. + LastClaimTime uint64 `protobuf:"varint,5,opt,name=last_claim_time,json=lastClaimTime,proto3" json:"last_claim_time,omitempty"` // tranches is the number of times the total budget amount is to be distributed. - Tranches uint64 `protobuf:"varint,5,opt,name=tranches,proto3" json:"tranches,omitempty"` + Tranches uint64 `protobuf:"varint,6,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 uint64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` + Period uint64 `protobuf:"varint,7,opt,name=period,proto3" json:"period,omitempty"` } func (x *MsgSubmitBudgetProposal) Reset() { @@ -4065,6 +4117,13 @@ func (x *MsgSubmitBudgetProposal) GetStartTime() uint64 { return 0 } +func (x *MsgSubmitBudgetProposal) GetLastClaimTime() uint64 { + if x != nil { + return x.LastClaimTime + } + return 0 +} + func (x *MsgSubmitBudgetProposal) GetTranches() uint64 { if x != nil { return x.Tranches @@ -4224,7 +4283,7 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 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, 0xb9, 0x02, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x53, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe1, 0x02, 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, @@ -4240,73 +4299,75 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x69, 0x6e, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 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, 0x16, 0x0a, 0x06, 0x70, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 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, 0x32, 0xeb, 0x03, 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, + 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6c, + 0x61, 0x69, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, + 0x68, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, + 0x68, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x04, 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, 0x32, 0xeb, + 0x03, 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, 0x6c, 0x61, 0x69, 0x6d, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x1a, 0x2e, 0x2e, + 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, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, + 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, 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 ( diff --git a/api/cosmos/protocolpool/v1/types.pulsar.go b/api/cosmos/protocolpool/v1/types.pulsar.go index 5452554453f0..560318843963 100644 --- a/api/cosmos/protocolpool/v1/types.pulsar.go +++ b/api/cosmos/protocolpool/v1/types.pulsar.go @@ -19,6 +19,7 @@ var ( fd_Budget_recipient_address protoreflect.FieldDescriptor fd_Budget_total_budget protoreflect.FieldDescriptor fd_Budget_start_time protoreflect.FieldDescriptor + fd_Budget_last_claim_time protoreflect.FieldDescriptor fd_Budget_tranches protoreflect.FieldDescriptor fd_Budget_period protoreflect.FieldDescriptor ) @@ -29,6 +30,7 @@ func init() { fd_Budget_recipient_address = md_Budget.Fields().ByName("recipient_address") fd_Budget_total_budget = md_Budget.Fields().ByName("total_budget") fd_Budget_start_time = md_Budget.Fields().ByName("start_time") + fd_Budget_last_claim_time = md_Budget.Fields().ByName("last_claim_time") fd_Budget_tranches = md_Budget.Fields().ByName("tranches") fd_Budget_period = md_Budget.Fields().ByName("period") } @@ -116,6 +118,12 @@ func (x *fastReflection_Budget) Range(f func(protoreflect.FieldDescriptor, proto return } } + if x.LastClaimTime != uint64(0) { + value := protoreflect.ValueOfUint64(x.LastClaimTime) + if !f(fd_Budget_last_claim_time, value) { + return + } + } if x.Tranches != uint64(0) { value := protoreflect.ValueOfUint64(x.Tranches) if !f(fd_Budget_tranches, value) { @@ -149,6 +157,8 @@ func (x *fastReflection_Budget) Has(fd protoreflect.FieldDescriptor) bool { return x.TotalBudget != nil case "cosmos.protocolpool.v1.Budget.start_time": return x.StartTime != uint64(0) + case "cosmos.protocolpool.v1.Budget.last_claim_time": + return x.LastClaimTime != uint64(0) case "cosmos.protocolpool.v1.Budget.tranches": return x.Tranches != uint64(0) case "cosmos.protocolpool.v1.Budget.period": @@ -175,6 +185,8 @@ func (x *fastReflection_Budget) Clear(fd protoreflect.FieldDescriptor) { x.TotalBudget = nil case "cosmos.protocolpool.v1.Budget.start_time": x.StartTime = uint64(0) + case "cosmos.protocolpool.v1.Budget.last_claim_time": + x.LastClaimTime = uint64(0) case "cosmos.protocolpool.v1.Budget.tranches": x.Tranches = uint64(0) case "cosmos.protocolpool.v1.Budget.period": @@ -204,6 +216,9 @@ func (x *fastReflection_Budget) Get(descriptor protoreflect.FieldDescriptor) pro case "cosmos.protocolpool.v1.Budget.start_time": value := x.StartTime return protoreflect.ValueOfUint64(value) + case "cosmos.protocolpool.v1.Budget.last_claim_time": + value := x.LastClaimTime + return protoreflect.ValueOfUint64(value) case "cosmos.protocolpool.v1.Budget.tranches": value := x.Tranches return protoreflect.ValueOfUint64(value) @@ -236,6 +251,8 @@ func (x *fastReflection_Budget) Set(fd protoreflect.FieldDescriptor, value proto x.TotalBudget = value.Message().Interface().(*v1beta1.Coin) case "cosmos.protocolpool.v1.Budget.start_time": x.StartTime = value.Uint() + case "cosmos.protocolpool.v1.Budget.last_claim_time": + x.LastClaimTime = value.Uint() case "cosmos.protocolpool.v1.Budget.tranches": x.Tranches = value.Uint() case "cosmos.protocolpool.v1.Budget.period": @@ -269,6 +286,8 @@ func (x *fastReflection_Budget) Mutable(fd protoreflect.FieldDescriptor) protore panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.Budget is not mutable")) case "cosmos.protocolpool.v1.Budget.start_time": panic(fmt.Errorf("field start_time of message cosmos.protocolpool.v1.Budget is not mutable")) + case "cosmos.protocolpool.v1.Budget.last_claim_time": + panic(fmt.Errorf("field last_claim_time of message cosmos.protocolpool.v1.Budget is not mutable")) case "cosmos.protocolpool.v1.Budget.tranches": panic(fmt.Errorf("field tranches of message cosmos.protocolpool.v1.Budget is not mutable")) case "cosmos.protocolpool.v1.Budget.period": @@ -293,6 +312,8 @@ func (x *fastReflection_Budget) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.protocolpool.v1.Budget.start_time": return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.protocolpool.v1.Budget.last_claim_time": + return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.Budget.tranches": return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.Budget.period": @@ -377,6 +398,9 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { if x.StartTime != 0 { n += 1 + runtime.Sov(uint64(x.StartTime)) } + if x.LastClaimTime != 0 { + n += 1 + runtime.Sov(uint64(x.LastClaimTime)) + } if x.Tranches != 0 { n += 1 + runtime.Sov(uint64(x.Tranches)) } @@ -415,11 +439,16 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { if x.Period != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x30 } if x.Tranches != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Tranches)) i-- + dAtA[i] = 0x28 + } + if x.LastClaimTime != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.LastClaimTime)) + i-- dAtA[i] = 0x20 } if x.StartTime != 0 { @@ -585,6 +614,25 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { } } case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastClaimTime", wireType) + } + x.LastClaimTime = 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.LastClaimTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) } @@ -603,7 +651,7 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { break } } - case 5: + case 6: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } @@ -682,12 +730,16 @@ type Budget struct { TotalBudget *v1beta1.Coin `protobuf:"bytes,2,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. StartTime uint64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // last_claim_time is the time when the budget was last successfully claimed or distributed, + // represented in seconds since the Unix epoch. It is used to track the last claim time for fund distribution. + // If set, it cannot be less than start_time. + LastClaimTime uint64 `protobuf:"varint,4,opt,name=last_claim_time,json=lastClaimTime,proto3" json:"last_claim_time,omitempty"` // tranches is the number of times the total budget amount is to be distributed. - Tranches uint64 `protobuf:"varint,4,opt,name=tranches,proto3" json:"tranches,omitempty"` + 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 uint64 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"` + Period uint64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` } func (x *Budget) Reset() { @@ -731,6 +783,13 @@ func (x *Budget) GetStartTime() uint64 { return 0 } +func (x *Budget) GetLastClaimTime() uint64 { + if x != nil { + return x.LastClaimTime + } + return 0 +} + func (x *Budget) GetTranches() uint64 { if x != nil { return x.Tranches @@ -755,7 +814,7 @@ var file_cosmos_protocolpool_v1_types_proto_rawDesc = []byte{ 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, 0x22, 0xe0, 0x01, 0x0a, 0x06, 0x42, 0x75, 0x64, 0x67, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x02, 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, @@ -766,24 +825,27 @@ var file_cosmos_protocolpool_v1_types_proto_rawDesc = []byte{ 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, - 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, - 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 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, + 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, + 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 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, 0x16, 0x0a, 0x06, 0x70, 0x65, + 0x72, 0x69, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 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 ( diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index 8a39eab8778d..437404fea57f 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -74,12 +74,16 @@ message MsgSubmitBudgetProposal { // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. // If start_time is less than the current block time, proposal will not be accepted. uint64 start_time = 4; + // last_claim_time is the time when the budget was last successfully claimed or distributed, + // represented in seconds since the Unix epoch. It is used to track the last claim time for fund distribution. + // If set, it cannot be less than start_time. + uint64 last_claim_time = 5; // tranches is the number of times the total budget amount is to be distributed. - uint64 tranches = 5; + uint64 tranches = 6; // 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). - uint64 period = 6; + uint64 period = 7; } // MsgSubmitBudgetProposalResponse defines the response to executing a diff --git a/proto/cosmos/protocolpool/v1/types.proto b/proto/cosmos/protocolpool/v1/types.proto index 1e1e07121736..a41ed309fcc0 100644 --- a/proto/cosmos/protocolpool/v1/types.proto +++ b/proto/cosmos/protocolpool/v1/types.proto @@ -14,10 +14,14 @@ message Budget { cosmos.base.v1beta1.Coin total_budget = 2; // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. uint64 start_time = 3; + // last_claim_time is the time when the budget was last successfully claimed or distributed, + // represented in seconds since the Unix epoch. It is used to track the last claim time for fund distribution. + // If set, it cannot be less than start_time. + uint64 last_claim_time = 4; // tranches is the number of times the total budget amount is to be distributed. - uint64 tranches = 4; + uint64 tranches = 5; // 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). - uint64 period = 5; + uint64 period = 6; } \ No newline at end of file diff --git a/x/protocolpool/types/tx.pb.go b/x/protocolpool/types/tx.pb.go index 2ba0fcd7409d..daff420ee1ee 100644 --- a/x/protocolpool/types/tx.pb.go +++ b/x/protocolpool/types/tx.pb.go @@ -222,12 +222,16 @@ type MsgSubmitBudgetProposal struct { // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. // If start_time is less than the current block time, proposal will not be accepted. StartTime uint64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // last_claim_time is the time when the budget was last successfully claimed or distributed, + // represented in seconds since the Unix epoch. It is used to track the last claim time for fund distribution. + // If set, it cannot be less than start_time. + LastClaimTime uint64 `protobuf:"varint,5,opt,name=last_claim_time,json=lastClaimTime,proto3" json:"last_claim_time,omitempty"` // tranches is the number of times the total budget amount is to be distributed. - Tranches uint64 `protobuf:"varint,5,opt,name=tranches,proto3" json:"tranches,omitempty"` + Tranches uint64 `protobuf:"varint,6,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 uint64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` + Period uint64 `protobuf:"varint,7,opt,name=period,proto3" json:"period,omitempty"` } func (m *MsgSubmitBudgetProposal) Reset() { *m = MsgSubmitBudgetProposal{} } @@ -291,6 +295,13 @@ func (m *MsgSubmitBudgetProposal) GetStartTime() uint64 { return 0 } +func (m *MsgSubmitBudgetProposal) GetLastClaimTime() uint64 { + if m != nil { + return m.LastClaimTime + } + return 0 +} + func (m *MsgSubmitBudgetProposal) GetTranches() uint64 { if m != nil { return m.Tranches @@ -448,49 +459,50 @@ func init() { func init() { proto.RegisterFile("cosmos/protocolpool/v1/tx.proto", fileDescriptor_09efe14517e7f6dc) } var fileDescriptor_09efe14517e7f6dc = []byte{ - // 661 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xce, 0x35, 0x6d, 0x44, 0xae, 0xa8, 0xa2, 0x56, 0x48, 0x5d, 0xab, 0xb5, 0xd3, 0x0c, 0x28, - 0xaa, 0xa8, 0x4d, 0xca, 0x2f, 0xa9, 0xb0, 0x90, 0x0a, 0xb6, 0x48, 0x55, 0xca, 0xc4, 0x12, 0x39, - 0xf6, 0xc9, 0x3d, 0x35, 0xf6, 0xb3, 0x7c, 0xe7, 0xd2, 0x22, 0x21, 0x55, 0x4c, 0x8c, 0xfc, 0x09, - 0x9d, 0x99, 0x3a, 0xb0, 0xf0, 0x1f, 0x54, 0x62, 0xa9, 0x98, 0x98, 0x00, 0x25, 0x43, 0x91, 0xf8, - 0x27, 0x90, 0xed, 0xab, 0x93, 0x28, 0x26, 0x25, 0x48, 0x9d, 0x92, 0x7b, 0xef, 0x7b, 0xdf, 0xfb, - 0xde, 0x97, 0x7b, 0x17, 0xac, 0x59, 0xc0, 0x5c, 0x60, 0x86, 0x1f, 0x00, 0x07, 0x0b, 0xba, 0x3e, - 0x40, 0xd7, 0x38, 0xa8, 0x1b, 0xfc, 0x50, 0x8f, 0x43, 0x52, 0x39, 0x01, 0xe8, 0xc3, 0x00, 0xfd, - 0xa0, 0xae, 0x94, 0x1c, 0x70, 0x20, 0x0e, 0x1a, 0xd1, 0xb7, 0x24, 0xaf, 0xa8, 0x82, 0xae, 0x63, - 0x32, 0x62, 0x1c, 0xd4, 0x3b, 0x84, 0x9b, 0x75, 0xc3, 0x02, 0xea, 0x89, 0xfc, 0x72, 0x92, 0x6f, - 0x27, 0x85, 0xc3, 0xd4, 0xca, 0x92, 0x28, 0x75, 0x99, 0x13, 0x09, 0x70, 0x99, 0x93, 0x24, 0xaa, - 0x5f, 0x10, 0x2e, 0x35, 0x99, 0xf3, 0x22, 0xf4, 0xec, 0x6d, 0x70, 0xdd, 0xd0, 0xa3, 0xfc, 0x68, - 0x07, 0xa0, 0x2b, 0x59, 0xb8, 0x60, 0xba, 0x10, 0x7a, 0x5c, 0x46, 0x95, 0x7c, 0x6d, 0x7e, 0x73, - 0x59, 0x17, 0x84, 0x51, 0x77, 0x5d, 0x74, 0xd7, 0xb7, 0x81, 0x7a, 0x8d, 0x7b, 0x67, 0xdf, 0xb5, - 0xdc, 0xc7, 0x1f, 0x5a, 0xcd, 0xa1, 0x7c, 0x2f, 0xec, 0xe8, 0x16, 0xb8, 0xa2, 0xbb, 0xf8, 0xd8, - 0x60, 0xf6, 0xbe, 0xc1, 0x8f, 0x7c, 0xc2, 0xe2, 0x02, 0xd6, 0x12, 0xd4, 0xd2, 0x23, 0x5c, 0xb4, - 0x89, 0x0f, 0x8c, 0x72, 0x08, 0xe4, 0x99, 0x0a, 0xaa, 0x15, 0x1b, 0xf2, 0xd7, 0x4f, 0x1b, 0x25, - 0xd1, 0xea, 0x99, 0x6d, 0x07, 0x84, 0xb1, 0x5d, 0x1e, 0x50, 0xcf, 0x69, 0x0d, 0xa0, 0x5b, 0xe5, - 0xf7, 0x27, 0x5a, 0xee, 0xd7, 0x89, 0x96, 0x7b, 0x77, 0x71, 0xba, 0x3e, 0x88, 0x57, 0x55, 0xbc, - 0x92, 0x35, 0x4c, 0x8b, 0x30, 0x1f, 0x3c, 0x46, 0xaa, 0x3d, 0x84, 0x6f, 0x37, 0x99, 0x33, 0x92, - 0xdc, 0xf5, 0x89, 0x67, 0x47, 0x4a, 0xcc, 0x90, 0xef, 0x41, 0x40, 0xf9, 0x91, 0x8c, 0xae, 0x52, - 0x92, 0x42, 0xa5, 0x15, 0x5c, 0x0c, 0x88, 0x45, 0x7d, 0x4a, 0x3c, 0x9e, 0x4c, 0xd0, 0x1a, 0x04, - 0x86, 0x4c, 0xcc, 0x5f, 0x9b, 0x89, 0x5b, 0x0b, 0xb1, 0x09, 0xa9, 0xa4, 0xaa, 0x86, 0x57, 0x33, - 0x67, 0x4c, 0x5d, 0xf8, 0x3c, 0x83, 0x97, 0x9a, 0xcc, 0xd9, 0x0d, 0x3b, 0x2e, 0xe5, 0x8d, 0xd0, - 0x76, 0x08, 0xdf, 0x09, 0xc0, 0x07, 0x66, 0x76, 0xff, 0xdb, 0x87, 0xe7, 0x78, 0x31, 0x1d, 0xbb, - 0x6d, 0x26, 0xa8, 0x2b, 0x7f, 0xd1, 0x5b, 0x69, 0x89, 0x88, 0x4b, 0x4f, 0xf1, 0x4d, 0x0e, 0xdc, - 0xec, 0xb6, 0x3b, 0xb1, 0x2c, 0x39, 0x5f, 0x41, 0x13, 0x6d, 0x6b, 0xcd, 0xc7, 0xf0, 0x64, 0x08, - 0x69, 0x15, 0x63, 0xc6, 0xcd, 0x80, 0xb7, 0x39, 0x75, 0x89, 0x3c, 0x5b, 0x41, 0xb5, 0xd9, 0x56, - 0x31, 0x8e, 0xbc, 0xa4, 0x2e, 0x91, 0x14, 0x7c, 0x83, 0x07, 0xa6, 0x67, 0xed, 0x11, 0x26, 0xcf, - 0xc5, 0xc9, 0xf4, 0x2c, 0x95, 0x71, 0xc1, 0x27, 0x01, 0x05, 0x5b, 0x2e, 0xc4, 0x19, 0x71, 0x1a, - 0x33, 0x77, 0x0d, 0x6b, 0x7f, 0xb1, 0x2e, 0xb5, 0x17, 0xf0, 0x42, 0xe4, 0x7f, 0xd7, 0xa4, 0xae, - 0xd0, 0x95, 0x69, 0x0e, 0x9a, 0xd6, 0x9c, 0xad, 0x72, 0xa4, 0x65, 0x9c, 0xa9, 0xfa, 0x16, 0x97, - 0x47, 0x1b, 0x5e, 0x4a, 0x19, 0x59, 0x62, 0x74, 0x4d, 0xf7, 0x6f, 0xf3, 0x77, 0x1e, 0xe7, 0x9b, - 0xcc, 0x91, 0x5e, 0xe3, 0xc5, 0xf1, 0x67, 0xe4, 0xae, 0x9e, 0xfd, 0xc4, 0xe9, 0x59, 0x7b, 0xaa, - 0x3c, 0x98, 0x06, 0x9d, 0x4e, 0xf9, 0x06, 0x4b, 0x19, 0x1b, 0xbd, 0x31, 0x81, 0x6b, 0x1c, 0xae, - 0x3c, 0x9c, 0x0a, 0x9e, 0xf6, 0x3e, 0x46, 0xb8, 0x94, 0xb9, 0x48, 0xc6, 0x04, 0xbe, 0xac, 0x02, - 0xe5, 0xf1, 0x94, 0x05, 0xa9, 0x04, 0x82, 0xe7, 0x87, 0x2f, 0xdb, 0x9d, 0x49, 0x83, 0x0c, 0x70, - 0x8a, 0xfe, 0x6f, 0xb8, 0xcb, 0x36, 0xca, 0xdc, 0xf1, 0xc5, 0xe9, 0x3a, 0x6a, 0x3c, 0x39, 0xeb, - 0xa9, 0xe8, 0xbc, 0xa7, 0xa2, 0x9f, 0x3d, 0x15, 0x7d, 0xe8, 0xab, 0xb9, 0xf3, 0xbe, 0x9a, 0xfb, - 0xd6, 0x57, 0x73, 0xaf, 0xd6, 0x12, 0x3e, 0x66, 0xef, 0xeb, 0x14, 0x8c, 0xc3, 0xd1, 0x7f, 0xbd, - 0xf8, 0xe2, 0x74, 0x0a, 0x71, 0xec, 0xfe, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x9a, 0x22, - 0xf8, 0x19, 0x07, 0x00, 0x00, + // 681 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x3d, 0x6f, 0xd3, 0x50, + 0x14, 0xcd, 0x6b, 0xda, 0x40, 0x5e, 0xa1, 0x50, 0x2b, 0xa4, 0xae, 0xd5, 0xda, 0x69, 0x86, 0x2a, + 0xaa, 0xa8, 0x4d, 0xca, 0x97, 0x54, 0x58, 0x48, 0x05, 0x5b, 0xa4, 0x2a, 0x65, 0x62, 0x89, 0x1c, + 0xfb, 0xc9, 0x7d, 0xaa, 0xed, 0x6b, 0xf9, 0x3d, 0x97, 0x16, 0x09, 0xa9, 0x62, 0x62, 0xe4, 0x27, + 0x74, 0x66, 0xea, 0xc0, 0x8f, 0xa8, 0xc4, 0x52, 0x31, 0x31, 0xf1, 0x91, 0x0c, 0x45, 0xe2, 0x4f, + 0x20, 0x7f, 0xd4, 0x49, 0x14, 0x93, 0x12, 0xa4, 0x4e, 0x89, 0xcf, 0x3d, 0xf7, 0xde, 0x73, 0xcf, + 0x7b, 0xd7, 0xc6, 0x8a, 0x01, 0xcc, 0x01, 0xa6, 0x79, 0x3e, 0x70, 0x30, 0xc0, 0xf6, 0x00, 0x6c, + 0x6d, 0xbf, 0xae, 0xf1, 0x03, 0x35, 0x82, 0x84, 0x72, 0x4c, 0x50, 0x07, 0x09, 0xea, 0x7e, 0x5d, + 0x2a, 0x59, 0x60, 0x41, 0x04, 0x6a, 0xe1, 0xbf, 0x38, 0x2e, 0xc9, 0x49, 0xb9, 0x8e, 0xce, 0x88, + 0xb6, 0x5f, 0xef, 0x10, 0xae, 0xd7, 0x35, 0x03, 0xa8, 0x9b, 0xc4, 0x17, 0xe3, 0x78, 0x3b, 0x4e, + 0x1c, 0x2c, 0x2d, 0x2d, 0x24, 0xa9, 0x0e, 0xb3, 0x42, 0x01, 0x0e, 0xb3, 0xe2, 0x40, 0xf5, 0x33, + 0xc2, 0xa5, 0x26, 0xb3, 0x5e, 0x04, 0xae, 0xb9, 0x05, 0x8e, 0x13, 0xb8, 0x94, 0x1f, 0x6e, 0x03, + 0xd8, 0x82, 0x81, 0x0b, 0xba, 0x03, 0x81, 0xcb, 0x45, 0x54, 0xc9, 0xd7, 0x66, 0x37, 0x16, 0xd5, + 0xa4, 0x60, 0xd8, 0x5d, 0x4d, 0xba, 0xab, 0x5b, 0x40, 0xdd, 0xc6, 0xbd, 0xd3, 0x6f, 0x4a, 0xee, + 0xe3, 0x77, 0xa5, 0x66, 0x51, 0xbe, 0x1b, 0x74, 0x54, 0x03, 0x9c, 0xa4, 0x7b, 0xf2, 0xb3, 0xce, + 0xcc, 0x3d, 0x8d, 0x1f, 0x7a, 0x84, 0x45, 0x09, 0xac, 0x95, 0x94, 0x16, 0x1e, 0xe1, 0xa2, 0x49, + 0x3c, 0x60, 0x94, 0x83, 0x2f, 0x4e, 0x55, 0x50, 0xad, 0xd8, 0x10, 0xbf, 0x7c, 0x5a, 0x2f, 0x25, + 0xad, 0x9e, 0x99, 0xa6, 0x4f, 0x18, 0xdb, 0xe1, 0x3e, 0x75, 0xad, 0x56, 0x9f, 0xba, 0x59, 0x7e, + 0x7f, 0xac, 0xe4, 0x7e, 0x1d, 0x2b, 0xb9, 0x77, 0xe7, 0x27, 0x6b, 0x7d, 0xbc, 0x2a, 0xe3, 0xa5, + 0xac, 0x61, 0x5a, 0x84, 0x79, 0xe0, 0x32, 0x52, 0xed, 0x22, 0x7c, 0xa7, 0xc9, 0xac, 0xa1, 0xe0, + 0x8e, 0x47, 0x5c, 0x33, 0x54, 0xa2, 0x07, 0x7c, 0x17, 0x7c, 0xca, 0x0f, 0x45, 0x74, 0x99, 0x92, + 0x94, 0x2a, 0x2c, 0xe1, 0xa2, 0x4f, 0x0c, 0xea, 0x51, 0xe2, 0xf2, 0x78, 0x82, 0x56, 0x1f, 0x18, + 0x30, 0x31, 0x7f, 0x65, 0x26, 0x6e, 0xce, 0x45, 0x26, 0xa4, 0x92, 0xaa, 0x0a, 0x5e, 0xce, 0x9c, + 0x31, 0x75, 0xe1, 0xe7, 0x14, 0x5e, 0x68, 0x32, 0x6b, 0x27, 0xe8, 0x38, 0x94, 0x37, 0x02, 0xd3, + 0x22, 0x7c, 0xdb, 0x07, 0x0f, 0x98, 0x6e, 0xff, 0xb7, 0x0f, 0xcf, 0xf1, 0x7c, 0x3a, 0x76, 0x5b, + 0x8f, 0x59, 0x97, 0x9e, 0xe8, 0xed, 0x34, 0x25, 0xc1, 0x85, 0xa7, 0xf8, 0x06, 0x07, 0xae, 0xdb, + 0xed, 0x4e, 0x24, 0x4b, 0xcc, 0x57, 0xd0, 0x58, 0xdb, 0x5a, 0xb3, 0x11, 0x3d, 0x1e, 0x42, 0x58, + 0xc6, 0x98, 0x71, 0xdd, 0xe7, 0x6d, 0x4e, 0x1d, 0x22, 0x4e, 0x57, 0x50, 0x6d, 0xba, 0x55, 0x8c, + 0x90, 0x97, 0xd4, 0x21, 0xc2, 0x2a, 0xbe, 0x65, 0xeb, 0x8c, 0xb7, 0x0d, 0x5b, 0xa7, 0x4e, 0xcc, + 0x99, 0x89, 0x38, 0x37, 0x43, 0x78, 0x2b, 0x44, 0x23, 0x9e, 0x84, 0xaf, 0x73, 0x5f, 0x77, 0x8d, + 0x5d, 0xc2, 0xc4, 0x42, 0x44, 0x48, 0x9f, 0x85, 0x32, 0x2e, 0x78, 0xc4, 0xa7, 0x60, 0x8a, 0xd7, + 0xa2, 0x48, 0xf2, 0x34, 0x72, 0x08, 0x2b, 0x58, 0xf9, 0x8b, 0xc5, 0xe9, 0x31, 0x00, 0x9e, 0x0b, + 0xcf, 0x29, 0x6c, 0x9b, 0xe8, 0xcf, 0x34, 0x11, 0x4d, 0x6a, 0xe2, 0x66, 0x39, 0xd4, 0x32, 0x5a, + 0xa9, 0xfa, 0x16, 0x97, 0x87, 0x1b, 0x5e, 0x48, 0x19, 0x5a, 0x76, 0x74, 0x45, 0xf7, 0x74, 0xe3, + 0x77, 0x1e, 0xe7, 0x9b, 0xcc, 0x12, 0x5e, 0xe3, 0xf9, 0xd1, 0xd7, 0xcd, 0x5d, 0x35, 0xfb, 0x55, + 0xa8, 0x66, 0xed, 0xb3, 0xf4, 0x60, 0x12, 0x76, 0x3a, 0xe5, 0x1b, 0x2c, 0x64, 0x6c, 0xfe, 0xfa, + 0x98, 0x5a, 0xa3, 0x74, 0xe9, 0xe1, 0x44, 0xf4, 0xb4, 0xf7, 0x11, 0xc2, 0xa5, 0xcc, 0x85, 0xd3, + 0xc6, 0xd4, 0xcb, 0x4a, 0x90, 0x1e, 0x4f, 0x98, 0x90, 0x4a, 0x20, 0x78, 0x76, 0xf0, 0xb2, 0xad, + 0x8e, 0x1b, 0xa4, 0xcf, 0x93, 0xd4, 0x7f, 0xe3, 0x5d, 0xb4, 0x91, 0x66, 0x8e, 0xce, 0x4f, 0xd6, + 0x50, 0xe3, 0xc9, 0x69, 0x57, 0x46, 0x67, 0x5d, 0x19, 0xfd, 0xe8, 0xca, 0xe8, 0x43, 0x4f, 0xce, + 0x9d, 0xf5, 0xe4, 0xdc, 0xd7, 0x9e, 0x9c, 0x7b, 0xb5, 0x12, 0xd7, 0x63, 0xe6, 0x9e, 0x4a, 0x41, + 0x3b, 0x18, 0xfe, 0x3a, 0x46, 0x17, 0xa7, 0x53, 0x88, 0xb0, 0xfb, 0x7f, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x16, 0x63, 0x32, 0x5e, 0x41, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -861,11 +873,16 @@ func (m *MsgSubmitBudgetProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) if m.Period != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Period)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x38 } if m.Tranches != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Tranches)) i-- + dAtA[i] = 0x30 + } + if m.LastClaimTime != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.LastClaimTime)) + i-- dAtA[i] = 0x28 } if m.StartTime != 0 { @@ -1080,6 +1097,9 @@ func (m *MsgSubmitBudgetProposal) Size() (n int) { if m.StartTime != 0 { n += 1 + sovTx(uint64(m.StartTime)) } + if m.LastClaimTime != 0 { + n += 1 + sovTx(uint64(m.LastClaimTime)) + } if m.Tranches != 0 { n += 1 + sovTx(uint64(m.Tranches)) } @@ -1641,6 +1661,25 @@ func (m *MsgSubmitBudgetProposal) Unmarshal(dAtA []byte) error { } } case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastClaimTime", wireType) + } + m.LastClaimTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastClaimTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) } @@ -1659,7 +1698,7 @@ func (m *MsgSubmitBudgetProposal) Unmarshal(dAtA []byte) error { break } } - case 6: + case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } diff --git a/x/protocolpool/types/types.pb.go b/x/protocolpool/types/types.pb.go index ac499ebf0fb8..c5764dde1925 100644 --- a/x/protocolpool/types/types.pb.go +++ b/x/protocolpool/types/types.pb.go @@ -32,12 +32,16 @@ type Budget struct { TotalBudget *types.Coin `protobuf:"bytes,2,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. StartTime uint64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // last_claim_time is the time when the budget was last successfully claimed or distributed, + // represented in seconds since the Unix epoch. It is used to track the last claim time for fund distribution. + // If set, it cannot be less than start_time. + LastClaimTime uint64 `protobuf:"varint,4,opt,name=last_claim_time,json=lastClaimTime,proto3" json:"last_claim_time,omitempty"` // tranches is the number of times the total budget amount is to be distributed. - Tranches uint64 `protobuf:"varint,4,opt,name=tranches,proto3" json:"tranches,omitempty"` + 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 uint64 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"` + Period uint64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` } func (m *Budget) Reset() { *m = Budget{} } @@ -94,6 +98,13 @@ func (m *Budget) GetStartTime() uint64 { return 0 } +func (m *Budget) GetLastClaimTime() uint64 { + if m != nil { + return m.LastClaimTime + } + return 0 +} + func (m *Budget) GetTranches() uint64 { if m != nil { return m.Tranches @@ -117,26 +128,28 @@ func init() { } var fileDescriptor_c1b7d0ea246d7f44 = []byte{ - // 301 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0x31, 0x4e, 0xc3, 0x30, - 0x18, 0x85, 0x6b, 0x28, 0x15, 0x75, 0x19, 0x20, 0x42, 0x95, 0x5b, 0x09, 0xab, 0x74, 0xea, 0x82, - 0xad, 0xc0, 0x08, 0x0b, 0x45, 0x5c, 0xa0, 0x30, 0xb1, 0x44, 0x4e, 0x62, 0x15, 0x8b, 0x36, 0x7f, - 0x64, 0xff, 0x54, 0x70, 0x0b, 0x0e, 0xc3, 0x21, 0x18, 0x2b, 0x26, 0xc6, 0x2a, 0xb9, 0x08, 0xc2, - 0xb1, 0xaa, 0x32, 0xfe, 0xdf, 0x7b, 0xff, 0xd3, 0xd3, 0xa3, 0xe3, 0x0c, 0xdc, 0x12, 0x9c, 0x2c, - 0x2d, 0x20, 0x64, 0xb0, 0x28, 0x01, 0x16, 0x72, 0x15, 0x4b, 0x7c, 0x2f, 0xb5, 0x13, 0x9e, 0x46, - 0xfd, 0xc6, 0x23, 0x76, 0x3d, 0x62, 0x15, 0x0f, 0x07, 0x0d, 0x4f, 0x3c, 0x97, 0xbb, 0xa6, 0x21, - 0x0f, 0xb1, 0xa9, 0x72, 0x5a, 0xae, 0xe2, 0x54, 0xa3, 0x8a, 0x65, 0x06, 0xa6, 0x68, 0xf4, 0xf1, - 0x86, 0xd0, 0xce, 0xf4, 0x35, 0x9f, 0x6b, 0x8c, 0xee, 0xe9, 0x89, 0xd5, 0x99, 0x29, 0x8d, 0x2e, - 0x30, 0x51, 0x79, 0x6e, 0xb5, 0x73, 0x8c, 0x8c, 0xc8, 0xa4, 0x3b, 0x65, 0xdf, 0x9f, 0x17, 0xa7, - 0x21, 0xf7, 0xb6, 0x51, 0x1e, 0xd0, 0x9a, 0x62, 0x3e, 0x3b, 0xde, 0xbe, 0x04, 0x1e, 0xdd, 0xd0, - 0x23, 0x04, 0x54, 0x8b, 0x24, 0xf5, 0xb1, 0x6c, 0x6f, 0x44, 0x26, 0xbd, 0xcb, 0x81, 0x08, 0xef, - 0x7f, 0x45, 0x44, 0x28, 0x22, 0xee, 0xc0, 0x14, 0xb3, 0x9e, 0xb7, 0x87, 0x12, 0x67, 0x94, 0x3a, - 0x54, 0x16, 0x13, 0x34, 0x4b, 0xcd, 0xf6, 0x47, 0x64, 0xd2, 0x9e, 0x75, 0x3d, 0x79, 0x34, 0x4b, - 0x1d, 0x0d, 0xe9, 0x21, 0x5a, 0x55, 0x64, 0xcf, 0xda, 0xb1, 0xb6, 0x17, 0xb7, 0x77, 0xd4, 0xa7, - 0x9d, 0x52, 0x5b, 0x03, 0x39, 0x3b, 0xf0, 0x4a, 0xb8, 0xa6, 0xd7, 0x5f, 0x15, 0x27, 0xeb, 0x8a, - 0x93, 0x4d, 0xc5, 0xc9, 0x47, 0xcd, 0x5b, 0xeb, 0x9a, 0xb7, 0x7e, 0x6a, 0xde, 0x7a, 0x3a, 0x6f, - 0x3a, 0xb9, 0xfc, 0x45, 0x18, 0x90, 0x6f, 0xff, 0xb7, 0xf7, 0xc3, 0xa7, 0x1d, 0xcf, 0xae, 0x7e, - 0x03, 0x00, 0x00, 0xff, 0xff, 0x61, 0x20, 0x50, 0xce, 0x9f, 0x01, 0x00, 0x00, + // 323 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0x41, 0x4a, 0x03, 0x31, + 0x14, 0x86, 0x9b, 0x5a, 0x07, 0x9b, 0x2a, 0xea, 0x20, 0x65, 0x5a, 0x30, 0xd4, 0x2e, 0xa4, 0x1b, + 0x13, 0x46, 0x97, 0xba, 0xb1, 0xc5, 0x0b, 0x54, 0x57, 0x6e, 0x86, 0xcc, 0x4c, 0xa8, 0xc1, 0x99, + 0xc9, 0x90, 0x3c, 0x8b, 0xde, 0xc0, 0xa5, 0x87, 0xf1, 0x10, 0x2e, 0x8b, 0x2b, 0x97, 0xd2, 0x5e, + 0x44, 0x9a, 0x84, 0x52, 0x97, 0xef, 0x7b, 0xdf, 0xfb, 0xf9, 0xe1, 0xe1, 0x61, 0xa6, 0x4c, 0xa9, + 0x0c, 0xab, 0xb5, 0x02, 0x95, 0xa9, 0xa2, 0x56, 0xaa, 0x60, 0xf3, 0x98, 0xc1, 0x5b, 0x2d, 0x0c, + 0xb5, 0x34, 0xec, 0x3a, 0x87, 0x6e, 0x3b, 0x74, 0x1e, 0xf7, 0x7b, 0x8e, 0x27, 0x96, 0xb3, 0x6d, + 0xa9, 0x4f, 0x7c, 0x6c, 0xca, 0x8d, 0x60, 0xf3, 0x38, 0x15, 0xc0, 0x63, 0x96, 0x29, 0x59, 0xb9, + 0xfd, 0xf0, 0xbd, 0x89, 0x83, 0xf1, 0x4b, 0x3e, 0x13, 0x10, 0xde, 0xe1, 0x63, 0x2d, 0x32, 0x59, + 0x4b, 0x51, 0x41, 0xc2, 0xf3, 0x5c, 0x0b, 0x63, 0x22, 0x34, 0x40, 0xa3, 0xf6, 0x38, 0xfa, 0xfe, + 0xbc, 0x38, 0xf1, 0xb9, 0xb7, 0x6e, 0x73, 0x0f, 0x5a, 0x56, 0xb3, 0xe9, 0xd1, 0xe6, 0xc4, 0xf3, + 0xf0, 0x06, 0xef, 0x83, 0x02, 0x5e, 0x24, 0xa9, 0x8d, 0x8d, 0x9a, 0x03, 0x34, 0xea, 0x5c, 0xf6, + 0xa8, 0x3f, 0x5f, 0x17, 0xa1, 0xbe, 0x08, 0x9d, 0x28, 0x59, 0x4d, 0x3b, 0x56, 0xf7, 0x25, 0x4e, + 0x31, 0x36, 0xc0, 0x35, 0x24, 0x20, 0x4b, 0x11, 0xed, 0x0c, 0xd0, 0xa8, 0x35, 0x6d, 0x5b, 0xf2, + 0x20, 0x4b, 0x11, 0x9e, 0xe3, 0xc3, 0x82, 0x1b, 0x48, 0xb2, 0x82, 0xcb, 0xd2, 0x39, 0x2d, 0xeb, + 0x1c, 0xac, 0xf1, 0x64, 0x4d, 0xad, 0xd7, 0xc7, 0x7b, 0xa0, 0x79, 0x95, 0x3d, 0x09, 0x13, 0xed, + 0x5a, 0x61, 0x33, 0x87, 0x5d, 0x1c, 0xd4, 0x42, 0x4b, 0x95, 0x47, 0x81, 0xdd, 0xf8, 0x69, 0x7c, + 0xfd, 0xb5, 0x24, 0x68, 0xb1, 0x24, 0xe8, 0x77, 0x49, 0xd0, 0xc7, 0x8a, 0x34, 0x16, 0x2b, 0xd2, + 0xf8, 0x59, 0x91, 0xc6, 0xe3, 0x99, 0xeb, 0x6e, 0xf2, 0x67, 0x2a, 0x15, 0x7b, 0xfd, 0xff, 0x23, + 0xfb, 0xa0, 0x34, 0xb0, 0xec, 0xea, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x8a, 0x39, 0x05, 0x4c, 0xc7, + 0x01, 0x00, 0x00, } func (m *Budget) Marshal() (dAtA []byte, err error) { @@ -162,11 +175,16 @@ func (m *Budget) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.Period != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Period)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x30 } if m.Tranches != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Tranches)) i-- + dAtA[i] = 0x28 + } + if m.LastClaimTime != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.LastClaimTime)) + i-- dAtA[i] = 0x20 } if m.StartTime != 0 { @@ -224,6 +242,9 @@ func (m *Budget) Size() (n int) { if m.StartTime != 0 { n += 1 + sovTypes(uint64(m.StartTime)) } + if m.LastClaimTime != 0 { + n += 1 + sovTypes(uint64(m.LastClaimTime)) + } if m.Tranches != 0 { n += 1 + sovTypes(uint64(m.Tranches)) } @@ -356,6 +377,25 @@ func (m *Budget) Unmarshal(dAtA []byte) error { } } case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastClaimTime", wireType) + } + m.LastClaimTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastClaimTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) } @@ -374,7 +414,7 @@ func (m *Budget) Unmarshal(dAtA []byte) error { break } } - case 5: + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } From c3702d0167194988484e7895c9eb66d2acdb5295 Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Wed, 1 Nov 2023 09:48:57 +0000 Subject: [PATCH 54/69] wip: update keeper logic --- proto/cosmos/protocolpool/v1/tx.proto | 8 ++------ x/protocolpool/keeper/keeper.go | 13 +++++++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index 437404fea57f..8a39eab8778d 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -74,16 +74,12 @@ message MsgSubmitBudgetProposal { // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. // If start_time is less than the current block time, proposal will not be accepted. uint64 start_time = 4; - // last_claim_time is the time when the budget was last successfully claimed or distributed, - // represented in seconds since the Unix epoch. It is used to track the last claim time for fund distribution. - // If set, it cannot be less than start_time. - uint64 last_claim_time = 5; // tranches is the number of times the total budget amount is to be distributed. - uint64 tranches = 6; + uint64 tranches = 5; // 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). - uint64 period = 7; + uint64 period = 6; } // MsgSubmitBudgetProposalResponse defines the response to executing a diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index b6073224787f..37f560f35c99 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -134,8 +134,13 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) return sdk.Coin{}, fmt.Errorf("distribution has not started yet") } - // Calculate the time elapsed since the start time - timeElapsed := uint64(currentTime) - startTime + if budget.LastClaimTime == 0 { + budget.LastClaimTime = budget.StartTime + } + + // Calculate the time elapsed since the last claim time + timeElapsed := uint64(currentTime) - budget.LastClaimTime + // Check the time elapsed has passed period length if timeElapsed >= budget.Period { // Calculate how many periods have passed @@ -152,8 +157,8 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) // update the TotalBudget amount budget.TotalBudget.Amount = budget.TotalBudget.Amount.Sub(coinsToDistribute) - // Update the start time for the budget - budget.StartTime += budget.Period + // Update the last claim time for the budget + budget.LastClaimTime += budget.Period k.Logger(ctx).Debug(fmt.Sprintf("Processing budget for recipient: %s. Amount: %s", budget.RecipientAddress, coinsToDistribute.String())) From c6daf9e330d1adb149890b0a4b0d62cc0588a1ac Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Wed, 1 Nov 2023 11:26:48 +0000 Subject: [PATCH 55/69] update proto files --- api/cosmos/protocolpool/v1/tx.pulsar.go | 199 ++++++------------ api/cosmos/protocolpool/v1/types.pulsar.go | 232 +++++++++++++++++---- proto/cosmos/protocolpool/v1/types.proto | 12 +- x/protocolpool/types/tx.pb.go | 133 +++++------- x/protocolpool/types/types.pb.go | 166 ++++++++++++--- 5 files changed, 449 insertions(+), 293 deletions(-) diff --git a/api/cosmos/protocolpool/v1/tx.pulsar.go b/api/cosmos/protocolpool/v1/tx.pulsar.go index fb8f36f9186a..ec1b58778f1f 100644 --- a/api/cosmos/protocolpool/v1/tx.pulsar.go +++ b/api/cosmos/protocolpool/v1/tx.pulsar.go @@ -1914,7 +1914,6 @@ var ( fd_MsgSubmitBudgetProposal_recipient_address protoreflect.FieldDescriptor fd_MsgSubmitBudgetProposal_total_budget protoreflect.FieldDescriptor fd_MsgSubmitBudgetProposal_start_time protoreflect.FieldDescriptor - fd_MsgSubmitBudgetProposal_last_claim_time protoreflect.FieldDescriptor fd_MsgSubmitBudgetProposal_tranches protoreflect.FieldDescriptor fd_MsgSubmitBudgetProposal_period protoreflect.FieldDescriptor ) @@ -1926,7 +1925,6 @@ func init() { fd_MsgSubmitBudgetProposal_recipient_address = md_MsgSubmitBudgetProposal.Fields().ByName("recipient_address") fd_MsgSubmitBudgetProposal_total_budget = md_MsgSubmitBudgetProposal.Fields().ByName("total_budget") fd_MsgSubmitBudgetProposal_start_time = md_MsgSubmitBudgetProposal.Fields().ByName("start_time") - fd_MsgSubmitBudgetProposal_last_claim_time = md_MsgSubmitBudgetProposal.Fields().ByName("last_claim_time") fd_MsgSubmitBudgetProposal_tranches = md_MsgSubmitBudgetProposal.Fields().ByName("tranches") fd_MsgSubmitBudgetProposal_period = md_MsgSubmitBudgetProposal.Fields().ByName("period") } @@ -2020,12 +2018,6 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Range(f func(protoreflect.Field return } } - if x.LastClaimTime != uint64(0) { - value := protoreflect.ValueOfUint64(x.LastClaimTime) - if !f(fd_MsgSubmitBudgetProposal_last_claim_time, value) { - return - } - } if x.Tranches != uint64(0) { value := protoreflect.ValueOfUint64(x.Tranches) if !f(fd_MsgSubmitBudgetProposal_tranches, value) { @@ -2061,8 +2053,6 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Has(fd protoreflect.FieldDescri return x.TotalBudget != nil case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": return x.StartTime != uint64(0) - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.last_claim_time": - return x.LastClaimTime != uint64(0) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": return x.Tranches != uint64(0) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": @@ -2091,8 +2081,6 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Clear(fd protoreflect.FieldDesc x.TotalBudget = nil case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": x.StartTime = uint64(0) - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.last_claim_time": - x.LastClaimTime = uint64(0) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": x.Tranches = uint64(0) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": @@ -2125,9 +2113,6 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Get(descriptor protoreflect.Fie case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": value := x.StartTime return protoreflect.ValueOfUint64(value) - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.last_claim_time": - value := x.LastClaimTime - return protoreflect.ValueOfUint64(value) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": value := x.Tranches return protoreflect.ValueOfUint64(value) @@ -2162,8 +2147,6 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Set(fd protoreflect.FieldDescri x.TotalBudget = value.Message().Interface().(*v1beta1.Coin) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": x.StartTime = value.Uint() - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.last_claim_time": - x.LastClaimTime = value.Uint() case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": x.Tranches = value.Uint() case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": @@ -2199,8 +2182,6 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Mutable(fd protoreflect.FieldDe panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.MsgSubmitBudgetProposal is not mutable")) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": panic(fmt.Errorf("field start_time of message cosmos.protocolpool.v1.MsgSubmitBudgetProposal is not mutable")) - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.last_claim_time": - panic(fmt.Errorf("field last_claim_time 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")) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": @@ -2227,8 +2208,6 @@ func (x *fastReflection_MsgSubmitBudgetProposal) NewField(fd protoreflect.FieldD return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.last_claim_time": - return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": @@ -2317,9 +2296,6 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth if x.StartTime != 0 { n += 1 + runtime.Sov(uint64(x.StartTime)) } - if x.LastClaimTime != 0 { - n += 1 + runtime.Sov(uint64(x.LastClaimTime)) - } if x.Tranches != 0 { n += 1 + runtime.Sov(uint64(x.Tranches)) } @@ -2358,16 +2334,11 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth if x.Period != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) i-- - dAtA[i] = 0x38 + dAtA[i] = 0x30 } if x.Tranches != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Tranches)) i-- - dAtA[i] = 0x30 - } - if x.LastClaimTime != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.LastClaimTime)) - i-- dAtA[i] = 0x28 } if x.StartTime != 0 { @@ -2572,25 +2543,6 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth } } case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastClaimTime", wireType) - } - x.LastClaimTime = 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.LastClaimTime |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) } @@ -2609,7 +2561,7 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth break } } - case 7: + case 6: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } @@ -4057,16 +4009,12 @@ type MsgSubmitBudgetProposal struct { // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. // If start_time is less than the current block time, proposal will not be accepted. StartTime uint64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - // last_claim_time is the time when the budget was last successfully claimed or distributed, - // represented in seconds since the Unix epoch. It is used to track the last claim time for fund distribution. - // If set, it cannot be less than start_time. - LastClaimTime uint64 `protobuf:"varint,5,opt,name=last_claim_time,json=lastClaimTime,proto3" json:"last_claim_time,omitempty"` // tranches is the number of times the total budget amount is to be distributed. - Tranches uint64 `protobuf:"varint,6,opt,name=tranches,proto3" json:"tranches,omitempty"` + 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 uint64 `protobuf:"varint,7,opt,name=period,proto3" json:"period,omitempty"` + Period uint64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` } func (x *MsgSubmitBudgetProposal) Reset() { @@ -4117,13 +4065,6 @@ func (x *MsgSubmitBudgetProposal) GetStartTime() uint64 { return 0 } -func (x *MsgSubmitBudgetProposal) GetLastClaimTime() uint64 { - if x != nil { - return x.LastClaimTime - } - return 0 -} - func (x *MsgSubmitBudgetProposal) GetTranches() uint64 { if x != nil { return x.Tranches @@ -4283,7 +4224,7 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 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, 0xe1, 0x02, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x53, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb9, 0x02, 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, @@ -4299,75 +4240,73 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x69, 0x6e, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6c, - 0x61, 0x69, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, - 0x68, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, - 0x68, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x04, 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, 0x32, 0xeb, - 0x03, 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, + 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, 0x16, 0x0a, 0x06, 0x70, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 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, 0x32, 0xeb, 0x03, 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, 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, + 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, 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, 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, + 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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 ( diff --git a/api/cosmos/protocolpool/v1/types.pulsar.go b/api/cosmos/protocolpool/v1/types.pulsar.go index 560318843963..fb08acdad709 100644 --- a/api/cosmos/protocolpool/v1/types.pulsar.go +++ b/api/cosmos/protocolpool/v1/types.pulsar.go @@ -18,9 +18,11 @@ var ( md_Budget protoreflect.MessageDescriptor fd_Budget_recipient_address protoreflect.FieldDescriptor fd_Budget_total_budget protoreflect.FieldDescriptor + fd_Budget_claimed_amount protoreflect.FieldDescriptor fd_Budget_start_time protoreflect.FieldDescriptor fd_Budget_last_claim_time protoreflect.FieldDescriptor fd_Budget_tranches protoreflect.FieldDescriptor + fd_Budget_tranches_left protoreflect.FieldDescriptor fd_Budget_period protoreflect.FieldDescriptor ) @@ -29,9 +31,11 @@ func init() { md_Budget = File_cosmos_protocolpool_v1_types_proto.Messages().ByName("Budget") fd_Budget_recipient_address = md_Budget.Fields().ByName("recipient_address") fd_Budget_total_budget = md_Budget.Fields().ByName("total_budget") + fd_Budget_claimed_amount = md_Budget.Fields().ByName("claimed_amount") fd_Budget_start_time = md_Budget.Fields().ByName("start_time") fd_Budget_last_claim_time = md_Budget.Fields().ByName("last_claim_time") fd_Budget_tranches = md_Budget.Fields().ByName("tranches") + fd_Budget_tranches_left = md_Budget.Fields().ByName("tranches_left") fd_Budget_period = md_Budget.Fields().ByName("period") } @@ -112,6 +116,12 @@ func (x *fastReflection_Budget) Range(f func(protoreflect.FieldDescriptor, proto return } } + if x.ClaimedAmount != nil { + value := protoreflect.ValueOfMessage(x.ClaimedAmount.ProtoReflect()) + if !f(fd_Budget_claimed_amount, value) { + return + } + } if x.StartTime != uint64(0) { value := protoreflect.ValueOfUint64(x.StartTime) if !f(fd_Budget_start_time, value) { @@ -130,6 +140,12 @@ func (x *fastReflection_Budget) Range(f func(protoreflect.FieldDescriptor, proto return } } + if x.TranchesLeft != uint64(0) { + value := protoreflect.ValueOfUint64(x.TranchesLeft) + if !f(fd_Budget_tranches_left, value) { + return + } + } if x.Period != uint64(0) { value := protoreflect.ValueOfUint64(x.Period) if !f(fd_Budget_period, value) { @@ -155,12 +171,16 @@ func (x *fastReflection_Budget) Has(fd protoreflect.FieldDescriptor) bool { return x.RecipientAddress != "" case "cosmos.protocolpool.v1.Budget.total_budget": return x.TotalBudget != nil + case "cosmos.protocolpool.v1.Budget.claimed_amount": + return x.ClaimedAmount != nil case "cosmos.protocolpool.v1.Budget.start_time": return x.StartTime != uint64(0) case "cosmos.protocolpool.v1.Budget.last_claim_time": return x.LastClaimTime != uint64(0) case "cosmos.protocolpool.v1.Budget.tranches": return x.Tranches != uint64(0) + case "cosmos.protocolpool.v1.Budget.tranches_left": + return x.TranchesLeft != uint64(0) case "cosmos.protocolpool.v1.Budget.period": return x.Period != uint64(0) default: @@ -183,12 +203,16 @@ func (x *fastReflection_Budget) Clear(fd protoreflect.FieldDescriptor) { x.RecipientAddress = "" case "cosmos.protocolpool.v1.Budget.total_budget": x.TotalBudget = nil + case "cosmos.protocolpool.v1.Budget.claimed_amount": + x.ClaimedAmount = nil case "cosmos.protocolpool.v1.Budget.start_time": x.StartTime = uint64(0) case "cosmos.protocolpool.v1.Budget.last_claim_time": x.LastClaimTime = uint64(0) case "cosmos.protocolpool.v1.Budget.tranches": x.Tranches = uint64(0) + case "cosmos.protocolpool.v1.Budget.tranches_left": + x.TranchesLeft = uint64(0) case "cosmos.protocolpool.v1.Budget.period": x.Period = uint64(0) default: @@ -213,6 +237,9 @@ func (x *fastReflection_Budget) Get(descriptor protoreflect.FieldDescriptor) pro case "cosmos.protocolpool.v1.Budget.total_budget": value := x.TotalBudget return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.Budget.claimed_amount": + value := x.ClaimedAmount + return protoreflect.ValueOfMessage(value.ProtoReflect()) case "cosmos.protocolpool.v1.Budget.start_time": value := x.StartTime return protoreflect.ValueOfUint64(value) @@ -222,6 +249,9 @@ func (x *fastReflection_Budget) Get(descriptor protoreflect.FieldDescriptor) pro case "cosmos.protocolpool.v1.Budget.tranches": value := x.Tranches return protoreflect.ValueOfUint64(value) + case "cosmos.protocolpool.v1.Budget.tranches_left": + value := x.TranchesLeft + return protoreflect.ValueOfUint64(value) case "cosmos.protocolpool.v1.Budget.period": value := x.Period return protoreflect.ValueOfUint64(value) @@ -249,12 +279,16 @@ func (x *fastReflection_Budget) Set(fd protoreflect.FieldDescriptor, value proto x.RecipientAddress = value.Interface().(string) case "cosmos.protocolpool.v1.Budget.total_budget": x.TotalBudget = value.Message().Interface().(*v1beta1.Coin) + case "cosmos.protocolpool.v1.Budget.claimed_amount": + x.ClaimedAmount = value.Message().Interface().(*v1beta1.Coin) case "cosmos.protocolpool.v1.Budget.start_time": x.StartTime = value.Uint() case "cosmos.protocolpool.v1.Budget.last_claim_time": x.LastClaimTime = value.Uint() case "cosmos.protocolpool.v1.Budget.tranches": x.Tranches = value.Uint() + case "cosmos.protocolpool.v1.Budget.tranches_left": + x.TranchesLeft = value.Uint() case "cosmos.protocolpool.v1.Budget.period": x.Period = value.Uint() default: @@ -282,6 +316,11 @@ func (x *fastReflection_Budget) Mutable(fd protoreflect.FieldDescriptor) protore x.TotalBudget = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.TotalBudget.ProtoReflect()) + 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.recipient_address": panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.Budget is not mutable")) case "cosmos.protocolpool.v1.Budget.start_time": @@ -290,6 +329,8 @@ func (x *fastReflection_Budget) Mutable(fd protoreflect.FieldDescriptor) protore panic(fmt.Errorf("field last_claim_time of message cosmos.protocolpool.v1.Budget is not mutable")) case "cosmos.protocolpool.v1.Budget.tranches": panic(fmt.Errorf("field tranches 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")) case "cosmos.protocolpool.v1.Budget.period": panic(fmt.Errorf("field period of message cosmos.protocolpool.v1.Budget is not mutable")) default: @@ -310,12 +351,17 @@ func (x *fastReflection_Budget) NewField(fd protoreflect.FieldDescriptor) protor case "cosmos.protocolpool.v1.Budget.total_budget": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.Budget.claimed_amount": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.protocolpool.v1.Budget.start_time": return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.Budget.last_claim_time": return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.Budget.tranches": return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.protocolpool.v1.Budget.tranches_left": + return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.Budget.period": return protoreflect.ValueOfUint64(uint64(0)) default: @@ -395,6 +441,10 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { l = options.Size(x.TotalBudget) 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.StartTime != 0 { n += 1 + runtime.Sov(uint64(x.StartTime)) } @@ -404,6 +454,9 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { if x.Tranches != 0 { n += 1 + runtime.Sov(uint64(x.Tranches)) } + if x.TranchesLeft != 0 { + n += 1 + runtime.Sov(uint64(x.TranchesLeft)) + } if x.Period != 0 { n += 1 + runtime.Sov(uint64(x.Period)) } @@ -439,22 +492,41 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { if x.Period != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x40 + } + if x.TranchesLeft != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TranchesLeft)) + i-- + dAtA[i] = 0x38 } if x.Tranches != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Tranches)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x30 } if x.LastClaimTime != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.LastClaimTime)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x28 } if x.StartTime != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.StartTime)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x20 + } + 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] = 0x1a } if x.TotalBudget != nil { encoded, err := options.Marshal(x.TotalBudget) @@ -595,6 +667,42 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { } iNdEx = postIndex case 3: + 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 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) } @@ -613,7 +721,7 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { break } } - case 4: + case 5: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastClaimTime", wireType) } @@ -632,7 +740,7 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { break } } - case 5: + case 6: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) } @@ -651,7 +759,26 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { break } } - case 6: + case 7: + 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 8: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } @@ -728,18 +855,22 @@ type Budget struct { RecipientAddress string `protobuf:"bytes,1,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` // total_budget is the total amount allocated for the budget. TotalBudget *v1beta1.Coin `protobuf:"bytes,2,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` + // claimed_amount is the total amount claimed from the total budget amount requested. + ClaimedAmount *v1beta1.Coin `protobuf:"bytes,3,opt,name=claimed_amount,json=claimedAmount,proto3" json:"claimed_amount,omitempty"` // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. - StartTime uint64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + StartTime uint64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // last_claim_time is the time when the budget was last successfully claimed or distributed, // represented in seconds since the Unix epoch. It is used to track the last claim time for fund distribution. // If set, it cannot be less than start_time. - LastClaimTime uint64 `protobuf:"varint,4,opt,name=last_claim_time,json=lastClaimTime,proto3" json:"last_claim_time,omitempty"` + LastClaimTime uint64 `protobuf:"varint,5,opt,name=last_claim_time,json=lastClaimTime,proto3" json:"last_claim_time,omitempty"` // tranches is the number of times the total budget amount is to be distributed. - Tranches uint64 `protobuf:"varint,5,opt,name=tranches,proto3" json:"tranches,omitempty"` + Tranches uint64 `protobuf:"varint,6,opt,name=tranches,proto3" json:"tranches,omitempty"` + // tranches_left is the number of tranches left for the amount to be distributed. + TranchesLeft uint64 `protobuf:"varint,7,opt,name=tranches_left,json=tranchesLeft,proto3" json:"tranches_left,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 uint64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` + Period uint64 `protobuf:"varint,8,opt,name=period,proto3" json:"period,omitempty"` } func (x *Budget) Reset() { @@ -776,6 +907,13 @@ func (x *Budget) GetTotalBudget() *v1beta1.Coin { return nil } +func (x *Budget) GetClaimedAmount() *v1beta1.Coin { + if x != nil { + return x.ClaimedAmount + } + return nil +} + func (x *Budget) GetStartTime() uint64 { if x != nil { return x.StartTime @@ -797,6 +935,13 @@ func (x *Budget) GetTranches() uint64 { return 0 } +func (x *Budget) GetTranchesLeft() uint64 { + if x != nil { + return x.TranchesLeft + } + return 0 +} + func (x *Budget) GetPeriod() uint64 { if x != nil { return x.Period @@ -814,7 +959,7 @@ var file_cosmos_protocolpool_v1_types_proto_rawDesc = []byte{ 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, 0x22, 0x88, 0x02, 0x0a, 0x06, 0x42, 0x75, 0x64, 0x67, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xef, 0x02, 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, @@ -823,29 +968,35 @@ var file_cosmos_protocolpool_v1_types_proto_rawDesc = []byte{ 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 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, 0x0b, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, - 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 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, 0x16, 0x0a, 0x06, 0x70, 0x65, - 0x72, 0x69, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, - 0x6f, 0x64, 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, + 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x40, 0x0a, 0x0e, 0x63, 0x6c, 0x61, 0x69, 0x6d, + 0x65, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 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, 0x0d, 0x63, 0x6c, 0x61, 0x69, + 0x6d, 0x65, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, + 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x65, 0x66, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 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 ( @@ -867,11 +1018,12 @@ var file_cosmos_protocolpool_v1_types_proto_goTypes = []interface{}{ } var file_cosmos_protocolpool_v1_types_proto_depIdxs = []int32{ 1, // 0: cosmos.protocolpool.v1.Budget.total_budget:type_name -> cosmos.base.v1beta1.Coin - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 1, // 1: cosmos.protocolpool.v1.Budget.claimed_amount:type_name -> cosmos.base.v1beta1.Coin + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_cosmos_protocolpool_v1_types_proto_init() } diff --git a/proto/cosmos/protocolpool/v1/types.proto b/proto/cosmos/protocolpool/v1/types.proto index a41ed309fcc0..c0d1bbb59f87 100644 --- a/proto/cosmos/protocolpool/v1/types.proto +++ b/proto/cosmos/protocolpool/v1/types.proto @@ -12,16 +12,20 @@ message Budget { string recipient_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // total_budget is the total amount allocated for the budget. cosmos.base.v1beta1.Coin total_budget = 2; + // claimed_amount is the total amount claimed from the total budget amount requested. + cosmos.base.v1beta1.Coin claimed_amount = 3; // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. - uint64 start_time = 3; + uint64 start_time = 4; // last_claim_time is the time when the budget was last successfully claimed or distributed, // represented in seconds since the Unix epoch. It is used to track the last claim time for fund distribution. // If set, it cannot be less than start_time. - uint64 last_claim_time = 4; + uint64 last_claim_time = 5; // tranches is the number of times the total budget amount is to be distributed. - uint64 tranches = 5; + uint64 tranches = 6; + // tranches_left is the number of tranches left for the amount to be distributed. + uint64 tranches_left = 7; // 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). - uint64 period = 6; + uint64 period = 8; } \ No newline at end of file diff --git a/x/protocolpool/types/tx.pb.go b/x/protocolpool/types/tx.pb.go index daff420ee1ee..2ba0fcd7409d 100644 --- a/x/protocolpool/types/tx.pb.go +++ b/x/protocolpool/types/tx.pb.go @@ -222,16 +222,12 @@ type MsgSubmitBudgetProposal struct { // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. // If start_time is less than the current block time, proposal will not be accepted. StartTime uint64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - // last_claim_time is the time when the budget was last successfully claimed or distributed, - // represented in seconds since the Unix epoch. It is used to track the last claim time for fund distribution. - // If set, it cannot be less than start_time. - LastClaimTime uint64 `protobuf:"varint,5,opt,name=last_claim_time,json=lastClaimTime,proto3" json:"last_claim_time,omitempty"` // tranches is the number of times the total budget amount is to be distributed. - Tranches uint64 `protobuf:"varint,6,opt,name=tranches,proto3" json:"tranches,omitempty"` + 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 uint64 `protobuf:"varint,7,opt,name=period,proto3" json:"period,omitempty"` + Period uint64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` } func (m *MsgSubmitBudgetProposal) Reset() { *m = MsgSubmitBudgetProposal{} } @@ -295,13 +291,6 @@ func (m *MsgSubmitBudgetProposal) GetStartTime() uint64 { return 0 } -func (m *MsgSubmitBudgetProposal) GetLastClaimTime() uint64 { - if m != nil { - return m.LastClaimTime - } - return 0 -} - func (m *MsgSubmitBudgetProposal) GetTranches() uint64 { if m != nil { return m.Tranches @@ -459,50 +448,49 @@ func init() { func init() { proto.RegisterFile("cosmos/protocolpool/v1/tx.proto", fileDescriptor_09efe14517e7f6dc) } var fileDescriptor_09efe14517e7f6dc = []byte{ - // 681 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x3d, 0x6f, 0xd3, 0x50, - 0x14, 0xcd, 0x6b, 0xda, 0x40, 0x5e, 0xa1, 0x50, 0x2b, 0xa4, 0xae, 0xd5, 0xda, 0x69, 0x86, 0x2a, - 0xaa, 0xa8, 0x4d, 0xca, 0x97, 0x54, 0x58, 0x48, 0x05, 0x5b, 0xa4, 0x2a, 0x65, 0x62, 0x89, 0x1c, - 0xfb, 0xc9, 0x7d, 0xaa, 0xed, 0x6b, 0xf9, 0x3d, 0x97, 0x16, 0x09, 0xa9, 0x62, 0x62, 0xe4, 0x27, - 0x74, 0x66, 0xea, 0xc0, 0x8f, 0xa8, 0xc4, 0x52, 0x31, 0x31, 0xf1, 0x91, 0x0c, 0x45, 0xe2, 0x4f, - 0x20, 0x7f, 0xd4, 0x49, 0x14, 0x93, 0x12, 0xa4, 0x4e, 0x89, 0xcf, 0x3d, 0xf7, 0xde, 0x73, 0xcf, - 0x7b, 0xd7, 0xc6, 0x8a, 0x01, 0xcc, 0x01, 0xa6, 0x79, 0x3e, 0x70, 0x30, 0xc0, 0xf6, 0x00, 0x6c, - 0x6d, 0xbf, 0xae, 0xf1, 0x03, 0x35, 0x82, 0x84, 0x72, 0x4c, 0x50, 0x07, 0x09, 0xea, 0x7e, 0x5d, - 0x2a, 0x59, 0x60, 0x41, 0x04, 0x6a, 0xe1, 0xbf, 0x38, 0x2e, 0xc9, 0x49, 0xb9, 0x8e, 0xce, 0x88, - 0xb6, 0x5f, 0xef, 0x10, 0xae, 0xd7, 0x35, 0x03, 0xa8, 0x9b, 0xc4, 0x17, 0xe3, 0x78, 0x3b, 0x4e, - 0x1c, 0x2c, 0x2d, 0x2d, 0x24, 0xa9, 0x0e, 0xb3, 0x42, 0x01, 0x0e, 0xb3, 0xe2, 0x40, 0xf5, 0x33, - 0xc2, 0xa5, 0x26, 0xb3, 0x5e, 0x04, 0xae, 0xb9, 0x05, 0x8e, 0x13, 0xb8, 0x94, 0x1f, 0x6e, 0x03, - 0xd8, 0x82, 0x81, 0x0b, 0xba, 0x03, 0x81, 0xcb, 0x45, 0x54, 0xc9, 0xd7, 0x66, 0x37, 0x16, 0xd5, - 0xa4, 0x60, 0xd8, 0x5d, 0x4d, 0xba, 0xab, 0x5b, 0x40, 0xdd, 0xc6, 0xbd, 0xd3, 0x6f, 0x4a, 0xee, - 0xe3, 0x77, 0xa5, 0x66, 0x51, 0xbe, 0x1b, 0x74, 0x54, 0x03, 0x9c, 0xa4, 0x7b, 0xf2, 0xb3, 0xce, - 0xcc, 0x3d, 0x8d, 0x1f, 0x7a, 0x84, 0x45, 0x09, 0xac, 0x95, 0x94, 0x16, 0x1e, 0xe1, 0xa2, 0x49, - 0x3c, 0x60, 0x94, 0x83, 0x2f, 0x4e, 0x55, 0x50, 0xad, 0xd8, 0x10, 0xbf, 0x7c, 0x5a, 0x2f, 0x25, - 0xad, 0x9e, 0x99, 0xa6, 0x4f, 0x18, 0xdb, 0xe1, 0x3e, 0x75, 0xad, 0x56, 0x9f, 0xba, 0x59, 0x7e, - 0x7f, 0xac, 0xe4, 0x7e, 0x1d, 0x2b, 0xb9, 0x77, 0xe7, 0x27, 0x6b, 0x7d, 0xbc, 0x2a, 0xe3, 0xa5, - 0xac, 0x61, 0x5a, 0x84, 0x79, 0xe0, 0x32, 0x52, 0xed, 0x22, 0x7c, 0xa7, 0xc9, 0xac, 0xa1, 0xe0, - 0x8e, 0x47, 0x5c, 0x33, 0x54, 0xa2, 0x07, 0x7c, 0x17, 0x7c, 0xca, 0x0f, 0x45, 0x74, 0x99, 0x92, - 0x94, 0x2a, 0x2c, 0xe1, 0xa2, 0x4f, 0x0c, 0xea, 0x51, 0xe2, 0xf2, 0x78, 0x82, 0x56, 0x1f, 0x18, - 0x30, 0x31, 0x7f, 0x65, 0x26, 0x6e, 0xce, 0x45, 0x26, 0xa4, 0x92, 0xaa, 0x0a, 0x5e, 0xce, 0x9c, - 0x31, 0x75, 0xe1, 0xe7, 0x14, 0x5e, 0x68, 0x32, 0x6b, 0x27, 0xe8, 0x38, 0x94, 0x37, 0x02, 0xd3, - 0x22, 0x7c, 0xdb, 0x07, 0x0f, 0x98, 0x6e, 0xff, 0xb7, 0x0f, 0xcf, 0xf1, 0x7c, 0x3a, 0x76, 0x5b, - 0x8f, 0x59, 0x97, 0x9e, 0xe8, 0xed, 0x34, 0x25, 0xc1, 0x85, 0xa7, 0xf8, 0x06, 0x07, 0xae, 0xdb, - 0xed, 0x4e, 0x24, 0x4b, 0xcc, 0x57, 0xd0, 0x58, 0xdb, 0x5a, 0xb3, 0x11, 0x3d, 0x1e, 0x42, 0x58, - 0xc6, 0x98, 0x71, 0xdd, 0xe7, 0x6d, 0x4e, 0x1d, 0x22, 0x4e, 0x57, 0x50, 0x6d, 0xba, 0x55, 0x8c, - 0x90, 0x97, 0xd4, 0x21, 0xc2, 0x2a, 0xbe, 0x65, 0xeb, 0x8c, 0xb7, 0x0d, 0x5b, 0xa7, 0x4e, 0xcc, - 0x99, 0x89, 0x38, 0x37, 0x43, 0x78, 0x2b, 0x44, 0x23, 0x9e, 0x84, 0xaf, 0x73, 0x5f, 0x77, 0x8d, - 0x5d, 0xc2, 0xc4, 0x42, 0x44, 0x48, 0x9f, 0x85, 0x32, 0x2e, 0x78, 0xc4, 0xa7, 0x60, 0x8a, 0xd7, - 0xa2, 0x48, 0xf2, 0x34, 0x72, 0x08, 0x2b, 0x58, 0xf9, 0x8b, 0xc5, 0xe9, 0x31, 0x00, 0x9e, 0x0b, - 0xcf, 0x29, 0x6c, 0x9b, 0xe8, 0xcf, 0x34, 0x11, 0x4d, 0x6a, 0xe2, 0x66, 0x39, 0xd4, 0x32, 0x5a, - 0xa9, 0xfa, 0x16, 0x97, 0x87, 0x1b, 0x5e, 0x48, 0x19, 0x5a, 0x76, 0x74, 0x45, 0xf7, 0x74, 0xe3, - 0x77, 0x1e, 0xe7, 0x9b, 0xcc, 0x12, 0x5e, 0xe3, 0xf9, 0xd1, 0xd7, 0xcd, 0x5d, 0x35, 0xfb, 0x55, - 0xa8, 0x66, 0xed, 0xb3, 0xf4, 0x60, 0x12, 0x76, 0x3a, 0xe5, 0x1b, 0x2c, 0x64, 0x6c, 0xfe, 0xfa, - 0x98, 0x5a, 0xa3, 0x74, 0xe9, 0xe1, 0x44, 0xf4, 0xb4, 0xf7, 0x11, 0xc2, 0xa5, 0xcc, 0x85, 0xd3, - 0xc6, 0xd4, 0xcb, 0x4a, 0x90, 0x1e, 0x4f, 0x98, 0x90, 0x4a, 0x20, 0x78, 0x76, 0xf0, 0xb2, 0xad, - 0x8e, 0x1b, 0xa4, 0xcf, 0x93, 0xd4, 0x7f, 0xe3, 0x5d, 0xb4, 0x91, 0x66, 0x8e, 0xce, 0x4f, 0xd6, - 0x50, 0xe3, 0xc9, 0x69, 0x57, 0x46, 0x67, 0x5d, 0x19, 0xfd, 0xe8, 0xca, 0xe8, 0x43, 0x4f, 0xce, - 0x9d, 0xf5, 0xe4, 0xdc, 0xd7, 0x9e, 0x9c, 0x7b, 0xb5, 0x12, 0xd7, 0x63, 0xe6, 0x9e, 0x4a, 0x41, - 0x3b, 0x18, 0xfe, 0x3a, 0x46, 0x17, 0xa7, 0x53, 0x88, 0xb0, 0xfb, 0x7f, 0x02, 0x00, 0x00, 0xff, - 0xff, 0x16, 0x63, 0x32, 0x5e, 0x41, 0x07, 0x00, 0x00, + // 661 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xce, 0x35, 0x6d, 0x44, 0xae, 0xa8, 0xa2, 0x56, 0x48, 0x5d, 0xab, 0xb5, 0xd3, 0x0c, 0x28, + 0xaa, 0xa8, 0x4d, 0xca, 0x2f, 0xa9, 0xb0, 0x90, 0x0a, 0xb6, 0x48, 0x55, 0xca, 0xc4, 0x12, 0x39, + 0xf6, 0xc9, 0x3d, 0x35, 0xf6, 0xb3, 0x7c, 0xe7, 0xd2, 0x22, 0x21, 0x55, 0x4c, 0x8c, 0xfc, 0x09, + 0x9d, 0x99, 0x3a, 0xb0, 0xf0, 0x1f, 0x54, 0x62, 0xa9, 0x98, 0x98, 0x00, 0x25, 0x43, 0x91, 0xf8, + 0x27, 0x90, 0xed, 0xab, 0x93, 0x28, 0x26, 0x25, 0x48, 0x9d, 0x92, 0x7b, 0xef, 0x7b, 0xdf, 0xfb, + 0xde, 0x97, 0x7b, 0x17, 0xac, 0x59, 0xc0, 0x5c, 0x60, 0x86, 0x1f, 0x00, 0x07, 0x0b, 0xba, 0x3e, + 0x40, 0xd7, 0x38, 0xa8, 0x1b, 0xfc, 0x50, 0x8f, 0x43, 0x52, 0x39, 0x01, 0xe8, 0xc3, 0x00, 0xfd, + 0xa0, 0xae, 0x94, 0x1c, 0x70, 0x20, 0x0e, 0x1a, 0xd1, 0xb7, 0x24, 0xaf, 0xa8, 0x82, 0xae, 0x63, + 0x32, 0x62, 0x1c, 0xd4, 0x3b, 0x84, 0x9b, 0x75, 0xc3, 0x02, 0xea, 0x89, 0xfc, 0x72, 0x92, 0x6f, + 0x27, 0x85, 0xc3, 0xd4, 0xca, 0x92, 0x28, 0x75, 0x99, 0x13, 0x09, 0x70, 0x99, 0x93, 0x24, 0xaa, + 0x5f, 0x10, 0x2e, 0x35, 0x99, 0xf3, 0x22, 0xf4, 0xec, 0x6d, 0x70, 0xdd, 0xd0, 0xa3, 0xfc, 0x68, + 0x07, 0xa0, 0x2b, 0x59, 0xb8, 0x60, 0xba, 0x10, 0x7a, 0x5c, 0x46, 0x95, 0x7c, 0x6d, 0x7e, 0x73, + 0x59, 0x17, 0x84, 0x51, 0x77, 0x5d, 0x74, 0xd7, 0xb7, 0x81, 0x7a, 0x8d, 0x7b, 0x67, 0xdf, 0xb5, + 0xdc, 0xc7, 0x1f, 0x5a, 0xcd, 0xa1, 0x7c, 0x2f, 0xec, 0xe8, 0x16, 0xb8, 0xa2, 0xbb, 0xf8, 0xd8, + 0x60, 0xf6, 0xbe, 0xc1, 0x8f, 0x7c, 0xc2, 0xe2, 0x02, 0xd6, 0x12, 0xd4, 0xd2, 0x23, 0x5c, 0xb4, + 0x89, 0x0f, 0x8c, 0x72, 0x08, 0xe4, 0x99, 0x0a, 0xaa, 0x15, 0x1b, 0xf2, 0xd7, 0x4f, 0x1b, 0x25, + 0xd1, 0xea, 0x99, 0x6d, 0x07, 0x84, 0xb1, 0x5d, 0x1e, 0x50, 0xcf, 0x69, 0x0d, 0xa0, 0x5b, 0xe5, + 0xf7, 0x27, 0x5a, 0xee, 0xd7, 0x89, 0x96, 0x7b, 0x77, 0x71, 0xba, 0x3e, 0x88, 0x57, 0x55, 0xbc, + 0x92, 0x35, 0x4c, 0x8b, 0x30, 0x1f, 0x3c, 0x46, 0xaa, 0x3d, 0x84, 0x6f, 0x37, 0x99, 0x33, 0x92, + 0xdc, 0xf5, 0x89, 0x67, 0x47, 0x4a, 0xcc, 0x90, 0xef, 0x41, 0x40, 0xf9, 0x91, 0x8c, 0xae, 0x52, + 0x92, 0x42, 0xa5, 0x15, 0x5c, 0x0c, 0x88, 0x45, 0x7d, 0x4a, 0x3c, 0x9e, 0x4c, 0xd0, 0x1a, 0x04, + 0x86, 0x4c, 0xcc, 0x5f, 0x9b, 0x89, 0x5b, 0x0b, 0xb1, 0x09, 0xa9, 0xa4, 0xaa, 0x86, 0x57, 0x33, + 0x67, 0x4c, 0x5d, 0xf8, 0x3c, 0x83, 0x97, 0x9a, 0xcc, 0xd9, 0x0d, 0x3b, 0x2e, 0xe5, 0x8d, 0xd0, + 0x76, 0x08, 0xdf, 0x09, 0xc0, 0x07, 0x66, 0x76, 0xff, 0xdb, 0x87, 0xe7, 0x78, 0x31, 0x1d, 0xbb, + 0x6d, 0x26, 0xa8, 0x2b, 0x7f, 0xd1, 0x5b, 0x69, 0x89, 0x88, 0x4b, 0x4f, 0xf1, 0x4d, 0x0e, 0xdc, + 0xec, 0xb6, 0x3b, 0xb1, 0x2c, 0x39, 0x5f, 0x41, 0x13, 0x6d, 0x6b, 0xcd, 0xc7, 0xf0, 0x64, 0x08, + 0x69, 0x15, 0x63, 0xc6, 0xcd, 0x80, 0xb7, 0x39, 0x75, 0x89, 0x3c, 0x5b, 0x41, 0xb5, 0xd9, 0x56, + 0x31, 0x8e, 0xbc, 0xa4, 0x2e, 0x91, 0x14, 0x7c, 0x83, 0x07, 0xa6, 0x67, 0xed, 0x11, 0x26, 0xcf, + 0xc5, 0xc9, 0xf4, 0x2c, 0x95, 0x71, 0xc1, 0x27, 0x01, 0x05, 0x5b, 0x2e, 0xc4, 0x19, 0x71, 0x1a, + 0x33, 0x77, 0x0d, 0x6b, 0x7f, 0xb1, 0x2e, 0xb5, 0x17, 0xf0, 0x42, 0xe4, 0x7f, 0xd7, 0xa4, 0xae, + 0xd0, 0x95, 0x69, 0x0e, 0x9a, 0xd6, 0x9c, 0xad, 0x72, 0xa4, 0x65, 0x9c, 0xa9, 0xfa, 0x16, 0x97, + 0x47, 0x1b, 0x5e, 0x4a, 0x19, 0x59, 0x62, 0x74, 0x4d, 0xf7, 0x6f, 0xf3, 0x77, 0x1e, 0xe7, 0x9b, + 0xcc, 0x91, 0x5e, 0xe3, 0xc5, 0xf1, 0x67, 0xe4, 0xae, 0x9e, 0xfd, 0xc4, 0xe9, 0x59, 0x7b, 0xaa, + 0x3c, 0x98, 0x06, 0x9d, 0x4e, 0xf9, 0x06, 0x4b, 0x19, 0x1b, 0xbd, 0x31, 0x81, 0x6b, 0x1c, 0xae, + 0x3c, 0x9c, 0x0a, 0x9e, 0xf6, 0x3e, 0x46, 0xb8, 0x94, 0xb9, 0x48, 0xc6, 0x04, 0xbe, 0xac, 0x02, + 0xe5, 0xf1, 0x94, 0x05, 0xa9, 0x04, 0x82, 0xe7, 0x87, 0x2f, 0xdb, 0x9d, 0x49, 0x83, 0x0c, 0x70, + 0x8a, 0xfe, 0x6f, 0xb8, 0xcb, 0x36, 0xca, 0xdc, 0xf1, 0xc5, 0xe9, 0x3a, 0x6a, 0x3c, 0x39, 0xeb, + 0xa9, 0xe8, 0xbc, 0xa7, 0xa2, 0x9f, 0x3d, 0x15, 0x7d, 0xe8, 0xab, 0xb9, 0xf3, 0xbe, 0x9a, 0xfb, + 0xd6, 0x57, 0x73, 0xaf, 0xd6, 0x12, 0x3e, 0x66, 0xef, 0xeb, 0x14, 0x8c, 0xc3, 0xd1, 0x7f, 0xbd, + 0xf8, 0xe2, 0x74, 0x0a, 0x71, 0xec, 0xfe, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x9a, 0x22, + 0xf8, 0x19, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -873,16 +861,11 @@ func (m *MsgSubmitBudgetProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) if m.Period != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Period)) i-- - dAtA[i] = 0x38 + dAtA[i] = 0x30 } if m.Tranches != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Tranches)) i-- - dAtA[i] = 0x30 - } - if m.LastClaimTime != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.LastClaimTime)) - i-- dAtA[i] = 0x28 } if m.StartTime != 0 { @@ -1097,9 +1080,6 @@ func (m *MsgSubmitBudgetProposal) Size() (n int) { if m.StartTime != 0 { n += 1 + sovTx(uint64(m.StartTime)) } - if m.LastClaimTime != 0 { - n += 1 + sovTx(uint64(m.LastClaimTime)) - } if m.Tranches != 0 { n += 1 + sovTx(uint64(m.Tranches)) } @@ -1661,25 +1641,6 @@ func (m *MsgSubmitBudgetProposal) Unmarshal(dAtA []byte) error { } } case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastClaimTime", wireType) - } - m.LastClaimTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastClaimTime |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) } @@ -1698,7 +1659,7 @@ func (m *MsgSubmitBudgetProposal) Unmarshal(dAtA []byte) error { break } } - case 7: + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } diff --git a/x/protocolpool/types/types.pb.go b/x/protocolpool/types/types.pb.go index c5764dde1925..f593ed6ea0f7 100644 --- a/x/protocolpool/types/types.pb.go +++ b/x/protocolpool/types/types.pb.go @@ -30,18 +30,22 @@ type Budget struct { RecipientAddress string `protobuf:"bytes,1,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` // total_budget is the total amount allocated for the budget. TotalBudget *types.Coin `protobuf:"bytes,2,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` + // claimed_amount is the total amount claimed from the total budget amount requested. + ClaimedAmount *types.Coin `protobuf:"bytes,3,opt,name=claimed_amount,json=claimedAmount,proto3" json:"claimed_amount,omitempty"` // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. - StartTime uint64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + StartTime uint64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // last_claim_time is the time when the budget was last successfully claimed or distributed, // represented in seconds since the Unix epoch. It is used to track the last claim time for fund distribution. // If set, it cannot be less than start_time. - LastClaimTime uint64 `protobuf:"varint,4,opt,name=last_claim_time,json=lastClaimTime,proto3" json:"last_claim_time,omitempty"` + LastClaimTime uint64 `protobuf:"varint,5,opt,name=last_claim_time,json=lastClaimTime,proto3" json:"last_claim_time,omitempty"` // tranches is the number of times the total budget amount is to be distributed. - Tranches uint64 `protobuf:"varint,5,opt,name=tranches,proto3" json:"tranches,omitempty"` + Tranches uint64 `protobuf:"varint,6,opt,name=tranches,proto3" json:"tranches,omitempty"` + // tranches_left is the number of tranches left for the amount to be distributed. + TranchesLeft uint64 `protobuf:"varint,7,opt,name=tranches_left,json=tranchesLeft,proto3" json:"tranches_left,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 uint64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` + Period uint64 `protobuf:"varint,8,opt,name=period,proto3" json:"period,omitempty"` } func (m *Budget) Reset() { *m = Budget{} } @@ -91,6 +95,13 @@ func (m *Budget) GetTotalBudget() *types.Coin { return nil } +func (m *Budget) GetClaimedAmount() *types.Coin { + if m != nil { + return m.ClaimedAmount + } + return nil +} + func (m *Budget) GetStartTime() uint64 { if m != nil { return m.StartTime @@ -112,6 +123,13 @@ func (m *Budget) GetTranches() uint64 { return 0 } +func (m *Budget) GetTranchesLeft() uint64 { + if m != nil { + return m.TranchesLeft + } + return 0 +} + func (m *Budget) GetPeriod() uint64 { if m != nil { return m.Period @@ -128,28 +146,31 @@ func init() { } var fileDescriptor_c1b7d0ea246d7f44 = []byte{ - // 323 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0x41, 0x4a, 0x03, 0x31, - 0x14, 0x86, 0x9b, 0x5a, 0x07, 0x9b, 0x2a, 0xea, 0x20, 0x65, 0x5a, 0x30, 0xd4, 0x2e, 0xa4, 0x1b, - 0x13, 0x46, 0x97, 0xba, 0xb1, 0xc5, 0x0b, 0x54, 0x57, 0x6e, 0x86, 0xcc, 0x4c, 0xa8, 0xc1, 0x99, - 0xc9, 0x90, 0x3c, 0x8b, 0xde, 0xc0, 0xa5, 0x87, 0xf1, 0x10, 0x2e, 0x8b, 0x2b, 0x97, 0xd2, 0x5e, - 0x44, 0x9a, 0x84, 0x52, 0x97, 0xef, 0x7b, 0xdf, 0xfb, 0xf9, 0xe1, 0xe1, 0x61, 0xa6, 0x4c, 0xa9, - 0x0c, 0xab, 0xb5, 0x02, 0x95, 0xa9, 0xa2, 0x56, 0xaa, 0x60, 0xf3, 0x98, 0xc1, 0x5b, 0x2d, 0x0c, - 0xb5, 0x34, 0xec, 0x3a, 0x87, 0x6e, 0x3b, 0x74, 0x1e, 0xf7, 0x7b, 0x8e, 0x27, 0x96, 0xb3, 0x6d, - 0xa9, 0x4f, 0x7c, 0x6c, 0xca, 0x8d, 0x60, 0xf3, 0x38, 0x15, 0xc0, 0x63, 0x96, 0x29, 0x59, 0xb9, - 0xfd, 0xf0, 0xbd, 0x89, 0x83, 0xf1, 0x4b, 0x3e, 0x13, 0x10, 0xde, 0xe1, 0x63, 0x2d, 0x32, 0x59, - 0x4b, 0x51, 0x41, 0xc2, 0xf3, 0x5c, 0x0b, 0x63, 0x22, 0x34, 0x40, 0xa3, 0xf6, 0x38, 0xfa, 0xfe, - 0xbc, 0x38, 0xf1, 0xb9, 0xb7, 0x6e, 0x73, 0x0f, 0x5a, 0x56, 0xb3, 0xe9, 0xd1, 0xe6, 0xc4, 0xf3, - 0xf0, 0x06, 0xef, 0x83, 0x02, 0x5e, 0x24, 0xa9, 0x8d, 0x8d, 0x9a, 0x03, 0x34, 0xea, 0x5c, 0xf6, - 0xa8, 0x3f, 0x5f, 0x17, 0xa1, 0xbe, 0x08, 0x9d, 0x28, 0x59, 0x4d, 0x3b, 0x56, 0xf7, 0x25, 0x4e, - 0x31, 0x36, 0xc0, 0x35, 0x24, 0x20, 0x4b, 0x11, 0xed, 0x0c, 0xd0, 0xa8, 0x35, 0x6d, 0x5b, 0xf2, - 0x20, 0x4b, 0x11, 0x9e, 0xe3, 0xc3, 0x82, 0x1b, 0x48, 0xb2, 0x82, 0xcb, 0xd2, 0x39, 0x2d, 0xeb, - 0x1c, 0xac, 0xf1, 0x64, 0x4d, 0xad, 0xd7, 0xc7, 0x7b, 0xa0, 0x79, 0x95, 0x3d, 0x09, 0x13, 0xed, - 0x5a, 0x61, 0x33, 0x87, 0x5d, 0x1c, 0xd4, 0x42, 0x4b, 0x95, 0x47, 0x81, 0xdd, 0xf8, 0x69, 0x7c, - 0xfd, 0xb5, 0x24, 0x68, 0xb1, 0x24, 0xe8, 0x77, 0x49, 0xd0, 0xc7, 0x8a, 0x34, 0x16, 0x2b, 0xd2, - 0xf8, 0x59, 0x91, 0xc6, 0xe3, 0x99, 0xeb, 0x6e, 0xf2, 0x67, 0x2a, 0x15, 0x7b, 0xfd, 0xff, 0x23, - 0xfb, 0xa0, 0x34, 0xb0, 0xec, 0xea, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x8a, 0x39, 0x05, 0x4c, 0xc7, - 0x01, 0x00, 0x00, + // 369 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xc1, 0x4e, 0xea, 0x40, + 0x14, 0x86, 0x29, 0x97, 0xdb, 0x0b, 0x03, 0xdc, 0x7b, 0x6d, 0x0c, 0x19, 0x48, 0x6c, 0x10, 0x13, + 0xc3, 0xc6, 0x36, 0xd5, 0xa5, 0x2e, 0x04, 0xe2, 0xce, 0x15, 0xba, 0x72, 0xd3, 0x4c, 0xdb, 0x01, + 0x27, 0xb6, 0x9d, 0xa6, 0x73, 0x20, 0xfa, 0x16, 0x3e, 0x8c, 0x0f, 0xe1, 0x92, 0xb8, 0x72, 0x69, + 0xe0, 0x01, 0x7c, 0x05, 0xc3, 0xe9, 0x40, 0x70, 0xe5, 0x6e, 0xce, 0x77, 0xbe, 0xff, 0xe4, 0x4c, + 0x72, 0x48, 0x2f, 0x94, 0x2a, 0x91, 0xca, 0xcd, 0x72, 0x09, 0x32, 0x94, 0x71, 0x26, 0x65, 0xec, + 0xce, 0x3d, 0x17, 0x9e, 0x32, 0xae, 0x1c, 0xa4, 0x56, 0xab, 0x70, 0x9c, 0x5d, 0xc7, 0x99, 0x7b, + 0x9d, 0x76, 0xc1, 0x7d, 0xe4, 0xee, 0xae, 0xd4, 0xb1, 0xf5, 0xd8, 0x80, 0x29, 0xee, 0xce, 0xbd, + 0x80, 0x03, 0xf3, 0xdc, 0x50, 0x8a, 0xb4, 0xe8, 0xf7, 0x3e, 0xcb, 0xc4, 0x1c, 0xce, 0xa2, 0x29, + 0x07, 0xeb, 0x8a, 0xec, 0xe5, 0x3c, 0x14, 0x99, 0xe0, 0x29, 0xf8, 0x2c, 0x8a, 0x72, 0xae, 0x14, + 0x35, 0xba, 0x46, 0xbf, 0x36, 0xa4, 0x6f, 0x2f, 0x27, 0xfb, 0x7a, 0xee, 0xa0, 0xe8, 0xdc, 0x40, + 0x2e, 0xd2, 0xe9, 0xf8, 0xff, 0x36, 0xa2, 0xb9, 0x75, 0x41, 0x1a, 0x20, 0x81, 0xc5, 0x7e, 0x80, + 0x63, 0x69, 0xb9, 0x6b, 0xf4, 0xeb, 0xa7, 0x6d, 0x47, 0xc7, 0xd7, 0x8b, 0x38, 0x7a, 0x11, 0x67, + 0x24, 0x45, 0x3a, 0xae, 0xa3, 0xae, 0x97, 0xb8, 0x24, 0x7f, 0xc3, 0x98, 0x89, 0x84, 0x47, 0x3e, + 0x4b, 0xe4, 0x2c, 0x05, 0xfa, 0xeb, 0xa7, 0x7c, 0x53, 0x07, 0x06, 0xe8, 0x5b, 0x07, 0x84, 0x28, + 0x60, 0x39, 0xf8, 0x20, 0x12, 0x4e, 0x2b, 0x5d, 0xa3, 0x5f, 0x19, 0xd7, 0x90, 0xdc, 0x8a, 0x84, + 0x5b, 0xc7, 0xe4, 0x5f, 0xcc, 0x14, 0xf8, 0x18, 0x2a, 0x9c, 0xdf, 0xe8, 0x34, 0xd7, 0x78, 0xb4, + 0xa6, 0xe8, 0x75, 0x48, 0x15, 0x72, 0x96, 0x86, 0xf7, 0x5c, 0x51, 0x13, 0x85, 0x6d, 0x6d, 0x1d, + 0x91, 0xe6, 0xe6, 0xed, 0xc7, 0x7c, 0x02, 0xf4, 0x0f, 0x0a, 0x8d, 0x0d, 0xbc, 0xe6, 0x13, 0xb0, + 0x5a, 0xc4, 0xcc, 0x78, 0x2e, 0x64, 0x44, 0xab, 0xd8, 0xd5, 0xd5, 0xf0, 0xfc, 0x75, 0x69, 0x1b, + 0x8b, 0xa5, 0x6d, 0x7c, 0x2c, 0x6d, 0xe3, 0x79, 0x65, 0x97, 0x16, 0x2b, 0xbb, 0xf4, 0xbe, 0xb2, + 0x4b, 0x77, 0x87, 0xc5, 0x17, 0x55, 0xf4, 0xe0, 0x08, 0xe9, 0x3e, 0x7e, 0x3f, 0x05, 0xbc, 0x83, + 0xc0, 0x44, 0x76, 0xf6, 0x15, 0x00, 0x00, 0xff, 0xff, 0x11, 0xaa, 0x8d, 0xa6, 0x2e, 0x02, 0x00, + 0x00, } func (m *Budget) Marshal() (dAtA []byte, err error) { @@ -175,22 +196,39 @@ func (m *Budget) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.Period != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Period)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x40 + } + if m.TranchesLeft != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.TranchesLeft)) + i-- + dAtA[i] = 0x38 } if m.Tranches != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Tranches)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x30 } if m.LastClaimTime != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.LastClaimTime)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x28 } if m.StartTime != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.StartTime)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x20 + } + if m.ClaimedAmount != nil { + { + size, err := m.ClaimedAmount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } if m.TotalBudget != nil { { @@ -239,6 +277,10 @@ func (m *Budget) Size() (n int) { l = m.TotalBudget.Size() n += 1 + l + sovTypes(uint64(l)) } + if m.ClaimedAmount != nil { + l = m.ClaimedAmount.Size() + n += 1 + l + sovTypes(uint64(l)) + } if m.StartTime != 0 { n += 1 + sovTypes(uint64(m.StartTime)) } @@ -248,6 +290,9 @@ func (m *Budget) Size() (n int) { if m.Tranches != 0 { n += 1 + sovTypes(uint64(m.Tranches)) } + if m.TranchesLeft != 0 { + n += 1 + sovTypes(uint64(m.TranchesLeft)) + } if m.Period != 0 { n += 1 + sovTypes(uint64(m.Period)) } @@ -358,6 +403,42 @@ func (m *Budget) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimedAmount", 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 + } + if m.ClaimedAmount == nil { + m.ClaimedAmount = &types.Coin{} + } + if err := m.ClaimedAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) } @@ -376,7 +457,7 @@ func (m *Budget) Unmarshal(dAtA []byte) error { break } } - case 4: + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LastClaimTime", wireType) } @@ -395,7 +476,7 @@ func (m *Budget) Unmarshal(dAtA []byte) error { break } } - case 5: + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) } @@ -414,7 +495,26 @@ func (m *Budget) Unmarshal(dAtA []byte) error { break } } - case 6: + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TranchesLeft", wireType) + } + m.TranchesLeft = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TranchesLeft |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } From f3806dc9b00880b94c3841670fde72e95b6d68fc Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Wed, 1 Nov 2023 18:03:20 +0530 Subject: [PATCH 56/69] update keeper logic and tests --- x/protocolpool/keeper/grpc_query.go | 8 +++- x/protocolpool/keeper/grpc_query_test.go | 47 ++++++++++++++++++++---- x/protocolpool/keeper/keeper.go | 29 ++++++++++----- x/protocolpool/keeper/msg_server_test.go | 3 +- 4 files changed, 68 insertions(+), 19 deletions(-) diff --git a/x/protocolpool/keeper/grpc_query.go b/x/protocolpool/keeper/grpc_query.go index 5366f360f974..2ca62b0634cc 100644 --- a/x/protocolpool/keeper/grpc_query.go +++ b/x/protocolpool/keeper/grpc_query.go @@ -49,5 +49,11 @@ func (k Querier) UnclaimedBudget(ctx context.Context, req *types.QueryUnclaimedB } return nil, err } - return &types.QueryUnclaimedBudgetResponse{UnclaimedAmount: budget.TotalBudget}, nil + var unclaimedBudget sdk.Coin + if budget.ClaimedAmount == nil { + unclaimedBudget = *budget.TotalBudget + } else { + unclaimedBudget = budget.TotalBudget.Sub(*budget.ClaimedAmount) + } + return &types.QueryUnclaimedBudgetResponse{UnclaimedAmount: &unclaimedBudget}, nil } diff --git a/x/protocolpool/keeper/grpc_query_test.go b/x/protocolpool/keeper/grpc_query_test.go index fbe031b55b51..cf1f9ad63576 100644 --- a/x/protocolpool/keeper/grpc_query_test.go +++ b/x/protocolpool/keeper/grpc_query_test.go @@ -3,16 +3,19 @@ package keeper_test import ( "cosmossdk.io/x/protocolpool/keeper" "cosmossdk.io/x/protocolpool/types" + + sdk "github.com/cosmos/cosmos-sdk/types" ) func (suite *KeeperTestSuite) TestUnclaimedBudget() { queryServer := keeper.NewQuerier(suite.poolKeeper) testCases := []struct { - name string - preRun func() - req *types.QueryUnclaimedBudgetRequest - expErr bool - expErrMsg string + name string + preRun func() + req *types.QueryUnclaimedBudgetRequest + expErr bool + expErrMsg string + unclaimedFunds *sdk.Coin }{ { name: "empty recipient address", @@ -47,7 +50,37 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { req: &types.QueryUnclaimedBudgetRequest{ Address: recipientAddr.String(), }, - expErr: false, + expErr: false, + unclaimedFunds: &fooCoin, + }, + { + name: "valid case with claim", + preRun: func() { + // Prepare a valid budget proposal + budget := types.Budget{ + RecipientAddress: recipientAddr.String(), + TotalBudget: &fooCoin, + StartTime: uint64(suite.ctx.BlockTime().Unix() - 70), + Tranches: 2, + Period: 60, + } + err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) + suite.Require().NoError(err) + + // Claim the funds once + msg := &types.MsgClaimBudget{ + RecipientAddress: recipientAddr.String(), + } + suite.mockSendCoinsFromModuleToAccount(recipientAddr) + _, err = suite.msgServer.ClaimBudget(suite.ctx, msg) + suite.Require().NoError(err) + }, + + req: &types.QueryUnclaimedBudgetRequest{ + Address: recipientAddr.String(), + }, + expErr: false, + unclaimedFunds: &fooCoin2, }, } for _, tc := range testCases { @@ -61,7 +94,7 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { suite.Require().Contains(err.Error(), tc.expErrMsg) } else { suite.Require().NoError(err) - suite.Require().Equal(resp.UnclaimedAmount, &fooCoin) + suite.Require().Equal(tc.unclaimedFunds, resp.UnclaimedAmount) } }) } diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 37f560f35c99..75ba287627af 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -117,14 +117,17 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) } // check if the distribution is completed - if budget.Tranches <= 0 { - // remove the entry of budget ended recipient - err := k.BudgetProposal.Remove(ctx, recipient) - if err != nil { - return sdk.Coin{}, err + if budget.TranchesLeft == 0 && budget.ClaimedAmount != nil { + // check that claimed amount is equal to total budget + if budget.ClaimedAmount.Equal(budget.TotalBudget) { + // remove the entry of budget ended recipient + err := k.BudgetProposal.Remove(ctx, recipient) + if err != nil { + return sdk.Coin{}, err + } + // Return the end of the budget + return sdk.Coin{}, fmt.Errorf("budget ended for recipient: %s", recipient.String()) } - // Return the end of the budget - return sdk.Coin{}, fmt.Errorf("budget ended for recipient: %s", recipient.String()) } currentTime := sdkCtx.BlockTime().Unix() @@ -137,6 +140,11 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) if budget.LastClaimTime == 0 { budget.LastClaimTime = budget.StartTime } + if budget.TranchesLeft == 0 && budget.ClaimedAmount == nil { + budget.TranchesLeft = budget.Tranches + zeroCoin := sdk.NewCoin(budget.TotalBudget.Denom, math.ZeroInt()) + budget.ClaimedAmount = &zeroCoin + } // Calculate the time elapsed since the last claim time timeElapsed := uint64(currentTime) - budget.LastClaimTime @@ -152,10 +160,11 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) amount := sdk.NewCoin(budget.TotalBudget.Denom, coinsToDistribute) // update the budget's remaining tranches - budget.Tranches -= periodsPassed + budget.TranchesLeft -= periodsPassed - // update the TotalBudget amount - budget.TotalBudget.Amount = budget.TotalBudget.Amount.Sub(coinsToDistribute) + // update the ClaimedAmount + claimedAmount := budget.ClaimedAmount.Add(amount) + budget.ClaimedAmount = &claimedAmount // Update the last claim time for the budget budget.LastClaimTime += budget.Period diff --git a/x/protocolpool/keeper/msg_server_test.go b/x/protocolpool/keeper/msg_server_test.go index c4fc57b3857a..9221c0f640d1 100644 --- a/x/protocolpool/keeper/msg_server_test.go +++ b/x/protocolpool/keeper/msg_server_test.go @@ -12,7 +12,8 @@ import ( var ( recipientAddr = sdk.AccAddress([]byte("to1__________________")) - fooCoin = sdk.NewInt64Coin("foo", 100) + fooCoin = sdk.NewInt64Coin("foo", 100) + fooCoin2 = sdk.NewInt64Coin("foo", 50) ) func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { From 286cc87045d12d16006e9cafc39f782a7873ebb6 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Wed, 1 Nov 2023 18:06:28 +0530 Subject: [PATCH 57/69] update readme --- x/protocolpool/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x/protocolpool/README.md b/x/protocolpool/README.md index a1d52cfe4798..5a610d1c277e 100644 --- a/x/protocolpool/README.md +++ b/x/protocolpool/README.md @@ -108,9 +108,9 @@ The message will fail under the following conditions: * The total budget is zero. * The recipient address is empty or restricted. -* The start time is negative. -* The number of tranches is not a positive value. -* The period length is not a positive value. +* The start time is less than current block time. +* The number of tranches is not a positive integer. +* The period length is not a positive integer. ```go reference https://github.com/cosmos/cosmos-sdk/blob/97724493d792517ba2be8969078b5f92ad04d79c/x/protocolpool/keeper/msg_server.go#L39-l61 From 3978f4c0acfd21cbf91b3f9540267ee10bf59aa6 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Wed, 1 Nov 2023 20:33:28 +0530 Subject: [PATCH 58/69] improve errors --- x/protocolpool/keeper/keeper.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 75ba287627af..1a5c5f11459d 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -93,13 +93,13 @@ func (k Keeper) claimFunds(ctx context.Context, recipient sdk.AccAddress) (amoun // get claimable funds from distribution info amount, err = k.getClaimableFunds(ctx, recipient) if err != nil { - return sdk.Coin{}, err + return sdk.Coin{}, fmt.Errorf("error getting claimable funds: %w", err) } // distribute amount from feepool err = k.DistributeFromFeePool(ctx, sdk.NewCoins(amount), recipient) if err != nil { - return sdk.Coin{}, err + return sdk.Coin{}, fmt.Errorf("error distributing from fee pool: %w", err) } return amount, nil @@ -188,23 +188,23 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) func (k Keeper) validateBudgetProposal(ctx context.Context, bp types.MsgSubmitBudgetProposal) error { if bp.TotalBudget.IsZero() { - return fmt.Errorf("total budget cannot be zero") + return fmt.Errorf("invalid budget proposal: total budget cannot be zero") } if err := validateAmount(sdk.NewCoins(*bp.TotalBudget)); err != nil { - return err + return fmt.Errorf("invalid budget proposal: %w", err) } if int64(bp.StartTime) <= sdk.UnwrapSDKContext(ctx).BlockTime().Unix() { - return fmt.Errorf("start time cannot be less than current block time") + return fmt.Errorf("invalid budget proposal: start time cannot be less than current block time") } if bp.Tranches == 0 { - return fmt.Errorf("tranches must be greater than zero") + return fmt.Errorf("invalid budget proposal: tranches must be greater than zero") } if bp.Period == 0 { - return fmt.Errorf("period length should be greater than zero") + return fmt.Errorf("invalid budget proposal: period length should be greater than zero") } return nil From 78c1d282dcc3424b4c56f4797f32060d3e38896f Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Wed, 1 Nov 2023 16:05:25 +0000 Subject: [PATCH 59/69] rename last claim time to next claim from --- api/cosmos/protocolpool/v1/types.pulsar.go | 64 +++++++++--------- proto/cosmos/protocolpool/v1/types.proto | 8 +-- x/protocolpool/keeper/keeper.go | 8 +-- x/protocolpool/types/types.pb.go | 76 +++++++++++----------- 4 files changed, 78 insertions(+), 78 deletions(-) diff --git a/api/cosmos/protocolpool/v1/types.pulsar.go b/api/cosmos/protocolpool/v1/types.pulsar.go index fb08acdad709..c680031f9f05 100644 --- a/api/cosmos/protocolpool/v1/types.pulsar.go +++ b/api/cosmos/protocolpool/v1/types.pulsar.go @@ -20,7 +20,7 @@ var ( fd_Budget_total_budget protoreflect.FieldDescriptor fd_Budget_claimed_amount protoreflect.FieldDescriptor fd_Budget_start_time protoreflect.FieldDescriptor - fd_Budget_last_claim_time protoreflect.FieldDescriptor + fd_Budget_next_claim_from protoreflect.FieldDescriptor fd_Budget_tranches protoreflect.FieldDescriptor fd_Budget_tranches_left protoreflect.FieldDescriptor fd_Budget_period protoreflect.FieldDescriptor @@ -33,7 +33,7 @@ func init() { fd_Budget_total_budget = md_Budget.Fields().ByName("total_budget") fd_Budget_claimed_amount = md_Budget.Fields().ByName("claimed_amount") fd_Budget_start_time = md_Budget.Fields().ByName("start_time") - fd_Budget_last_claim_time = md_Budget.Fields().ByName("last_claim_time") + fd_Budget_next_claim_from = md_Budget.Fields().ByName("next_claim_from") fd_Budget_tranches = md_Budget.Fields().ByName("tranches") fd_Budget_tranches_left = md_Budget.Fields().ByName("tranches_left") fd_Budget_period = md_Budget.Fields().ByName("period") @@ -128,9 +128,9 @@ func (x *fastReflection_Budget) Range(f func(protoreflect.FieldDescriptor, proto return } } - if x.LastClaimTime != uint64(0) { - value := protoreflect.ValueOfUint64(x.LastClaimTime) - if !f(fd_Budget_last_claim_time, value) { + if x.NextClaimFrom != uint64(0) { + value := protoreflect.ValueOfUint64(x.NextClaimFrom) + if !f(fd_Budget_next_claim_from, value) { return } } @@ -175,8 +175,8 @@ func (x *fastReflection_Budget) Has(fd protoreflect.FieldDescriptor) bool { return x.ClaimedAmount != nil case "cosmos.protocolpool.v1.Budget.start_time": return x.StartTime != uint64(0) - case "cosmos.protocolpool.v1.Budget.last_claim_time": - return x.LastClaimTime != uint64(0) + case "cosmos.protocolpool.v1.Budget.next_claim_from": + return x.NextClaimFrom != uint64(0) case "cosmos.protocolpool.v1.Budget.tranches": return x.Tranches != uint64(0) case "cosmos.protocolpool.v1.Budget.tranches_left": @@ -207,8 +207,8 @@ func (x *fastReflection_Budget) Clear(fd protoreflect.FieldDescriptor) { x.ClaimedAmount = nil case "cosmos.protocolpool.v1.Budget.start_time": x.StartTime = uint64(0) - case "cosmos.protocolpool.v1.Budget.last_claim_time": - x.LastClaimTime = uint64(0) + case "cosmos.protocolpool.v1.Budget.next_claim_from": + x.NextClaimFrom = uint64(0) case "cosmos.protocolpool.v1.Budget.tranches": x.Tranches = uint64(0) case "cosmos.protocolpool.v1.Budget.tranches_left": @@ -243,8 +243,8 @@ func (x *fastReflection_Budget) Get(descriptor protoreflect.FieldDescriptor) pro case "cosmos.protocolpool.v1.Budget.start_time": value := x.StartTime return protoreflect.ValueOfUint64(value) - case "cosmos.protocolpool.v1.Budget.last_claim_time": - value := x.LastClaimTime + case "cosmos.protocolpool.v1.Budget.next_claim_from": + value := x.NextClaimFrom return protoreflect.ValueOfUint64(value) case "cosmos.protocolpool.v1.Budget.tranches": value := x.Tranches @@ -283,8 +283,8 @@ func (x *fastReflection_Budget) Set(fd protoreflect.FieldDescriptor, value proto x.ClaimedAmount = value.Message().Interface().(*v1beta1.Coin) case "cosmos.protocolpool.v1.Budget.start_time": x.StartTime = value.Uint() - case "cosmos.protocolpool.v1.Budget.last_claim_time": - x.LastClaimTime = value.Uint() + case "cosmos.protocolpool.v1.Budget.next_claim_from": + x.NextClaimFrom = value.Uint() case "cosmos.protocolpool.v1.Budget.tranches": x.Tranches = value.Uint() case "cosmos.protocolpool.v1.Budget.tranches_left": @@ -325,8 +325,8 @@ func (x *fastReflection_Budget) Mutable(fd protoreflect.FieldDescriptor) protore panic(fmt.Errorf("field recipient_address of message cosmos.protocolpool.v1.Budget is not mutable")) case "cosmos.protocolpool.v1.Budget.start_time": panic(fmt.Errorf("field start_time of message cosmos.protocolpool.v1.Budget is not mutable")) - case "cosmos.protocolpool.v1.Budget.last_claim_time": - panic(fmt.Errorf("field last_claim_time of message cosmos.protocolpool.v1.Budget is not mutable")) + case "cosmos.protocolpool.v1.Budget.next_claim_from": + panic(fmt.Errorf("field next_claim_from of message cosmos.protocolpool.v1.Budget is not mutable")) case "cosmos.protocolpool.v1.Budget.tranches": panic(fmt.Errorf("field tranches of message cosmos.protocolpool.v1.Budget is not mutable")) case "cosmos.protocolpool.v1.Budget.tranches_left": @@ -356,7 +356,7 @@ func (x *fastReflection_Budget) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.protocolpool.v1.Budget.start_time": return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.protocolpool.v1.Budget.last_claim_time": + case "cosmos.protocolpool.v1.Budget.next_claim_from": return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.Budget.tranches": return protoreflect.ValueOfUint64(uint64(0)) @@ -448,8 +448,8 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { if x.StartTime != 0 { n += 1 + runtime.Sov(uint64(x.StartTime)) } - if x.LastClaimTime != 0 { - n += 1 + runtime.Sov(uint64(x.LastClaimTime)) + if x.NextClaimFrom != 0 { + n += 1 + runtime.Sov(uint64(x.NextClaimFrom)) } if x.Tranches != 0 { n += 1 + runtime.Sov(uint64(x.Tranches)) @@ -504,8 +504,8 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x30 } - if x.LastClaimTime != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.LastClaimTime)) + if x.NextClaimFrom != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.NextClaimFrom)) i-- dAtA[i] = 0x28 } @@ -723,9 +723,9 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { } case 5: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastClaimTime", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NextClaimFrom", wireType) } - x.LastClaimTime = 0 + x.NextClaimFrom = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -735,7 +735,7 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.LastClaimTime |= uint64(b&0x7F) << shift + x.NextClaimFrom |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -859,10 +859,10 @@ type Budget struct { ClaimedAmount *v1beta1.Coin `protobuf:"bytes,3,opt,name=claimed_amount,json=claimedAmount,proto3" json:"claimed_amount,omitempty"` // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. StartTime uint64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - // last_claim_time is the time when the budget was last successfully claimed or distributed, - // represented in seconds since the Unix epoch. It is used to track the last claim time for fund distribution. - // If set, it cannot be less than start_time. - LastClaimTime uint64 `protobuf:"varint,5,opt,name=last_claim_time,json=lastClaimTime,proto3" json:"last_claim_time,omitempty"` + // next_claim_from is the time when the budget was last successfully claimed or distributed, + // represented in seconds since the Unix epoch. It is used to track the next starting claim time for fund + // distribution. If set, it cannot be less than start_time. + NextClaimFrom uint64 `protobuf:"varint,5,opt,name=next_claim_from,json=nextClaimFrom,proto3" json:"next_claim_from,omitempty"` // tranches is the number of times the total budget amount is to be distributed. Tranches uint64 `protobuf:"varint,6,opt,name=tranches,proto3" json:"tranches,omitempty"` // tranches_left is the number of tranches left for the amount to be distributed. @@ -921,9 +921,9 @@ func (x *Budget) GetStartTime() uint64 { return 0 } -func (x *Budget) GetLastClaimTime() uint64 { +func (x *Budget) GetNextClaimFrom() uint64 { if x != nil { - return x.LastClaimTime + return x.NextClaimFrom } return 0 } @@ -974,9 +974,9 @@ var file_cosmos_protocolpool_v1_types_proto_rawDesc = []byte{ 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, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x69, 0x6d, 0x65, + 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, + 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x18, 0x07, 0x20, diff --git a/proto/cosmos/protocolpool/v1/types.proto b/proto/cosmos/protocolpool/v1/types.proto index c0d1bbb59f87..7229d31b9fbb 100644 --- a/proto/cosmos/protocolpool/v1/types.proto +++ b/proto/cosmos/protocolpool/v1/types.proto @@ -16,10 +16,10 @@ message Budget { cosmos.base.v1beta1.Coin claimed_amount = 3; // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. uint64 start_time = 4; - // last_claim_time is the time when the budget was last successfully claimed or distributed, - // represented in seconds since the Unix epoch. It is used to track the last claim time for fund distribution. - // If set, it cannot be less than start_time. - uint64 last_claim_time = 5; + // next_claim_from is the time when the budget was last successfully claimed or distributed, + // represented in seconds since the Unix epoch. It is used to track the next starting claim time for fund + // distribution. If set, it cannot be less than start_time. + uint64 next_claim_from = 5; // tranches is the number of times the total budget amount is to be distributed. uint64 tranches = 6; // tranches_left is the number of tranches left for the amount to be distributed. diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 1a5c5f11459d..8ac4f21d9d87 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -137,8 +137,8 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) return sdk.Coin{}, fmt.Errorf("distribution has not started yet") } - if budget.LastClaimTime == 0 { - budget.LastClaimTime = budget.StartTime + if budget.NextClaimFrom == 0 { + budget.NextClaimFrom = budget.StartTime } if budget.TranchesLeft == 0 && budget.ClaimedAmount == nil { budget.TranchesLeft = budget.Tranches @@ -147,7 +147,7 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) } // Calculate the time elapsed since the last claim time - timeElapsed := uint64(currentTime) - budget.LastClaimTime + timeElapsed := uint64(currentTime) - budget.NextClaimFrom // Check the time elapsed has passed period length if timeElapsed >= budget.Period { @@ -167,7 +167,7 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) budget.ClaimedAmount = &claimedAmount // Update the last claim time for the budget - budget.LastClaimTime += budget.Period + budget.NextClaimFrom += budget.Period k.Logger(ctx).Debug(fmt.Sprintf("Processing budget for recipient: %s. Amount: %s", budget.RecipientAddress, coinsToDistribute.String())) diff --git a/x/protocolpool/types/types.pb.go b/x/protocolpool/types/types.pb.go index f593ed6ea0f7..3d4bada9451c 100644 --- a/x/protocolpool/types/types.pb.go +++ b/x/protocolpool/types/types.pb.go @@ -34,10 +34,10 @@ type Budget struct { ClaimedAmount *types.Coin `protobuf:"bytes,3,opt,name=claimed_amount,json=claimedAmount,proto3" json:"claimed_amount,omitempty"` // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. StartTime uint64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - // last_claim_time is the time when the budget was last successfully claimed or distributed, - // represented in seconds since the Unix epoch. It is used to track the last claim time for fund distribution. - // If set, it cannot be less than start_time. - LastClaimTime uint64 `protobuf:"varint,5,opt,name=last_claim_time,json=lastClaimTime,proto3" json:"last_claim_time,omitempty"` + // next_claim_from is the time when the budget was last successfully claimed or distributed, + // represented in seconds since the Unix epoch. It is used to track the next starting claim time for fund + // distribution. If set, it cannot be less than start_time. + NextClaimFrom uint64 `protobuf:"varint,5,opt,name=next_claim_from,json=nextClaimFrom,proto3" json:"next_claim_from,omitempty"` // tranches is the number of times the total budget amount is to be distributed. Tranches uint64 `protobuf:"varint,6,opt,name=tranches,proto3" json:"tranches,omitempty"` // tranches_left is the number of tranches left for the amount to be distributed. @@ -109,9 +109,9 @@ func (m *Budget) GetStartTime() uint64 { return 0 } -func (m *Budget) GetLastClaimTime() uint64 { +func (m *Budget) GetNextClaimFrom() uint64 { if m != nil { - return m.LastClaimTime + return m.NextClaimFrom } return 0 } @@ -146,31 +146,31 @@ func init() { } var fileDescriptor_c1b7d0ea246d7f44 = []byte{ - // 369 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xc1, 0x4e, 0xea, 0x40, - 0x14, 0x86, 0x29, 0x97, 0xdb, 0x0b, 0x03, 0xdc, 0x7b, 0x6d, 0x0c, 0x19, 0x48, 0x6c, 0x10, 0x13, - 0xc3, 0xc6, 0x36, 0xd5, 0xa5, 0x2e, 0x04, 0xe2, 0xce, 0x15, 0xba, 0x72, 0xd3, 0x4c, 0xdb, 0x01, - 0x27, 0xb6, 0x9d, 0xa6, 0x73, 0x20, 0xfa, 0x16, 0x3e, 0x8c, 0x0f, 0xe1, 0x92, 0xb8, 0x72, 0x69, - 0xe0, 0x01, 0x7c, 0x05, 0xc3, 0xe9, 0x40, 0x70, 0xe5, 0x6e, 0xce, 0x77, 0xbe, 0xff, 0xe4, 0x4c, - 0x72, 0x48, 0x2f, 0x94, 0x2a, 0x91, 0xca, 0xcd, 0x72, 0x09, 0x32, 0x94, 0x71, 0x26, 0x65, 0xec, - 0xce, 0x3d, 0x17, 0x9e, 0x32, 0xae, 0x1c, 0xa4, 0x56, 0xab, 0x70, 0x9c, 0x5d, 0xc7, 0x99, 0x7b, - 0x9d, 0x76, 0xc1, 0x7d, 0xe4, 0xee, 0xae, 0xd4, 0xb1, 0xf5, 0xd8, 0x80, 0x29, 0xee, 0xce, 0xbd, - 0x80, 0x03, 0xf3, 0xdc, 0x50, 0x8a, 0xb4, 0xe8, 0xf7, 0x3e, 0xcb, 0xc4, 0x1c, 0xce, 0xa2, 0x29, - 0x07, 0xeb, 0x8a, 0xec, 0xe5, 0x3c, 0x14, 0x99, 0xe0, 0x29, 0xf8, 0x2c, 0x8a, 0x72, 0xae, 0x14, - 0x35, 0xba, 0x46, 0xbf, 0x36, 0xa4, 0x6f, 0x2f, 0x27, 0xfb, 0x7a, 0xee, 0xa0, 0xe8, 0xdc, 0x40, - 0x2e, 0xd2, 0xe9, 0xf8, 0xff, 0x36, 0xa2, 0xb9, 0x75, 0x41, 0x1a, 0x20, 0x81, 0xc5, 0x7e, 0x80, - 0x63, 0x69, 0xb9, 0x6b, 0xf4, 0xeb, 0xa7, 0x6d, 0x47, 0xc7, 0xd7, 0x8b, 0x38, 0x7a, 0x11, 0x67, - 0x24, 0x45, 0x3a, 0xae, 0xa3, 0xae, 0x97, 0xb8, 0x24, 0x7f, 0xc3, 0x98, 0x89, 0x84, 0x47, 0x3e, - 0x4b, 0xe4, 0x2c, 0x05, 0xfa, 0xeb, 0xa7, 0x7c, 0x53, 0x07, 0x06, 0xe8, 0x5b, 0x07, 0x84, 0x28, - 0x60, 0x39, 0xf8, 0x20, 0x12, 0x4e, 0x2b, 0x5d, 0xa3, 0x5f, 0x19, 0xd7, 0x90, 0xdc, 0x8a, 0x84, - 0x5b, 0xc7, 0xe4, 0x5f, 0xcc, 0x14, 0xf8, 0x18, 0x2a, 0x9c, 0xdf, 0xe8, 0x34, 0xd7, 0x78, 0xb4, - 0xa6, 0xe8, 0x75, 0x48, 0x15, 0x72, 0x96, 0x86, 0xf7, 0x5c, 0x51, 0x13, 0x85, 0x6d, 0x6d, 0x1d, - 0x91, 0xe6, 0xe6, 0xed, 0xc7, 0x7c, 0x02, 0xf4, 0x0f, 0x0a, 0x8d, 0x0d, 0xbc, 0xe6, 0x13, 0xb0, - 0x5a, 0xc4, 0xcc, 0x78, 0x2e, 0x64, 0x44, 0xab, 0xd8, 0xd5, 0xd5, 0xf0, 0xfc, 0x75, 0x69, 0x1b, - 0x8b, 0xa5, 0x6d, 0x7c, 0x2c, 0x6d, 0xe3, 0x79, 0x65, 0x97, 0x16, 0x2b, 0xbb, 0xf4, 0xbe, 0xb2, - 0x4b, 0x77, 0x87, 0xc5, 0x17, 0x55, 0xf4, 0xe0, 0x08, 0xe9, 0x3e, 0x7e, 0x3f, 0x05, 0xbc, 0x83, - 0xc0, 0x44, 0x76, 0xf6, 0x15, 0x00, 0x00, 0xff, 0xff, 0x11, 0xaa, 0x8d, 0xa6, 0x2e, 0x02, 0x00, - 0x00, + // 377 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcf, 0x6e, 0xda, 0x40, + 0x10, 0x87, 0x31, 0xa5, 0x2e, 0x2c, 0xd0, 0x3f, 0xab, 0x0a, 0x2d, 0x48, 0xb5, 0x28, 0x95, 0x2a, + 0x2e, 0xb5, 0xe5, 0xf6, 0xd8, 0x1e, 0x0a, 0x28, 0x39, 0xe5, 0x44, 0x72, 0xca, 0x65, 0xb5, 0xb6, + 0x17, 0xb2, 0x8a, 0xed, 0xb5, 0x76, 0x07, 0x44, 0xde, 0x22, 0x0f, 0x93, 0x87, 0xc8, 0x11, 0xe5, + 0x94, 0x63, 0x04, 0x0f, 0x90, 0x57, 0x88, 0x58, 0x2f, 0x88, 0x9c, 0x72, 0xdb, 0xf9, 0xe6, 0xfb, + 0x8d, 0x66, 0xa5, 0x41, 0x83, 0x58, 0xea, 0x4c, 0xea, 0xa0, 0x50, 0x12, 0x64, 0x2c, 0xd3, 0x42, + 0xca, 0x34, 0x58, 0x86, 0x01, 0xdc, 0x14, 0x5c, 0xfb, 0x86, 0xe2, 0x4e, 0xe9, 0xf8, 0xc7, 0x8e, + 0xbf, 0x0c, 0x7b, 0xdd, 0x92, 0x53, 0xc3, 0x83, 0x63, 0xa9, 0xe7, 0xd9, 0xb1, 0x11, 0xd3, 0x3c, + 0x58, 0x86, 0x11, 0x07, 0x16, 0x06, 0xb1, 0x14, 0x79, 0xd9, 0x1f, 0x3c, 0x57, 0x91, 0x3b, 0x5e, + 0x24, 0x73, 0x0e, 0xf8, 0x04, 0x7d, 0x51, 0x3c, 0x16, 0x85, 0xe0, 0x39, 0x50, 0x96, 0x24, 0x8a, + 0x6b, 0x4d, 0x9c, 0xbe, 0x33, 0x6c, 0x8c, 0xc9, 0xc3, 0xdd, 0xaf, 0xaf, 0x76, 0xee, 0xa8, 0xec, + 0x9c, 0x83, 0x12, 0xf9, 0x7c, 0xfa, 0xf9, 0x10, 0xb1, 0x1c, 0xff, 0x43, 0x2d, 0x90, 0xc0, 0x52, + 0x1a, 0x99, 0xb1, 0xa4, 0xda, 0x77, 0x86, 0xcd, 0xdf, 0x5d, 0xdf, 0xc6, 0x77, 0x8b, 0xf8, 0x76, + 0x11, 0x7f, 0x22, 0x45, 0x3e, 0x6d, 0x1a, 0xdd, 0x2e, 0xf1, 0x1f, 0x7d, 0x8c, 0x53, 0x26, 0x32, + 0x9e, 0x50, 0x96, 0xc9, 0x45, 0x0e, 0xe4, 0xdd, 0x5b, 0xf9, 0xb6, 0x0d, 0x8c, 0x8c, 0x8f, 0xbf, + 0x21, 0xa4, 0x81, 0x29, 0xa0, 0x20, 0x32, 0x4e, 0x6a, 0x7d, 0x67, 0x58, 0x9b, 0x36, 0x0c, 0xb9, + 0x10, 0x19, 0xc7, 0x3f, 0xd1, 0xa7, 0x9c, 0xaf, 0x80, 0x9a, 0x10, 0x9d, 0x29, 0x99, 0x91, 0xf7, + 0xc6, 0x69, 0xef, 0xf0, 0x64, 0x47, 0x4f, 0x95, 0xcc, 0x70, 0x0f, 0xd5, 0x41, 0xb1, 0x3c, 0xbe, + 0xe2, 0x9a, 0xb8, 0x46, 0x38, 0xd4, 0xf8, 0x07, 0x6a, 0xef, 0xdf, 0x34, 0xe5, 0x33, 0x20, 0x1f, + 0x8c, 0xd0, 0xda, 0xc3, 0x33, 0x3e, 0x03, 0xdc, 0x41, 0x6e, 0xc1, 0x95, 0x90, 0x09, 0xa9, 0x9b, + 0xae, 0xad, 0xc6, 0x7f, 0xef, 0x37, 0x9e, 0xb3, 0xde, 0x78, 0xce, 0xd3, 0xc6, 0x73, 0x6e, 0xb7, + 0x5e, 0x65, 0xbd, 0xf5, 0x2a, 0x8f, 0x5b, 0xaf, 0x72, 0xf9, 0xbd, 0xfc, 0xa2, 0x4e, 0xae, 0x7d, + 0x21, 0x83, 0xd5, 0xeb, 0x53, 0x30, 0x77, 0x10, 0xb9, 0x86, 0xfd, 0x79, 0x09, 0x00, 0x00, 0xff, + 0xff, 0x4c, 0xbc, 0xff, 0x27, 0x2e, 0x02, 0x00, 0x00, } func (m *Budget) Marshal() (dAtA []byte, err error) { @@ -208,8 +208,8 @@ func (m *Budget) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x30 } - if m.LastClaimTime != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.LastClaimTime)) + if m.NextClaimFrom != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.NextClaimFrom)) i-- dAtA[i] = 0x28 } @@ -284,8 +284,8 @@ func (m *Budget) Size() (n int) { if m.StartTime != 0 { n += 1 + sovTypes(uint64(m.StartTime)) } - if m.LastClaimTime != 0 { - n += 1 + sovTypes(uint64(m.LastClaimTime)) + if m.NextClaimFrom != 0 { + n += 1 + sovTypes(uint64(m.NextClaimFrom)) } if m.Tranches != 0 { n += 1 + sovTypes(uint64(m.Tranches)) @@ -459,9 +459,9 @@ func (m *Budget) Unmarshal(dAtA []byte) error { } case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastClaimTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NextClaimFrom", wireType) } - m.LastClaimTime = 0 + m.NextClaimFrom = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -471,7 +471,7 @@ func (m *Budget) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastClaimTime |= uint64(b&0x7F) << shift + m.NextClaimFrom |= uint64(b&0x7F) << shift if b < 0x80 { break } From 462fe147e9f4c64e3e048184f2e6b65999ec9274 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Wed, 1 Nov 2023 21:43:19 +0530 Subject: [PATCH 60/69] change double claim tc to use 1 month period --- x/protocolpool/keeper/msg_server_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/x/protocolpool/keeper/msg_server_test.go b/x/protocolpool/keeper/msg_server_test.go index 9221c0f640d1..f9d39a44ac4a 100644 --- a/x/protocolpool/keeper/msg_server_test.go +++ b/x/protocolpool/keeper/msg_server_test.go @@ -233,13 +233,14 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { }, "valid double claim attempt": { preRun: func() { - // Prepare the budget proposal with valid start time and period + oneMonthInSeconds := int64(30 * 24 * 60 * 60) // Approximate number of seconds in 1 month + // Prepare the budget proposal with valid start time and period of 1 month (in seconds) budget := types.Budget{ RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix() - 70), + StartTime: uint64(suite.ctx.BlockTime().Unix() - oneMonthInSeconds), Tranches: 2, - Period: 60, + Period: uint64(oneMonthInSeconds), } err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) suite.Require().NoError(err) @@ -253,7 +254,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { suite.Require().NoError(err) // Create a new context with an updated block time to simulate a delay - newBlockTime := suite.ctx.BlockTime().Add(60 * time.Second) + newBlockTime := suite.ctx.BlockTime().Add(time.Duration(oneMonthInSeconds) * time.Second) suite.ctx = suite.ctx.WithHeaderInfo(header.Info{ Time: newBlockTime, }) From 1c84c465c7a0946d5743338cd281c61bb5f00bf6 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Wed, 1 Nov 2023 21:57:28 +0530 Subject: [PATCH 61/69] refactor keeper code --- x/protocolpool/keeper/keeper.go | 54 ++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 8ac4f21d9d87..f61c6a631e97 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -121,8 +121,7 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) // check that claimed amount is equal to total budget if budget.ClaimedAmount.Equal(budget.TotalBudget) { // remove the entry of budget ended recipient - err := k.BudgetProposal.Remove(ctx, recipient) - if err != nil { + if err := k.BudgetProposal.Remove(ctx, recipient); err != nil { return sdk.Coin{}, err } // Return the end of the budget @@ -132,6 +131,7 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) currentTime := sdkCtx.BlockTime().Unix() startTime := budget.StartTime + // Check if the start time is reached if uint64(currentTime) < startTime { return sdk.Coin{}, fmt.Errorf("distribution has not started yet") @@ -140,50 +140,50 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) if budget.NextClaimFrom == 0 { budget.NextClaimFrom = budget.StartTime } + if budget.TranchesLeft == 0 && budget.ClaimedAmount == nil { budget.TranchesLeft = budget.Tranches zeroCoin := sdk.NewCoin(budget.TotalBudget.Denom, math.ZeroInt()) budget.ClaimedAmount = &zeroCoin } + return k.calculateClaimableFunds(ctx, recipient, budget, currentTime) +} + +func (k Keeper) calculateClaimableFunds(ctx context.Context, recipient sdk.AccAddress, budget types.Budget, currentTime int64) (amount sdk.Coin, err error) { // Calculate the time elapsed since the last claim time timeElapsed := uint64(currentTime) - budget.NextClaimFrom // Check the time elapsed has passed period length - if timeElapsed >= budget.Period { - // Calculate how many periods have passed - periodsPassed := timeElapsed / budget.Period + if timeElapsed < budget.Period { + return sdk.Coin{}, fmt.Errorf("budget period has not passed yet") + } - if periodsPassed > 0 { - // Calculate the amount to distribute for all passed periods - coinsToDistribute := math.NewInt(int64(periodsPassed)).Mul(budget.TotalBudget.Amount.QuoRaw(int64(budget.Tranches))) - amount := sdk.NewCoin(budget.TotalBudget.Denom, coinsToDistribute) + // Calculate how many periods have passed + periodsPassed := timeElapsed / budget.Period - // update the budget's remaining tranches - budget.TranchesLeft -= periodsPassed + // Calculate the amount to distribute for all passed periods + coinsToDistribute := math.NewInt(int64(periodsPassed)).Mul(budget.TotalBudget.Amount.QuoRaw(int64(budget.Tranches))) + amount = sdk.NewCoin(budget.TotalBudget.Denom, coinsToDistribute) - // update the ClaimedAmount - claimedAmount := budget.ClaimedAmount.Add(amount) - budget.ClaimedAmount = &claimedAmount + // update the budget's remaining tranches + budget.TranchesLeft -= periodsPassed - // Update the last claim time for the budget - budget.NextClaimFrom += budget.Period + // update the ClaimedAmount + claimedAmount := budget.ClaimedAmount.Add(amount) + budget.ClaimedAmount = &claimedAmount - k.Logger(ctx).Debug(fmt.Sprintf("Processing budget for recipient: %s. Amount: %s", budget.RecipientAddress, coinsToDistribute.String())) + // Update the last claim time for the budget + budget.NextClaimFrom += budget.Period - // Save the updated budget in the state - err = k.BudgetProposal.Set(ctx, recipient, budget) - if err != nil { - return sdk.Coin{}, fmt.Errorf("error while updating the budget for recipient %s", budget.RecipientAddress) - } + k.Logger(ctx).Debug(fmt.Sprintf("Processing budget for recipient: %s. Amount: %s", budget.RecipientAddress, coinsToDistribute.String())) - return amount, nil - } - } else { - return sdk.Coin{}, fmt.Errorf("budget period has not passed yet") + // Save the updated budget in the state + if err := k.BudgetProposal.Set(ctx, recipient, budget); err != nil { + return sdk.Coin{}, fmt.Errorf("error while updating the budget for recipient %s", budget.RecipientAddress) } - return sdk.Coin{}, nil + return amount, nil } func (k Keeper) validateBudgetProposal(ctx context.Context, bp types.MsgSubmitBudgetProposal) error { From d845f2662c476db0f0273b58d99aa9db6754c224 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Fri, 3 Nov 2023 12:28:37 +0530 Subject: [PATCH 62/69] wip: address julien's comment --- x/protocolpool/keeper/keeper.go | 11 ++++++++--- x/protocolpool/keeper/msg_server.go | 2 +- x/protocolpool/keeper/msg_server_test.go | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index f61c6a631e97..778b84a908a0 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -186,7 +186,7 @@ func (k Keeper) calculateClaimableFunds(ctx context.Context, recipient sdk.AccAd return amount, nil } -func (k Keeper) validateBudgetProposal(ctx context.Context, bp types.MsgSubmitBudgetProposal) error { +func (k Keeper) validateAndUpdateBudgetProposal(ctx context.Context, bp types.MsgSubmitBudgetProposal) error { if bp.TotalBudget.IsZero() { return fmt.Errorf("invalid budget proposal: total budget cannot be zero") } @@ -195,8 +195,13 @@ func (k Keeper) validateBudgetProposal(ctx context.Context, bp types.MsgSubmitBu return fmt.Errorf("invalid budget proposal: %w", err) } - if int64(bp.StartTime) <= sdk.UnwrapSDKContext(ctx).BlockTime().Unix() { - return fmt.Errorf("invalid budget proposal: start time cannot be less than current block time") + currentTime := sdk.UnwrapSDKContext(ctx).BlockTime().Unix() + if int64(bp.StartTime) == 0 { + bp.StartTime = uint64(currentTime) + } + + if bp.StartTime < uint64(currentTime) { + return fmt.Errorf("invalid budget proposal: start time cannot be less than the current block time") } if bp.Tranches == 0 { diff --git a/x/protocolpool/keeper/msg_server.go b/x/protocolpool/keeper/msg_server.go index 42a1a76d57c9..43098528aad1 100644 --- a/x/protocolpool/keeper/msg_server.go +++ b/x/protocolpool/keeper/msg_server.go @@ -46,7 +46,7 @@ func (k MsgServer) SubmitBudgetProposal(ctx context.Context, msg *types.MsgSubmi return nil, err } - if err := k.validateBudgetProposal(ctx, *msg); err != nil { + if err := k.validateAndUpdateBudgetProposal(ctx, *msg); err != nil { return nil, err } diff --git a/x/protocolpool/keeper/msg_server_test.go b/x/protocolpool/keeper/msg_server_test.go index f9d39a44ac4a..eea83ba9c29c 100644 --- a/x/protocolpool/keeper/msg_server_test.go +++ b/x/protocolpool/keeper/msg_server_test.go @@ -82,7 +82,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Period: 60, }, expErr: true, - expErrMsg: "start time cannot be less than current block time", + expErrMsg: "start time cannot be less than the current block time", }, "invalid tranches": { input: &types.MsgSubmitBudgetProposal{ From e8189753b909ca851f6531fe6d4389c862b71593 Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Fri, 3 Nov 2023 10:04:43 +0000 Subject: [PATCH 63/69] update proto files --- api/cosmos/protocolpool/v1/query.pulsar.go | 581 +++++++++++++++++--- api/cosmos/protocolpool/v1/query_grpc.pb.go | 4 +- api/cosmos/protocolpool/v1/tx.pulsar.go | 416 ++++++++------ api/cosmos/protocolpool/v1/types.pulsar.go | 338 ++++++++---- proto/cosmos/protocolpool/v1/query.proto | 17 +- proto/cosmos/protocolpool/v1/tx.proto | 8 +- proto/cosmos/protocolpool/v1/types.proto | 16 +- x/protocolpool/types/query.pb.go | 360 ++++++++++-- x/protocolpool/types/tx.pb.go | 187 ++++--- x/protocolpool/types/types.pb.go | 202 ++++--- 10 files changed, 1600 insertions(+), 529 deletions(-) diff --git a/api/cosmos/protocolpool/v1/query.pulsar.go b/api/cosmos/protocolpool/v1/query.pulsar.go index da14ea0d6bf5..85359a03746c 100644 --- a/api/cosmos/protocolpool/v1/query.pulsar.go +++ b/api/cosmos/protocolpool/v1/query.pulsar.go @@ -11,6 +11,8 @@ import ( 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" @@ -1288,13 +1290,23 @@ func (x *fastReflection_QueryUnclaimedBudgetRequest) ProtoMethods() *protoiface. var ( md_QueryUnclaimedBudgetResponse protoreflect.MessageDescriptor + fd_QueryUnclaimedBudgetResponse_total_budget protoreflect.FieldDescriptor + fd_QueryUnclaimedBudgetResponse_claimed_amount protoreflect.FieldDescriptor fd_QueryUnclaimedBudgetResponse_unclaimed_amount protoreflect.FieldDescriptor + fd_QueryUnclaimedBudgetResponse_next_claim_from protoreflect.FieldDescriptor + fd_QueryUnclaimedBudgetResponse_period protoreflect.FieldDescriptor + fd_QueryUnclaimedBudgetResponse_tranches_left protoreflect.FieldDescriptor ) func init() { file_cosmos_protocolpool_v1_query_proto_init() md_QueryUnclaimedBudgetResponse = File_cosmos_protocolpool_v1_query_proto.Messages().ByName("QueryUnclaimedBudgetResponse") + fd_QueryUnclaimedBudgetResponse_total_budget = md_QueryUnclaimedBudgetResponse.Fields().ByName("total_budget") + fd_QueryUnclaimedBudgetResponse_claimed_amount = md_QueryUnclaimedBudgetResponse.Fields().ByName("claimed_amount") fd_QueryUnclaimedBudgetResponse_unclaimed_amount = md_QueryUnclaimedBudgetResponse.Fields().ByName("unclaimed_amount") + fd_QueryUnclaimedBudgetResponse_next_claim_from = md_QueryUnclaimedBudgetResponse.Fields().ByName("next_claim_from") + fd_QueryUnclaimedBudgetResponse_period = md_QueryUnclaimedBudgetResponse.Fields().ByName("period") + fd_QueryUnclaimedBudgetResponse_tranches_left = md_QueryUnclaimedBudgetResponse.Fields().ByName("tranches_left") } var _ protoreflect.Message = (*fastReflection_QueryUnclaimedBudgetResponse)(nil) @@ -1362,12 +1374,42 @@ func (x *fastReflection_QueryUnclaimedBudgetResponse) Interface() protoreflect.P // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryUnclaimedBudgetResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TotalBudget != nil { + value := protoreflect.ValueOfMessage(x.TotalBudget.ProtoReflect()) + if !f(fd_QueryUnclaimedBudgetResponse_total_budget, value) { + return + } + } + if x.ClaimedAmount != nil { + value := protoreflect.ValueOfMessage(x.ClaimedAmount.ProtoReflect()) + if !f(fd_QueryUnclaimedBudgetResponse_claimed_amount, value) { + return + } + } if x.UnclaimedAmount != nil { value := protoreflect.ValueOfMessage(x.UnclaimedAmount.ProtoReflect()) if !f(fd_QueryUnclaimedBudgetResponse_unclaimed_amount, value) { return } } + if x.NextClaimFrom != nil { + value := protoreflect.ValueOfMessage(x.NextClaimFrom.ProtoReflect()) + if !f(fd_QueryUnclaimedBudgetResponse_next_claim_from, value) { + return + } + } + if x.Period != nil { + value := protoreflect.ValueOfMessage(x.Period.ProtoReflect()) + if !f(fd_QueryUnclaimedBudgetResponse_period, value) { + return + } + } + if x.TranchesLeft != uint64(0) { + value := protoreflect.ValueOfUint64(x.TranchesLeft) + if !f(fd_QueryUnclaimedBudgetResponse_tranches_left, value) { + return + } + } } // Has reports whether a field is populated. @@ -1383,8 +1425,18 @@ func (x *fastReflection_QueryUnclaimedBudgetResponse) Range(f func(protoreflect. // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryUnclaimedBudgetResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.total_budget": + return x.TotalBudget != nil + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.claimed_amount": + return x.ClaimedAmount != nil case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.unclaimed_amount": return x.UnclaimedAmount != nil + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.next_claim_from": + return x.NextClaimFrom != nil + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.period": + return x.Period != nil + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.tranches_left": + return x.TranchesLeft != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse")) @@ -1401,8 +1453,18 @@ func (x *fastReflection_QueryUnclaimedBudgetResponse) Has(fd protoreflect.FieldD // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryUnclaimedBudgetResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.total_budget": + x.TotalBudget = nil + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.claimed_amount": + x.ClaimedAmount = nil case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.unclaimed_amount": x.UnclaimedAmount = nil + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.next_claim_from": + x.NextClaimFrom = nil + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.period": + x.Period = nil + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.tranches_left": + x.TranchesLeft = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse")) @@ -1419,9 +1481,24 @@ func (x *fastReflection_QueryUnclaimedBudgetResponse) Clear(fd protoreflect.Fiel // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryUnclaimedBudgetResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.total_budget": + value := x.TotalBudget + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.claimed_amount": + value := x.ClaimedAmount + return protoreflect.ValueOfMessage(value.ProtoReflect()) case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.unclaimed_amount": value := x.UnclaimedAmount return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.next_claim_from": + value := x.NextClaimFrom + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.period": + value := x.Period + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.tranches_left": + value := x.TranchesLeft + return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse")) @@ -1442,8 +1519,18 @@ func (x *fastReflection_QueryUnclaimedBudgetResponse) Get(descriptor protoreflec // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryUnclaimedBudgetResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.total_budget": + x.TotalBudget = value.Message().Interface().(*v1beta1.Coin) + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.claimed_amount": + x.ClaimedAmount = value.Message().Interface().(*v1beta1.Coin) case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.unclaimed_amount": x.UnclaimedAmount = value.Message().Interface().(*v1beta1.Coin) + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.next_claim_from": + x.NextClaimFrom = value.Message().Interface().(*timestamppb.Timestamp) + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.period": + x.Period = value.Message().Interface().(*durationpb.Duration) + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.tranches_left": + x.TranchesLeft = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse")) @@ -1464,11 +1551,33 @@ func (x *fastReflection_QueryUnclaimedBudgetResponse) Set(fd protoreflect.FieldD // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryUnclaimedBudgetResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.total_budget": + if x.TotalBudget == nil { + x.TotalBudget = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.TotalBudget.ProtoReflect()) + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.claimed_amount": + if x.ClaimedAmount == nil { + x.ClaimedAmount = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.ClaimedAmount.ProtoReflect()) case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.unclaimed_amount": if x.UnclaimedAmount == nil { x.UnclaimedAmount = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.UnclaimedAmount.ProtoReflect()) + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.next_claim_from": + if x.NextClaimFrom == nil { + x.NextClaimFrom = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.NextClaimFrom.ProtoReflect()) + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.period": + if x.Period == nil { + x.Period = new(durationpb.Duration) + } + return protoreflect.ValueOfMessage(x.Period.ProtoReflect()) + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.tranches_left": + panic(fmt.Errorf("field tranches_left of message cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse")) @@ -1482,9 +1591,23 @@ func (x *fastReflection_QueryUnclaimedBudgetResponse) Mutable(fd protoreflect.Fi // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryUnclaimedBudgetResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.total_budget": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.claimed_amount": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.unclaimed_amount": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.next_claim_from": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.period": + m := new(durationpb.Duration) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.tranches_left": + return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse")) @@ -1554,10 +1677,29 @@ func (x *fastReflection_QueryUnclaimedBudgetResponse) ProtoMethods() *protoiface var n int var l int _ = l + if x.TotalBudget != nil { + l = options.Size(x.TotalBudget) + 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.UnclaimedAmount != nil { l = options.Size(x.UnclaimedAmount) n += 1 + l + runtime.Sov(uint64(l)) } + if x.NextClaimFrom != nil { + l = options.Size(x.NextClaimFrom) + 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.TranchesLeft != 0 { + n += 1 + runtime.Sov(uint64(x.TranchesLeft)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1587,6 +1729,39 @@ func (x *fastReflection_QueryUnclaimedBudgetResponse) ProtoMethods() *protoiface i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.TranchesLeft != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TranchesLeft)) + i-- + dAtA[i] = 0x30 + } + 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] = 0x2a + } + if x.NextClaimFrom != nil { + encoded, err := options.Marshal(x.NextClaimFrom) + 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.UnclaimedAmount != nil { encoded, err := options.Marshal(x.UnclaimedAmount) if err != nil { @@ -1599,6 +1774,34 @@ func (x *fastReflection_QueryUnclaimedBudgetResponse) ProtoMethods() *protoiface 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 x.TotalBudget != nil { + encoded, err := options.Marshal(x.TotalBudget) + 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 { @@ -1651,6 +1854,78 @@ func (x *fastReflection_QueryUnclaimedBudgetResponse) ProtoMethods() *protoiface } switch fieldNum { case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalBudget", 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.TotalBudget == nil { + x.TotalBudget = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalBudget); 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 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 UnclaimedAmount", wireType) } @@ -1686,6 +1961,97 @@ func (x *fastReflection_QueryUnclaimedBudgetResponse) ProtoMethods() *protoiface 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 NextClaimFrom", 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.NextClaimFrom == nil { + x.NextClaimFrom = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.NextClaimFrom); 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 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 + case 6: + 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 + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1845,8 +2211,19 @@ type QueryUnclaimedBudgetResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // total_budget is the total budget allocated to the recipient + TotalBudget *v1beta1.Coin `protobuf:"bytes,1,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` + // claimed_amount is the budget amount already claimed by the recipient + ClaimedAmount *v1beta1.Coin `protobuf:"bytes,2,opt,name=claimed_amount,json=claimedAmount,proto3" json:"claimed_amount,omitempty"` // unclaimed_amount is the remaining budget amount that is unclaimed by the recipient - UnclaimedAmount *v1beta1.Coin `protobuf:"bytes,1,opt,name=unclaimed_amount,json=unclaimedAmount,proto3" json:"unclaimed_amount,omitempty"` + UnclaimedAmount *v1beta1.Coin `protobuf:"bytes,3,opt,name=unclaimed_amount,json=unclaimedAmount,proto3" json:"unclaimed_amount,omitempty"` + // next_claim_from is the next starting claim time for fund distribution. + // It represents the time when we can claim funds after the period time interval has passed. + NextClaimFrom *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=next_claim_from,json=nextClaimFrom,proto3" json:"next_claim_from,omitempty"` + // period is the time interval for fund distribution + Period *durationpb.Duration `protobuf:"bytes,5,opt,name=period,proto3" json:"period,omitempty"` + // tranches_left is the number of tranches left for the amount to be distributed + TranchesLeft uint64 `protobuf:"varint,6,opt,name=tranches_left,json=tranchesLeft,proto3" json:"tranches_left,omitempty"` } func (x *QueryUnclaimedBudgetResponse) Reset() { @@ -1869,6 +2246,20 @@ func (*QueryUnclaimedBudgetResponse) Descriptor() ([]byte, []int) { return file_cosmos_protocolpool_v1_query_proto_rawDescGZIP(), []int{3} } +func (x *QueryUnclaimedBudgetResponse) GetTotalBudget() *v1beta1.Coin { + if x != nil { + return x.TotalBudget + } + return nil +} + +func (x *QueryUnclaimedBudgetResponse) GetClaimedAmount() *v1beta1.Coin { + if x != nil { + return x.ClaimedAmount + } + return nil +} + func (x *QueryUnclaimedBudgetResponse) GetUnclaimedAmount() *v1beta1.Coin { if x != nil { return x.UnclaimedAmount @@ -1876,6 +2267,27 @@ func (x *QueryUnclaimedBudgetResponse) GetUnclaimedAmount() *v1beta1.Coin { return nil } +func (x *QueryUnclaimedBudgetResponse) GetNextClaimFrom() *timestamppb.Timestamp { + if x != nil { + return x.NextClaimFrom + } + return nil +} + +func (x *QueryUnclaimedBudgetResponse) GetPeriod() *durationpb.Duration { + if x != nil { + return x.Period + } + return nil +} + +func (x *QueryUnclaimedBudgetResponse) GetTranchesLeft() uint64 { + if x != nil { + return x.TranchesLeft + } + return 0 +} + var File_cosmos_protocolpool_v1_query_proto protoreflect.FileDescriptor var file_cosmos_protocolpool_v1_query_proto_rawDesc = []byte{ @@ -1889,66 +2301,89 @@ var file_cosmos_protocolpool_v1_query_proto_rawDesc = []byte{ 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, 0x22, 0x1b, 0x0a, 0x19, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, - 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, - 0x6f, 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 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, - 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x51, - 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, - 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, - 0x07, 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, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x22, 0x64, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x63, 0x6c, 0x61, 0x69, - 0x6d, 0x65, 0x64, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x44, 0x0a, 0x10, 0x75, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x5f, 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, 0x52, 0x0f, 0x75, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, - 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xeb, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x12, 0xa6, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, - 0x6f, 0x6f, 0x6c, 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, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, + 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, 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, 0x1b, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, - 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0xb8, 0x01, 0x0a, 0x0f, 0x55, - 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x33, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x63, - 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 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, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x55, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x42, 0x75, 0x64, 0x67, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x34, 0x12, 0x32, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x6e, 0x63, 0x6c, 0x61, - 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x2f, 0x7b, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x7d, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 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, + 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x1a, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x04, 0x70, 0x6f, 0x6f, 0x6c, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, + 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 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, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x22, + 0x51, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, + 0x64, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, + 0x0a, 0x07, 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, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x8c, 0x03, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x63, 0x6c, + 0x61, 0x69, 0x6d, 0x65, 0x64, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x64, + 0x67, 0x65, 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, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, + 0x74, 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, 0x44, 0x0a, 0x10, 0x75, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, + 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 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, 0x0f, 0x75, 0x6e, 0x63, 0x6c, 0x61, 0x69, + 0x6d, 0x65, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 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, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x46, + 0x72, 0x6f, 0x6d, 0x12, 0x37, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 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, 0x12, 0x23, 0x0a, 0x0d, + 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x65, 0x66, + 0x74, 0x32, 0xeb, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xa6, 0x01, 0x0a, 0x0d, + 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, + 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, + 0x6f, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, + 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0xb8, 0x01, 0x0a, 0x0f, 0x55, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, + 0x65, 0x64, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, + 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x63, 0x6c, + 0x61, 0x69, 0x6d, 0x65, 0x64, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x6f, 0x6f, + 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x62, + 0x75, 0x64, 0x67, 0x65, 0x74, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 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, + 0x51, 0x75, 0x65, 0x72, 0x79, 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 ( @@ -1971,19 +2406,25 @@ var file_cosmos_protocolpool_v1_query_proto_goTypes = []interface{}{ (*QueryUnclaimedBudgetResponse)(nil), // 3: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse (*v1beta1.DecCoin)(nil), // 4: cosmos.base.v1beta1.DecCoin (*v1beta1.Coin)(nil), // 5: cosmos.base.v1beta1.Coin + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 7: google.protobuf.Duration } var file_cosmos_protocolpool_v1_query_proto_depIdxs = []int32{ 4, // 0: cosmos.protocolpool.v1.QueryCommunityPoolResponse.pool:type_name -> cosmos.base.v1beta1.DecCoin - 5, // 1: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.unclaimed_amount:type_name -> cosmos.base.v1beta1.Coin - 0, // 2: cosmos.protocolpool.v1.Query.CommunityPool:input_type -> cosmos.protocolpool.v1.QueryCommunityPoolRequest - 2, // 3: cosmos.protocolpool.v1.Query.UnclaimedBudget:input_type -> cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest - 1, // 4: cosmos.protocolpool.v1.Query.CommunityPool:output_type -> cosmos.protocolpool.v1.QueryCommunityPoolResponse - 3, // 5: cosmos.protocolpool.v1.Query.UnclaimedBudget:output_type -> cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse - 4, // [4:6] is the sub-list for method output_type - 2, // [2:4] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 5, // 1: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.total_budget:type_name -> cosmos.base.v1beta1.Coin + 5, // 2: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.claimed_amount:type_name -> cosmos.base.v1beta1.Coin + 5, // 3: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.unclaimed_amount:type_name -> cosmos.base.v1beta1.Coin + 6, // 4: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.next_claim_from:type_name -> google.protobuf.Timestamp + 7, // 5: cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse.period:type_name -> google.protobuf.Duration + 0, // 6: cosmos.protocolpool.v1.Query.CommunityPool:input_type -> cosmos.protocolpool.v1.QueryCommunityPoolRequest + 2, // 7: cosmos.protocolpool.v1.Query.UnclaimedBudget:input_type -> cosmos.protocolpool.v1.QueryUnclaimedBudgetRequest + 1, // 8: cosmos.protocolpool.v1.Query.CommunityPool:output_type -> cosmos.protocolpool.v1.QueryCommunityPoolResponse + 3, // 9: cosmos.protocolpool.v1.Query.UnclaimedBudget:output_type -> cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse + 8, // [8:10] is the sub-list for method output_type + 6, // [6:8] 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_query_proto_init() } diff --git a/api/cosmos/protocolpool/v1/query_grpc.pb.go b/api/cosmos/protocolpool/v1/query_grpc.pb.go index b46097fc295e..b48692427dd9 100644 --- a/api/cosmos/protocolpool/v1/query_grpc.pb.go +++ b/api/cosmos/protocolpool/v1/query_grpc.pb.go @@ -29,7 +29,7 @@ const ( type QueryClient interface { // CommunityPool queries the community pool coins. CommunityPool(ctx context.Context, in *QueryCommunityPoolRequest, opts ...grpc.CallOption) (*QueryCommunityPoolResponse, error) - // UnclaimedBudget queries the remaining budget left to be claimed. + // UnclaimedBudget queries the remaining budget left to be claimed and it gives overall budget allocation view. UnclaimedBudget(ctx context.Context, in *QueryUnclaimedBudgetRequest, opts ...grpc.CallOption) (*QueryUnclaimedBudgetResponse, error) } @@ -65,7 +65,7 @@ func (c *queryClient) UnclaimedBudget(ctx context.Context, in *QueryUnclaimedBud type QueryServer interface { // CommunityPool queries the community pool coins. CommunityPool(context.Context, *QueryCommunityPoolRequest) (*QueryCommunityPoolResponse, error) - // UnclaimedBudget queries the remaining budget left to be claimed. + // UnclaimedBudget queries the remaining budget left to be claimed and it gives overall budget allocation view. UnclaimedBudget(context.Context, *QueryUnclaimedBudgetRequest) (*QueryUnclaimedBudgetResponse, error) mustEmbedUnimplementedQueryServer() } diff --git a/api/cosmos/protocolpool/v1/tx.pulsar.go b/api/cosmos/protocolpool/v1/tx.pulsar.go index ec1b58778f1f..1c0ce6000dfc 100644 --- a/api/cosmos/protocolpool/v1/tx.pulsar.go +++ b/api/cosmos/protocolpool/v1/tx.pulsar.go @@ -11,6 +11,8 @@ import ( 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" @@ -2012,8 +2014,8 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Range(f func(protoreflect.Field return } } - if x.StartTime != uint64(0) { - value := protoreflect.ValueOfUint64(x.StartTime) + if x.StartTime != nil { + value := protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) if !f(fd_MsgSubmitBudgetProposal_start_time, value) { return } @@ -2024,8 +2026,8 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Range(f func(protoreflect.Field return } } - if x.Period != uint64(0) { - value := protoreflect.ValueOfUint64(x.Period) + if x.Period != nil { + value := protoreflect.ValueOfMessage(x.Period.ProtoReflect()) if !f(fd_MsgSubmitBudgetProposal_period, value) { return } @@ -2052,11 +2054,11 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Has(fd protoreflect.FieldDescri case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget": return x.TotalBudget != nil case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": - return x.StartTime != uint64(0) + return x.StartTime != nil case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": return x.Tranches != uint64(0) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": - return x.Period != uint64(0) + return x.Period != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) @@ -2080,11 +2082,11 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Clear(fd protoreflect.FieldDesc case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget": x.TotalBudget = nil case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": - x.StartTime = uint64(0) + x.StartTime = nil case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.tranches": x.Tranches = uint64(0) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": - x.Period = uint64(0) + x.Period = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) @@ -2112,13 +2114,13 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Get(descriptor protoreflect.Fie return protoreflect.ValueOfMessage(value.ProtoReflect()) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": value := x.StartTime - return protoreflect.ValueOfUint64(value) + 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.ValueOfUint64(value) + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.MsgSubmitBudgetProposal")) @@ -2146,11 +2148,11 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Set(fd protoreflect.FieldDescri case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget": x.TotalBudget = value.Message().Interface().(*v1beta1.Coin) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": - x.StartTime = value.Uint() + 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.Uint() + 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")) @@ -2176,16 +2178,22 @@ func (x *fastReflection_MsgSubmitBudgetProposal) Mutable(fd protoreflect.FieldDe x.TotalBudget = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.TotalBudget.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.start_time": - panic(fmt.Errorf("field start_time 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")) - case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period": - panic(fmt.Errorf("field period 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")) @@ -2207,11 +2215,13 @@ func (x *fastReflection_MsgSubmitBudgetProposal) NewField(fd protoreflect.FieldD m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time": - return protoreflect.ValueOfUint64(uint64(0)) + 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": - return protoreflect.ValueOfUint64(uint64(0)) + 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")) @@ -2293,14 +2303,16 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth l = options.Size(x.TotalBudget) n += 1 + l + runtime.Sov(uint64(l)) } - if x.StartTime != 0 { - n += 1 + runtime.Sov(uint64(x.StartTime)) + 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 != 0 { - n += 1 + runtime.Sov(uint64(x.Period)) + if x.Period != nil { + l = options.Size(x.Period) + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -2331,20 +2343,38 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Period != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) + 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] = 0x30 + dAtA[i] = 0x32 } if x.Tranches != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Tranches)) i-- dAtA[i] = 0x28 } - if x.StartTime != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.StartTime)) + 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] = 0x20 + dAtA[i] = 0x22 } if x.TotalBudget != nil { encoded, err := options.Marshal(x.TotalBudget) @@ -2524,10 +2554,10 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth } iNdEx = postIndex case 4: - if wireType != 0 { + if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) } - x.StartTime = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2537,11 +2567,28 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth } b := dAtA[iNdEx] iNdEx++ - x.StartTime |= uint64(b&0x7F) << shift + 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) @@ -2562,10 +2609,10 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth } } case 6: - if wireType != 0 { + if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } - x.Period = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2575,11 +2622,28 @@ func (x *fastReflection_MsgSubmitBudgetProposal) ProtoMethods() *protoiface.Meth } b := dAtA[iNdEx] iNdEx++ - x.Period |= uint64(b&0x7F) << shift + 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:]) @@ -4006,15 +4070,15 @@ type MsgSubmitBudgetProposal struct { RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` // total_budget is the total amount allocated for the budget. TotalBudget *v1beta1.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` - // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. + // start_time is the time when the budget becomes claimable. // If start_time is less than the current block time, proposal will not be accepted. - StartTime uint64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + StartTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // tranches is the number of times the total 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 uint64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` + Period *durationpb.Duration `protobuf:"bytes,6,opt,name=period,proto3" json:"period,omitempty"` } func (x *MsgSubmitBudgetProposal) Reset() { @@ -4058,11 +4122,11 @@ func (x *MsgSubmitBudgetProposal) GetTotalBudget() *v1beta1.Coin { return nil } -func (x *MsgSubmitBudgetProposal) GetStartTime() uint64 { +func (x *MsgSubmitBudgetProposal) GetStartTime() *timestamppb.Timestamp { if x != nil { return x.StartTime } - return 0 + return nil } func (x *MsgSubmitBudgetProposal) GetTranches() uint64 { @@ -4072,11 +4136,11 @@ func (x *MsgSubmitBudgetProposal) GetTranches() uint64 { return 0 } -func (x *MsgSubmitBudgetProposal) GetPeriod() uint64 { +func (x *MsgSubmitBudgetProposal) GetPeriod() *durationpb.Duration { if x != nil { return x.Period } - return 0 + return nil } // MsgSubmitBudgetProposalResponse defines the response to executing a @@ -4193,120 +4257,128 @@ var file_cosmos_protocolpool_v1_tx_proto_rawDesc = []byte{ 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, 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, + 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, 0xfc, 0x02, 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, 0x3c, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x64, + 0x67, 0x65, 0x74, 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, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, + 0x74, 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, 0x32, 0xeb, 0x03, 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, 0x22, 0xb9, 0x02, 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, 0x3c, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x64, 0x67, - 0x65, 0x74, 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, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x04, 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, 0x16, 0x0a, 0x06, 0x70, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 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, + 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, 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, 0x32, 0xeb, 0x03, 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, 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, + 0x65, 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 ( @@ -4332,25 +4404,29 @@ var file_cosmos_protocolpool_v1_tx_proto_goTypes = []interface{}{ (*MsgClaimBudget)(nil), // 6: cosmos.protocolpool.v1.MsgClaimBudget (*MsgClaimBudgetResponse)(nil), // 7: cosmos.protocolpool.v1.MsgClaimBudgetResponse (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 10: google.protobuf.Duration } var file_cosmos_protocolpool_v1_tx_proto_depIdxs = []int32{ - 8, // 0: cosmos.protocolpool.v1.MsgFundCommunityPool.amount:type_name -> cosmos.base.v1beta1.Coin - 8, // 1: cosmos.protocolpool.v1.MsgCommunityPoolSpend.amount:type_name -> cosmos.base.v1beta1.Coin - 8, // 2: cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget:type_name -> cosmos.base.v1beta1.Coin - 8, // 3: cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount:type_name -> cosmos.base.v1beta1.Coin - 0, // 4: cosmos.protocolpool.v1.Msg.FundCommunityPool:input_type -> cosmos.protocolpool.v1.MsgFundCommunityPool - 2, // 5: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:input_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpend - 4, // 6: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:input_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposal - 6, // 7: cosmos.protocolpool.v1.Msg.ClaimBudget:input_type -> cosmos.protocolpool.v1.MsgClaimBudget - 1, // 8: cosmos.protocolpool.v1.Msg.FundCommunityPool:output_type -> cosmos.protocolpool.v1.MsgFundCommunityPoolResponse - 3, // 9: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:output_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse - 5, // 10: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:output_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse - 7, // 11: cosmos.protocolpool.v1.Msg.ClaimBudget:output_type -> cosmos.protocolpool.v1.MsgClaimBudgetResponse - 8, // [8:12] is the sub-list for method output_type - 4, // [4:8] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 8, // 0: cosmos.protocolpool.v1.MsgFundCommunityPool.amount:type_name -> cosmos.base.v1beta1.Coin + 8, // 1: cosmos.protocolpool.v1.MsgCommunityPoolSpend.amount:type_name -> cosmos.base.v1beta1.Coin + 8, // 2: cosmos.protocolpool.v1.MsgSubmitBudgetProposal.total_budget:type_name -> cosmos.base.v1beta1.Coin + 9, // 3: cosmos.protocolpool.v1.MsgSubmitBudgetProposal.start_time:type_name -> google.protobuf.Timestamp + 10, // 4: cosmos.protocolpool.v1.MsgSubmitBudgetProposal.period:type_name -> google.protobuf.Duration + 8, // 5: cosmos.protocolpool.v1.MsgClaimBudgetResponse.amount:type_name -> cosmos.base.v1beta1.Coin + 0, // 6: cosmos.protocolpool.v1.Msg.FundCommunityPool:input_type -> cosmos.protocolpool.v1.MsgFundCommunityPool + 2, // 7: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:input_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpend + 4, // 8: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:input_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposal + 6, // 9: cosmos.protocolpool.v1.Msg.ClaimBudget:input_type -> cosmos.protocolpool.v1.MsgClaimBudget + 1, // 10: cosmos.protocolpool.v1.Msg.FundCommunityPool:output_type -> cosmos.protocolpool.v1.MsgFundCommunityPoolResponse + 3, // 11: cosmos.protocolpool.v1.Msg.CommunityPoolSpend:output_type -> cosmos.protocolpool.v1.MsgCommunityPoolSpendResponse + 5, // 12: cosmos.protocolpool.v1.Msg.SubmitBudgetProposal:output_type -> cosmos.protocolpool.v1.MsgSubmitBudgetProposalResponse + 7, // 13: cosmos.protocolpool.v1.Msg.ClaimBudget:output_type -> cosmos.protocolpool.v1.MsgClaimBudgetResponse + 10, // [10:14] is the sub-list for method output_type + 6, // [6:10] 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_tx_proto_init() } diff --git a/api/cosmos/protocolpool/v1/types.pulsar.go b/api/cosmos/protocolpool/v1/types.pulsar.go index c680031f9f05..90e099e44c0f 100644 --- a/api/cosmos/protocolpool/v1/types.pulsar.go +++ b/api/cosmos/protocolpool/v1/types.pulsar.go @@ -6,9 +6,12 @@ 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" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" @@ -122,14 +125,14 @@ func (x *fastReflection_Budget) Range(f func(protoreflect.FieldDescriptor, proto return } } - if x.StartTime != uint64(0) { - value := protoreflect.ValueOfUint64(x.StartTime) + if x.StartTime != nil { + value := protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) if !f(fd_Budget_start_time, value) { return } } - if x.NextClaimFrom != uint64(0) { - value := protoreflect.ValueOfUint64(x.NextClaimFrom) + if x.NextClaimFrom != nil { + value := protoreflect.ValueOfMessage(x.NextClaimFrom.ProtoReflect()) if !f(fd_Budget_next_claim_from, value) { return } @@ -146,8 +149,8 @@ func (x *fastReflection_Budget) Range(f func(protoreflect.FieldDescriptor, proto return } } - if x.Period != uint64(0) { - value := protoreflect.ValueOfUint64(x.Period) + if x.Period != nil { + value := protoreflect.ValueOfMessage(x.Period.ProtoReflect()) if !f(fd_Budget_period, value) { return } @@ -174,15 +177,15 @@ func (x *fastReflection_Budget) Has(fd protoreflect.FieldDescriptor) bool { case "cosmos.protocolpool.v1.Budget.claimed_amount": return x.ClaimedAmount != nil case "cosmos.protocolpool.v1.Budget.start_time": - return x.StartTime != uint64(0) + return x.StartTime != nil case "cosmos.protocolpool.v1.Budget.next_claim_from": - return x.NextClaimFrom != uint64(0) + return x.NextClaimFrom != nil case "cosmos.protocolpool.v1.Budget.tranches": return x.Tranches != uint64(0) case "cosmos.protocolpool.v1.Budget.tranches_left": return x.TranchesLeft != uint64(0) case "cosmos.protocolpool.v1.Budget.period": - return x.Period != uint64(0) + return x.Period != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Budget")) @@ -206,15 +209,15 @@ func (x *fastReflection_Budget) Clear(fd protoreflect.FieldDescriptor) { case "cosmos.protocolpool.v1.Budget.claimed_amount": x.ClaimedAmount = nil case "cosmos.protocolpool.v1.Budget.start_time": - x.StartTime = uint64(0) + x.StartTime = nil case "cosmos.protocolpool.v1.Budget.next_claim_from": - x.NextClaimFrom = uint64(0) + x.NextClaimFrom = nil case "cosmos.protocolpool.v1.Budget.tranches": x.Tranches = uint64(0) case "cosmos.protocolpool.v1.Budget.tranches_left": x.TranchesLeft = uint64(0) case "cosmos.protocolpool.v1.Budget.period": - x.Period = uint64(0) + x.Period = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Budget")) @@ -242,10 +245,10 @@ func (x *fastReflection_Budget) Get(descriptor protoreflect.FieldDescriptor) pro return protoreflect.ValueOfMessage(value.ProtoReflect()) case "cosmos.protocolpool.v1.Budget.start_time": value := x.StartTime - return protoreflect.ValueOfUint64(value) + return protoreflect.ValueOfMessage(value.ProtoReflect()) case "cosmos.protocolpool.v1.Budget.next_claim_from": value := x.NextClaimFrom - return protoreflect.ValueOfUint64(value) + return protoreflect.ValueOfMessage(value.ProtoReflect()) case "cosmos.protocolpool.v1.Budget.tranches": value := x.Tranches return protoreflect.ValueOfUint64(value) @@ -254,7 +257,7 @@ func (x *fastReflection_Budget) Get(descriptor protoreflect.FieldDescriptor) pro return protoreflect.ValueOfUint64(value) case "cosmos.protocolpool.v1.Budget.period": value := x.Period - return protoreflect.ValueOfUint64(value) + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.protocolpool.v1.Budget")) @@ -282,15 +285,15 @@ func (x *fastReflection_Budget) Set(fd protoreflect.FieldDescriptor, value proto case "cosmos.protocolpool.v1.Budget.claimed_amount": x.ClaimedAmount = value.Message().Interface().(*v1beta1.Coin) case "cosmos.protocolpool.v1.Budget.start_time": - x.StartTime = value.Uint() + x.StartTime = value.Message().Interface().(*timestamppb.Timestamp) case "cosmos.protocolpool.v1.Budget.next_claim_from": - x.NextClaimFrom = value.Uint() + x.NextClaimFrom = value.Message().Interface().(*timestamppb.Timestamp) case "cosmos.protocolpool.v1.Budget.tranches": x.Tranches = value.Uint() case "cosmos.protocolpool.v1.Budget.tranches_left": x.TranchesLeft = value.Uint() case "cosmos.protocolpool.v1.Budget.period": - x.Period = value.Uint() + 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")) @@ -321,18 +324,27 @@ func (x *fastReflection_Budget) Mutable(fd protoreflect.FieldDescriptor) protore x.ClaimedAmount = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.ClaimedAmount.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.start_time": - panic(fmt.Errorf("field start_time of message cosmos.protocolpool.v1.Budget is not mutable")) + if x.StartTime == nil { + x.StartTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) case "cosmos.protocolpool.v1.Budget.next_claim_from": - panic(fmt.Errorf("field next_claim_from of message cosmos.protocolpool.v1.Budget is not mutable")) + if x.NextClaimFrom == nil { + x.NextClaimFrom = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.NextClaimFrom.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": panic(fmt.Errorf("field tranches 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")) - case "cosmos.protocolpool.v1.Budget.period": - panic(fmt.Errorf("field period 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")) @@ -355,15 +367,18 @@ func (x *fastReflection_Budget) NewField(fd protoreflect.FieldDescriptor) protor m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.protocolpool.v1.Budget.start_time": - return protoreflect.ValueOfUint64(uint64(0)) + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.protocolpool.v1.Budget.next_claim_from": - return protoreflect.ValueOfUint64(uint64(0)) + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.protocolpool.v1.Budget.tranches": return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.Budget.tranches_left": return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.protocolpool.v1.Budget.period": - return protoreflect.ValueOfUint64(uint64(0)) + 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")) @@ -445,11 +460,13 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { l = options.Size(x.ClaimedAmount) n += 1 + l + runtime.Sov(uint64(l)) } - if x.StartTime != 0 { - n += 1 + runtime.Sov(uint64(x.StartTime)) + if x.StartTime != nil { + l = options.Size(x.StartTime) + n += 1 + l + runtime.Sov(uint64(l)) } - if x.NextClaimFrom != 0 { - n += 1 + runtime.Sov(uint64(x.NextClaimFrom)) + if x.NextClaimFrom != nil { + l = options.Size(x.NextClaimFrom) + n += 1 + l + runtime.Sov(uint64(l)) } if x.Tranches != 0 { n += 1 + runtime.Sov(uint64(x.Tranches)) @@ -457,8 +474,9 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { if x.TranchesLeft != 0 { n += 1 + runtime.Sov(uint64(x.TranchesLeft)) } - if x.Period != 0 { - n += 1 + runtime.Sov(uint64(x.Period)) + if x.Period != nil { + l = options.Size(x.Period) + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -489,10 +507,19 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Period != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) + 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] = 0x40 + dAtA[i] = 0x42 } if x.TranchesLeft != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.TranchesLeft)) @@ -504,15 +531,33 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x30 } - if x.NextClaimFrom != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.NextClaimFrom)) + if x.NextClaimFrom != nil { + encoded, err := options.Marshal(x.NextClaimFrom) + 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] = 0x28 + dAtA[i] = 0x2a } - if x.StartTime != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.StartTime)) + 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] = 0x20 + dAtA[i] = 0x22 } if x.ClaimedAmount != nil { encoded, err := options.Marshal(x.ClaimedAmount) @@ -703,10 +748,10 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { } iNdEx = postIndex case 4: - if wireType != 0 { + if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) } - x.StartTime = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -716,16 +761,33 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.StartTime |= uint64(b&0x7F) << shift + 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 { + if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NextClaimFrom", wireType) } - x.NextClaimFrom = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -735,11 +797,28 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.NextClaimFrom |= uint64(b&0x7F) << shift + 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.NextClaimFrom == nil { + x.NextClaimFrom = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.NextClaimFrom); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex case 6: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) @@ -779,10 +858,10 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { } } case 8: - if wireType != 0 { + if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } - x.Period = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -792,11 +871,28 @@ func (x *fastReflection_Budget) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Period |= uint64(b&0x7F) << shift + 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:]) @@ -857,12 +953,11 @@ type Budget struct { TotalBudget *v1beta1.Coin `protobuf:"bytes,2,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` // claimed_amount is the total amount claimed from the total budget amount requested. ClaimedAmount *v1beta1.Coin `protobuf:"bytes,3,opt,name=claimed_amount,json=claimedAmount,proto3" json:"claimed_amount,omitempty"` - // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. - StartTime uint64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - // next_claim_from is the time when the budget was last successfully claimed or distributed, - // represented in seconds since the Unix epoch. It is used to track the next starting claim time for fund - // distribution. If set, it cannot be less than start_time. - NextClaimFrom uint64 `protobuf:"varint,5,opt,name=next_claim_from,json=nextClaimFrom,proto3" json:"next_claim_from,omitempty"` + // start_time is the time when the budget becomes claimable. + StartTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // next_claim_from 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. If set, it cannot be less than start_time. + NextClaimFrom *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=next_claim_from,json=nextClaimFrom,proto3" json:"next_claim_from,omitempty"` // tranches is the number of times the total budget amount is to be distributed. Tranches uint64 `protobuf:"varint,6,opt,name=tranches,proto3" json:"tranches,omitempty"` // tranches_left is the number of tranches left for the amount to be distributed. @@ -870,7 +965,7 @@ type Budget struct { // 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 uint64 `protobuf:"varint,8,opt,name=period,proto3" json:"period,omitempty"` + Period *durationpb.Duration `protobuf:"bytes,8,opt,name=period,proto3" json:"period,omitempty"` } func (x *Budget) Reset() { @@ -914,18 +1009,18 @@ func (x *Budget) GetClaimedAmount() *v1beta1.Coin { return nil } -func (x *Budget) GetStartTime() uint64 { +func (x *Budget) GetStartTime() *timestamppb.Timestamp { if x != nil { return x.StartTime } - return 0 + return nil } -func (x *Budget) GetNextClaimFrom() uint64 { +func (x *Budget) GetNextClaimFrom() *timestamppb.Timestamp { if x != nil { return x.NextClaimFrom } - return 0 + return nil } func (x *Budget) GetTranches() uint64 { @@ -942,11 +1037,11 @@ func (x *Budget) GetTranchesLeft() uint64 { return 0 } -func (x *Budget) GetPeriod() uint64 { +func (x *Budget) GetPeriod() *durationpb.Duration { if x != nil { return x.Period } - return 0 + return nil } var File_cosmos_protocolpool_v1_types_proto protoreflect.FileDescriptor @@ -955,48 +1050,60 @@ 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, 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, 0x22, 0xef, 0x02, 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, 0x3c, 0x0a, 0x0c, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 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, 0x0b, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x40, 0x0a, 0x0e, 0x63, 0x6c, 0x61, 0x69, 0x6d, - 0x65, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 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, 0x0d, 0x63, 0x6c, 0x61, 0x69, - 0x6d, 0x65, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, - 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x46, 0x72, 0x6f, 0x6d, - 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, - 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x65, 0x66, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 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, + 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, 0x22, 0xd4, + 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, 0x3c, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 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, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x40, + 0x0a, 0x0e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 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, 0x0d, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 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, 0x48, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, + 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x74, + 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, + 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x63, + 0x68, 0x65, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, + 0x74, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x65, 0x66, 0x74, 0x12, 0x37, 0x0a, 0x06, + 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x08, 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, 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 ( @@ -1013,17 +1120,22 @@ func file_cosmos_protocolpool_v1_types_proto_rawDescGZIP() []byte { var file_cosmos_protocolpool_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_cosmos_protocolpool_v1_types_proto_goTypes = []interface{}{ - (*Budget)(nil), // 0: cosmos.protocolpool.v1.Budget - (*v1beta1.Coin)(nil), // 1: cosmos.base.v1beta1.Coin + (*Budget)(nil), // 0: cosmos.protocolpool.v1.Budget + (*v1beta1.Coin)(nil), // 1: cosmos.base.v1beta1.Coin + (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 3: google.protobuf.Duration } var file_cosmos_protocolpool_v1_types_proto_depIdxs = []int32{ 1, // 0: cosmos.protocolpool.v1.Budget.total_budget:type_name -> cosmos.base.v1beta1.Coin 1, // 1: cosmos.protocolpool.v1.Budget.claimed_amount:type_name -> cosmos.base.v1beta1.Coin - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 2, // 2: cosmos.protocolpool.v1.Budget.start_time:type_name -> google.protobuf.Timestamp + 2, // 3: cosmos.protocolpool.v1.Budget.next_claim_from:type_name -> google.protobuf.Timestamp + 3, // 4: cosmos.protocolpool.v1.Budget.period:type_name -> google.protobuf.Duration + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_cosmos_protocolpool_v1_types_proto_init() } diff --git a/proto/cosmos/protocolpool/v1/query.proto b/proto/cosmos/protocolpool/v1/query.proto index b09c71e3c64b..9bcfa73170e2 100644 --- a/proto/cosmos/protocolpool/v1/query.proto +++ b/proto/cosmos/protocolpool/v1/query.proto @@ -7,6 +7,8 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos_proto/cosmos.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; // Query defines the gRPC querier service for community pool module. service Query { @@ -15,7 +17,7 @@ service Query { option (google.api.http).get = "/cosmos/protocolpool/v1/community_pool"; } - // UnclaimedBudget queries the remaining budget left to be claimed. + // UnclaimedBudget queries the remaining budget left to be claimed and it gives overall budget allocation view. rpc UnclaimedBudget(QueryUnclaimedBudgetRequest) returns (QueryUnclaimedBudgetResponse) { option (google.api.http).get = "/cosmos/protocolpool/v1/unclaimed_budget/{address}"; } @@ -43,6 +45,17 @@ message QueryUnclaimedBudgetRequest { // QueryUnclaimedBudgetResponse is the response type for the Query/UnclaimedBudget // RPC method. message QueryUnclaimedBudgetResponse { + // total_budget is the total budget allocated to the recipient + cosmos.base.v1beta1.Coin total_budget = 1; + // claimed_amount is the budget amount already claimed by the recipient + cosmos.base.v1beta1.Coin claimed_amount = 2; // unclaimed_amount is the remaining budget amount that is unclaimed by the recipient - cosmos.base.v1beta1.Coin unclaimed_amount = 1; + cosmos.base.v1beta1.Coin unclaimed_amount = 3; + // next_claim_from is the next starting claim time for fund distribution. + // It represents the time when we can claim funds after the period time interval has passed. + google.protobuf.Timestamp next_claim_from = 4 [(gogoproto.stdtime) = true]; + // period is the time interval for fund distribution + google.protobuf.Duration period = 5 [(gogoproto.stdduration) = true]; + // tranches_left is the number of tranches left for the amount to be distributed + uint64 tranches_left = 6; } \ No newline at end of file diff --git a/proto/cosmos/protocolpool/v1/tx.proto b/proto/cosmos/protocolpool/v1/tx.proto index 8a39eab8778d..78da8cdbdc4a 100644 --- a/proto/cosmos/protocolpool/v1/tx.proto +++ b/proto/cosmos/protocolpool/v1/tx.proto @@ -7,6 +7,8 @@ import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/msg/v1/msg.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; // Msg defines the pool Msg service. service Msg { @@ -71,15 +73,15 @@ message MsgSubmitBudgetProposal { string recipient_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // total_budget is the total amount allocated for the budget. cosmos.base.v1beta1.Coin total_budget = 3; - // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. + // start_time is the time when the budget becomes claimable. // If start_time is less than the current block time, proposal will not be accepted. - uint64 start_time = 4; + google.protobuf.Timestamp start_time = 4 [(gogoproto.stdtime) = true]; // tranches is the number of times the total budget amount is to be distributed. uint64 tranches = 5; // 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). - uint64 period = 6; + google.protobuf.Duration period = 6 [(gogoproto.stdduration) = true]; } // MsgSubmitBudgetProposalResponse defines the response to executing a diff --git a/proto/cosmos/protocolpool/v1/types.proto b/proto/cosmos/protocolpool/v1/types.proto index 7229d31b9fbb..d7c98fed7f3f 100644 --- a/proto/cosmos/protocolpool/v1/types.proto +++ b/proto/cosmos/protocolpool/v1/types.proto @@ -3,8 +3,11 @@ package cosmos.protocolpool.v1; option go_package = "cosmossdk.io/x/protocolpool/types"; +import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/base/v1beta1/coin.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; // Budget defines the fields of a budget proposal. message Budget { @@ -14,12 +17,11 @@ message Budget { cosmos.base.v1beta1.Coin total_budget = 2; // claimed_amount is the total amount claimed from the total budget amount requested. cosmos.base.v1beta1.Coin claimed_amount = 3; - // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. - uint64 start_time = 4; - // next_claim_from is the time when the budget was last successfully claimed or distributed, - // represented in seconds since the Unix epoch. It is used to track the next starting claim time for fund - // distribution. If set, it cannot be less than start_time. - uint64 next_claim_from = 5; + // start_time is the time when the budget becomes claimable. + google.protobuf.Timestamp start_time = 4 [(gogoproto.stdtime) = true]; + // next_claim_from 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. If set, it cannot be less than start_time. + google.protobuf.Timestamp next_claim_from = 5 [(gogoproto.stdtime) = true]; // tranches is the number of times the total budget amount is to be distributed. uint64 tranches = 6; // tranches_left is the number of tranches left for the amount to be distributed. @@ -27,5 +29,5 @@ message Budget { // 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). - uint64 period = 8; + google.protobuf.Duration period = 8 [(gogoproto.stdduration) = true]; } \ No newline at end of file diff --git a/x/protocolpool/types/query.pb.go b/x/protocolpool/types/query.pb.go index 4b2de8f916d5..a40d29a2f637 100644 --- a/x/protocolpool/types/query.pb.go +++ b/x/protocolpool/types/query.pb.go @@ -12,19 +12,24 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + _ "google.golang.org/protobuf/types/known/durationpb" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -167,8 +172,19 @@ func (m *QueryUnclaimedBudgetRequest) GetAddress() string { // QueryUnclaimedBudgetResponse is the response type for the Query/UnclaimedBudget // RPC method. type QueryUnclaimedBudgetResponse struct { + // total_budget is the total budget allocated to the recipient + TotalBudget *types.Coin `protobuf:"bytes,1,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` + // claimed_amount is the budget amount already claimed by the recipient + ClaimedAmount *types.Coin `protobuf:"bytes,2,opt,name=claimed_amount,json=claimedAmount,proto3" json:"claimed_amount,omitempty"` // unclaimed_amount is the remaining budget amount that is unclaimed by the recipient - UnclaimedAmount *types.Coin `protobuf:"bytes,1,opt,name=unclaimed_amount,json=unclaimedAmount,proto3" json:"unclaimed_amount,omitempty"` + UnclaimedAmount *types.Coin `protobuf:"bytes,3,opt,name=unclaimed_amount,json=unclaimedAmount,proto3" json:"unclaimed_amount,omitempty"` + // next_claim_from is the next starting claim time for fund distribution. + // It represents the time when we can claim funds after the period time interval has passed. + NextClaimFrom *time.Time `protobuf:"bytes,4,opt,name=next_claim_from,json=nextClaimFrom,proto3,stdtime" json:"next_claim_from,omitempty"` + // period is the time interval for fund distribution + Period *time.Duration `protobuf:"bytes,5,opt,name=period,proto3,stdduration" json:"period,omitempty"` + // tranches_left is the number of tranches left for the amount to be distributed + TranchesLeft uint64 `protobuf:"varint,6,opt,name=tranches_left,json=tranchesLeft,proto3" json:"tranches_left,omitempty"` } func (m *QueryUnclaimedBudgetResponse) Reset() { *m = QueryUnclaimedBudgetResponse{} } @@ -204,6 +220,20 @@ func (m *QueryUnclaimedBudgetResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryUnclaimedBudgetResponse proto.InternalMessageInfo +func (m *QueryUnclaimedBudgetResponse) GetTotalBudget() *types.Coin { + if m != nil { + return m.TotalBudget + } + return nil +} + +func (m *QueryUnclaimedBudgetResponse) GetClaimedAmount() *types.Coin { + if m != nil { + return m.ClaimedAmount + } + return nil +} + func (m *QueryUnclaimedBudgetResponse) GetUnclaimedAmount() *types.Coin { if m != nil { return m.UnclaimedAmount @@ -211,6 +241,27 @@ func (m *QueryUnclaimedBudgetResponse) GetUnclaimedAmount() *types.Coin { return nil } +func (m *QueryUnclaimedBudgetResponse) GetNextClaimFrom() *time.Time { + if m != nil { + return m.NextClaimFrom + } + return nil +} + +func (m *QueryUnclaimedBudgetResponse) GetPeriod() *time.Duration { + if m != nil { + return m.Period + } + return nil +} + +func (m *QueryUnclaimedBudgetResponse) GetTranchesLeft() uint64 { + if m != nil { + return m.TranchesLeft + } + return 0 +} + func init() { proto.RegisterType((*QueryCommunityPoolRequest)(nil), "cosmos.protocolpool.v1.QueryCommunityPoolRequest") proto.RegisterType((*QueryCommunityPoolResponse)(nil), "cosmos.protocolpool.v1.QueryCommunityPoolResponse") @@ -223,37 +274,47 @@ func init() { } var fileDescriptor_51500a0a77d57843 = []byte{ - // 476 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcd, 0x6e, 0xd3, 0x40, - 0x14, 0x85, 0x33, 0xe5, 0x4f, 0x4c, 0x85, 0x8a, 0x46, 0x15, 0x4a, 0xdc, 0xc8, 0x2d, 0x5e, 0xa0, - 0x48, 0xa8, 0x33, 0xb2, 0xd3, 0x15, 0xac, 0x9a, 0xf6, 0x01, 0x68, 0x10, 0x1b, 0x36, 0x91, 0x7f, - 0x46, 0x66, 0x54, 0x7b, 0xae, 0x9b, 0x19, 0x47, 0x44, 0x88, 0x0d, 0xbc, 0x00, 0x12, 0xef, 0xc0, - 0x82, 0x35, 0x0b, 0x1e, 0xa1, 0xcb, 0x0a, 0x36, 0xac, 0x00, 0x25, 0xec, 0x78, 0x09, 0xe4, 0xf1, - 0x18, 0x5a, 0xe4, 0x54, 0xea, 0xca, 0xd6, 0x3d, 0x73, 0xce, 0xfd, 0xee, 0xdc, 0xc1, 0x5e, 0x0c, - 0x2a, 0x07, 0xc5, 0x8a, 0x29, 0x68, 0x88, 0x21, 0x2b, 0x00, 0x32, 0x36, 0xf3, 0xd9, 0x49, 0xc9, - 0xa7, 0x73, 0x6a, 0xaa, 0xe4, 0x5e, 0x7d, 0x86, 0x9e, 0x3f, 0x43, 0x67, 0xbe, 0xb3, 0x99, 0x42, - 0x0a, 0xa6, 0xc8, 0xaa, 0xbf, 0x5a, 0x77, 0xfa, 0x29, 0x40, 0x9a, 0x71, 0x16, 0x16, 0x82, 0x85, - 0x52, 0x82, 0x0e, 0xb5, 0x00, 0x69, 0xdd, 0x8e, 0x6b, 0xfb, 0x45, 0xa1, 0xe2, 0x6c, 0xe6, 0x47, - 0x5c, 0x87, 0x3e, 0x8b, 0x41, 0x48, 0xab, 0xf7, 0x6a, 0x7d, 0x52, 0xc7, 0x9e, 0x6f, 0xec, 0x6d, - 0xe1, 0xde, 0x51, 0x45, 0x75, 0x00, 0x79, 0x5e, 0x4a, 0xa1, 0xe7, 0x4f, 0x00, 0xb2, 0x31, 0x3f, - 0x29, 0xb9, 0xd2, 0xde, 0x5b, 0x84, 0x9d, 0x36, 0x55, 0x15, 0x20, 0x15, 0x27, 0x1c, 0x5f, 0xaf, - 0xa8, 0xbb, 0x68, 0xe7, 0xda, 0x60, 0x3d, 0xe8, 0x53, 0x1b, 0x5c, 0x51, 0x50, 0x4b, 0x41, 0x0f, - 0x79, 0x7c, 0x00, 0x42, 0x8e, 0x86, 0xa7, 0xdf, 0xb7, 0x3b, 0x1f, 0x7f, 0x6c, 0x3f, 0x4c, 0x85, - 0x7e, 0x51, 0x46, 0x34, 0x86, 0xdc, 0x82, 0xd8, 0xcf, 0xae, 0x4a, 0x8e, 0x99, 0x9e, 0x17, 0x5c, - 0x35, 0x1e, 0x35, 0x36, 0xf1, 0xde, 0x11, 0xde, 0x32, 0x10, 0xcf, 0x64, 0x9c, 0x85, 0x22, 0xe7, - 0xc9, 0xa8, 0x4c, 0x52, 0xae, 0x2d, 0x24, 0x09, 0xf0, 0xad, 0x30, 0x49, 0xa6, 0x5c, 0xa9, 0x2e, - 0xda, 0x41, 0x83, 0xdb, 0xa3, 0xee, 0x97, 0x4f, 0xbb, 0x9b, 0x96, 0x65, 0xbf, 0x56, 0x9e, 0xea, - 0xa9, 0x90, 0xe9, 0xb8, 0x39, 0xe8, 0x25, 0xb8, 0xdf, 0x1e, 0x69, 0x27, 0x3b, 0xc4, 0x77, 0xcb, - 0x46, 0x9a, 0x84, 0x39, 0x94, 0x52, 0x9b, 0xf0, 0xf5, 0xa0, 0xd7, 0x3a, 0x65, 0x85, 0x3b, 0xde, - 0xf8, 0x6b, 0xd9, 0x37, 0x8e, 0xe0, 0xf7, 0x1a, 0xbe, 0x61, 0xda, 0x90, 0x0f, 0x08, 0xdf, 0xb9, - 0x70, 0x87, 0xc4, 0xa7, 0xed, 0xfb, 0xa7, 0x2b, 0xb7, 0xe1, 0x04, 0x57, 0xb1, 0xd4, 0x83, 0x78, - 0xf4, 0xcd, 0xd7, 0x5f, 0xef, 0xd7, 0x06, 0xe4, 0x01, 0x5b, 0xf1, 0x24, 0xe3, 0xc6, 0x36, 0xa9, - 0x2a, 0xe4, 0x33, 0xc2, 0x1b, 0xff, 0x5d, 0x0a, 0x19, 0x5e, 0xda, 0xb7, 0x7d, 0x2b, 0xce, 0xde, - 0xd5, 0x4c, 0x16, 0xf7, 0x91, 0xc1, 0xdd, 0x23, 0xc1, 0x2a, 0xdc, 0x7f, 0x5b, 0x89, 0x8c, 0x93, - 0xbd, 0xb2, 0x2b, 0x7d, 0x3d, 0x7a, 0x7c, 0xba, 0x70, 0xd1, 0xd9, 0xc2, 0x45, 0x3f, 0x17, 0x2e, - 0x7a, 0xb7, 0x74, 0x3b, 0x67, 0x4b, 0xb7, 0xf3, 0x6d, 0xe9, 0x76, 0x9e, 0xdf, 0xaf, 0xc3, 0x54, - 0x72, 0x4c, 0x05, 0xb0, 0x97, 0x17, 0x43, 0xcd, 0x93, 0x8b, 0x6e, 0x9a, 0xda, 0xf0, 0x4f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xf3, 0x35, 0xd6, 0x68, 0xba, 0x03, 0x00, 0x00, + // 630 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x3f, 0x4f, 0x14, 0x41, + 0x18, 0xc6, 0x6f, 0xe1, 0xc0, 0x38, 0x70, 0x62, 0x26, 0xc4, 0x2c, 0x0b, 0xd9, 0xc3, 0x33, 0x31, + 0x97, 0x18, 0x66, 0x72, 0x07, 0x89, 0x89, 0x5a, 0xc8, 0x41, 0x8c, 0x85, 0x85, 0x9c, 0xda, 0xd8, + 0x6c, 0xf6, 0xcf, 0xdc, 0xb2, 0x61, 0x77, 0xde, 0x65, 0x67, 0x96, 0x40, 0x8c, 0x8d, 0xb6, 0x16, + 0x24, 0x36, 0x7e, 0x02, 0x0b, 0x6b, 0x0b, 0x3f, 0x02, 0x25, 0xd1, 0xc6, 0x4a, 0x0c, 0xd8, 0xf9, + 0x25, 0xcc, 0xce, 0xce, 0x2a, 0x5c, 0x0e, 0x09, 0xd5, 0xdd, 0xbe, 0xef, 0xfb, 0xfc, 0xe6, 0x79, + 0x33, 0xcf, 0xa0, 0x96, 0x0f, 0x22, 0x01, 0x41, 0xd3, 0x0c, 0x24, 0xf8, 0x10, 0xa7, 0x00, 0x31, + 0xdd, 0xe9, 0xd0, 0xed, 0x9c, 0x65, 0x7b, 0x44, 0x55, 0xf1, 0x8d, 0x72, 0x86, 0x9c, 0x9e, 0x21, + 0x3b, 0x1d, 0x6b, 0x36, 0x84, 0x10, 0x54, 0x91, 0x16, 0xff, 0xca, 0xbe, 0xb5, 0x10, 0x02, 0x84, + 0x31, 0xa3, 0x6e, 0x1a, 0x51, 0x97, 0x73, 0x90, 0xae, 0x8c, 0x80, 0x6b, 0xb5, 0x65, 0xeb, 0xf3, + 0x3c, 0x57, 0x30, 0xba, 0xd3, 0xf1, 0x98, 0x74, 0x3b, 0xd4, 0x87, 0x88, 0xeb, 0xfe, 0x5c, 0xd9, + 0x77, 0x4a, 0xec, 0xe9, 0x83, 0xad, 0xa6, 0x06, 0xab, 0x2f, 0x2f, 0x1f, 0x50, 0x19, 0x25, 0x4c, + 0x48, 0x37, 0x49, 0x2b, 0xf6, 0xf0, 0x40, 0x90, 0x67, 0xea, 0xf0, 0xb2, 0xdf, 0x9a, 0x47, 0x73, + 0x1b, 0xc5, 0x5a, 0x6b, 0x90, 0x24, 0x39, 0x8f, 0xe4, 0xde, 0x53, 0x80, 0xb8, 0xcf, 0xb6, 0x73, + 0x26, 0x64, 0xeb, 0xad, 0x81, 0xac, 0x51, 0x5d, 0x91, 0x02, 0x17, 0x0c, 0x33, 0x54, 0x2f, 0xd6, + 0x36, 0x8d, 0xc5, 0xf1, 0xf6, 0x54, 0x77, 0x81, 0x68, 0x67, 0xc5, 0x1a, 0x44, 0xaf, 0x41, 0xd6, + 0x99, 0xbf, 0x06, 0x11, 0xef, 0x2d, 0x1f, 0xfc, 0x68, 0xd6, 0x3e, 0x1d, 0x35, 0xef, 0x84, 0x91, + 0xdc, 0xcc, 0x3d, 0xe2, 0x43, 0xa2, 0x37, 0xd1, 0x3f, 0x4b, 0x22, 0xd8, 0xa2, 0x72, 0x2f, 0x65, + 0xa2, 0xd2, 0x88, 0xbe, 0xc2, 0xb7, 0x36, 0xd0, 0xbc, 0x32, 0xf1, 0x82, 0xfb, 0xb1, 0x1b, 0x25, + 0x2c, 0xe8, 0xe5, 0x41, 0xc8, 0xa4, 0x36, 0x89, 0xbb, 0xe8, 0x8a, 0x1b, 0x04, 0x19, 0x13, 0xc2, + 0x34, 0x16, 0x8d, 0xf6, 0xd5, 0x9e, 0xf9, 0xf5, 0xf3, 0xd2, 0xac, 0xf6, 0xb2, 0x5a, 0x76, 0x9e, + 0xc9, 0x2c, 0xe2, 0x61, 0xbf, 0x1a, 0x6c, 0xbd, 0x1b, 0x47, 0x0b, 0xa3, 0x99, 0x7a, 0xb5, 0x07, + 0x68, 0x5a, 0x82, 0x74, 0x63, 0xc7, 0x53, 0x75, 0x45, 0x9e, 0xea, 0xce, 0x8d, 0x5c, 0xb1, 0xf0, + 0xda, 0x9f, 0x52, 0xe3, 0x25, 0x05, 0x3f, 0x44, 0xd7, 0x34, 0xd6, 0x71, 0x13, 0xc8, 0xb9, 0x34, + 0xc7, 0x2e, 0xd2, 0x37, 0xb4, 0x60, 0x55, 0xcd, 0xe3, 0x75, 0x74, 0x3d, 0xe7, 0x43, 0x8c, 0xf1, + 0x8b, 0x18, 0x33, 0x7f, 0x25, 0x9a, 0xf2, 0x18, 0xcd, 0x70, 0xb6, 0x2b, 0x1d, 0x55, 0x75, 0x06, + 0x19, 0x24, 0x66, 0x5d, 0x41, 0x2c, 0x52, 0xc6, 0x82, 0x54, 0xb1, 0x20, 0xcf, 0xab, 0xdc, 0xf4, + 0xea, 0xfb, 0x47, 0x4d, 0xa3, 0xdf, 0x28, 0x84, 0x6b, 0x85, 0xee, 0x51, 0x06, 0x09, 0xbe, 0x8b, + 0x26, 0x53, 0x96, 0x45, 0x10, 0x98, 0x13, 0xda, 0xc5, 0x30, 0x60, 0x5d, 0xe7, 0xaa, 0x57, 0xff, + 0x50, 0xe8, 0xf5, 0x38, 0xbe, 0x85, 0x1a, 0x32, 0x73, 0xb9, 0xbf, 0xc9, 0x84, 0x13, 0xb3, 0x81, + 0x34, 0x27, 0x17, 0x8d, 0x76, 0xbd, 0x3f, 0x5d, 0x15, 0x9f, 0xb0, 0x81, 0xec, 0xfe, 0x1e, 0x43, + 0x13, 0xea, 0x3a, 0xf0, 0x47, 0x03, 0x35, 0xce, 0x84, 0x0d, 0x77, 0xc8, 0xe8, 0x97, 0x46, 0xce, + 0x8d, 0xad, 0xd5, 0xbd, 0x8c, 0xa4, 0xbc, 0xf0, 0x16, 0x79, 0xf3, 0xed, 0xd7, 0xfb, 0xb1, 0x36, + 0xbe, 0x4d, 0xcf, 0x79, 0xfc, 0x7e, 0x25, 0x73, 0x8a, 0x0a, 0xfe, 0x62, 0xa0, 0x99, 0xa1, 0xf0, + 0xe0, 0xe5, 0xff, 0x9e, 0x3b, 0x3a, 0xbe, 0xd6, 0xca, 0xe5, 0x44, 0xda, 0xee, 0x3d, 0x65, 0x77, + 0x05, 0x77, 0xcf, 0xb3, 0xfb, 0x2f, 0x3d, 0x65, 0x82, 0xe9, 0x2b, 0x9d, 0xfd, 0xd7, 0xbd, 0xfb, + 0x07, 0xc7, 0xb6, 0x71, 0x78, 0x6c, 0x1b, 0x3f, 0x8f, 0x6d, 0x63, 0xff, 0xc4, 0xae, 0x1d, 0x9e, + 0xd8, 0xb5, 0xef, 0x27, 0x76, 0xed, 0xe5, 0xcd, 0x12, 0x26, 0x82, 0x2d, 0x12, 0x01, 0xdd, 0x3d, + 0x0b, 0x55, 0x6f, 0xd3, 0x9b, 0x54, 0xb5, 0xe5, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xe5, + 0xc6, 0x53, 0x24, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -270,7 +331,7 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // CommunityPool queries the community pool coins. CommunityPool(ctx context.Context, in *QueryCommunityPoolRequest, opts ...grpc.CallOption) (*QueryCommunityPoolResponse, error) - // UnclaimedBudget queries the remaining budget left to be claimed. + // UnclaimedBudget queries the remaining budget left to be claimed and it gives overall budget allocation view. UnclaimedBudget(ctx context.Context, in *QueryUnclaimedBudgetRequest, opts ...grpc.CallOption) (*QueryUnclaimedBudgetResponse, error) } @@ -304,7 +365,7 @@ func (c *queryClient) UnclaimedBudget(ctx context.Context, in *QueryUnclaimedBud type QueryServer interface { // CommunityPool queries the community pool coins. CommunityPool(context.Context, *QueryCommunityPoolRequest) (*QueryCommunityPoolResponse, error) - // UnclaimedBudget queries the remaining budget left to be claimed. + // UnclaimedBudget queries the remaining budget left to be claimed and it gives overall budget allocation view. UnclaimedBudget(context.Context, *QueryUnclaimedBudgetRequest) (*QueryUnclaimedBudgetResponse, error) } @@ -486,6 +547,31 @@ func (m *QueryUnclaimedBudgetResponse) MarshalToSizedBuffer(dAtA []byte) (int, e _ = i var l int _ = l + if m.TranchesLeft != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TranchesLeft)) + i-- + dAtA[i] = 0x30 + } + if m.Period != nil { + n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.Period, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.Period):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintQuery(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x2a + } + if m.NextClaimFrom != nil { + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.NextClaimFrom, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.NextClaimFrom):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintQuery(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x22 + } if m.UnclaimedAmount != nil { { size, err := m.UnclaimedAmount.MarshalToSizedBuffer(dAtA[:i]) @@ -496,6 +582,30 @@ func (m *QueryUnclaimedBudgetResponse) MarshalToSizedBuffer(dAtA []byte) (int, e i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x1a + } + if m.ClaimedAmount != nil { + { + size, err := m.ClaimedAmount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.TotalBudget != nil { + { + size, err := m.TotalBudget.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -555,10 +665,29 @@ func (m *QueryUnclaimedBudgetResponse) Size() (n int) { } var l int _ = l + if m.TotalBudget != nil { + l = m.TotalBudget.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.ClaimedAmount != nil { + l = m.ClaimedAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + } if m.UnclaimedAmount != nil { l = m.UnclaimedAmount.Size() n += 1 + l + sovQuery(uint64(l)) } + if m.NextClaimFrom != nil { + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.NextClaimFrom) + n += 1 + l + sovQuery(uint64(l)) + } + if m.Period != nil { + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.Period) + n += 1 + l + sovQuery(uint64(l)) + } + if m.TranchesLeft != 0 { + n += 1 + sovQuery(uint64(m.TranchesLeft)) + } return n } @@ -814,6 +943,78 @@ func (m *QueryUnclaimedBudgetResponse) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalBudget", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TotalBudget == nil { + m.TotalBudget = &types.Coin{} + } + if err := m.TotalBudget.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimedAmount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ClaimedAmount == nil { + m.ClaimedAmount = &types.Coin{} + } + if err := m.ClaimedAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UnclaimedAmount", wireType) } @@ -849,6 +1050,97 @@ func (m *QueryUnclaimedBudgetResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextClaimFrom", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NextClaimFrom == nil { + m.NextClaimFrom = new(time.Time) + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.NextClaimFrom, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Period == nil { + m.Period = new(time.Duration) + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(m.Period, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TranchesLeft", wireType) + } + m.TranchesLeft = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TranchesLeft |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/x/protocolpool/types/tx.pb.go b/x/protocolpool/types/tx.pb.go index 2ba0fcd7409d..6359f599cd0a 100644 --- a/x/protocolpool/types/tx.pb.go +++ b/x/protocolpool/types/tx.pb.go @@ -13,18 +13,23 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + _ "google.golang.org/protobuf/types/known/durationpb" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -219,15 +224,15 @@ type MsgSubmitBudgetProposal struct { RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` // total_budget is the total amount allocated for the budget. TotalBudget *types.Coin `protobuf:"bytes,3,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` - // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. + // start_time is the time when the budget becomes claimable. // If start_time is less than the current block time, proposal will not be accepted. - StartTime uint64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + StartTime *time.Time `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time,omitempty"` // tranches is the number of times the total 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 uint64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"` + Period *time.Duration `protobuf:"bytes,6,opt,name=period,proto3,stdduration" json:"period,omitempty"` } func (m *MsgSubmitBudgetProposal) Reset() { *m = MsgSubmitBudgetProposal{} } @@ -284,11 +289,11 @@ func (m *MsgSubmitBudgetProposal) GetTotalBudget() *types.Coin { return nil } -func (m *MsgSubmitBudgetProposal) GetStartTime() uint64 { +func (m *MsgSubmitBudgetProposal) GetStartTime() *time.Time { if m != nil { return m.StartTime } - return 0 + return nil } func (m *MsgSubmitBudgetProposal) GetTranches() uint64 { @@ -298,11 +303,11 @@ func (m *MsgSubmitBudgetProposal) GetTranches() uint64 { return 0 } -func (m *MsgSubmitBudgetProposal) GetPeriod() uint64 { +func (m *MsgSubmitBudgetProposal) GetPeriod() *time.Duration { if m != nil { return m.Period } - return 0 + return nil } // MsgSubmitBudgetProposalResponse defines the response to executing a @@ -448,49 +453,53 @@ func init() { func init() { proto.RegisterFile("cosmos/protocolpool/v1/tx.proto", fileDescriptor_09efe14517e7f6dc) } var fileDescriptor_09efe14517e7f6dc = []byte{ - // 661 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xce, 0x35, 0x6d, 0x44, 0xae, 0xa8, 0xa2, 0x56, 0x48, 0x5d, 0xab, 0xb5, 0xd3, 0x0c, 0x28, - 0xaa, 0xa8, 0x4d, 0xca, 0x2f, 0xa9, 0xb0, 0x90, 0x0a, 0xb6, 0x48, 0x55, 0xca, 0xc4, 0x12, 0x39, - 0xf6, 0xc9, 0x3d, 0x35, 0xf6, 0xb3, 0x7c, 0xe7, 0xd2, 0x22, 0x21, 0x55, 0x4c, 0x8c, 0xfc, 0x09, - 0x9d, 0x99, 0x3a, 0xb0, 0xf0, 0x1f, 0x54, 0x62, 0xa9, 0x98, 0x98, 0x00, 0x25, 0x43, 0x91, 0xf8, - 0x27, 0x90, 0xed, 0xab, 0x93, 0x28, 0x26, 0x25, 0x48, 0x9d, 0x92, 0x7b, 0xef, 0x7b, 0xdf, 0xfb, - 0xde, 0x97, 0x7b, 0x17, 0xac, 0x59, 0xc0, 0x5c, 0x60, 0x86, 0x1f, 0x00, 0x07, 0x0b, 0xba, 0x3e, - 0x40, 0xd7, 0x38, 0xa8, 0x1b, 0xfc, 0x50, 0x8f, 0x43, 0x52, 0x39, 0x01, 0xe8, 0xc3, 0x00, 0xfd, - 0xa0, 0xae, 0x94, 0x1c, 0x70, 0x20, 0x0e, 0x1a, 0xd1, 0xb7, 0x24, 0xaf, 0xa8, 0x82, 0xae, 0x63, - 0x32, 0x62, 0x1c, 0xd4, 0x3b, 0x84, 0x9b, 0x75, 0xc3, 0x02, 0xea, 0x89, 0xfc, 0x72, 0x92, 0x6f, - 0x27, 0x85, 0xc3, 0xd4, 0xca, 0x92, 0x28, 0x75, 0x99, 0x13, 0x09, 0x70, 0x99, 0x93, 0x24, 0xaa, - 0x5f, 0x10, 0x2e, 0x35, 0x99, 0xf3, 0x22, 0xf4, 0xec, 0x6d, 0x70, 0xdd, 0xd0, 0xa3, 0xfc, 0x68, - 0x07, 0xa0, 0x2b, 0x59, 0xb8, 0x60, 0xba, 0x10, 0x7a, 0x5c, 0x46, 0x95, 0x7c, 0x6d, 0x7e, 0x73, - 0x59, 0x17, 0x84, 0x51, 0x77, 0x5d, 0x74, 0xd7, 0xb7, 0x81, 0x7a, 0x8d, 0x7b, 0x67, 0xdf, 0xb5, - 0xdc, 0xc7, 0x1f, 0x5a, 0xcd, 0xa1, 0x7c, 0x2f, 0xec, 0xe8, 0x16, 0xb8, 0xa2, 0xbb, 0xf8, 0xd8, - 0x60, 0xf6, 0xbe, 0xc1, 0x8f, 0x7c, 0xc2, 0xe2, 0x02, 0xd6, 0x12, 0xd4, 0xd2, 0x23, 0x5c, 0xb4, - 0x89, 0x0f, 0x8c, 0x72, 0x08, 0xe4, 0x99, 0x0a, 0xaa, 0x15, 0x1b, 0xf2, 0xd7, 0x4f, 0x1b, 0x25, - 0xd1, 0xea, 0x99, 0x6d, 0x07, 0x84, 0xb1, 0x5d, 0x1e, 0x50, 0xcf, 0x69, 0x0d, 0xa0, 0x5b, 0xe5, - 0xf7, 0x27, 0x5a, 0xee, 0xd7, 0x89, 0x96, 0x7b, 0x77, 0x71, 0xba, 0x3e, 0x88, 0x57, 0x55, 0xbc, - 0x92, 0x35, 0x4c, 0x8b, 0x30, 0x1f, 0x3c, 0x46, 0xaa, 0x3d, 0x84, 0x6f, 0x37, 0x99, 0x33, 0x92, - 0xdc, 0xf5, 0x89, 0x67, 0x47, 0x4a, 0xcc, 0x90, 0xef, 0x41, 0x40, 0xf9, 0x91, 0x8c, 0xae, 0x52, - 0x92, 0x42, 0xa5, 0x15, 0x5c, 0x0c, 0x88, 0x45, 0x7d, 0x4a, 0x3c, 0x9e, 0x4c, 0xd0, 0x1a, 0x04, - 0x86, 0x4c, 0xcc, 0x5f, 0x9b, 0x89, 0x5b, 0x0b, 0xb1, 0x09, 0xa9, 0xa4, 0xaa, 0x86, 0x57, 0x33, - 0x67, 0x4c, 0x5d, 0xf8, 0x3c, 0x83, 0x97, 0x9a, 0xcc, 0xd9, 0x0d, 0x3b, 0x2e, 0xe5, 0x8d, 0xd0, - 0x76, 0x08, 0xdf, 0x09, 0xc0, 0x07, 0x66, 0x76, 0xff, 0xdb, 0x87, 0xe7, 0x78, 0x31, 0x1d, 0xbb, - 0x6d, 0x26, 0xa8, 0x2b, 0x7f, 0xd1, 0x5b, 0x69, 0x89, 0x88, 0x4b, 0x4f, 0xf1, 0x4d, 0x0e, 0xdc, - 0xec, 0xb6, 0x3b, 0xb1, 0x2c, 0x39, 0x5f, 0x41, 0x13, 0x6d, 0x6b, 0xcd, 0xc7, 0xf0, 0x64, 0x08, - 0x69, 0x15, 0x63, 0xc6, 0xcd, 0x80, 0xb7, 0x39, 0x75, 0x89, 0x3c, 0x5b, 0x41, 0xb5, 0xd9, 0x56, - 0x31, 0x8e, 0xbc, 0xa4, 0x2e, 0x91, 0x14, 0x7c, 0x83, 0x07, 0xa6, 0x67, 0xed, 0x11, 0x26, 0xcf, - 0xc5, 0xc9, 0xf4, 0x2c, 0x95, 0x71, 0xc1, 0x27, 0x01, 0x05, 0x5b, 0x2e, 0xc4, 0x19, 0x71, 0x1a, - 0x33, 0x77, 0x0d, 0x6b, 0x7f, 0xb1, 0x2e, 0xb5, 0x17, 0xf0, 0x42, 0xe4, 0x7f, 0xd7, 0xa4, 0xae, - 0xd0, 0x95, 0x69, 0x0e, 0x9a, 0xd6, 0x9c, 0xad, 0x72, 0xa4, 0x65, 0x9c, 0xa9, 0xfa, 0x16, 0x97, - 0x47, 0x1b, 0x5e, 0x4a, 0x19, 0x59, 0x62, 0x74, 0x4d, 0xf7, 0x6f, 0xf3, 0x77, 0x1e, 0xe7, 0x9b, - 0xcc, 0x91, 0x5e, 0xe3, 0xc5, 0xf1, 0x67, 0xe4, 0xae, 0x9e, 0xfd, 0xc4, 0xe9, 0x59, 0x7b, 0xaa, - 0x3c, 0x98, 0x06, 0x9d, 0x4e, 0xf9, 0x06, 0x4b, 0x19, 0x1b, 0xbd, 0x31, 0x81, 0x6b, 0x1c, 0xae, - 0x3c, 0x9c, 0x0a, 0x9e, 0xf6, 0x3e, 0x46, 0xb8, 0x94, 0xb9, 0x48, 0xc6, 0x04, 0xbe, 0xac, 0x02, - 0xe5, 0xf1, 0x94, 0x05, 0xa9, 0x04, 0x82, 0xe7, 0x87, 0x2f, 0xdb, 0x9d, 0x49, 0x83, 0x0c, 0x70, - 0x8a, 0xfe, 0x6f, 0xb8, 0xcb, 0x36, 0xca, 0xdc, 0xf1, 0xc5, 0xe9, 0x3a, 0x6a, 0x3c, 0x39, 0xeb, - 0xa9, 0xe8, 0xbc, 0xa7, 0xa2, 0x9f, 0x3d, 0x15, 0x7d, 0xe8, 0xab, 0xb9, 0xf3, 0xbe, 0x9a, 0xfb, - 0xd6, 0x57, 0x73, 0xaf, 0xd6, 0x12, 0x3e, 0x66, 0xef, 0xeb, 0x14, 0x8c, 0xc3, 0xd1, 0x7f, 0xbd, - 0xf8, 0xe2, 0x74, 0x0a, 0x71, 0xec, 0xfe, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x9a, 0x22, - 0xf8, 0x19, 0x07, 0x00, 0x00, + // 721 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcf, 0x4f, 0xdb, 0x48, + 0x14, 0xce, 0x90, 0x10, 0x6d, 0x86, 0x15, 0x5a, 0xac, 0x6c, 0x30, 0x16, 0x6b, 0x87, 0x1c, 0x56, + 0x11, 0x5a, 0xec, 0x0d, 0xfb, 0x03, 0x89, 0x56, 0xaa, 0x1a, 0xda, 0xde, 0x22, 0xa1, 0xd0, 0x53, + 0x2f, 0x91, 0x13, 0x4f, 0xcd, 0x88, 0xd8, 0xcf, 0xf2, 0x8c, 0x29, 0x54, 0xaa, 0x84, 0x7a, 0xea, + 0x91, 0x63, 0x8f, 0x9c, 0x7b, 0xe2, 0xd0, 0x3f, 0x02, 0xa9, 0x17, 0xd4, 0x53, 0x4f, 0xa5, 0x0a, + 0x07, 0x2a, 0xf5, 0x5f, 0xe8, 0xa1, 0xb2, 0x3d, 0x71, 0x12, 0xe2, 0x86, 0xa6, 0x12, 0xa7, 0x24, + 0xef, 0x7d, 0xef, 0x7b, 0xdf, 0xfb, 0x66, 0xde, 0x04, 0x6b, 0x1d, 0x60, 0x0e, 0x30, 0xc3, 0xf3, + 0x81, 0x43, 0x07, 0xba, 0x1e, 0x40, 0xd7, 0xd8, 0xaf, 0x19, 0xfc, 0x40, 0x8f, 0x42, 0x52, 0x29, + 0x06, 0xe8, 0xc3, 0x00, 0x7d, 0xbf, 0xa6, 0x14, 0x6d, 0xb0, 0x21, 0x0a, 0x1a, 0xe1, 0xb7, 0x38, + 0xaf, 0xa8, 0x82, 0xae, 0x6d, 0x32, 0x62, 0xec, 0xd7, 0xda, 0x84, 0x9b, 0x35, 0xa3, 0x03, 0xd4, + 0x15, 0xf9, 0xa5, 0x38, 0xdf, 0x8a, 0x0b, 0x87, 0xa9, 0x95, 0x45, 0x51, 0xea, 0x30, 0x3b, 0x14, + 0xe0, 0x30, 0x5b, 0x24, 0x34, 0x1b, 0xc0, 0xee, 0x92, 0x58, 0x62, 0x3b, 0x78, 0x6a, 0x70, 0xea, + 0x10, 0xc6, 0x4d, 0xc7, 0xeb, 0x37, 0xbd, 0x0e, 0xb0, 0x02, 0xdf, 0xe4, 0x14, 0x44, 0xd3, 0xca, + 0x3b, 0x84, 0x8b, 0x0d, 0x66, 0x3f, 0x0a, 0x5c, 0x6b, 0x0b, 0x1c, 0x27, 0x70, 0x29, 0x3f, 0xdc, + 0x06, 0xe8, 0x4a, 0x1d, 0x9c, 0x37, 0x1d, 0x08, 0x5c, 0x2e, 0xa3, 0x72, 0xb6, 0x3a, 0xb7, 0xbe, + 0xa4, 0x0b, 0x45, 0xa1, 0x7c, 0x5d, 0xc8, 0xd7, 0xb7, 0x80, 0xba, 0xf5, 0xbf, 0xcf, 0x3e, 0x6a, + 0x99, 0x37, 0x17, 0x5a, 0xd5, 0xa6, 0x7c, 0x37, 0x68, 0xeb, 0x1d, 0x70, 0x84, 0x7c, 0xf1, 0xb1, + 0xc6, 0xac, 0x3d, 0x83, 0x1f, 0x7a, 0x84, 0x45, 0x05, 0xac, 0x29, 0xa8, 0xa5, 0xff, 0x71, 0xc1, + 0x22, 0x1e, 0x30, 0xca, 0xc1, 0x97, 0x67, 0xca, 0xa8, 0x5a, 0xa8, 0xcb, 0xef, 0xdf, 0xae, 0x15, + 0x45, 0xab, 0xfb, 0x96, 0xe5, 0x13, 0xc6, 0x76, 0xb8, 0x4f, 0x5d, 0xbb, 0x39, 0x80, 0x6e, 0x96, + 0x5e, 0x9d, 0x68, 0x99, 0xcf, 0x27, 0x5a, 0xe6, 0xe5, 0xd5, 0xe9, 0xea, 0x20, 0x5e, 0x51, 0xf1, + 0x72, 0xda, 0x30, 0x4d, 0xc2, 0x3c, 0x70, 0x19, 0xa9, 0xf4, 0x10, 0xfe, 0xbd, 0xc1, 0xec, 0x91, + 0xe4, 0x8e, 0x47, 0x5c, 0x2b, 0x54, 0x62, 0x06, 0x7c, 0x17, 0x7c, 0xca, 0x0f, 0x65, 0x74, 0x93, + 0x92, 0x04, 0x2a, 0x2d, 0xe3, 0x82, 0x4f, 0x3a, 0xd4, 0xa3, 0xc4, 0xe5, 0xf1, 0x04, 0xcd, 0x41, + 0x60, 0xc8, 0xc4, 0xec, 0xad, 0x99, 0xb8, 0x39, 0x1f, 0x99, 0x90, 0x48, 0xaa, 0x68, 0xf8, 0x8f, + 0xd4, 0x19, 0x13, 0x17, 0xbe, 0xce, 0xe0, 0xc5, 0x06, 0xb3, 0x77, 0x82, 0xb6, 0x43, 0x79, 0x3d, + 0xb0, 0x6c, 0xc2, 0xb7, 0x7d, 0xf0, 0x80, 0x99, 0xdd, 0x9f, 0xf6, 0xe1, 0x21, 0x5e, 0x48, 0xc6, + 0x6e, 0x99, 0x31, 0xea, 0xc6, 0x13, 0xfd, 0x2d, 0x29, 0x11, 0x71, 0xe9, 0x2e, 0xfe, 0x95, 0x03, + 0x37, 0xbb, 0xad, 0x76, 0x24, 0x4b, 0xce, 0x96, 0xd1, 0x44, 0xdb, 0x9a, 0x73, 0x11, 0x3c, 0x1e, + 0x42, 0xba, 0x87, 0x31, 0xe3, 0xa6, 0xcf, 0x5b, 0xe1, 0x16, 0xc8, 0xb9, 0xa8, 0x56, 0xd1, 0xe3, + 0x0d, 0xd0, 0xfb, 0x1b, 0xa0, 0x3f, 0xee, 0xaf, 0x48, 0x3d, 0x77, 0x7c, 0xa1, 0xa1, 0x66, 0x21, + 0xaa, 0x09, 0xa3, 0x92, 0x82, 0x7f, 0xe1, 0xbe, 0xe9, 0x76, 0x76, 0x09, 0x93, 0x67, 0xcb, 0xa8, + 0x9a, 0x6b, 0x26, 0xbf, 0xa5, 0x0d, 0x9c, 0xf7, 0x88, 0x4f, 0xc1, 0x92, 0xf3, 0x42, 0xd4, 0x75, + 0xe2, 0x07, 0x62, 0xb5, 0xea, 0xb9, 0xd7, 0x21, 0xaf, 0x80, 0x8f, 0x9d, 0xcf, 0x0a, 0xd6, 0xbe, + 0xe3, 0x7e, 0x72, 0x42, 0x80, 0xe7, 0xc3, 0x23, 0xec, 0x9a, 0xd4, 0x11, 0xa3, 0xa5, 0xfa, 0x8b, + 0xa6, 0xf5, 0x77, 0xb3, 0x14, 0x6a, 0x19, 0x67, 0xaa, 0xbc, 0xc0, 0xa5, 0xd1, 0x86, 0x7d, 0x29, + 0x23, 0xef, 0x00, 0xba, 0xa5, 0x2b, 0xbc, 0xfe, 0x25, 0x8b, 0xb3, 0x0d, 0x66, 0x4b, 0xcf, 0xf0, + 0xc2, 0xf8, 0x4b, 0xf4, 0x97, 0x9e, 0xfe, 0xcc, 0xea, 0x69, 0xab, 0xae, 0xfc, 0x3b, 0x0d, 0x3a, + 0x99, 0xf2, 0x39, 0x96, 0x52, 0x1e, 0x85, 0xb5, 0x09, 0x5c, 0xe3, 0x70, 0xe5, 0xbf, 0xa9, 0xe0, + 0x49, 0xef, 0x23, 0x84, 0x8b, 0xa9, 0xbb, 0x68, 0x4c, 0xe0, 0x4b, 0x2b, 0x50, 0x36, 0xa6, 0x2c, + 0x48, 0x24, 0x10, 0x3c, 0x37, 0x7c, 0xd9, 0xfe, 0x9c, 0x34, 0xc8, 0x00, 0xa7, 0xe8, 0x3f, 0x86, + 0xeb, 0xb7, 0x51, 0x66, 0x8f, 0xae, 0x4e, 0x57, 0x51, 0xfd, 0xce, 0x59, 0x4f, 0x45, 0xe7, 0x3d, + 0x15, 0x7d, 0xea, 0xa9, 0xe8, 0xf8, 0x52, 0xcd, 0x9c, 0x5f, 0xaa, 0x99, 0x0f, 0x97, 0x6a, 0xe6, + 0xc9, 0x4a, 0xcc, 0xc7, 0xac, 0x3d, 0x9d, 0x82, 0x71, 0x30, 0xfa, 0xcf, 0x1b, 0x5d, 0x9c, 0x76, + 0x3e, 0x8a, 0xfd, 0xf3, 0x2d, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x57, 0x45, 0x9e, 0x9d, 0x07, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -858,20 +867,30 @@ func (m *MsgSubmitBudgetProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if m.Period != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Period)) + if m.Period != nil { + n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.Period, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.Period):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintTx(dAtA, i, uint64(n1)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x32 } if m.Tranches != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Tranches)) i-- dAtA[i] = 0x28 } - if m.StartTime != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.StartTime)) + if m.StartTime != nil { + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.StartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.StartTime):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintTx(dAtA, i, uint64(n2)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x22 } if m.TotalBudget != nil { { @@ -1077,14 +1096,16 @@ func (m *MsgSubmitBudgetProposal) Size() (n int) { l = m.TotalBudget.Size() n += 1 + l + sovTx(uint64(l)) } - if m.StartTime != 0 { - n += 1 + sovTx(uint64(m.StartTime)) + if m.StartTime != nil { + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.StartTime) + n += 1 + l + sovTx(uint64(l)) } if m.Tranches != 0 { n += 1 + sovTx(uint64(m.Tranches)) } - if m.Period != 0 { - n += 1 + sovTx(uint64(m.Period)) + if m.Period != nil { + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.Period) + n += 1 + l + sovTx(uint64(l)) } return n } @@ -1622,10 +1643,10 @@ func (m *MsgSubmitBudgetProposal) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 4: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) } - m.StartTime = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1635,11 +1656,28 @@ func (m *MsgSubmitBudgetProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.StartTime |= uint64(b&0x7F) << shift + 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 m.StartTime == nil { + m.StartTime = new(time.Time) + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) @@ -1660,10 +1698,10 @@ func (m *MsgSubmitBudgetProposal) Unmarshal(dAtA []byte) error { } } case 6: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } - m.Period = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1673,11 +1711,28 @@ func (m *MsgSubmitBudgetProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Period |= uint64(b&0x7F) << shift + 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 m.Period == nil { + m.Period = new(time.Duration) + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(m.Period, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/protocolpool/types/types.pb.go b/x/protocolpool/types/types.pb.go index 3d4bada9451c..ce3bf504aa9a 100644 --- a/x/protocolpool/types/types.pb.go +++ b/x/protocolpool/types/types.pb.go @@ -7,16 +7,22 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/durationpb" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -32,12 +38,11 @@ type Budget struct { TotalBudget *types.Coin `protobuf:"bytes,2,opt,name=total_budget,json=totalBudget,proto3" json:"total_budget,omitempty"` // claimed_amount is the total amount claimed from the total budget amount requested. ClaimedAmount *types.Coin `protobuf:"bytes,3,opt,name=claimed_amount,json=claimedAmount,proto3" json:"claimed_amount,omitempty"` - // start_time is the time when the budget becomes claimable, represented in seconds since the Unix epoch. - StartTime uint64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - // next_claim_from is the time when the budget was last successfully claimed or distributed, - // represented in seconds since the Unix epoch. It is used to track the next starting claim time for fund - // distribution. If set, it cannot be less than start_time. - NextClaimFrom uint64 `protobuf:"varint,5,opt,name=next_claim_from,json=nextClaimFrom,proto3" json:"next_claim_from,omitempty"` + // start_time is the time when the budget becomes claimable. + StartTime *time.Time `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time,omitempty"` + // next_claim_from 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. If set, it cannot be less than start_time. + NextClaimFrom *time.Time `protobuf:"bytes,5,opt,name=next_claim_from,json=nextClaimFrom,proto3,stdtime" json:"next_claim_from,omitempty"` // tranches is the number of times the total budget amount is to be distributed. Tranches uint64 `protobuf:"varint,6,opt,name=tranches,proto3" json:"tranches,omitempty"` // tranches_left is the number of tranches left for the amount to be distributed. @@ -45,7 +50,7 @@ type Budget struct { // 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 uint64 `protobuf:"varint,8,opt,name=period,proto3" json:"period,omitempty"` + Period *time.Duration `protobuf:"bytes,8,opt,name=period,proto3,stdduration" json:"period,omitempty"` } func (m *Budget) Reset() { *m = Budget{} } @@ -102,18 +107,18 @@ func (m *Budget) GetClaimedAmount() *types.Coin { return nil } -func (m *Budget) GetStartTime() uint64 { +func (m *Budget) GetStartTime() *time.Time { if m != nil { return m.StartTime } - return 0 + return nil } -func (m *Budget) GetNextClaimFrom() uint64 { +func (m *Budget) GetNextClaimFrom() *time.Time { if m != nil { return m.NextClaimFrom } - return 0 + return nil } func (m *Budget) GetTranches() uint64 { @@ -130,11 +135,11 @@ func (m *Budget) GetTranchesLeft() uint64 { return 0 } -func (m *Budget) GetPeriod() uint64 { +func (m *Budget) GetPeriod() *time.Duration { if m != nil { return m.Period } - return 0 + return nil } func init() { @@ -146,31 +151,35 @@ func init() { } var fileDescriptor_c1b7d0ea246d7f44 = []byte{ - // 377 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcf, 0x6e, 0xda, 0x40, - 0x10, 0x87, 0x31, 0xa5, 0x2e, 0x2c, 0xd0, 0x3f, 0xab, 0x0a, 0x2d, 0x48, 0xb5, 0x28, 0x95, 0x2a, - 0x2e, 0xb5, 0xe5, 0xf6, 0xd8, 0x1e, 0x0a, 0x28, 0x39, 0xe5, 0x44, 0x72, 0xca, 0x65, 0xb5, 0xb6, - 0x17, 0xb2, 0x8a, 0xed, 0xb5, 0x76, 0x07, 0x44, 0xde, 0x22, 0x0f, 0x93, 0x87, 0xc8, 0x11, 0xe5, - 0x94, 0x63, 0x04, 0x0f, 0x90, 0x57, 0x88, 0x58, 0x2f, 0x88, 0x9c, 0x72, 0xdb, 0xf9, 0xe6, 0xfb, - 0x8d, 0x66, 0xa5, 0x41, 0x83, 0x58, 0xea, 0x4c, 0xea, 0xa0, 0x50, 0x12, 0x64, 0x2c, 0xd3, 0x42, - 0xca, 0x34, 0x58, 0x86, 0x01, 0xdc, 0x14, 0x5c, 0xfb, 0x86, 0xe2, 0x4e, 0xe9, 0xf8, 0xc7, 0x8e, - 0xbf, 0x0c, 0x7b, 0xdd, 0x92, 0x53, 0xc3, 0x83, 0x63, 0xa9, 0xe7, 0xd9, 0xb1, 0x11, 0xd3, 0x3c, - 0x58, 0x86, 0x11, 0x07, 0x16, 0x06, 0xb1, 0x14, 0x79, 0xd9, 0x1f, 0x3c, 0x57, 0x91, 0x3b, 0x5e, - 0x24, 0x73, 0x0e, 0xf8, 0x04, 0x7d, 0x51, 0x3c, 0x16, 0x85, 0xe0, 0x39, 0x50, 0x96, 0x24, 0x8a, - 0x6b, 0x4d, 0x9c, 0xbe, 0x33, 0x6c, 0x8c, 0xc9, 0xc3, 0xdd, 0xaf, 0xaf, 0x76, 0xee, 0xa8, 0xec, - 0x9c, 0x83, 0x12, 0xf9, 0x7c, 0xfa, 0xf9, 0x10, 0xb1, 0x1c, 0xff, 0x43, 0x2d, 0x90, 0xc0, 0x52, - 0x1a, 0x99, 0xb1, 0xa4, 0xda, 0x77, 0x86, 0xcd, 0xdf, 0x5d, 0xdf, 0xc6, 0x77, 0x8b, 0xf8, 0x76, - 0x11, 0x7f, 0x22, 0x45, 0x3e, 0x6d, 0x1a, 0xdd, 0x2e, 0xf1, 0x1f, 0x7d, 0x8c, 0x53, 0x26, 0x32, - 0x9e, 0x50, 0x96, 0xc9, 0x45, 0x0e, 0xe4, 0xdd, 0x5b, 0xf9, 0xb6, 0x0d, 0x8c, 0x8c, 0x8f, 0xbf, - 0x21, 0xa4, 0x81, 0x29, 0xa0, 0x20, 0x32, 0x4e, 0x6a, 0x7d, 0x67, 0x58, 0x9b, 0x36, 0x0c, 0xb9, - 0x10, 0x19, 0xc7, 0x3f, 0xd1, 0xa7, 0x9c, 0xaf, 0x80, 0x9a, 0x10, 0x9d, 0x29, 0x99, 0x91, 0xf7, - 0xc6, 0x69, 0xef, 0xf0, 0x64, 0x47, 0x4f, 0x95, 0xcc, 0x70, 0x0f, 0xd5, 0x41, 0xb1, 0x3c, 0xbe, - 0xe2, 0x9a, 0xb8, 0x46, 0x38, 0xd4, 0xf8, 0x07, 0x6a, 0xef, 0xdf, 0x34, 0xe5, 0x33, 0x20, 0x1f, - 0x8c, 0xd0, 0xda, 0xc3, 0x33, 0x3e, 0x03, 0xdc, 0x41, 0x6e, 0xc1, 0x95, 0x90, 0x09, 0xa9, 0x9b, - 0xae, 0xad, 0xc6, 0x7f, 0xef, 0x37, 0x9e, 0xb3, 0xde, 0x78, 0xce, 0xd3, 0xc6, 0x73, 0x6e, 0xb7, - 0x5e, 0x65, 0xbd, 0xf5, 0x2a, 0x8f, 0x5b, 0xaf, 0x72, 0xf9, 0xbd, 0xfc, 0xa2, 0x4e, 0xae, 0x7d, - 0x21, 0x83, 0xd5, 0xeb, 0x53, 0x30, 0x77, 0x10, 0xb9, 0x86, 0xfd, 0x79, 0x09, 0x00, 0x00, 0xff, - 0xff, 0x4c, 0xbc, 0xff, 0x27, 0x2e, 0x02, 0x00, 0x00, + // 444 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x3f, 0x6f, 0xd4, 0x30, + 0x1c, 0xbd, 0xd0, 0xe3, 0x68, 0xdd, 0x1e, 0x7f, 0xa2, 0x0a, 0xb9, 0x19, 0xd2, 0xa3, 0x2c, 0xb7, + 0xe0, 0xe8, 0x60, 0x60, 0x00, 0x09, 0x9a, 0x02, 0x62, 0x60, 0x3a, 0x98, 0x58, 0x2c, 0x27, 0xf1, + 0x05, 0x8b, 0x24, 0xbf, 0xc8, 0xfe, 0xdd, 0xa9, 0x7c, 0x8b, 0x8e, 0x7c, 0x10, 0x3e, 0x04, 0x63, + 0x85, 0x18, 0xd8, 0x40, 0x77, 0x5f, 0x04, 0xc5, 0x76, 0xaa, 0xd2, 0x85, 0x6e, 0xce, 0xfb, 0xbd, + 0xf7, 0xf2, 0xfc, 0xfc, 0x23, 0x47, 0x39, 0x98, 0x1a, 0x4c, 0xd2, 0x6a, 0x40, 0xc8, 0xa1, 0x6a, + 0x01, 0xaa, 0x64, 0x35, 0x4b, 0xf0, 0x4b, 0x2b, 0x0d, 0xb3, 0x68, 0x78, 0xdf, 0x71, 0xd8, 0x65, + 0x0e, 0x5b, 0xcd, 0xa2, 0xfd, 0x12, 0x4a, 0xb0, 0x60, 0xd2, 0x9d, 0xdc, 0x3c, 0x3a, 0x70, 0x6c, + 0xee, 0x06, 0x97, 0xa5, 0x51, 0xec, 0x7f, 0x96, 0x09, 0x23, 0x93, 0xd5, 0x2c, 0x93, 0x28, 0x66, + 0x49, 0x0e, 0xaa, 0xf1, 0xf3, 0xc3, 0x12, 0xa0, 0xac, 0xa4, 0x0b, 0x93, 0x2d, 0x17, 0x09, 0xaa, + 0x5a, 0x1a, 0x14, 0x75, 0xdb, 0x1b, 0x5c, 0x25, 0x14, 0x4b, 0x2d, 0x50, 0x81, 0x37, 0x38, 0xfa, + 0xb9, 0x45, 0x46, 0xe9, 0xb2, 0x28, 0x25, 0x86, 0xaf, 0xc9, 0x3d, 0x2d, 0x73, 0xd5, 0x2a, 0xd9, + 0x20, 0x17, 0x45, 0xa1, 0xa5, 0x31, 0x34, 0x98, 0x04, 0xd3, 0x9d, 0x94, 0xfe, 0xf8, 0xf6, 0x68, + 0xdf, 0x07, 0x3b, 0x76, 0x93, 0xf7, 0xa8, 0x55, 0x53, 0xce, 0xef, 0x5e, 0x48, 0x3c, 0x1e, 0x3e, + 0x27, 0x7b, 0x08, 0x28, 0x2a, 0x9e, 0x59, 0x5b, 0x7a, 0x63, 0x12, 0x4c, 0x77, 0x1f, 0x1f, 0x30, + 0x2f, 0xef, 0x6e, 0xc2, 0xfc, 0x4d, 0xd8, 0x09, 0xa8, 0x66, 0xbe, 0x6b, 0xe9, 0x3e, 0xc4, 0x4b, + 0x72, 0x3b, 0xaf, 0x84, 0xaa, 0x65, 0xc1, 0x45, 0x0d, 0xcb, 0x06, 0xe9, 0xd6, 0xff, 0xf4, 0x63, + 0x2f, 0x38, 0xb6, 0xfc, 0xf0, 0x05, 0x21, 0x06, 0x85, 0x46, 0xde, 0x55, 0x41, 0x87, 0x56, 0x1d, + 0x31, 0x57, 0x03, 0xeb, 0x6b, 0x60, 0x1f, 0xfa, 0x9e, 0xd2, 0xe1, 0xd9, 0xef, 0xc3, 0x60, 0xbe, + 0x63, 0x35, 0x1d, 0x1a, 0xbe, 0x25, 0x77, 0x1a, 0x79, 0x8a, 0xdc, 0xda, 0xf2, 0x85, 0x86, 0x9a, + 0xde, 0xbc, 0xa6, 0xcb, 0xb8, 0x13, 0x9e, 0x74, 0xba, 0x37, 0x1a, 0xea, 0x30, 0x22, 0xdb, 0xa8, + 0x45, 0x93, 0x7f, 0x92, 0x86, 0x8e, 0x26, 0xc1, 0x74, 0x38, 0xbf, 0xf8, 0x0e, 0x1f, 0x92, 0x71, + 0x7f, 0xe6, 0x95, 0x5c, 0x20, 0xbd, 0x65, 0x09, 0x7b, 0x3d, 0xf8, 0x4e, 0x2e, 0x30, 0x7c, 0x4a, + 0x46, 0xad, 0xd4, 0x0a, 0x0a, 0xba, 0xed, 0x5b, 0xb8, 0x9a, 0xe0, 0x95, 0x7f, 0xce, 0x74, 0xf8, + 0xb5, 0x0b, 0xe0, 0xe9, 0xe9, 0xb3, 0xef, 0xeb, 0x38, 0x38, 0x5f, 0xc7, 0xc1, 0x9f, 0x75, 0x1c, + 0x9c, 0x6d, 0xe2, 0xc1, 0xf9, 0x26, 0x1e, 0xfc, 0xda, 0xc4, 0x83, 0x8f, 0x0f, 0x5c, 0x8f, 0xa6, + 0xf8, 0xcc, 0x14, 0x24, 0xa7, 0xff, 0xae, 0xb1, 0xdd, 0xe1, 0x6c, 0x64, 0xb1, 0x27, 0x7f, 0x03, + 0x00, 0x00, 0xff, 0xff, 0x07, 0x16, 0x5b, 0x67, 0xea, 0x02, 0x00, 0x00, } func (m *Budget) Marshal() (dAtA []byte, err error) { @@ -193,10 +202,15 @@ func (m *Budget) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Period != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Period)) + if m.Period != nil { + n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.Period, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.Period):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintTypes(dAtA, i, uint64(n1)) i-- - dAtA[i] = 0x40 + dAtA[i] = 0x42 } if m.TranchesLeft != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.TranchesLeft)) @@ -208,15 +222,25 @@ func (m *Budget) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x30 } - if m.NextClaimFrom != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.NextClaimFrom)) + if m.NextClaimFrom != nil { + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.NextClaimFrom, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.NextClaimFrom):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintTypes(dAtA, i, uint64(n2)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x2a } - if m.StartTime != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.StartTime)) + if m.StartTime != nil { + n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.StartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.StartTime):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintTypes(dAtA, i, uint64(n3)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x22 } if m.ClaimedAmount != nil { { @@ -281,11 +305,13 @@ func (m *Budget) Size() (n int) { l = m.ClaimedAmount.Size() n += 1 + l + sovTypes(uint64(l)) } - if m.StartTime != 0 { - n += 1 + sovTypes(uint64(m.StartTime)) + if m.StartTime != nil { + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.StartTime) + n += 1 + l + sovTypes(uint64(l)) } - if m.NextClaimFrom != 0 { - n += 1 + sovTypes(uint64(m.NextClaimFrom)) + if m.NextClaimFrom != nil { + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.NextClaimFrom) + n += 1 + l + sovTypes(uint64(l)) } if m.Tranches != 0 { n += 1 + sovTypes(uint64(m.Tranches)) @@ -293,8 +319,9 @@ func (m *Budget) Size() (n int) { if m.TranchesLeft != 0 { n += 1 + sovTypes(uint64(m.TranchesLeft)) } - if m.Period != 0 { - n += 1 + sovTypes(uint64(m.Period)) + if m.Period != nil { + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.Period) + n += 1 + l + sovTypes(uint64(l)) } return n } @@ -439,10 +466,10 @@ func (m *Budget) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 4: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) } - m.StartTime = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -452,16 +479,33 @@ func (m *Budget) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.StartTime |= uint64(b&0x7F) << shift + 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 + } + if m.StartTime == nil { + m.StartTime = new(time.Time) + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 5: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NextClaimFrom", wireType) } - m.NextClaimFrom = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -471,11 +515,28 @@ func (m *Budget) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NextClaimFrom |= uint64(b&0x7F) << shift + 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 + } + if m.NextClaimFrom == nil { + m.NextClaimFrom = new(time.Time) + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.NextClaimFrom, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Tranches", wireType) @@ -515,10 +576,10 @@ func (m *Budget) Unmarshal(dAtA []byte) error { } } case 8: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } - m.Period = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -528,11 +589,28 @@ func (m *Budget) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Period |= uint64(b&0x7F) << shift + 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 + } + if m.Period == nil { + m.Period = new(time.Duration) + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(m.Period, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) From 0b4898c76ef61838a98e65bd559c1c4cab925457 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Fri, 3 Nov 2023 17:25:21 +0530 Subject: [PATCH 64/69] use concrete time types --- x/protocolpool/keeper/grpc_query_test.go | 12 ++-- x/protocolpool/keeper/keeper.go | 33 ++++++----- x/protocolpool/keeper/msg_server_test.go | 71 ++++++++++++++---------- x/protocolpool/types/msg.go | 4 +- 4 files changed, 71 insertions(+), 49 deletions(-) diff --git a/x/protocolpool/keeper/grpc_query_test.go b/x/protocolpool/keeper/grpc_query_test.go index cf1f9ad63576..f736bef9ac2b 100644 --- a/x/protocolpool/keeper/grpc_query_test.go +++ b/x/protocolpool/keeper/grpc_query_test.go @@ -1,6 +1,8 @@ package keeper_test import ( + "time" + "cosmossdk.io/x/protocolpool/keeper" "cosmossdk.io/x/protocolpool/types" @@ -9,6 +11,8 @@ import ( func (suite *KeeperTestSuite) TestUnclaimedBudget() { queryServer := keeper.NewQuerier(suite.poolKeeper) + startTime := suite.ctx.BlockTime().Add(-70 * time.Second) + period := time.Duration(60) * time.Second testCases := []struct { name string preRun func() @@ -40,9 +44,9 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { budget := types.Budget{ RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix() - 70), + StartTime: &startTime, Tranches: 2, - Period: 60, + Period: &period, } err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) suite.Require().NoError(err) @@ -60,9 +64,9 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { budget := types.Budget{ RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix() - 70), + StartTime: &startTime, Tranches: 2, - Period: 60, + Period: &period, } err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) suite.Require().NoError(err) diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 778b84a908a0..57e940fc0867 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "time" "cosmossdk.io/collections" storetypes "cosmossdk.io/core/store" @@ -129,15 +130,15 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) } } - currentTime := sdkCtx.BlockTime().Unix() + currentTime := sdkCtx.BlockTime() startTime := budget.StartTime // Check if the start time is reached - if uint64(currentTime) < startTime { + if currentTime.Before(*startTime) { return sdk.Coin{}, fmt.Errorf("distribution has not started yet") } - if budget.NextClaimFrom == 0 { + if budget.NextClaimFrom == nil || budget.NextClaimFrom.IsZero() { budget.NextClaimFrom = budget.StartTime } @@ -150,31 +151,32 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) return k.calculateClaimableFunds(ctx, recipient, budget, currentTime) } -func (k Keeper) calculateClaimableFunds(ctx context.Context, recipient sdk.AccAddress, budget types.Budget, currentTime int64) (amount sdk.Coin, err error) { +func (k Keeper) calculateClaimableFunds(ctx context.Context, recipient sdk.AccAddress, budget types.Budget, currentTime time.Time) (amount sdk.Coin, err error) { // Calculate the time elapsed since the last claim time - timeElapsed := uint64(currentTime) - budget.NextClaimFrom + timeElapsed := currentTime.Sub(*budget.NextClaimFrom) // Check the time elapsed has passed period length - if timeElapsed < budget.Period { + if timeElapsed < *budget.Period { return sdk.Coin{}, fmt.Errorf("budget period has not passed yet") } // Calculate how many periods have passed - periodsPassed := timeElapsed / budget.Period + periodsPassed := int64(timeElapsed) / int64(*budget.Period) // Calculate the amount to distribute for all passed periods - coinsToDistribute := math.NewInt(int64(periodsPassed)).Mul(budget.TotalBudget.Amount.QuoRaw(int64(budget.Tranches))) + coinsToDistribute := math.NewInt(periodsPassed).Mul(budget.TotalBudget.Amount.QuoRaw(int64(budget.Tranches))) amount = sdk.NewCoin(budget.TotalBudget.Denom, coinsToDistribute) // update the budget's remaining tranches - budget.TranchesLeft -= periodsPassed + budget.TranchesLeft -= uint64(periodsPassed) // update the ClaimedAmount claimedAmount := budget.ClaimedAmount.Add(amount) budget.ClaimedAmount = &claimedAmount // Update the last claim time for the budget - budget.NextClaimFrom += budget.Period + nextClaimFrom := budget.NextClaimFrom.Add(*budget.Period) + budget.NextClaimFrom = &nextClaimFrom k.Logger(ctx).Debug(fmt.Sprintf("Processing budget for recipient: %s. Amount: %s", budget.RecipientAddress, coinsToDistribute.String())) @@ -195,12 +197,13 @@ func (k Keeper) validateAndUpdateBudgetProposal(ctx context.Context, bp types.Ms return fmt.Errorf("invalid budget proposal: %w", err) } - currentTime := sdk.UnwrapSDKContext(ctx).BlockTime().Unix() - if int64(bp.StartTime) == 0 { - bp.StartTime = uint64(currentTime) + currentTime := sdk.UnwrapSDKContext(ctx).BlockTime() + if bp.StartTime.IsZero() || bp.StartTime == nil { + bp.StartTime = ¤tTime } - if bp.StartTime < uint64(currentTime) { + // if bp.StartTime < uint64(currentTime) { + if currentTime.After(*bp.StartTime) { return fmt.Errorf("invalid budget proposal: start time cannot be less than the current block time") } @@ -208,7 +211,7 @@ func (k Keeper) validateAndUpdateBudgetProposal(ctx context.Context, bp types.Ms return fmt.Errorf("invalid budget proposal: tranches must be greater than zero") } - if bp.Period == 0 { + if bp.Period == nil || *bp.Period == 0 { return fmt.Errorf("invalid budget proposal: period length should be greater than zero") } diff --git a/x/protocolpool/keeper/msg_server_test.go b/x/protocolpool/keeper/msg_server_test.go index eea83ba9c29c..1f72e2d2c305 100644 --- a/x/protocolpool/keeper/msg_server_test.go +++ b/x/protocolpool/keeper/msg_server_test.go @@ -18,6 +18,10 @@ var ( func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { invalidCoin := sdk.NewInt64Coin("foo", 0) + startTime := suite.ctx.BlockTime().Add(10 * time.Second) + invalidStartTime := suite.ctx.BlockTime().Add(-15 * time.Second) + period := time.Duration(60) * time.Second + zeroPeriod := time.Duration(0) * time.Second testCases := map[string]struct { preRun func() input *types.MsgSubmitBudgetProposal @@ -29,9 +33,9 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: suite.poolKeeper.GetAuthority(), RecipientAddress: "", TotalBudget: &fooCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix()), + StartTime: &startTime, Tranches: 2, - Period: 60, + Period: &period, }, expErr: true, expErrMsg: "empty address string is not allowed", @@ -41,9 +45,9 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: "", RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix()), + StartTime: &startTime, Tranches: 2, - Period: 60, + Period: &period, }, expErr: true, expErrMsg: "empty address string is not allowed", @@ -53,9 +57,9 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: "invalid_authority", RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix()), + StartTime: &startTime, Tranches: 2, - Period: 60, + Period: &period, }, expErr: true, expErrMsg: "invalid authority", @@ -65,9 +69,9 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: suite.poolKeeper.GetAuthority(), RecipientAddress: recipientAddr.String(), TotalBudget: &invalidCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix()), + StartTime: &startTime, Tranches: 2, - Period: 60, + Period: &period, }, expErr: true, expErrMsg: "total budget cannot be zero", @@ -77,9 +81,9 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: suite.poolKeeper.GetAuthority(), RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix() - 5), + StartTime: &invalidStartTime, Tranches: 2, - Period: 60, + Period: &period, }, expErr: true, expErrMsg: "start time cannot be less than the current block time", @@ -89,9 +93,9 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: suite.poolKeeper.GetAuthority(), RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix() + 10), + StartTime: &startTime, Tranches: 0, - Period: 60, + Period: &period, }, expErr: true, expErrMsg: "tranches must be greater than zero", @@ -101,9 +105,9 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: suite.poolKeeper.GetAuthority(), RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix() + 10), + StartTime: &startTime, Tranches: 2, - Period: 0, + Period: &zeroPeriod, }, expErr: true, expErrMsg: "period length should be greater than zero", @@ -113,9 +117,9 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { Authority: suite.poolKeeper.GetAuthority(), RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix() + 10), + StartTime: &startTime, Tranches: 2, - Period: 60, + Period: &period, }, expErr: false, }, @@ -123,6 +127,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { for name, tc := range testCases { suite.Run(name, func() { + suite.SetupTest() if tc.preRun != nil { tc.preRun() } @@ -138,6 +143,9 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { } func (suite *KeeperTestSuite) TestMsgClaimBudget() { + startTime := suite.ctx.BlockTime().Add(-70 * time.Second) + period := time.Duration(60) * time.Second + testCases := map[string]struct { preRun func() recipientAddress sdk.AccAddress @@ -157,13 +165,14 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { }, "claiming before start time": { preRun: func() { + startTime := suite.ctx.BlockTime().Add(3600 * time.Second) // Prepare the budget proposal with a future start time budget := types.Budget{ RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix() + 3600), + StartTime: &startTime, Tranches: 2, - Period: 60, + Period: &period, } err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) suite.Require().NoError(err) @@ -174,13 +183,14 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { }, "budget period has not passed": { preRun: func() { + startTime := suite.ctx.BlockTime().Add(-50 * time.Second) // Prepare the budget proposal with start time and a short period budget := types.Budget{ RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix() - 50), + StartTime: &startTime, Tranches: 1, - Period: 60, + Period: &period, } err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) suite.Require().NoError(err) @@ -195,9 +205,9 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { budget := types.Budget{ RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix() - 70), + StartTime: &startTime, Tranches: 2, - Period: 60, + Period: &period, } err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) suite.Require().NoError(err) @@ -212,9 +222,9 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { budget := types.Budget{ RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix() - 70), + StartTime: &startTime, Tranches: 2, - Period: 60, + Period: &period, } err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) suite.Require().NoError(err) @@ -234,13 +244,15 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { "valid double claim attempt": { preRun: func() { oneMonthInSeconds := int64(30 * 24 * 60 * 60) // Approximate number of seconds in 1 month + startTimeBeforeMonth := suite.ctx.BlockTime().Add(time.Duration(-oneMonthInSeconds) * time.Second) + oneMonthPeriod := time.Duration(oneMonthInSeconds) * time.Second // Prepare the budget proposal with valid start time and period of 1 month (in seconds) budget := types.Budget{ RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix() - oneMonthInSeconds), + StartTime: &startTimeBeforeMonth, Tranches: 2, - Period: uint64(oneMonthInSeconds), + Period: &oneMonthPeriod, } err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) suite.Require().NoError(err) @@ -269,9 +281,9 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { budget := types.Budget{ RecipientAddress: recipientAddr.String(), TotalBudget: &fooCoin, - StartTime: uint64(suite.ctx.BlockTime().Unix() - 70), + StartTime: &startTime, Tranches: 2, - Period: 60, + Period: &period, } err := suite.poolKeeper.BudgetProposal.Set(suite.ctx, recipientAddr, budget) suite.Require().NoError(err) @@ -290,7 +302,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { Time: newBlockTime, }) - // Claim the funds twitce + // Claim the funds twice msg = &types.MsgClaimBudget{ RecipientAddress: recipientAddr.String(), } @@ -306,6 +318,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { for name, tc := range testCases { suite.Run(name, func() { + suite.SetupTest() if tc.preRun != nil { tc.preRun() } diff --git a/x/protocolpool/types/msg.go b/x/protocolpool/types/msg.go index 6931a070c2bb..b6c4925c8175 100644 --- a/x/protocolpool/types/msg.go +++ b/x/protocolpool/types/msg.go @@ -1,6 +1,8 @@ package types import ( + "time" + sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -28,7 +30,7 @@ func NewCommunityPoolSpend(amount sdk.Coins, authority, recipient string) *MsgCo } } -func NewBudgetProposal(recipient string, totalBudget sdk.Coin, startTime, tranches, period uint64) *Budget { +func NewBudgetProposal(recipient string, totalBudget sdk.Coin, startTime *time.Time, tranches uint64, period *time.Duration) *Budget { return &Budget{ RecipientAddress: recipient, TotalBudget: &totalBudget, From 1bc47f798707d2f60e90c57ed2c46a0316dc776f Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Fri, 3 Nov 2023 20:46:33 +0530 Subject: [PATCH 65/69] update grpc query --- x/protocolpool/keeper/grpc_query.go | 24 +++++++++++++++++++++++- x/protocolpool/keeper/grpc_query_test.go | 22 +++++++++++++++++++++- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/x/protocolpool/keeper/grpc_query.go b/x/protocolpool/keeper/grpc_query.go index 2ca62b0634cc..1d80714c9a3f 100644 --- a/x/protocolpool/keeper/grpc_query.go +++ b/x/protocolpool/keeper/grpc_query.go @@ -8,6 +8,7 @@ import ( "google.golang.org/grpc/status" "cosmossdk.io/collections" + "cosmossdk.io/math" "cosmossdk.io/x/protocolpool/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -55,5 +56,26 @@ func (k Querier) UnclaimedBudget(ctx context.Context, req *types.QueryUnclaimedB } else { unclaimedBudget = budget.TotalBudget.Sub(*budget.ClaimedAmount) } - return &types.QueryUnclaimedBudgetResponse{UnclaimedAmount: &unclaimedBudget}, nil + + if budget.ClaimedAmount == nil { + zeroCoin := sdk.NewCoin(budget.TotalBudget.Denom, math.ZeroInt()) + budget.ClaimedAmount = &zeroCoin + } + + if budget.NextClaimFrom == nil { + budget.NextClaimFrom = budget.StartTime + } + + if budget.TranchesLeft == 0 { + budget.TranchesLeft = budget.Tranches + } + + return &types.QueryUnclaimedBudgetResponse{ + TotalBudget: budget.TotalBudget, + ClaimedAmount: budget.ClaimedAmount, + UnclaimedAmount: &unclaimedBudget, + NextClaimFrom: budget.NextClaimFrom, + Period: budget.Period, + TranchesLeft: budget.TranchesLeft, + }, nil } diff --git a/x/protocolpool/keeper/grpc_query_test.go b/x/protocolpool/keeper/grpc_query_test.go index f736bef9ac2b..0781f447bc4f 100644 --- a/x/protocolpool/keeper/grpc_query_test.go +++ b/x/protocolpool/keeper/grpc_query_test.go @@ -3,6 +3,7 @@ package keeper_test import ( "time" + "cosmossdk.io/math" "cosmossdk.io/x/protocolpool/keeper" "cosmossdk.io/x/protocolpool/types" @@ -13,6 +14,8 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { queryServer := keeper.NewQuerier(suite.poolKeeper) startTime := suite.ctx.BlockTime().Add(-70 * time.Second) period := time.Duration(60) * time.Second + zeroCoin := sdk.NewCoin("foo", math.ZeroInt()) + nextClaimFrom := startTime.Add(period) testCases := []struct { name string preRun func() @@ -20,6 +23,7 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { expErr bool expErrMsg string unclaimedFunds *sdk.Coin + resp *types.QueryUnclaimedBudgetResponse }{ { name: "empty recipient address", @@ -56,6 +60,14 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { }, expErr: false, unclaimedFunds: &fooCoin, + resp: &types.QueryUnclaimedBudgetResponse{ + TotalBudget: &fooCoin, + ClaimedAmount: &zeroCoin, + UnclaimedAmount: &fooCoin, + NextClaimFrom: &startTime, + Period: &period, + TranchesLeft: 2, + }, }, { name: "valid case with claim", @@ -85,6 +97,14 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { }, expErr: false, unclaimedFunds: &fooCoin2, + resp: &types.QueryUnclaimedBudgetResponse{ + TotalBudget: &fooCoin, + ClaimedAmount: &fooCoin2, + UnclaimedAmount: &fooCoin2, + NextClaimFrom: &nextClaimFrom, + Period: &period, + TranchesLeft: 1, + }, }, } for _, tc := range testCases { @@ -98,7 +118,7 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { suite.Require().Contains(err.Error(), tc.expErrMsg) } else { suite.Require().NoError(err) - suite.Require().Equal(tc.unclaimedFunds, resp.UnclaimedAmount) + suite.Require().Equal(tc.resp, resp) } }) } From bcd522101b28064810f8bd8aa1782cf23fe9eea9 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Mon, 6 Nov 2023 16:09:28 +0530 Subject: [PATCH 66/69] address julien's comments --- x/protocolpool/README.md | 15 +++++++++++++++ x/protocolpool/keeper/grpc_query.go | 7 ++----- x/protocolpool/keeper/keeper.go | 23 ++++++++++++++++------- x/protocolpool/keeper/msg_server.go | 5 ++--- x/protocolpool/types/msg.go | 12 ------------ 5 files changed, 35 insertions(+), 27 deletions(-) diff --git a/x/protocolpool/README.md b/x/protocolpool/README.md index 5a610d1c277e..6e9f6021c5ea 100644 --- a/x/protocolpool/README.md +++ b/x/protocolpool/README.md @@ -112,6 +112,21 @@ The message will fail under the following conditions: * The number of tranches is not a positive integer. * The period length is not a positive integer. +*Disclaimer: The behavior described here is based on the current implementation and may be subject to changes in future versions.* +```go +func (k MsgServer) SubmitBudgetProposal(ctx context.Context, msg *types.MsgSubmitBudgetProposal) (*types.MsgSubmitBudgetProposalResponse, error) { + // ... (existing code) + + // Set the budget proposal in the state. + err = k.BudgetProposal.Set(ctx, recipient, *budgetProposal) + if err != nil { + return nil, err + } + + // ... (rest of the code) +} +``` + ```go reference https://github.com/cosmos/cosmos-sdk/blob/97724493d792517ba2be8969078b5f92ad04d79c/x/protocolpool/keeper/msg_server.go#L39-l61 ``` diff --git a/x/protocolpool/keeper/grpc_query.go b/x/protocolpool/keeper/grpc_query.go index 1d80714c9a3f..2786fd72eb3f 100644 --- a/x/protocolpool/keeper/grpc_query.go +++ b/x/protocolpool/keeper/grpc_query.go @@ -53,13 +53,10 @@ func (k Querier) UnclaimedBudget(ctx context.Context, req *types.QueryUnclaimedB var unclaimedBudget sdk.Coin if budget.ClaimedAmount == nil { unclaimedBudget = *budget.TotalBudget - } else { - unclaimedBudget = budget.TotalBudget.Sub(*budget.ClaimedAmount) - } - - if budget.ClaimedAmount == nil { zeroCoin := sdk.NewCoin(budget.TotalBudget.Denom, math.ZeroInt()) budget.ClaimedAmount = &zeroCoin + } else { + unclaimedBudget = budget.TotalBudget.Sub(*budget.ClaimedAmount) } if budget.NextClaimFrom == nil { diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 57e940fc0867..ed8af7e152fa 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -188,13 +188,13 @@ func (k Keeper) calculateClaimableFunds(ctx context.Context, recipient sdk.AccAd return amount, nil } -func (k Keeper) validateAndUpdateBudgetProposal(ctx context.Context, bp types.MsgSubmitBudgetProposal) error { +func (k Keeper) validateAndUpdateBudgetProposal(ctx context.Context, bp *types.MsgSubmitBudgetProposal) (*types.Budget, error) { if bp.TotalBudget.IsZero() { - return fmt.Errorf("invalid budget proposal: total budget cannot be zero") + return nil, fmt.Errorf("invalid budget proposal: total budget cannot be zero") } if err := validateAmount(sdk.NewCoins(*bp.TotalBudget)); err != nil { - return fmt.Errorf("invalid budget proposal: %w", err) + return nil, fmt.Errorf("invalid budget proposal: %w", err) } currentTime := sdk.UnwrapSDKContext(ctx).BlockTime() @@ -204,16 +204,25 @@ func (k Keeper) validateAndUpdateBudgetProposal(ctx context.Context, bp types.Ms // if bp.StartTime < uint64(currentTime) { if currentTime.After(*bp.StartTime) { - return fmt.Errorf("invalid budget proposal: start time cannot be less than the current block time") + return nil, fmt.Errorf("invalid budget proposal: start time cannot be less than the current block time") } if bp.Tranches == 0 { - return fmt.Errorf("invalid budget proposal: tranches must be greater than zero") + return nil, fmt.Errorf("invalid budget proposal: tranches must be greater than zero") } if bp.Period == nil || *bp.Period == 0 { - return fmt.Errorf("invalid budget proposal: period length should be greater than zero") + return nil, fmt.Errorf("invalid budget proposal: period length should be greater than zero") } - return nil + // Create and return an updated budget proposal + updatedBudget := types.Budget{ + RecipientAddress: bp.RecipientAddress, + TotalBudget: bp.TotalBudget, + StartTime: bp.StartTime, + Tranches: bp.Tranches, + Period: bp.Period, + } + + return &updatedBudget, nil } diff --git a/x/protocolpool/keeper/msg_server.go b/x/protocolpool/keeper/msg_server.go index 43098528aad1..7206e5354848 100644 --- a/x/protocolpool/keeper/msg_server.go +++ b/x/protocolpool/keeper/msg_server.go @@ -46,12 +46,11 @@ func (k MsgServer) SubmitBudgetProposal(ctx context.Context, msg *types.MsgSubmi return nil, err } - if err := k.validateAndUpdateBudgetProposal(ctx, *msg); err != nil { + budgetProposal, err := k.validateAndUpdateBudgetProposal(ctx, msg) + if err != nil { return nil, err } - budgetProposal := types.NewBudgetProposal(msg.RecipientAddress, *msg.TotalBudget, msg.StartTime, msg.Tranches, msg.Period) - // set budget proposal in state err = k.BudgetProposal.Set(ctx, recipient, *budgetProposal) if err != nil { diff --git a/x/protocolpool/types/msg.go b/x/protocolpool/types/msg.go index b6c4925c8175..c25616d8b584 100644 --- a/x/protocolpool/types/msg.go +++ b/x/protocolpool/types/msg.go @@ -1,8 +1,6 @@ package types import ( - "time" - sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -29,13 +27,3 @@ func NewCommunityPoolSpend(amount sdk.Coins, authority, recipient string) *MsgCo Amount: amount, } } - -func NewBudgetProposal(recipient string, totalBudget sdk.Coin, startTime *time.Time, tranches uint64, period *time.Duration) *Budget { - return &Budget{ - RecipientAddress: recipient, - TotalBudget: &totalBudget, - StartTime: startTime, - Tranches: tranches, - Period: period, - } -} From 3a27c0cebffecd0b9056d4752a852738dcb97628 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Mon, 6 Nov 2023 16:15:59 +0530 Subject: [PATCH 67/69] update Readme and godoc --- x/protocolpool/README.md | 2 +- x/protocolpool/keeper/msg_server.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/x/protocolpool/README.md b/x/protocolpool/README.md index 6e9f6021c5ea..5f836fbe1a81 100644 --- a/x/protocolpool/README.md +++ b/x/protocolpool/README.md @@ -112,7 +112,7 @@ The message will fail under the following conditions: * The number of tranches is not a positive integer. * The period length is not a positive integer. -*Disclaimer: The behavior described here is based on the current implementation and may be subject to changes in future versions.* +*Disclaimer: If two budgets to the same address are created, the budget would be updated with the new budget.* ```go func (k MsgServer) SubmitBudgetProposal(ctx context.Context, msg *types.MsgSubmitBudgetProposal) (*types.MsgSubmitBudgetProposalResponse, error) { // ... (existing code) diff --git a/x/protocolpool/keeper/msg_server.go b/x/protocolpool/keeper/msg_server.go index 7206e5354848..41eeca20b959 100644 --- a/x/protocolpool/keeper/msg_server.go +++ b/x/protocolpool/keeper/msg_server.go @@ -52,6 +52,7 @@ func (k MsgServer) SubmitBudgetProposal(ctx context.Context, msg *types.MsgSubmi } // set budget proposal in state + // Note: If two budgets to the same address are created, the budget would be updated with the new budget. err = k.BudgetProposal.Set(ctx, recipient, *budgetProposal) if err != nil { return nil, err From 3b1113161e9edbba2038df1fcf2b1fd0a66c781c Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Mon, 6 Nov 2023 16:38:08 +0530 Subject: [PATCH 68/69] update readme --- x/protocolpool/README.md | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/x/protocolpool/README.md b/x/protocolpool/README.md index 5f836fbe1a81..3b250f0f9e88 100644 --- a/x/protocolpool/README.md +++ b/x/protocolpool/README.md @@ -112,20 +112,9 @@ The message will fail under the following conditions: * The number of tranches is not a positive integer. * The period length is not a positive integer. -*Disclaimer: If two budgets to the same address are created, the budget would be updated with the new budget.* -```go -func (k MsgServer) SubmitBudgetProposal(ctx context.Context, msg *types.MsgSubmitBudgetProposal) (*types.MsgSubmitBudgetProposalResponse, error) { - // ... (existing code) - - // Set the budget proposal in the state. - err = k.BudgetProposal.Set(ctx, recipient, *budgetProposal) - if err != nil { - return nil, err - } - - // ... (rest of the code) -} -``` +:::warning +If two budgets to the same address are created, the budget would be updated with the new budget. +::: ```go reference https://github.com/cosmos/cosmos-sdk/blob/97724493d792517ba2be8969078b5f92ad04d79c/x/protocolpool/keeper/msg_server.go#L39-l61 From 39a2191bed047c58a8695388cb600944ae414f8a Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Mon, 6 Nov 2023 16:40:43 +0530 Subject: [PATCH 69/69] remove pointer update on validateAndUpdateBudgetProposal --- x/protocolpool/keeper/keeper.go | 2 +- x/protocolpool/keeper/msg_server.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index ed8af7e152fa..5af89f45fb60 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -188,7 +188,7 @@ func (k Keeper) calculateClaimableFunds(ctx context.Context, recipient sdk.AccAd return amount, nil } -func (k Keeper) validateAndUpdateBudgetProposal(ctx context.Context, bp *types.MsgSubmitBudgetProposal) (*types.Budget, error) { +func (k Keeper) validateAndUpdateBudgetProposal(ctx context.Context, bp types.MsgSubmitBudgetProposal) (*types.Budget, error) { if bp.TotalBudget.IsZero() { return nil, fmt.Errorf("invalid budget proposal: total budget cannot be zero") } diff --git a/x/protocolpool/keeper/msg_server.go b/x/protocolpool/keeper/msg_server.go index 41eeca20b959..ba5af532e423 100644 --- a/x/protocolpool/keeper/msg_server.go +++ b/x/protocolpool/keeper/msg_server.go @@ -46,7 +46,7 @@ func (k MsgServer) SubmitBudgetProposal(ctx context.Context, msg *types.MsgSubmi return nil, err } - budgetProposal, err := k.validateAndUpdateBudgetProposal(ctx, msg) + budgetProposal, err := k.validateAndUpdateBudgetProposal(ctx, *msg) if err != nil { return nil, err }