From 39485002991847ffc97b5270730b26a365e9db3f Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 16 Feb 2022 20:16:56 -0500 Subject: [PATCH] docs(x/ecocredit): clarify EventReceive.sender (#778) * docs(x/ecocredit): clarify EventReceive.sender * update docs * update docs * feat: add field for basket_denom in event receive * fix: proto order Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com> --- api/regen/ecocredit/v1alpha1/events.pulsar.go | 156 +++++++++++++----- proto/regen/ecocredit/v1alpha1/events.proto | 17 +- 2 files changed, 129 insertions(+), 44 deletions(-) diff --git a/api/regen/ecocredit/v1alpha1/events.pulsar.go b/api/regen/ecocredit/v1alpha1/events.pulsar.go index 4635c4438e..baf1bcca11 100644 --- a/api/regen/ecocredit/v1alpha1/events.pulsar.go +++ b/api/regen/ecocredit/v1alpha1/events.pulsar.go @@ -1307,6 +1307,7 @@ var ( fd_EventReceive_batch_denom protoreflect.FieldDescriptor fd_EventReceive_tradable_amount protoreflect.FieldDescriptor fd_EventReceive_retired_amount protoreflect.FieldDescriptor + fd_EventReceive_basket_denom protoreflect.FieldDescriptor ) func init() { @@ -1317,6 +1318,7 @@ func init() { fd_EventReceive_batch_denom = md_EventReceive.Fields().ByName("batch_denom") fd_EventReceive_tradable_amount = md_EventReceive.Fields().ByName("tradable_amount") fd_EventReceive_retired_amount = md_EventReceive.Fields().ByName("retired_amount") + fd_EventReceive_basket_denom = md_EventReceive.Fields().ByName("basket_denom") } var _ protoreflect.Message = (*fastReflection_EventReceive)(nil) @@ -1414,6 +1416,12 @@ func (x *fastReflection_EventReceive) Range(f func(protoreflect.FieldDescriptor, return } } + if x.BasketDenom != "" { + value := protoreflect.ValueOfString(x.BasketDenom) + if !f(fd_EventReceive_basket_denom, value) { + return + } + } } // Has reports whether a field is populated. @@ -1439,6 +1447,8 @@ func (x *fastReflection_EventReceive) Has(fd protoreflect.FieldDescriptor) bool return x.TradableAmount != "" case "regen.ecocredit.v1alpha1.EventReceive.retired_amount": return x.RetiredAmount != "" + case "regen.ecocredit.v1alpha1.EventReceive.basket_denom": + return x.BasketDenom != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1alpha1.EventReceive")) @@ -1465,6 +1475,8 @@ func (x *fastReflection_EventReceive) Clear(fd protoreflect.FieldDescriptor) { x.TradableAmount = "" case "regen.ecocredit.v1alpha1.EventReceive.retired_amount": x.RetiredAmount = "" + case "regen.ecocredit.v1alpha1.EventReceive.basket_denom": + x.BasketDenom = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1alpha1.EventReceive")) @@ -1496,6 +1508,9 @@ func (x *fastReflection_EventReceive) Get(descriptor protoreflect.FieldDescripto case "regen.ecocredit.v1alpha1.EventReceive.retired_amount": value := x.RetiredAmount return protoreflect.ValueOfString(value) + case "regen.ecocredit.v1alpha1.EventReceive.basket_denom": + value := x.BasketDenom + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1alpha1.EventReceive")) @@ -1526,6 +1541,8 @@ func (x *fastReflection_EventReceive) Set(fd protoreflect.FieldDescriptor, value x.TradableAmount = value.Interface().(string) case "regen.ecocredit.v1alpha1.EventReceive.retired_amount": x.RetiredAmount = value.Interface().(string) + case "regen.ecocredit.v1alpha1.EventReceive.basket_denom": + x.BasketDenom = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1alpha1.EventReceive")) @@ -1556,6 +1573,8 @@ func (x *fastReflection_EventReceive) Mutable(fd protoreflect.FieldDescriptor) p panic(fmt.Errorf("field tradable_amount of message regen.ecocredit.v1alpha1.EventReceive is not mutable")) case "regen.ecocredit.v1alpha1.EventReceive.retired_amount": panic(fmt.Errorf("field retired_amount of message regen.ecocredit.v1alpha1.EventReceive is not mutable")) + case "regen.ecocredit.v1alpha1.EventReceive.basket_denom": + panic(fmt.Errorf("field basket_denom of message regen.ecocredit.v1alpha1.EventReceive is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1alpha1.EventReceive")) @@ -1579,6 +1598,8 @@ func (x *fastReflection_EventReceive) NewField(fd protoreflect.FieldDescriptor) return protoreflect.ValueOfString("") case "regen.ecocredit.v1alpha1.EventReceive.retired_amount": return protoreflect.ValueOfString("") + case "regen.ecocredit.v1alpha1.EventReceive.basket_denom": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.v1alpha1.EventReceive")) @@ -1668,6 +1689,10 @@ func (x *fastReflection_EventReceive) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.BasketDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1697,6 +1722,13 @@ func (x *fastReflection_EventReceive) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.BasketDenom) > 0 { + i -= len(x.BasketDenom) + copy(dAtA[i:], x.BasketDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BasketDenom))) + i-- + dAtA[i] = 0x32 + } if len(x.RetiredAmount) > 0 { i -= len(x.RetiredAmount) copy(dAtA[i:], x.RetiredAmount) @@ -1941,6 +1973,38 @@ func (x *fastReflection_EventReceive) ProtoMethods() *protoiface.Methods { } x.RetiredAmount = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", 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.BasketDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3289,9 +3353,10 @@ func (x *EventCreateBatch) GetProjectLocation() string { return "" } -// EventReceive is an event emitted when credits are received either upon -// creation of a new batch or upon transfer. Each batch_denom created or -// transferred will result in a separate EventReceive for easy indexing. +// EventReceive is an event emitted when credits are received either via +// creation of a new batch, transfer of credits, or taking credits from a +// basket. Each batch_denom created, transferred or taken from a baset will +// result in a separate EventReceive for easy indexing. type EventReceive struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3299,9 +3364,9 @@ type EventReceive struct { // sender is the sender of the credits in the case that this event is the // result of a transfer. It will not be set when credits are received at - // initial issuance. + // initial issuance or taken from a basket. Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // recipient is the recipient of the credits + // recipient is the recipient of the credits. Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` // batch_denom is the unique ID of credit batch. BatchDenom string `protobuf:"bytes,3,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` @@ -3309,6 +3374,10 @@ type EventReceive struct { TradableAmount string `protobuf:"bytes,4,opt,name=tradable_amount,json=tradableAmount,proto3" json:"tradable_amount,omitempty"` // retired_amount is the decimal number of retired credits received. RetiredAmount string `protobuf:"bytes,5,opt,name=retired_amount,json=retiredAmount,proto3" json:"retired_amount,omitempty"` + // basket_denom is the denom of the basket. when the basket_denom field is set, it indicates that this event was + // triggered by the transfer of credits from a basket. It will not be set if the credits were sent by a user, or + // by initial issuance. + BasketDenom string `protobuf:"bytes,6,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` } func (x *EventReceive) Reset() { @@ -3366,6 +3435,13 @@ func (x *EventReceive) GetRetiredAmount() string { return "" } +func (x *EventReceive) GetBasketDenom() string { + if x != nil { + return x.BasketDenom + } + return "" +} + // EventRetire is an event emitted when credits are retired. When credits are // retired from multiple batches in the same transaction, a separate event is // emitted for each batch_denom. This allows for easier indexing. @@ -3522,7 +3598,7 @@ var file_regen_ecocredit_v1alpha1_events_proto_rawDesc = []byte{ 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4c, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb5, 0x01, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd8, 0x01, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 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, @@ -3533,39 +3609,41 @@ var file_regen_ecocredit_v1alpha1_events_proto_rawDesc = []byte{ 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 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, - 0x7c, 0x0a, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x74, 0x69, 0x72, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x72, 0x65, 0x74, 0x69, 0x72, 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, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x64, 0x0a, - 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, - 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 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, 0x42, 0x83, 0x02, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, - 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x54, 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, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, - 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x45, 0x58, 0xaa, - 0x02, 0x18, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, - 0x74, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x18, 0x52, 0x65, 0x67, - 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x24, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, - 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1a, 0x52, - 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x3a, - 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x52, 0x0d, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x21, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x44, 0x65, 0x6e, + 0x6f, 0x6d, 0x22, 0x7c, 0x0a, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x74, 0x69, 0x72, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x74, 0x69, 0x72, 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, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x64, 0x0a, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, + 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 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, 0x42, 0x83, 0x02, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x72, + 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 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, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x65, 0x63, 0x6f, 0x63, 0x72, + 0x65, 0x64, 0x69, 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x52, + 0x45, 0x58, 0xaa, 0x02, 0x18, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x45, 0x63, 0x6f, 0x63, 0x72, + 0x65, 0x64, 0x69, 0x74, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x18, + 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, + 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x24, 0x52, 0x65, 0x67, 0x65, 0x6e, + 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x1a, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, + 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/regen/ecocredit/v1alpha1/events.proto b/proto/regen/ecocredit/v1alpha1/events.proto index 5b91581dcc..4178c71eb5 100644 --- a/proto/regen/ecocredit/v1alpha1/events.proto +++ b/proto/regen/ecocredit/v1alpha1/events.proto @@ -42,16 +42,18 @@ message EventCreateBatch { string project_location = 7; } -// EventReceive is an event emitted when credits are received either upon -// creation of a new batch or upon transfer. Each batch_denom created or -// transferred will result in a separate EventReceive for easy indexing. +// EventReceive is an event emitted when credits are received either via +// creation of a new batch, transfer of credits, or taking credits from a +// basket. Each batch_denom created, transferred or taken from a baset will +// result in a separate EventReceive for easy indexing. message EventReceive { + // sender is the sender of the credits in the case that this event is the // result of a transfer. It will not be set when credits are received at - // initial issuance. + // initial issuance or taken from a basket. string sender = 1; - // recipient is the recipient of the credits + // recipient is the recipient of the credits. string recipient = 2; // batch_denom is the unique ID of credit batch. @@ -62,6 +64,11 @@ message EventReceive { // retired_amount is the decimal number of retired credits received. string retired_amount = 5; + + // basket_denom is the denom of the basket. when the basket_denom field is set, it indicates that this event was + // triggered by the transfer of credits from a basket. It will not be set if the credits were sent by a user, or + // by initial issuance. + string basket_denom = 6; } // EventRetire is an event emitted when credits are retired. When credits are