From fd2dbedc1b27b406b65390ed6516fd27c8240ed2 Mon Sep 17 00:00:00 2001 From: ryanchristo <12519942+ryanchristo@users.noreply.github.com> Date: Mon, 21 Nov 2022 15:42:56 -0800 Subject: [PATCH 1/2] feat(x/ecocredit): add retirement reason --- api/regen/ecocredit/basket/v1/tx.pulsar.go | 217 +++-- .../ecocredit/marketplace/v1/tx.pulsar.go | 252 ++++-- api/regen/ecocredit/v1/events.pulsar.go | 197 +++-- api/regen/ecocredit/v1/tx.pulsar.go | 804 +++++++++++------- api/regen/ecocredit/v1/types.pulsar.go | 144 +++- proto/regen/ecocredit/basket/v1/tx.proto | 7 + proto/regen/ecocredit/marketplace/v1/tx.proto | 7 + proto/regen/ecocredit/v1/events.proto | 6 + proto/regen/ecocredit/v1/tx.proto | 13 + proto/regen/ecocredit/v1/types.proto | 7 + .../keeper/features/msg_create_batch.feature | 22 +- .../base/keeper/features/msg_retire.feature | 5 +- .../base/keeper/features/msg_send.feature | 7 +- x/ecocredit/base/keeper/msg_create_batch.go | 1 + .../base/keeper/msg_create_batch_test.go | 115 +-- x/ecocredit/base/keeper/msg_retire.go | 1 + x/ecocredit/base/keeper/msg_retire_test.go | 29 +- x/ecocredit/base/keeper/msg_send.go | 1 + x/ecocredit/base/keeper/msg_send_test.go | 18 +- x/ecocredit/base/types/v1/events.pb.go | 136 ++- .../v1/features/msg_create_batch.feature | 56 +- .../base/types/v1/features/msg_retire.feature | 27 +- .../base/types/v1/features/msg_send.feature | 27 +- x/ecocredit/base/types/v1/tx.pb.go | 344 +++++--- x/ecocredit/base/types/v1/types.pb.go | 135 ++- .../basket/keeper/features/msg_take.feature | 5 +- x/ecocredit/basket/keeper/msg_take.go | 5 +- x/ecocredit/basket/keeper/msg_take_test.go | 18 + .../basket/types/v1/features/msg_take.feature | 23 +- x/ecocredit/basket/types/v1/tx.pb.go | 171 ++-- .../keeper/features/msg_buy_direct.feature | 18 +- .../marketplace/keeper/msg_buy_direct.go | 1 + .../marketplace/keeper/msg_buy_direct_test.go | 40 +- x/ecocredit/marketplace/keeper/utils.go | 2 + .../types/v1/features/msg_buy_direct.feature | 32 +- x/ecocredit/marketplace/types/v1/tx.pb.go | 179 ++-- 36 files changed, 2082 insertions(+), 990 deletions(-) diff --git a/api/regen/ecocredit/basket/v1/tx.pulsar.go b/api/regen/ecocredit/basket/v1/tx.pulsar.go index 4461ce9e1a..f06f4a8d6b 100644 --- a/api/regen/ecocredit/basket/v1/tx.pulsar.go +++ b/api/regen/ecocredit/basket/v1/tx.pulsar.go @@ -2540,6 +2540,7 @@ var ( fd_MsgTake_retirement_location protoreflect.FieldDescriptor fd_MsgTake_retire_on_take protoreflect.FieldDescriptor fd_MsgTake_retirement_jurisdiction protoreflect.FieldDescriptor + fd_MsgTake_retirement_reason protoreflect.FieldDescriptor ) func init() { @@ -2551,6 +2552,7 @@ func init() { fd_MsgTake_retirement_location = md_MsgTake.Fields().ByName("retirement_location") fd_MsgTake_retire_on_take = md_MsgTake.Fields().ByName("retire_on_take") fd_MsgTake_retirement_jurisdiction = md_MsgTake.Fields().ByName("retirement_jurisdiction") + fd_MsgTake_retirement_reason = md_MsgTake.Fields().ByName("retirement_reason") } var _ protoreflect.Message = (*fastReflection_MsgTake)(nil) @@ -2654,6 +2656,12 @@ func (x *fastReflection_MsgTake) Range(f func(protoreflect.FieldDescriptor, prot return } } + if x.RetirementReason != "" { + value := protoreflect.ValueOfString(x.RetirementReason) + if !f(fd_MsgTake_retirement_reason, value) { + return + } + } } // Has reports whether a field is populated. @@ -2681,6 +2689,8 @@ func (x *fastReflection_MsgTake) Has(fd protoreflect.FieldDescriptor) bool { return x.RetireOnTake != false case "regen.ecocredit.basket.v1.MsgTake.retirement_jurisdiction": return x.RetirementJurisdiction != "" + case "regen.ecocredit.basket.v1.MsgTake.retirement_reason": + return x.RetirementReason != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgTake")) @@ -2709,6 +2719,8 @@ func (x *fastReflection_MsgTake) Clear(fd protoreflect.FieldDescriptor) { x.RetireOnTake = false case "regen.ecocredit.basket.v1.MsgTake.retirement_jurisdiction": x.RetirementJurisdiction = "" + case "regen.ecocredit.basket.v1.MsgTake.retirement_reason": + x.RetirementReason = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgTake")) @@ -2743,6 +2755,9 @@ func (x *fastReflection_MsgTake) Get(descriptor protoreflect.FieldDescriptor) pr case "regen.ecocredit.basket.v1.MsgTake.retirement_jurisdiction": value := x.RetirementJurisdiction return protoreflect.ValueOfString(value) + case "regen.ecocredit.basket.v1.MsgTake.retirement_reason": + value := x.RetirementReason + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgTake")) @@ -2775,6 +2790,8 @@ func (x *fastReflection_MsgTake) Set(fd protoreflect.FieldDescriptor, value prot x.RetireOnTake = value.Bool() case "regen.ecocredit.basket.v1.MsgTake.retirement_jurisdiction": x.RetirementJurisdiction = value.Interface().(string) + case "regen.ecocredit.basket.v1.MsgTake.retirement_reason": + x.RetirementReason = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgTake")) @@ -2807,6 +2824,8 @@ func (x *fastReflection_MsgTake) Mutable(fd protoreflect.FieldDescriptor) protor panic(fmt.Errorf("field retire_on_take of message regen.ecocredit.basket.v1.MsgTake is not mutable")) case "regen.ecocredit.basket.v1.MsgTake.retirement_jurisdiction": panic(fmt.Errorf("field retirement_jurisdiction of message regen.ecocredit.basket.v1.MsgTake is not mutable")) + case "regen.ecocredit.basket.v1.MsgTake.retirement_reason": + panic(fmt.Errorf("field retirement_reason of message regen.ecocredit.basket.v1.MsgTake is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgTake")) @@ -2832,6 +2851,8 @@ func (x *fastReflection_MsgTake) NewField(fd protoreflect.FieldDescriptor) proto return protoreflect.ValueOfBool(false) case "regen.ecocredit.basket.v1.MsgTake.retirement_jurisdiction": return protoreflect.ValueOfString("") + case "regen.ecocredit.basket.v1.MsgTake.retirement_reason": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgTake")) @@ -2924,6 +2945,10 @@ func (x *fastReflection_MsgTake) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.RetirementReason) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2953,6 +2978,13 @@ func (x *fastReflection_MsgTake) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.RetirementReason) > 0 { + i -= len(x.RetirementReason) + copy(dAtA[i:], x.RetirementReason) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RetirementReason))) + i-- + dAtA[i] = 0x3a + } if len(x.RetirementJurisdiction) > 0 { i -= len(x.RetirementJurisdiction) copy(dAtA[i:], x.RetirementJurisdiction) @@ -3227,6 +3259,38 @@ func (x *fastReflection_MsgTake) ProtoMethods() *protoiface.Methods { } x.RetirementJurisdiction = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RetirementReason", 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.RetirementReason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -5828,6 +5892,12 @@ type MsgTake struct { // // Since Revision 1 RetirementJurisdiction string `protobuf:"bytes,6,opt,name=retirement_jurisdiction,json=retirementJurisdiction,proto3" json:"retirement_jurisdiction,omitempty"` + // retirement_reason is any arbitrary string that specifies the reason for + // retiring credits. The reason will be included in EventRetire and is not + // stored in state. + // + // Since Revision 2 + RetirementReason string `protobuf:"bytes,7,opt,name=retirement_reason,json=retirementReason,proto3" json:"retirement_reason,omitempty"` } func (x *MsgTake) Reset() { @@ -5893,6 +5963,13 @@ func (x *MsgTake) GetRetirementJurisdiction() string { return "" } +func (x *MsgTake) GetRetirementReason() string { + if x != nil { + return x.RetirementReason + } + return "" +} + // MsgTakeFromBasketResponse is the Msg/TakeFromBasket response type. type MsgTakeResponse struct { state protoimpl.MessageState @@ -6153,7 +6230,7 @@ var file_regen_ecocredit_basket_v1_tx_proto_rawDesc = []byte{ 0x22, 0x39, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x22, 0xfa, 0x01, 0x0a, 0x07, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x22, 0xa7, 0x02, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x54, 0x61, 0x6b, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, @@ -6168,80 +6245,82 @@ var file_regen_ecocredit_basket_v1_tx_proto_rawDesc = []byte{ 0x61, 0x6b, 0x65, 0x12, 0x37, 0x0a, 0x17, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x4a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x0a, 0x82, 0xe7, - 0xb0, 0x2a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x54, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x54, - 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x63, - 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, - 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, - 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x43, - 0x72, 0x65, 0x64, 0x69, 0x74, 0x52, 0x07, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x22, 0x6f, - 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x6b, 0x65, - 0x74, 0x46, 0x65, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x03, 0x66, 0x65, 0x65, 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, 0x03, 0x66, 0x65, 0x65, 0x3a, - 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, - 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x6b, - 0x65, 0x74, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x71, 0x0a, - 0x10, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x75, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x75, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x64, - 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x75, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x43, 0x75, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x75, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x75, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xfc, 0x03, 0x0a, - 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5c, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x24, - 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, - 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x1a, 0x2c, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, - 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x53, 0x0a, 0x03, 0x50, 0x75, 0x74, 0x12, 0x21, 0x2e, 0x72, 0x65, 0x67, 0x65, + 0x4a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, + 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x54, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x54, 0x61, 0x6b, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x64, + 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, - 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x75, 0x74, 0x1a, 0x29, 0x2e, 0x72, - 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, - 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x75, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x04, 0x54, 0x61, 0x6b, 0x65, 0x12, - 0x22, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, - 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, - 0x61, 0x6b, 0x65, 0x1a, 0x2a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, - 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x54, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x77, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x46, - 0x65, 0x65, 0x12, 0x2d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, - 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, + 0x69, 0x74, 0x52, 0x07, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x22, 0x6f, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x46, 0x65, - 0x65, 0x1a, 0x35, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, + 0x2b, 0x0a, 0x03, 0x66, 0x65, 0x65, 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, 0x03, 0x66, 0x65, 0x65, 0x3a, 0x0e, 0x82, 0xe7, + 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1c, 0x0a, 0x1a, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x46, + 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x71, 0x0a, 0x10, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x75, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x75, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x75, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, + 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1f, + 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x75, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x43, 0x75, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x3a, + 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x75, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1a, 0x0a, + 0x18, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x75, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xfc, 0x03, 0x0a, 0x03, 0x4d, 0x73, + 0x67, 0x12, 0x5c, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, + 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x1a, 0x2c, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x43, 0x75, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2b, 0x2e, 0x72, 0x65, 0x67, 0x65, + 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x53, 0x0a, 0x03, 0x50, 0x75, 0x74, 0x12, 0x21, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, + 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x75, 0x74, 0x1a, 0x29, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, - 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x75, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x33, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, + 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x04, 0x54, 0x61, 0x6b, 0x65, 0x12, 0x22, 0x2e, 0x72, + 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, + 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x61, 0x6b, 0x65, + 0x1a, 0x2a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, + 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x54, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x0f, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x12, + 0x2d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, + 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x1a, 0x35, + 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, + 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x75, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2b, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x75, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xfd, 0x01, 0x0a, 0x1d, - 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, - 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, - 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, - 0x64, 0x69, 0x74, 0x2f, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x62, 0x61, - 0x73, 0x6b, 0x65, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x45, 0x42, 0xaa, 0x02, 0x19, 0x52, - 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x42, - 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x52, 0x65, 0x67, 0x65, 0x6e, - 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x42, 0x61, 0x73, 0x6b, 0x65, - 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, - 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x52, - 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x3a, - 0x3a, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x72, 0x1a, 0x33, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, + 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x75, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xfd, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, + 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, + 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, + 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, + 0x2f, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x62, 0x61, 0x73, 0x6b, 0x65, + 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x45, 0x42, 0xaa, 0x02, 0x19, 0x52, 0x65, 0x67, 0x65, + 0x6e, 0x2e, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x42, 0x61, 0x73, 0x6b, + 0x65, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, + 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x25, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, + 0x64, 0x69, 0x74, 0x5c, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x52, 0x65, 0x67, 0x65, + 0x6e, 0x3a, 0x3a, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x42, 0x61, + 0x73, 0x6b, 0x65, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/regen/ecocredit/marketplace/v1/tx.pulsar.go b/api/regen/ecocredit/marketplace/v1/tx.pulsar.go index 217ad73d37..77656e7dd3 100644 --- a/api/regen/ecocredit/marketplace/v1/tx.pulsar.go +++ b/api/regen/ecocredit/marketplace/v1/tx.pulsar.go @@ -4789,6 +4789,7 @@ var ( fd_MsgBuyDirect_Order_bid_price protoreflect.FieldDescriptor fd_MsgBuyDirect_Order_disable_auto_retire protoreflect.FieldDescriptor fd_MsgBuyDirect_Order_retirement_jurisdiction protoreflect.FieldDescriptor + fd_MsgBuyDirect_Order_retirement_reason protoreflect.FieldDescriptor ) func init() { @@ -4799,6 +4800,7 @@ func init() { fd_MsgBuyDirect_Order_bid_price = md_MsgBuyDirect_Order.Fields().ByName("bid_price") fd_MsgBuyDirect_Order_disable_auto_retire = md_MsgBuyDirect_Order.Fields().ByName("disable_auto_retire") fd_MsgBuyDirect_Order_retirement_jurisdiction = md_MsgBuyDirect_Order.Fields().ByName("retirement_jurisdiction") + fd_MsgBuyDirect_Order_retirement_reason = md_MsgBuyDirect_Order.Fields().ByName("retirement_reason") } var _ protoreflect.Message = (*fastReflection_MsgBuyDirect_Order)(nil) @@ -4896,6 +4898,12 @@ func (x *fastReflection_MsgBuyDirect_Order) Range(f func(protoreflect.FieldDescr return } } + if x.RetirementReason != "" { + value := protoreflect.ValueOfString(x.RetirementReason) + if !f(fd_MsgBuyDirect_Order_retirement_reason, value) { + return + } + } } // Has reports whether a field is populated. @@ -4921,6 +4929,8 @@ func (x *fastReflection_MsgBuyDirect_Order) Has(fd protoreflect.FieldDescriptor) return x.DisableAutoRetire != false case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_jurisdiction": return x.RetirementJurisdiction != "" + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_reason": + return x.RetirementReason != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect.Order")) @@ -4947,6 +4957,8 @@ func (x *fastReflection_MsgBuyDirect_Order) Clear(fd protoreflect.FieldDescripto x.DisableAutoRetire = false case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_jurisdiction": x.RetirementJurisdiction = "" + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_reason": + x.RetirementReason = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect.Order")) @@ -4978,6 +4990,9 @@ func (x *fastReflection_MsgBuyDirect_Order) Get(descriptor protoreflect.FieldDes case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_jurisdiction": value := x.RetirementJurisdiction return protoreflect.ValueOfString(value) + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_reason": + value := x.RetirementReason + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect.Order")) @@ -5008,6 +5023,8 @@ func (x *fastReflection_MsgBuyDirect_Order) Set(fd protoreflect.FieldDescriptor, x.DisableAutoRetire = value.Bool() case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_jurisdiction": x.RetirementJurisdiction = value.Interface().(string) + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_reason": + x.RetirementReason = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect.Order")) @@ -5041,6 +5058,8 @@ func (x *fastReflection_MsgBuyDirect_Order) Mutable(fd protoreflect.FieldDescrip panic(fmt.Errorf("field disable_auto_retire of message regen.ecocredit.marketplace.v1.MsgBuyDirect.Order is not mutable")) case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_jurisdiction": panic(fmt.Errorf("field retirement_jurisdiction of message regen.ecocredit.marketplace.v1.MsgBuyDirect.Order is not mutable")) + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_reason": + panic(fmt.Errorf("field retirement_reason of message regen.ecocredit.marketplace.v1.MsgBuyDirect.Order is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect.Order")) @@ -5065,6 +5084,8 @@ func (x *fastReflection_MsgBuyDirect_Order) NewField(fd protoreflect.FieldDescri return protoreflect.ValueOfBool(false) case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_jurisdiction": return protoreflect.ValueOfString("") + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_reason": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect.Order")) @@ -5152,6 +5173,10 @@ func (x *fastReflection_MsgBuyDirect_Order) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.RetirementReason) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -5181,6 +5206,13 @@ func (x *fastReflection_MsgBuyDirect_Order) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.RetirementReason) > 0 { + i -= len(x.RetirementReason) + copy(dAtA[i:], x.RetirementReason) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RetirementReason))) + i-- + dAtA[i] = 0x3a + } if len(x.RetirementJurisdiction) > 0 { i -= len(x.RetirementJurisdiction) copy(dAtA[i:], x.RetirementJurisdiction) @@ -5412,6 +5444,38 @@ func (x *fastReflection_MsgBuyDirect_Order) ProtoMethods() *protoiface.Methods { } x.RetirementJurisdiction = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RetirementReason", 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.RetirementReason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -8265,6 +8329,12 @@ type MsgBuyDirect_Order struct { // retirement_jurisdiction is the optional retirement jurisdiction for the // credits which will be used only if disable_auto_retire is false. RetirementJurisdiction string `protobuf:"bytes,6,opt,name=retirement_jurisdiction,json=retirementJurisdiction,proto3" json:"retirement_jurisdiction,omitempty"` + // retirement_reason is any arbitrary string that specifies the reason for + // retiring credits. The reason will be included in EventRetire and is not + // stored in state. + // + // Since Revision 2 + RetirementReason string `protobuf:"bytes,7,opt,name=retirement_reason,json=retirementReason,proto3" json:"retirement_reason,omitempty"` } func (x *MsgBuyDirect_Order) Reset() { @@ -8322,6 +8392,13 @@ func (x *MsgBuyDirect_Order) GetRetirementJurisdiction() string { return "" } +func (x *MsgBuyDirect_Order) GetRetirementReason() string { + if x != nil { + return x.RetirementReason + } + return "" +} + var File_regen_ecocredit_marketplace_v1_tx_proto protoreflect.FileDescriptor var file_regen_ecocredit_marketplace_v1_tx_proto_rawDesc = []byte{ @@ -8398,14 +8475,14 @@ var file_regen_ecocredit_marketplace_v1_tx_proto_rawDesc = []byte{ 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe7, 0x02, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x79, 0x44, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x94, 0x03, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x79, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x79, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, - 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x1a, 0xe8, 0x01, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, + 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x95, 0x02, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, @@ -8420,94 +8497,97 @@ var file_regen_ecocredit_marketplace_v1_tx_proto_rawDesc = []byte{ 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x22, 0x16, - 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x79, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x41, 0x64, - 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1c, 0x0a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x62, - 0x61, 0x6e, 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x62, 0x61, 0x6e, 0x6b, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x69, - 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, - 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, - 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, - 0x73, 0x67, 0x41, 0x64, 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, - 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x0a, 0x15, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, - 0x6f, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf4, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, - 0x60, 0x0a, 0x04, 0x53, 0x65, 0x6c, 0x6c, 0x12, 0x27, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, - 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6c, 0x6c, - 0x1a, 0x2f, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, - 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x84, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x6c, 0x6c, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x33, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, + 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, + 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x3a, + 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x22, 0x16, 0x0a, 0x14, 0x4d, + 0x73, 0x67, 0x42, 0x75, 0x79, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x41, 0x6c, + 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x6e, 0x6b, + 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, + 0x6e, 0x6b, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1a, 0x0a, 0x08, + 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, + 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x41, + 0x64, 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, + 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, + 0x6e, 0x6f, 0x6d, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf4, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x60, 0x0a, 0x04, + 0x53, 0x65, 0x6c, 0x6c, 0x12, 0x27, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, + 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6c, 0x6c, 0x1a, 0x2f, 0x2e, + 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x84, + 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x73, 0x12, 0x33, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, + 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x3b, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, + 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x32, 0x2e, 0x72, 0x65, 0x67, 0x65, + 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x1a, 0x3a, 0x2e, + 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x09, 0x42, 0x75, 0x79, + 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x2c, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, - 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x3b, 0x2e, 0x72, 0x65, - 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x43, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x32, 0x2e, 0x72, + 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x79, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x1a, 0x34, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, + 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x79, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x41, + 0x64, 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x32, + 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, + 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, + 0x6f, 0x6d, 0x1a, 0x3a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, + 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, + 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8a, + 0x01, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, + 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x35, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, + 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x1a, 0x3d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x1a, 0x3a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, - 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x09, - 0x42, 0x75, 0x79, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x2c, 0x2e, 0x72, 0x65, 0x67, 0x65, - 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, - 0x79, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x1a, 0x34, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, - 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x79, 0x44, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, - 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, - 0x6d, 0x12, 0x32, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, + 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, + 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xa0, 0x02, 0x0a, 0x22, + 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, - 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x1a, 0x3a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, - 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, - 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x41, 0x6c, 0x6c, - 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, - 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x35, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, - 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x1a, - 0x3d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, - 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, - 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xa0, - 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, - 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, - 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, - 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, - 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, - 0x6e, 0x2f, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2f, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x45, 0x4d, 0xaa, 0x02, - 0x1e, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, - 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x1e, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, - 0x74, 0x5c, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x2a, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, - 0x69, 0x74, 0x5c, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, - 0x52, 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, - 0x3a, 0x3a, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, + 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x65, + 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, + 0x6c, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x45, 0x4d, 0xaa, 0x02, 0x1e, 0x52, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1e, 0x52, + 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x2a, + 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x52, 0x65, 0x67, + 0x65, 0x6e, 0x3a, 0x3a, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/regen/ecocredit/v1/events.pulsar.go b/api/regen/ecocredit/v1/events.pulsar.go index ab0a26940c..80f2afd6f3 100644 --- a/api/regen/ecocredit/v1/events.pulsar.go +++ b/api/regen/ecocredit/v1/events.pulsar.go @@ -3080,6 +3080,7 @@ var ( fd_EventRetire_batch_denom protoreflect.FieldDescriptor fd_EventRetire_amount protoreflect.FieldDescriptor fd_EventRetire_jurisdiction protoreflect.FieldDescriptor + fd_EventRetire_reason protoreflect.FieldDescriptor ) func init() { @@ -3089,6 +3090,7 @@ func init() { fd_EventRetire_batch_denom = md_EventRetire.Fields().ByName("batch_denom") fd_EventRetire_amount = md_EventRetire.Fields().ByName("amount") fd_EventRetire_jurisdiction = md_EventRetire.Fields().ByName("jurisdiction") + fd_EventRetire_reason = md_EventRetire.Fields().ByName("reason") } var _ protoreflect.Message = (*fastReflection_EventRetire)(nil) @@ -3180,6 +3182,12 @@ func (x *fastReflection_EventRetire) Range(f func(protoreflect.FieldDescriptor, return } } + if x.Reason != "" { + value := protoreflect.ValueOfString(x.Reason) + if !f(fd_EventRetire_reason, value) { + return + } + } } // Has reports whether a field is populated. @@ -3203,6 +3211,8 @@ func (x *fastReflection_EventRetire) Has(fd protoreflect.FieldDescriptor) bool { return x.Amount != "" case "regen.ecocredit.v1.EventRetire.jurisdiction": return x.Jurisdiction != "" + case "regen.ecocredit.v1.EventRetire.reason": + return x.Reason != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.EventRetire")) @@ -3227,6 +3237,8 @@ func (x *fastReflection_EventRetire) Clear(fd protoreflect.FieldDescriptor) { x.Amount = "" case "regen.ecocredit.v1.EventRetire.jurisdiction": x.Jurisdiction = "" + case "regen.ecocredit.v1.EventRetire.reason": + x.Reason = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.EventRetire")) @@ -3255,6 +3267,9 @@ func (x *fastReflection_EventRetire) Get(descriptor protoreflect.FieldDescriptor case "regen.ecocredit.v1.EventRetire.jurisdiction": value := x.Jurisdiction return protoreflect.ValueOfString(value) + case "regen.ecocredit.v1.EventRetire.reason": + value := x.Reason + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.EventRetire")) @@ -3283,6 +3298,8 @@ func (x *fastReflection_EventRetire) Set(fd protoreflect.FieldDescriptor, value x.Amount = value.Interface().(string) case "regen.ecocredit.v1.EventRetire.jurisdiction": x.Jurisdiction = value.Interface().(string) + case "regen.ecocredit.v1.EventRetire.reason": + x.Reason = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.EventRetire")) @@ -3311,6 +3328,8 @@ func (x *fastReflection_EventRetire) Mutable(fd protoreflect.FieldDescriptor) pr panic(fmt.Errorf("field amount of message regen.ecocredit.v1.EventRetire is not mutable")) case "regen.ecocredit.v1.EventRetire.jurisdiction": panic(fmt.Errorf("field jurisdiction of message regen.ecocredit.v1.EventRetire is not mutable")) + case "regen.ecocredit.v1.EventRetire.reason": + panic(fmt.Errorf("field reason of message regen.ecocredit.v1.EventRetire is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.EventRetire")) @@ -3332,6 +3351,8 @@ func (x *fastReflection_EventRetire) NewField(fd protoreflect.FieldDescriptor) p return protoreflect.ValueOfString("") case "regen.ecocredit.v1.EventRetire.jurisdiction": return protoreflect.ValueOfString("") + case "regen.ecocredit.v1.EventRetire.reason": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.EventRetire")) @@ -3417,6 +3438,10 @@ func (x *fastReflection_EventRetire) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.Reason) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -3446,6 +3471,13 @@ func (x *fastReflection_EventRetire) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Reason) > 0 { + i -= len(x.Reason) + copy(dAtA[i:], x.Reason) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Reason))) + i-- + dAtA[i] = 0x2a + } if len(x.Jurisdiction) > 0 { i -= len(x.Jurisdiction) copy(dAtA[i:], x.Jurisdiction) @@ -3651,6 +3683,38 @@ func (x *fastReflection_EventRetire) ProtoMethods() *protoiface.Methods { } x.Jurisdiction = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Reason", 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.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -8679,6 +8743,11 @@ type EventRetire struct { // fields conforming to ISO 3166-2, and postal-code being up to 64 // alphanumeric characters. Jurisdiction string `protobuf:"bytes,4,opt,name=jurisdiction,proto3" json:"jurisdiction,omitempty"` + // reason is any arbitrary string that specifies the reason for retiring + // credits. + // + // Since Revision 1 + Reason string `protobuf:"bytes,5,opt,name=reason,proto3" json:"reason,omitempty"` } func (x *EventRetire) Reset() { @@ -8729,6 +8798,13 @@ func (x *EventRetire) GetJurisdiction() string { return "" } +func (x *EventRetire) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + // EventCancel is an event emitted when credits are cancelled. When credits are // cancelled from multiple batches in the same transaction, a separate event is // emitted for each batch_denom. This allows for easier indexing. @@ -9218,7 +9294,7 @@ var file_regen_ecocredit_v1_events_proto_rawDesc = []byte{ 0x74, 0x72, 0x61, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x64, 0x41, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x80, 0x01, 0x0a, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x74, 0x69, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, @@ -9226,66 +9302,67 @@ var file_regen_ecocredit_v1_events_proto_rawDesc = []byte{ 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6a, 0x75, 0x72, 0x69, - 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x74, 0x0a, 0x0b, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1f, 0x0a, - 0x0b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x32, - 0x0a, 0x15, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, - 0x49, 0x64, 0x22, 0x34, 0x0a, 0x17, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x12, 0x19, 0x0a, - 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x18, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x22, - 0x38, 0x0a, 0x17, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x3b, 0x0a, 0x1a, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x31, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, - 0x65, 0x61, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x61, 0x74, 0x63, - 0x68, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, - 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x38, 0x0a, 0x12, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x41, 0x64, 0x64, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x22, 0x0a, 0x0c, 0x61, 0x62, 0x62, 0x72, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x62, 0x62, 0x72, 0x65, 0x76, 0x69, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x77, 0x0a, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x72, 0x69, 0x64, - 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 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, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x61, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x54, 0x0a, 0x12, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x22, 0x74, 0x0a, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, + 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x64, + 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x61, 0x74, 0x63, + 0x68, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x32, 0x0a, 0x15, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, + 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x22, 0x34, 0x0a, 0x17, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x73, + 0x73, 0x75, 0x65, 0x72, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, + 0x22, 0x35, 0x0a, 0x18, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x17, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, - 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6e, - 0x6f, 0x6d, 0x42, 0xd9, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, - 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, - 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x65, 0x63, - 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x63, 0x6f, 0x63, 0x72, - 0x65, 0x64, 0x69, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x45, 0x58, 0xaa, 0x02, 0x12, 0x52, - 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x12, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, - 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, - 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x3a, - 0x3a, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x22, 0x3b, 0x0a, 0x1a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x31, + 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x61, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6e, 0x6f, + 0x6d, 0x22, 0x38, 0x0a, 0x12, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x43, 0x72, 0x65, + 0x64, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x62, 0x62, 0x72, 0x65, + 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, + 0x62, 0x62, 0x72, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x77, 0x0a, 0x0b, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 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, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x54, 0x0a, 0x12, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x61, 0x74, + 0x63, 0x68, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x42, 0xd9, 0x01, 0x0a, 0x16, 0x63, + 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, + 0x69, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, + 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2f, + 0x76, 0x31, 0x3b, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x52, 0x45, 0x58, 0xaa, 0x02, 0x12, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x45, 0x63, 0x6f, + 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x52, 0x65, 0x67, 0x65, + 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x1e, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x14, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, + 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/regen/ecocredit/v1/tx.pulsar.go b/api/regen/ecocredit/v1/tx.pulsar.go index eeff5bc7fc..ffd9f1d536 100644 --- a/api/regen/ecocredit/v1/tx.pulsar.go +++ b/api/regen/ecocredit/v1/tx.pulsar.go @@ -7060,6 +7060,7 @@ var ( fd_MsgSend_SendCredits_tradable_amount protoreflect.FieldDescriptor fd_MsgSend_SendCredits_retired_amount protoreflect.FieldDescriptor fd_MsgSend_SendCredits_retirement_jurisdiction protoreflect.FieldDescriptor + fd_MsgSend_SendCredits_retirement_reason protoreflect.FieldDescriptor ) func init() { @@ -7069,6 +7070,7 @@ func init() { fd_MsgSend_SendCredits_tradable_amount = md_MsgSend_SendCredits.Fields().ByName("tradable_amount") fd_MsgSend_SendCredits_retired_amount = md_MsgSend_SendCredits.Fields().ByName("retired_amount") fd_MsgSend_SendCredits_retirement_jurisdiction = md_MsgSend_SendCredits.Fields().ByName("retirement_jurisdiction") + fd_MsgSend_SendCredits_retirement_reason = md_MsgSend_SendCredits.Fields().ByName("retirement_reason") } var _ protoreflect.Message = (*fastReflection_MsgSend_SendCredits)(nil) @@ -7160,6 +7162,12 @@ func (x *fastReflection_MsgSend_SendCredits) Range(f func(protoreflect.FieldDesc return } } + if x.RetirementReason != "" { + value := protoreflect.ValueOfString(x.RetirementReason) + if !f(fd_MsgSend_SendCredits_retirement_reason, value) { + return + } + } } // Has reports whether a field is populated. @@ -7183,6 +7191,8 @@ func (x *fastReflection_MsgSend_SendCredits) Has(fd protoreflect.FieldDescriptor return x.RetiredAmount != "" case "regen.ecocredit.v1.MsgSend.SendCredits.retirement_jurisdiction": return x.RetirementJurisdiction != "" + case "regen.ecocredit.v1.MsgSend.SendCredits.retirement_reason": + return x.RetirementReason != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.MsgSend.SendCredits")) @@ -7207,6 +7217,8 @@ func (x *fastReflection_MsgSend_SendCredits) Clear(fd protoreflect.FieldDescript x.RetiredAmount = "" case "regen.ecocredit.v1.MsgSend.SendCredits.retirement_jurisdiction": x.RetirementJurisdiction = "" + case "regen.ecocredit.v1.MsgSend.SendCredits.retirement_reason": + x.RetirementReason = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.MsgSend.SendCredits")) @@ -7235,6 +7247,9 @@ func (x *fastReflection_MsgSend_SendCredits) Get(descriptor protoreflect.FieldDe case "regen.ecocredit.v1.MsgSend.SendCredits.retirement_jurisdiction": value := x.RetirementJurisdiction return protoreflect.ValueOfString(value) + case "regen.ecocredit.v1.MsgSend.SendCredits.retirement_reason": + value := x.RetirementReason + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.MsgSend.SendCredits")) @@ -7263,6 +7278,8 @@ func (x *fastReflection_MsgSend_SendCredits) Set(fd protoreflect.FieldDescriptor x.RetiredAmount = value.Interface().(string) case "regen.ecocredit.v1.MsgSend.SendCredits.retirement_jurisdiction": x.RetirementJurisdiction = value.Interface().(string) + case "regen.ecocredit.v1.MsgSend.SendCredits.retirement_reason": + x.RetirementReason = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.MsgSend.SendCredits")) @@ -7291,6 +7308,8 @@ func (x *fastReflection_MsgSend_SendCredits) Mutable(fd protoreflect.FieldDescri panic(fmt.Errorf("field retired_amount of message regen.ecocredit.v1.MsgSend.SendCredits is not mutable")) case "regen.ecocredit.v1.MsgSend.SendCredits.retirement_jurisdiction": panic(fmt.Errorf("field retirement_jurisdiction of message regen.ecocredit.v1.MsgSend.SendCredits is not mutable")) + case "regen.ecocredit.v1.MsgSend.SendCredits.retirement_reason": + panic(fmt.Errorf("field retirement_reason of message regen.ecocredit.v1.MsgSend.SendCredits is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.MsgSend.SendCredits")) @@ -7312,6 +7331,8 @@ func (x *fastReflection_MsgSend_SendCredits) NewField(fd protoreflect.FieldDescr return protoreflect.ValueOfString("") case "regen.ecocredit.v1.MsgSend.SendCredits.retirement_jurisdiction": return protoreflect.ValueOfString("") + case "regen.ecocredit.v1.MsgSend.SendCredits.retirement_reason": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.MsgSend.SendCredits")) @@ -7397,6 +7418,10 @@ func (x *fastReflection_MsgSend_SendCredits) ProtoMethods() *protoiface.Methods if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.RetirementReason) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -7426,6 +7451,13 @@ func (x *fastReflection_MsgSend_SendCredits) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.RetirementReason) > 0 { + i -= len(x.RetirementReason) + copy(dAtA[i:], x.RetirementReason) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RetirementReason))) + i-- + dAtA[i] = 0x2a + } if len(x.RetirementJurisdiction) > 0 { i -= len(x.RetirementJurisdiction) copy(dAtA[i:], x.RetirementJurisdiction) @@ -7631,6 +7663,38 @@ func (x *fastReflection_MsgSend_SendCredits) ProtoMethods() *protoiface.Methods } x.RetirementJurisdiction = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RetirementReason", 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.RetirementReason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -8078,6 +8142,7 @@ var ( fd_MsgRetire_owner protoreflect.FieldDescriptor fd_MsgRetire_credits protoreflect.FieldDescriptor fd_MsgRetire_jurisdiction protoreflect.FieldDescriptor + fd_MsgRetire_reason protoreflect.FieldDescriptor ) func init() { @@ -8086,6 +8151,7 @@ func init() { fd_MsgRetire_owner = md_MsgRetire.Fields().ByName("owner") fd_MsgRetire_credits = md_MsgRetire.Fields().ByName("credits") fd_MsgRetire_jurisdiction = md_MsgRetire.Fields().ByName("jurisdiction") + fd_MsgRetire_reason = md_MsgRetire.Fields().ByName("reason") } var _ protoreflect.Message = (*fastReflection_MsgRetire)(nil) @@ -8171,6 +8237,12 @@ func (x *fastReflection_MsgRetire) Range(f func(protoreflect.FieldDescriptor, pr return } } + if x.Reason != "" { + value := protoreflect.ValueOfString(x.Reason) + if !f(fd_MsgRetire_reason, value) { + return + } + } } // Has reports whether a field is populated. @@ -8192,6 +8264,8 @@ func (x *fastReflection_MsgRetire) Has(fd protoreflect.FieldDescriptor) bool { return len(x.Credits) != 0 case "regen.ecocredit.v1.MsgRetire.jurisdiction": return x.Jurisdiction != "" + case "regen.ecocredit.v1.MsgRetire.reason": + return x.Reason != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.MsgRetire")) @@ -8214,6 +8288,8 @@ func (x *fastReflection_MsgRetire) Clear(fd protoreflect.FieldDescriptor) { x.Credits = nil case "regen.ecocredit.v1.MsgRetire.jurisdiction": x.Jurisdiction = "" + case "regen.ecocredit.v1.MsgRetire.reason": + x.Reason = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.MsgRetire")) @@ -8242,6 +8318,9 @@ func (x *fastReflection_MsgRetire) Get(descriptor protoreflect.FieldDescriptor) case "regen.ecocredit.v1.MsgRetire.jurisdiction": value := x.Jurisdiction return protoreflect.ValueOfString(value) + case "regen.ecocredit.v1.MsgRetire.reason": + value := x.Reason + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.MsgRetire")) @@ -8270,6 +8349,8 @@ func (x *fastReflection_MsgRetire) Set(fd protoreflect.FieldDescriptor, value pr x.Credits = *clv.list case "regen.ecocredit.v1.MsgRetire.jurisdiction": x.Jurisdiction = value.Interface().(string) + case "regen.ecocredit.v1.MsgRetire.reason": + x.Reason = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.MsgRetire")) @@ -8300,6 +8381,8 @@ func (x *fastReflection_MsgRetire) Mutable(fd protoreflect.FieldDescriptor) prot panic(fmt.Errorf("field owner of message regen.ecocredit.v1.MsgRetire is not mutable")) case "regen.ecocredit.v1.MsgRetire.jurisdiction": panic(fmt.Errorf("field jurisdiction of message regen.ecocredit.v1.MsgRetire is not mutable")) + case "regen.ecocredit.v1.MsgRetire.reason": + panic(fmt.Errorf("field reason of message regen.ecocredit.v1.MsgRetire is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.MsgRetire")) @@ -8320,6 +8403,8 @@ func (x *fastReflection_MsgRetire) NewField(fd protoreflect.FieldDescriptor) pro return protoreflect.ValueOfList(&_MsgRetire_2_list{list: &list}) case "regen.ecocredit.v1.MsgRetire.jurisdiction": return protoreflect.ValueOfString("") + case "regen.ecocredit.v1.MsgRetire.reason": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.MsgRetire")) @@ -8403,6 +8488,10 @@ func (x *fastReflection_MsgRetire) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.Reason) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -8432,6 +8521,13 @@ func (x *fastReflection_MsgRetire) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Reason) > 0 { + i -= len(x.Reason) + copy(dAtA[i:], x.Reason) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Reason))) + i-- + dAtA[i] = 0x22 + } if len(x.Jurisdiction) > 0 { i -= len(x.Jurisdiction) copy(dAtA[i:], x.Jurisdiction) @@ -8609,6 +8705,38 @@ func (x *fastReflection_MsgRetire) ProtoMethods() *protoiface.Methods { } x.Jurisdiction = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Reason", 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.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -23977,6 +24105,11 @@ type MsgRetire struct { // sub-national-code and postal-code are optional and can be added for // increased precision. Jurisdiction string `protobuf:"bytes,3,opt,name=jurisdiction,proto3" json:"jurisdiction,omitempty"` + // reason is any arbitrary string that specifies the reason for retiring + // credits. + // + // Since Revision 1 + Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"` } func (x *MsgRetire) Reset() { @@ -24020,6 +24153,13 @@ func (x *MsgRetire) GetJurisdiction() string { return "" } +func (x *MsgRetire) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + // MsgRetire is the Msg/Retire response type. type MsgRetireResponse struct { state protoimpl.MessageState @@ -25269,6 +25409,12 @@ type MsgSend_SendCredits struct { // country-code is required, while the sub-national-code and postal-code are // optional and can be added for increased precision. RetirementJurisdiction string `protobuf:"bytes,4,opt,name=retirement_jurisdiction,json=retirementJurisdiction,proto3" json:"retirement_jurisdiction,omitempty"` + // retirement_reason is any arbitrary string that specifies the reason for + // retiring credits. This field is only required if retired_amount is + // positive. + // + // Since Revision 1 + RetirementReason string `protobuf:"bytes,5,opt,name=retirement_reason,json=retirementReason,proto3" json:"retirement_reason,omitempty"` } func (x *MsgSend_SendCredits) Reset() { @@ -25319,6 +25465,13 @@ func (x *MsgSend_SendCredits) GetRetirementJurisdiction() string { return "" } +func (x *MsgSend_SendCredits) GetRetirementReason() string { + if x != nil { + return x.RetirementReason + } + return "" +} + // Batch defines the credit batch information for the bridged credits. This // information will be used to create a credit batch or to dynamically mint // credits to an existing credit batch. @@ -25560,7 +25713,7 @@ var file_regen_ecocredit_v1_tx_proto_rawDesc = []byte{ 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x22, 0x16, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x61, 0x6c, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc9, 0x02, 0x0a, 0x07, + 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf6, 0x02, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, @@ -25569,7 +25722,7 @@ var file_regen_ecocredit_v1_tx_proto_rawDesc = []byte{ 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x52, 0x07, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, - 0x1a, 0xb7, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, + 0x1a, 0xe4, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6d, @@ -25580,344 +25733,349 @@ var file_regen_ecocredit_v1_tx_proto_rawDesc = []byte{ 0x74, 0x12, 0x37, 0x0a, 0x17, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4a, 0x75, - 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, - 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x53, 0x65, - 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x09, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x74, 0x69, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x35, - 0x0a, 0x07, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x52, 0x07, 0x63, 0x72, - 0x65, 0x64, 0x69, 0x74, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6a, 0x75, 0x72, - 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x74, 0x69, - 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7c, 0x0a, 0x09, 0x4d, 0x73, - 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x35, 0x0a, - 0x07, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x52, 0x07, 0x63, 0x72, 0x65, - 0x64, 0x69, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x3a, 0x0a, 0x82, 0xe7, - 0xb0, 0x2a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, 0x0a, - 0x13, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x41, - 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, - 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, - 0x61, 0x73, 0x73, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x41, 0x64, 0x6d, - 0x69, 0x6e, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x1d, - 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9c, 0x01, - 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x19, 0x0a, - 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x64, 0x64, 0x5f, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, - 0x64, 0x64, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, - 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x1f, 0x0a, 0x1d, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x73, - 0x73, 0x75, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x78, 0x0a, - 0x16, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x19, 0x0a, - 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x6e, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, - 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x20, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x75, 0x0a, 0x15, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x64, 0x6d, - 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, + 0x74, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x09, 0x4d, 0x73, 0x67, 0x52, + 0x65, 0x74, 0x69, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x07, 0x63, + 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, + 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x52, 0x07, 0x63, 0x72, 0x65, 0x64, 0x69, + 0x74, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6a, 0x75, 0x72, 0x69, 0x73, 0x64, + 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x3a, 0x0a, + 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x74, 0x69, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x7c, 0x0a, 0x09, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x12, 0x35, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, + 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, + 0x52, 0x07, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x13, 0x0a, + 0x11, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x6f, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, + 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, + 0x77, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, + 0x65, 0x77, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x61, 0x64, 0x64, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x61, 0x64, 0x64, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x12, 0x25, + 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x49, 0x73, + 0x73, 0x75, 0x65, 0x72, 0x73, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x78, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x12, 0x21, 0x0a, + 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x20, 0x0a, 0x1e, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x75, + 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x6e, 0x65, 0x77, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6e, 0x65, 0x77, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7e, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x41, - 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x7e, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, - 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x09, 0x4d, 0x73, 0x67, 0x42, 0x72, 0x69, - 0x64, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, - 0x35, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, - 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x52, 0x07, 0x63, - 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdf, 0x04, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x42, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, - 0x73, 0x75, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x12, - 0x46, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2c, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, - 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x40, 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, - 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x2e, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x12, 0x39, 0x0a, 0x09, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x72, - 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x54, 0x78, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x54, 0x78, 0x1a, 0xd7, 0x01, 0x0a, 0x05, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1c, - 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, - 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x64, 0x61, 0x74, - 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, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, - 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x6c, - 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, - 0x6a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x6a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x0b, 0x82, 0xe7, - 0xb0, 0x2a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x22, 0x5a, 0x0a, 0x18, 0x4d, 0x73, 0x67, - 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x64, - 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x61, 0x74, 0x63, - 0x68, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x5c, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, - 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x61, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, + 0x65, 0x77, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, + 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x09, 0x4d, + 0x73, 0x67, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x16, + 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, + 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, + 0x69, 0x65, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, + 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x69, + 0x74, 0x73, 0x52, 0x07, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, + 0x2a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x42, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdf, 0x04, 0x0a, + 0x10, 0x4d, 0x73, 0x67, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, + 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x40, 0x0a, 0x05, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x12, 0x39, + 0x0a, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, + 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x54, 0x78, 0x52, + 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x54, 0x78, 0x1a, 0xd7, 0x01, 0x0a, 0x05, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, + 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x65, 0x6e, + 0x64, 0x5f, 0x64, 0x61, 0x74, 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, 0x07, + 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x1a, 0x6c, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x21, + 0x0a, 0x0c, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x6a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x22, 0x5a, + 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x5c, 0x0a, 0x12, 0x4d, 0x73, + 0x67, 0x41, 0x64, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, + 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x65, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x53, + 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x6c, + 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, + 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, + 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, + 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6e, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x46, 0x65, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x22, 0x65, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, - 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x73, - 0x67, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x5f, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, - 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x6e, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x46, 0x65, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x03, 0x66, 0x65, 0x65, 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, 0x03, 0x66, 0x65, - 0x65, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, - 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x41, 0x64, - 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6a, 0x0a, 0x1b, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x72, 0x69, 0x64, 0x67, - 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8f, - 0x12, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5d, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x22, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, - 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x1a, 0x2a, 0x2e, 0x72, 0x65, 0x67, 0x65, - 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, - 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x2c, 0x2e, 0x72, - 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0b, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x22, 0x2e, 0x72, 0x65, 0x67, 0x65, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x03, 0x66, 0x65, 0x65, + 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, 0x03, 0x66, 0x65, 0x65, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x41, 0x6c, 0x6c, + 0x6f, 0x77, 0x65, 0x64, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, + 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x0e, 0x82, 0xe7, + 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x22, 0x0a, 0x20, + 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x6a, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, + 0x6f, 0x77, 0x65, 0x64, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, + 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x0e, 0x82, 0xe7, + 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x25, 0x0a, 0x23, + 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, + 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x32, 0x8f, 0x12, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5d, 0x0a, 0x0b, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x22, 0x2e, 0x72, 0x65, 0x67, + 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x1a, 0x2a, + 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0d, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x1a, 0x2c, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, + 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5d, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x22, + 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x1a, 0x2a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, + 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, + 0x0a, 0x10, 0x4d, 0x69, 0x6e, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x64, 0x69, + 0x74, 0x73, 0x12, 0x27, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, + 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x1a, 0x2f, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, + 0x64, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x09, + 0x53, 0x65, 0x61, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x2a, 0x2e, - 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, - 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x10, 0x4d, 0x69, 0x6e, - 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x12, 0x27, 0x2e, + 0x73, 0x67, 0x53, 0x65, 0x61, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x28, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x61, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x04, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x1b, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, - 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x1a, 0x2f, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, - 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, - 0x69, 0x6e, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x09, 0x53, 0x65, 0x61, 0x6c, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, - 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x61, - 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x28, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, - 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, - 0x65, 0x61, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x48, 0x0a, 0x04, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x1b, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x1a, 0x23, 0x2e, 0x72, 0x65, 0x67, + 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4e, 0x0a, 0x06, 0x52, 0x65, 0x74, 0x69, 0x72, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x65, 0x67, 0x65, + 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x52, 0x65, 0x74, 0x69, 0x72, 0x65, 0x1a, 0x25, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x53, 0x65, 0x6e, 0x64, 0x1a, 0x23, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, - 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, - 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x52, 0x65, - 0x74, 0x69, 0x72, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, - 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x74, - 0x69, 0x72, 0x65, 0x1a, 0x25, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, - 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x74, 0x69, - 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x1d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, - 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x1a, 0x25, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, - 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x10, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x27, + 0x67, 0x52, 0x65, 0x74, 0x69, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4e, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x1d, 0x2e, 0x72, 0x65, 0x67, 0x65, + 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x1a, 0x25, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, + 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x6c, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x12, 0x27, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, + 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x2f, 0x2e, 0x72, + 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, + 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x73, 0x73, 0x75, + 0x65, 0x72, 0x73, 0x12, 0x29, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, + 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x1a, 0x31, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x2f, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, - 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x73, 0x73, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x75, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, + 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x1a, 0x32, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, + 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x12, 0x29, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x29, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x1a, 0x31, 0x2e, 0x72, 0x65, 0x67, 0x65, - 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x73, 0x73, - 0x75, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x13, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x2a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, - 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, - 0x32, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x29, 0x2e, 0x72, 0x65, 0x67, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x31, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, - 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x31, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, - 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7b, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x2c, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, - 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x34, - 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x12, 0x1d, - 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x1a, 0x25, 0x2e, - 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0d, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x12, 0x24, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, - 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x1a, 0x2c, 0x2e, 0x72, 0x65, - 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0d, 0x41, 0x64, 0x64, - 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x2e, 0x72, 0x65, 0x67, + 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7b, 0x0a, 0x15, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, + 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x1a, 0x34, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, + 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x42, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, + 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x72, 0x69, 0x64, + 0x67, 0x65, 0x1a, 0x25, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, + 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0d, 0x42, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x12, 0x24, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x4d, 0x73, 0x67, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x1a, 0x2c, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, - 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x72, 0x65, 0x64, - 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x84, - 0x01, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x2f, 0x2e, 0x72, 0x65, - 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x72, - 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x6f, 0x72, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x26, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, - 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x41, 0x64, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, - 0x1a, 0x2e, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, - 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x72, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x29, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, - 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, - 0x72, 0x1a, 0x31, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, - 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x46, 0x65, 0x65, 0x12, 0x25, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, - 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x46, 0x65, 0x65, 0x1a, 0x2d, 0x2e, + 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, + 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x24, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x72, 0x65, 0x64, 0x69, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x2c, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, + 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, + 0x64, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, + 0x12, 0x2f, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, + 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, + 0x74, 0x1a, 0x37, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, + 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x0f, 0x41, 0x64, + 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x26, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7b, 0x0a, 0x15, - 0x41, 0x64, 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x2c, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x2e, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, - 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x1a, 0x34, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, - 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x41, - 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x18, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x72, 0x69, 0x64, 0x67, - 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x2f, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, + 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x29, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x31, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x72, 0x69, 0x64, - 0x67, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x1a, 0x37, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, - 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x72, 0x69, - 0x64, 0x67, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0xd5, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, - 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, - 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x52, 0x45, 0x58, 0xaa, 0x02, 0x12, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x45, - 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x52, 0x65, - 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x1e, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, - 0x69, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x14, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x45, 0x63, 0x6f, 0x63, 0x72, - 0x65, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x0e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x46, 0x65, 0x65, 0x12, 0x25, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x46, + 0x65, 0x65, 0x1a, 0x2d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, + 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x7b, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x2c, 0x2e, 0x72, 0x65, 0x67, + 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x1a, 0x34, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, + 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x41, 0x64, 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x84, + 0x01, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, + 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x2f, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, + 0x64, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x1a, 0x37, 0x2e, 0x72, + 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, + 0x65, 0x64, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xd5, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, + 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, + 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x65, 0x63, 0x6f, + 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, + 0x64, 0x69, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x45, 0x58, 0xaa, 0x02, 0x12, 0x52, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x12, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, + 0x69, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, + 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, + 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/regen/ecocredit/v1/types.pulsar.go b/api/regen/ecocredit/v1/types.pulsar.go index 5935e81229..8da7959b81 100644 --- a/api/regen/ecocredit/v1/types.pulsar.go +++ b/api/regen/ecocredit/v1/types.pulsar.go @@ -1314,6 +1314,7 @@ var ( fd_BatchIssuance_tradable_amount protoreflect.FieldDescriptor fd_BatchIssuance_retired_amount protoreflect.FieldDescriptor fd_BatchIssuance_retirement_jurisdiction protoreflect.FieldDescriptor + fd_BatchIssuance_retirement_reason protoreflect.FieldDescriptor ) func init() { @@ -1323,6 +1324,7 @@ func init() { fd_BatchIssuance_tradable_amount = md_BatchIssuance.Fields().ByName("tradable_amount") fd_BatchIssuance_retired_amount = md_BatchIssuance.Fields().ByName("retired_amount") fd_BatchIssuance_retirement_jurisdiction = md_BatchIssuance.Fields().ByName("retirement_jurisdiction") + fd_BatchIssuance_retirement_reason = md_BatchIssuance.Fields().ByName("retirement_reason") } var _ protoreflect.Message = (*fastReflection_BatchIssuance)(nil) @@ -1414,6 +1416,12 @@ func (x *fastReflection_BatchIssuance) Range(f func(protoreflect.FieldDescriptor return } } + if x.RetirementReason != "" { + value := protoreflect.ValueOfString(x.RetirementReason) + if !f(fd_BatchIssuance_retirement_reason, value) { + return + } + } } // Has reports whether a field is populated. @@ -1437,6 +1445,8 @@ func (x *fastReflection_BatchIssuance) Has(fd protoreflect.FieldDescriptor) bool return x.RetiredAmount != "" case "regen.ecocredit.v1.BatchIssuance.retirement_jurisdiction": return x.RetirementJurisdiction != "" + case "regen.ecocredit.v1.BatchIssuance.retirement_reason": + return x.RetirementReason != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.BatchIssuance")) @@ -1461,6 +1471,8 @@ func (x *fastReflection_BatchIssuance) Clear(fd protoreflect.FieldDescriptor) { x.RetiredAmount = "" case "regen.ecocredit.v1.BatchIssuance.retirement_jurisdiction": x.RetirementJurisdiction = "" + case "regen.ecocredit.v1.BatchIssuance.retirement_reason": + x.RetirementReason = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.BatchIssuance")) @@ -1489,6 +1501,9 @@ func (x *fastReflection_BatchIssuance) Get(descriptor protoreflect.FieldDescript case "regen.ecocredit.v1.BatchIssuance.retirement_jurisdiction": value := x.RetirementJurisdiction return protoreflect.ValueOfString(value) + case "regen.ecocredit.v1.BatchIssuance.retirement_reason": + value := x.RetirementReason + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.BatchIssuance")) @@ -1517,6 +1532,8 @@ func (x *fastReflection_BatchIssuance) Set(fd protoreflect.FieldDescriptor, valu x.RetiredAmount = value.Interface().(string) case "regen.ecocredit.v1.BatchIssuance.retirement_jurisdiction": x.RetirementJurisdiction = value.Interface().(string) + case "regen.ecocredit.v1.BatchIssuance.retirement_reason": + x.RetirementReason = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.BatchIssuance")) @@ -1545,6 +1562,8 @@ func (x *fastReflection_BatchIssuance) Mutable(fd protoreflect.FieldDescriptor) panic(fmt.Errorf("field retired_amount of message regen.ecocredit.v1.BatchIssuance is not mutable")) case "regen.ecocredit.v1.BatchIssuance.retirement_jurisdiction": panic(fmt.Errorf("field retirement_jurisdiction of message regen.ecocredit.v1.BatchIssuance is not mutable")) + case "regen.ecocredit.v1.BatchIssuance.retirement_reason": + panic(fmt.Errorf("field retirement_reason of message regen.ecocredit.v1.BatchIssuance is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.BatchIssuance")) @@ -1566,6 +1585,8 @@ func (x *fastReflection_BatchIssuance) NewField(fd protoreflect.FieldDescriptor) return protoreflect.ValueOfString("") case "regen.ecocredit.v1.BatchIssuance.retirement_jurisdiction": return protoreflect.ValueOfString("") + case "regen.ecocredit.v1.BatchIssuance.retirement_reason": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1.BatchIssuance")) @@ -1651,6 +1672,10 @@ func (x *fastReflection_BatchIssuance) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.RetirementReason) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1680,6 +1705,13 @@ func (x *fastReflection_BatchIssuance) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.RetirementReason) > 0 { + i -= len(x.RetirementReason) + copy(dAtA[i:], x.RetirementReason) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RetirementReason))) + i-- + dAtA[i] = 0x2a + } if len(x.RetirementJurisdiction) > 0 { i -= len(x.RetirementJurisdiction) copy(dAtA[i:], x.RetirementJurisdiction) @@ -1885,6 +1917,38 @@ func (x *fastReflection_BatchIssuance) ProtoMethods() *protoiface.Methods { } x.RetirementJurisdiction = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RetirementReason", 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.RetirementReason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3253,6 +3317,12 @@ type BatchIssuance struct { // sub-national-code and postal-code are optional and can be added for // increased precision. RetirementJurisdiction string `protobuf:"bytes,4,opt,name=retirement_jurisdiction,json=retirementJurisdiction,proto3" json:"retirement_jurisdiction,omitempty"` + // retirement_reason is any arbitrary string that specifies the reason for + // retiring credits. The reason will be included in EventRetire and is not + // stored in state. + // + // Since Revision 1 + RetirementReason string `protobuf:"bytes,5,opt,name=retirement_reason,json=retirementReason,proto3" json:"retirement_reason,omitempty"` } func (x *BatchIssuance) Reset() { @@ -3303,6 +3373,13 @@ func (x *BatchIssuance) GetRetirementJurisdiction() string { return "" } +func (x *BatchIssuance) GetRetirementReason() string { + if x != nil { + return x.RetirementReason + } + return "" +} + // OriginTx is the transaction from another chain or registry that triggered // the minting of credits. type OriginTx struct { @@ -3470,7 +3547,7 @@ var file_regen_ecocredit_v1_types_proto_rawDesc = []byte{ 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0xb6, 0x01, 0x0a, 0x0d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x73, 0x73, 0x75, 0x61, 0x6e, 0x63, + 0xe3, 0x01, 0x0a, 0x0d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x73, 0x73, 0x75, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6d, 0x6f, 0x75, @@ -3481,37 +3558,40 @@ var file_regen_ecocredit_v1_types_proto_rawDesc = []byte{ 0x37, 0x0a, 0x17, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4a, 0x75, 0x72, 0x69, - 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x62, 0x0a, 0x08, 0x4f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x74, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x22, 0x93, 0x01, 0x0a, - 0x12, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0b, 0x63, - 0x72, 0x65, 0x64, 0x69, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, - 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x04, 0x98, 0xa0, - 0x1f, 0x00, 0x42, 0xd8, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, - 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, - 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x65, 0x63, 0x6f, - 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, - 0x64, 0x69, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x45, 0x58, 0xaa, 0x02, 0x12, 0x52, 0x65, - 0x67, 0x65, 0x6e, 0x2e, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x12, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, - 0x69, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, - 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, - 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x74, 0x69, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x62, 0x0a, 0x08, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x54, + 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x12, 0x43, 0x72, + 0x65, 0x64, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, + 0x69, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x63, + 0x72, 0x65, 0x64, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x04, 0x98, 0xa0, 0x1f, 0x00, 0x42, + 0xd8, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, + 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, + 0x64, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x45, 0x58, 0xaa, 0x02, 0x12, 0x52, 0x65, 0x67, 0x65, 0x6e, + 0x2e, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, + 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, + 0x65, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x45, 0x63, 0x6f, + 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/proto/regen/ecocredit/basket/v1/tx.proto b/proto/regen/ecocredit/basket/v1/tx.proto index 2a996df95a..a663c74155 100644 --- a/proto/regen/ecocredit/basket/v1/tx.proto +++ b/proto/regen/ecocredit/basket/v1/tx.proto @@ -181,6 +181,13 @@ message MsgTake { // // Since Revision 1 string retirement_jurisdiction = 6; + + // retirement_reason is any arbitrary string that specifies the reason for + // retiring credits. The reason will be included in EventRetire and is not + // stored in state. + // + // Since Revision 2 + string retirement_reason = 7; } // MsgTakeFromBasketResponse is the Msg/TakeFromBasket response type. diff --git a/proto/regen/ecocredit/marketplace/v1/tx.proto b/proto/regen/ecocredit/marketplace/v1/tx.proto index f36dae88e0..aaa8077357 100644 --- a/proto/regen/ecocredit/marketplace/v1/tx.proto +++ b/proto/regen/ecocredit/marketplace/v1/tx.proto @@ -167,6 +167,13 @@ message MsgBuyDirect { // retirement_jurisdiction is the optional retirement jurisdiction for the // credits which will be used only if disable_auto_retire is false. string retirement_jurisdiction = 6; + + // retirement_reason is any arbitrary string that specifies the reason for + // retiring credits. The reason will be included in EventRetire and is not + // stored in state. + // + // Since Revision 2 + string retirement_reason = 7; } } diff --git a/proto/regen/ecocredit/v1/events.proto b/proto/regen/ecocredit/v1/events.proto index a535dc58aa..b9911e397c 100644 --- a/proto/regen/ecocredit/v1/events.proto +++ b/proto/regen/ecocredit/v1/events.proto @@ -110,6 +110,12 @@ message EventRetire { // fields conforming to ISO 3166-2, and postal-code being up to 64 // alphanumeric characters. string jurisdiction = 4; + + // reason is any arbitrary string that specifies the reason for retiring + // credits. + // + // Since Revision 1 + string reason = 5; } // EventCancel is an event emitted when credits are cancelled. When credits are diff --git a/proto/regen/ecocredit/v1/tx.proto b/proto/regen/ecocredit/v1/tx.proto index a72f0f7ff5..5389e70ed9 100644 --- a/proto/regen/ecocredit/v1/tx.proto +++ b/proto/regen/ecocredit/v1/tx.proto @@ -385,6 +385,13 @@ message MsgSend { // country-code is required, while the sub-national-code and postal-code are // optional and can be added for increased precision. string retirement_jurisdiction = 4; + + // retirement_reason is any arbitrary string that specifies the reason for + // retiring credits. This field is only required if retired_amount is + // positive. + // + // Since Revision 1 + string retirement_reason = 5; } } @@ -409,6 +416,12 @@ message MsgRetire { // sub-national-code and postal-code are optional and can be added for // increased precision. string jurisdiction = 3; + + // reason is any arbitrary string that specifies the reason for retiring + // credits. + // + // Since Revision 1 + string reason = 4; } // MsgRetire is the Msg/Retire response type. diff --git a/proto/regen/ecocredit/v1/types.proto b/proto/regen/ecocredit/v1/types.proto index fd7029d898..54c2528a57 100644 --- a/proto/regen/ecocredit/v1/types.proto +++ b/proto/regen/ecocredit/v1/types.proto @@ -75,6 +75,13 @@ message BatchIssuance { // sub-national-code and postal-code are optional and can be added for // increased precision. string retirement_jurisdiction = 4; + + // retirement_reason is any arbitrary string that specifies the reason for + // retiring credits. The reason will be included in EventRetire and is not + // stored in state. + // + // Since Revision 1 + string retirement_reason = 5; } // OriginTx is the transaction from another chain or registry that triggered diff --git a/x/ecocredit/base/keeper/features/msg_create_batch.feature b/x/ecocredit/base/keeper/features/msg_create_batch.feature index 0a46b36521..732a3e1c1e 100644 --- a/x/ecocredit/base/keeper/features/msg_create_batch.feature +++ b/x/ecocredit/base/keeper/features/msg_create_batch.feature @@ -417,19 +417,20 @@ Feature: Msg/CreateBatch And a credit class with class id "C01" and issuer alice And a project with project id "C01-001" - Scenario: Event EventRetire is emitted - When creates a batch from project "C01-001" and issues "10" retired credits to "regen1sl2dsfyf2znn48ehwqg28cv3nuglxkx4h7q5l8" from "US-WA" + Scenario: Event EventRetire is emitted + When creates a batch from project "C01-001" and issues "10" retired credits to "regen1sl2dsfyf2znn48ehwqg28cv3nuglxkx4h7q5l8" from "US-WA" with reason "offsetting electricity consumption" Then expect event retire with properties """ { "owner": "regen1sl2dsfyf2znn48ehwqg28cv3nuglxkx4h7q5l8", "batch_denom": "C01-001-20200101-20210101-001", "amount": "10", - "jurisdiction": "US-WA" + "jurisdiction": "US-WA", + "reason": "offsetting electricity consumption" } """ - Scenario: Event EventMint is emitted + Scenario: Event EventMint is emitted When creates a batch from project "C01-001" and issues "10" retired credits to "regen1sl2dsfyf2znn48ehwqg28cv3nuglxkx4h7q5l8" from "US-WA" Then expect event mint with properties """ @@ -440,7 +441,7 @@ Feature: Msg/CreateBatch } """ - Scenario: Event EventTransfer is emitted + Scenario: Event EventTransfer is emitted When creates a batch from project "C01-001" and issues "10" retired credits to "regen1sl2dsfyf2znn48ehwqg28cv3nuglxkx4h7q5l8" from "US-WA" Then expect event transfer with properties """ @@ -453,7 +454,7 @@ Feature: Msg/CreateBatch } """ - Scenario: Event EventCreateBatch is emitted + Scenario: Event EventCreateBatch is emitted When creates a batch from project "C01-001" and issues "10" retired credits to "regen1sl2dsfyf2znn48ehwqg28cv3nuglxkx4h7q5l8" from "US-WA" Then expect event create batch with properties """ @@ -462,7 +463,7 @@ Feature: Msg/CreateBatch } """ - Scenario: Event EventMint is emitted + Scenario: Event EventMint is emitted When creates a batch from project "C01-001" and issues "10" tradable credits to "regen1sl2dsfyf2znn48ehwqg28cv3nuglxkx4h7q5l8" Then expect event mint with properties """ @@ -473,7 +474,7 @@ Feature: Msg/CreateBatch } """ - Scenario: Event EventTransfer is emitted + Scenario: Event EventTransfer is emitted When creates a batch from project "C01-001" and issues "10" tradable credits to "regen1sl2dsfyf2znn48ehwqg28cv3nuglxkx4h7q5l8" And expect event transfer with properties """ @@ -486,7 +487,7 @@ Feature: Msg/CreateBatch } """ - Scenario: Event EventCreateBatch is emitted + Scenario: Event EventCreateBatch is emitted When creates a batch from project "C01-001" and issues "10" tradable credits to "regen1sl2dsfyf2znn48ehwqg28cv3nuglxkx4h7q5l8" Then expect event create batch with properties """ @@ -495,7 +496,6 @@ Feature: Msg/CreateBatch } """ - Rule: Events are emitted with origin tx Background: @@ -513,7 +513,7 @@ Feature: Msg/CreateBatch And a credit class with class id "C01" and issuer alice And a project with project id "C01-001" - Scenario: Event EventCreateBatch is emitted + Scenario: Event EventCreateBatch is emitted When creates a batch from project "C01-001" and issues "10" tradable credits to "regen1sl2dsfyf2znn48ehwqg28cv3nuglxkx4h7q5l8" Then expect event create batch with properties """ diff --git a/x/ecocredit/base/keeper/features/msg_retire.feature b/x/ecocredit/base/keeper/features/msg_retire.feature index 20d0374b66..c3b32161f3 100644 --- a/x/ecocredit/base/keeper/features/msg_retire.feature +++ b/x/ecocredit/base/keeper/features/msg_retire.feature @@ -121,13 +121,14 @@ Feature: Msg/Retire "cancelled_amount": "0" } """ - When alice attempts to retire credit amount "10" from "US-WA" + When alice attempts to retire credit amount "10" with jurisdiction "US-WA" and reason "offsetting electricity consumption" Then expect event with properties """ { "owner": "regen15406g34dl5v9780tx2q3vtjdpkdgq4hhegdtm9", "batch_denom": "C01-001-20200101-20210101-001", "amount": "10", - "jurisdiction": "US-WA" + "jurisdiction": "US-WA", + "reason": "offsetting electricity consumption" } """ \ No newline at end of file diff --git a/x/ecocredit/base/keeper/features/msg_send.feature b/x/ecocredit/base/keeper/features/msg_send.feature index ea0379530a..ac0cf51eae 100644 --- a/x/ecocredit/base/keeper/features/msg_send.feature +++ b/x/ecocredit/base/keeper/features/msg_send.feature @@ -231,19 +231,20 @@ Feature: Msg/Send And alice owns tradable credit amount "10" Scenario: Event EventRetire is emitted - When alice attempts to send credits to bob with retired amount "10" from "US-WA" + When alice attempts to send credits to bob with retired amount "10" jurisdiction "US-WA" and reason "offsetting electricity consumption" Then expect event retire with properties """ { "owner": "regen10yhlcvh88sux4zmf67udhg5f5z2803z6jm0d25", "batch_denom": "C01-001-20200101-20210101-001", "amount": "10", - "jurisdiction": "US-WA" + "jurisdiction": "US-WA", + "reason": "offsetting electricity consumption" } """ Scenario: Event EventTransfer is emitted - When alice attempts to send credits to bob with retired amount "10" from "US-WA" + When alice attempts to send credits to bob with retired amount "10" and jurisdiction "US-WA" Then expect event transfer with properties """ { diff --git a/x/ecocredit/base/keeper/msg_create_batch.go b/x/ecocredit/base/keeper/msg_create_batch.go index b100990ce9..650b593ba0 100644 --- a/x/ecocredit/base/keeper/msg_create_batch.go +++ b/x/ecocredit/base/keeper/msg_create_batch.go @@ -155,6 +155,7 @@ func (k Keeper) CreateBatch(ctx context.Context, req *types.MsgCreateBatch) (*ty BatchDenom: batchDenom, Amount: retiredAmount.String(), Jurisdiction: issuance.RetirementJurisdiction, + Reason: issuance.RetirementReason, }); err != nil { return nil, err } diff --git a/x/ecocredit/base/keeper/msg_create_batch_test.go b/x/ecocredit/base/keeper/msg_create_batch_test.go index 6cb36a7447..09c0d49667 100644 --- a/x/ecocredit/base/keeper/msg_create_batch_test.go +++ b/x/ecocredit/base/keeper/msg_create_batch_test.go @@ -176,6 +176,19 @@ func (s *createBatchSuite) ABatchContract(a gocuke.DocString) { require.NoError(s.t, err) } +func (s *createBatchSuite) EcocreditModulesAddress(a string) { + addr, err := sdk.AccAddressFromBech32(a) + require.NoError(s.t, err) + s.k.moduleAddress = addr +} + +func (s *createBatchSuite) OriginTx(a gocuke.DocString) { + var ot types.OriginTx + err := json.Unmarshal([]byte(a.Content), &ot) + require.NoError(s.t, err) + s.originTx = &ot +} + func (s *createBatchSuite) AliceAttemptsToCreateABatchWithProjectId(a string) { s.res, s.err = s.k.CreateBatch(s.ctx, &types.MsgCreateBatch{ Issuer: s.alice.String(), @@ -301,6 +314,60 @@ func (s *createBatchSuite) AliceAttemptsToCreateABatchWithProperties(a gocuke.Do s.res, s.err = s.k.CreateBatch(s.ctx, &msg) } +func (s *createBatchSuite) CreatesABatchFromProjectAndIssuesTradableCreditsTo(a string, b string, c string) { + s.res, s.err = s.k.CreateBatch(s.ctx, &types.MsgCreateBatch{ + Issuer: s.alice.String(), + ProjectId: a, + Issuance: []*types.BatchIssuance{ + { + Recipient: c, + TradableAmount: b, + }, + }, + StartDate: s.startDate, + EndDate: s.endDate, + OriginTx: s.originTx, + }) + require.NoError(s.t, s.err) +} + +func (s *createBatchSuite) CreatesABatchFromProjectAndIssuesRetiredCreditsToFrom(a, b, c, d string) { + s.res, s.err = s.k.CreateBatch(s.ctx, &types.MsgCreateBatch{ + Issuer: s.alice.String(), + ProjectId: a, + Issuance: []*types.BatchIssuance{ + { + Recipient: c, + RetiredAmount: b, + RetirementJurisdiction: d, + }, + }, + StartDate: s.startDate, + EndDate: s.endDate, + OriginTx: s.originTx, + }) + require.NoError(s.t, s.err) +} + +func (s *createBatchSuite) CreatesABatchFromProjectAndIssuesRetiredCreditsToFromWithReason(a, b, c, d, e string) { + s.res, s.err = s.k.CreateBatch(s.ctx, &types.MsgCreateBatch{ + Issuer: s.alice.String(), + ProjectId: a, + Issuance: []*types.BatchIssuance{ + { + Recipient: c, + RetiredAmount: b, + RetirementJurisdiction: d, + RetirementReason: e, + }, + }, + StartDate: s.startDate, + EndDate: s.endDate, + OriginTx: s.originTx, + }) + require.NoError(s.t, s.err) +} + func (s *createBatchSuite) ExpectNoError() { require.NoError(s.t, s.err) } @@ -436,41 +503,6 @@ func (s *createBatchSuite) ExpectEventTransferWithProperties(a gocuke.DocString) require.NoError(s.t, err) } -func (s *createBatchSuite) CreatesABatchFromProjectAndIssuesRetiredCreditsToFrom(a, b, c, d string) { - s.res, s.err = s.k.CreateBatch(s.ctx, &types.MsgCreateBatch{ - Issuer: s.alice.String(), - ProjectId: a, - Issuance: []*types.BatchIssuance{ - { - Recipient: c, - RetiredAmount: b, - RetirementJurisdiction: d, - }, - }, - StartDate: s.startDate, - EndDate: s.endDate, - OriginTx: s.originTx, - }) - require.NoError(s.t, s.err) -} - -func (s *createBatchSuite) CreatesABatchFromProjectAndIssuesTradableCreditsTo(a string, b string, c string) { - s.res, s.err = s.k.CreateBatch(s.ctx, &types.MsgCreateBatch{ - Issuer: s.alice.String(), - ProjectId: a, - Issuance: []*types.BatchIssuance{ - { - Recipient: c, - TradableAmount: b, - }, - }, - StartDate: s.startDate, - EndDate: s.endDate, - OriginTx: s.originTx, - }) - require.NoError(s.t, s.err) -} - func (s *createBatchSuite) ExpectEventCreateBatchWithProperties(a gocuke.DocString) { var event types.EventCreateBatch err := json.Unmarshal([]byte(a.Content), &event) @@ -483,19 +515,6 @@ func (s *createBatchSuite) ExpectEventCreateBatchWithProperties(a gocuke.DocStri require.NoError(s.t, err) } -func (s *createBatchSuite) EcocreditModulesAddress(a string) { - addr, err := sdk.AccAddressFromBech32(a) - require.NoError(s.t, err) - s.k.moduleAddress = addr -} - -func (s *createBatchSuite) OriginTx(a gocuke.DocString) { - var ot types.OriginTx - err := json.Unmarshal([]byte(a.Content), &ot) - require.NoError(s.t, err) - s.originTx = &ot -} - func (s *createBatchSuite) getProjectSequence(projectID string) uint64 { str := strings.Split(projectID, "-") seq, err := strconv.ParseUint(str[1], 10, 32) diff --git a/x/ecocredit/base/keeper/msg_retire.go b/x/ecocredit/base/keeper/msg_retire.go index 31ebc8c89a..53e1d16339 100644 --- a/x/ecocredit/base/keeper/msg_retire.go +++ b/x/ecocredit/base/keeper/msg_retire.go @@ -95,6 +95,7 @@ func (k Keeper) Retire(ctx context.Context, req *types.MsgRetire) (*types.MsgRet BatchDenom: credit.BatchDenom, Amount: credit.Amount, Jurisdiction: req.Jurisdiction, + Reason: req.Reason, }); err != nil { return nil, err } diff --git a/x/ecocredit/base/keeper/msg_retire_test.go b/x/ecocredit/base/keeper/msg_retire_test.go index f509ad98e1..d2714fe87d 100644 --- a/x/ecocredit/base/keeper/msg_retire_test.go +++ b/x/ecocredit/base/keeper/msg_retire_test.go @@ -192,6 +192,21 @@ func (s *retire) AliceAttemptsToRetireCreditsWithBatchDenom(a string) { }) } +func (s *retire) AliceAttemptsToRetireCreditAmountWithJurisdictionAndReason(a, b, c string) { + s.res, s.err = s.k.Retire(s.ctx, &types.MsgRetire{ + Owner: s.alice.String(), + Credits: []*types.Credits{ + { + BatchDenom: s.batchDenom, + Amount: a, + }, + }, + Jurisdiction: b, + Reason: c, + }) + require.NoError(s.t, s.err) +} + func (s *retire) ExpectNoError() { require.NoError(s.t, s.err) } @@ -225,20 +240,6 @@ func (s *retire) ExpectBatchSupply(a gocuke.DocString) { require.Equal(s.t, expected.TradableAmount, balance.TradableAmount) } -func (s *retire) AliceAttemptsToRetireCreditAmountFrom(a string, b string) { - s.res, s.err = s.k.Retire(s.ctx, &types.MsgRetire{ - Owner: s.alice.String(), - Credits: []*types.Credits{ - { - BatchDenom: s.batchDenom, - Amount: a, - }, - }, - Jurisdiction: b, - }) - require.NoError(s.t, s.err) -} - func (s *retire) ExpectEventWithProperties(a gocuke.DocString) { var event types.EventRetire err := json.Unmarshal([]byte(a.Content), &event) diff --git a/x/ecocredit/base/keeper/msg_send.go b/x/ecocredit/base/keeper/msg_send.go index 3f65514727..d885cec0db 100644 --- a/x/ecocredit/base/keeper/msg_send.go +++ b/x/ecocredit/base/keeper/msg_send.go @@ -150,6 +150,7 @@ func (k Keeper) sendEcocredits(sdkCtx sdk.Context, credit *types.MsgSend_SendCre BatchDenom: credit.BatchDenom, Amount: sendAmtRetired.String(), Jurisdiction: credit.RetirementJurisdiction, + Reason: credit.RetirementReason, }); err != nil { return err } diff --git a/x/ecocredit/base/keeper/msg_send_test.go b/x/ecocredit/base/keeper/msg_send_test.go index 3149461712..d41a124305 100644 --- a/x/ecocredit/base/keeper/msg_send_test.go +++ b/x/ecocredit/base/keeper/msg_send_test.go @@ -268,7 +268,7 @@ func (s *send) BobsAddress(a string) { s.bob = addr } -func (s *send) AliceAttemptsToSendCreditsToBobWithRetiredAmountFrom(a, b string) { +func (s *send) AliceAttemptsToSendCreditsToBobWithRetiredAmountAndJurisdiction(a, b string) { s.res, s.err = s.k.Send(s.ctx, &types.MsgSend{ Sender: s.alice.String(), Recipient: s.bob.String(), @@ -283,6 +283,22 @@ func (s *send) AliceAttemptsToSendCreditsToBobWithRetiredAmountFrom(a, b string) require.NoError(s.t, s.err) } +func (s *send) AliceAttemptsToSendCreditsToBobWithRetiredAmountJurisdictionAndReason(a, b, c string) { + s.res, s.err = s.k.Send(s.ctx, &types.MsgSend{ + Sender: s.alice.String(), + Recipient: s.bob.String(), + Credits: []*types.MsgSend_SendCredits{ + { + BatchDenom: s.batchDenom, + RetiredAmount: a, + RetirementJurisdiction: b, + RetirementReason: c, + }, + }, + }) + require.NoError(s.t, s.err) +} + func (s *send) ExpectEventRetireWithProperties(a gocuke.DocString) { var event types.EventRetire err := json.Unmarshal([]byte(a.Content), &event) diff --git a/x/ecocredit/base/types/v1/events.pb.go b/x/ecocredit/base/types/v1/events.pb.go index 66c5e0e85f..29ccc01036 100644 --- a/x/ecocredit/base/types/v1/events.pb.go +++ b/x/ecocredit/base/types/v1/events.pb.go @@ -404,6 +404,11 @@ type EventRetire struct { // fields conforming to ISO 3166-2, and postal-code being up to 64 // alphanumeric characters. Jurisdiction string `protobuf:"bytes,4,opt,name=jurisdiction,proto3" json:"jurisdiction,omitempty"` + // reason is any arbitrary string that specifies the reason for retiring + // credits. + // + // Since Revision 1 + Reason string `protobuf:"bytes,5,opt,name=reason,proto3" json:"reason,omitempty"` } func (m *EventRetire) Reset() { *m = EventRetire{} } @@ -467,6 +472,13 @@ func (m *EventRetire) GetJurisdiction() string { return "" } +func (m *EventRetire) GetReason() string { + if m != nil { + return m.Reason + } + return "" +} + // EventCancel is an event emitted when credits are cancelled. When credits are // cancelled from multiple batches in the same transaction, a separate event is // emitted for each batch_denom. This allows for easier indexing. @@ -1021,46 +1033,47 @@ func init() { func init() { proto.RegisterFile("regen/ecocredit/v1/events.proto", fileDescriptor_e32415575ff8b4b2) } var fileDescriptor_e32415575ff8b4b2 = []byte{ - // 622 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcf, 0x4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 0xea, 0xfc, - 0x32, 0x9c, 0xfa, 0x7d, 0x19, 0x4e, 0x7d, 0x7e, 0xdd, 0x16, 0xf6, 0xa8, 0x1f, 0x57, 0x98, 0xea, - 0x56, 0xdd, 0x1f, 0x65, 0x4b, 0xa2, 0x3d, 0x51, 0xfa, 0xab, 0xaf, 0x3a, 0xc8, 0xdb, 0xa8, 0xab, - 0xa7, 0x43, 0x0f, 0x45, 0x4c, 0x0d, 0x66, 0x4f, 0x45, 0x35, 0xa9, 0xc5, 0x25, 0xf7, 0x5c, 0xec, - 0xfc, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xb0, 0x7f, 0x2c, 0x85, 0x06, 0x00, 0x00, + // 626 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4d, 0x4f, 0x13, 0x41, + 0x18, 0x66, 0xf9, 0x92, 0xbe, 0x08, 0x9a, 0x89, 0x22, 0x12, 0x5c, 0xc8, 0x26, 0x46, 0x2e, 0xb4, + 0x29, 0x68, 0x82, 0xf1, 0x60, 0xa0, 0x7a, 0xe0, 0x40, 0x34, 0xb5, 0x1e, 0xf4, 0xd2, 0xcc, 0xce, + 0xbc, 0x96, 0xc1, 0x76, 0xa6, 0x99, 0x99, 0x2e, 0x90, 0xf8, 0x23, 0x3c, 0xfa, 0x4b, 0xfc, 0x0d, + 0x1e, 0x39, 0x7a, 0x34, 0xf0, 0x47, 0xcc, 0xce, 0x4e, 0x97, 0x6e, 0x21, 0x2c, 0x07, 0xbd, 0xcd, + 0xfb, 0xe4, 0x7d, 0xf6, 0x79, 0x66, 0xde, 0x8f, 0x85, 0x35, 0x8d, 0x1d, 0x94, 0x35, 0x64, 0x8a, + 0x69, 0xe4, 0xc2, 0xd6, 0x92, 0x7a, 0x0d, 0x13, 0x94, 0xd6, 0x54, 0xfb, 0x5a, 0x59, 0x45, 0x88, + 0x4b, 0xa8, 0xe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e, + 0xfb, 0x98, 0xb6, 0x04, 0x8d, 0x63, 0x8d, 0x89, 0xa0, 0xae, 0x25, 0x32, 0x5e, 0x01, 0x8b, 0x8e, + 0x7d, 0xe9, 0xf7, 0xb4, 0xe0, 0x1d, 0x4c, 0x6b, 0x65, 0xa9, 0xee, 0xa0, 0x1d, 0xce, 0x52, 0x16, + 0x95, 0xcc, 0xd2, 0x0a, 0xcc, 0x31, 0x25, 0xad, 0xa6, 0x6c, 0x58, 0xfb, 0x3c, 0x1e, 0xe9, 0x8a, + 0xe9, 0xd1, 0xae, 0x88, 0x5a, 0xde, 0x72, 0x26, 0xdc, 0x44, 0x86, 0x22, 0xc1, 0x92, 0xa7, 0x29, + 0xed, 0xc1, 0xbd, 0x4f, 0xbf, 0xce, 0xc3, 0xe0, 0xec, 0x3c, 0x0c, 0xfe, 0x9c, 0x87, 0xc1, 0xf7, + 0x8b, 0x70, 0xe2, 0xec, 0x22, 0x9c, 0xf8, 0x7d, 0x11, 0x4e, 0x7c, 0x7e, 0xdd, 0x11, 0xf6, 0x70, + 0x10, 0x57, 0x99, 0xea, 0xd5, 0xdc, 0xa6, 0xd9, 0x94, 0x68, 0x8f, 0x95, 0xfe, 0xea, 0xa3, 0x2e, + 0xf2, 0x0e, 0xea, 0xda, 0xc9, 0xc8, 0x0f, 0x24, 0xa6, 0x06, 0xb3, 0x5f, 0x48, 0x2d, 0xa9, 0xc7, + 0xb3, 0xee, 0x37, 0xb2, 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x78, 0x09, 0x8e, 0x9d, 0x06, + 0x00, 0x00, } func (m *EventCreateClass) Marshal() (dAtA []byte, err error) { @@ -1329,6 +1342,13 @@ func (m *EventRetire) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Reason) > 0 { + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0x2a + } if len(m.Jurisdiction) > 0 { i -= len(m.Jurisdiction) copy(dAtA[i:], m.Jurisdiction) @@ -1852,6 +1872,10 @@ func (m *EventRetire) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } + l = len(m.Reason) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } return n } @@ -2932,6 +2956,38 @@ func (m *EventRetire) Unmarshal(dAtA []byte) error { } m.Jurisdiction = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) diff --git a/x/ecocredit/base/types/v1/features/msg_create_batch.feature b/x/ecocredit/base/types/v1/features/msg_create_batch.feature index 82e0868d56..03bd33dc25 100644 --- a/x/ecocredit/base/types/v1/features/msg_create_batch.feature +++ b/x/ecocredit/base/types/v1/features/msg_create_batch.feature @@ -1,6 +1,29 @@ Feature: MsgCreateBatch Scenario: a valid message + Given the message + """ + { + "issuer": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", + "project_id": "C01-001", + "issuance": [ + { + "recipient": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", + "tradable_amount": "100", + "retired_amount": "100", + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" + } + ], + "metadata": "regen:13toVgf5aZqSVSeJQv562xkkeoe3rr3bJWa29PHVKVf77VAkVMcDvVd.rdf", + "start_date": "2020-01-01T00:00:00Z", + "end_date": "2021-01-01T00:00:00Z" + } + """ + When the message is validated + Then expect no error + + Scenario: a valid message without retirement reason Given the message """ { @@ -36,7 +59,8 @@ Feature: MsgCreateBatch { "recipient": "regen1tnh2q55v8wyygtt9srz5safamzdengsnlm0yy4", "retired_amount": "100", - "retirement_jurisdiction": "US-WA" + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" } ], "metadata": "regen:13toVgf5aZqSVSeJQv562xkkeoe3rr3bJWa29PHVKVf77VAkVMcDvVd.rdf", @@ -58,7 +82,8 @@ Feature: MsgCreateBatch "recipient": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", "tradable_amount": "100", "retired_amount": "100", - "retirement_jurisdiction": "US-WA" + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" } ], "metadata": "regen:13toVgf5aZqSVSeJQv562xkkeoe3rr3bJWa29PHVKVf77VAkVMcDvVd.rdf", @@ -81,7 +106,8 @@ Feature: MsgCreateBatch "recipient": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", "tradable_amount": "100", "retired_amount": "100", - "retirement_jurisdiction": "US-WA" + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" } ], "metadata": "regen:13toVgf5aZqSVSeJQv562xkkeoe3rr3bJWa29PHVKVf77VAkVMcDvVd.rdf", @@ -163,7 +189,7 @@ Feature: MsgCreateBatch # Note: additional validation for batch issuance covered in types_batch_issuance_test.go - Scenario: an error is returned if metadata is exceeds 256 characters + Scenario: an error is returned if metadata exceeds 256 characters Given the message """ { @@ -174,7 +200,8 @@ Feature: MsgCreateBatch "recipient": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", "tradable_amount": "100", "retired_amount": "100", - "retirement_jurisdiction": "US-WA" + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" } ] } @@ -194,7 +221,8 @@ Feature: MsgCreateBatch "recipient": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", "tradable_amount": "100", "retired_amount": "100", - "retirement_jurisdiction": "US-WA" + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" } ], "metadata": "regen:13toVgf5aZqSVSeJQv562xkkeoe3rr3bJWa29PHVKVf77VAkVMcDvVd.rdf" @@ -214,7 +242,8 @@ Feature: MsgCreateBatch "recipient": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", "tradable_amount": "100", "retired_amount": "100", - "retirement_jurisdiction": "US-WA" + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" } ], "metadata": "regen:13toVgf5aZqSVSeJQv562xkkeoe3rr3bJWa29PHVKVf77VAkVMcDvVd.rdf", @@ -235,7 +264,8 @@ Feature: MsgCreateBatch "recipient": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", "tradable_amount": "100", "retired_amount": "100", - "retirement_jurisdiction": "US-WA" + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" } ], "metadata": "regen:13toVgf5aZqSVSeJQv562xkkeoe3rr3bJWa29PHVKVf77VAkVMcDvVd.rdf", @@ -257,7 +287,8 @@ Feature: MsgCreateBatch "recipient": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", "tradable_amount": "100", "retired_amount": "100", - "retirement_jurisdiction": "US-WA" + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" } ], "metadata": "regen:13toVgf5aZqSVSeJQv562xkkeoe3rr3bJWa29PHVKVf77VAkVMcDvVd.rdf", @@ -280,7 +311,8 @@ Feature: MsgCreateBatch "recipient": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", "tradable_amount": "100", "retired_amount": "100", - "retirement_jurisdiction": "US-WA" + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" } ], "metadata": "regen:13toVgf5aZqSVSeJQv562xkkeoe3rr3bJWa29PHVKVf77VAkVMcDvVd.rdf", @@ -307,7 +339,8 @@ Feature: MsgCreateBatch "recipient": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", "tradable_amount": "100", "retired_amount": "100", - "retirement_jurisdiction": "US-WA" + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" } ], "metadata": "regen:13toVgf5aZqSVSeJQv562xkkeoe3rr3bJWa29PHVKVf77VAkVMcDvVd.rdf", @@ -327,6 +360,7 @@ Feature: MsgCreateBatch "recipient":"regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", "retired_amount":"100", "retirement_jurisdiction":"US-WA", + "retirement_reason": "offsetting electricity consumption", "tradable_amount":"100" } ], diff --git a/x/ecocredit/base/types/v1/features/msg_retire.feature b/x/ecocredit/base/types/v1/features/msg_retire.feature index 8eea0afd9b..32a9f4dba1 100644 --- a/x/ecocredit/base/types/v1/features/msg_retire.feature +++ b/x/ecocredit/base/types/v1/features/msg_retire.feature @@ -1,6 +1,24 @@ Feature: MsgRetire Scenario: a valid message + Given the message + """ + { + "owner": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", + "credits": [ + { + "batch_denom": "C01-001-20200101-20210101-001", + "amount": "100" + } + ], + "jurisdiction": "US-WA", + "reason": "offsetting electricity consumption" + } + """ + When the message is validated + Then expect no error + + Scenario: a valid message without reason Given the message """ { @@ -32,7 +50,8 @@ Feature: MsgRetire "amount": "100" } ], - "jurisdiction": "US-WA" + "jurisdiction": "US-WA", + "reason": "offsetting electricity consumption" } """ When the message is validated @@ -140,7 +159,8 @@ Feature: MsgRetire "amount": "100" } ], - "jurisdiction": "US-WA" + "jurisdiction": "US-WA", + "reason": "offsetting electricity consumption" } """ When message sign bytes queried @@ -156,7 +176,8 @@ Feature: MsgRetire } ], "jurisdiction":"US-WA", - "owner":"regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6" + "owner":"regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", + "reason": "offsetting electricity consumption" } } """ diff --git a/x/ecocredit/base/types/v1/features/msg_send.feature b/x/ecocredit/base/types/v1/features/msg_send.feature index 72c8a04c13..c24b48ff36 100644 --- a/x/ecocredit/base/types/v1/features/msg_send.feature +++ b/x/ecocredit/base/types/v1/features/msg_send.feature @@ -1,6 +1,26 @@ Feature: MsgSend Scenario: a valid message + Given the message + """ + { + "sender": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", + "recipient": "regen1tnh2q55v8wyygtt9srz5safamzdengsnlm0yy4", + "credits": [ + { + "batch_denom": "C01-001-20200101-20210101-001", + "tradable_amount": "100", + "retired_amount": "100", + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" + } + ] + } + """ + When the message is validated + Then expect no error + + Scenario: a valid message without retirement reason Given the message """ { @@ -33,7 +53,8 @@ Feature: MsgSend { "batch_denom": "C01-001-20200101-20210101-002", "retired_amount": "100", - "retirement_jurisdiction": "US-WA" + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" } ] } @@ -217,7 +238,8 @@ Feature: MsgSend "batch_denom": "C01-001-20200101-20210101-001", "tradable_amount": "100", "retired_amount": "100", - "retirement_jurisdiction": "US-WA" + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" } ] } @@ -233,6 +255,7 @@ Feature: MsgSend "batch_denom":"C01-001-20200101-20210101-001", "retired_amount":"100", "retirement_jurisdiction":"US-WA", + "retirement_reason": "offsetting electricity consumption", "tradable_amount":"100" } ], diff --git a/x/ecocredit/base/types/v1/tx.pb.go b/x/ecocredit/base/types/v1/tx.pb.go index aa754305c3..0f80f94c06 100644 --- a/x/ecocredit/base/types/v1/tx.pb.go +++ b/x/ecocredit/base/types/v1/tx.pb.go @@ -867,6 +867,12 @@ type MsgSend_SendCredits struct { // country-code is required, while the sub-national-code and postal-code are // optional and can be added for increased precision. RetirementJurisdiction string `protobuf:"bytes,4,opt,name=retirement_jurisdiction,json=retirementJurisdiction,proto3" json:"retirement_jurisdiction,omitempty"` + // retirement_reason is any arbitrary string that specifies the reason for + // retiring credits. This field is only required if retired_amount is + // positive. + // + // Since Revision 1 + RetirementReason string `protobuf:"bytes,5,opt,name=retirement_reason,json=retirementReason,proto3" json:"retirement_reason,omitempty"` } func (m *MsgSend_SendCredits) Reset() { *m = MsgSend_SendCredits{} } @@ -930,6 +936,13 @@ func (m *MsgSend_SendCredits) GetRetirementJurisdiction() string { return "" } +func (m *MsgSend_SendCredits) GetRetirementReason() string { + if m != nil { + return m.RetirementReason + } + return "" +} + // MsgSendResponse is the Msg/Send response type. type MsgSendResponse struct { } @@ -981,6 +994,11 @@ type MsgRetire struct { // sub-national-code and postal-code are optional and can be added for // increased precision. Jurisdiction string `protobuf:"bytes,3,opt,name=jurisdiction,proto3" json:"jurisdiction,omitempty"` + // reason is any arbitrary string that specifies the reason for retiring + // credits. + // + // Since Revision 1 + Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"` } func (m *MsgRetire) Reset() { *m = MsgRetire{} } @@ -1037,6 +1055,13 @@ func (m *MsgRetire) GetJurisdiction() string { return "" } +func (m *MsgRetire) GetReason() string { + if m != nil { + return m.Reason + } + return "" +} + // MsgRetire is the Msg/Retire response type. type MsgRetireResponse struct { } @@ -2740,122 +2765,123 @@ func init() { func init() { proto.RegisterFile("regen/ecocredit/v1/tx.proto", fileDescriptor_2b8ae49f50a3ddbd) } var fileDescriptor_2b8ae49f50a3ddbd = []byte{ - // 1825 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x4f, 0x6f, 0x1b, 0x45, - 0x1b, 0xef, 0xda, 0x4e, 0x6c, 0x3f, 0x4e, 0xd3, 0x76, 0xda, 0xa6, 0xee, 0xa6, 0x71, 0x5c, 0xb7, - 0x79, 0x9b, 0xe6, 0x4d, 0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 0xd5, 0xb0, 0x79, 0x88, 0x13, 0xd3, 0x5b, 0xca, 0x35, 0xbc, 0x0f, - 0x45, 0xee, 0x59, 0xca, 0xbd, 0xb2, 0xb9, 0x9e, 0x90, 0x71, 0x42, 0x9a, 0x14, 0xbf, 0x70, 0xf4, - 0x37, 0xa3, 0xb7, 0x60, 0x86, 0xe6, 0x14, 0x9e, 0xcc, 0xd7, 0x26, 0x92, 0xc2, 0xd2, 0x27, 0xdb, - 0x18, 0x2e, 0x09, 0x66, 0xa6, 0x29, 0x09, 0xe4, 0xdf, 0x24, 0x98, 0x61, 0x09, 0x3e, 0x74, 0x18, - 0x52, 0xf4, 0x30, 0x16, 0x60, 0x36, 0x94, 0xe1, 0xf8, 0x28, 0x52, 0x32, 0xe6, 0x5f, 0xad, 0x64, - 0x2c, 0x4c, 0x5b, 0x32, 0x06, 0x8b, 0xd9, 0x99, 0x70, 0x31, 0x2b, 0xf7, 0xa0, 0xe8, 0xf7, 0x15, - 0xd1, 0x32, 0x5f, 0x1a, 0x2b, 0xf3, 0xc7, 0xd2, 0x58, 0x2e, 0xa6, 0x5b, 0x48, 0xe9, 0x36, 0xc2, - 0x55, 0xce, 0x23, 0xfa, 0x6e, 0x43, 0x07, 0x36, 0x71, 0xbd, 0x99, 0xf1, 0x84, 0x1b, 0x1f, 0x01, - 0xe2, 0xfd, 0xa4, 0x77, 0x0d, 0x69, 0x45, 0x6b, 0x3b, 0x19, 0x4d, 0x6d, 0x95, 0xbe, 0x24, 0x0f, - 0x28, 0xee, 0x30, 0x1b, 0x8e, 0x75, 0xab, 0x98, 0x26, 0xa1, 0x87, 0x98, 0x04, 0xa5, 0x6f, 0xf5, - 0x7a, 0xf6, 0x51, 0xcf, 0x74, 0x49, 0xb6, 0x1a, 0x6c, 0x79, 0x55, 0x0f, 0xa3, 0x5d, 0x6a, 0xfb, - 0xc3, 0x31, 0x35, 0x2b, 0x70, 0x25, 0x45, 0x8d, 0x78, 0xa9, 0x97, 0x40, 0x1e, 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xe1, 0x82, 0x97, 0x3f, 0xa6, - 0xba, 0xba, 0x9e, 0x18, 0xe2, 0xa2, 0xd0, 0xc4, 0xcb, 0x9f, 0x5c, 0x52, 0xa1, 0x7d, 0x98, 0x8f, - 0xd4, 0x53, 0x2b, 0xd9, 0xcf, 0xf6, 0x3e, 0xc6, 0xf2, 0x8d, 0x89, 0x60, 0xc1, 0x47, 0x16, 0x5f, - 0x2a, 0xa5, 0x5c, 0x8a, 0x71, 0x74, 0xe2, 0x23, 0x4b, 0xad, 0x8e, 0xe8, 0x55, 0x4a, 0xac, 0x8d, - 0x9a, 0xa9, 0x4e, 0x8b, 0xe1, 0x70, 0x6b, 0xca, 0x0d, 0x3e, 0x8d, 0xed, 0x0f, 0x7f, 0x7e, 0x51, - 0x93, 0x9e, 0xbd, 0xa8, 0x49, 0x7f, 0xbc, 0xa8, 0x49, 0x4f, 0x5f, 0xd6, 0x4e, 0x3c, 0x7b, 0x59, - 0x3b, 0xf1, 0xfb, 0xcb, 0xda, 0x89, 0x47, 0x77, 0x0d, 0x93, 0x1c, 0x0c, 0xbb, 0x8a, 0x66, 0xf7, - 0x9b, 0x54, 0xf8, 0x0d, 0x0b, 0x93, 0x23, 0xdb, 0xf9, 0x84, 0x8f, 0x7a, 0x58, 0x37, 0xb0, 0xd3, - 0x3c, 0x0e, 0xfc, 0xeb, 0x8d, 0xfe, 0x4f, 0x90, 0xfe, 0xf3, 0xad, 0x79, 0xb8, 0xd1, 0x9d, 0xa5, - 0xbd, 0xdb, 0xcd, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x71, 0x68, 0x0f, 0xb4, 0x63, 0x1c, 0x00, - 0x00, + // 1847 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x4f, 0x6f, 0xdb, 0x46, + 0x16, 0x0f, 0x25, 0xd9, 0x92, 0x9e, 0x1c, 0xc7, 0x99, 0x24,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ference imports to suppress errors if they are not otherwise used. @@ -4483,6 +4509,13 @@ func (m *MsgSend_SendCredits) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.RetirementReason) > 0 { + i -= len(m.RetirementReason) + copy(dAtA[i:], m.RetirementReason) + i = encodeVarintTx(dAtA, i, uint64(len(m.RetirementReason))) + i-- + dAtA[i] = 0x2a + } if len(m.RetirementJurisdiction) > 0 { i -= len(m.RetirementJurisdiction) copy(dAtA[i:], m.RetirementJurisdiction) @@ -4557,6 +4590,13 @@ func (m *MsgRetire) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Reason) > 0 { + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = encodeVarintTx(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0x22 + } if len(m.Jurisdiction) > 0 { i -= len(m.Jurisdiction) copy(dAtA[i:], m.Jurisdiction) @@ -5983,6 +6023,10 @@ func (m *MsgSend_SendCredits) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + l = len(m.RetirementReason) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -6015,6 +6059,10 @@ func (m *MsgRetire) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + l = len(m.Reason) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -8359,6 +8407,38 @@ func (m *MsgSend_SendCredits) Unmarshal(dAtA []byte) error { } m.RetirementJurisdiction = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RetirementReason", 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.RetirementReason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -8557,6 +8637,38 @@ func (m *MsgRetire) Unmarshal(dAtA []byte) error { } m.Jurisdiction = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", 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.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/ecocredit/base/types/v1/types.pb.go b/x/ecocredit/base/types/v1/types.pb.go index 7157b3d623..3b66724679 100644 --- a/x/ecocredit/base/types/v1/types.pb.go +++ b/x/ecocredit/base/types/v1/types.pb.go @@ -184,6 +184,12 @@ type BatchIssuance struct { // sub-national-code and postal-code are optional and can be added for // increased precision. RetirementJurisdiction string `protobuf:"bytes,4,opt,name=retirement_jurisdiction,json=retirementJurisdiction,proto3" json:"retirement_jurisdiction,omitempty"` + // retirement_reason is any arbitrary string that specifies the reason for + // retiring credits. The reason will be included in EventRetire and is not + // stored in state. + // + // Since Revision 1 + RetirementReason string `protobuf:"bytes,5,opt,name=retirement_reason,json=retirementReason,proto3" json:"retirement_reason,omitempty"` } func (m *BatchIssuance) Reset() { *m = BatchIssuance{} } @@ -247,6 +253,13 @@ func (m *BatchIssuance) GetRetirementJurisdiction() string { return "" } +func (m *BatchIssuance) GetRetirementReason() string { + if m != nil { + return m.RetirementReason + } + return "" +} + // OriginTx is the transaction from another chain or registry that triggered // the minting of credits. type OriginTx struct { @@ -405,45 +418,46 @@ func init() { func init() { proto.RegisterFile("regen/ecocredit/v1/types.proto", fileDescriptor_7b044b6b740b984f) } var fileDescriptor_7b044b6b740b984f = []byte{ - // 603 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xcf, 0x6e, 0x13, 0x3f, - 0x10, 0xce, 0x26, 0xfd, 0xf5, 0xd7, 0x4c, 0xd4, 0x50, 0xac, 0xaa, 0x84, 0x0a, 0x6d, 0xa2, 0x48, - 0x88, 0x48, 0xa8, 0xbb, 0xa4, 0x20, 0x21, 0x71, 0xa9, 0x48, 0x00, 0x09, 0x2e, 0x54, 0x51, 0x2f, - 0x70, 0x89, 0xbc, 0xf6, 0x90, 0xba, 0xdd, 0xd8, 0x91, 0xed, 0xf4, 0xcf, 0x5b, 0x20, 0x71, 0xe1, - 0xc8, 0x99, 0x07, 0xe0, 0x19, 0x7a, 0x42, 0x3d, 0x72, 0x02, 0xd4, 0xbe, 0x08, 0x5a, 0xdb, 0xf9, - 0x83, 0xe0, 0xc8, 0x69, 0x67, 0xbe, 0x6f, 0x3c, 0xdf, 0x37, 0xab, 0x19, 0x88, 0x35, 0x8e, 0x50, - 0xa6, 0xc8, 0x14, 0xd3, 0xc8, 0x85, 0x4d, 0x4f, 0xba, 0xa9, 0x3d, 0x9f, 0xa0, 0x49, 0x26, 0x5a, - 0x59, 0x45, 0x88, 0xe3, 0x93, 0x39, 0x9f, 0x9c, 0x74, 0xb7, 0x63, 0xa6, 0xcc, 0x58, 0x99, 0x34, - 0xa3, 0x06, 0xd3, 0x93, 0x6e, 0x86, 0x96, 0x76, 0x53, 0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0x51, - 0x2b, 0xea, 0x54, 0x07, 0xe0, 0xa0, 0x67, 0x05, 0x42, 0xb6, 0x60, 0x95, 0x8e, 0xd5, 0x54, 0xda, - 0x46, 0xd9, 0x71, 0x21, 0x6b, 0x7f, 0x89, 0x60, 0xbd, 0x57, 0x94, 0xbd, 0x34, 0x66, 0x4a, 0x25, - 0x43, 0x72, 0x07, 0xaa, 0x1a, 0x99, 0x98, 0x08, 0x94, 0x36, 0x34, 0x5a, 0x00, 0xe4, 0x1e, 0xdc, - 0xb0, 0x9a, 0xf2, 0xc2, 0xc0, 0xf0, 0xb7, 0x86, 0xf5, 0x19, 0xfc, 0xd4, 0xa1, 0xe4, 0x2e, 0xd4, - 0x35, 0x5a, 0xa1, 0x91, 0xcf, 0xea, 0x2a, 0xae, 0x6e, 0x3d, 0xa0, 0xa1, 0xec, 0x31, 0xdc, 0xf2, - 0xc0, 0x18, 0xa5, 0x1d, 0x1e, 0x4d, 0xb5, 0x30, 0x5c, 0x30, 0x2b, 0x94, 0x74, 0x63, 0x57, 0x07, - 0x5b, 0x0b, 0xfa, 0xd5, 0x12, 0xdb, 0xce, 0x60, 0xed, 0xb5, 0x16, 0x23, 0x21, 0x0f, 0xce, 0x48, - 0x1d, 0xca, 0x82, 0x07, 0xaf, 0x65, 0xc1, 0x8b, 0x61, 0x8d, 0x9a, 0x6a, 0x86, 0xb3, 0x61, 0x7d, - 0x46, 0xb6, 0x61, 0x8d, 0x29, 0x69, 0x35, 0x65, 0x33, 0x37, 0xf3, 0x9c, 0x10, 0x58, 0x91, 0xca, - 0x62, 0x50, 0x75, 0x71, 0xfb, 0x43, 0x04, 0xc4, 0xff, 0xe1, 0x83, 0xf3, 0x09, 0xee, 0x6b, 0x35, - 0x51, 0x86, 0xe6, 0x64, 0x13, 0xfe, 0xb3, 0xc2, 0xe6, 0x18, 0x14, 0x7d, 0x42, 0x5a, 0x50, 0xe3, - 0x68, 0x98, 0x16, 0x13, 0xe7, 0xde, 0x2b, 0x2f, 0x43, 0x64, 0x0f, 0x6a, 0x61, 0xeb, 0x8b, 0x9d, - 0x71, 0x0e, 0x6a, 0xbb, 0x71, 0xf2, 0xe7, 0x01, 0x26, 0x0b, 0xd1, 0x01, 0xb0, 0x79, 0xfc, 0x64, - 0xe5, 0xe3, 0xa7, 0x66, 0xa9, 0xf7, 0xe6, 0xe2, 0x2a, 0x8e, 0x2e, 0xaf, 0xe2, 0xe8, 0xe7, 0x55, - 0x1c, 0xbd, 0xbf, 0x8e, 0x4b, 0x97, 0xd7, 0x71, 0xe9, 0xdb, 0x75, 0x5c, 0x7a, 0xbb, 0xb7, 0xb4, - 0xa8, 0xae, 0xeb, 0x8e, 0x44, 0x7b, 0xaa, 0xf4, 0x71, 0xc8, 0x72, 0xe4, 0x23, 0xd4, 0xe9, 0xd9, - 0xd2, 0x8d, 0xba, 0x13, 0x77, 0x2b, 0x5c, 0x1c, 0xfa, 0xaa, 0xbb, 0xd4, 0x87, 0xbf, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x11, 0xc7, 0x3a, 0x07, 0x35, 0x04, 0x00, 0x00, + // 620 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4d, 0x6f, 0x13, 0x3d, + 0x10, 0xce, 0x26, 0x6d, 0xdf, 0x66, 0xa2, 0xe6, 0x2d, 0x56, 0x55, 0x42, 0x85, 0x36, 0x51, 0x24, + 0x44, 0x24, 0xd4, 0x5d, 0x52, 0x90, 0x90, 0xb8, 0x54, 0x24, 0x80, 0x04, 0x17, 0xaa, 0x55, 0x2f, + 0x70, 0x89, 0xbc, 0xde, 0x21, 0x75, 0xbb, 0xb1, 0x23, 0xdb, 0xe9, 0xc7, 0xbf, 0x40, 0xe2, 0xc2, + 0x91, 0x33, 0xbf, 0xa4, 0x27, 0xd4, 0x23, 0x27, 0x40, 0xc9, 0x1f, 0x41, 0x6b, 0x3b, 0x1f, 0x08, +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x5f, 0x92, 0x3a, + 0x94, 0x79, 0xe6, 0x07, 0x2b, 0xf3, 0xac, 0x38, 0x19, 0x2d, 0x27, 0x8a, 0xe1, 0xfc, 0x64, 0x9c, + 0x47, 0xf6, 0x60, 0x93, 0x49, 0x61, 0x14, 0x65, 0xf3, 0xd6, 0x17, 0x3e, 0x21, 0xb0, 0x26, 0xa4, + 0x41, 0xdf, 0xa2, 0xb5, 0xdb, 0x1f, 0x03, 0x20, 0xee, 0x77, 0x1c, 0x5f, 0x8d, 0xf1, 0x48, 0xc9, + 0xb1, 0xd4, 0x34, 0x27, 0x3b, 0xb0, 0x6e, 0xb8, 0xc9, 0xd1, 0x2b, 0x3a, 0x87, 0xb4, 0xa0, 0x96, + 0xa1, 0x66, 0x8a, 0x8f, 0xed, 0xa8, 0x4e, 0x79, 0x15, 0x22, 0x87, 0x50, 0xf3, 0x2b, 0x52, 0x5c, + 0x30, 0xdb, 0x41, 0xed, 0x20, 0x8c, 0xfe, 0xdc, 0xd6, 0x68, 0x29, 0x9a, 0x00, 0x5b, 0xd8, 0x4f, + 0xd7, 0x3e, 0x7d, 0x6e, 0x96, 0x7a, 0x6f, 0xaf, 0xa7, 0x61, 0x70, 0x33, 0x0d, 0x83, 0x9f, 0xd3, + 0x30, 0xf8, 0x30, 0x0b, 0x4b, 0x37, 0xb3, 0xb0, 0xf4, 0x6d, 0x16, 0x96, 0xde, 0x1d, 0xae, 0xdc, + 0x6a, 0x5b, 0x75, 0x5f, 0xa0, 0xb9, 0x90, 0xea, 0xcc, 0x7b, 0x39, 0x66, 0x43, 0x54, 0xf1, 0xe5, + 0xca, 0x42, 0xdb, 0xf7, 0xc0, 0xde, 0xf7, 0xe2, 0x55, 0xd8, 0xb0, 0x6b, 0xfd, 0xe8, 0x57, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xeb, 0x87, 0xbd, 0x91, 0x62, 0x04, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -573,6 +587,13 @@ func (m *BatchIssuance) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.RetirementReason) > 0 { + i -= len(m.RetirementReason) + copy(dAtA[i:], m.RetirementReason) + i = encodeVarintTypes(dAtA, i, uint64(len(m.RetirementReason))) + i-- + dAtA[i] = 0x2a + } if len(m.RetirementJurisdiction) > 0 { i -= len(m.RetirementJurisdiction) copy(dAtA[i:], m.RetirementJurisdiction) @@ -784,6 +805,10 @@ func (m *BatchIssuance) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + l = len(m.RetirementReason) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } return n } @@ -1280,6 +1305,38 @@ func (m *BatchIssuance) Unmarshal(dAtA []byte) error { } m.RetirementJurisdiction = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RetirementReason", 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.RetirementReason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) diff --git a/x/ecocredit/basket/keeper/features/msg_take.feature b/x/ecocredit/basket/keeper/features/msg_take.feature index 702c4f0701..bdebfa061f 100644 --- a/x/ecocredit/basket/keeper/features/msg_take.feature +++ b/x/ecocredit/basket/keeper/features/msg_take.feature @@ -210,14 +210,15 @@ Feature: Msg/Take """ Scenario: EventRetire is emitted - When alice attempts to take credits with basket token amount "2000000" and retire on take "true" from "US-WA" + When alice attempts to take credits with basket token amount "2000000" and retire on take "true" from "US-WA" and reason "offsetting electricity consumption" Then expect event retire with properties """ { "owner": "regen10z82e5ztmrm4pujgummvmr7aqjzwlp6gz8k8xp", "batch_denom": "C01-001-20200101-20210101-001", "amount": "2.000000", - "jurisdiction": "US-WA" + "jurisdiction": "US-WA", + "reason": "offsetting electricity consumption" } """ diff --git a/x/ecocredit/basket/keeper/msg_take.go b/x/ecocredit/basket/keeper/msg_take.go index 9d35e9d371..d589502a5a 100644 --- a/x/ecocredit/basket/keeper/msg_take.go +++ b/x/ecocredit/basket/keeper/msg_take.go @@ -123,6 +123,7 @@ func (k Keeper) Take(ctx context.Context, msg *types.MsgTake) (*types.MsgTakeRes amountCreditsNeeded, retire, retirementJurisdiction, + msg.RetirementReason, ) if err != nil { return nil, err @@ -153,6 +154,7 @@ func (k Keeper) Take(ctx context.Context, msg *types.MsgTake) (*types.MsgTakeRes balance, retire, retirementJurisdiction, + msg.RetirementReason, ) if err != nil { return nil, err @@ -188,7 +190,7 @@ func (k Keeper) Take(ctx context.Context, msg *types.MsgTake) (*types.MsgTakeRes }, err } -func (k Keeper) addCreditBalance(ctx context.Context, owner sdk.AccAddress, batchDenom string, amount math.Dec, retire bool, jurisdiction string) error { +func (k Keeper) addCreditBalance(ctx context.Context, owner sdk.AccAddress, batchDenom string, amount math.Dec, retire bool, jurisdiction, reason string) error { sdkCtx := sdk.UnwrapSDKContext(ctx) batch, err := k.baseStore.BatchTable().GetByDenom(ctx, batchDenom) if err != nil { @@ -226,5 +228,6 @@ func (k Keeper) addCreditBalance(ctx context.Context, owner sdk.AccAddress, batc BatchDenom: batchDenom, Amount: amount.String(), Jurisdiction: jurisdiction, + Reason: reason, }) } diff --git a/x/ecocredit/basket/keeper/msg_take_test.go b/x/ecocredit/basket/keeper/msg_take_test.go index d487f0e8c7..f8b1e39fb2 100644 --- a/x/ecocredit/basket/keeper/msg_take_test.go +++ b/x/ecocredit/basket/keeper/msg_take_test.go @@ -257,6 +257,24 @@ func (s *takeSuite) AliceAttemptsToTakeCreditsWithBasketTokenAmountAndRetireOnTa }) } +func (s *takeSuite) AliceAttemptsToTakeCreditsWithBasketTokenAmountAndRetireOnTakeFromAndReason(a, b, c, d string) { + s.tokenAmount = a + + retireOnTake, err := strconv.ParseBool(b) + require.NoError(s.t, err) + + s.takeExpectCalls() + + s.res, s.err = s.k.Take(s.ctx, &types.MsgTake{ + Owner: s.alice.String(), + BasketDenom: s.basketDenom, + Amount: s.tokenAmount, + RetirementJurisdiction: c, + RetireOnTake: retireOnTake, + RetirementReason: d, + }) +} + func (s *takeSuite) AliceAttemptsToTakeCreditsWithRetireOnTake(a string) { retireOnTake, err := strconv.ParseBool(a) require.NoError(s.t, err) diff --git a/x/ecocredit/basket/types/v1/features/msg_take.feature b/x/ecocredit/basket/types/v1/features/msg_take.feature index b31c73baf9..4a51a9dab5 100644 --- a/x/ecocredit/basket/types/v1/features/msg_take.feature +++ b/x/ecocredit/basket/types/v1/features/msg_take.feature @@ -1,6 +1,21 @@ Feature: MsgTake Scenario: a valid message + Given the message + """ + { + "owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw", + "basket_denom": "eco.uC.NCT", + "amount": "100", + "retirement_jurisdiction": "US-WA", + "retire_on_take": true, + "retirement_reason": "offsetting electricity consumption" + } + """ + When the message is validated + Then expect no error + + Scenario: a valid message without retirement reason Given the message """ { @@ -14,7 +29,7 @@ Feature: MsgTake When the message is validated Then expect no error - Scenario: a valid message without retirement jurisdiction + Scenario: a valid message without retire on take Given the message """ { @@ -149,7 +164,8 @@ Feature: MsgTake "basket_denom": "eco.uC.NCT", "amount": "100", "retirement_jurisdiction": "US-WA", - "retire_on_take": true + "retire_on_take": true, + "retirement_reason": "offsetting electricity consumption" } """ When message sign bytes queried @@ -162,7 +178,8 @@ Feature: MsgTake "basket_denom":"eco.uC.NCT", "owner":"regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw", "retire_on_take":true, - "retirement_jurisdiction":"US-WA" + "retirement_jurisdiction":"US-WA", + "retirement_reason": "offsetting electricity consumption" } } """ diff --git a/x/ecocredit/basket/types/v1/tx.pb.go b/x/ecocredit/basket/types/v1/tx.pb.go index e806510488..eefa858173 100644 --- a/x/ecocredit/basket/types/v1/tx.pb.go +++ b/x/ecocredit/basket/types/v1/tx.pb.go @@ -359,6 +359,12 @@ type MsgTake struct { // // Since Revision 1 RetirementJurisdiction string `protobuf:"bytes,6,opt,name=retirement_jurisdiction,json=retirementJurisdiction,proto3" json:"retirement_jurisdiction,omitempty"` + // retirement_reason is any arbitrary string that specifies the reason for + // retiring credits. The reason will be included in EventRetire and is not + // stored in state. + // + // Since Revision 2 + RetirementReason string `protobuf:"bytes,7,opt,name=retirement_reason,json=retirementReason,proto3" json:"retirement_reason,omitempty"` } func (m *MsgTake) Reset() { *m = MsgTake{} } @@ -437,6 +443,13 @@ func (m *MsgTake) GetRetirementJurisdiction() string { return "" } +func (m *MsgTake) GetRetirementReason() string { + if m != nil { + return m.RetirementReason + } + return "" +} + // MsgTakeFromBasketResponse is the Msg/TakeFromBasket response type. type MsgTakeResponse struct { // credits are the credits taken out of the basket. @@ -704,63 +717,64 @@ func init() { } var fileDescriptor_a60f962a3c61f018 = []byte{ - // 883 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4f, 0x6f, 0xdb, 0x36, - 0x14, 0x8f, 0xa2, 0xc4, 0x89, 0x9f, 0x13, 0xa7, 0x65, 0x83, 0x56, 0x15, 0x0a, 0xc7, 0x15, 0x3a, - 0xd4, 0x6b, 0x1b, 0x69, 0x49, 0xb0, 0x0d, 0xeb, 0x2d, 0x71, 0xb1, 0xc3, 0x50, 0x63, 0x85, 0x96, - 0xed, 0xb0, 0x3f, 0x10, 0x64, 0xe9, 0x4d, 0xd5, 0x6c, 0x8b, 0x2e, 0x49, 0xd9, 0xc9, 0x75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 0x9f, 0x7e, 0x10, 0xbd, 0x5a, 0xf8, 0x05, 0xac, 0xbf, 0xed, 0x8b, - 0x87, 0xef, 0x53, 0x47, 0x93, 0xed, 0xbd, 0x0f, 0x20, 0x97, 0x4b, 0x1e, 0xfc, 0xf0, 0xea, 0xa4, - 0x65, 0xbc, 0x3e, 0x69, 0x19, 0xff, 0x9c, 0xb4, 0x8c, 0x97, 0xa7, 0xad, 0x85, 0xd7, 0xa7, 0xad, - 0x85, 0x3f, 0x4f, 0x5b, 0x0b, 0xdf, 0xef, 0xcf, 0x3c, 0xe6, 0xb2, 0xf0, 0x76, 0x86, 0x62, 0x4a, - 0xd9, 0x40, 0xcf, 0x86, 0x18, 0x27, 0xc8, 0xbc, 0xa3, 0x8b, 0x3f, 0x66, 0xf9, 0xd0, 0x17, 0x3f, - 0xfe, 0x9a, 0xfc, 0x33, 0xef, 0xbd, 0x09, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x9f, 0xbb, 0x8b, 0x50, - 0x08, 0x00, 0x00, + // 902 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0x36, 0x25, 0x5b, 0xb2, 0x46, 0xb6, 0x1c, 0x6f, 0x8c, 0x84, 0x11, 0x02, 0x59, 0x21, 0x52, + 0x44, 0x8d, 0x63, 0xaa, 0xb6, 0xd1, 0x16, 0xcd, 0xcd, 0x56, 0xd0, 0x43, 0x11, 0xa1, 0x01, 0xeb, + 0xf6, 0xd0, 0x1f, 0x10, 0x14, 0x39, 0x65, 0x58, 0x49, 0xbb, 0xca, 0xee, 0x4a, 0xb2, 0xaf, 0x7d, + 0x82, 0xbc, 0x45, 0x81, 0x9e, 0xfa, 0x02, 0xbd, 0xe7, 0x98, 0x63, 0x4f, 0x6d, 0x61, 0x1f, 0xfa, + 0x12, 0x3d, 0x04, 0xdc, 0x5d, 0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80, 0xf5, + 0xb7, 0xfb, 0x62, 0xe7, 0x7d, 0xe2, 0x18, 0x72, 0xfd, 0xe0, 0x03, 0xc8, 0xd9, 0x91, 0x47, 0x3f, + 0xbc, 0x3a, 0x6b, 0x58, 0xaf, 0xcf, 0x1a, 0xd6, 0xbf, 0x67, 0x0d, 0xeb, 0xe5, 0x79, 0x63, 0xe9, + 0xf5, 0x79, 0x63, 0xe9, 0xaf, 0xf3, 0xc6, 0xd2, 0xf7, 0x87, 0x73, 0x2f, 0xbf, 0x0a, 0xbc, 0x4b, + 0x51, 0x4e, 0x19, 0xef, 0x9b, 0xdd, 0x00, 0xa3, 0x18, 0x79, 0xfb, 0xe4, 0xf2, 0x57, 0x5c, 0x7d, + 0x15, 0xd2, 0x7f, 0x09, 0x25, 0xf5, 0x19, 0x3f, 0x78, 0x13, 0x00, 0x00, 0xff, 0xff, 0x30, 0xe5, + 0xfb, 0x03, 0x7d, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1291,6 +1305,13 @@ func (m *MsgTake) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.RetirementReason) > 0 { + i -= len(m.RetirementReason) + copy(dAtA[i:], m.RetirementReason) + i = encodeVarintTx(dAtA, i, uint64(len(m.RetirementReason))) + i-- + dAtA[i] = 0x3a + } if len(m.RetirementJurisdiction) > 0 { i -= len(m.RetirementJurisdiction) copy(dAtA[i:], m.RetirementJurisdiction) @@ -1644,6 +1665,10 @@ func (m *MsgTake) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + l = len(m.RetirementReason) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -2564,6 +2589,38 @@ func (m *MsgTake) Unmarshal(dAtA []byte) error { } m.RetirementJurisdiction = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RetirementReason", 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.RetirementReason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/ecocredit/marketplace/keeper/features/msg_buy_direct.feature b/x/ecocredit/marketplace/keeper/features/msg_buy_direct.feature index fbc487ac64..e802e7be1a 100644 --- a/x/ecocredit/marketplace/keeper/features/msg_buy_direct.feature +++ b/x/ecocredit/marketplace/keeper/features/msg_buy_direct.feature @@ -339,15 +339,29 @@ Feature: Msg/BuyDirect # no failing scenario - state transitions only occur upon successful message execution - Rule: Event is emitted + Rule: Events are emitted Background: Given a credit type + And bob's address "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6" + + Scenario: EventRetire is emitted + Given alice created a sell order with id "1" + When bob attempts to buy credits with sell order id "1" and retirement reason "offsetting electricity consumption" + Then expect event retire with properties + """ + { + "owner": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", + "batch_denom": "C01-001-20200101-20210101-001", + "amount": "10", + "reason": "offsetting electricity consumption" + } + """ Scenario: EventBuyDirect is emitted Given alice created a sell order with id "1" When bob attempts to buy credits with sell order id "1" - Then expect event with properties + Then expect event buy direct with properties """ { "sell_order_id": 1 diff --git a/x/ecocredit/marketplace/keeper/msg_buy_direct.go b/x/ecocredit/marketplace/keeper/msg_buy_direct.go index 958a6ac2d6..88cb26041f 100644 --- a/x/ecocredit/marketplace/keeper/msg_buy_direct.go +++ b/x/ecocredit/marketplace/keeper/msg_buy_direct.go @@ -108,6 +108,7 @@ func (k Keeper) BuyDirect(ctx context.Context, req *types.MsgBuyDirect) (*types. autoRetire: !order.DisableAutoRetire, batchDenom: batch.Denom, jurisdiction: order.RetirementJurisdiction, + reason: order.RetirementReason, }); err != nil { return nil, err } diff --git a/x/ecocredit/marketplace/keeper/msg_buy_direct_test.go b/x/ecocredit/marketplace/keeper/msg_buy_direct_test.go index a764788f1f..db1e0b617b 100644 --- a/x/ecocredit/marketplace/keeper/msg_buy_direct_test.go +++ b/x/ecocredit/marketplace/keeper/msg_buy_direct_test.go @@ -18,6 +18,7 @@ import ( baseapi "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" "github.com/regen-network/regen-ledger/types/math" "github.com/regen-network/regen-ledger/types/testutil" + basetypes "github.com/regen-network/regen-ledger/x/ecocredit/base/types/v1" types "github.com/regen-network/regen-ledger/x/ecocredit/marketplace/types/v1" ) @@ -159,6 +160,12 @@ func (s *buyDirectSuite) TheBatchSupply(a gocuke.DocString) { require.NoError(s.t, err) } +func (s *buyDirectSuite) BobsAddress(a string) { + addr, err := sdk.AccAddressFromBech32(a) + require.NoError(s.t, err) + s.bob = addr +} + func (s *buyDirectSuite) AliceCreatedASellOrderWithId(a string) { id, err := strconv.ParseUint(a, 10, 32) require.NoError(s.t, err) @@ -274,6 +281,25 @@ func (s *buyDirectSuite) BobAttemptsToBuyCreditsWithSellOrderId(a string) { }) } +func (s *buyDirectSuite) BobAttemptsToBuyCreditsWithSellOrderIdAndRetirementReason(a, b string) { + id, err := strconv.ParseUint(a, 10, 32) + require.NoError(s.t, err) + + s.singleBuyOrderExpectCalls() + + s.res, s.err = s.k.BuyDirect(s.ctx, &types.MsgBuyDirect{ + Buyer: s.bob.String(), + Orders: []*types.MsgBuyDirect_Order{ + { + SellOrderId: id, + Quantity: s.quantity, + BidPrice: &s.bidPrice, + RetirementReason: b, + }, + }, + }) +} + func (s *buyDirectSuite) BobAttemptsToBuyCreditsWithBidDenom(a string) { s.singleBuyOrderExpectCalls() @@ -513,7 +539,7 @@ func (s *buyDirectSuite) ExpectBatchSupply(a gocuke.DocString) { require.Equal(s.t, expected.TradableAmount, balance.TradableAmount) } -func (s *buyDirectSuite) ExpectEventWithProperties(a gocuke.DocString) { +func (s *buyDirectSuite) ExpectEventBuyDirectWithProperties(a gocuke.DocString) { var event types.EventBuyDirect err := json.Unmarshal([]byte(a.Content), &event) require.NoError(s.t, err) @@ -525,6 +551,18 @@ func (s *buyDirectSuite) ExpectEventWithProperties(a gocuke.DocString) { require.NoError(s.t, err) } +func (s *buyDirectSuite) ExpectEventRetireWithProperties(a gocuke.DocString) { + var event basetypes.EventRetire + err := json.Unmarshal([]byte(a.Content), &event) + require.NoError(s.t, err) + + sdkEvent, found := testutil.GetEvent(&event, s.sdkCtx.EventManager().Events()) + require.True(s.t, found) + + err = testutil.MatchEvent(&event, sdkEvent) + require.NoError(s.t, err) +} + // count is the number of sell orders created func (s *buyDirectSuite) createSellOrders(count int) { totalQuantity := s.quantity diff --git a/x/ecocredit/marketplace/keeper/utils.go b/x/ecocredit/marketplace/keeper/utils.go index 568ba1d0ad..2f4023efdd 100644 --- a/x/ecocredit/marketplace/keeper/utils.go +++ b/x/ecocredit/marketplace/keeper/utils.go @@ -23,6 +23,7 @@ type orderOptions struct { autoRetire bool batchDenom string jurisdiction string + reason string } // fillOrder moves credits and coins according to the order. It will: @@ -146,6 +147,7 @@ func (k Keeper) fillOrder(ctx context.Context, orderIndex string, sellOrder *api BatchDenom: opts.batchDenom, Amount: purchaseQty.String(), Jurisdiction: opts.jurisdiction, + Reason: opts.reason, }); err != nil { return err } diff --git a/x/ecocredit/marketplace/types/v1/features/msg_buy_direct.feature b/x/ecocredit/marketplace/types/v1/features/msg_buy_direct.feature index 6275d06503..2c531f128f 100644 --- a/x/ecocredit/marketplace/types/v1/features/msg_buy_direct.feature +++ b/x/ecocredit/marketplace/types/v1/features/msg_buy_direct.feature @@ -1,6 +1,28 @@ Feature: MsgBuyDirect Scenario: a valid message + Given the message + """ + { + "buyer": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw", + "orders": [ + { + "sell_order_id": "1", + "quantity": "100", + "bid_price": { + "denom": "regen", + "amount": "100" + }, + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" + } + ] + } + """ + When the message is validated + Then expect no error + + Scenario: a valid message without retirement reason Given the message """ { @@ -34,7 +56,8 @@ Feature: MsgBuyDirect "denom": "regen", "amount": "100" }, - "retirement_jurisdiction": "US-WA" + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" }, { "sell_order_id": "1", @@ -43,7 +66,8 @@ Feature: MsgBuyDirect "denom": "regen", "amount": "100" }, - "retirement_jurisdiction": "US-WA" + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" } ] } @@ -289,7 +313,8 @@ Feature: MsgBuyDirect "denom": "regen", "amount": "100" }, - "retirement_jurisdiction": "US-WA" + "retirement_jurisdiction": "US-WA", + "retirement_reason": "offsetting electricity consumption" } ] } @@ -309,6 +334,7 @@ Feature: MsgBuyDirect }, "quantity":"100", "retirement_jurisdiction":"US-WA", + "retirement_reason": "offsetting electricity consumption", "sell_order_id":"1" } ] diff --git a/x/ecocredit/marketplace/types/v1/tx.pb.go b/x/ecocredit/marketplace/types/v1/tx.pb.go index bec1d80a44..57263bd4c3 100644 --- a/x/ecocredit/marketplace/types/v1/tx.pb.go +++ b/x/ecocredit/marketplace/types/v1/tx.pb.go @@ -568,6 +568,12 @@ type MsgBuyDirect_Order struct { // retirement_jurisdiction is the optional retirement jurisdiction for the // credits which will be used only if disable_auto_retire is false. RetirementJurisdiction string `protobuf:"bytes,6,opt,name=retirement_jurisdiction,json=retirementJurisdiction,proto3" json:"retirement_jurisdiction,omitempty"` + // retirement_reason is any arbitrary string that specifies the reason for + // retiring credits. The reason will be included in EventRetire and is not + // stored in state. + // + // Since Revision 2 + RetirementReason string `protobuf:"bytes,7,opt,name=retirement_reason,json=retirementReason,proto3" json:"retirement_reason,omitempty"` } func (m *MsgBuyDirect_Order) Reset() { *m = MsgBuyDirect_Order{} } @@ -638,6 +644,13 @@ func (m *MsgBuyDirect_Order) GetRetirementJurisdiction() string { return "" } +func (m *MsgBuyDirect_Order) GetRetirementReason() string { + if m != nil { + return m.RetirementReason + } + return "" +} + // MsgBuyDirectResponse is the Msg/BuyDirect response type. type MsgBuyDirectResponse struct { } @@ -911,67 +924,68 @@ func init() { } var fileDescriptor_68c9b4e4b7fcb584 = []byte{ - // 946 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x5f, 0x6f, 0xdb, 0x54, - 0x14, 0xaf, 0xf3, 0x6f, 0xcd, 0x49, 0xdb, 0x81, 0x57, 0xba, 0x60, 0xd6, 0x34, 0x04, 0xa4, 0x45, - 0x88, 0xd9, 0x6a, 0x07, 0x4c, 0x0a, 0x9a, 0x44, 0xbb, 0x0d, 0xc4, 0x50, 0x04, 0x78, 0xe3, 0x05, - 0x09, 0x65, 0xfe, 0x73, 0x70, 0x2f, 0xb1, 0x7d, 0x8d, 0xef, 0x75, 0xdb, 0x3c, 0x82, 0x90, 0x90, - 0x78, 0xda, 0x33, 0x8f, 0x7c, 0x02, 0x3e, 0x06, 0x8f, 0x7b, 0xe4, 0x0d, 0xd4, 0x4a, 0x8c, 0x27, - 0x9e, 0xf8, 0x00, 0xe8, 0x5e, 0x3b, 0x6e, 0x9a, 0x34, 0xc3, 0xc9, 0x5b, 0xee, 0xf9, 0x7f, 0x7e, - 0xbf, 0x73, 0x8e, 0x03, 0x37, 0x63, 0xf4, 0x30, 0x34, 0xd0, 0xa1, 0x4e, 0x8c, 0x2e, 0xe1, 0x46, - 0x60, 0xc5, 0x43, 0xe4, 0x91, 0x6f, 0x39, 0x68, 0x1c, 0xed, 0x1a, 0xfc, 0x44, 0x8f, 0x62, 0xca, - 0xa9, 0xda, 0x92, 0x86, 0x7a, 0x6e, 0xa8,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da, 0xdd, 0xa5, 0xdc, - 0xc6, 0xc5, 0x1c, 0x3c, 0xf9, 0xed, 0xb4, 0xa5, 0x3c, 0x3b, 0x6d, 0x29, 0x7f, 0x9e, 0xb6, 0x94, - 0xa7, 0x67, 0xad, 0x95, 0x67, 0x67, 0xad, 0x95, 0xdf, 0xcf, 0x5a, 0x2b, 0x5f, 0x7e, 0xe8, 0x11, - 0x7e, 0x98, 0xd8, 0xba, 0x43, 0x03, 0x43, 0xa6, 0xb8, 0x15, 0x22, 0x3f, 0xa6, 0xf1, 0x30, 0x7b, - 0xf9, 0xe8, 0x7a, 0x18, 0x1b, 0x27, 0x73, 0xfe, 0x79, 0xf2, 0x51, 0x84, 0x4c, 0xfc, 0x8d, 0xac, - 0xc9, 0xaf, 0xdb, 0xed, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x19, 0x49, 0xcc, 0x65, 0xa8, 0x0a, - 0x00, 0x00, + // 969 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4b, 0x6f, 0x1b, 0xd5, + 0x17, 0xcf, 0xf8, 0x95, 0xf8, 0x38, 0x49, 0xdb, 0xdb, 0xfc, 0x53, 0xff, 0x87, 0xc6, 0x31, 0x06, + 0xa9, 0x16, 0xd0, 0x19, 0x25, 0x05, 0x2a, 0x19, 0x55, 0x22, 0x69, 0x0b, 0xa2, 0xc8, 0x02, 0xa6, + 0x65, 0x83, 0x84, 0xdc, 0x79, 0x1c, 0x26, 0x83, 0x67, 0xe6, 0x0e, 0x73, 0xef, 0x24, 0xf1, 0x12, + 0x84, 0x84, 0xc4, 0xaa, 0x0b, 0xd8, 0xb0, 0xe4, 0x13, 0xf0, 0x31, 0x58, 0x76, 0xc9, 0x0e, 0x94, + 0x48, 0xb0, 0x63, 0xc5, 0x07, 0x40, 0x73, 0xe7, 0x61, 0xc7, 0x8e, 0xcb, 0xd8, 0x3b, 0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 0xef, 0x2c, 0x01, 0xca, 0xd3, 0xf8, 0x5a, 0x82, 0x2b, 0xd3, + 0xb7, 0xa4, 0xc8, 0xb6, 0x4e, 0x61, 0xe4, 0xde, 0xe2, 0x98, 0x3c, 0x07, 0x0a, 0xf5, 0xf1, 0x41, + 0x79, 0x63, 0x91, 0x53, 0x21, 0xbf, 0xb9, 0x88, 0xf5, 0x85, 0xa2, 0xa7, 0x77, 0xa2, 0x48, 0xd1, + 0x53, 0x98, 0x42, 0x45, 0xcf, 0x99, 0x6b, 0xf2, 0xbd, 0x04, 0xe4, 0x92, 0xa9, 0x7e, 0xab, 0x80, + 0xcb, 0x59, 0x98, 0x7c, 0x6f, 0x29, 0x58, 0x96, 0xcc, 0xe1, 0xd3, 0x5f, 0xcf, 0x5a, 0xd2, 0xf3, + 0xb3, 0x96, 0xf4, 0xc7, 0x59, 0x4b, 0x7a, 0x76, 0xde, 0x5a, 0x79, 0x7e, 0xde, 0x5a, 0xf9, 0xed, + 0xbc, 0xb5, 0xf2, 0xd9, 0x7b, 0xb6, 0xc3, 0x8f, 0x22, 0x43, 0x31, 0xa9, 0xa7, 0x8a, 0x10, 0xb7, + 0x7d, 0xe4, 0x27, 0x34, 0x1c, 0xa6, 0x2f, 0x17, 0x2d, 0x1b, 0x43, 0xf5, 0x74, 0xce, 0xdf, 0x54, + 0x3e, 0x0a, 0x90, 0xc5, 0xff, 0x39, 0x6b, 0xe2, 0x53, 0x78, 0xe7, 0xdf, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x3a, 0x9a, 0x8c, 0xfd, 0xd5, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1666,6 +1680,13 @@ func (m *MsgBuyDirect_Order) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.RetirementReason) > 0 { + i -= len(m.RetirementReason) + copy(dAtA[i:], m.RetirementReason) + i = encodeVarintTx(dAtA, i, uint64(len(m.RetirementReason))) + i-- + dAtA[i] = 0x3a + } if len(m.RetirementJurisdiction) > 0 { i -= len(m.RetirementJurisdiction) copy(dAtA[i:], m.RetirementJurisdiction) @@ -2062,6 +2083,10 @@ func (m *MsgBuyDirect_Order) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + l = len(m.RetirementReason) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -3381,6 +3406,38 @@ func (m *MsgBuyDirect_Order) Unmarshal(dAtA []byte) error { } m.RetirementJurisdiction = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RetirementReason", 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.RetirementReason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) From a317ef5fdc01ad507865e218cd7cbf33888fee20 Mon Sep 17 00:00:00 2001 From: ryanchristo <12519942+ryanchristo@users.noreply.github.com> Date: Mon, 21 Nov 2022 16:21:07 -0800 Subject: [PATCH 2/2] add max length and update changelog --- CHANGELOG.md | 1 + proto/regen/ecocredit/marketplace/v1/tx.proto | 2 +- .../base/keeper/features/msg_retire.feature | 2 +- .../base/types/v1/features/msg_retire.feature | 18 ++++++++++++ .../base/types/v1/features/msg_send.feature | 29 +++++++++++++++---- .../v1/features/types_batch_issuance.feature | 17 +++++++++-- x/ecocredit/base/types/v1/msg_retire.go | 6 ++++ x/ecocredit/base/types/v1/msg_retire_test.go | 9 ++++++ x/ecocredit/base/types/v1/msg_send.go | 16 ++++++---- x/ecocredit/base/types/v1/msg_send_test.go | 9 ++++++ .../base/types/v1/types_batch_issuance.go | 6 ++++ .../types/v1/types_batch_issuance_test.go | 9 ++++++ .../basket/types/v1/features/msg_take.feature | 15 ++++++++++ x/ecocredit/basket/types/v1/msg_take.go | 5 ++++ x/ecocredit/basket/types/v1/msg_take_test.go | 9 ++++++ .../types/v1/features/msg_buy_direct.feature | 22 ++++++++++++++ .../marketplace/types/v1/msg_buy_direct.go | 5 ++++ .../types/v1/msg_buy_direct_test.go | 9 ++++++ 18 files changed, 175 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54194dc90b..750a8ce120 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -120,6 +120,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#1467](https://github.com/regen-network/regen-ledger/pull/1467) Add `ClassFee` state validation checks - [#1467](https://github.com/regen-network/regen-ledger/pull/1467) Add `BasketFee` state validation checks - [#1484](https://github.com/regen-network/regen-ledger/pull/1484) Add `Msg/UpdateCurator` +- [#1625](https://github.com/regen-network/regen-ledger/pull/1625) Add `reason`/`retirement_reason` #### Changed diff --git a/proto/regen/ecocredit/marketplace/v1/tx.proto b/proto/regen/ecocredit/marketplace/v1/tx.proto index aaa8077357..7aa880426e 100644 --- a/proto/regen/ecocredit/marketplace/v1/tx.proto +++ b/proto/regen/ecocredit/marketplace/v1/tx.proto @@ -172,7 +172,7 @@ message MsgBuyDirect { // retiring credits. The reason will be included in EventRetire and is not // stored in state. // - // Since Revision 2 + // Since Revision 1 string retirement_reason = 7; } } diff --git a/x/ecocredit/base/keeper/features/msg_retire.feature b/x/ecocredit/base/keeper/features/msg_retire.feature index c3b32161f3..48d945d996 100644 --- a/x/ecocredit/base/keeper/features/msg_retire.feature +++ b/x/ecocredit/base/keeper/features/msg_retire.feature @@ -131,4 +131,4 @@ Feature: Msg/Retire "jurisdiction": "US-WA", "reason": "offsetting electricity consumption" } - """ \ No newline at end of file + """ diff --git a/x/ecocredit/base/types/v1/features/msg_retire.feature b/x/ecocredit/base/types/v1/features/msg_retire.feature index 32a9f4dba1..cfa5db9154 100644 --- a/x/ecocredit/base/types/v1/features/msg_retire.feature +++ b/x/ecocredit/base/types/v1/features/msg_retire.feature @@ -148,6 +148,24 @@ Feature: MsgRetire When the message is validated Then expect the error "jurisdiction: expected format [-[ ]]: parse error: invalid request" + Scenario: an error is returned if reason exceeds 512 characters + Given the message + """ + { + "owner": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", + "credits": [ + { + "batch_denom": "C01-001-20200101-20210101-001", + "amount": "100" + } + ], + "jurisdiction": "US-WA" + } + """ + And reason with length "513" + When the message is validated + Then expect the error "reason: max length 512: limit exceeded" + Scenario: a valid amino message Given the message """ diff --git a/x/ecocredit/base/types/v1/features/msg_send.feature b/x/ecocredit/base/types/v1/features/msg_send.feature index c24b48ff36..4a2aa6df7d 100644 --- a/x/ecocredit/base/types/v1/features/msg_send.feature +++ b/x/ecocredit/base/types/v1/features/msg_send.feature @@ -156,7 +156,7 @@ Feature: MsgSend } """ When the message is validated - Then expect the error "tradable amount or retired amount required: invalid request" + Then expect the error "credits[0]: tradable amount or retired amount required: invalid request" Scenario: an error is returned if credits tradable amount is a negative decimal Given the message @@ -173,7 +173,7 @@ Feature: MsgSend } """ When the message is validated - Then expect the error "expected a non-negative decimal, got -100: invalid decimal string" + Then expect the error "credits[0]: expected a non-negative decimal, got -100: invalid decimal string" Scenario: an error is returned if credits retired amount is a negative decimal Given the message @@ -190,7 +190,7 @@ Feature: MsgSend } """ When the message is validated - Then expect the error "expected a non-negative decimal, got -100: invalid decimal string" + Then expect the error "credits[0]: expected a non-negative decimal, got -100: invalid decimal string" Scenario: an error is returned if credits retired amount is positive and retirement jurisdiction is empty Given the message @@ -207,7 +207,7 @@ Feature: MsgSend } """ When the message is validated - Then expect the error "retirement jurisdiction: empty string is not allowed: parse error: invalid request" + Then expect the error "credits[0]: retirement jurisdiction: empty string is not allowed: parse error: invalid request" Scenario: an error is returned if credits retired amount is positive and retirement jurisdiction is not formatted Given the message @@ -225,7 +225,26 @@ Feature: MsgSend } """ When the message is validated - Then expect the error "retirement jurisdiction: expected format [-[ ]]: parse error: invalid request" + Then expect the error "credits[0]: retirement jurisdiction: expected format [-[ ]]: parse error: invalid request" + + Scenario: an error is returned if credits retired amount is positive and retirement reason exceeds 512 characters + Given the message + """ + { + "sender": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", + "recipient": "regen1tnh2q55v8wyygtt9srz5safamzdengsnlm0yy4", + "credits": [ + { + "batch_denom": "C01-001-20200101-20210101-001", + "retired_amount": "100", + "retirement_jurisdiction": "US-WA" + } + ] + } + """ + And retirement reason with length "513" + When the message is validated + Then expect the error "credits[0]: retirement reason: max length 512: limit exceeded" Scenario: a valid amino message Given the message diff --git a/x/ecocredit/base/types/v1/features/types_batch_issuance.feature b/x/ecocredit/base/types/v1/features/types_batch_issuance.feature index 55866553f9..6f9bb7d8d2 100644 --- a/x/ecocredit/base/types/v1/features/types_batch_issuance.feature +++ b/x/ecocredit/base/types/v1/features/types_batch_issuance.feature @@ -86,7 +86,7 @@ Feature: BatchIssuance When the batch issuance is validated Then expect the error "retired amount: expected a non-negative decimal, got -100: invalid decimal string" - Scenario: an error is returned if issuance retired amount is positive and jurisdiction is empty + Scenario: an error is returned if issuance retired amount is positive and retirement jurisdiction is empty Given the batch issuance """ { @@ -97,7 +97,7 @@ Feature: BatchIssuance When the batch issuance is validated Then expect the error "retirement jurisdiction: empty string is not allowed: parse error: invalid request" - Scenario: an error is returned if issuance retired amount is positive and jurisdiction is not formatted + Scenario: an error is returned if issuance retired amount is positive and retirement jurisdiction is not formatted Given the batch issuance """ { @@ -108,3 +108,16 @@ Feature: BatchIssuance """ When the batch issuance is validated Then expect the error "retirement jurisdiction: expected format [-[ ]]: parse error: invalid request" + + Scenario: an error is returned if issuance retired amount is positive and retirement reason exceeds 512 characters + Given the batch issuance + """ + { + "recipient": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6", + "retired_amount": "100", + "retirement_jurisdiction": "US-WA" + } + """ + And retirement reason with length "513" + When the batch issuance is validated + Then expect the error "retirement reason: max length 512: limit exceeded" diff --git a/x/ecocredit/base/types/v1/msg_retire.go b/x/ecocredit/base/types/v1/msg_retire.go index f9b04c4345..37db1ffbbe 100644 --- a/x/ecocredit/base/types/v1/msg_retire.go +++ b/x/ecocredit/base/types/v1/msg_retire.go @@ -3,6 +3,8 @@ package v1 import ( "cosmossdk.io/errors" + "github.com/regen-network/regen-ledger/x/ecocredit" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" @@ -43,6 +45,10 @@ func (m *MsgRetire) ValidateBasic() error { return sdkerrors.ErrInvalidRequest.Wrapf("jurisdiction: %s", err) } + if len(m.Reason) > base.MaxNoteLength { + return ecocredit.ErrMaxLimit.Wrapf("reason: max length %d", base.MaxNoteLength) + } + return nil } diff --git a/x/ecocredit/base/types/v1/msg_retire_test.go b/x/ecocredit/base/types/v1/msg_retire_test.go index 91d1589098..1ab5d2b1da 100644 --- a/x/ecocredit/base/types/v1/msg_retire_test.go +++ b/x/ecocredit/base/types/v1/msg_retire_test.go @@ -3,6 +3,8 @@ package v1 import ( "bytes" "encoding/json" + "strconv" + "strings" "testing" "github.com/gogo/protobuf/jsonpb" @@ -31,6 +33,13 @@ func (s *msgRetire) TheMessage(a gocuke.DocString) { require.NoError(s.t, err) } +func (s *msgRetire) ReasonWithLength(a string) { + length, err := strconv.ParseInt(a, 10, 64) + require.NoError(s.t, err) + + s.msg.Reason = strings.Repeat("x", int(length)) +} + func (s *msgRetire) TheMessageIsValidated() { s.err = s.msg.ValidateBasic() } diff --git a/x/ecocredit/base/types/v1/msg_send.go b/x/ecocredit/base/types/v1/msg_send.go index 1202b48ee8..61e5e5f250 100644 --- a/x/ecocredit/base/types/v1/msg_send.go +++ b/x/ecocredit/base/types/v1/msg_send.go @@ -3,11 +3,13 @@ package v1 import ( "fmt" + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" - "github.com/regen-network/regen-ledger/types/math" + "github.com/regen-network/regen-ledger/x/ecocredit" "github.com/regen-network/regen-ledger/x/ecocredit/base" ) @@ -46,21 +48,25 @@ func (m *MsgSend) ValidateBasic() error { } if credits.TradableAmount == "" && credits.RetiredAmount == "" { - return sdkerrors.ErrInvalidRequest.Wrap("tradable amount or retired amount required") + return sdkerrors.ErrInvalidRequest.Wrapf("%s: tradable amount or retired amount required", creditIndex) } if _, err := math.NewNonNegativeDecFromString(credits.TradableAmount); err != nil { - return err + return errors.Wrapf(err, "%s", creditIndex) } retiredAmount, err := math.NewNonNegativeDecFromString(credits.RetiredAmount) if err != nil { - return err + return errors.Wrapf(err, "%s", creditIndex) } if !retiredAmount.IsZero() { if err = base.ValidateJurisdiction(credits.RetirementJurisdiction); err != nil { - return sdkerrors.ErrInvalidRequest.Wrapf("retirement jurisdiction: %s", err) + return sdkerrors.ErrInvalidRequest.Wrapf("%s: retirement jurisdiction: %s", creditIndex, err) + } + + if len(credits.RetirementReason) > base.MaxNoteLength { + return ecocredit.ErrMaxLimit.Wrapf("%s: retirement reason: max length %d", creditIndex, base.MaxNoteLength) } } } diff --git a/x/ecocredit/base/types/v1/msg_send_test.go b/x/ecocredit/base/types/v1/msg_send_test.go index c1221a8ede..186a02abf1 100644 --- a/x/ecocredit/base/types/v1/msg_send_test.go +++ b/x/ecocredit/base/types/v1/msg_send_test.go @@ -3,6 +3,8 @@ package v1 import ( "bytes" "encoding/json" + "strconv" + "strings" "testing" "github.com/gogo/protobuf/jsonpb" @@ -31,6 +33,13 @@ func (s *msgSend) TheMessage(a gocuke.DocString) { require.NoError(s.t, err) } +func (s *msgSend) RetirementReasonWithLength(a string) { + length, err := strconv.ParseInt(a, 10, 64) + require.NoError(s.t, err) + + s.msg.Credits[0].RetirementReason = strings.Repeat("x", int(length)) +} + func (s *msgSend) TheMessageIsValidated() { s.err = s.msg.ValidateBasic() } diff --git a/x/ecocredit/base/types/v1/types_batch_issuance.go b/x/ecocredit/base/types/v1/types_batch_issuance.go index ddedbd7ad6..3c861e9ef5 100644 --- a/x/ecocredit/base/types/v1/types_batch_issuance.go +++ b/x/ecocredit/base/types/v1/types_batch_issuance.go @@ -3,6 +3,8 @@ package v1 import ( "cosmossdk.io/errors" + "github.com/regen-network/regen-ledger/x/ecocredit" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -36,6 +38,10 @@ func (i *BatchIssuance) Validate() error { if err = base.ValidateJurisdiction(i.RetirementJurisdiction); err != nil { return sdkerrors.ErrInvalidRequest.Wrapf("retirement jurisdiction: %s", err) } + + if len(i.RetirementReason) > base.MaxNoteLength { + return ecocredit.ErrMaxLimit.Wrapf("retirement reason: max length %d", base.MaxNoteLength) + } } } diff --git a/x/ecocredit/base/types/v1/types_batch_issuance_test.go b/x/ecocredit/base/types/v1/types_batch_issuance_test.go index 75f433cc11..24bd0a645b 100644 --- a/x/ecocredit/base/types/v1/types_batch_issuance_test.go +++ b/x/ecocredit/base/types/v1/types_batch_issuance_test.go @@ -1,6 +1,8 @@ package v1 import ( + "strconv" + "strings" "testing" "github.com/gogo/protobuf/jsonpb" @@ -28,6 +30,13 @@ func (s *batchIssuance) TheBatchIssuance(a gocuke.DocString) { require.NoError(s.t, err) } +func (s *batchIssuance) RetirementReasonWithLength(a string) { + length, err := strconv.ParseInt(a, 10, 64) + require.NoError(s.t, err) + + s.issuance.RetirementReason = strings.Repeat("x", int(length)) +} + func (s *batchIssuance) TheBatchIssuanceIsValidated() { s.err = s.issuance.Validate() } diff --git a/x/ecocredit/basket/types/v1/features/msg_take.feature b/x/ecocredit/basket/types/v1/features/msg_take.feature index 4a51a9dab5..a1b5ed1dc3 100644 --- a/x/ecocredit/basket/types/v1/features/msg_take.feature +++ b/x/ecocredit/basket/types/v1/features/msg_take.feature @@ -156,6 +156,21 @@ Feature: MsgTake When the message is validated Then expect no error + Scenario: an error is returned if retirement reason exceeds 512 characters + Given the message + """ + { + "owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw", + "basket_denom": "eco.uC.NCT", + "amount": "100", + "retirement_jurisdiction": "US-WA", + "retire_on_take": true + } + """ + And retirement reason with length "513" + When the message is validated + Then expect the error "retirement reason: max length 512: limit exceeded" + Scenario: a valid amino message Given the message """ diff --git a/x/ecocredit/basket/types/v1/msg_take.go b/x/ecocredit/basket/types/v1/msg_take.go index ec30492b3b..0657c75013 100644 --- a/x/ecocredit/basket/types/v1/msg_take.go +++ b/x/ecocredit/basket/types/v1/msg_take.go @@ -4,6 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" + "github.com/regen-network/regen-ledger/x/ecocredit" "github.com/regen-network/regen-ledger/x/ecocredit/basket" @@ -64,6 +65,10 @@ func (m MsgTake) ValidateBasic() error { return sdkerrors.ErrInvalidRequest.Wrapf("retirement jurisdiction: %s", err) } } + + if len(m.RetirementReason) > base.MaxNoteLength { + return ecocredit.ErrMaxLimit.Wrapf("retirement reason: max length %d", base.MaxNoteLength) + } } return nil diff --git a/x/ecocredit/basket/types/v1/msg_take_test.go b/x/ecocredit/basket/types/v1/msg_take_test.go index 70dcf2595d..1e616ca15d 100644 --- a/x/ecocredit/basket/types/v1/msg_take_test.go +++ b/x/ecocredit/basket/types/v1/msg_take_test.go @@ -3,6 +3,8 @@ package v1 import ( "bytes" "encoding/json" + "strconv" + "strings" "testing" "github.com/gogo/protobuf/jsonpb" @@ -31,6 +33,13 @@ func (s *msgTakeSuite) TheMessage(a gocuke.DocString) { require.NoError(s.t, err) } +func (s *msgTakeSuite) RetirementReasonWithLength(a string) { + length, err := strconv.ParseInt(a, 10, 64) + require.NoError(s.t, err) + + s.msg.RetirementReason = strings.Repeat("x", int(length)) +} + func (s *msgTakeSuite) TheMessageIsValidated() { s.err = s.msg.ValidateBasic() } diff --git a/x/ecocredit/marketplace/types/v1/features/msg_buy_direct.feature b/x/ecocredit/marketplace/types/v1/features/msg_buy_direct.feature index 2c531f128f..efb6fc4474 100644 --- a/x/ecocredit/marketplace/types/v1/features/msg_buy_direct.feature +++ b/x/ecocredit/marketplace/types/v1/features/msg_buy_direct.feature @@ -300,6 +300,28 @@ Feature: MsgBuyDirect When the message is validated Then expect the error "orders[0]: retirement jurisdiction: expected format [-[ ]]: parse error: invalid request" + Scenario: an error is returned if disable auto-retire is true and retirement reason exceeds 512 characters + Given the message + """ + { + "buyer": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw", + "orders": [ + { + "sell_order_id": 1, + "quantity": "100", + "bid_price": { + "denom": "regen", + "amount": "100" + }, + "retirement_jurisdiction": "US-WA" + } + ] + } + """ + And retirement reason with length "513" + When the message is validated + Then expect the error "orders[0]: retirement reason: max length 512: limit exceeded" + Scenario: a valid amino message Given the message """ diff --git a/x/ecocredit/marketplace/types/v1/msg_buy_direct.go b/x/ecocredit/marketplace/types/v1/msg_buy_direct.go index 2f07359260..ee143c2ad6 100644 --- a/x/ecocredit/marketplace/types/v1/msg_buy_direct.go +++ b/x/ecocredit/marketplace/types/v1/msg_buy_direct.go @@ -6,6 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" + "github.com/regen-network/regen-ledger/x/ecocredit" "github.com/regen-network/regen-ledger/types/math" "github.com/regen-network/regen-ledger/x/ecocredit/base" @@ -71,6 +72,10 @@ func (m MsgBuyDirect) ValidateBasic() error { if err := base.ValidateJurisdiction(order.RetirementJurisdiction); err != nil { return sdkerrors.ErrInvalidRequest.Wrapf("%s: retirement jurisdiction: %s", orderIndex, err) } + + if len(order.RetirementReason) > base.MaxNoteLength { + return ecocredit.ErrMaxLimit.Wrapf("%s: retirement reason: max length %d", orderIndex, base.MaxNoteLength) + } } } diff --git a/x/ecocredit/marketplace/types/v1/msg_buy_direct_test.go b/x/ecocredit/marketplace/types/v1/msg_buy_direct_test.go index 5d4e9747d5..b5bf2603cb 100644 --- a/x/ecocredit/marketplace/types/v1/msg_buy_direct_test.go +++ b/x/ecocredit/marketplace/types/v1/msg_buy_direct_test.go @@ -3,6 +3,8 @@ package v1 import ( "bytes" "encoding/json" + "strconv" + "strings" "testing" "github.com/gogo/protobuf/jsonpb" @@ -31,6 +33,13 @@ func (s *msgBuyDirectSuite) TheMessage(a gocuke.DocString) { require.NoError(s.t, err) } +func (s *msgBuyDirectSuite) RetirementReasonWithLength(a string) { + length, err := strconv.ParseInt(a, 10, 64) + require.NoError(s.t, err) + + s.msg.Orders[0].RetirementReason = strings.Repeat("x", int(length)) +} + func (s *msgBuyDirectSuite) TheMessageIsValidated() { s.err = s.msg.ValidateBasic() }