diff --git a/api/regen/ecocredit/marketplace/v1/events.pulsar.go b/api/regen/ecocredit/marketplace/v1/events.pulsar.go index 4d2bd09a3f..f1ddbc841a 100644 --- a/api/regen/ecocredit/marketplace/v1/events.pulsar.go +++ b/api/regen/ecocredit/marketplace/v1/events.pulsar.go @@ -1567,1511 +1567,6 @@ func (x *fastReflection_EventUpdateSellOrder) ProtoMethods() *protoiface.Methods } } -var ( - md_EventBuyOrderCreated protoreflect.MessageDescriptor - fd_EventBuyOrderCreated_buy_order_id protoreflect.FieldDescriptor - fd_EventBuyOrderCreated_sell_order_id protoreflect.FieldDescriptor - fd_EventBuyOrderCreated_quantity protoreflect.FieldDescriptor - fd_EventBuyOrderCreated_bid_price protoreflect.FieldDescriptor - fd_EventBuyOrderCreated_disable_auto_retire protoreflect.FieldDescriptor - fd_EventBuyOrderCreated_disable_partial_fill protoreflect.FieldDescriptor - fd_EventBuyOrderCreated_retirement_location protoreflect.FieldDescriptor - fd_EventBuyOrderCreated_expiration protoreflect.FieldDescriptor -) - -func init() { - file_regen_ecocredit_marketplace_v1_events_proto_init() - md_EventBuyOrderCreated = File_regen_ecocredit_marketplace_v1_events_proto.Messages().ByName("EventBuyOrderCreated") - fd_EventBuyOrderCreated_buy_order_id = md_EventBuyOrderCreated.Fields().ByName("buy_order_id") - fd_EventBuyOrderCreated_sell_order_id = md_EventBuyOrderCreated.Fields().ByName("sell_order_id") - fd_EventBuyOrderCreated_quantity = md_EventBuyOrderCreated.Fields().ByName("quantity") - fd_EventBuyOrderCreated_bid_price = md_EventBuyOrderCreated.Fields().ByName("bid_price") - fd_EventBuyOrderCreated_disable_auto_retire = md_EventBuyOrderCreated.Fields().ByName("disable_auto_retire") - fd_EventBuyOrderCreated_disable_partial_fill = md_EventBuyOrderCreated.Fields().ByName("disable_partial_fill") - fd_EventBuyOrderCreated_retirement_location = md_EventBuyOrderCreated.Fields().ByName("retirement_location") - fd_EventBuyOrderCreated_expiration = md_EventBuyOrderCreated.Fields().ByName("expiration") -} - -var _ protoreflect.Message = (*fastReflection_EventBuyOrderCreated)(nil) - -type fastReflection_EventBuyOrderCreated EventBuyOrderCreated - -func (x *EventBuyOrderCreated) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventBuyOrderCreated)(x) -} - -func (x *EventBuyOrderCreated) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_events_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EventBuyOrderCreated_messageType fastReflection_EventBuyOrderCreated_messageType -var _ protoreflect.MessageType = fastReflection_EventBuyOrderCreated_messageType{} - -type fastReflection_EventBuyOrderCreated_messageType struct{} - -func (x fastReflection_EventBuyOrderCreated_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventBuyOrderCreated)(nil) -} -func (x fastReflection_EventBuyOrderCreated_messageType) New() protoreflect.Message { - return new(fastReflection_EventBuyOrderCreated) -} -func (x fastReflection_EventBuyOrderCreated_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventBuyOrderCreated -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventBuyOrderCreated) Descriptor() protoreflect.MessageDescriptor { - return md_EventBuyOrderCreated -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_EventBuyOrderCreated) Type() protoreflect.MessageType { - return _fastReflection_EventBuyOrderCreated_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventBuyOrderCreated) New() protoreflect.Message { - return new(fastReflection_EventBuyOrderCreated) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventBuyOrderCreated) Interface() protoreflect.ProtoMessage { - return (*EventBuyOrderCreated)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_EventBuyOrderCreated) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BuyOrderId != uint64(0) { - value := protoreflect.ValueOfUint64(x.BuyOrderId) - if !f(fd_EventBuyOrderCreated_buy_order_id, value) { - return - } - } - if x.SellOrderId != uint64(0) { - value := protoreflect.ValueOfUint64(x.SellOrderId) - if !f(fd_EventBuyOrderCreated_sell_order_id, value) { - return - } - } - if x.Quantity != "" { - value := protoreflect.ValueOfString(x.Quantity) - if !f(fd_EventBuyOrderCreated_quantity, value) { - return - } - } - if x.BidPrice != nil { - value := protoreflect.ValueOfMessage(x.BidPrice.ProtoReflect()) - if !f(fd_EventBuyOrderCreated_bid_price, value) { - return - } - } - if x.DisableAutoRetire != false { - value := protoreflect.ValueOfBool(x.DisableAutoRetire) - if !f(fd_EventBuyOrderCreated_disable_auto_retire, value) { - return - } - } - if x.DisablePartialFill != false { - value := protoreflect.ValueOfBool(x.DisablePartialFill) - if !f(fd_EventBuyOrderCreated_disable_partial_fill, value) { - return - } - } - if x.RetirementLocation != "" { - value := protoreflect.ValueOfString(x.RetirementLocation) - if !f(fd_EventBuyOrderCreated_retirement_location, value) { - return - } - } - if x.Expiration != nil { - value := protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) - if !f(fd_EventBuyOrderCreated_expiration, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_EventBuyOrderCreated) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.buy_order_id": - return x.BuyOrderId != uint64(0) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.sell_order_id": - return x.SellOrderId != uint64(0) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.quantity": - return x.Quantity != "" - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.bid_price": - return x.BidPrice != nil - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.disable_auto_retire": - return x.DisableAutoRetire != false - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.disable_partial_fill": - return x.DisablePartialFill != false - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.retirement_location": - return x.RetirementLocation != "" - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.expiration": - return x.Expiration != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.EventBuyOrderCreated")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.EventBuyOrderCreated does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EventBuyOrderCreated) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.buy_order_id": - x.BuyOrderId = uint64(0) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.sell_order_id": - x.SellOrderId = uint64(0) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.quantity": - x.Quantity = "" - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.bid_price": - x.BidPrice = nil - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.disable_auto_retire": - x.DisableAutoRetire = false - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.disable_partial_fill": - x.DisablePartialFill = false - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.retirement_location": - x.RetirementLocation = "" - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.expiration": - x.Expiration = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.EventBuyOrderCreated")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.EventBuyOrderCreated does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_EventBuyOrderCreated) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.buy_order_id": - value := x.BuyOrderId - return protoreflect.ValueOfUint64(value) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.sell_order_id": - value := x.SellOrderId - return protoreflect.ValueOfUint64(value) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.quantity": - value := x.Quantity - return protoreflect.ValueOfString(value) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.bid_price": - value := x.BidPrice - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.disable_auto_retire": - value := x.DisableAutoRetire - return protoreflect.ValueOfBool(value) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.disable_partial_fill": - value := x.DisablePartialFill - return protoreflect.ValueOfBool(value) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.retirement_location": - value := x.RetirementLocation - return protoreflect.ValueOfString(value) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.expiration": - value := x.Expiration - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.EventBuyOrderCreated")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.EventBuyOrderCreated does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EventBuyOrderCreated) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.buy_order_id": - x.BuyOrderId = value.Uint() - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.sell_order_id": - x.SellOrderId = value.Uint() - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.quantity": - x.Quantity = value.Interface().(string) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.bid_price": - x.BidPrice = value.Message().Interface().(*v1beta1.Coin) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.disable_auto_retire": - x.DisableAutoRetire = value.Bool() - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.disable_partial_fill": - x.DisablePartialFill = value.Bool() - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.retirement_location": - x.RetirementLocation = value.Interface().(string) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.expiration": - x.Expiration = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.EventBuyOrderCreated")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.EventBuyOrderCreated does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EventBuyOrderCreated) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.bid_price": - if x.BidPrice == nil { - x.BidPrice = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.BidPrice.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.expiration": - if x.Expiration == nil { - x.Expiration = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.buy_order_id": - panic(fmt.Errorf("field buy_order_id of message regen.ecocredit.marketplace.v1.EventBuyOrderCreated is not mutable")) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.sell_order_id": - panic(fmt.Errorf("field sell_order_id of message regen.ecocredit.marketplace.v1.EventBuyOrderCreated is not mutable")) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.quantity": - panic(fmt.Errorf("field quantity of message regen.ecocredit.marketplace.v1.EventBuyOrderCreated is not mutable")) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.disable_auto_retire": - panic(fmt.Errorf("field disable_auto_retire of message regen.ecocredit.marketplace.v1.EventBuyOrderCreated is not mutable")) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.disable_partial_fill": - panic(fmt.Errorf("field disable_partial_fill of message regen.ecocredit.marketplace.v1.EventBuyOrderCreated is not mutable")) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.retirement_location": - panic(fmt.Errorf("field retirement_location of message regen.ecocredit.marketplace.v1.EventBuyOrderCreated is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.EventBuyOrderCreated")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.EventBuyOrderCreated does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_EventBuyOrderCreated) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.buy_order_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.sell_order_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.quantity": - return protoreflect.ValueOfString("") - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.bid_price": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.disable_auto_retire": - return protoreflect.ValueOfBool(false) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.disable_partial_fill": - return protoreflect.ValueOfBool(false) - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.retirement_location": - return protoreflect.ValueOfString("") - case "regen.ecocredit.marketplace.v1.EventBuyOrderCreated.expiration": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.EventBuyOrderCreated")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.EventBuyOrderCreated does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_EventBuyOrderCreated) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.EventBuyOrderCreated", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_EventBuyOrderCreated) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EventBuyOrderCreated) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_EventBuyOrderCreated) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_EventBuyOrderCreated) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventBuyOrderCreated) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.BuyOrderId != 0 { - n += 1 + runtime.Sov(uint64(x.BuyOrderId)) - } - if x.SellOrderId != 0 { - n += 1 + runtime.Sov(uint64(x.SellOrderId)) - } - l = len(x.Quantity) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.BidPrice != nil { - l = options.Size(x.BidPrice) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.DisableAutoRetire { - n += 2 - } - if x.DisablePartialFill { - n += 2 - } - l = len(x.RetirementLocation) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Expiration != nil { - l = options.Size(x.Expiration) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EventBuyOrderCreated) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Expiration != nil { - encoded, err := options.Marshal(x.Expiration) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if len(x.RetirementLocation) > 0 { - i -= len(x.RetirementLocation) - copy(dAtA[i:], x.RetirementLocation) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RetirementLocation))) - i-- - dAtA[i] = 0x3a - } - if x.DisablePartialFill { - i-- - if x.DisablePartialFill { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if x.DisableAutoRetire { - i-- - if x.DisableAutoRetire { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if x.BidPrice != nil { - encoded, err := options.Marshal(x.BidPrice) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if len(x.Quantity) > 0 { - i -= len(x.Quantity) - copy(dAtA[i:], x.Quantity) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Quantity))) - i-- - dAtA[i] = 0x1a - } - if x.SellOrderId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.SellOrderId)) - i-- - dAtA[i] = 0x10 - } - if x.BuyOrderId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BuyOrderId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EventBuyOrderCreated) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventBuyOrderCreated: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventBuyOrderCreated: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BuyOrderId", wireType) - } - x.BuyOrderId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.BuyOrderId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SellOrderId", wireType) - } - x.SellOrderId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.SellOrderId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Quantity", 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.Quantity = 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 BidPrice", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.BidPrice == nil { - x.BidPrice = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BidPrice); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DisableAutoRetire", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.DisableAutoRetire = bool(v != 0) - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DisablePartialFill", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.DisablePartialFill = bool(v != 0) - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RetirementLocation", 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.RetirementLocation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Expiration == nil { - x.Expiration = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiration); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_EventBuyOrderFilled protoreflect.MessageDescriptor - fd_EventBuyOrderFilled_buy_order_id protoreflect.FieldDescriptor - fd_EventBuyOrderFilled_sell_order_id protoreflect.FieldDescriptor - fd_EventBuyOrderFilled_batch_denom protoreflect.FieldDescriptor - fd_EventBuyOrderFilled_quantity protoreflect.FieldDescriptor - fd_EventBuyOrderFilled_total_price protoreflect.FieldDescriptor -) - -func init() { - file_regen_ecocredit_marketplace_v1_events_proto_init() - md_EventBuyOrderFilled = File_regen_ecocredit_marketplace_v1_events_proto.Messages().ByName("EventBuyOrderFilled") - fd_EventBuyOrderFilled_buy_order_id = md_EventBuyOrderFilled.Fields().ByName("buy_order_id") - fd_EventBuyOrderFilled_sell_order_id = md_EventBuyOrderFilled.Fields().ByName("sell_order_id") - fd_EventBuyOrderFilled_batch_denom = md_EventBuyOrderFilled.Fields().ByName("batch_denom") - fd_EventBuyOrderFilled_quantity = md_EventBuyOrderFilled.Fields().ByName("quantity") - fd_EventBuyOrderFilled_total_price = md_EventBuyOrderFilled.Fields().ByName("total_price") -} - -var _ protoreflect.Message = (*fastReflection_EventBuyOrderFilled)(nil) - -type fastReflection_EventBuyOrderFilled EventBuyOrderFilled - -func (x *EventBuyOrderFilled) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventBuyOrderFilled)(x) -} - -func (x *EventBuyOrderFilled) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_events_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EventBuyOrderFilled_messageType fastReflection_EventBuyOrderFilled_messageType -var _ protoreflect.MessageType = fastReflection_EventBuyOrderFilled_messageType{} - -type fastReflection_EventBuyOrderFilled_messageType struct{} - -func (x fastReflection_EventBuyOrderFilled_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventBuyOrderFilled)(nil) -} -func (x fastReflection_EventBuyOrderFilled_messageType) New() protoreflect.Message { - return new(fastReflection_EventBuyOrderFilled) -} -func (x fastReflection_EventBuyOrderFilled_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventBuyOrderFilled -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventBuyOrderFilled) Descriptor() protoreflect.MessageDescriptor { - return md_EventBuyOrderFilled -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_EventBuyOrderFilled) Type() protoreflect.MessageType { - return _fastReflection_EventBuyOrderFilled_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventBuyOrderFilled) New() protoreflect.Message { - return new(fastReflection_EventBuyOrderFilled) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventBuyOrderFilled) Interface() protoreflect.ProtoMessage { - return (*EventBuyOrderFilled)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_EventBuyOrderFilled) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BuyOrderId != uint64(0) { - value := protoreflect.ValueOfUint64(x.BuyOrderId) - if !f(fd_EventBuyOrderFilled_buy_order_id, value) { - return - } - } - if x.SellOrderId != uint64(0) { - value := protoreflect.ValueOfUint64(x.SellOrderId) - if !f(fd_EventBuyOrderFilled_sell_order_id, value) { - return - } - } - if x.BatchDenom != "" { - value := protoreflect.ValueOfString(x.BatchDenom) - if !f(fd_EventBuyOrderFilled_batch_denom, value) { - return - } - } - if x.Quantity != "" { - value := protoreflect.ValueOfString(x.Quantity) - if !f(fd_EventBuyOrderFilled_quantity, value) { - return - } - } - if x.TotalPrice != nil { - value := protoreflect.ValueOfMessage(x.TotalPrice.ProtoReflect()) - if !f(fd_EventBuyOrderFilled_total_price, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_EventBuyOrderFilled) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.buy_order_id": - return x.BuyOrderId != uint64(0) - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.sell_order_id": - return x.SellOrderId != uint64(0) - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.batch_denom": - return x.BatchDenom != "" - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.quantity": - return x.Quantity != "" - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.total_price": - return x.TotalPrice != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.EventBuyOrderFilled")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.EventBuyOrderFilled does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EventBuyOrderFilled) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.buy_order_id": - x.BuyOrderId = uint64(0) - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.sell_order_id": - x.SellOrderId = uint64(0) - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.batch_denom": - x.BatchDenom = "" - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.quantity": - x.Quantity = "" - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.total_price": - x.TotalPrice = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.EventBuyOrderFilled")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.EventBuyOrderFilled does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_EventBuyOrderFilled) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.buy_order_id": - value := x.BuyOrderId - return protoreflect.ValueOfUint64(value) - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.sell_order_id": - value := x.SellOrderId - return protoreflect.ValueOfUint64(value) - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.batch_denom": - value := x.BatchDenom - return protoreflect.ValueOfString(value) - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.quantity": - value := x.Quantity - return protoreflect.ValueOfString(value) - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.total_price": - value := x.TotalPrice - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.EventBuyOrderFilled")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.EventBuyOrderFilled does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EventBuyOrderFilled) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.buy_order_id": - x.BuyOrderId = value.Uint() - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.sell_order_id": - x.SellOrderId = value.Uint() - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.batch_denom": - x.BatchDenom = value.Interface().(string) - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.quantity": - x.Quantity = value.Interface().(string) - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.total_price": - x.TotalPrice = value.Message().Interface().(*v1beta1.Coin) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.EventBuyOrderFilled")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.EventBuyOrderFilled does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EventBuyOrderFilled) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.total_price": - if x.TotalPrice == nil { - x.TotalPrice = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.TotalPrice.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.buy_order_id": - panic(fmt.Errorf("field buy_order_id of message regen.ecocredit.marketplace.v1.EventBuyOrderFilled is not mutable")) - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.sell_order_id": - panic(fmt.Errorf("field sell_order_id of message regen.ecocredit.marketplace.v1.EventBuyOrderFilled is not mutable")) - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.batch_denom": - panic(fmt.Errorf("field batch_denom of message regen.ecocredit.marketplace.v1.EventBuyOrderFilled is not mutable")) - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.quantity": - panic(fmt.Errorf("field quantity of message regen.ecocredit.marketplace.v1.EventBuyOrderFilled is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.EventBuyOrderFilled")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.EventBuyOrderFilled does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_EventBuyOrderFilled) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.buy_order_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.sell_order_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.batch_denom": - return protoreflect.ValueOfString("") - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.quantity": - return protoreflect.ValueOfString("") - case "regen.ecocredit.marketplace.v1.EventBuyOrderFilled.total_price": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.EventBuyOrderFilled")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.EventBuyOrderFilled does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_EventBuyOrderFilled) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.EventBuyOrderFilled", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_EventBuyOrderFilled) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EventBuyOrderFilled) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_EventBuyOrderFilled) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_EventBuyOrderFilled) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventBuyOrderFilled) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.BuyOrderId != 0 { - n += 1 + runtime.Sov(uint64(x.BuyOrderId)) - } - if x.SellOrderId != 0 { - n += 1 + runtime.Sov(uint64(x.SellOrderId)) - } - l = len(x.BatchDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Quantity) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TotalPrice != nil { - l = options.Size(x.TotalPrice) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EventBuyOrderFilled) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.TotalPrice != nil { - encoded, err := options.Marshal(x.TotalPrice) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if len(x.Quantity) > 0 { - i -= len(x.Quantity) - copy(dAtA[i:], x.Quantity) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Quantity))) - i-- - dAtA[i] = 0x22 - } - if len(x.BatchDenom) > 0 { - i -= len(x.BatchDenom) - copy(dAtA[i:], x.BatchDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BatchDenom))) - i-- - dAtA[i] = 0x1a - } - if x.SellOrderId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.SellOrderId)) - i-- - dAtA[i] = 0x10 - } - if x.BuyOrderId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BuyOrderId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EventBuyOrderFilled) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventBuyOrderFilled: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventBuyOrderFilled: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BuyOrderId", wireType) - } - x.BuyOrderId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.BuyOrderId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SellOrderId", wireType) - } - x.SellOrderId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.SellOrderId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", 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.BatchDenom = 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 Quantity", 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.Quantity = 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 TotalPrice", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.TotalPrice == nil { - x.TotalPrice = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalPrice); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - var ( md_EventAllowAskDenom protoreflect.MessageDescriptor fd_EventAllowAskDenom_denom protoreflect.FieldDescriptor @@ -3096,7 +1591,7 @@ func (x *EventAllowAskDenom) ProtoReflect() protoreflect.Message { } func (x *EventAllowAskDenom) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_events_proto_msgTypes[4] + mi := &file_regen_ecocredit_marketplace_v1_events_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3798,192 +2293,6 @@ func (x *EventUpdateSellOrder) GetNewExpiration() *timestamppb.Timestamp { return nil } -// EventBuyOrderCreated is an event emitted when a buy order is created. -type EventBuyOrderCreated struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // buy_order_id is the unique ID of buy order. - BuyOrderId uint64 `protobuf:"varint,1,opt,name=buy_order_id,json=buyOrderId,proto3" json:"buy_order_id,omitempty"` - // sell_order_id is the sell order ID against which the buyer is trying to - // buy. - SellOrderId uint64 `protobuf:"varint,2,opt,name=sell_order_id,json=sellOrderId,proto3" json:"sell_order_id,omitempty"` - // quantity is the quantity of credits to buy. If the quantity of credits - // available is less than this amount the order will be partially filled - // unless disable_partial_fill is true. - Quantity string `protobuf:"bytes,3,opt,name=quantity,proto3" json:"quantity,omitempty"` - // bid price is the bid price for this buy order. A credit unit will be - // settled at a purchase price that is no more than the bid price. The - // buy order will fail if the buyer does not have enough funds available - // to complete the purchase. - BidPrice *v1beta1.Coin `protobuf:"bytes,4,opt,name=bid_price,json=bidPrice,proto3" json:"bid_price,omitempty"` - // disable_auto_retire allows auto-retirement to be disabled. If it is set to - // true the credits will not auto-retire and can be resold assuming that the - // corresponding sell order has auto-retirement disabled. If the sell order - // hasn't disabled auto-retirement and the buy order tries to disable it, - // that buy order will fail. - DisableAutoRetire bool `protobuf:"varint,5,opt,name=disable_auto_retire,json=disableAutoRetire,proto3" json:"disable_auto_retire,omitempty"` - // disable_partial_fill disables the default behavior of partially filling - // buy orders if the requested quantity is not available. - DisablePartialFill bool `protobuf:"varint,6,opt,name=disable_partial_fill,json=disablePartialFill,proto3" json:"disable_partial_fill,omitempty"` - // retirement_location is the optional retirement location for the credits - // which will be used only if disable_auto_retire is false. - RetirementLocation string `protobuf:"bytes,7,opt,name=retirement_location,json=retirementLocation,proto3" json:"retirement_location,omitempty"` - // expiration is the optional timestamp when the buy order expires. When the - // expiration time is reached, the buy order is removed from state. - Expiration *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=expiration,proto3" json:"expiration,omitempty"` -} - -func (x *EventBuyOrderCreated) Reset() { - *x = EventBuyOrderCreated{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_events_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventBuyOrderCreated) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventBuyOrderCreated) ProtoMessage() {} - -// Deprecated: Use EventBuyOrderCreated.ProtoReflect.Descriptor instead. -func (*EventBuyOrderCreated) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_events_proto_rawDescGZIP(), []int{2} -} - -func (x *EventBuyOrderCreated) GetBuyOrderId() uint64 { - if x != nil { - return x.BuyOrderId - } - return 0 -} - -func (x *EventBuyOrderCreated) GetSellOrderId() uint64 { - if x != nil { - return x.SellOrderId - } - return 0 -} - -func (x *EventBuyOrderCreated) GetQuantity() string { - if x != nil { - return x.Quantity - } - return "" -} - -func (x *EventBuyOrderCreated) GetBidPrice() *v1beta1.Coin { - if x != nil { - return x.BidPrice - } - return nil -} - -func (x *EventBuyOrderCreated) GetDisableAutoRetire() bool { - if x != nil { - return x.DisableAutoRetire - } - return false -} - -func (x *EventBuyOrderCreated) GetDisablePartialFill() bool { - if x != nil { - return x.DisablePartialFill - } - return false -} - -func (x *EventBuyOrderCreated) GetRetirementLocation() string { - if x != nil { - return x.RetirementLocation - } - return "" -} - -func (x *EventBuyOrderCreated) GetExpiration() *timestamppb.Timestamp { - if x != nil { - return x.Expiration - } - return nil -} - -// EventBuyOrderFilled is an event emitted when a buy order is filled. -type EventBuyOrderFilled struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // buy_order_id is the unique ID of the buy order. - BuyOrderId uint64 `protobuf:"varint,1,opt,name=buy_order_id,json=buyOrderId,proto3" json:"buy_order_id,omitempty"` - // sell_order_id is the unique ID of the sell order. - SellOrderId uint64 `protobuf:"varint,2,opt,name=sell_order_id,json=sellOrderId,proto3" json:"sell_order_id,omitempty"` - // batch_denom is the credit batch ID of the purchased credits. - BatchDenom string `protobuf:"bytes,3,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` - // quantity is the quantity of the purchased credits. - Quantity string `protobuf:"bytes,4,opt,name=quantity,proto3" json:"quantity,omitempty"` - // total_price is the total price for the purchased credits. - TotalPrice *v1beta1.Coin `protobuf:"bytes,5,opt,name=total_price,json=totalPrice,proto3" json:"total_price,omitempty"` -} - -func (x *EventBuyOrderFilled) Reset() { - *x = EventBuyOrderFilled{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_events_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventBuyOrderFilled) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventBuyOrderFilled) ProtoMessage() {} - -// Deprecated: Use EventBuyOrderFilled.ProtoReflect.Descriptor instead. -func (*EventBuyOrderFilled) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_events_proto_rawDescGZIP(), []int{3} -} - -func (x *EventBuyOrderFilled) GetBuyOrderId() uint64 { - if x != nil { - return x.BuyOrderId - } - return 0 -} - -func (x *EventBuyOrderFilled) GetSellOrderId() uint64 { - if x != nil { - return x.SellOrderId - } - return 0 -} - -func (x *EventBuyOrderFilled) GetBatchDenom() string { - if x != nil { - return x.BatchDenom - } - return "" -} - -func (x *EventBuyOrderFilled) GetQuantity() string { - if x != nil { - return x.Quantity - } - return "" -} - -func (x *EventBuyOrderFilled) GetTotalPrice() *v1beta1.Coin { - if x != nil { - return x.TotalPrice - } - return nil -} - // EventAllowAskDenom is an event emitted when an ask denom is added. type EventAllowAskDenom struct { state protoimpl.MessageState @@ -4002,7 +2311,7 @@ type EventAllowAskDenom struct { func (x *EventAllowAskDenom) Reset() { *x = EventAllowAskDenom{} if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_events_proto_msgTypes[4] + mi := &file_regen_ecocredit_marketplace_v1_events_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4016,7 +2325,7 @@ func (*EventAllowAskDenom) ProtoMessage() {} // Deprecated: Use EventAllowAskDenom.ProtoReflect.Descriptor instead. func (*EventAllowAskDenom) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_events_proto_rawDescGZIP(), []int{4} + return file_regen_ecocredit_marketplace_v1_events_proto_rawDescGZIP(), []int{2} } func (x *EventAllowAskDenom) GetDenom() string { @@ -4091,70 +2400,32 @@ var file_regen_ecocredit_marketplace_v1_events_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x85, 0x03, 0x0a, 0x14, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x79, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0c, - 0x62, 0x75, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0a, 0x62, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 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, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x36, - 0x0a, 0x09, 0x62, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 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, 0x08, 0x62, 0x69, - 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, - 0x52, 0x65, 0x74, 0x69, 0x72, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x6c, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x72, - 0x74, 0x69, 0x61, 0x6c, 0x46, 0x69, 0x6c, 0x6c, 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x74, 0x69, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0a, 0x65, 0x78, 0x70, - 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 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, - 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd4, 0x01, 0x0a, 0x13, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, - 0x6c, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x62, 0x75, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x62, 0x75, 0x79, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x49, 0x64, 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, 0x1f, 0x0a, 0x0b, 0x62, 0x61, 0x74, - 0x63, 0x68, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x62, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, - 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, - 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x22, 0x6b, 0x0a, 0x12, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, - 0x41, 0x73, 0x6b, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x23, - 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, - 0x02, 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, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x42, - 0xa4, 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, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 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, + 0x69, 0x6f, 0x6e, 0x22, 0x6b, 0x0a, 0x12, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, + 0x77, 0x41, 0x73, 0x6b, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, + 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, + 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, + 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x42, 0xa4, 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, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 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, 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, + 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 ( @@ -4169,29 +2440,24 @@ func file_regen_ecocredit_marketplace_v1_events_proto_rawDescGZIP() []byte { return file_regen_ecocredit_marketplace_v1_events_proto_rawDescData } -var file_regen_ecocredit_marketplace_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_regen_ecocredit_marketplace_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_regen_ecocredit_marketplace_v1_events_proto_goTypes = []interface{}{ (*EventSell)(nil), // 0: regen.ecocredit.marketplace.v1.EventSell (*EventUpdateSellOrder)(nil), // 1: regen.ecocredit.marketplace.v1.EventUpdateSellOrder - (*EventBuyOrderCreated)(nil), // 2: regen.ecocredit.marketplace.v1.EventBuyOrderCreated - (*EventBuyOrderFilled)(nil), // 3: regen.ecocredit.marketplace.v1.EventBuyOrderFilled - (*EventAllowAskDenom)(nil), // 4: regen.ecocredit.marketplace.v1.EventAllowAskDenom - (*v1beta1.Coin)(nil), // 5: cosmos.base.v1beta1.Coin - (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp + (*EventAllowAskDenom)(nil), // 2: regen.ecocredit.marketplace.v1.EventAllowAskDenom + (*v1beta1.Coin)(nil), // 3: cosmos.base.v1beta1.Coin + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp } var file_regen_ecocredit_marketplace_v1_events_proto_depIdxs = []int32{ - 5, // 0: regen.ecocredit.marketplace.v1.EventSell.ask_price:type_name -> cosmos.base.v1beta1.Coin - 6, // 1: regen.ecocredit.marketplace.v1.EventSell.expiration:type_name -> google.protobuf.Timestamp - 5, // 2: regen.ecocredit.marketplace.v1.EventUpdateSellOrder.new_ask_price:type_name -> cosmos.base.v1beta1.Coin - 6, // 3: regen.ecocredit.marketplace.v1.EventUpdateSellOrder.new_expiration:type_name -> google.protobuf.Timestamp - 5, // 4: regen.ecocredit.marketplace.v1.EventBuyOrderCreated.bid_price:type_name -> cosmos.base.v1beta1.Coin - 6, // 5: regen.ecocredit.marketplace.v1.EventBuyOrderCreated.expiration:type_name -> google.protobuf.Timestamp - 5, // 6: regen.ecocredit.marketplace.v1.EventBuyOrderFilled.total_price:type_name -> cosmos.base.v1beta1.Coin - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 3, // 0: regen.ecocredit.marketplace.v1.EventSell.ask_price:type_name -> cosmos.base.v1beta1.Coin + 4, // 1: regen.ecocredit.marketplace.v1.EventSell.expiration:type_name -> google.protobuf.Timestamp + 3, // 2: regen.ecocredit.marketplace.v1.EventUpdateSellOrder.new_ask_price:type_name -> cosmos.base.v1beta1.Coin + 4, // 3: regen.ecocredit.marketplace.v1.EventUpdateSellOrder.new_expiration:type_name -> google.protobuf.Timestamp + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_regen_ecocredit_marketplace_v1_events_proto_init() } @@ -4225,30 +2491,6 @@ func file_regen_ecocredit_marketplace_v1_events_proto_init() { } } file_regen_ecocredit_marketplace_v1_events_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventBuyOrderCreated); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_regen_ecocredit_marketplace_v1_events_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventBuyOrderFilled); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_regen_ecocredit_marketplace_v1_events_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventAllowAskDenom); i { case 0: return &v.state @@ -4267,7 +2509,7 @@ func file_regen_ecocredit_marketplace_v1_events_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_regen_ecocredit_marketplace_v1_events_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/api/regen/ecocredit/marketplace/v1/query.pulsar.go b/api/regen/ecocredit/marketplace/v1/query.pulsar.go index 2246a7f8ab..f163b017f7 100644 --- a/api/regen/ecocredit/marketplace/v1/query.pulsar.go +++ b/api/regen/ecocredit/marketplace/v1/query.pulsar.go @@ -4006,25 +4006,25 @@ func (x *fastReflection_QuerySellOrdersByAddressResponse) ProtoMethods() *protoi } var ( - md_QueryBuyOrderRequest protoreflect.MessageDescriptor - fd_QueryBuyOrderRequest_buy_order_id protoreflect.FieldDescriptor + md_QueryAllowedDenomsRequest protoreflect.MessageDescriptor + fd_QueryAllowedDenomsRequest_pagination protoreflect.FieldDescriptor ) func init() { file_regen_ecocredit_marketplace_v1_query_proto_init() - md_QueryBuyOrderRequest = File_regen_ecocredit_marketplace_v1_query_proto.Messages().ByName("QueryBuyOrderRequest") - fd_QueryBuyOrderRequest_buy_order_id = md_QueryBuyOrderRequest.Fields().ByName("buy_order_id") + md_QueryAllowedDenomsRequest = File_regen_ecocredit_marketplace_v1_query_proto.Messages().ByName("QueryAllowedDenomsRequest") + fd_QueryAllowedDenomsRequest_pagination = md_QueryAllowedDenomsRequest.Fields().ByName("pagination") } -var _ protoreflect.Message = (*fastReflection_QueryBuyOrderRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QueryAllowedDenomsRequest)(nil) -type fastReflection_QueryBuyOrderRequest QueryBuyOrderRequest +type fastReflection_QueryAllowedDenomsRequest QueryAllowedDenomsRequest -func (x *QueryBuyOrderRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryBuyOrderRequest)(x) +func (x *QueryAllowedDenomsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllowedDenomsRequest)(x) } -func (x *QueryBuyOrderRequest) slowProtoReflect() protoreflect.Message { +func (x *QueryAllowedDenomsRequest) slowProtoReflect() protoreflect.Message { mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4036,43 +4036,43 @@ func (x *QueryBuyOrderRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryBuyOrderRequest_messageType fastReflection_QueryBuyOrderRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryBuyOrderRequest_messageType{} +var _fastReflection_QueryAllowedDenomsRequest_messageType fastReflection_QueryAllowedDenomsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllowedDenomsRequest_messageType{} -type fastReflection_QueryBuyOrderRequest_messageType struct{} +type fastReflection_QueryAllowedDenomsRequest_messageType struct{} -func (x fastReflection_QueryBuyOrderRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryBuyOrderRequest)(nil) +func (x fastReflection_QueryAllowedDenomsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllowedDenomsRequest)(nil) } -func (x fastReflection_QueryBuyOrderRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryBuyOrderRequest) +func (x fastReflection_QueryAllowedDenomsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllowedDenomsRequest) } -func (x fastReflection_QueryBuyOrderRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBuyOrderRequest +func (x fastReflection_QueryAllowedDenomsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllowedDenomsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryBuyOrderRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBuyOrderRequest +func (x *fastReflection_QueryAllowedDenomsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllowedDenomsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryBuyOrderRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryBuyOrderRequest_messageType +func (x *fastReflection_QueryAllowedDenomsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAllowedDenomsRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryBuyOrderRequest) New() protoreflect.Message { - return new(fastReflection_QueryBuyOrderRequest) +func (x *fastReflection_QueryAllowedDenomsRequest) New() protoreflect.Message { + return new(fastReflection_QueryAllowedDenomsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryBuyOrderRequest) Interface() protoreflect.ProtoMessage { - return (*QueryBuyOrderRequest)(x) +func (x *fastReflection_QueryAllowedDenomsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAllowedDenomsRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -4080,10 +4080,10 @@ func (x *fastReflection_QueryBuyOrderRequest) Interface() protoreflect.ProtoMess // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryBuyOrderRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BuyOrderId != uint64(0) { - value := protoreflect.ValueOfUint64(x.BuyOrderId) - if !f(fd_QueryBuyOrderRequest_buy_order_id, value) { +func (x *fastReflection_QueryAllowedDenomsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAllowedDenomsRequest_pagination, value) { return } } @@ -4100,15 +4100,15 @@ func (x *fastReflection_QueryBuyOrderRequest) Range(f func(protoreflect.FieldDes // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryBuyOrderRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryAllowedDenomsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrderRequest.buy_order_id": - return x.BuyOrderId != uint64(0) + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest.pagination": + return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrderRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrderRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest does not contain field %s", fd.FullName())) } } @@ -4118,15 +4118,15 @@ func (x *fastReflection_QueryBuyOrderRequest) Has(fd protoreflect.FieldDescripto // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrderRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryAllowedDenomsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrderRequest.buy_order_id": - x.BuyOrderId = uint64(0) + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest.pagination": + x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrderRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrderRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest does not contain field %s", fd.FullName())) } } @@ -4136,16 +4136,16 @@ func (x *fastReflection_QueryBuyOrderRequest) Clear(fd protoreflect.FieldDescrip // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryBuyOrderRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAllowedDenomsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrderRequest.buy_order_id": - value := x.BuyOrderId - return protoreflect.ValueOfUint64(value) + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrderRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrderRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest does not contain field %s", descriptor.FullName())) } } @@ -4159,15 +4159,15 @@ func (x *fastReflection_QueryBuyOrderRequest) Get(descriptor protoreflect.FieldD // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrderRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryAllowedDenomsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrderRequest.buy_order_id": - x.BuyOrderId = value.Uint() + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrderRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrderRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest does not contain field %s", fd.FullName())) } } @@ -4181,40 +4181,44 @@ func (x *fastReflection_QueryBuyOrderRequest) Set(fd protoreflect.FieldDescripto // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrderRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAllowedDenomsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrderRequest.buy_order_id": - panic(fmt.Errorf("field buy_order_id of message regen.ecocredit.marketplace.v1.QueryBuyOrderRequest is not mutable")) + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrderRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrderRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryBuyOrderRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAllowedDenomsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrderRequest.buy_order_id": - return protoreflect.ValueOfUint64(uint64(0)) + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrderRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrderRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryBuyOrderRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryAllowedDenomsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.QueryBuyOrderRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest", d.FullName())) } panic("unreachable") } @@ -4222,7 +4226,7 @@ func (x *fastReflection_QueryBuyOrderRequest) WhichOneof(d protoreflect.OneofDes // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryBuyOrderRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryAllowedDenomsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4233,7 +4237,7 @@ func (x *fastReflection_QueryBuyOrderRequest) GetUnknown() protoreflect.RawField // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrderRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryAllowedDenomsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4245,7 +4249,7 @@ func (x *fastReflection_QueryBuyOrderRequest) SetUnknown(fields protoreflect.Raw // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_QueryBuyOrderRequest) IsValid() bool { +func (x *fastReflection_QueryAllowedDenomsRequest) IsValid() bool { return x != nil } @@ -4255,9 +4259,9 @@ func (x *fastReflection_QueryBuyOrderRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryBuyOrderRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryAllowedDenomsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryBuyOrderRequest) + x := input.Message.Interface().(*QueryAllowedDenomsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4269,8 +4273,9 @@ func (x *fastReflection_QueryBuyOrderRequest) ProtoMethods() *protoiface.Methods var n int var l int _ = l - if x.BuyOrderId != 0 { - n += 1 + runtime.Sov(uint64(x.BuyOrderId)) + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -4282,7 +4287,7 @@ func (x *fastReflection_QueryBuyOrderRequest) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryBuyOrderRequest) + x := input.Message.Interface().(*QueryAllowedDenomsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4301,10 +4306,19 @@ func (x *fastReflection_QueryBuyOrderRequest) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.BuyOrderId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BuyOrderId)) + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -4317,7 +4331,7 @@ func (x *fastReflection_QueryBuyOrderRequest) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryBuyOrderRequest) + x := input.Message.Interface().(*QueryAllowedDenomsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4349,17 +4363,17 @@ func (x *fastReflection_QueryBuyOrderRequest) ProtoMethods() *protoiface.Methods fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBuyOrderRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowedDenomsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBuyOrderRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowedDenomsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BuyOrderId", wireType) + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } - x.BuyOrderId = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4369,11 +4383,28 @@ func (x *fastReflection_QueryBuyOrderRequest) ProtoMethods() *protoiface.Methods } b := dAtA[iNdEx] iNdEx++ - x.BuyOrderId |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -4409,26 +4440,79 @@ func (x *fastReflection_QueryBuyOrderRequest) ProtoMethods() *protoiface.Methods } } +var _ protoreflect.List = (*_QueryAllowedDenomsResponse_1_list)(nil) + +type _QueryAllowedDenomsResponse_1_list struct { + list *[]*AllowedDenom +} + +func (x *_QueryAllowedDenomsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryAllowedDenomsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryAllowedDenomsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AllowedDenom) + (*x.list)[i] = concreteValue +} + +func (x *_QueryAllowedDenomsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AllowedDenom) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryAllowedDenomsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(AllowedDenom) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllowedDenomsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryAllowedDenomsResponse_1_list) NewElement() protoreflect.Value { + v := new(AllowedDenom) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllowedDenomsResponse_1_list) IsValid() bool { + return x.list != nil +} + var ( - md_QueryBuyOrderResponse protoreflect.MessageDescriptor - fd_QueryBuyOrderResponse_buy_order protoreflect.FieldDescriptor + md_QueryAllowedDenomsResponse protoreflect.MessageDescriptor + fd_QueryAllowedDenomsResponse_allowed_denoms protoreflect.FieldDescriptor + fd_QueryAllowedDenomsResponse_pagination protoreflect.FieldDescriptor ) func init() { file_regen_ecocredit_marketplace_v1_query_proto_init() - md_QueryBuyOrderResponse = File_regen_ecocredit_marketplace_v1_query_proto.Messages().ByName("QueryBuyOrderResponse") - fd_QueryBuyOrderResponse_buy_order = md_QueryBuyOrderResponse.Fields().ByName("buy_order") + md_QueryAllowedDenomsResponse = File_regen_ecocredit_marketplace_v1_query_proto.Messages().ByName("QueryAllowedDenomsResponse") + fd_QueryAllowedDenomsResponse_allowed_denoms = md_QueryAllowedDenomsResponse.Fields().ByName("allowed_denoms") + fd_QueryAllowedDenomsResponse_pagination = md_QueryAllowedDenomsResponse.Fields().ByName("pagination") } -var _ protoreflect.Message = (*fastReflection_QueryBuyOrderResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryAllowedDenomsResponse)(nil) -type fastReflection_QueryBuyOrderResponse QueryBuyOrderResponse +type fastReflection_QueryAllowedDenomsResponse QueryAllowedDenomsResponse -func (x *QueryBuyOrderResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryBuyOrderResponse)(x) +func (x *QueryAllowedDenomsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllowedDenomsResponse)(x) } -func (x *QueryBuyOrderResponse) slowProtoReflect() protoreflect.Message { +func (x *QueryAllowedDenomsResponse) slowProtoReflect() protoreflect.Message { mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4440,43 +4524,43 @@ func (x *QueryBuyOrderResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryBuyOrderResponse_messageType fastReflection_QueryBuyOrderResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryBuyOrderResponse_messageType{} +var _fastReflection_QueryAllowedDenomsResponse_messageType fastReflection_QueryAllowedDenomsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllowedDenomsResponse_messageType{} -type fastReflection_QueryBuyOrderResponse_messageType struct{} +type fastReflection_QueryAllowedDenomsResponse_messageType struct{} -func (x fastReflection_QueryBuyOrderResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryBuyOrderResponse)(nil) +func (x fastReflection_QueryAllowedDenomsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllowedDenomsResponse)(nil) } -func (x fastReflection_QueryBuyOrderResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryBuyOrderResponse) +func (x fastReflection_QueryAllowedDenomsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllowedDenomsResponse) } -func (x fastReflection_QueryBuyOrderResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBuyOrderResponse +func (x fastReflection_QueryAllowedDenomsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllowedDenomsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryBuyOrderResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBuyOrderResponse +func (x *fastReflection_QueryAllowedDenomsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllowedDenomsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryBuyOrderResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryBuyOrderResponse_messageType +func (x *fastReflection_QueryAllowedDenomsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAllowedDenomsResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryBuyOrderResponse) New() protoreflect.Message { - return new(fastReflection_QueryBuyOrderResponse) +func (x *fastReflection_QueryAllowedDenomsResponse) New() protoreflect.Message { + return new(fastReflection_QueryAllowedDenomsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryBuyOrderResponse) Interface() protoreflect.ProtoMessage { - return (*QueryBuyOrderResponse)(x) +func (x *fastReflection_QueryAllowedDenomsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAllowedDenomsResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -4484,10 +4568,16 @@ func (x *fastReflection_QueryBuyOrderResponse) Interface() protoreflect.ProtoMes // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryBuyOrderResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BuyOrder != nil { - value := protoreflect.ValueOfMessage(x.BuyOrder.ProtoReflect()) - if !f(fd_QueryBuyOrderResponse_buy_order, value) { +func (x *fastReflection_QueryAllowedDenomsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.AllowedDenoms) != 0 { + value := protoreflect.ValueOfList(&_QueryAllowedDenomsResponse_1_list{list: &x.AllowedDenoms}) + if !f(fd_QueryAllowedDenomsResponse_allowed_denoms, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAllowedDenomsResponse_pagination, value) { return } } @@ -4504,15 +4594,17 @@ func (x *fastReflection_QueryBuyOrderResponse) Range(f func(protoreflect.FieldDe // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryBuyOrderResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryAllowedDenomsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrderResponse.buy_order": - return x.BuyOrder != nil + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.allowed_denoms": + return len(x.AllowedDenoms) != 0 + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.pagination": + return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrderResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrderResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse does not contain field %s", fd.FullName())) } } @@ -4522,15 +4614,17 @@ func (x *fastReflection_QueryBuyOrderResponse) Has(fd protoreflect.FieldDescript // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrderResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryAllowedDenomsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrderResponse.buy_order": - x.BuyOrder = nil + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.allowed_denoms": + x.AllowedDenoms = nil + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.pagination": + x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrderResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrderResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse does not contain field %s", fd.FullName())) } } @@ -4540,16 +4634,22 @@ func (x *fastReflection_QueryBuyOrderResponse) Clear(fd protoreflect.FieldDescri // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryBuyOrderResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAllowedDenomsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrderResponse.buy_order": - value := x.BuyOrder + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.allowed_denoms": + if len(x.AllowedDenoms) == 0 { + return protoreflect.ValueOfList(&_QueryAllowedDenomsResponse_1_list{}) + } + listValue := &_QueryAllowedDenomsResponse_1_list{list: &x.AllowedDenoms} + return protoreflect.ValueOfList(listValue) + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.pagination": + value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrderResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrderResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse does not contain field %s", descriptor.FullName())) } } @@ -4563,15 +4663,19 @@ func (x *fastReflection_QueryBuyOrderResponse) Get(descriptor protoreflect.Field // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrderResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryAllowedDenomsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrderResponse.buy_order": - x.BuyOrder = value.Message().Interface().(*BuyOrder) + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.allowed_denoms": + lv := value.List() + clv := lv.(*_QueryAllowedDenomsResponse_1_list) + x.AllowedDenoms = *clv.list + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrderResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrderResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse does not contain field %s", fd.FullName())) } } @@ -4585,44 +4689,53 @@ func (x *fastReflection_QueryBuyOrderResponse) Set(fd protoreflect.FieldDescript // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrderResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAllowedDenomsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrderResponse.buy_order": - if x.BuyOrder == nil { - x.BuyOrder = new(BuyOrder) + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.allowed_denoms": + if x.AllowedDenoms == nil { + x.AllowedDenoms = []*AllowedDenom{} + } + value := &_QueryAllowedDenomsResponse_1_list{list: &x.AllowedDenoms} + return protoreflect.ValueOfList(value) + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) } - return protoreflect.ValueOfMessage(x.BuyOrder.ProtoReflect()) + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrderResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrderResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryBuyOrderResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAllowedDenomsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrderResponse.buy_order": - m := new(BuyOrder) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrderResponse")) + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.allowed_denoms": + list := []*AllowedDenom{} + return protoreflect.ValueOfList(&_QueryAllowedDenomsResponse_1_list{list: &list}) + case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrderResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryBuyOrderResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryAllowedDenomsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.QueryBuyOrderResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse", d.FullName())) } panic("unreachable") } @@ -4630,7 +4743,7 @@ func (x *fastReflection_QueryBuyOrderResponse) WhichOneof(d protoreflect.OneofDe // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryBuyOrderResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryAllowedDenomsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4641,7 +4754,7 @@ func (x *fastReflection_QueryBuyOrderResponse) GetUnknown() protoreflect.RawFiel // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrderResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryAllowedDenomsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4653,7 +4766,7 @@ func (x *fastReflection_QueryBuyOrderResponse) SetUnknown(fields protoreflect.Ra // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_QueryBuyOrderResponse) IsValid() bool { +func (x *fastReflection_QueryAllowedDenomsResponse) IsValid() bool { return x != nil } @@ -4663,9 +4776,9 @@ func (x *fastReflection_QueryBuyOrderResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryBuyOrderResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryAllowedDenomsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryBuyOrderResponse) + x := input.Message.Interface().(*QueryAllowedDenomsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4677,8 +4790,14 @@ func (x *fastReflection_QueryBuyOrderResponse) ProtoMethods() *protoiface.Method var n int var l int _ = l - if x.BuyOrder != nil { - l = options.Size(x.BuyOrder) + if len(x.AllowedDenoms) > 0 { + for _, e := range x.AllowedDenoms { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -4691,7 +4810,7 @@ func (x *fastReflection_QueryBuyOrderResponse) ProtoMethods() *protoiface.Method } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryBuyOrderResponse) + x := input.Message.Interface().(*QueryAllowedDenomsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4710,8 +4829,8 @@ func (x *fastReflection_QueryBuyOrderResponse) ProtoMethods() *protoiface.Method i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.BuyOrder != nil { - encoded, err := options.Marshal(x.BuyOrder) + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4722,7 +4841,23 @@ func (x *fastReflection_QueryBuyOrderResponse) ProtoMethods() *protoiface.Method copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + } + if len(x.AllowedDenoms) > 0 { + for iNdEx := len(x.AllowedDenoms) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.AllowedDenoms[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -4735,7 +4870,7 @@ func (x *fastReflection_QueryBuyOrderResponse) ProtoMethods() *protoiface.Method }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryBuyOrderResponse) + x := input.Message.Interface().(*QueryAllowedDenomsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4767,15 +4902,49 @@ func (x *fastReflection_QueryBuyOrderResponse) ProtoMethods() *protoiface.Method fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBuyOrderResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowedDenomsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBuyOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowedDenomsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BuyOrder", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AllowedDenoms", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AllowedDenoms = append(x.AllowedDenoms, &AllowedDenom{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AllowedDenoms[len(x.AllowedDenoms)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4802,10 +4971,10 @@ func (x *fastReflection_QueryBuyOrderResponse) ProtoMethods() *protoiface.Method if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.BuyOrder == nil { - x.BuyOrder = &BuyOrder{} + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BuyOrder); err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -4844,3694 +5013,356 @@ func (x *fastReflection_QueryBuyOrderResponse) ProtoMethods() *protoiface.Method } } -var ( - md_QueryBuyOrdersRequest protoreflect.MessageDescriptor - fd_QueryBuyOrdersRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_regen_ecocredit_marketplace_v1_query_proto_init() - md_QueryBuyOrdersRequest = File_regen_ecocredit_marketplace_v1_query_proto.Messages().ByName("QueryBuyOrdersRequest") - fd_QueryBuyOrdersRequest_pagination = md_QueryBuyOrdersRequest.Fields().ByName("pagination") -} +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: regen/ecocredit/marketplace/v1/query.proto -var _ protoreflect.Message = (*fastReflection_QueryBuyOrdersRequest)(nil) +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -type fastReflection_QueryBuyOrdersRequest QueryBuyOrdersRequest +// QuerySellOrderRequest is the Query/SellOrder request type. +type QuerySellOrderRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *QueryBuyOrdersRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryBuyOrdersRequest)(x) + // sell_order_id is the id of the requested sell order. + SellOrderId uint64 `protobuf:"varint,1,opt,name=sell_order_id,json=sellOrderId,proto3" json:"sell_order_id,omitempty"` } -func (x *QueryBuyOrdersRequest) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { +func (x *QuerySellOrderRequest) Reset() { + *x = QuerySellOrderRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryBuyOrdersRequest_messageType fastReflection_QueryBuyOrdersRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryBuyOrdersRequest_messageType{} - -type fastReflection_QueryBuyOrdersRequest_messageType struct{} - -func (x fastReflection_QueryBuyOrdersRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryBuyOrdersRequest)(nil) -} -func (x fastReflection_QueryBuyOrdersRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryBuyOrdersRequest) -} -func (x fastReflection_QueryBuyOrdersRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBuyOrdersRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryBuyOrdersRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBuyOrdersRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryBuyOrdersRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryBuyOrdersRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryBuyOrdersRequest) New() protoreflect.Message { - return new(fastReflection_QueryBuyOrdersRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryBuyOrdersRequest) Interface() protoreflect.ProtoMessage { - return (*QueryBuyOrdersRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryBuyOrdersRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryBuyOrdersRequest_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryBuyOrdersRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrdersRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryBuyOrdersRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrdersRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrdersRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest does not contain field %s", fd.FullName())) + ms.StoreMessageInfo(mi) } } -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryBuyOrdersRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest does not contain field %s", fd.FullName())) - } +func (x *QuerySellOrderRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryBuyOrdersRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryBuyOrdersRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrdersRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryBuyOrdersRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryBuyOrdersRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryBuyOrdersRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryBuyOrdersRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryBuyOrdersRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBuyOrdersRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBuyOrdersRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryBuyOrdersResponse_1_list)(nil) - -type _QueryBuyOrdersResponse_1_list struct { - list *[]*BuyOrder -} - -func (x *_QueryBuyOrdersResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryBuyOrdersResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryBuyOrdersResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*BuyOrder) - (*x.list)[i] = concreteValue -} - -func (x *_QueryBuyOrdersResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*BuyOrder) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryBuyOrdersResponse_1_list) AppendMutable() protoreflect.Value { - v := new(BuyOrder) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryBuyOrdersResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryBuyOrdersResponse_1_list) NewElement() protoreflect.Value { - v := new(BuyOrder) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryBuyOrdersResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryBuyOrdersResponse protoreflect.MessageDescriptor - fd_QueryBuyOrdersResponse_buy_orders protoreflect.FieldDescriptor - fd_QueryBuyOrdersResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_regen_ecocredit_marketplace_v1_query_proto_init() - md_QueryBuyOrdersResponse = File_regen_ecocredit_marketplace_v1_query_proto.Messages().ByName("QueryBuyOrdersResponse") - fd_QueryBuyOrdersResponse_buy_orders = md_QueryBuyOrdersResponse.Fields().ByName("buy_orders") - fd_QueryBuyOrdersResponse_pagination = md_QueryBuyOrdersResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryBuyOrdersResponse)(nil) - -type fastReflection_QueryBuyOrdersResponse QueryBuyOrdersResponse - -func (x *QueryBuyOrdersResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryBuyOrdersResponse)(x) -} - -func (x *QueryBuyOrdersResponse) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryBuyOrdersResponse_messageType fastReflection_QueryBuyOrdersResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryBuyOrdersResponse_messageType{} - -type fastReflection_QueryBuyOrdersResponse_messageType struct{} - -func (x fastReflection_QueryBuyOrdersResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryBuyOrdersResponse)(nil) -} -func (x fastReflection_QueryBuyOrdersResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryBuyOrdersResponse) -} -func (x fastReflection_QueryBuyOrdersResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBuyOrdersResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryBuyOrdersResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBuyOrdersResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryBuyOrdersResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryBuyOrdersResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryBuyOrdersResponse) New() protoreflect.Message { - return new(fastReflection_QueryBuyOrdersResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryBuyOrdersResponse) Interface() protoreflect.ProtoMessage { - return (*QueryBuyOrdersResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryBuyOrdersResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.BuyOrders) != 0 { - value := protoreflect.ValueOfList(&_QueryBuyOrdersResponse_1_list{list: &x.BuyOrders}) - if !f(fd_QueryBuyOrdersResponse_buy_orders, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryBuyOrdersResponse_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryBuyOrdersResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse.buy_orders": - return len(x.BuyOrders) != 0 - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrdersResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse.buy_orders": - x.BuyOrders = nil - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryBuyOrdersResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse.buy_orders": - if len(x.BuyOrders) == 0 { - return protoreflect.ValueOfList(&_QueryBuyOrdersResponse_1_list{}) - } - listValue := &_QueryBuyOrdersResponse_1_list{list: &x.BuyOrders} - return protoreflect.ValueOfList(listValue) - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrdersResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse.buy_orders": - lv := value.List() - clv := lv.(*_QueryBuyOrdersResponse_1_list) - x.BuyOrders = *clv.list - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrdersResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse.buy_orders": - if x.BuyOrders == nil { - x.BuyOrders = []*BuyOrder{} - } - value := &_QueryBuyOrdersResponse_1_list{list: &x.BuyOrders} - return protoreflect.ValueOfList(value) - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryBuyOrdersResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse.buy_orders": - list := []*BuyOrder{} - return protoreflect.ValueOfList(&_QueryBuyOrdersResponse_1_list{list: &list}) - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryBuyOrdersResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryBuyOrdersResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrdersResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryBuyOrdersResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryBuyOrdersResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryBuyOrdersResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.BuyOrders) > 0 { - for _, e := range x.BuyOrders { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryBuyOrdersResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.BuyOrders) > 0 { - for iNdEx := len(x.BuyOrders) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.BuyOrders[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryBuyOrdersResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBuyOrdersResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBuyOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BuyOrders", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.BuyOrders = append(x.BuyOrders, &BuyOrder{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BuyOrders[len(x.BuyOrders)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryBuyOrdersByAddressRequest protoreflect.MessageDescriptor - fd_QueryBuyOrdersByAddressRequest_address protoreflect.FieldDescriptor - fd_QueryBuyOrdersByAddressRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_regen_ecocredit_marketplace_v1_query_proto_init() - md_QueryBuyOrdersByAddressRequest = File_regen_ecocredit_marketplace_v1_query_proto.Messages().ByName("QueryBuyOrdersByAddressRequest") - fd_QueryBuyOrdersByAddressRequest_address = md_QueryBuyOrdersByAddressRequest.Fields().ByName("address") - fd_QueryBuyOrdersByAddressRequest_pagination = md_QueryBuyOrdersByAddressRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryBuyOrdersByAddressRequest)(nil) - -type fastReflection_QueryBuyOrdersByAddressRequest QueryBuyOrdersByAddressRequest - -func (x *QueryBuyOrdersByAddressRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryBuyOrdersByAddressRequest)(x) -} - -func (x *QueryBuyOrdersByAddressRequest) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryBuyOrdersByAddressRequest_messageType fastReflection_QueryBuyOrdersByAddressRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryBuyOrdersByAddressRequest_messageType{} - -type fastReflection_QueryBuyOrdersByAddressRequest_messageType struct{} - -func (x fastReflection_QueryBuyOrdersByAddressRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryBuyOrdersByAddressRequest)(nil) -} -func (x fastReflection_QueryBuyOrdersByAddressRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryBuyOrdersByAddressRequest) -} -func (x fastReflection_QueryBuyOrdersByAddressRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBuyOrdersByAddressRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryBuyOrdersByAddressRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBuyOrdersByAddressRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryBuyOrdersByAddressRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryBuyOrdersByAddressRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryBuyOrdersByAddressRequest) New() protoreflect.Message { - return new(fastReflection_QueryBuyOrdersByAddressRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryBuyOrdersByAddressRequest) Interface() protoreflect.ProtoMessage { - return (*QueryBuyOrdersByAddressRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryBuyOrdersByAddressRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QueryBuyOrdersByAddressRequest_address, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryBuyOrdersByAddressRequest_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryBuyOrdersByAddressRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest.address": - return x.Address != "" - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrdersByAddressRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest.address": - x.Address = "" - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryBuyOrdersByAddressRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrdersByAddressRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest.address": - x.Address = value.Interface().(string) - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrdersByAddressRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest.address": - panic(fmt.Errorf("field address of message regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryBuyOrdersByAddressRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest.address": - return protoreflect.ValueOfString("") - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryBuyOrdersByAddressRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryBuyOrdersByAddressRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrdersByAddressRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryBuyOrdersByAddressRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryBuyOrdersByAddressRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryBuyOrdersByAddressRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryBuyOrdersByAddressRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryBuyOrdersByAddressRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBuyOrdersByAddressRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBuyOrdersByAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryBuyOrdersByAddressResponse_1_list)(nil) - -type _QueryBuyOrdersByAddressResponse_1_list struct { - list *[]*BuyOrder -} - -func (x *_QueryBuyOrdersByAddressResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryBuyOrdersByAddressResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryBuyOrdersByAddressResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*BuyOrder) - (*x.list)[i] = concreteValue -} - -func (x *_QueryBuyOrdersByAddressResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*BuyOrder) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryBuyOrdersByAddressResponse_1_list) AppendMutable() protoreflect.Value { - v := new(BuyOrder) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryBuyOrdersByAddressResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryBuyOrdersByAddressResponse_1_list) NewElement() protoreflect.Value { - v := new(BuyOrder) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryBuyOrdersByAddressResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryBuyOrdersByAddressResponse protoreflect.MessageDescriptor - fd_QueryBuyOrdersByAddressResponse_buy_orders protoreflect.FieldDescriptor - fd_QueryBuyOrdersByAddressResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_regen_ecocredit_marketplace_v1_query_proto_init() - md_QueryBuyOrdersByAddressResponse = File_regen_ecocredit_marketplace_v1_query_proto.Messages().ByName("QueryBuyOrdersByAddressResponse") - fd_QueryBuyOrdersByAddressResponse_buy_orders = md_QueryBuyOrdersByAddressResponse.Fields().ByName("buy_orders") - fd_QueryBuyOrdersByAddressResponse_pagination = md_QueryBuyOrdersByAddressResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryBuyOrdersByAddressResponse)(nil) - -type fastReflection_QueryBuyOrdersByAddressResponse QueryBuyOrdersByAddressResponse - -func (x *QueryBuyOrdersByAddressResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryBuyOrdersByAddressResponse)(x) -} - -func (x *QueryBuyOrdersByAddressResponse) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryBuyOrdersByAddressResponse_messageType fastReflection_QueryBuyOrdersByAddressResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryBuyOrdersByAddressResponse_messageType{} - -type fastReflection_QueryBuyOrdersByAddressResponse_messageType struct{} - -func (x fastReflection_QueryBuyOrdersByAddressResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryBuyOrdersByAddressResponse)(nil) -} -func (x fastReflection_QueryBuyOrdersByAddressResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryBuyOrdersByAddressResponse) -} -func (x fastReflection_QueryBuyOrdersByAddressResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBuyOrdersByAddressResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryBuyOrdersByAddressResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBuyOrdersByAddressResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryBuyOrdersByAddressResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryBuyOrdersByAddressResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryBuyOrdersByAddressResponse) New() protoreflect.Message { - return new(fastReflection_QueryBuyOrdersByAddressResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryBuyOrdersByAddressResponse) Interface() protoreflect.ProtoMessage { - return (*QueryBuyOrdersByAddressResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryBuyOrdersByAddressResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.BuyOrders) != 0 { - value := protoreflect.ValueOfList(&_QueryBuyOrdersByAddressResponse_1_list{list: &x.BuyOrders}) - if !f(fd_QueryBuyOrdersByAddressResponse_buy_orders, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryBuyOrdersByAddressResponse_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryBuyOrdersByAddressResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse.buy_orders": - return len(x.BuyOrders) != 0 - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrdersByAddressResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse.buy_orders": - x.BuyOrders = nil - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryBuyOrdersByAddressResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse.buy_orders": - if len(x.BuyOrders) == 0 { - return protoreflect.ValueOfList(&_QueryBuyOrdersByAddressResponse_1_list{}) - } - listValue := &_QueryBuyOrdersByAddressResponse_1_list{list: &x.BuyOrders} - return protoreflect.ValueOfList(listValue) - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrdersByAddressResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse.buy_orders": - lv := value.List() - clv := lv.(*_QueryBuyOrdersByAddressResponse_1_list) - x.BuyOrders = *clv.list - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrdersByAddressResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse.buy_orders": - if x.BuyOrders == nil { - x.BuyOrders = []*BuyOrder{} - } - value := &_QueryBuyOrdersByAddressResponse_1_list{list: &x.BuyOrders} - return protoreflect.ValueOfList(value) - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryBuyOrdersByAddressResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse.buy_orders": - list := []*BuyOrder{} - return protoreflect.ValueOfList(&_QueryBuyOrdersByAddressResponse_1_list{list: &list}) - case "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryBuyOrdersByAddressResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryBuyOrdersByAddressResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryBuyOrdersByAddressResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryBuyOrdersByAddressResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryBuyOrdersByAddressResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryBuyOrdersByAddressResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.BuyOrders) > 0 { - for _, e := range x.BuyOrders { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryBuyOrdersByAddressResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.BuyOrders) > 0 { - for iNdEx := len(x.BuyOrders) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.BuyOrders[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryBuyOrdersByAddressResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBuyOrdersByAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBuyOrdersByAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BuyOrders", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.BuyOrders = append(x.BuyOrders, &BuyOrder{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BuyOrders[len(x.BuyOrders)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAllowedDenomsRequest protoreflect.MessageDescriptor - fd_QueryAllowedDenomsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_regen_ecocredit_marketplace_v1_query_proto_init() - md_QueryAllowedDenomsRequest = File_regen_ecocredit_marketplace_v1_query_proto.Messages().ByName("QueryAllowedDenomsRequest") - fd_QueryAllowedDenomsRequest_pagination = md_QueryAllowedDenomsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllowedDenomsRequest)(nil) - -type fastReflection_QueryAllowedDenomsRequest QueryAllowedDenomsRequest - -func (x *QueryAllowedDenomsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllowedDenomsRequest)(x) -} - -func (x *QueryAllowedDenomsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllowedDenomsRequest_messageType fastReflection_QueryAllowedDenomsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllowedDenomsRequest_messageType{} - -type fastReflection_QueryAllowedDenomsRequest_messageType struct{} - -func (x fastReflection_QueryAllowedDenomsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllowedDenomsRequest)(nil) -} -func (x fastReflection_QueryAllowedDenomsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllowedDenomsRequest) -} -func (x fastReflection_QueryAllowedDenomsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllowedDenomsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllowedDenomsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllowedDenomsRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllowedDenomsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAllowedDenomsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllowedDenomsRequest) New() protoreflect.Message { - return new(fastReflection_QueryAllowedDenomsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllowedDenomsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAllowedDenomsRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllowedDenomsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllowedDenomsRequest_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllowedDenomsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllowedDenomsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllowedDenomsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllowedDenomsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllowedDenomsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllowedDenomsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllowedDenomsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllowedDenomsRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllowedDenomsRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllowedDenomsRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllowedDenomsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllowedDenomsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllowedDenomsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllowedDenomsRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowedDenomsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowedDenomsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryAllowedDenomsResponse_1_list)(nil) - -type _QueryAllowedDenomsResponse_1_list struct { - list *[]*AllowedDenom -} - -func (x *_QueryAllowedDenomsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryAllowedDenomsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryAllowedDenomsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*AllowedDenom) - (*x.list)[i] = concreteValue -} - -func (x *_QueryAllowedDenomsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*AllowedDenom) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryAllowedDenomsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(AllowedDenom) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllowedDenomsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryAllowedDenomsResponse_1_list) NewElement() protoreflect.Value { - v := new(AllowedDenom) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllowedDenomsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryAllowedDenomsResponse protoreflect.MessageDescriptor - fd_QueryAllowedDenomsResponse_allowed_denoms protoreflect.FieldDescriptor - fd_QueryAllowedDenomsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_regen_ecocredit_marketplace_v1_query_proto_init() - md_QueryAllowedDenomsResponse = File_regen_ecocredit_marketplace_v1_query_proto.Messages().ByName("QueryAllowedDenomsResponse") - fd_QueryAllowedDenomsResponse_allowed_denoms = md_QueryAllowedDenomsResponse.Fields().ByName("allowed_denoms") - fd_QueryAllowedDenomsResponse_pagination = md_QueryAllowedDenomsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllowedDenomsResponse)(nil) - -type fastReflection_QueryAllowedDenomsResponse QueryAllowedDenomsResponse - -func (x *QueryAllowedDenomsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllowedDenomsResponse)(x) -} - -func (x *QueryAllowedDenomsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllowedDenomsResponse_messageType fastReflection_QueryAllowedDenomsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllowedDenomsResponse_messageType{} - -type fastReflection_QueryAllowedDenomsResponse_messageType struct{} - -func (x fastReflection_QueryAllowedDenomsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllowedDenomsResponse)(nil) -} -func (x fastReflection_QueryAllowedDenomsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllowedDenomsResponse) -} -func (x fastReflection_QueryAllowedDenomsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllowedDenomsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllowedDenomsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllowedDenomsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllowedDenomsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAllowedDenomsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllowedDenomsResponse) New() protoreflect.Message { - return new(fastReflection_QueryAllowedDenomsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllowedDenomsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAllowedDenomsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllowedDenomsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.AllowedDenoms) != 0 { - value := protoreflect.ValueOfList(&_QueryAllowedDenomsResponse_1_list{list: &x.AllowedDenoms}) - if !f(fd_QueryAllowedDenomsResponse_allowed_denoms, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllowedDenomsResponse_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllowedDenomsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.allowed_denoms": - return len(x.AllowedDenoms) != 0 - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllowedDenomsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.allowed_denoms": - x.AllowedDenoms = nil - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllowedDenomsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.allowed_denoms": - if len(x.AllowedDenoms) == 0 { - return protoreflect.ValueOfList(&_QueryAllowedDenomsResponse_1_list{}) - } - listValue := &_QueryAllowedDenomsResponse_1_list{list: &x.AllowedDenoms} - return protoreflect.ValueOfList(listValue) - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllowedDenomsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.allowed_denoms": - lv := value.List() - clv := lv.(*_QueryAllowedDenomsResponse_1_list) - x.AllowedDenoms = *clv.list - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllowedDenomsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.allowed_denoms": - if x.AllowedDenoms == nil { - x.AllowedDenoms = []*AllowedDenom{} - } - value := &_QueryAllowedDenomsResponse_1_list{list: &x.AllowedDenoms} - return protoreflect.ValueOfList(value) - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllowedDenomsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.allowed_denoms": - list := []*AllowedDenom{} - return protoreflect.ValueOfList(&_QueryAllowedDenomsResponse_1_list{list: &list}) - case "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllowedDenomsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllowedDenomsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllowedDenomsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllowedDenomsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllowedDenomsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllowedDenomsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.AllowedDenoms) > 0 { - for _, e := range x.AllowedDenoms { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllowedDenomsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.AllowedDenoms) > 0 { - for iNdEx := len(x.AllowedDenoms) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.AllowedDenoms[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllowedDenomsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowedDenomsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowedDenomsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AllowedDenoms", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AllowedDenoms = append(x.AllowedDenoms, &AllowedDenom{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AllowedDenoms[len(x.AllowedDenoms)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: regen/ecocredit/marketplace/v1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QuerySellOrderRequest is the Query/SellOrder request type. -type QuerySellOrderRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sell_order_id is the id of the requested sell order. - SellOrderId uint64 `protobuf:"varint,1,opt,name=sell_order_id,json=sellOrderId,proto3" json:"sell_order_id,omitempty"` -} - -func (x *QuerySellOrderRequest) Reset() { - *x = QuerySellOrderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySellOrderRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySellOrderRequest) ProtoMessage() {} - -// Deprecated: Use QuerySellOrderRequest.ProtoReflect.Descriptor instead. -func (*QuerySellOrderRequest) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QuerySellOrderRequest) GetSellOrderId() uint64 { - if x != nil { - return x.SellOrderId - } - return 0 -} - -// QuerySellOrderResponse is the Query/SellOrder response type. -type QuerySellOrderResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sell_order contains all information related to a sell order. - SellOrder *SellOrder `protobuf:"bytes,1,opt,name=sell_order,json=sellOrder,proto3" json:"sell_order,omitempty"` -} - -func (x *QuerySellOrderResponse) Reset() { - *x = QuerySellOrderResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySellOrderResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySellOrderResponse) ProtoMessage() {} - -// Deprecated: Use QuerySellOrderResponse.ProtoReflect.Descriptor instead. -func (*QuerySellOrderResponse) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QuerySellOrderResponse) GetSellOrder() *SellOrder { - if x != nil { - return x.SellOrder - } - return nil -} - -// QuerySellOrdersRequest is the Query/SellOrders request type. -type QuerySellOrdersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QuerySellOrdersRequest) Reset() { - *x = QuerySellOrdersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySellOrdersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySellOrdersRequest) ProtoMessage() {} - -// Deprecated: Use QuerySellOrdersRequest.ProtoReflect.Descriptor instead. -func (*QuerySellOrdersRequest) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QuerySellOrdersRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QuerySellOrdersResponse is the Query/SellOrders response type. -type QuerySellOrdersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sell_orders is a list of sell orders. - SellOrders []*SellOrder `protobuf:"bytes,1,rep,name=sell_orders,json=sellOrders,proto3" json:"sell_orders,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QuerySellOrdersResponse) Reset() { - *x = QuerySellOrdersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySellOrdersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySellOrdersResponse) ProtoMessage() {} - -// Deprecated: Use QuerySellOrdersResponse.ProtoReflect.Descriptor instead. -func (*QuerySellOrdersResponse) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QuerySellOrdersResponse) GetSellOrders() []*SellOrder { - if x != nil { - return x.SellOrders - } - return nil -} - -func (x *QuerySellOrdersResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QuerySellOrdersByDenomRequest is the Query/SellOrdersByDenom request type. -type QuerySellOrdersByBatchDenomRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // batch_denom is an ecocredit denom - BatchDenom string `protobuf:"bytes,1,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QuerySellOrdersByBatchDenomRequest) Reset() { - *x = QuerySellOrdersByBatchDenomRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySellOrdersByBatchDenomRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySellOrdersByBatchDenomRequest) ProtoMessage() {} - -// Deprecated: Use QuerySellOrdersByBatchDenomRequest.ProtoReflect.Descriptor instead. -func (*QuerySellOrdersByBatchDenomRequest) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QuerySellOrdersByBatchDenomRequest) GetBatchDenom() string { - if x != nil { - return x.BatchDenom - } - return "" -} - -func (x *QuerySellOrdersByBatchDenomRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QuerySellOrdersByDenomResponse is the Query/SellOrdersByDenom response type. -type QuerySellOrdersByBatchDenomResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sell_orders is a list of sell orders. - SellOrders []*SellOrder `protobuf:"bytes,1,rep,name=sell_orders,json=sellOrders,proto3" json:"sell_orders,omitempty"` - // pagination defines an optional pagination for the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QuerySellOrdersByBatchDenomResponse) Reset() { - *x = QuerySellOrdersByBatchDenomResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySellOrdersByBatchDenomResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySellOrdersByBatchDenomResponse) ProtoMessage() {} - -// Deprecated: Use QuerySellOrdersByBatchDenomResponse.ProtoReflect.Descriptor instead. -func (*QuerySellOrdersByBatchDenomResponse) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QuerySellOrdersByBatchDenomResponse) GetSellOrders() []*SellOrder { - if x != nil { - return x.SellOrders - } - return nil -} - -func (x *QuerySellOrdersByBatchDenomResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QuerySellOrdersByAddressRequest is the Query/SellOrdersByAddress request -// type. -type QuerySellOrdersByAddressRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the creator of the sell order - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QuerySellOrdersByAddressRequest) Reset() { - *x = QuerySellOrdersByAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySellOrdersByAddressRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySellOrdersByAddressRequest) ProtoMessage() {} - -// Deprecated: Use QuerySellOrdersByAddressRequest.ProtoReflect.Descriptor instead. -func (*QuerySellOrdersByAddressRequest) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{6} -} +func (*QuerySellOrderRequest) ProtoMessage() {} -func (x *QuerySellOrdersByAddressRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" +// Deprecated: Use QuerySellOrderRequest.ProtoReflect.Descriptor instead. +func (*QuerySellOrderRequest) Descriptor() ([]byte, []int) { + return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{0} } -func (x *QuerySellOrdersByAddressRequest) GetPagination() *v1beta1.PageRequest { +func (x *QuerySellOrderRequest) GetSellOrderId() uint64 { if x != nil { - return x.Pagination + return x.SellOrderId } - return nil + return 0 } -// QuerySellOrdersByAddressResponse is the Query/SellOrdersByAddressResponse -// response type. -type QuerySellOrdersByAddressResponse struct { +// QuerySellOrderResponse is the Query/SellOrder response type. +type QuerySellOrderResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // sell_orders is a list of sell orders. - SellOrders []*SellOrder `protobuf:"bytes,1,rep,name=sell_orders,json=sellOrders,proto3" json:"sell_orders,omitempty"` - // pagination defines an optional pagination for the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + // sell_order contains all information related to a sell order. + SellOrder *SellOrder `protobuf:"bytes,1,opt,name=sell_order,json=sellOrder,proto3" json:"sell_order,omitempty"` } -func (x *QuerySellOrdersByAddressResponse) Reset() { - *x = QuerySellOrdersByAddressResponse{} +func (x *QuerySellOrderResponse) Reset() { + *x = QuerySellOrderResponse{} if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[7] + mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QuerySellOrdersByAddressResponse) String() string { +func (x *QuerySellOrderResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QuerySellOrdersByAddressResponse) ProtoMessage() {} - -// Deprecated: Use QuerySellOrdersByAddressResponse.ProtoReflect.Descriptor instead. -func (*QuerySellOrdersByAddressResponse) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{7} -} +func (*QuerySellOrderResponse) ProtoMessage() {} -func (x *QuerySellOrdersByAddressResponse) GetSellOrders() []*SellOrder { - if x != nil { - return x.SellOrders - } - return nil +// Deprecated: Use QuerySellOrderResponse.ProtoReflect.Descriptor instead. +func (*QuerySellOrderResponse) Descriptor() ([]byte, []int) { + return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{1} } -func (x *QuerySellOrdersByAddressResponse) GetPagination() *v1beta1.PageResponse { +func (x *QuerySellOrderResponse) GetSellOrder() *SellOrder { if x != nil { - return x.Pagination + return x.SellOrder } return nil } -// QueryBuyOrderRequest is the Query/BuyOrder request type. -type QueryBuyOrderRequest struct { +// QuerySellOrdersRequest is the Query/SellOrders request type. +type QuerySellOrdersRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // buy_order_id is the id of the buy order. - BuyOrderId uint64 `protobuf:"varint,1,opt,name=buy_order_id,json=buyOrderId,proto3" json:"buy_order_id,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *QueryBuyOrderRequest) Reset() { - *x = QueryBuyOrderRequest{} +func (x *QuerySellOrdersRequest) Reset() { + *x = QuerySellOrdersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[8] + mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryBuyOrderRequest) String() string { +func (x *QuerySellOrdersRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryBuyOrderRequest) ProtoMessage() {} +func (*QuerySellOrdersRequest) ProtoMessage() {} -// Deprecated: Use QueryBuyOrderRequest.ProtoReflect.Descriptor instead. -func (*QueryBuyOrderRequest) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{8} +// Deprecated: Use QuerySellOrdersRequest.ProtoReflect.Descriptor instead. +func (*QuerySellOrdersRequest) Descriptor() ([]byte, []int) { + return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{2} } -func (x *QueryBuyOrderRequest) GetBuyOrderId() uint64 { +func (x *QuerySellOrdersRequest) GetPagination() *v1beta1.PageRequest { if x != nil { - return x.BuyOrderId + return x.Pagination } - return 0 + return nil } -// QueryBuyOrderResponse is the Query/BuyOrder response type. -type QueryBuyOrderResponse struct { +// QuerySellOrdersResponse is the Query/SellOrders response type. +type QuerySellOrdersResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // buy_order contains all information related to a buy order. - BuyOrder *BuyOrder `protobuf:"bytes,1,opt,name=buy_order,json=buyOrder,proto3" json:"buy_order,omitempty"` + // sell_orders is a list of sell orders. + SellOrders []*SellOrder `protobuf:"bytes,1,rep,name=sell_orders,json=sellOrders,proto3" json:"sell_orders,omitempty"` + // pagination defines the pagination in the response. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *QueryBuyOrderResponse) Reset() { - *x = QueryBuyOrderResponse{} +func (x *QuerySellOrdersResponse) Reset() { + *x = QuerySellOrdersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[9] + mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryBuyOrderResponse) String() string { +func (x *QuerySellOrdersResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryBuyOrderResponse) ProtoMessage() {} +func (*QuerySellOrdersResponse) ProtoMessage() {} -// Deprecated: Use QueryBuyOrderResponse.ProtoReflect.Descriptor instead. -func (*QueryBuyOrderResponse) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{9} +// Deprecated: Use QuerySellOrdersResponse.ProtoReflect.Descriptor instead. +func (*QuerySellOrdersResponse) Descriptor() ([]byte, []int) { + return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QuerySellOrdersResponse) GetSellOrders() []*SellOrder { + if x != nil { + return x.SellOrders + } + return nil } -func (x *QueryBuyOrderResponse) GetBuyOrder() *BuyOrder { +func (x *QuerySellOrdersResponse) GetPagination() *v1beta1.PageResponse { if x != nil { - return x.BuyOrder + return x.Pagination } return nil } -// QueryBuyOrdersRequest is the Query/BuyOrders request type. -type QueryBuyOrdersRequest struct { +// QuerySellOrdersByDenomRequest is the Query/SellOrdersByDenom request type. +type QuerySellOrdersByBatchDenomRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // batch_denom is an ecocredit denom + BatchDenom string `protobuf:"bytes,1,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *QueryBuyOrdersRequest) Reset() { - *x = QueryBuyOrdersRequest{} +func (x *QuerySellOrdersByBatchDenomRequest) Reset() { + *x = QuerySellOrdersByBatchDenomRequest{} if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[10] + mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryBuyOrdersRequest) String() string { +func (x *QuerySellOrdersByBatchDenomRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryBuyOrdersRequest) ProtoMessage() {} +func (*QuerySellOrdersByBatchDenomRequest) ProtoMessage() {} + +// Deprecated: Use QuerySellOrdersByBatchDenomRequest.ProtoReflect.Descriptor instead. +func (*QuerySellOrdersByBatchDenomRequest) Descriptor() ([]byte, []int) { + return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{4} +} -// Deprecated: Use QueryBuyOrdersRequest.ProtoReflect.Descriptor instead. -func (*QueryBuyOrdersRequest) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{10} +func (x *QuerySellOrdersByBatchDenomRequest) GetBatchDenom() string { + if x != nil { + return x.BatchDenom + } + return "" } -func (x *QueryBuyOrdersRequest) GetPagination() *v1beta1.PageRequest { +func (x *QuerySellOrdersByBatchDenomRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } -// QueryBuyOrdersResponse is the Query/BuyOrders response type. -type QueryBuyOrdersResponse struct { +// QuerySellOrdersByDenomResponse is the Query/SellOrdersByDenom response type. +type QuerySellOrdersByBatchDenomResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // buy_orders is a list of buy orders. - BuyOrders []*BuyOrder `protobuf:"bytes,1,rep,name=buy_orders,json=buyOrders,proto3" json:"buy_orders,omitempty"` + // sell_orders is a list of sell orders. + SellOrders []*SellOrder `protobuf:"bytes,1,rep,name=sell_orders,json=sellOrders,proto3" json:"sell_orders,omitempty"` // pagination defines an optional pagination for the response. Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *QueryBuyOrdersResponse) Reset() { - *x = QueryBuyOrdersResponse{} +func (x *QuerySellOrdersByBatchDenomResponse) Reset() { + *x = QuerySellOrdersByBatchDenomResponse{} if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[11] + mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryBuyOrdersResponse) String() string { +func (x *QuerySellOrdersByBatchDenomResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryBuyOrdersResponse) ProtoMessage() {} +func (*QuerySellOrdersByBatchDenomResponse) ProtoMessage() {} -// Deprecated: Use QueryBuyOrdersResponse.ProtoReflect.Descriptor instead. -func (*QueryBuyOrdersResponse) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{11} +// Deprecated: Use QuerySellOrdersByBatchDenomResponse.ProtoReflect.Descriptor instead. +func (*QuerySellOrdersByBatchDenomResponse) Descriptor() ([]byte, []int) { + return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{5} } -func (x *QueryBuyOrdersResponse) GetBuyOrders() []*BuyOrder { +func (x *QuerySellOrdersByBatchDenomResponse) GetSellOrders() []*SellOrder { if x != nil { - return x.BuyOrders + return x.SellOrders } return nil } -func (x *QueryBuyOrdersResponse) GetPagination() *v1beta1.PageResponse { +func (x *QuerySellOrdersByBatchDenomResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } return nil } -// QueryBuyOrdersByAddressRequest is the Query/BuyOrdersByAddress request type -type QueryBuyOrdersByAddressRequest struct { +// QuerySellOrdersByAddressRequest is the Query/SellOrdersByAddress request +// type. +type QuerySellOrdersByAddressRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // address of the buy order creator + // address is the creator of the sell order Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // pagination defines an optional pagination for the request. Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *QueryBuyOrdersByAddressRequest) Reset() { - *x = QueryBuyOrdersByAddressRequest{} +func (x *QuerySellOrdersByAddressRequest) Reset() { + *x = QuerySellOrdersByAddressRequest{} if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[12] + mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryBuyOrdersByAddressRequest) String() string { +func (x *QuerySellOrdersByAddressRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryBuyOrdersByAddressRequest) ProtoMessage() {} +func (*QuerySellOrdersByAddressRequest) ProtoMessage() {} -// Deprecated: Use QueryBuyOrdersByAddressRequest.ProtoReflect.Descriptor instead. -func (*QueryBuyOrdersByAddressRequest) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{12} +// Deprecated: Use QuerySellOrdersByAddressRequest.ProtoReflect.Descriptor instead. +func (*QuerySellOrdersByAddressRequest) Descriptor() ([]byte, []int) { + return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{6} } -func (x *QueryBuyOrdersByAddressRequest) GetAddress() string { +func (x *QuerySellOrdersByAddressRequest) GetAddress() string { if x != nil { return x.Address } return "" } -func (x *QueryBuyOrdersByAddressRequest) GetPagination() *v1beta1.PageRequest { +func (x *QuerySellOrdersByAddressRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } -// QueryBuyOrdersByAddressResponse is the Query/BuyOrdersByAddress response -// type. -type QueryBuyOrdersByAddressResponse struct { +// QuerySellOrdersByAddressResponse is the Query/SellOrdersByAddressResponse +// response type. +type QuerySellOrdersByAddressResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // buy_orders is a list of buy orders. - BuyOrders []*BuyOrder `protobuf:"bytes,1,rep,name=buy_orders,json=buyOrders,proto3" json:"buy_orders,omitempty"` + // sell_orders is a list of sell orders. + SellOrders []*SellOrder `protobuf:"bytes,1,rep,name=sell_orders,json=sellOrders,proto3" json:"sell_orders,omitempty"` // pagination defines an optional pagination for the response. Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *QueryBuyOrdersByAddressResponse) Reset() { - *x = QueryBuyOrdersByAddressResponse{} +func (x *QuerySellOrdersByAddressResponse) Reset() { + *x = QuerySellOrdersByAddressResponse{} if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[13] + mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryBuyOrdersByAddressResponse) String() string { +func (x *QuerySellOrdersByAddressResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryBuyOrdersByAddressResponse) ProtoMessage() {} +func (*QuerySellOrdersByAddressResponse) ProtoMessage() {} -// Deprecated: Use QueryBuyOrdersByAddressResponse.ProtoReflect.Descriptor instead. -func (*QueryBuyOrdersByAddressResponse) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{13} +// Deprecated: Use QuerySellOrdersByAddressResponse.ProtoReflect.Descriptor instead. +func (*QuerySellOrdersByAddressResponse) Descriptor() ([]byte, []int) { + return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{7} } -func (x *QueryBuyOrdersByAddressResponse) GetBuyOrders() []*BuyOrder { +func (x *QuerySellOrdersByAddressResponse) GetSellOrders() []*SellOrder { if x != nil { - return x.BuyOrders + return x.SellOrders } return nil } -func (x *QueryBuyOrdersByAddressResponse) GetPagination() *v1beta1.PageResponse { +func (x *QuerySellOrdersByAddressResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } @@ -8551,7 +5382,7 @@ type QueryAllowedDenomsRequest struct { func (x *QueryAllowedDenomsRequest) Reset() { *x = QueryAllowedDenomsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[14] + mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8565,7 +5396,7 @@ func (*QueryAllowedDenomsRequest) ProtoMessage() {} // Deprecated: Use QueryAllowedDenomsRequest.ProtoReflect.Descriptor instead. func (*QueryAllowedDenomsRequest) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{14} + return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{8} } func (x *QueryAllowedDenomsRequest) GetPagination() *v1beta1.PageRequest { @@ -8591,7 +5422,7 @@ type QueryAllowedDenomsResponse struct { func (x *QueryAllowedDenomsResponse) Reset() { *x = QueryAllowedDenomsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[15] + mi := &file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8605,7 +5436,7 @@ func (*QueryAllowedDenomsResponse) ProtoMessage() {} // Deprecated: Use QueryAllowedDenomsResponse.ProtoReflect.Descriptor instead. func (*QueryAllowedDenomsResponse) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{15} + return file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP(), []int{9} } func (x *QueryAllowedDenomsResponse) GetAllowedDenoms() []*AllowedDenom { @@ -8705,192 +5536,109 @@ var file_regen_ecocredit_marketplace_v1_query_proto_rawDesc = []byte{ 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x38, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x79, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x62, - 0x75, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0a, 0x62, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x22, 0x5e, 0x0a, - 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x62, 0x75, 0x79, 0x5f, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 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, 0x42, 0x75, 0x79, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x52, 0x08, 0x62, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x5f, 0x0a, - 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xaa, - 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x62, 0x75, 0x79, - 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, + 0x69, 0x6f, 0x6e, 0x22, 0x63, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, + 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xba, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x65, 0x64, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 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, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x0d, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x12, 0x47, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x93, 0x08, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, + 0xc2, 0x01, 0x0a, 0x09, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 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, 0x42, - 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x09, 0x62, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x82, 0x01, 0x0a, 0x1e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, - 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0xb3, 0x01, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x62, 0x75, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 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, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x52, 0x09, 0x62, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x63, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, - 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xba, 0x01, 0x0a, 0x1a, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, - 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0e, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 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, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, - 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x12, - 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xe2, 0x0c, 0x0a, 0x05, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x12, 0xc2, 0x01, 0x0a, 0x09, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, - 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, - 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, 0x3e, 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, 0x2f, 0x73, 0x65, 0x6c, 0x6c, 0x2d, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x73, 0x2f, 0x69, 0x64, 0x2f, 0x7b, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x0a, 0x53, 0x65, 0x6c, 0x6c, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x36, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, - 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, - 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, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, - 0x2b, 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, - 0x2f, 0x73, 0x65, 0x6c, 0x6c, 0x2d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0xf0, 0x01, 0x0a, - 0x16, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x42, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, - 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x42, 0x61, 0x74, 0x63, 0x68, 0x44, - 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x43, 0x2e, 0x72, 0x65, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x6c, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x40, 0x12, 0x3e, 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, 0x2f, 0x73, 0x65, 0x6c, 0x6c, 0x2d, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x73, 0x2f, 0x69, 0x64, 0x2f, 0x7b, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x0a, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x73, 0x12, 0x36, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 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, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x12, 0x45, 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, 0x2f, 0x73, 0x65, 0x6c, 0x6c, 0x2d, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2d, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x2f, 0x7b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x7d, 0x12, - 0xdf, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3f, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, - 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x40, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, + 0x72, 0x79, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 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, 0x2f, 0x73, 0x65, + 0x6c, 0x6c, 0x2d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0xf0, 0x01, 0x0a, 0x16, 0x53, 0x65, + 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x42, 0x61, 0x74, 0x63, 0x68, 0x44, + 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x42, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x6c, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x42, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6e, 0x6f, + 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x43, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, - 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x3f, 0x12, 0x3d, 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, 0x2f, 0x73, 0x65, 0x6c, 0x6c, 0x2d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x2f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x7d, 0x12, 0xbd, 0x01, 0x0a, 0x08, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 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, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, + 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x12, 0x45, 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, 0x2f, 0x73, 0x65, 0x6c, 0x6c, 0x2d, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x73, 0x2f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2d, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x2f, 0x7b, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x7d, 0x12, 0xdf, 0x01, 0x0a, + 0x13, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x3f, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x79, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x3e, 0x12, 0x3c, 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, 0x2f, 0x62, 0x75, 0x79, 0x2d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x2f, - 0x69, 0x64, 0x2f, 0x7b, 0x62, 0x75, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x09, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x79, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 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, 0x2f, 0x62, 0x75, 0x79, 0x2d, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x73, 0x12, 0xdb, 0x01, 0x0a, 0x12, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, - 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3e, 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, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 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, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x3e, 0x12, 0x3c, 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, 0x2f, 0x62, 0x75, 0x79, 0x2d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, - 0x12, 0xba, 0x01, 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, - 0x6d, 0x73, 0x12, 0x39, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, - 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2c, 0x12, 0x2a, 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, 0x2f, 0x61, 0x73, 0x6b, 0x2d, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x42, 0xa3, 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, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 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, + 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x6c, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x40, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x6c, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, + 0x3d, 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, + 0x2f, 0x73, 0x65, 0x6c, 0x6c, 0x2d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xba, + 0x01, 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, + 0x12, 0x39, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, + 0x6e, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, + 0x2a, 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, + 0x2f, 0x61, 0x73, 0x6b, 0x2d, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x42, 0xa3, 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, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 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 ( @@ -8905,7 +5653,7 @@ func file_regen_ecocredit_marketplace_v1_query_proto_rawDescGZIP() []byte { return file_regen_ecocredit_marketplace_v1_query_proto_rawDescData } -var file_regen_ecocredit_marketplace_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_regen_ecocredit_marketplace_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_regen_ecocredit_marketplace_v1_query_proto_goTypes = []interface{}{ (*QuerySellOrderRequest)(nil), // 0: regen.ecocredit.marketplace.v1.QuerySellOrderRequest (*QuerySellOrderResponse)(nil), // 1: regen.ecocredit.marketplace.v1.QuerySellOrderResponse @@ -8915,62 +5663,42 @@ var file_regen_ecocredit_marketplace_v1_query_proto_goTypes = []interface{}{ (*QuerySellOrdersByBatchDenomResponse)(nil), // 5: regen.ecocredit.marketplace.v1.QuerySellOrdersByBatchDenomResponse (*QuerySellOrdersByAddressRequest)(nil), // 6: regen.ecocredit.marketplace.v1.QuerySellOrdersByAddressRequest (*QuerySellOrdersByAddressResponse)(nil), // 7: regen.ecocredit.marketplace.v1.QuerySellOrdersByAddressResponse - (*QueryBuyOrderRequest)(nil), // 8: regen.ecocredit.marketplace.v1.QueryBuyOrderRequest - (*QueryBuyOrderResponse)(nil), // 9: regen.ecocredit.marketplace.v1.QueryBuyOrderResponse - (*QueryBuyOrdersRequest)(nil), // 10: regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest - (*QueryBuyOrdersResponse)(nil), // 11: regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse - (*QueryBuyOrdersByAddressRequest)(nil), // 12: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest - (*QueryBuyOrdersByAddressResponse)(nil), // 13: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse - (*QueryAllowedDenomsRequest)(nil), // 14: regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest - (*QueryAllowedDenomsResponse)(nil), // 15: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse - (*SellOrder)(nil), // 16: regen.ecocredit.marketplace.v1.SellOrder - (*v1beta1.PageRequest)(nil), // 17: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 18: cosmos.base.query.v1beta1.PageResponse - (*BuyOrder)(nil), // 19: regen.ecocredit.marketplace.v1.BuyOrder - (*AllowedDenom)(nil), // 20: regen.ecocredit.marketplace.v1.AllowedDenom + (*QueryAllowedDenomsRequest)(nil), // 8: regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest + (*QueryAllowedDenomsResponse)(nil), // 9: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse + (*SellOrder)(nil), // 10: regen.ecocredit.marketplace.v1.SellOrder + (*v1beta1.PageRequest)(nil), // 11: cosmos.base.query.v1beta1.PageRequest + (*v1beta1.PageResponse)(nil), // 12: cosmos.base.query.v1beta1.PageResponse + (*AllowedDenom)(nil), // 13: regen.ecocredit.marketplace.v1.AllowedDenom } var file_regen_ecocredit_marketplace_v1_query_proto_depIdxs = []int32{ - 16, // 0: regen.ecocredit.marketplace.v1.QuerySellOrderResponse.sell_order:type_name -> regen.ecocredit.marketplace.v1.SellOrder - 17, // 1: regen.ecocredit.marketplace.v1.QuerySellOrdersRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 16, // 2: regen.ecocredit.marketplace.v1.QuerySellOrdersResponse.sell_orders:type_name -> regen.ecocredit.marketplace.v1.SellOrder - 18, // 3: regen.ecocredit.marketplace.v1.QuerySellOrdersResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 17, // 4: regen.ecocredit.marketplace.v1.QuerySellOrdersByBatchDenomRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 16, // 5: regen.ecocredit.marketplace.v1.QuerySellOrdersByBatchDenomResponse.sell_orders:type_name -> regen.ecocredit.marketplace.v1.SellOrder - 18, // 6: regen.ecocredit.marketplace.v1.QuerySellOrdersByBatchDenomResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 17, // 7: regen.ecocredit.marketplace.v1.QuerySellOrdersByAddressRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 16, // 8: regen.ecocredit.marketplace.v1.QuerySellOrdersByAddressResponse.sell_orders:type_name -> regen.ecocredit.marketplace.v1.SellOrder - 18, // 9: regen.ecocredit.marketplace.v1.QuerySellOrdersByAddressResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 19, // 10: regen.ecocredit.marketplace.v1.QueryBuyOrderResponse.buy_order:type_name -> regen.ecocredit.marketplace.v1.BuyOrder - 17, // 11: regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 19, // 12: regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse.buy_orders:type_name -> regen.ecocredit.marketplace.v1.BuyOrder - 18, // 13: regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 17, // 14: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 19, // 15: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse.buy_orders:type_name -> regen.ecocredit.marketplace.v1.BuyOrder - 18, // 16: regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 17, // 17: regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 20, // 18: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.allowed_denoms:type_name -> regen.ecocredit.marketplace.v1.AllowedDenom - 18, // 19: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 0, // 20: regen.ecocredit.marketplace.v1.Query.SellOrder:input_type -> regen.ecocredit.marketplace.v1.QuerySellOrderRequest - 2, // 21: regen.ecocredit.marketplace.v1.Query.SellOrders:input_type -> regen.ecocredit.marketplace.v1.QuerySellOrdersRequest - 4, // 22: regen.ecocredit.marketplace.v1.Query.SellOrdersByBatchDenom:input_type -> regen.ecocredit.marketplace.v1.QuerySellOrdersByBatchDenomRequest - 6, // 23: regen.ecocredit.marketplace.v1.Query.SellOrdersByAddress:input_type -> regen.ecocredit.marketplace.v1.QuerySellOrdersByAddressRequest - 8, // 24: regen.ecocredit.marketplace.v1.Query.BuyOrder:input_type -> regen.ecocredit.marketplace.v1.QueryBuyOrderRequest - 10, // 25: regen.ecocredit.marketplace.v1.Query.BuyOrders:input_type -> regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest - 12, // 26: regen.ecocredit.marketplace.v1.Query.BuyOrdersByAddress:input_type -> regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest - 14, // 27: regen.ecocredit.marketplace.v1.Query.AllowedDenoms:input_type -> regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest - 1, // 28: regen.ecocredit.marketplace.v1.Query.SellOrder:output_type -> regen.ecocredit.marketplace.v1.QuerySellOrderResponse - 3, // 29: regen.ecocredit.marketplace.v1.Query.SellOrders:output_type -> regen.ecocredit.marketplace.v1.QuerySellOrdersResponse - 5, // 30: regen.ecocredit.marketplace.v1.Query.SellOrdersByBatchDenom:output_type -> regen.ecocredit.marketplace.v1.QuerySellOrdersByBatchDenomResponse - 7, // 31: regen.ecocredit.marketplace.v1.Query.SellOrdersByAddress:output_type -> regen.ecocredit.marketplace.v1.QuerySellOrdersByAddressResponse - 9, // 32: regen.ecocredit.marketplace.v1.Query.BuyOrder:output_type -> regen.ecocredit.marketplace.v1.QueryBuyOrderResponse - 11, // 33: regen.ecocredit.marketplace.v1.Query.BuyOrders:output_type -> regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse - 13, // 34: regen.ecocredit.marketplace.v1.Query.BuyOrdersByAddress:output_type -> regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse - 15, // 35: regen.ecocredit.marketplace.v1.Query.AllowedDenoms:output_type -> regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse - 28, // [28:36] is the sub-list for method output_type - 20, // [20:28] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 10, // 0: regen.ecocredit.marketplace.v1.QuerySellOrderResponse.sell_order:type_name -> regen.ecocredit.marketplace.v1.SellOrder + 11, // 1: regen.ecocredit.marketplace.v1.QuerySellOrdersRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 10, // 2: regen.ecocredit.marketplace.v1.QuerySellOrdersResponse.sell_orders:type_name -> regen.ecocredit.marketplace.v1.SellOrder + 12, // 3: regen.ecocredit.marketplace.v1.QuerySellOrdersResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 11, // 4: regen.ecocredit.marketplace.v1.QuerySellOrdersByBatchDenomRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 10, // 5: regen.ecocredit.marketplace.v1.QuerySellOrdersByBatchDenomResponse.sell_orders:type_name -> regen.ecocredit.marketplace.v1.SellOrder + 12, // 6: regen.ecocredit.marketplace.v1.QuerySellOrdersByBatchDenomResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 11, // 7: regen.ecocredit.marketplace.v1.QuerySellOrdersByAddressRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 10, // 8: regen.ecocredit.marketplace.v1.QuerySellOrdersByAddressResponse.sell_orders:type_name -> regen.ecocredit.marketplace.v1.SellOrder + 12, // 9: regen.ecocredit.marketplace.v1.QuerySellOrdersByAddressResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 11, // 10: regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 13, // 11: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.allowed_denoms:type_name -> regen.ecocredit.marketplace.v1.AllowedDenom + 12, // 12: regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 0, // 13: regen.ecocredit.marketplace.v1.Query.SellOrder:input_type -> regen.ecocredit.marketplace.v1.QuerySellOrderRequest + 2, // 14: regen.ecocredit.marketplace.v1.Query.SellOrders:input_type -> regen.ecocredit.marketplace.v1.QuerySellOrdersRequest + 4, // 15: regen.ecocredit.marketplace.v1.Query.SellOrdersByBatchDenom:input_type -> regen.ecocredit.marketplace.v1.QuerySellOrdersByBatchDenomRequest + 6, // 16: regen.ecocredit.marketplace.v1.Query.SellOrdersByAddress:input_type -> regen.ecocredit.marketplace.v1.QuerySellOrdersByAddressRequest + 8, // 17: regen.ecocredit.marketplace.v1.Query.AllowedDenoms:input_type -> regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest + 1, // 18: regen.ecocredit.marketplace.v1.Query.SellOrder:output_type -> regen.ecocredit.marketplace.v1.QuerySellOrderResponse + 3, // 19: regen.ecocredit.marketplace.v1.Query.SellOrders:output_type -> regen.ecocredit.marketplace.v1.QuerySellOrdersResponse + 5, // 20: regen.ecocredit.marketplace.v1.Query.SellOrdersByBatchDenom:output_type -> regen.ecocredit.marketplace.v1.QuerySellOrdersByBatchDenomResponse + 7, // 21: regen.ecocredit.marketplace.v1.Query.SellOrdersByAddress:output_type -> regen.ecocredit.marketplace.v1.QuerySellOrdersByAddressResponse + 9, // 22: regen.ecocredit.marketplace.v1.Query.AllowedDenoms:output_type -> regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse + 18, // [18:23] is the sub-list for method output_type + 13, // [13:18] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_regen_ecocredit_marketplace_v1_query_proto_init() } @@ -9077,78 +5805,6 @@ func file_regen_ecocredit_marketplace_v1_query_proto_init() { } } file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBuyOrderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBuyOrderResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBuyOrdersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBuyOrdersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBuyOrdersByAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBuyOrdersByAddressResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAllowedDenomsRequest); i { case 0: return &v.state @@ -9160,7 +5816,7 @@ func file_regen_ecocredit_marketplace_v1_query_proto_init() { return nil } } - file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_regen_ecocredit_marketplace_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAllowedDenomsResponse); i { case 0: return &v.state @@ -9179,7 +5835,7 @@ func file_regen_ecocredit_marketplace_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_regen_ecocredit_marketplace_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 16, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/api/regen/ecocredit/marketplace/v1/query_grpc.pb.go b/api/regen/ecocredit/marketplace/v1/query_grpc.pb.go index f3df31663b..892cc90934 100644 --- a/api/regen/ecocredit/marketplace/v1/query_grpc.pb.go +++ b/api/regen/ecocredit/marketplace/v1/query_grpc.pb.go @@ -32,13 +32,6 @@ type QueryClient interface { // SellOrdersByAddress queries a paginated list of all sell orders from a // specific address SellOrdersByAddress(ctx context.Context, in *QuerySellOrdersByAddressRequest, opts ...grpc.CallOption) (*QuerySellOrdersByAddressResponse, error) - // BuyOrder queries a buy order by its id - BuyOrder(ctx context.Context, in *QueryBuyOrderRequest, opts ...grpc.CallOption) (*QueryBuyOrderResponse, error) - // BuyOrders queries a paginated list of all buy orders - BuyOrders(ctx context.Context, in *QueryBuyOrdersRequest, opts ...grpc.CallOption) (*QueryBuyOrdersResponse, error) - // BuyOrdersByAddress queries a paginated list of buy orders by creator - // address - BuyOrdersByAddress(ctx context.Context, in *QueryBuyOrdersByAddressRequest, opts ...grpc.CallOption) (*QueryBuyOrdersByAddressResponse, error) // AllowedDenoms queries all denoms allowed to be set in the AskPrice of a // sell order AllowedDenoms(ctx context.Context, in *QueryAllowedDenomsRequest, opts ...grpc.CallOption) (*QueryAllowedDenomsResponse, error) @@ -88,33 +81,6 @@ func (c *queryClient) SellOrdersByAddress(ctx context.Context, in *QuerySellOrde return out, nil } -func (c *queryClient) BuyOrder(ctx context.Context, in *QueryBuyOrderRequest, opts ...grpc.CallOption) (*QueryBuyOrderResponse, error) { - out := new(QueryBuyOrderResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.marketplace.v1.Query/BuyOrder", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) BuyOrders(ctx context.Context, in *QueryBuyOrdersRequest, opts ...grpc.CallOption) (*QueryBuyOrdersResponse, error) { - out := new(QueryBuyOrdersResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.marketplace.v1.Query/BuyOrders", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) BuyOrdersByAddress(ctx context.Context, in *QueryBuyOrdersByAddressRequest, opts ...grpc.CallOption) (*QueryBuyOrdersByAddressResponse, error) { - out := new(QueryBuyOrdersByAddressResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.marketplace.v1.Query/BuyOrdersByAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) AllowedDenoms(ctx context.Context, in *QueryAllowedDenomsRequest, opts ...grpc.CallOption) (*QueryAllowedDenomsResponse, error) { out := new(QueryAllowedDenomsResponse) err := c.cc.Invoke(ctx, "/regen.ecocredit.marketplace.v1.Query/AllowedDenoms", in, out, opts...) @@ -138,13 +104,6 @@ type QueryServer interface { // SellOrdersByAddress queries a paginated list of all sell orders from a // specific address SellOrdersByAddress(context.Context, *QuerySellOrdersByAddressRequest) (*QuerySellOrdersByAddressResponse, error) - // BuyOrder queries a buy order by its id - BuyOrder(context.Context, *QueryBuyOrderRequest) (*QueryBuyOrderResponse, error) - // BuyOrders queries a paginated list of all buy orders - BuyOrders(context.Context, *QueryBuyOrdersRequest) (*QueryBuyOrdersResponse, error) - // BuyOrdersByAddress queries a paginated list of buy orders by creator - // address - BuyOrdersByAddress(context.Context, *QueryBuyOrdersByAddressRequest) (*QueryBuyOrdersByAddressResponse, error) // AllowedDenoms queries all denoms allowed to be set in the AskPrice of a // sell order AllowedDenoms(context.Context, *QueryAllowedDenomsRequest) (*QueryAllowedDenomsResponse, error) @@ -167,15 +126,6 @@ func (UnimplementedQueryServer) SellOrdersByBatchDenom(context.Context, *QuerySe func (UnimplementedQueryServer) SellOrdersByAddress(context.Context, *QuerySellOrdersByAddressRequest) (*QuerySellOrdersByAddressResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SellOrdersByAddress not implemented") } -func (UnimplementedQueryServer) BuyOrder(context.Context, *QueryBuyOrderRequest) (*QueryBuyOrderResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BuyOrder not implemented") -} -func (UnimplementedQueryServer) BuyOrders(context.Context, *QueryBuyOrdersRequest) (*QueryBuyOrdersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BuyOrders not implemented") -} -func (UnimplementedQueryServer) BuyOrdersByAddress(context.Context, *QueryBuyOrdersByAddressRequest) (*QueryBuyOrdersByAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BuyOrdersByAddress not implemented") -} func (UnimplementedQueryServer) AllowedDenoms(context.Context, *QueryAllowedDenomsRequest) (*QueryAllowedDenomsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllowedDenoms not implemented") } @@ -264,60 +214,6 @@ func _Query_SellOrdersByAddress_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } -func _Query_BuyOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBuyOrderRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BuyOrder(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.marketplace.v1.Query/BuyOrder", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BuyOrder(ctx, req.(*QueryBuyOrderRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_BuyOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBuyOrdersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BuyOrders(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.marketplace.v1.Query/BuyOrders", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BuyOrders(ctx, req.(*QueryBuyOrdersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_BuyOrdersByAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBuyOrdersByAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BuyOrdersByAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.marketplace.v1.Query/BuyOrdersByAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BuyOrdersByAddress(ctx, req.(*QueryBuyOrdersByAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_AllowedDenoms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryAllowedDenomsRequest) if err := dec(in); err != nil { @@ -359,18 +255,6 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "SellOrdersByAddress", Handler: _Query_SellOrdersByAddress_Handler, }, - { - MethodName: "BuyOrder", - Handler: _Query_BuyOrder_Handler, - }, - { - MethodName: "BuyOrders", - Handler: _Query_BuyOrders_Handler, - }, - { - MethodName: "BuyOrdersByAddress", - Handler: _Query_BuyOrdersByAddress_Handler, - }, { MethodName: "AllowedDenoms", Handler: _Query_AllowedDenoms_Handler, diff --git a/api/regen/ecocredit/marketplace/v1/state.cosmos_orm.go b/api/regen/ecocredit/marketplace/v1/state.cosmos_orm.go index 2346d26c5c..9903830e17 100644 --- a/api/regen/ecocredit/marketplace/v1/state.cosmos_orm.go +++ b/api/regen/ecocredit/marketplace/v1/state.cosmos_orm.go @@ -168,151 +168,6 @@ func NewSellOrderTable(db ormtable.Schema) (SellOrderTable, error) { return sellOrderTable{table.(ormtable.AutoIncrementTable)}, nil } -type BuyOrderTable interface { - Insert(ctx context.Context, buyOrder *BuyOrder) error - InsertReturningID(ctx context.Context, buyOrder *BuyOrder) (uint64, error) - Update(ctx context.Context, buyOrder *BuyOrder) error - Save(ctx context.Context, buyOrder *BuyOrder) error - Delete(ctx context.Context, buyOrder *BuyOrder) error - Has(ctx context.Context, id uint64) (found bool, err error) - // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - Get(ctx context.Context, id uint64) (*BuyOrder, error) - List(ctx context.Context, prefixKey BuyOrderIndexKey, opts ...ormlist.Option) (BuyOrderIterator, error) - ListRange(ctx context.Context, from, to BuyOrderIndexKey, opts ...ormlist.Option) (BuyOrderIterator, error) - DeleteBy(ctx context.Context, prefixKey BuyOrderIndexKey) error - DeleteRange(ctx context.Context, from, to BuyOrderIndexKey) error - - doNotImplement() -} - -type BuyOrderIterator struct { - ormtable.Iterator -} - -func (i BuyOrderIterator) Value() (*BuyOrder, error) { - var buyOrder BuyOrder - err := i.UnmarshalMessage(&buyOrder) - return &buyOrder, err -} - -type BuyOrderIndexKey interface { - id() uint32 - values() []interface{} - buyOrderIndexKey() -} - -// primary key starting index.. -type BuyOrderPrimaryKey = BuyOrderIdIndexKey - -type BuyOrderIdIndexKey struct { - vs []interface{} -} - -func (x BuyOrderIdIndexKey) id() uint32 { return 0 } -func (x BuyOrderIdIndexKey) values() []interface{} { return x.vs } -func (x BuyOrderIdIndexKey) buyOrderIndexKey() {} - -func (this BuyOrderIdIndexKey) WithId(id uint64) BuyOrderIdIndexKey { - this.vs = []interface{}{id} - return this -} - -type BuyOrderBuyerIndexKey struct { - vs []interface{} -} - -func (x BuyOrderBuyerIndexKey) id() uint32 { return 1 } -func (x BuyOrderBuyerIndexKey) values() []interface{} { return x.vs } -func (x BuyOrderBuyerIndexKey) buyOrderIndexKey() {} - -func (this BuyOrderBuyerIndexKey) WithBuyer(buyer []byte) BuyOrderBuyerIndexKey { - this.vs = []interface{}{buyer} - return this -} - -type BuyOrderExpirationIndexKey struct { - vs []interface{} -} - -func (x BuyOrderExpirationIndexKey) id() uint32 { return 2 } -func (x BuyOrderExpirationIndexKey) values() []interface{} { return x.vs } -func (x BuyOrderExpirationIndexKey) buyOrderIndexKey() {} - -func (this BuyOrderExpirationIndexKey) WithExpiration(expiration *timestamppb.Timestamp) BuyOrderExpirationIndexKey { - this.vs = []interface{}{expiration} - return this -} - -type buyOrderTable struct { - table ormtable.AutoIncrementTable -} - -func (this buyOrderTable) Insert(ctx context.Context, buyOrder *BuyOrder) error { - return this.table.Insert(ctx, buyOrder) -} - -func (this buyOrderTable) Update(ctx context.Context, buyOrder *BuyOrder) error { - return this.table.Update(ctx, buyOrder) -} - -func (this buyOrderTable) Save(ctx context.Context, buyOrder *BuyOrder) error { - return this.table.Save(ctx, buyOrder) -} - -func (this buyOrderTable) Delete(ctx context.Context, buyOrder *BuyOrder) error { - return this.table.Delete(ctx, buyOrder) -} - -func (this buyOrderTable) InsertReturningID(ctx context.Context, buyOrder *BuyOrder) (uint64, error) { - return this.table.InsertReturningID(ctx, buyOrder) -} - -func (this buyOrderTable) Has(ctx context.Context, id uint64) (found bool, err error) { - return this.table.PrimaryKey().Has(ctx, id) -} - -func (this buyOrderTable) Get(ctx context.Context, id uint64) (*BuyOrder, error) { - var buyOrder BuyOrder - found, err := this.table.PrimaryKey().Get(ctx, &buyOrder, id) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &buyOrder, nil -} - -func (this buyOrderTable) List(ctx context.Context, prefixKey BuyOrderIndexKey, opts ...ormlist.Option) (BuyOrderIterator, error) { - it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return BuyOrderIterator{it}, err -} - -func (this buyOrderTable) ListRange(ctx context.Context, from, to BuyOrderIndexKey, opts ...ormlist.Option) (BuyOrderIterator, error) { - it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return BuyOrderIterator{it}, err -} - -func (this buyOrderTable) DeleteBy(ctx context.Context, prefixKey BuyOrderIndexKey) error { - return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) -} - -func (this buyOrderTable) DeleteRange(ctx context.Context, from, to BuyOrderIndexKey) error { - return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) -} - -func (this buyOrderTable) doNotImplement() {} - -var _ BuyOrderTable = buyOrderTable{} - -func NewBuyOrderTable(db ormtable.Schema) (BuyOrderTable, error) { - table := db.GetTable(&BuyOrder{}) - if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&BuyOrder{}).ProtoReflect().Descriptor().FullName())) - } - return buyOrderTable{table.(ormtable.AutoIncrementTable)}, nil -} - type AllowedDenomTable interface { Insert(ctx context.Context, allowedDenom *AllowedDenom) error Update(ctx context.Context, allowedDenom *AllowedDenom) error @@ -627,7 +482,6 @@ func NewMarketTable(db ormtable.Schema) (MarketTable, error) { type StateStore interface { SellOrderTable() SellOrderTable - BuyOrderTable() BuyOrderTable AllowedDenomTable() AllowedDenomTable MarketTable() MarketTable @@ -636,7 +490,6 @@ type StateStore interface { type stateStore struct { sellOrder SellOrderTable - buyOrder BuyOrderTable allowedDenom AllowedDenomTable market MarketTable } @@ -645,10 +498,6 @@ func (x stateStore) SellOrderTable() SellOrderTable { return x.sellOrder } -func (x stateStore) BuyOrderTable() BuyOrderTable { - return x.buyOrder -} - func (x stateStore) AllowedDenomTable() AllowedDenomTable { return x.allowedDenom } @@ -667,11 +516,6 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) { return nil, err } - buyOrderTable, err := NewBuyOrderTable(db) - if err != nil { - return nil, err - } - allowedDenomTable, err := NewAllowedDenomTable(db) if err != nil { return nil, err @@ -684,7 +528,6 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) { return stateStore{ sellOrderTable, - buyOrderTable, allowedDenomTable, marketTable, }, nil diff --git a/api/regen/ecocredit/marketplace/v1/state.pulsar.go b/api/regen/ecocredit/marketplace/v1/state.pulsar.go index 9a124e0638..98bb97547c 100644 --- a/api/regen/ecocredit/marketplace/v1/state.pulsar.go +++ b/api/regen/ecocredit/marketplace/v1/state.pulsar.go @@ -895,1510 +895,6 @@ func (x *fastReflection_SellOrder) ProtoMethods() *protoiface.Methods { } } -var ( - md_BuyOrder protoreflect.MessageDescriptor - fd_BuyOrder_id protoreflect.FieldDescriptor - fd_BuyOrder_buyer protoreflect.FieldDescriptor - fd_BuyOrder_selection protoreflect.FieldDescriptor - fd_BuyOrder_quantity protoreflect.FieldDescriptor - fd_BuyOrder_market_id protoreflect.FieldDescriptor - fd_BuyOrder_bid_price protoreflect.FieldDescriptor - fd_BuyOrder_disable_auto_retire protoreflect.FieldDescriptor - fd_BuyOrder_disable_partial_fill protoreflect.FieldDescriptor - fd_BuyOrder_expiration protoreflect.FieldDescriptor - fd_BuyOrder_maker protoreflect.FieldDescriptor -) - -func init() { - file_regen_ecocredit_marketplace_v1_state_proto_init() - md_BuyOrder = File_regen_ecocredit_marketplace_v1_state_proto.Messages().ByName("BuyOrder") - fd_BuyOrder_id = md_BuyOrder.Fields().ByName("id") - fd_BuyOrder_buyer = md_BuyOrder.Fields().ByName("buyer") - fd_BuyOrder_selection = md_BuyOrder.Fields().ByName("selection") - fd_BuyOrder_quantity = md_BuyOrder.Fields().ByName("quantity") - fd_BuyOrder_market_id = md_BuyOrder.Fields().ByName("market_id") - fd_BuyOrder_bid_price = md_BuyOrder.Fields().ByName("bid_price") - fd_BuyOrder_disable_auto_retire = md_BuyOrder.Fields().ByName("disable_auto_retire") - fd_BuyOrder_disable_partial_fill = md_BuyOrder.Fields().ByName("disable_partial_fill") - fd_BuyOrder_expiration = md_BuyOrder.Fields().ByName("expiration") - fd_BuyOrder_maker = md_BuyOrder.Fields().ByName("maker") -} - -var _ protoreflect.Message = (*fastReflection_BuyOrder)(nil) - -type fastReflection_BuyOrder BuyOrder - -func (x *BuyOrder) ProtoReflect() protoreflect.Message { - return (*fastReflection_BuyOrder)(x) -} - -func (x *BuyOrder) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_BuyOrder_messageType fastReflection_BuyOrder_messageType -var _ protoreflect.MessageType = fastReflection_BuyOrder_messageType{} - -type fastReflection_BuyOrder_messageType struct{} - -func (x fastReflection_BuyOrder_messageType) Zero() protoreflect.Message { - return (*fastReflection_BuyOrder)(nil) -} -func (x fastReflection_BuyOrder_messageType) New() protoreflect.Message { - return new(fastReflection_BuyOrder) -} -func (x fastReflection_BuyOrder_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BuyOrder -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BuyOrder) Descriptor() protoreflect.MessageDescriptor { - return md_BuyOrder -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_BuyOrder) Type() protoreflect.MessageType { - return _fastReflection_BuyOrder_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BuyOrder) New() protoreflect.Message { - return new(fastReflection_BuyOrder) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BuyOrder) Interface() protoreflect.ProtoMessage { - return (*BuyOrder)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_BuyOrder) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != uint64(0) { - value := protoreflect.ValueOfUint64(x.Id) - if !f(fd_BuyOrder_id, value) { - return - } - } - if len(x.Buyer) != 0 { - value := protoreflect.ValueOfBytes(x.Buyer) - if !f(fd_BuyOrder_buyer, value) { - return - } - } - if x.Selection != nil { - value := protoreflect.ValueOfMessage(x.Selection.ProtoReflect()) - if !f(fd_BuyOrder_selection, value) { - return - } - } - if x.Quantity != "" { - value := protoreflect.ValueOfString(x.Quantity) - if !f(fd_BuyOrder_quantity, value) { - return - } - } - if x.MarketId != uint64(0) { - value := protoreflect.ValueOfUint64(x.MarketId) - if !f(fd_BuyOrder_market_id, value) { - return - } - } - if x.BidPrice != "" { - value := protoreflect.ValueOfString(x.BidPrice) - if !f(fd_BuyOrder_bid_price, value) { - return - } - } - if x.DisableAutoRetire != false { - value := protoreflect.ValueOfBool(x.DisableAutoRetire) - if !f(fd_BuyOrder_disable_auto_retire, value) { - return - } - } - if x.DisablePartialFill != false { - value := protoreflect.ValueOfBool(x.DisablePartialFill) - if !f(fd_BuyOrder_disable_partial_fill, value) { - return - } - } - if x.Expiration != nil { - value := protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) - if !f(fd_BuyOrder_expiration, value) { - return - } - } - if x.Maker != false { - value := protoreflect.ValueOfBool(x.Maker) - if !f(fd_BuyOrder_maker, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_BuyOrder) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.BuyOrder.id": - return x.Id != uint64(0) - case "regen.ecocredit.marketplace.v1.BuyOrder.buyer": - return len(x.Buyer) != 0 - case "regen.ecocredit.marketplace.v1.BuyOrder.selection": - return x.Selection != nil - case "regen.ecocredit.marketplace.v1.BuyOrder.quantity": - return x.Quantity != "" - case "regen.ecocredit.marketplace.v1.BuyOrder.market_id": - return x.MarketId != uint64(0) - case "regen.ecocredit.marketplace.v1.BuyOrder.bid_price": - return x.BidPrice != "" - case "regen.ecocredit.marketplace.v1.BuyOrder.disable_auto_retire": - return x.DisableAutoRetire != false - case "regen.ecocredit.marketplace.v1.BuyOrder.disable_partial_fill": - return x.DisablePartialFill != false - case "regen.ecocredit.marketplace.v1.BuyOrder.expiration": - return x.Expiration != nil - case "regen.ecocredit.marketplace.v1.BuyOrder.maker": - return x.Maker != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BuyOrder")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BuyOrder does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BuyOrder) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.BuyOrder.id": - x.Id = uint64(0) - case "regen.ecocredit.marketplace.v1.BuyOrder.buyer": - x.Buyer = nil - case "regen.ecocredit.marketplace.v1.BuyOrder.selection": - x.Selection = nil - case "regen.ecocredit.marketplace.v1.BuyOrder.quantity": - x.Quantity = "" - case "regen.ecocredit.marketplace.v1.BuyOrder.market_id": - x.MarketId = uint64(0) - case "regen.ecocredit.marketplace.v1.BuyOrder.bid_price": - x.BidPrice = "" - case "regen.ecocredit.marketplace.v1.BuyOrder.disable_auto_retire": - x.DisableAutoRetire = false - case "regen.ecocredit.marketplace.v1.BuyOrder.disable_partial_fill": - x.DisablePartialFill = false - case "regen.ecocredit.marketplace.v1.BuyOrder.expiration": - x.Expiration = nil - case "regen.ecocredit.marketplace.v1.BuyOrder.maker": - x.Maker = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BuyOrder")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BuyOrder does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_BuyOrder) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.BuyOrder.id": - value := x.Id - return protoreflect.ValueOfUint64(value) - case "regen.ecocredit.marketplace.v1.BuyOrder.buyer": - value := x.Buyer - return protoreflect.ValueOfBytes(value) - case "regen.ecocredit.marketplace.v1.BuyOrder.selection": - value := x.Selection - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.BuyOrder.quantity": - value := x.Quantity - return protoreflect.ValueOfString(value) - case "regen.ecocredit.marketplace.v1.BuyOrder.market_id": - value := x.MarketId - return protoreflect.ValueOfUint64(value) - case "regen.ecocredit.marketplace.v1.BuyOrder.bid_price": - value := x.BidPrice - return protoreflect.ValueOfString(value) - case "regen.ecocredit.marketplace.v1.BuyOrder.disable_auto_retire": - value := x.DisableAutoRetire - return protoreflect.ValueOfBool(value) - case "regen.ecocredit.marketplace.v1.BuyOrder.disable_partial_fill": - value := x.DisablePartialFill - return protoreflect.ValueOfBool(value) - case "regen.ecocredit.marketplace.v1.BuyOrder.expiration": - value := x.Expiration - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.BuyOrder.maker": - value := x.Maker - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BuyOrder")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BuyOrder does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BuyOrder) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.BuyOrder.id": - x.Id = value.Uint() - case "regen.ecocredit.marketplace.v1.BuyOrder.buyer": - x.Buyer = value.Bytes() - case "regen.ecocredit.marketplace.v1.BuyOrder.selection": - x.Selection = value.Message().Interface().(*BuyOrder_Selection) - case "regen.ecocredit.marketplace.v1.BuyOrder.quantity": - x.Quantity = value.Interface().(string) - case "regen.ecocredit.marketplace.v1.BuyOrder.market_id": - x.MarketId = value.Uint() - case "regen.ecocredit.marketplace.v1.BuyOrder.bid_price": - x.BidPrice = value.Interface().(string) - case "regen.ecocredit.marketplace.v1.BuyOrder.disable_auto_retire": - x.DisableAutoRetire = value.Bool() - case "regen.ecocredit.marketplace.v1.BuyOrder.disable_partial_fill": - x.DisablePartialFill = value.Bool() - case "regen.ecocredit.marketplace.v1.BuyOrder.expiration": - x.Expiration = value.Message().Interface().(*timestamppb.Timestamp) - case "regen.ecocredit.marketplace.v1.BuyOrder.maker": - x.Maker = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BuyOrder")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BuyOrder does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BuyOrder) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.BuyOrder.selection": - if x.Selection == nil { - x.Selection = new(BuyOrder_Selection) - } - return protoreflect.ValueOfMessage(x.Selection.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.BuyOrder.expiration": - if x.Expiration == nil { - x.Expiration = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.BuyOrder.id": - panic(fmt.Errorf("field id of message regen.ecocredit.marketplace.v1.BuyOrder is not mutable")) - case "regen.ecocredit.marketplace.v1.BuyOrder.buyer": - panic(fmt.Errorf("field buyer of message regen.ecocredit.marketplace.v1.BuyOrder is not mutable")) - case "regen.ecocredit.marketplace.v1.BuyOrder.quantity": - panic(fmt.Errorf("field quantity of message regen.ecocredit.marketplace.v1.BuyOrder is not mutable")) - case "regen.ecocredit.marketplace.v1.BuyOrder.market_id": - panic(fmt.Errorf("field market_id of message regen.ecocredit.marketplace.v1.BuyOrder is not mutable")) - case "regen.ecocredit.marketplace.v1.BuyOrder.bid_price": - panic(fmt.Errorf("field bid_price of message regen.ecocredit.marketplace.v1.BuyOrder is not mutable")) - case "regen.ecocredit.marketplace.v1.BuyOrder.disable_auto_retire": - panic(fmt.Errorf("field disable_auto_retire of message regen.ecocredit.marketplace.v1.BuyOrder is not mutable")) - case "regen.ecocredit.marketplace.v1.BuyOrder.disable_partial_fill": - panic(fmt.Errorf("field disable_partial_fill of message regen.ecocredit.marketplace.v1.BuyOrder is not mutable")) - case "regen.ecocredit.marketplace.v1.BuyOrder.maker": - panic(fmt.Errorf("field maker of message regen.ecocredit.marketplace.v1.BuyOrder is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BuyOrder")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BuyOrder does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_BuyOrder) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.BuyOrder.id": - return protoreflect.ValueOfUint64(uint64(0)) - case "regen.ecocredit.marketplace.v1.BuyOrder.buyer": - return protoreflect.ValueOfBytes(nil) - case "regen.ecocredit.marketplace.v1.BuyOrder.selection": - m := new(BuyOrder_Selection) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.BuyOrder.quantity": - return protoreflect.ValueOfString("") - case "regen.ecocredit.marketplace.v1.BuyOrder.market_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "regen.ecocredit.marketplace.v1.BuyOrder.bid_price": - return protoreflect.ValueOfString("") - case "regen.ecocredit.marketplace.v1.BuyOrder.disable_auto_retire": - return protoreflect.ValueOfBool(false) - case "regen.ecocredit.marketplace.v1.BuyOrder.disable_partial_fill": - return protoreflect.ValueOfBool(false) - case "regen.ecocredit.marketplace.v1.BuyOrder.expiration": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.BuyOrder.maker": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BuyOrder")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BuyOrder does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_BuyOrder) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.BuyOrder", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_BuyOrder) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BuyOrder) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_BuyOrder) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_BuyOrder) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BuyOrder) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.Buyer) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Selection != nil { - l = options.Size(x.Selection) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Quantity) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.MarketId != 0 { - n += 1 + runtime.Sov(uint64(x.MarketId)) - } - l = len(x.BidPrice) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.DisableAutoRetire { - n += 2 - } - if x.DisablePartialFill { - n += 2 - } - if x.Expiration != nil { - l = options.Size(x.Expiration) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Maker { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*BuyOrder) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Maker { - i-- - if x.Maker { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if x.Expiration != nil { - encoded, err := options.Marshal(x.Expiration) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - if x.DisablePartialFill { - i-- - if x.DisablePartialFill { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if x.DisableAutoRetire { - i-- - if x.DisableAutoRetire { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if len(x.BidPrice) > 0 { - i -= len(x.BidPrice) - copy(dAtA[i:], x.BidPrice) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BidPrice))) - i-- - dAtA[i] = 0x32 - } - if x.MarketId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MarketId)) - i-- - dAtA[i] = 0x28 - } - if len(x.Quantity) > 0 { - i -= len(x.Quantity) - copy(dAtA[i:], x.Quantity) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Quantity))) - i-- - dAtA[i] = 0x22 - } - if x.Selection != nil { - encoded, err := options.Marshal(x.Selection) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Buyer) > 0 { - i -= len(x.Buyer) - copy(dAtA[i:], x.Buyer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Buyer))) - i-- - dAtA[i] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*BuyOrder) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BuyOrder: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BuyOrder: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Buyer", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - 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.Buyer = append(x.Buyer[:0], dAtA[iNdEx:postIndex]...) - if x.Buyer == nil { - x.Buyer = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Selection", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Selection == nil { - x.Selection = &BuyOrder_Selection{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Selection); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Quantity", 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.Quantity = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) - } - x.MarketId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MarketId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BidPrice", 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.BidPrice = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DisableAutoRetire", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.DisableAutoRetire = bool(v != 0) - case 8: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DisablePartialFill", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.DisablePartialFill = bool(v != 0) - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Expiration == nil { - x.Expiration = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiration); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Maker", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Maker = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_BuyOrder_Selection protoreflect.MessageDescriptor - fd_BuyOrder_Selection_sell_order_id protoreflect.FieldDescriptor - fd_BuyOrder_Selection_filter protoreflect.FieldDescriptor -) - -func init() { - file_regen_ecocredit_marketplace_v1_state_proto_init() - md_BuyOrder_Selection = File_regen_ecocredit_marketplace_v1_state_proto.Messages().ByName("BuyOrder").Messages().ByName("Selection") - fd_BuyOrder_Selection_sell_order_id = md_BuyOrder_Selection.Fields().ByName("sell_order_id") - fd_BuyOrder_Selection_filter = md_BuyOrder_Selection.Fields().ByName("filter") -} - -var _ protoreflect.Message = (*fastReflection_BuyOrder_Selection)(nil) - -type fastReflection_BuyOrder_Selection BuyOrder_Selection - -func (x *BuyOrder_Selection) ProtoReflect() protoreflect.Message { - return (*fastReflection_BuyOrder_Selection)(x) -} - -func (x *BuyOrder_Selection) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_BuyOrder_Selection_messageType fastReflection_BuyOrder_Selection_messageType -var _ protoreflect.MessageType = fastReflection_BuyOrder_Selection_messageType{} - -type fastReflection_BuyOrder_Selection_messageType struct{} - -func (x fastReflection_BuyOrder_Selection_messageType) Zero() protoreflect.Message { - return (*fastReflection_BuyOrder_Selection)(nil) -} -func (x fastReflection_BuyOrder_Selection_messageType) New() protoreflect.Message { - return new(fastReflection_BuyOrder_Selection) -} -func (x fastReflection_BuyOrder_Selection_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BuyOrder_Selection -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BuyOrder_Selection) Descriptor() protoreflect.MessageDescriptor { - return md_BuyOrder_Selection -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_BuyOrder_Selection) Type() protoreflect.MessageType { - return _fastReflection_BuyOrder_Selection_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BuyOrder_Selection) New() protoreflect.Message { - return new(fastReflection_BuyOrder_Selection) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BuyOrder_Selection) Interface() protoreflect.ProtoMessage { - return (*BuyOrder_Selection)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_BuyOrder_Selection) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sum != nil { - switch o := x.Sum.(type) { - case *BuyOrder_Selection_SellOrderId: - v := o.SellOrderId - value := protoreflect.ValueOfUint64(v) - if !f(fd_BuyOrder_Selection_sell_order_id, value) { - return - } - case *BuyOrder_Selection_Filter: - v := o.Filter - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_BuyOrder_Selection_filter, value) { - return - } - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_BuyOrder_Selection) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.BuyOrder.Selection.sell_order_id": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*BuyOrder_Selection_SellOrderId); ok { - return true - } else { - return false - } - case "regen.ecocredit.marketplace.v1.BuyOrder.Selection.filter": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*BuyOrder_Selection_Filter); ok { - return true - } else { - return false - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BuyOrder.Selection")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BuyOrder.Selection does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BuyOrder_Selection) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.BuyOrder.Selection.sell_order_id": - x.Sum = nil - case "regen.ecocredit.marketplace.v1.BuyOrder.Selection.filter": - x.Sum = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BuyOrder.Selection")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BuyOrder.Selection does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_BuyOrder_Selection) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.BuyOrder.Selection.sell_order_id": - if x.Sum == nil { - return protoreflect.ValueOfUint64(uint64(0)) - } else if v, ok := x.Sum.(*BuyOrder_Selection_SellOrderId); ok { - return protoreflect.ValueOfUint64(v.SellOrderId) - } else { - return protoreflect.ValueOfUint64(uint64(0)) - } - case "regen.ecocredit.marketplace.v1.BuyOrder.Selection.filter": - if x.Sum == nil { - return protoreflect.ValueOfMessage((*Filter)(nil).ProtoReflect()) - } else if v, ok := x.Sum.(*BuyOrder_Selection_Filter); ok { - return protoreflect.ValueOfMessage(v.Filter.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*Filter)(nil).ProtoReflect()) - } - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BuyOrder.Selection")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BuyOrder.Selection does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BuyOrder_Selection) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.BuyOrder.Selection.sell_order_id": - cv := value.Uint() - x.Sum = &BuyOrder_Selection_SellOrderId{SellOrderId: cv} - case "regen.ecocredit.marketplace.v1.BuyOrder.Selection.filter": - cv := value.Message().Interface().(*Filter) - x.Sum = &BuyOrder_Selection_Filter{Filter: cv} - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BuyOrder.Selection")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BuyOrder.Selection does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BuyOrder_Selection) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.BuyOrder.Selection.filter": - if x.Sum == nil { - value := &Filter{} - oneofValue := &BuyOrder_Selection_Filter{Filter: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Sum.(type) { - case *BuyOrder_Selection_Filter: - return protoreflect.ValueOfMessage(m.Filter.ProtoReflect()) - default: - value := &Filter{} - oneofValue := &BuyOrder_Selection_Filter{Filter: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "regen.ecocredit.marketplace.v1.BuyOrder.Selection.sell_order_id": - panic(fmt.Errorf("field sell_order_id of message regen.ecocredit.marketplace.v1.BuyOrder.Selection is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BuyOrder.Selection")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BuyOrder.Selection does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_BuyOrder_Selection) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.BuyOrder.Selection.sell_order_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "regen.ecocredit.marketplace.v1.BuyOrder.Selection.filter": - value := &Filter{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BuyOrder.Selection")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BuyOrder.Selection does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_BuyOrder_Selection) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "regen.ecocredit.marketplace.v1.BuyOrder.Selection.sum": - if x.Sum == nil { - return nil - } - switch x.Sum.(type) { - case *BuyOrder_Selection_SellOrderId: - return x.Descriptor().Fields().ByName("sell_order_id") - case *BuyOrder_Selection_Filter: - return x.Descriptor().Fields().ByName("filter") - } - default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.BuyOrder.Selection", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_BuyOrder_Selection) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BuyOrder_Selection) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_BuyOrder_Selection) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_BuyOrder_Selection) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BuyOrder_Selection) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - switch x := x.Sum.(type) { - case *BuyOrder_Selection_SellOrderId: - if x == nil { - break - } - n += 1 + runtime.Sov(uint64(x.SellOrderId)) - case *BuyOrder_Selection_Filter: - if x == nil { - break - } - l = options.Size(x.Filter) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*BuyOrder_Selection) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - switch x := x.Sum.(type) { - case *BuyOrder_Selection_SellOrderId: - i = runtime.EncodeVarint(dAtA, i, uint64(x.SellOrderId)) - i-- - dAtA[i] = 0x8 - case *BuyOrder_Selection_Filter: - encoded, err := options.Marshal(x.Filter) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*BuyOrder_Selection) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BuyOrder_Selection: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BuyOrder_Selection: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SellOrderId", wireType) - } - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Sum = &BuyOrder_Selection_SellOrderId{v} - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - v := &Filter{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Sum = &BuyOrder_Selection_Filter{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - var ( md_AllowedDenom protoreflect.MessageDescriptor fd_AllowedDenom_bank_denom protoreflect.FieldDescriptor @@ -2423,7 +919,7 @@ func (x *AllowedDenom) ProtoReflect() protoreflect.Message { } func (x *AllowedDenom) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[2] + mi := &file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2957,7 +1453,7 @@ func (x *Market) ProtoReflect() protoreflect.Message { } func (x *Market) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[3] + mi := &file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3640,137 +2136,6 @@ func (x *SellOrder) GetMaker() bool { return false } -// BuyOrder represents the information for a buy order. -type BuyOrder struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // id is the unique ID of buy order. - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // buyer is the bytes address of the account that created the buy order - Buyer []byte `protobuf:"bytes,2,opt,name=buyer,proto3" json:"buyer,omitempty"` - // selection is the buy order selection. - Selection *BuyOrder_Selection `protobuf:"bytes,3,opt,name=selection,proto3" json:"selection,omitempty"` - // quantity is the decimal quantity of credits to buy. If the quantity of - // credits available is less than this amount the order will be partially - // filled unless disable_partial_fill is true. - Quantity string `protobuf:"bytes,4,opt,name=quantity,proto3" json:"quantity,omitempty"` - // market_id is the market in which this sell order exists and specifies - // the bank_denom that ask_price corresponds to. - MarketId uint64 `protobuf:"varint,5,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - // bid price is the integer bid price for this buy order. A credit unit will - // be settled at a purchase price that is no more than the bid price. The buy - // order will fail if the buyer does not have enough funds available to - // complete the purchase. - BidPrice string `protobuf:"bytes,6,opt,name=bid_price,json=bidPrice,proto3" json:"bid_price,omitempty"` - // disable_auto_retire allows auto-retirement to be disabled. If it is set to - // true the credits will not auto-retire and can be resold assuming that the - // corresponding sell order has auto-retirement disabled. If the sell order - // hasn't disabled auto-retirement and the buy order tries to disable it, - // that buy order will fail. - DisableAutoRetire bool `protobuf:"varint,7,opt,name=disable_auto_retire,json=disableAutoRetire,proto3" json:"disable_auto_retire,omitempty"` - // disable_partial_fill disables the default behavior of partially filling - // buy orders if the requested quantity is not available. - DisablePartialFill bool `protobuf:"varint,8,opt,name=disable_partial_fill,json=disablePartialFill,proto3" json:"disable_partial_fill,omitempty"` - // expiration is the optional timestamp when the buy order expires. When the - // expiration time is reached, the buy order is removed from state. - Expiration *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=expiration,proto3" json:"expiration,omitempty"` - // maker indicates that this is a maker order, meaning that when it hit - // the order book, there were no matching sell orders. - Maker bool `protobuf:"varint,10,opt,name=maker,proto3" json:"maker,omitempty"` -} - -func (x *BuyOrder) Reset() { - *x = BuyOrder{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BuyOrder) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BuyOrder) ProtoMessage() {} - -// Deprecated: Use BuyOrder.ProtoReflect.Descriptor instead. -func (*BuyOrder) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_state_proto_rawDescGZIP(), []int{1} -} - -func (x *BuyOrder) GetId() uint64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *BuyOrder) GetBuyer() []byte { - if x != nil { - return x.Buyer - } - return nil -} - -func (x *BuyOrder) GetSelection() *BuyOrder_Selection { - if x != nil { - return x.Selection - } - return nil -} - -func (x *BuyOrder) GetQuantity() string { - if x != nil { - return x.Quantity - } - return "" -} - -func (x *BuyOrder) GetMarketId() uint64 { - if x != nil { - return x.MarketId - } - return 0 -} - -func (x *BuyOrder) GetBidPrice() string { - if x != nil { - return x.BidPrice - } - return "" -} - -func (x *BuyOrder) GetDisableAutoRetire() bool { - if x != nil { - return x.DisableAutoRetire - } - return false -} - -func (x *BuyOrder) GetDisablePartialFill() bool { - if x != nil { - return x.DisablePartialFill - } - return false -} - -func (x *BuyOrder) GetExpiration() *timestamppb.Timestamp { - if x != nil { - return x.Expiration - } - return nil -} - -func (x *BuyOrder) GetMaker() bool { - if x != nil { - return x.Maker - } - return false -} - // AllowedDenom represents the information for an allowed ask/bid denom. type AllowedDenom struct { state protoimpl.MessageState @@ -3791,7 +2156,7 @@ type AllowedDenom struct { func (x *AllowedDenom) Reset() { *x = AllowedDenom{} if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[2] + mi := &file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3805,7 +2170,7 @@ func (*AllowedDenom) ProtoMessage() {} // Deprecated: Use AllowedDenom.ProtoReflect.Descriptor instead. func (*AllowedDenom) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_state_proto_rawDescGZIP(), []int{2} + return file_regen_ecocredit_marketplace_v1_state_proto_rawDescGZIP(), []int{1} } func (x *AllowedDenom) GetBankDenom() string { @@ -3880,7 +2245,7 @@ type Market struct { func (x *Market) Reset() { *x = Market{} if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[3] + mi := &file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3894,7 +2259,7 @@ func (*Market) ProtoMessage() {} // Deprecated: Use Market.ProtoReflect.Descriptor instead. func (*Market) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_state_proto_rawDescGZIP(), []int{3} + return file_regen_ecocredit_marketplace_v1_state_proto_rawDescGZIP(), []int{2} } func (x *Market) GetId() uint64 { @@ -3925,81 +2290,6 @@ func (x *Market) GetPrecisionModifier() uint32 { return 0 } -// Selection defines a buy order selection. -type BuyOrder_Selection struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sum defines the type of selection. - // - // Types that are assignable to Sum: - // *BuyOrder_Selection_SellOrderId - // *BuyOrder_Selection_Filter - Sum isBuyOrder_Selection_Sum `protobuf_oneof:"sum"` -} - -func (x *BuyOrder_Selection) Reset() { - *x = BuyOrder_Selection{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BuyOrder_Selection) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BuyOrder_Selection) ProtoMessage() {} - -// Deprecated: Use BuyOrder_Selection.ProtoReflect.Descriptor instead. -func (*BuyOrder_Selection) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_state_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *BuyOrder_Selection) GetSum() isBuyOrder_Selection_Sum { - if x != nil { - return x.Sum - } - return nil -} - -func (x *BuyOrder_Selection) GetSellOrderId() uint64 { - if x, ok := x.GetSum().(*BuyOrder_Selection_SellOrderId); ok { - return x.SellOrderId - } - return 0 -} - -func (x *BuyOrder_Selection) GetFilter() *Filter { - if x, ok := x.GetSum().(*BuyOrder_Selection_Filter); ok { - return x.Filter - } - return nil -} - -type isBuyOrder_Selection_Sum interface { - isBuyOrder_Selection_Sum() -} - -type BuyOrder_Selection_SellOrderId struct { - // sell_order_id is the sell order ID against which the buyer is trying to - // buy. When sell_order_id is set, this is known as a direct buy order - // because it is placed directly against a specific sell order. - SellOrderId uint64 `protobuf:"varint,1,opt,name=sell_order_id,json=sellOrderId,proto3,oneof"` -} - -type BuyOrder_Selection_Filter struct { - // filter selects credits to buy based upon the specified filter criteria. - Filter *Filter `protobuf:"bytes,2,opt,name=filter,proto3,oneof"` -} - -func (*BuyOrder_Selection_SellOrderId) isBuyOrder_Selection_Sum() {} - -func (*BuyOrder_Selection_Filter) isBuyOrder_Selection_Sum() {} - var File_regen_ecocredit_marketplace_v1_state_proto protoreflect.FileDescriptor var file_regen_ecocredit_marketplace_v1_state_proto_rawDesc = []byte{ @@ -4011,108 +2301,70 @@ var file_regen_ecocredit_marketplace_v1_state_proto_rawDesc = []byte{ 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 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, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe2, 0x02, 0x0a, 0x09, 0x53, 0x65, 0x6c, - 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x19, - 0x0a, 0x08, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x73, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, - 0x2e, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, - 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x74, 0x69, 0x72, 0x65, 0x12, - 0x3a, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 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, 0x52, - 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6d, - 0x61, 0x6b, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x61, 0x6b, 0x65, - 0x72, 0x3a, 0x3a, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x34, 0x0a, 0x06, 0x0a, 0x02, 0x69, 0x64, 0x10, - 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x10, 0x01, 0x12, - 0x0a, 0x0a, 0x06, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x65, - 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x03, 0x18, 0x01, 0x22, 0xb5, 0x04, - 0x0a, 0x08, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x75, - 0x79, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, - 0x12, 0x50, 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 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, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1b, - 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x62, - 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x62, 0x69, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x75, - 0x74, 0x6f, 0x52, 0x65, 0x74, 0x69, 0x72, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x6c, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, - 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x46, 0x69, 0x6c, 0x6c, 0x12, 0x3a, 0x0a, 0x0a, 0x65, 0x78, - 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 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, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x1a, 0x7a, 0x0a, 0x09, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x6c, - 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x48, 0x00, 0x52, 0x0b, 0x73, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x40, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, + 0x61, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe2, 0x02, 0x0a, + 0x09, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, + 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x65, 0x6c, 0x6c, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x73, 0x6b, 0x5f, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x73, 0x6b, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, + 0x75, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x74, + 0x69, 0x72, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x09, 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, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, + 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x3a, 0x3a, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x34, 0x0a, 0x06, 0x0a, + 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, + 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x10, 0x02, 0x12, + 0x0e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x03, 0x18, + 0x01, 0x22, 0x9b, 0x01, 0x0a, 0x0c, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x65, 0x6e, + 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x6e, 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, + 0x18, 0x01, 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, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x3a, 0x2b, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x25, 0x0a, 0x0c, 0x0a, 0x0a, 0x62, 0x61, + 0x6e, 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x13, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x10, 0x01, 0x18, 0x01, 0x18, 0x03, 0x22, + 0xb7, 0x01, 0x0a, 0x06, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, + 0x65, 0x64, 0x69, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, + 0x61, 0x6e, 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x62, 0x61, 0x6e, 0x6b, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x72, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x2e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, + 0x28, 0x0a, 0x06, 0x0a, 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x16, 0x63, 0x72, 0x65, + 0x64, 0x69, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x62, 0x61, 0x6e, 0x6b, 0x5f, 0x64, 0x65, + 0x6e, 0x6f, 0x6d, 0x10, 0x01, 0x18, 0x01, 0x18, 0x04, 0x42, 0xa3, 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, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x42, 0x05, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x3a, 0x2b, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x25, - 0x0a, 0x06, 0x0a, 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x62, 0x75, 0x79, 0x65, - 0x72, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x10, 0x02, 0x18, 0x02, 0x22, 0x9b, 0x01, 0x0a, 0x0c, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, - 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x6e, 0x6b, 0x5f, 0x64, - 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 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, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x65, 0x78, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x3a, 0x2b, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x25, 0x0a, 0x0c, - 0x0a, 0x0a, 0x62, 0x61, 0x6e, 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x13, 0x0a, 0x0d, - 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x10, 0x01, 0x18, - 0x01, 0x18, 0x03, 0x22, 0xb7, 0x01, 0x0a, 0x06, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, - 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x6e, 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x6e, 0x6b, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x2d, - 0x0a, 0x12, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x70, 0x72, 0x65, 0x63, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x2e, 0xf2, - 0x9e, 0xd3, 0x8e, 0x03, 0x28, 0x0a, 0x06, 0x0a, 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x1c, 0x0a, - 0x16, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x62, 0x61, 0x6e, - 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x10, 0x01, 0x18, 0x01, 0x18, 0x04, 0x42, 0xa3, 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, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 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, + 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 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 ( @@ -4127,26 +2379,20 @@ func file_regen_ecocredit_marketplace_v1_state_proto_rawDescGZIP() []byte { return file_regen_ecocredit_marketplace_v1_state_proto_rawDescData } -var file_regen_ecocredit_marketplace_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_regen_ecocredit_marketplace_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_regen_ecocredit_marketplace_v1_state_proto_goTypes = []interface{}{ (*SellOrder)(nil), // 0: regen.ecocredit.marketplace.v1.SellOrder - (*BuyOrder)(nil), // 1: regen.ecocredit.marketplace.v1.BuyOrder - (*AllowedDenom)(nil), // 2: regen.ecocredit.marketplace.v1.AllowedDenom - (*Market)(nil), // 3: regen.ecocredit.marketplace.v1.Market - (*BuyOrder_Selection)(nil), // 4: regen.ecocredit.marketplace.v1.BuyOrder.Selection - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - (*Filter)(nil), // 6: regen.ecocredit.marketplace.v1.Filter + (*AllowedDenom)(nil), // 1: regen.ecocredit.marketplace.v1.AllowedDenom + (*Market)(nil), // 2: regen.ecocredit.marketplace.v1.Market + (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp } var file_regen_ecocredit_marketplace_v1_state_proto_depIdxs = []int32{ - 5, // 0: regen.ecocredit.marketplace.v1.SellOrder.expiration:type_name -> google.protobuf.Timestamp - 4, // 1: regen.ecocredit.marketplace.v1.BuyOrder.selection:type_name -> regen.ecocredit.marketplace.v1.BuyOrder.Selection - 5, // 2: regen.ecocredit.marketplace.v1.BuyOrder.expiration:type_name -> google.protobuf.Timestamp - 6, // 3: regen.ecocredit.marketplace.v1.BuyOrder.Selection.filter:type_name -> regen.ecocredit.marketplace.v1.Filter - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 3, // 0: regen.ecocredit.marketplace.v1.SellOrder.expiration:type_name -> google.protobuf.Timestamp + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_regen_ecocredit_marketplace_v1_state_proto_init() } @@ -4154,7 +2400,6 @@ func file_regen_ecocredit_marketplace_v1_state_proto_init() { if File_regen_ecocredit_marketplace_v1_state_proto != nil { return } - file_regen_ecocredit_marketplace_v1_types_proto_init() if !protoimpl.UnsafeEnabled { file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SellOrder); i { @@ -4169,18 +2414,6 @@ func file_regen_ecocredit_marketplace_v1_state_proto_init() { } } file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BuyOrder); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AllowedDenom); i { case 0: return &v.state @@ -4192,7 +2425,7 @@ func file_regen_ecocredit_marketplace_v1_state_proto_init() { return nil } } - file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Market); i { case 0: return &v.state @@ -4204,22 +2437,6 @@ func file_regen_ecocredit_marketplace_v1_state_proto_init() { return nil } } - file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BuyOrder_Selection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_regen_ecocredit_marketplace_v1_state_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*BuyOrder_Selection_SellOrderId)(nil), - (*BuyOrder_Selection_Filter)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -4227,7 +2444,7 @@ func file_regen_ecocredit_marketplace_v1_state_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_regen_ecocredit_marketplace_v1_state_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/api/regen/ecocredit/marketplace/v1/tx.pulsar.go b/api/regen/ecocredit/marketplace/v1/tx.pulsar.go index b07cda67fe..8add238e36 100644 --- a/api/regen/ecocredit/marketplace/v1/tx.pulsar.go +++ b/api/regen/ecocredit/marketplace/v1/tx.pulsar.go @@ -4223,79 +4223,79 @@ func (x *fastReflection_MsgCancelSellOrderResponse) ProtoMethods() *protoiface.M } } -var _ protoreflect.List = (*_MsgBuy_2_list)(nil) +var _ protoreflect.List = (*_MsgBuyDirect_2_list)(nil) -type _MsgBuy_2_list struct { - list *[]*MsgBuy_Order +type _MsgBuyDirect_2_list struct { + list *[]*MsgBuyDirect_Order } -func (x *_MsgBuy_2_list) Len() int { +func (x *_MsgBuyDirect_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_MsgBuy_2_list) Get(i int) protoreflect.Value { +func (x *_MsgBuyDirect_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_MsgBuy_2_list) Set(i int, value protoreflect.Value) { +func (x *_MsgBuyDirect_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*MsgBuy_Order) + concreteValue := valueUnwrapped.Interface().(*MsgBuyDirect_Order) (*x.list)[i] = concreteValue } -func (x *_MsgBuy_2_list) Append(value protoreflect.Value) { +func (x *_MsgBuyDirect_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*MsgBuy_Order) + concreteValue := valueUnwrapped.Interface().(*MsgBuyDirect_Order) *x.list = append(*x.list, concreteValue) } -func (x *_MsgBuy_2_list) AppendMutable() protoreflect.Value { - v := new(MsgBuy_Order) +func (x *_MsgBuyDirect_2_list) AppendMutable() protoreflect.Value { + v := new(MsgBuyDirect_Order) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgBuy_2_list) Truncate(n int) { +func (x *_MsgBuyDirect_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_MsgBuy_2_list) NewElement() protoreflect.Value { - v := new(MsgBuy_Order) +func (x *_MsgBuyDirect_2_list) NewElement() protoreflect.Value { + v := new(MsgBuyDirect_Order) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgBuy_2_list) IsValid() bool { +func (x *_MsgBuyDirect_2_list) IsValid() bool { return x.list != nil } var ( - md_MsgBuy protoreflect.MessageDescriptor - fd_MsgBuy_buyer protoreflect.FieldDescriptor - fd_MsgBuy_orders protoreflect.FieldDescriptor + md_MsgBuyDirect protoreflect.MessageDescriptor + fd_MsgBuyDirect_buyer protoreflect.FieldDescriptor + fd_MsgBuyDirect_orders protoreflect.FieldDescriptor ) func init() { file_regen_ecocredit_marketplace_v1_tx_proto_init() - md_MsgBuy = File_regen_ecocredit_marketplace_v1_tx_proto.Messages().ByName("MsgBuy") - fd_MsgBuy_buyer = md_MsgBuy.Fields().ByName("buyer") - fd_MsgBuy_orders = md_MsgBuy.Fields().ByName("orders") + md_MsgBuyDirect = File_regen_ecocredit_marketplace_v1_tx_proto.Messages().ByName("MsgBuyDirect") + fd_MsgBuyDirect_buyer = md_MsgBuyDirect.Fields().ByName("buyer") + fd_MsgBuyDirect_orders = md_MsgBuyDirect.Fields().ByName("orders") } -var _ protoreflect.Message = (*fastReflection_MsgBuy)(nil) +var _ protoreflect.Message = (*fastReflection_MsgBuyDirect)(nil) -type fastReflection_MsgBuy MsgBuy +type fastReflection_MsgBuyDirect MsgBuyDirect -func (x *MsgBuy) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgBuy)(x) +func (x *MsgBuyDirect) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgBuyDirect)(x) } -func (x *MsgBuy) slowProtoReflect() protoreflect.Message { +func (x *MsgBuyDirect) slowProtoReflect() protoreflect.Message { mi := &file_regen_ecocredit_marketplace_v1_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4307,43 +4307,43 @@ func (x *MsgBuy) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgBuy_messageType fastReflection_MsgBuy_messageType -var _ protoreflect.MessageType = fastReflection_MsgBuy_messageType{} +var _fastReflection_MsgBuyDirect_messageType fastReflection_MsgBuyDirect_messageType +var _ protoreflect.MessageType = fastReflection_MsgBuyDirect_messageType{} -type fastReflection_MsgBuy_messageType struct{} +type fastReflection_MsgBuyDirect_messageType struct{} -func (x fastReflection_MsgBuy_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgBuy)(nil) +func (x fastReflection_MsgBuyDirect_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgBuyDirect)(nil) } -func (x fastReflection_MsgBuy_messageType) New() protoreflect.Message { - return new(fastReflection_MsgBuy) +func (x fastReflection_MsgBuyDirect_messageType) New() protoreflect.Message { + return new(fastReflection_MsgBuyDirect) } -func (x fastReflection_MsgBuy_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBuy +func (x fastReflection_MsgBuyDirect_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBuyDirect } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgBuy) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBuy +func (x *fastReflection_MsgBuyDirect) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBuyDirect } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgBuy) Type() protoreflect.MessageType { - return _fastReflection_MsgBuy_messageType +func (x *fastReflection_MsgBuyDirect) Type() protoreflect.MessageType { + return _fastReflection_MsgBuyDirect_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgBuy) New() protoreflect.Message { - return new(fastReflection_MsgBuy) +func (x *fastReflection_MsgBuyDirect) New() protoreflect.Message { + return new(fastReflection_MsgBuyDirect) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgBuy) Interface() protoreflect.ProtoMessage { - return (*MsgBuy)(x) +func (x *fastReflection_MsgBuyDirect) Interface() protoreflect.ProtoMessage { + return (*MsgBuyDirect)(x) } // Range iterates over every populated field in an undefined order, @@ -4351,16 +4351,16 @@ func (x *fastReflection_MsgBuy) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgBuy) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgBuyDirect) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Buyer != "" { value := protoreflect.ValueOfString(x.Buyer) - if !f(fd_MsgBuy_buyer, value) { + if !f(fd_MsgBuyDirect_buyer, value) { return } } if len(x.Orders) != 0 { - value := protoreflect.ValueOfList(&_MsgBuy_2_list{list: &x.Orders}) - if !f(fd_MsgBuy_orders, value) { + value := protoreflect.ValueOfList(&_MsgBuyDirect_2_list{list: &x.Orders}) + if !f(fd_MsgBuyDirect_orders, value) { return } } @@ -4377,17 +4377,17 @@ func (x *fastReflection_MsgBuy) Range(f func(protoreflect.FieldDescriptor, proto // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgBuy) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgBuyDirect) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.buyer": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.buyer": return x.Buyer != "" - case "regen.ecocredit.marketplace.v1.MsgBuy.orders": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.orders": return len(x.Orders) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirect does not contain field %s", fd.FullName())) } } @@ -4397,17 +4397,17 @@ func (x *fastReflection_MsgBuy) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBuy) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgBuyDirect) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.buyer": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.buyer": x.Buyer = "" - case "regen.ecocredit.marketplace.v1.MsgBuy.orders": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.orders": x.Orders = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirect does not contain field %s", fd.FullName())) } } @@ -4417,22 +4417,22 @@ func (x *fastReflection_MsgBuy) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgBuy) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgBuyDirect) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.buyer": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.buyer": value := x.Buyer return protoreflect.ValueOfString(value) - case "regen.ecocredit.marketplace.v1.MsgBuy.orders": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.orders": if len(x.Orders) == 0 { - return protoreflect.ValueOfList(&_MsgBuy_2_list{}) + return protoreflect.ValueOfList(&_MsgBuyDirect_2_list{}) } - listValue := &_MsgBuy_2_list{list: &x.Orders} + listValue := &_MsgBuyDirect_2_list{list: &x.Orders} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirect does not contain field %s", descriptor.FullName())) } } @@ -4446,19 +4446,19 @@ func (x *fastReflection_MsgBuy) Get(descriptor protoreflect.FieldDescriptor) pro // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBuy) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgBuyDirect) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.buyer": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.buyer": x.Buyer = value.Interface().(string) - case "regen.ecocredit.marketplace.v1.MsgBuy.orders": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.orders": lv := value.List() - clv := lv.(*_MsgBuy_2_list) + clv := lv.(*_MsgBuyDirect_2_list) x.Orders = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirect does not contain field %s", fd.FullName())) } } @@ -4472,49 +4472,49 @@ func (x *fastReflection_MsgBuy) Set(fd protoreflect.FieldDescriptor, value proto // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBuy) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgBuyDirect) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.orders": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.orders": if x.Orders == nil { - x.Orders = []*MsgBuy_Order{} + x.Orders = []*MsgBuyDirect_Order{} } - value := &_MsgBuy_2_list{list: &x.Orders} + value := &_MsgBuyDirect_2_list{list: &x.Orders} return protoreflect.ValueOfList(value) - case "regen.ecocredit.marketplace.v1.MsgBuy.buyer": - panic(fmt.Errorf("field buyer of message regen.ecocredit.marketplace.v1.MsgBuy is not mutable")) + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.buyer": + panic(fmt.Errorf("field buyer of message regen.ecocredit.marketplace.v1.MsgBuyDirect is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirect does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgBuy) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgBuyDirect) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.buyer": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.buyer": return protoreflect.ValueOfString("") - case "regen.ecocredit.marketplace.v1.MsgBuy.orders": - list := []*MsgBuy_Order{} - return protoreflect.ValueOfList(&_MsgBuy_2_list{list: &list}) + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.orders": + list := []*MsgBuyDirect_Order{} + return protoreflect.ValueOfList(&_MsgBuyDirect_2_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirect does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgBuy) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgBuyDirect) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.MsgBuy", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.MsgBuyDirect", d.FullName())) } panic("unreachable") } @@ -4522,7 +4522,7 @@ func (x *fastReflection_MsgBuy) WhichOneof(d protoreflect.OneofDescriptor) proto // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgBuy) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgBuyDirect) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4533,7 +4533,7 @@ func (x *fastReflection_MsgBuy) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBuy) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgBuyDirect) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4545,7 +4545,7 @@ func (x *fastReflection_MsgBuy) SetUnknown(fields protoreflect.RawFields) { // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_MsgBuy) IsValid() bool { +func (x *fastReflection_MsgBuyDirect) IsValid() bool { return x != nil } @@ -4555,9 +4555,9 @@ func (x *fastReflection_MsgBuy) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgBuy) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgBuyDirect) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgBuy) + x := input.Message.Interface().(*MsgBuyDirect) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4589,7 +4589,7 @@ func (x *fastReflection_MsgBuy) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgBuy) + x := input.Message.Interface().(*MsgBuyDirect) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4642,7 +4642,7 @@ func (x *fastReflection_MsgBuy) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgBuy) + x := input.Message.Interface().(*MsgBuyDirect) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4674,10 +4674,10 @@ func (x *fastReflection_MsgBuy) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBuy: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBuyDirect: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBuy: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBuyDirect: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4741,7 +4741,7 @@ func (x *fastReflection_MsgBuy) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Orders = append(x.Orders, &MsgBuy_Order{}) + x.Orders = append(x.Orders, &MsgBuyDirect_Order{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Orders[len(x.Orders)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } @@ -4782,37 +4782,33 @@ func (x *fastReflection_MsgBuy) ProtoMethods() *protoiface.Methods { } var ( - md_MsgBuy_Order protoreflect.MessageDescriptor - fd_MsgBuy_Order_selection protoreflect.FieldDescriptor - fd_MsgBuy_Order_quantity protoreflect.FieldDescriptor - fd_MsgBuy_Order_bid_price protoreflect.FieldDescriptor - fd_MsgBuy_Order_disable_auto_retire protoreflect.FieldDescriptor - fd_MsgBuy_Order_disable_partial_fill protoreflect.FieldDescriptor - fd_MsgBuy_Order_retirement_location protoreflect.FieldDescriptor - fd_MsgBuy_Order_expiration protoreflect.FieldDescriptor + md_MsgBuyDirect_Order protoreflect.MessageDescriptor + fd_MsgBuyDirect_Order_sell_order_id protoreflect.FieldDescriptor + fd_MsgBuyDirect_Order_quantity protoreflect.FieldDescriptor + fd_MsgBuyDirect_Order_bid_price protoreflect.FieldDescriptor + fd_MsgBuyDirect_Order_disable_auto_retire protoreflect.FieldDescriptor + fd_MsgBuyDirect_Order_retirement_location protoreflect.FieldDescriptor ) func init() { file_regen_ecocredit_marketplace_v1_tx_proto_init() - md_MsgBuy_Order = File_regen_ecocredit_marketplace_v1_tx_proto.Messages().ByName("MsgBuy").Messages().ByName("Order") - fd_MsgBuy_Order_selection = md_MsgBuy_Order.Fields().ByName("selection") - fd_MsgBuy_Order_quantity = md_MsgBuy_Order.Fields().ByName("quantity") - fd_MsgBuy_Order_bid_price = md_MsgBuy_Order.Fields().ByName("bid_price") - fd_MsgBuy_Order_disable_auto_retire = md_MsgBuy_Order.Fields().ByName("disable_auto_retire") - fd_MsgBuy_Order_disable_partial_fill = md_MsgBuy_Order.Fields().ByName("disable_partial_fill") - fd_MsgBuy_Order_retirement_location = md_MsgBuy_Order.Fields().ByName("retirement_location") - fd_MsgBuy_Order_expiration = md_MsgBuy_Order.Fields().ByName("expiration") + md_MsgBuyDirect_Order = File_regen_ecocredit_marketplace_v1_tx_proto.Messages().ByName("MsgBuyDirect").Messages().ByName("Order") + fd_MsgBuyDirect_Order_sell_order_id = md_MsgBuyDirect_Order.Fields().ByName("sell_order_id") + fd_MsgBuyDirect_Order_quantity = md_MsgBuyDirect_Order.Fields().ByName("quantity") + 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_location = md_MsgBuyDirect_Order.Fields().ByName("retirement_location") } -var _ protoreflect.Message = (*fastReflection_MsgBuy_Order)(nil) +var _ protoreflect.Message = (*fastReflection_MsgBuyDirect_Order)(nil) -type fastReflection_MsgBuy_Order MsgBuy_Order +type fastReflection_MsgBuyDirect_Order MsgBuyDirect_Order -func (x *MsgBuy_Order) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgBuy_Order)(x) +func (x *MsgBuyDirect_Order) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgBuyDirect_Order)(x) } -func (x *MsgBuy_Order) slowProtoReflect() protoreflect.Message { +func (x *MsgBuyDirect_Order) slowProtoReflect() protoreflect.Message { mi := &file_regen_ecocredit_marketplace_v1_tx_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4824,43 +4820,43 @@ func (x *MsgBuy_Order) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgBuy_Order_messageType fastReflection_MsgBuy_Order_messageType -var _ protoreflect.MessageType = fastReflection_MsgBuy_Order_messageType{} +var _fastReflection_MsgBuyDirect_Order_messageType fastReflection_MsgBuyDirect_Order_messageType +var _ protoreflect.MessageType = fastReflection_MsgBuyDirect_Order_messageType{} -type fastReflection_MsgBuy_Order_messageType struct{} +type fastReflection_MsgBuyDirect_Order_messageType struct{} -func (x fastReflection_MsgBuy_Order_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgBuy_Order)(nil) +func (x fastReflection_MsgBuyDirect_Order_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgBuyDirect_Order)(nil) } -func (x fastReflection_MsgBuy_Order_messageType) New() protoreflect.Message { - return new(fastReflection_MsgBuy_Order) +func (x fastReflection_MsgBuyDirect_Order_messageType) New() protoreflect.Message { + return new(fastReflection_MsgBuyDirect_Order) } -func (x fastReflection_MsgBuy_Order_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBuy_Order +func (x fastReflection_MsgBuyDirect_Order_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBuyDirect_Order } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgBuy_Order) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBuy_Order +func (x *fastReflection_MsgBuyDirect_Order) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBuyDirect_Order } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgBuy_Order) Type() protoreflect.MessageType { - return _fastReflection_MsgBuy_Order_messageType +func (x *fastReflection_MsgBuyDirect_Order) Type() protoreflect.MessageType { + return _fastReflection_MsgBuyDirect_Order_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgBuy_Order) New() protoreflect.Message { - return new(fastReflection_MsgBuy_Order) +func (x *fastReflection_MsgBuyDirect_Order) New() protoreflect.Message { + return new(fastReflection_MsgBuyDirect_Order) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgBuy_Order) Interface() protoreflect.ProtoMessage { - return (*MsgBuy_Order)(x) +func (x *fastReflection_MsgBuyDirect_Order) Interface() protoreflect.ProtoMessage { + return (*MsgBuyDirect_Order)(x) } // Range iterates over every populated field in an undefined order, @@ -4868,46 +4864,34 @@ func (x *fastReflection_MsgBuy_Order) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgBuy_Order) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Selection != nil { - value := protoreflect.ValueOfMessage(x.Selection.ProtoReflect()) - if !f(fd_MsgBuy_Order_selection, value) { +func (x *fastReflection_MsgBuyDirect_Order) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SellOrderId != uint64(0) { + value := protoreflect.ValueOfUint64(x.SellOrderId) + if !f(fd_MsgBuyDirect_Order_sell_order_id, value) { return } } if x.Quantity != "" { value := protoreflect.ValueOfString(x.Quantity) - if !f(fd_MsgBuy_Order_quantity, value) { + if !f(fd_MsgBuyDirect_Order_quantity, value) { return } } if x.BidPrice != nil { value := protoreflect.ValueOfMessage(x.BidPrice.ProtoReflect()) - if !f(fd_MsgBuy_Order_bid_price, value) { + if !f(fd_MsgBuyDirect_Order_bid_price, value) { return } } if x.DisableAutoRetire != false { value := protoreflect.ValueOfBool(x.DisableAutoRetire) - if !f(fd_MsgBuy_Order_disable_auto_retire, value) { - return - } - } - if x.DisablePartialFill != false { - value := protoreflect.ValueOfBool(x.DisablePartialFill) - if !f(fd_MsgBuy_Order_disable_partial_fill, value) { + if !f(fd_MsgBuyDirect_Order_disable_auto_retire, value) { return } } if x.RetirementLocation != "" { value := protoreflect.ValueOfString(x.RetirementLocation) - if !f(fd_MsgBuy_Order_retirement_location, value) { - return - } - } - if x.Expiration != nil { - value := protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) - if !f(fd_MsgBuy_Order_expiration, value) { + if !f(fd_MsgBuyDirect_Order_retirement_location, value) { return } } @@ -4924,27 +4908,23 @@ func (x *fastReflection_MsgBuy_Order) Range(f func(protoreflect.FieldDescriptor, // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgBuy_Order) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgBuyDirect_Order) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.selection": - return x.Selection != nil - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.quantity": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.sell_order_id": + return x.SellOrderId != uint64(0) + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.quantity": return x.Quantity != "" - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.bid_price": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.bid_price": return x.BidPrice != nil - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.disable_auto_retire": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.disable_auto_retire": return x.DisableAutoRetire != false - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.disable_partial_fill": - return x.DisablePartialFill != false - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.retirement_location": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_location": return x.RetirementLocation != "" - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.expiration": - return x.Expiration != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy.Order")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect.Order")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy.Order does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirect.Order does not contain field %s", fd.FullName())) } } @@ -4954,27 +4934,23 @@ func (x *fastReflection_MsgBuy_Order) Has(fd protoreflect.FieldDescriptor) bool // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBuy_Order) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgBuyDirect_Order) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.selection": - x.Selection = nil - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.quantity": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.sell_order_id": + x.SellOrderId = uint64(0) + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.quantity": x.Quantity = "" - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.bid_price": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.bid_price": x.BidPrice = nil - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.disable_auto_retire": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.disable_auto_retire": x.DisableAutoRetire = false - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.disable_partial_fill": - x.DisablePartialFill = false - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.retirement_location": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_location": x.RetirementLocation = "" - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.expiration": - x.Expiration = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy.Order")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect.Order")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy.Order does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirect.Order does not contain field %s", fd.FullName())) } } @@ -4984,34 +4960,28 @@ func (x *fastReflection_MsgBuy_Order) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgBuy_Order) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgBuyDirect_Order) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.selection": - value := x.Selection - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.quantity": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.sell_order_id": + value := x.SellOrderId + return protoreflect.ValueOfUint64(value) + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.quantity": value := x.Quantity return protoreflect.ValueOfString(value) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.bid_price": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.bid_price": value := x.BidPrice return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.disable_auto_retire": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.disable_auto_retire": value := x.DisableAutoRetire return protoreflect.ValueOfBool(value) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.disable_partial_fill": - value := x.DisablePartialFill - return protoreflect.ValueOfBool(value) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.retirement_location": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_location": value := x.RetirementLocation return protoreflect.ValueOfString(value) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.expiration": - value := x.Expiration - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy.Order")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect.Order")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy.Order does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirect.Order does not contain field %s", descriptor.FullName())) } } @@ -5025,27 +4995,23 @@ func (x *fastReflection_MsgBuy_Order) Get(descriptor protoreflect.FieldDescripto // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBuy_Order) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgBuyDirect_Order) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.selection": - x.Selection = value.Message().Interface().(*MsgBuy_Order_Selection) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.quantity": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.sell_order_id": + x.SellOrderId = value.Uint() + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.quantity": x.Quantity = value.Interface().(string) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.bid_price": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.bid_price": x.BidPrice = value.Message().Interface().(*v1beta1.Coin) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.disable_auto_retire": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.disable_auto_retire": x.DisableAutoRetire = value.Bool() - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.disable_partial_fill": - x.DisablePartialFill = value.Bool() - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.retirement_location": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_location": x.RetirementLocation = value.Interface().(string) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.expiration": - x.Expiration = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy.Order")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect.Order")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy.Order does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirect.Order does not contain field %s", fd.FullName())) } } @@ -5059,76 +5025,60 @@ func (x *fastReflection_MsgBuy_Order) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBuy_Order) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgBuyDirect_Order) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.selection": - if x.Selection == nil { - x.Selection = new(MsgBuy_Order_Selection) - } - return protoreflect.ValueOfMessage(x.Selection.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.bid_price": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.bid_price": if x.BidPrice == nil { x.BidPrice = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.BidPrice.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.expiration": - if x.Expiration == nil { - x.Expiration = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.quantity": - panic(fmt.Errorf("field quantity of message regen.ecocredit.marketplace.v1.MsgBuy.Order is not mutable")) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.disable_auto_retire": - panic(fmt.Errorf("field disable_auto_retire of message regen.ecocredit.marketplace.v1.MsgBuy.Order is not mutable")) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.disable_partial_fill": - panic(fmt.Errorf("field disable_partial_fill of message regen.ecocredit.marketplace.v1.MsgBuy.Order is not mutable")) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.retirement_location": - panic(fmt.Errorf("field retirement_location of message regen.ecocredit.marketplace.v1.MsgBuy.Order is not mutable")) + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.sell_order_id": + panic(fmt.Errorf("field sell_order_id of message regen.ecocredit.marketplace.v1.MsgBuyDirect.Order is not mutable")) + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.quantity": + panic(fmt.Errorf("field quantity of message regen.ecocredit.marketplace.v1.MsgBuyDirect.Order is not mutable")) + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.disable_auto_retire": + 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_location": + panic(fmt.Errorf("field retirement_location 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.MsgBuy.Order")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect.Order")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy.Order does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirect.Order does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgBuy_Order) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgBuyDirect_Order) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.selection": - m := new(MsgBuy_Order_Selection) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.quantity": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.sell_order_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.quantity": return protoreflect.ValueOfString("") - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.bid_price": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.bid_price": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.disable_auto_retire": - return protoreflect.ValueOfBool(false) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.disable_partial_fill": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.disable_auto_retire": return protoreflect.ValueOfBool(false) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.retirement_location": + case "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.retirement_location": return protoreflect.ValueOfString("") - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.expiration": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy.Order")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirect.Order")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy.Order does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirect.Order does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgBuy_Order) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgBuyDirect_Order) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.MsgBuy.Order", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.MsgBuyDirect.Order", d.FullName())) } panic("unreachable") } @@ -5136,7 +5086,7 @@ func (x *fastReflection_MsgBuy_Order) WhichOneof(d protoreflect.OneofDescriptor) // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgBuy_Order) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgBuyDirect_Order) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -5147,7 +5097,7 @@ func (x *fastReflection_MsgBuy_Order) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBuy_Order) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgBuyDirect_Order) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -5159,7 +5109,7 @@ func (x *fastReflection_MsgBuy_Order) SetUnknown(fields protoreflect.RawFields) // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_MsgBuy_Order) IsValid() bool { +func (x *fastReflection_MsgBuyDirect_Order) IsValid() bool { return x != nil } @@ -5169,9 +5119,9 @@ func (x *fastReflection_MsgBuy_Order) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgBuy_Order) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgBuyDirect_Order) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgBuy_Order) + x := input.Message.Interface().(*MsgBuyDirect_Order) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5183,9 +5133,8 @@ func (x *fastReflection_MsgBuy_Order) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.Selection != nil { - l = options.Size(x.Selection) - n += 1 + l + runtime.Sov(uint64(l)) + if x.SellOrderId != 0 { + n += 1 + runtime.Sov(uint64(x.SellOrderId)) } l = len(x.Quantity) if l > 0 { @@ -5198,17 +5147,10 @@ func (x *fastReflection_MsgBuy_Order) ProtoMethods() *protoiface.Methods { if x.DisableAutoRetire { n += 2 } - if x.DisablePartialFill { - n += 2 - } l = len(x.RetirementLocation) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Expiration != nil { - l = options.Size(x.Expiration) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -5219,7 +5161,7 @@ func (x *fastReflection_MsgBuy_Order) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgBuy_Order) + x := input.Message.Interface().(*MsgBuyDirect_Order) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5238,20 +5180,6 @@ func (x *fastReflection_MsgBuy_Order) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Expiration != nil { - encoded, err := options.Marshal(x.Expiration) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } if len(x.RetirementLocation) > 0 { i -= len(x.RetirementLocation) copy(dAtA[i:], x.RetirementLocation) @@ -5259,16 +5187,6 @@ func (x *fastReflection_MsgBuy_Order) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x32 } - if x.DisablePartialFill { - i-- - if x.DisablePartialFill { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } if x.DisableAutoRetire { i-- if x.DisableAutoRetire { @@ -5277,7 +5195,7 @@ func (x *fastReflection_MsgBuy_Order) ProtoMethods() *protoiface.Methods { dAtA[i] = 0 } i-- - dAtA[i] = 0x20 + dAtA[i] = 0x28 } if x.BidPrice != nil { encoded, err := options.Marshal(x.BidPrice) @@ -5291,28 +5209,19 @@ func (x *fastReflection_MsgBuy_Order) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } if len(x.Quantity) > 0 { i -= len(x.Quantity) copy(dAtA[i:], x.Quantity) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Quantity))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } - if x.Selection != nil { - encoded, err := options.Marshal(x.Selection) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + if x.SellOrderId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.SellOrderId)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x10 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -5325,7 +5234,7 @@ func (x *fastReflection_MsgBuy_Order) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgBuy_Order) + x := input.Message.Interface().(*MsgBuyDirect_Order) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5357,17 +5266,17 @@ func (x *fastReflection_MsgBuy_Order) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBuy_Order: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBuyDirect_Order: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBuy_Order: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBuyDirect_Order: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Selection", wireType) + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SellOrderId", wireType) } - var msglen int + x.SellOrderId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -5377,29 +5286,12 @@ func (x *fastReflection_MsgBuy_Order) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + x.SellOrderId |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Selection == nil { - x.Selection = &MsgBuy_Order_Selection{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Selection); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) } @@ -5431,7 +5323,7 @@ func (x *fastReflection_MsgBuy_Order) ProtoMethods() *protoiface.Methods { } x.Quantity = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BidPrice", wireType) } @@ -5466,603 +5358,12 @@ func (x *fastReflection_MsgBuy_Order) ProtoMethods() *protoiface.Methods { if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BidPrice); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DisableAutoRetire", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.DisableAutoRetire = bool(v != 0) - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DisablePartialFill", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.DisablePartialFill = bool(v != 0) - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RetirementLocation", 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.RetirementLocation = 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 Expiration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Expiration == nil { - x.Expiration = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiration); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgBuy_Order_Selection protoreflect.MessageDescriptor - fd_MsgBuy_Order_Selection_sell_order_id protoreflect.FieldDescriptor - fd_MsgBuy_Order_Selection_filter protoreflect.FieldDescriptor -) - -func init() { - file_regen_ecocredit_marketplace_v1_tx_proto_init() - md_MsgBuy_Order_Selection = File_regen_ecocredit_marketplace_v1_tx_proto.Messages().ByName("MsgBuy").Messages().ByName("Order").Messages().ByName("Selection") - fd_MsgBuy_Order_Selection_sell_order_id = md_MsgBuy_Order_Selection.Fields().ByName("sell_order_id") - fd_MsgBuy_Order_Selection_filter = md_MsgBuy_Order_Selection.Fields().ByName("filter") -} - -var _ protoreflect.Message = (*fastReflection_MsgBuy_Order_Selection)(nil) - -type fastReflection_MsgBuy_Order_Selection MsgBuy_Order_Selection - -func (x *MsgBuy_Order_Selection) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgBuy_Order_Selection)(x) -} - -func (x *MsgBuy_Order_Selection) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_tx_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgBuy_Order_Selection_messageType fastReflection_MsgBuy_Order_Selection_messageType -var _ protoreflect.MessageType = fastReflection_MsgBuy_Order_Selection_messageType{} - -type fastReflection_MsgBuy_Order_Selection_messageType struct{} - -func (x fastReflection_MsgBuy_Order_Selection_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgBuy_Order_Selection)(nil) -} -func (x fastReflection_MsgBuy_Order_Selection_messageType) New() protoreflect.Message { - return new(fastReflection_MsgBuy_Order_Selection) -} -func (x fastReflection_MsgBuy_Order_Selection_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBuy_Order_Selection -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgBuy_Order_Selection) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBuy_Order_Selection -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgBuy_Order_Selection) Type() protoreflect.MessageType { - return _fastReflection_MsgBuy_Order_Selection_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgBuy_Order_Selection) New() protoreflect.Message { - return new(fastReflection_MsgBuy_Order_Selection) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgBuy_Order_Selection) Interface() protoreflect.ProtoMessage { - return (*MsgBuy_Order_Selection)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgBuy_Order_Selection) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sum != nil { - switch o := x.Sum.(type) { - case *MsgBuy_Order_Selection_SellOrderId: - v := o.SellOrderId - value := protoreflect.ValueOfUint64(v) - if !f(fd_MsgBuy_Order_Selection_sell_order_id, value) { - return - } - case *MsgBuy_Order_Selection_Filter: - v := o.Filter - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_MsgBuy_Order_Selection_filter, value) { - return - } - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgBuy_Order_Selection) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection.sell_order_id": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*MsgBuy_Order_Selection_SellOrderId); ok { - return true - } else { - return false - } - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection.filter": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*MsgBuy_Order_Selection_Filter); ok { - return true - } else { - return false - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBuy_Order_Selection) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection.sell_order_id": - x.Sum = nil - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection.filter": - x.Sum = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgBuy_Order_Selection) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection.sell_order_id": - if x.Sum == nil { - return protoreflect.ValueOfUint64(uint64(0)) - } else if v, ok := x.Sum.(*MsgBuy_Order_Selection_SellOrderId); ok { - return protoreflect.ValueOfUint64(v.SellOrderId) - } else { - return protoreflect.ValueOfUint64(uint64(0)) - } - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection.filter": - if x.Sum == nil { - return protoreflect.ValueOfMessage((*Filter)(nil).ProtoReflect()) - } else if v, ok := x.Sum.(*MsgBuy_Order_Selection_Filter); ok { - return protoreflect.ValueOfMessage(v.Filter.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*Filter)(nil).ProtoReflect()) - } - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBuy_Order_Selection) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection.sell_order_id": - cv := value.Uint() - x.Sum = &MsgBuy_Order_Selection_SellOrderId{SellOrderId: cv} - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection.filter": - cv := value.Message().Interface().(*Filter) - x.Sum = &MsgBuy_Order_Selection_Filter{Filter: cv} - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBuy_Order_Selection) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection.filter": - if x.Sum == nil { - value := &Filter{} - oneofValue := &MsgBuy_Order_Selection_Filter{Filter: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Sum.(type) { - case *MsgBuy_Order_Selection_Filter: - return protoreflect.ValueOfMessage(m.Filter.ProtoReflect()) - default: - value := &Filter{} - oneofValue := &MsgBuy_Order_Selection_Filter{Filter: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection.sell_order_id": - panic(fmt.Errorf("field sell_order_id of message regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgBuy_Order_Selection) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection.sell_order_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection.filter": - value := &Filter{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgBuy_Order_Selection) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection.sum": - if x.Sum == nil { - return nil - } - switch x.Sum.(type) { - case *MsgBuy_Order_Selection_SellOrderId: - return x.Descriptor().Fields().ByName("sell_order_id") - case *MsgBuy_Order_Selection_Filter: - return x.Descriptor().Fields().ByName("filter") - } - default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgBuy_Order_Selection) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBuy_Order_Selection) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgBuy_Order_Selection) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgBuy_Order_Selection) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgBuy_Order_Selection) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - switch x := x.Sum.(type) { - case *MsgBuy_Order_Selection_SellOrderId: - if x == nil { - break - } - n += 1 + runtime.Sov(uint64(x.SellOrderId)) - case *MsgBuy_Order_Selection_Filter: - if x == nil { - break - } - l = options.Size(x.Filter) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgBuy_Order_Selection) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - switch x := x.Sum.(type) { - case *MsgBuy_Order_Selection_SellOrderId: - i = runtime.EncodeVarint(dAtA, i, uint64(x.SellOrderId)) - i-- - dAtA[i] = 0x8 - case *MsgBuy_Order_Selection_Filter: - encoded, err := options.Marshal(x.Filter) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgBuy_Order_Selection) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBuy_Order_Selection: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBuy_Order_Selection: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 5: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SellOrderId", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DisableAutoRetire", wireType) } - var v uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -6072,17 +5373,17 @@ func (x *fastReflection_MsgBuy_Order_Selection) ProtoMethods() *protoiface.Metho } b := dAtA[iNdEx] iNdEx++ - v |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - x.Sum = &MsgBuy_Order_Selection_SellOrderId{v} - case 2: + x.DisableAutoRetire = bool(v != 0) + case 6: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RetirementLocation", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -6092,26 +5393,23 @@ func (x *fastReflection_MsgBuy_Order_Selection) ProtoMethods() *protoiface.Metho } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + 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 } - v := &Filter{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Sum = &MsgBuy_Order_Selection_Filter{v} + x.RetirementLocation = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -6148,72 +5446,24 @@ func (x *fastReflection_MsgBuy_Order_Selection) ProtoMethods() *protoiface.Metho } } -var _ protoreflect.List = (*_MsgBuyResponse_1_list)(nil) - -type _MsgBuyResponse_1_list struct { - list *[]uint64 -} - -func (x *_MsgBuyResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgBuyResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfUint64((*x.list)[i]) -} - -func (x *_MsgBuyResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgBuyResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgBuyResponse_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgBuyResponse at list field BuyOrderIds as it is not of Message kind")) -} - -func (x *_MsgBuyResponse_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgBuyResponse_1_list) NewElement() protoreflect.Value { - v := uint64(0) - return protoreflect.ValueOfUint64(v) -} - -func (x *_MsgBuyResponse_1_list) IsValid() bool { - return x.list != nil -} - var ( - md_MsgBuyResponse protoreflect.MessageDescriptor - fd_MsgBuyResponse_buy_order_ids protoreflect.FieldDescriptor + md_MsgBuyDirectResponse protoreflect.MessageDescriptor ) func init() { file_regen_ecocredit_marketplace_v1_tx_proto_init() - md_MsgBuyResponse = File_regen_ecocredit_marketplace_v1_tx_proto.Messages().ByName("MsgBuyResponse") - fd_MsgBuyResponse_buy_order_ids = md_MsgBuyResponse.Fields().ByName("buy_order_ids") + md_MsgBuyDirectResponse = File_regen_ecocredit_marketplace_v1_tx_proto.Messages().ByName("MsgBuyDirectResponse") } -var _ protoreflect.Message = (*fastReflection_MsgBuyResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgBuyDirectResponse)(nil) -type fastReflection_MsgBuyResponse MsgBuyResponse +type fastReflection_MsgBuyDirectResponse MsgBuyDirectResponse -func (x *MsgBuyResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgBuyResponse)(x) +func (x *MsgBuyDirectResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgBuyDirectResponse)(x) } -func (x *MsgBuyResponse) slowProtoReflect() protoreflect.Message { +func (x *MsgBuyDirectResponse) slowProtoReflect() protoreflect.Message { mi := &file_regen_ecocredit_marketplace_v1_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -6225,43 +5475,43 @@ func (x *MsgBuyResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgBuyResponse_messageType fastReflection_MsgBuyResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgBuyResponse_messageType{} +var _fastReflection_MsgBuyDirectResponse_messageType fastReflection_MsgBuyDirectResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgBuyDirectResponse_messageType{} -type fastReflection_MsgBuyResponse_messageType struct{} +type fastReflection_MsgBuyDirectResponse_messageType struct{} -func (x fastReflection_MsgBuyResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgBuyResponse)(nil) +func (x fastReflection_MsgBuyDirectResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgBuyDirectResponse)(nil) } -func (x fastReflection_MsgBuyResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgBuyResponse) +func (x fastReflection_MsgBuyDirectResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgBuyDirectResponse) } -func (x fastReflection_MsgBuyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBuyResponse +func (x fastReflection_MsgBuyDirectResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBuyDirectResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgBuyResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBuyResponse +func (x *fastReflection_MsgBuyDirectResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBuyDirectResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgBuyResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgBuyResponse_messageType +func (x *fastReflection_MsgBuyDirectResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgBuyDirectResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgBuyResponse) New() protoreflect.Message { - return new(fastReflection_MsgBuyResponse) +func (x *fastReflection_MsgBuyDirectResponse) New() protoreflect.Message { + return new(fastReflection_MsgBuyDirectResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgBuyResponse) Interface() protoreflect.ProtoMessage { - return (*MsgBuyResponse)(x) +func (x *fastReflection_MsgBuyDirectResponse) Interface() protoreflect.ProtoMessage { + return (*MsgBuyDirectResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -6269,13 +5519,7 @@ func (x *fastReflection_MsgBuyResponse) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgBuyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.BuyOrderIds) != 0 { - value := protoreflect.ValueOfList(&_MsgBuyResponse_1_list{list: &x.BuyOrderIds}) - if !f(fd_MsgBuyResponse_buy_order_ids, value) { - return - } - } +func (x *fastReflection_MsgBuyDirectResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -6289,15 +5533,13 @@ func (x *fastReflection_MsgBuyResponse) Range(f func(protoreflect.FieldDescripto // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgBuyResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgBuyDirectResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuyResponse.buy_order_ids": - return len(x.BuyOrderIds) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirectResponse")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirectResponse does not contain field %s", fd.FullName())) } } @@ -6307,15 +5549,13 @@ func (x *fastReflection_MsgBuyResponse) Has(fd protoreflect.FieldDescriptor) boo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBuyResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgBuyDirectResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuyResponse.buy_order_ids": - x.BuyOrderIds = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirectResponse")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirectResponse does not contain field %s", fd.FullName())) } } @@ -6325,19 +5565,13 @@ func (x *fastReflection_MsgBuyResponse) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgBuyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgBuyDirectResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuyResponse.buy_order_ids": - if len(x.BuyOrderIds) == 0 { - return protoreflect.ValueOfList(&_MsgBuyResponse_1_list{}) - } - listValue := &_MsgBuyResponse_1_list{list: &x.BuyOrderIds} - return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirectResponse")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirectResponse does not contain field %s", descriptor.FullName())) } } @@ -6351,17 +5585,13 @@ func (x *fastReflection_MsgBuyResponse) Get(descriptor protoreflect.FieldDescrip // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBuyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgBuyDirectResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuyResponse.buy_order_ids": - lv := value.List() - clv := lv.(*_MsgBuyResponse_1_list) - x.BuyOrderIds = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirectResponse")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirectResponse does not contain field %s", fd.FullName())) } } @@ -6375,45 +5605,36 @@ func (x *fastReflection_MsgBuyResponse) Set(fd protoreflect.FieldDescriptor, val // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBuyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgBuyDirectResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuyResponse.buy_order_ids": - if x.BuyOrderIds == nil { - x.BuyOrderIds = []uint64{} - } - value := &_MsgBuyResponse_1_list{list: &x.BuyOrderIds} - return protoreflect.ValueOfList(value) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirectResponse")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirectResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgBuyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgBuyDirectResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.MsgBuyResponse.buy_order_ids": - list := []uint64{} - return protoreflect.ValueOfList(&_MsgBuyResponse_1_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.MsgBuyDirectResponse")) } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.MsgBuyDirectResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgBuyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgBuyDirectResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.MsgBuyResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.MsgBuyDirectResponse", d.FullName())) } panic("unreachable") } @@ -6421,7 +5642,7 @@ func (x *fastReflection_MsgBuyResponse) WhichOneof(d protoreflect.OneofDescripto // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgBuyResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgBuyDirectResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -6432,7 +5653,7 @@ func (x *fastReflection_MsgBuyResponse) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgBuyResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgBuyDirectResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -6444,7 +5665,7 @@ func (x *fastReflection_MsgBuyResponse) SetUnknown(fields protoreflect.RawFields // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_MsgBuyResponse) IsValid() bool { +func (x *fastReflection_MsgBuyDirectResponse) IsValid() bool { return x != nil } @@ -6454,9 +5675,9 @@ func (x *fastReflection_MsgBuyResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgBuyResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgBuyDirectResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgBuyResponse) + x := input.Message.Interface().(*MsgBuyDirectResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6468,13 +5689,6 @@ func (x *fastReflection_MsgBuyResponse) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if len(x.BuyOrderIds) > 0 { - l = 0 - for _, e := range x.BuyOrderIds { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + l - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -6485,7 +5699,7 @@ func (x *fastReflection_MsgBuyResponse) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgBuyResponse) + x := input.Message.Interface().(*MsgBuyDirectResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6504,26 +5718,6 @@ func (x *fastReflection_MsgBuyResponse) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.BuyOrderIds) > 0 { - var pksize2 int - for _, num := range x.BuyOrderIds { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num := range x.BuyOrderIds { - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) - i-- - dAtA[i] = 0xa - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -6535,7 +5729,7 @@ func (x *fastReflection_MsgBuyResponse) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgBuyResponse) + x := input.Message.Interface().(*MsgBuyDirectResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6567,88 +5761,12 @@ func (x *fastReflection_MsgBuyResponse) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBuyResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBuyDirectResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBuyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBuyDirectResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType == 0 { - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.BuyOrderIds = append(x.BuyOrderIds, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - 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 - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(x.BuyOrderIds) == 0 { - x.BuyOrderIds = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.BuyOrderIds = append(x.BuyOrderIds, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BuyOrderIds", wireType) - } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -7878,20 +6996,20 @@ func (*MsgCancelSellOrderResponse) Descriptor() ([]byte, []int) { return file_regen_ecocredit_marketplace_v1_tx_proto_rawDescGZIP(), []int{5} } -// MsgBuy is the Msg/Buy request type. -type MsgBuy struct { +// MsgBuyDirect is the Msg/BuyDirect request type. +type MsgBuyDirect struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // buyer is the address of the credit buyer. Buyer string `protobuf:"bytes,1,opt,name=buyer,proto3" json:"buyer,omitempty"` - // orders are the new buy orders. - Orders []*MsgBuy_Order `protobuf:"bytes,2,rep,name=orders,proto3" json:"orders,omitempty"` + // orders is a list of orders for ecocredits. + Orders []*MsgBuyDirect_Order `protobuf:"bytes,2,rep,name=orders,proto3" json:"orders,omitempty"` } -func (x *MsgBuy) Reset() { - *x = MsgBuy{} +func (x *MsgBuyDirect) Reset() { + *x = MsgBuyDirect{} if protoimpl.UnsafeEnabled { mi := &file_regen_ecocredit_marketplace_v1_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7899,45 +7017,40 @@ func (x *MsgBuy) Reset() { } } -func (x *MsgBuy) String() string { +func (x *MsgBuyDirect) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgBuy) ProtoMessage() {} +func (*MsgBuyDirect) ProtoMessage() {} -// Deprecated: Use MsgBuy.ProtoReflect.Descriptor instead. -func (*MsgBuy) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgBuyDirect.ProtoReflect.Descriptor instead. +func (*MsgBuyDirect) Descriptor() ([]byte, []int) { return file_regen_ecocredit_marketplace_v1_tx_proto_rawDescGZIP(), []int{6} } -func (x *MsgBuy) GetBuyer() string { +func (x *MsgBuyDirect) GetBuyer() string { if x != nil { return x.Buyer } return "" } -func (x *MsgBuy) GetOrders() []*MsgBuy_Order { +func (x *MsgBuyDirect) GetOrders() []*MsgBuyDirect_Order { if x != nil { return x.Orders } return nil } -// MsgBuyResponse is the Msg/Buy response type. -type MsgBuyResponse struct { +// MsgBuyDirectResponse is the Msg/BuyDirect response type. +type MsgBuyDirectResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // buy_order_ids are the buy order IDs of the newly created buy orders. Buy - // orders may not settle instantaneously, but rather in batches at specified - // batch epoch times. - BuyOrderIds []uint64 `protobuf:"varint,1,rep,packed,name=buy_order_ids,json=buyOrderIds,proto3" json:"buy_order_ids,omitempty"` } -func (x *MsgBuyResponse) Reset() { - *x = MsgBuyResponse{} +func (x *MsgBuyDirectResponse) Reset() { + *x = MsgBuyDirectResponse{} if protoimpl.UnsafeEnabled { mi := &file_regen_ecocredit_marketplace_v1_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7945,24 +7058,17 @@ func (x *MsgBuyResponse) Reset() { } } -func (x *MsgBuyResponse) String() string { +func (x *MsgBuyDirectResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgBuyResponse) ProtoMessage() {} +func (*MsgBuyDirectResponse) ProtoMessage() {} -// Deprecated: Use MsgBuyResponse.ProtoReflect.Descriptor instead. -func (*MsgBuyResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgBuyDirectResponse.ProtoReflect.Descriptor instead. +func (*MsgBuyDirectResponse) Descriptor() ([]byte, []int) { return file_regen_ecocredit_marketplace_v1_tx_proto_rawDescGZIP(), []int{7} } -func (x *MsgBuyResponse) GetBuyOrderIds() []uint64 { - if x != nil { - return x.BuyOrderIds - } - return nil -} - // MsgAllowAskDenom is the Msg/AllowAskDenom request type. type MsgAllowAskDenom struct { state protoimpl.MessageState @@ -8214,42 +7320,32 @@ func (x *MsgUpdateSellOrders_Update) GetNewExpiration() *timestamppb.Timestamp { return nil } -// Order is a buy order. -type MsgBuy_Order struct { +// Order contains the information needed to purchase an ecocredit. +type MsgBuyDirect_Order struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // selection is the buy order selection. - Selection *MsgBuy_Order_Selection `protobuf:"bytes,1,opt,name=selection,proto3" json:"selection,omitempty"` - // quantity is the quantity of credits to buy. If the quantity of credits - // available is less than this amount the order will be partially filled - // unless disable_partial_fill is true. - Quantity string `protobuf:"bytes,2,opt,name=quantity,proto3" json:"quantity,omitempty"` - // bid price is the bid price for this buy order. A credit unit will be - // settled at a purchase price that is no more than the bid price. The - // buy order will fail if the buyer does not have enough funds available - // to complete the purchase. - BidPrice *v1beta1.Coin `protobuf:"bytes,3,opt,name=bid_price,json=bidPrice,proto3" json:"bid_price,omitempty"` + // sell_order_id is the sell order ID against which the buyer is trying + // to buy. + SellOrderId uint64 `protobuf:"varint,2,opt,name=sell_order_id,json=sellOrderId,proto3" json:"sell_order_id,omitempty"` + // quantity is the quantity of credits to buy. + Quantity string `protobuf:"bytes,3,opt,name=quantity,proto3" json:"quantity,omitempty"` + // bid_price is the price the buyer is willing to pay per credit. + BidPrice *v1beta1.Coin `protobuf:"bytes,4,opt,name=bid_price,json=bidPrice,proto3" json:"bid_price,omitempty"` // disable_auto_retire allows auto-retirement to be disabled. If it is set // to true the credits will not auto-retire and can be resold assuming that // the corresponding sell order has auto-retirement disabled. If the sell // order hasn't disabled auto-retirement and the buy order tries to disable // it, that buy order will fail. - DisableAutoRetire bool `protobuf:"varint,4,opt,name=disable_auto_retire,json=disableAutoRetire,proto3" json:"disable_auto_retire,omitempty"` - // disable_partial_fill disables the default behavior of partially filling - // buy orders if the requested quantity is not available. - DisablePartialFill bool `protobuf:"varint,5,opt,name=disable_partial_fill,json=disablePartialFill,proto3" json:"disable_partial_fill,omitempty"` + DisableAutoRetire bool `protobuf:"varint,5,opt,name=disable_auto_retire,json=disableAutoRetire,proto3" json:"disable_auto_retire,omitempty"` // retirement_location is the optional retirement location for the credits // which will be used only if disable_auto_retire is false. RetirementLocation string `protobuf:"bytes,6,opt,name=retirement_location,json=retirementLocation,proto3" json:"retirement_location,omitempty"` - // expiration is the optional timestamp when the buy order expires. When the - // expiration time is reached, the buy order is removed from state. - Expiration *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=expiration,proto3" json:"expiration,omitempty"` } -func (x *MsgBuy_Order) Reset() { - *x = MsgBuy_Order{} +func (x *MsgBuyDirect_Order) Reset() { + *x = MsgBuyDirect_Order{} if protoimpl.UnsafeEnabled { mi := &file_regen_ecocredit_marketplace_v1_tx_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -8257,142 +7353,52 @@ func (x *MsgBuy_Order) Reset() { } } -func (x *MsgBuy_Order) String() string { +func (x *MsgBuyDirect_Order) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgBuy_Order) ProtoMessage() {} +func (*MsgBuyDirect_Order) ProtoMessage() {} -// Deprecated: Use MsgBuy_Order.ProtoReflect.Descriptor instead. -func (*MsgBuy_Order) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgBuyDirect_Order.ProtoReflect.Descriptor instead. +func (*MsgBuyDirect_Order) Descriptor() ([]byte, []int) { return file_regen_ecocredit_marketplace_v1_tx_proto_rawDescGZIP(), []int{6, 0} } -func (x *MsgBuy_Order) GetSelection() *MsgBuy_Order_Selection { +func (x *MsgBuyDirect_Order) GetSellOrderId() uint64 { if x != nil { - return x.Selection + return x.SellOrderId } - return nil + return 0 } -func (x *MsgBuy_Order) GetQuantity() string { +func (x *MsgBuyDirect_Order) GetQuantity() string { if x != nil { return x.Quantity } return "" } -func (x *MsgBuy_Order) GetBidPrice() *v1beta1.Coin { +func (x *MsgBuyDirect_Order) GetBidPrice() *v1beta1.Coin { if x != nil { return x.BidPrice } return nil } -func (x *MsgBuy_Order) GetDisableAutoRetire() bool { +func (x *MsgBuyDirect_Order) GetDisableAutoRetire() bool { if x != nil { return x.DisableAutoRetire } return false } -func (x *MsgBuy_Order) GetDisablePartialFill() bool { - if x != nil { - return x.DisablePartialFill - } - return false -} - -func (x *MsgBuy_Order) GetRetirementLocation() string { +func (x *MsgBuyDirect_Order) GetRetirementLocation() string { if x != nil { return x.RetirementLocation } return "" } -func (x *MsgBuy_Order) GetExpiration() *timestamppb.Timestamp { - if x != nil { - return x.Expiration - } - return nil -} - -// Selection defines a buy order selection. -type MsgBuy_Order_Selection struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sum defines the type of selection. - // - // Types that are assignable to Sum: - // *MsgBuy_Order_Selection_SellOrderId - // *MsgBuy_Order_Selection_Filter - Sum isMsgBuy_Order_Selection_Sum `protobuf_oneof:"sum"` -} - -func (x *MsgBuy_Order_Selection) Reset() { - *x = MsgBuy_Order_Selection{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_tx_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgBuy_Order_Selection) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgBuy_Order_Selection) ProtoMessage() {} - -// Deprecated: Use MsgBuy_Order_Selection.ProtoReflect.Descriptor instead. -func (*MsgBuy_Order_Selection) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_tx_proto_rawDescGZIP(), []int{6, 0, 0} -} - -func (x *MsgBuy_Order_Selection) GetSum() isMsgBuy_Order_Selection_Sum { - if x != nil { - return x.Sum - } - return nil -} - -func (x *MsgBuy_Order_Selection) GetSellOrderId() uint64 { - if x, ok := x.GetSum().(*MsgBuy_Order_Selection_SellOrderId); ok { - return x.SellOrderId - } - return 0 -} - -func (x *MsgBuy_Order_Selection) GetFilter() *Filter { - if x, ok := x.GetSum().(*MsgBuy_Order_Selection_Filter); ok { - return x.Filter - } - return nil -} - -type isMsgBuy_Order_Selection_Sum interface { - isMsgBuy_Order_Selection_Sum() -} - -type MsgBuy_Order_Selection_SellOrderId struct { - // sell_order_id is the sell order ID against which the buyer is trying - // to buy. When sell_order_id is set, this is known as a direct buy - // order because it is placed directly against a specific sell order. - SellOrderId uint64 `protobuf:"varint,1,opt,name=sell_order_id,json=sellOrderId,proto3,oneof"` -} - -type MsgBuy_Order_Selection_Filter struct { - // filter selects credits to buy based upon the specified filter - // criteria. - Filter *Filter `protobuf:"bytes,2,opt,name=filter,proto3,oneof"` -} - -func (*MsgBuy_Order_Selection_SellOrderId) isMsgBuy_Order_Selection_Sum() {} - -func (*MsgBuy_Order_Selection_Filter) isMsgBuy_Order_Selection_Sum() {} - var File_regen_ecocredit_marketplace_v1_tx_proto protoreflect.FileDescriptor var file_regen_ecocredit_marketplace_v1_tx_proto_rawDesc = []byte{ @@ -8406,110 +7412,88 @@ var file_regen_ecocredit_marketplace_v1_tx_proto_rawDesc = []byte{ 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x2a, 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, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd7, 0x02, 0x0a, - 0x07, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x45, - 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, - 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, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x06, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x73, 0x1a, 0xee, 0x01, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 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, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x36, 0x0a, 0x09, - 0x61, 0x73, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x08, 0x61, 0x73, 0x6b, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, - 0x74, 0x69, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x37, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6c, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x65, 0x6c, - 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x04, 0x52, 0x0c, 0x73, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, - 0x8b, 0x03, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x6c, - 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x54, 0x0a, - 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 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, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x73, 0x1a, 0x87, 0x02, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x22, - 0x0a, 0x0d, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x51, 0x75, 0x61, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x61, 0x73, 0x6b, - 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x41, 0x73, 0x6b, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, - 0x74, 0x69, 0x72, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x65, 0x78, 0x70, 0x69, + 0x22, 0xd7, 0x02, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x12, 0x45, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2d, 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, 0x2e, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x1a, 0xee, 0x01, 0x0a, 0x05, 0x4f, 0x72, + 0x64, 0x65, 0x72, 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, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x12, 0x36, 0x0a, 0x09, 0x61, 0x73, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x08, + 0x61, 0x73, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x75, + 0x74, 0x6f, 0x52, 0x65, 0x74, 0x69, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0d, - 0x6e, 0x65, 0x77, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1d, 0x0a, - 0x1b, 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, 0x22, 0x50, 0x0a, 0x12, - 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6c, 0x6c, 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, 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, 0xe9, 0x04, 0x0a, - 0x06, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x12, 0x44, 0x0a, - 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 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, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x06, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x1a, 0x82, 0x04, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x54, 0x0a, - 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x36, 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, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, - 0x36, 0x0a, 0x09, 0x62, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x08, 0x62, - 0x69, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x75, 0x74, - 0x6f, 0x52, 0x65, 0x74, 0x69, 0x72, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x6c, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, - 0x72, 0x74, 0x69, 0x61, 0x6c, 0x46, 0x69, 0x6c, 0x6c, 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x74, - 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0a, 0x65, 0x78, - 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 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, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x7a, 0x0a, 0x09, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x6c, - 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x48, 0x00, 0x52, 0x0b, 0x73, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x40, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 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, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x42, 0x05, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x22, 0x34, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x42, - 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x62, 0x75, - 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x04, 0x52, 0x0b, 0x62, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x8c, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x37, 0x0a, 0x0f, 0x4d, 0x73, + 0x67, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, + 0x0e, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0c, 0x73, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x49, 0x64, 0x73, 0x22, 0x8b, 0x03, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x12, 0x54, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 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, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x6c, + 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x07, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x87, 0x02, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x65, 0x6c, 0x6c, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x71, 0x75, + 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, + 0x77, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x0d, 0x6e, 0x65, 0x77, + 0x5f, 0x61, 0x73, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x0b, 0x6e, 0x65, 0x77, + 0x41, 0x73, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x75, + 0x74, 0x6f, 0x52, 0x65, 0x74, 0x69, 0x72, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, + 0x1f, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x1d, 0x0a, 0x1b, 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, + 0x22, 0x50, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x53, 0x65, 0x6c, + 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6c, 0x6c, 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, 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, 0xd3, 0x02, 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, 0xe0, 0x01, 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, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x36, 0x0a, + 0x09, 0x62, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 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, 0x08, 0x62, 0x69, 0x64, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x52, + 0x65, 0x74, 0x69, 0x72, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x8c, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x73, 0x6b, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x6f, 0x6f, 0x74, 0x41, @@ -8520,7 +7504,7 @@ var file_regen_ecocredit_marketplace_v1_tx_proto_rawDesc = []byte{ 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, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x73, 0x6b, 0x44, 0x65, 0x6e, 0x6f, - 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xce, 0x04, 0x0a, 0x03, 0x4d, 0x73, + 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe0, 0x04, 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, @@ -8543,40 +7527,41 @@ var file_regen_ecocredit_marketplace_v1_tx_proto_rawDesc = []byte{ 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, 0x5d, - 0x0a, 0x03, 0x42, 0x75, 0x79, 0x12, 0x26, 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, 0x1a, 0x2e, 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, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7b, 0x0a, - 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x73, 0x6b, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x30, - 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, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x73, 0x6b, 0x44, 0x65, 0x6e, 0x6f, 0x6d, - 0x1a, 0x38, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, + 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, + 0x7b, 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x73, 0x6b, 0x44, 0x65, 0x6e, 0x6f, 0x6d, + 0x12, 0x30, 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, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x73, 0x6b, 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, + 0x6f, 0x6d, 0x1a, 0x38, 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, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x73, 0x6b, 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, } var ( @@ -8591,7 +7576,7 @@ func file_regen_ecocredit_marketplace_v1_tx_proto_rawDescGZIP() []byte { return file_regen_ecocredit_marketplace_v1_tx_proto_rawDescData } -var file_regen_ecocredit_marketplace_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_regen_ecocredit_marketplace_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_regen_ecocredit_marketplace_v1_tx_proto_goTypes = []interface{}{ (*MsgSell)(nil), // 0: regen.ecocredit.marketplace.v1.MsgSell (*MsgSellResponse)(nil), // 1: regen.ecocredit.marketplace.v1.MsgSellResponse @@ -8599,45 +7584,40 @@ var file_regen_ecocredit_marketplace_v1_tx_proto_goTypes = []interface{}{ (*MsgUpdateSellOrdersResponse)(nil), // 3: regen.ecocredit.marketplace.v1.MsgUpdateSellOrdersResponse (*MsgCancelSellOrder)(nil), // 4: regen.ecocredit.marketplace.v1.MsgCancelSellOrder (*MsgCancelSellOrderResponse)(nil), // 5: regen.ecocredit.marketplace.v1.MsgCancelSellOrderResponse - (*MsgBuy)(nil), // 6: regen.ecocredit.marketplace.v1.MsgBuy - (*MsgBuyResponse)(nil), // 7: regen.ecocredit.marketplace.v1.MsgBuyResponse + (*MsgBuyDirect)(nil), // 6: regen.ecocredit.marketplace.v1.MsgBuyDirect + (*MsgBuyDirectResponse)(nil), // 7: regen.ecocredit.marketplace.v1.MsgBuyDirectResponse (*MsgAllowAskDenom)(nil), // 8: regen.ecocredit.marketplace.v1.MsgAllowAskDenom (*MsgAllowAskDenomResponse)(nil), // 9: regen.ecocredit.marketplace.v1.MsgAllowAskDenomResponse (*MsgSell_Order)(nil), // 10: regen.ecocredit.marketplace.v1.MsgSell.Order (*MsgUpdateSellOrders_Update)(nil), // 11: regen.ecocredit.marketplace.v1.MsgUpdateSellOrders.Update - (*MsgBuy_Order)(nil), // 12: regen.ecocredit.marketplace.v1.MsgBuy.Order - (*MsgBuy_Order_Selection)(nil), // 13: regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection - (*v1beta1.Coin)(nil), // 14: cosmos.base.v1beta1.Coin - (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp - (*Filter)(nil), // 16: regen.ecocredit.marketplace.v1.Filter + (*MsgBuyDirect_Order)(nil), // 12: regen.ecocredit.marketplace.v1.MsgBuyDirect.Order + (*v1beta1.Coin)(nil), // 13: cosmos.base.v1beta1.Coin + (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp } var file_regen_ecocredit_marketplace_v1_tx_proto_depIdxs = []int32{ 10, // 0: regen.ecocredit.marketplace.v1.MsgSell.orders:type_name -> regen.ecocredit.marketplace.v1.MsgSell.Order 11, // 1: regen.ecocredit.marketplace.v1.MsgUpdateSellOrders.updates:type_name -> regen.ecocredit.marketplace.v1.MsgUpdateSellOrders.Update - 12, // 2: regen.ecocredit.marketplace.v1.MsgBuy.orders:type_name -> regen.ecocredit.marketplace.v1.MsgBuy.Order - 14, // 3: regen.ecocredit.marketplace.v1.MsgSell.Order.ask_price:type_name -> cosmos.base.v1beta1.Coin - 15, // 4: regen.ecocredit.marketplace.v1.MsgSell.Order.expiration:type_name -> google.protobuf.Timestamp - 14, // 5: regen.ecocredit.marketplace.v1.MsgUpdateSellOrders.Update.new_ask_price:type_name -> cosmos.base.v1beta1.Coin - 15, // 6: regen.ecocredit.marketplace.v1.MsgUpdateSellOrders.Update.new_expiration:type_name -> google.protobuf.Timestamp - 13, // 7: regen.ecocredit.marketplace.v1.MsgBuy.Order.selection:type_name -> regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection - 14, // 8: regen.ecocredit.marketplace.v1.MsgBuy.Order.bid_price:type_name -> cosmos.base.v1beta1.Coin - 15, // 9: regen.ecocredit.marketplace.v1.MsgBuy.Order.expiration:type_name -> google.protobuf.Timestamp - 16, // 10: regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection.filter:type_name -> regen.ecocredit.marketplace.v1.Filter - 0, // 11: regen.ecocredit.marketplace.v1.Msg.Sell:input_type -> regen.ecocredit.marketplace.v1.MsgSell - 2, // 12: regen.ecocredit.marketplace.v1.Msg.UpdateSellOrders:input_type -> regen.ecocredit.marketplace.v1.MsgUpdateSellOrders - 4, // 13: regen.ecocredit.marketplace.v1.Msg.CancelSellOrder:input_type -> regen.ecocredit.marketplace.v1.MsgCancelSellOrder - 6, // 14: regen.ecocredit.marketplace.v1.Msg.Buy:input_type -> regen.ecocredit.marketplace.v1.MsgBuy - 8, // 15: regen.ecocredit.marketplace.v1.Msg.AllowAskDenom:input_type -> regen.ecocredit.marketplace.v1.MsgAllowAskDenom - 1, // 16: regen.ecocredit.marketplace.v1.Msg.Sell:output_type -> regen.ecocredit.marketplace.v1.MsgSellResponse - 3, // 17: regen.ecocredit.marketplace.v1.Msg.UpdateSellOrders:output_type -> regen.ecocredit.marketplace.v1.MsgUpdateSellOrdersResponse - 5, // 18: regen.ecocredit.marketplace.v1.Msg.CancelSellOrder:output_type -> regen.ecocredit.marketplace.v1.MsgCancelSellOrderResponse - 7, // 19: regen.ecocredit.marketplace.v1.Msg.Buy:output_type -> regen.ecocredit.marketplace.v1.MsgBuyResponse - 9, // 20: regen.ecocredit.marketplace.v1.Msg.AllowAskDenom:output_type -> regen.ecocredit.marketplace.v1.MsgAllowAskDenomResponse - 16, // [16:21] is the sub-list for method output_type - 11, // [11:16] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 12, // 2: regen.ecocredit.marketplace.v1.MsgBuyDirect.orders:type_name -> regen.ecocredit.marketplace.v1.MsgBuyDirect.Order + 13, // 3: regen.ecocredit.marketplace.v1.MsgSell.Order.ask_price:type_name -> cosmos.base.v1beta1.Coin + 14, // 4: regen.ecocredit.marketplace.v1.MsgSell.Order.expiration:type_name -> google.protobuf.Timestamp + 13, // 5: regen.ecocredit.marketplace.v1.MsgUpdateSellOrders.Update.new_ask_price:type_name -> cosmos.base.v1beta1.Coin + 14, // 6: regen.ecocredit.marketplace.v1.MsgUpdateSellOrders.Update.new_expiration:type_name -> google.protobuf.Timestamp + 13, // 7: regen.ecocredit.marketplace.v1.MsgBuyDirect.Order.bid_price:type_name -> cosmos.base.v1beta1.Coin + 0, // 8: regen.ecocredit.marketplace.v1.Msg.Sell:input_type -> regen.ecocredit.marketplace.v1.MsgSell + 2, // 9: regen.ecocredit.marketplace.v1.Msg.UpdateSellOrders:input_type -> regen.ecocredit.marketplace.v1.MsgUpdateSellOrders + 4, // 10: regen.ecocredit.marketplace.v1.Msg.CancelSellOrder:input_type -> regen.ecocredit.marketplace.v1.MsgCancelSellOrder + 6, // 11: regen.ecocredit.marketplace.v1.Msg.BuyDirect:input_type -> regen.ecocredit.marketplace.v1.MsgBuyDirect + 8, // 12: regen.ecocredit.marketplace.v1.Msg.AllowAskDenom:input_type -> regen.ecocredit.marketplace.v1.MsgAllowAskDenom + 1, // 13: regen.ecocredit.marketplace.v1.Msg.Sell:output_type -> regen.ecocredit.marketplace.v1.MsgSellResponse + 3, // 14: regen.ecocredit.marketplace.v1.Msg.UpdateSellOrders:output_type -> regen.ecocredit.marketplace.v1.MsgUpdateSellOrdersResponse + 5, // 15: regen.ecocredit.marketplace.v1.Msg.CancelSellOrder:output_type -> regen.ecocredit.marketplace.v1.MsgCancelSellOrderResponse + 7, // 16: regen.ecocredit.marketplace.v1.Msg.BuyDirect:output_type -> regen.ecocredit.marketplace.v1.MsgBuyDirectResponse + 9, // 17: regen.ecocredit.marketplace.v1.Msg.AllowAskDenom:output_type -> regen.ecocredit.marketplace.v1.MsgAllowAskDenomResponse + 13, // [13:18] is the sub-list for method output_type + 8, // [8:13] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_regen_ecocredit_marketplace_v1_tx_proto_init() } @@ -8645,7 +7625,6 @@ func file_regen_ecocredit_marketplace_v1_tx_proto_init() { if File_regen_ecocredit_marketplace_v1_tx_proto != nil { return } - file_regen_ecocredit_marketplace_v1_types_proto_init() if !protoimpl.UnsafeEnabled { file_regen_ecocredit_marketplace_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgSell); i { @@ -8720,7 +7699,7 @@ func file_regen_ecocredit_marketplace_v1_tx_proto_init() { } } file_regen_ecocredit_marketplace_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgBuy); i { + switch v := v.(*MsgBuyDirect); i { case 0: return &v.state case 1: @@ -8732,7 +7711,7 @@ func file_regen_ecocredit_marketplace_v1_tx_proto_init() { } } file_regen_ecocredit_marketplace_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgBuyResponse); i { + switch v := v.(*MsgBuyDirectResponse); i { case 0: return &v.state case 1: @@ -8792,19 +7771,7 @@ func file_regen_ecocredit_marketplace_v1_tx_proto_init() { } } file_regen_ecocredit_marketplace_v1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgBuy_Order); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_regen_ecocredit_marketplace_v1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgBuy_Order_Selection); i { + switch v := v.(*MsgBuyDirect_Order); i { case 0: return &v.state case 1: @@ -8816,17 +7783,13 @@ func file_regen_ecocredit_marketplace_v1_tx_proto_init() { } } } - file_regen_ecocredit_marketplace_v1_tx_proto_msgTypes[13].OneofWrappers = []interface{}{ - (*MsgBuy_Order_Selection_SellOrderId)(nil), - (*MsgBuy_Order_Selection_Filter)(nil), - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_regen_ecocredit_marketplace_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, diff --git a/api/regen/ecocredit/marketplace/v1/tx_grpc.pb.go b/api/regen/ecocredit/marketplace/v1/tx_grpc.pb.go index 4c6e8fb09c..f5fbae5e60 100644 --- a/api/regen/ecocredit/marketplace/v1/tx_grpc.pb.go +++ b/api/regen/ecocredit/marketplace/v1/tx_grpc.pb.go @@ -28,8 +28,8 @@ type MsgClient interface { UpdateSellOrders(ctx context.Context, in *MsgUpdateSellOrders, opts ...grpc.CallOption) (*MsgUpdateSellOrdersResponse, error) // CancelSellOrder cancels a sell order and returns the funds from escrow. CancelSellOrder(ctx context.Context, in *MsgCancelSellOrder, opts ...grpc.CallOption) (*MsgCancelSellOrderResponse, error) - // Buy creates credit buy orders. - Buy(ctx context.Context, in *MsgBuy, opts ...grpc.CallOption) (*MsgBuyResponse, error) + // BuyDirect purchases credits directly from the specified sell order. + BuyDirect(ctx context.Context, in *MsgBuyDirect, opts ...grpc.CallOption) (*MsgBuyDirectResponse, error) // AllowAskDenom is a governance operation which authorizes a new ask denom to // be used in sell orders AllowAskDenom(ctx context.Context, in *MsgAllowAskDenom, opts ...grpc.CallOption) (*MsgAllowAskDenomResponse, error) @@ -70,9 +70,9 @@ func (c *msgClient) CancelSellOrder(ctx context.Context, in *MsgCancelSellOrder, return out, nil } -func (c *msgClient) Buy(ctx context.Context, in *MsgBuy, opts ...grpc.CallOption) (*MsgBuyResponse, error) { - out := new(MsgBuyResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.marketplace.v1.Msg/Buy", in, out, opts...) +func (c *msgClient) BuyDirect(ctx context.Context, in *MsgBuyDirect, opts ...grpc.CallOption) (*MsgBuyDirectResponse, error) { + out := new(MsgBuyDirectResponse) + err := c.cc.Invoke(ctx, "/regen.ecocredit.marketplace.v1.Msg/BuyDirect", in, out, opts...) if err != nil { return nil, err } @@ -98,8 +98,8 @@ type MsgServer interface { UpdateSellOrders(context.Context, *MsgUpdateSellOrders) (*MsgUpdateSellOrdersResponse, error) // CancelSellOrder cancels a sell order and returns the funds from escrow. CancelSellOrder(context.Context, *MsgCancelSellOrder) (*MsgCancelSellOrderResponse, error) - // Buy creates credit buy orders. - Buy(context.Context, *MsgBuy) (*MsgBuyResponse, error) + // BuyDirect purchases credits directly from the specified sell order. + BuyDirect(context.Context, *MsgBuyDirect) (*MsgBuyDirectResponse, error) // AllowAskDenom is a governance operation which authorizes a new ask denom to // be used in sell orders AllowAskDenom(context.Context, *MsgAllowAskDenom) (*MsgAllowAskDenomResponse, error) @@ -119,8 +119,8 @@ func (UnimplementedMsgServer) UpdateSellOrders(context.Context, *MsgUpdateSellOr func (UnimplementedMsgServer) CancelSellOrder(context.Context, *MsgCancelSellOrder) (*MsgCancelSellOrderResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelSellOrder not implemented") } -func (UnimplementedMsgServer) Buy(context.Context, *MsgBuy) (*MsgBuyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Buy not implemented") +func (UnimplementedMsgServer) BuyDirect(context.Context, *MsgBuyDirect) (*MsgBuyDirectResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BuyDirect not implemented") } func (UnimplementedMsgServer) AllowAskDenom(context.Context, *MsgAllowAskDenom) (*MsgAllowAskDenomResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllowAskDenom not implemented") @@ -192,20 +192,20 @@ func _Msg_CancelSellOrder_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Msg_Buy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgBuy) +func _Msg_BuyDirect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBuyDirect) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).Buy(ctx, in) + return srv.(MsgServer).BuyDirect(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.ecocredit.marketplace.v1.Msg/Buy", + FullMethod: "/regen.ecocredit.marketplace.v1.Msg/BuyDirect", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Buy(ctx, req.(*MsgBuy)) + return srv.(MsgServer).BuyDirect(ctx, req.(*MsgBuyDirect)) } return interceptor(ctx, in, info, handler) } @@ -248,8 +248,8 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ Handler: _Msg_CancelSellOrder_Handler, }, { - MethodName: "Buy", - Handler: _Msg_Buy_Handler, + MethodName: "BuyDirect", + Handler: _Msg_BuyDirect_Handler, }, { MethodName: "AllowAskDenom", diff --git a/api/regen/ecocredit/marketplace/v1/types.pulsar.go b/api/regen/ecocredit/marketplace/v1/types.pulsar.go deleted file mode 100644 index cac44943aa..0000000000 --- a/api/regen/ecocredit/marketplace/v1/types.pulsar.go +++ /dev/null @@ -1,3307 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package marketplacev1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_Filter_1_list)(nil) - -type _Filter_1_list struct { - list *[]*Filter_Criteria -} - -func (x *_Filter_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Filter_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Filter_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Filter_Criteria) - (*x.list)[i] = concreteValue -} - -func (x *_Filter_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Filter_Criteria) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Filter_1_list) AppendMutable() protoreflect.Value { - v := new(Filter_Criteria) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Filter_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Filter_1_list) NewElement() protoreflect.Value { - v := new(Filter_Criteria) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Filter_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Filter protoreflect.MessageDescriptor - fd_Filter_or protoreflect.FieldDescriptor -) - -func init() { - file_regen_ecocredit_marketplace_v1_types_proto_init() - md_Filter = File_regen_ecocredit_marketplace_v1_types_proto.Messages().ByName("Filter") - fd_Filter_or = md_Filter.Fields().ByName("or") -} - -var _ protoreflect.Message = (*fastReflection_Filter)(nil) - -type fastReflection_Filter Filter - -func (x *Filter) ProtoReflect() protoreflect.Message { - return (*fastReflection_Filter)(x) -} - -func (x *Filter) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Filter_messageType fastReflection_Filter_messageType -var _ protoreflect.MessageType = fastReflection_Filter_messageType{} - -type fastReflection_Filter_messageType struct{} - -func (x fastReflection_Filter_messageType) Zero() protoreflect.Message { - return (*fastReflection_Filter)(nil) -} -func (x fastReflection_Filter_messageType) New() protoreflect.Message { - return new(fastReflection_Filter) -} -func (x fastReflection_Filter_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Filter -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Filter) Descriptor() protoreflect.MessageDescriptor { - return md_Filter -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Filter) Type() protoreflect.MessageType { - return _fastReflection_Filter_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Filter) New() protoreflect.Message { - return new(fastReflection_Filter) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Filter) Interface() protoreflect.ProtoMessage { - return (*Filter)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Filter) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Or) != 0 { - value := protoreflect.ValueOfList(&_Filter_1_list{list: &x.Or}) - if !f(fd_Filter_or, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Filter) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.Filter.or": - return len(x.Or) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.Filter")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.Filter does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Filter) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.Filter.or": - x.Or = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.Filter")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.Filter does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Filter) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.Filter.or": - if len(x.Or) == 0 { - return protoreflect.ValueOfList(&_Filter_1_list{}) - } - listValue := &_Filter_1_list{list: &x.Or} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.Filter")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.Filter does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Filter) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.Filter.or": - lv := value.List() - clv := lv.(*_Filter_1_list) - x.Or = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.Filter")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.Filter does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Filter) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.Filter.or": - if x.Or == nil { - x.Or = []*Filter_Criteria{} - } - value := &_Filter_1_list{list: &x.Or} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.Filter")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.Filter does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Filter) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.Filter.or": - list := []*Filter_Criteria{} - return protoreflect.ValueOfList(&_Filter_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.Filter")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.Filter does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Filter) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.Filter", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Filter) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Filter) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Filter) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Filter) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Filter) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Or) > 0 { - for _, e := range x.Or { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Filter) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Or) > 0 { - for iNdEx := len(x.Or) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Or[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Filter) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Filter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Filter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Or", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Or = append(x.Or, &Filter_Criteria{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Or[len(x.Or)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Filter_Criteria protoreflect.MessageDescriptor - fd_Filter_Criteria_class_selector protoreflect.FieldDescriptor - fd_Filter_Criteria_project_selector protoreflect.FieldDescriptor - fd_Filter_Criteria_batch_selector protoreflect.FieldDescriptor -) - -func init() { - file_regen_ecocredit_marketplace_v1_types_proto_init() - md_Filter_Criteria = File_regen_ecocredit_marketplace_v1_types_proto.Messages().ByName("Filter").Messages().ByName("Criteria") - fd_Filter_Criteria_class_selector = md_Filter_Criteria.Fields().ByName("class_selector") - fd_Filter_Criteria_project_selector = md_Filter_Criteria.Fields().ByName("project_selector") - fd_Filter_Criteria_batch_selector = md_Filter_Criteria.Fields().ByName("batch_selector") -} - -var _ protoreflect.Message = (*fastReflection_Filter_Criteria)(nil) - -type fastReflection_Filter_Criteria Filter_Criteria - -func (x *Filter_Criteria) ProtoReflect() protoreflect.Message { - return (*fastReflection_Filter_Criteria)(x) -} - -func (x *Filter_Criteria) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_types_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Filter_Criteria_messageType fastReflection_Filter_Criteria_messageType -var _ protoreflect.MessageType = fastReflection_Filter_Criteria_messageType{} - -type fastReflection_Filter_Criteria_messageType struct{} - -func (x fastReflection_Filter_Criteria_messageType) Zero() protoreflect.Message { - return (*fastReflection_Filter_Criteria)(nil) -} -func (x fastReflection_Filter_Criteria_messageType) New() protoreflect.Message { - return new(fastReflection_Filter_Criteria) -} -func (x fastReflection_Filter_Criteria_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Filter_Criteria -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Filter_Criteria) Descriptor() protoreflect.MessageDescriptor { - return md_Filter_Criteria -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Filter_Criteria) Type() protoreflect.MessageType { - return _fastReflection_Filter_Criteria_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Filter_Criteria) New() protoreflect.Message { - return new(fastReflection_Filter_Criteria) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Filter_Criteria) Interface() protoreflect.ProtoMessage { - return (*Filter_Criteria)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Filter_Criteria) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Selector != nil { - switch o := x.Selector.(type) { - case *Filter_Criteria_ClassSelector: - v := o.ClassSelector - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Filter_Criteria_class_selector, value) { - return - } - case *Filter_Criteria_ProjectSelector: - v := o.ProjectSelector - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Filter_Criteria_project_selector, value) { - return - } - case *Filter_Criteria_BatchSelector: - v := o.BatchSelector - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Filter_Criteria_batch_selector, value) { - return - } - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Filter_Criteria) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.Filter.Criteria.class_selector": - if x.Selector == nil { - return false - } else if _, ok := x.Selector.(*Filter_Criteria_ClassSelector); ok { - return true - } else { - return false - } - case "regen.ecocredit.marketplace.v1.Filter.Criteria.project_selector": - if x.Selector == nil { - return false - } else if _, ok := x.Selector.(*Filter_Criteria_ProjectSelector); ok { - return true - } else { - return false - } - case "regen.ecocredit.marketplace.v1.Filter.Criteria.batch_selector": - if x.Selector == nil { - return false - } else if _, ok := x.Selector.(*Filter_Criteria_BatchSelector); ok { - return true - } else { - return false - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.Filter.Criteria")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.Filter.Criteria does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Filter_Criteria) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.Filter.Criteria.class_selector": - x.Selector = nil - case "regen.ecocredit.marketplace.v1.Filter.Criteria.project_selector": - x.Selector = nil - case "regen.ecocredit.marketplace.v1.Filter.Criteria.batch_selector": - x.Selector = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.Filter.Criteria")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.Filter.Criteria does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Filter_Criteria) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.Filter.Criteria.class_selector": - if x.Selector == nil { - return protoreflect.ValueOfMessage((*ClassSelector)(nil).ProtoReflect()) - } else if v, ok := x.Selector.(*Filter_Criteria_ClassSelector); ok { - return protoreflect.ValueOfMessage(v.ClassSelector.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ClassSelector)(nil).ProtoReflect()) - } - case "regen.ecocredit.marketplace.v1.Filter.Criteria.project_selector": - if x.Selector == nil { - return protoreflect.ValueOfMessage((*ProjectSelector)(nil).ProtoReflect()) - } else if v, ok := x.Selector.(*Filter_Criteria_ProjectSelector); ok { - return protoreflect.ValueOfMessage(v.ProjectSelector.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ProjectSelector)(nil).ProtoReflect()) - } - case "regen.ecocredit.marketplace.v1.Filter.Criteria.batch_selector": - if x.Selector == nil { - return protoreflect.ValueOfMessage((*BatchSelector)(nil).ProtoReflect()) - } else if v, ok := x.Selector.(*Filter_Criteria_BatchSelector); ok { - return protoreflect.ValueOfMessage(v.BatchSelector.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*BatchSelector)(nil).ProtoReflect()) - } - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.Filter.Criteria")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.Filter.Criteria does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Filter_Criteria) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.Filter.Criteria.class_selector": - cv := value.Message().Interface().(*ClassSelector) - x.Selector = &Filter_Criteria_ClassSelector{ClassSelector: cv} - case "regen.ecocredit.marketplace.v1.Filter.Criteria.project_selector": - cv := value.Message().Interface().(*ProjectSelector) - x.Selector = &Filter_Criteria_ProjectSelector{ProjectSelector: cv} - case "regen.ecocredit.marketplace.v1.Filter.Criteria.batch_selector": - cv := value.Message().Interface().(*BatchSelector) - x.Selector = &Filter_Criteria_BatchSelector{BatchSelector: cv} - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.Filter.Criteria")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.Filter.Criteria does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Filter_Criteria) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.Filter.Criteria.class_selector": - if x.Selector == nil { - value := &ClassSelector{} - oneofValue := &Filter_Criteria_ClassSelector{ClassSelector: value} - x.Selector = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Selector.(type) { - case *Filter_Criteria_ClassSelector: - return protoreflect.ValueOfMessage(m.ClassSelector.ProtoReflect()) - default: - value := &ClassSelector{} - oneofValue := &Filter_Criteria_ClassSelector{ClassSelector: value} - x.Selector = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "regen.ecocredit.marketplace.v1.Filter.Criteria.project_selector": - if x.Selector == nil { - value := &ProjectSelector{} - oneofValue := &Filter_Criteria_ProjectSelector{ProjectSelector: value} - x.Selector = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Selector.(type) { - case *Filter_Criteria_ProjectSelector: - return protoreflect.ValueOfMessage(m.ProjectSelector.ProtoReflect()) - default: - value := &ProjectSelector{} - oneofValue := &Filter_Criteria_ProjectSelector{ProjectSelector: value} - x.Selector = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "regen.ecocredit.marketplace.v1.Filter.Criteria.batch_selector": - if x.Selector == nil { - value := &BatchSelector{} - oneofValue := &Filter_Criteria_BatchSelector{BatchSelector: value} - x.Selector = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Selector.(type) { - case *Filter_Criteria_BatchSelector: - return protoreflect.ValueOfMessage(m.BatchSelector.ProtoReflect()) - default: - value := &BatchSelector{} - oneofValue := &Filter_Criteria_BatchSelector{BatchSelector: value} - x.Selector = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.Filter.Criteria")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.Filter.Criteria does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Filter_Criteria) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.Filter.Criteria.class_selector": - value := &ClassSelector{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.Filter.Criteria.project_selector": - value := &ProjectSelector{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.Filter.Criteria.batch_selector": - value := &BatchSelector{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.Filter.Criteria")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.Filter.Criteria does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Filter_Criteria) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "regen.ecocredit.marketplace.v1.Filter.Criteria.selector": - if x.Selector == nil { - return nil - } - switch x.Selector.(type) { - case *Filter_Criteria_ClassSelector: - return x.Descriptor().Fields().ByName("class_selector") - case *Filter_Criteria_ProjectSelector: - return x.Descriptor().Fields().ByName("project_selector") - case *Filter_Criteria_BatchSelector: - return x.Descriptor().Fields().ByName("batch_selector") - } - default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.Filter.Criteria", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Filter_Criteria) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Filter_Criteria) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Filter_Criteria) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Filter_Criteria) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Filter_Criteria) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - switch x := x.Selector.(type) { - case *Filter_Criteria_ClassSelector: - if x == nil { - break - } - l = options.Size(x.ClassSelector) - n += 1 + l + runtime.Sov(uint64(l)) - case *Filter_Criteria_ProjectSelector: - if x == nil { - break - } - l = options.Size(x.ProjectSelector) - n += 1 + l + runtime.Sov(uint64(l)) - case *Filter_Criteria_BatchSelector: - if x == nil { - break - } - l = options.Size(x.BatchSelector) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Filter_Criteria) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - switch x := x.Selector.(type) { - case *Filter_Criteria_ClassSelector: - encoded, err := options.Marshal(x.ClassSelector) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - case *Filter_Criteria_ProjectSelector: - encoded, err := options.Marshal(x.ProjectSelector) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - case *Filter_Criteria_BatchSelector: - encoded, err := options.Marshal(x.BatchSelector) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Filter_Criteria) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Filter_Criteria: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Filter_Criteria: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClassSelector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - v := &ClassSelector{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Selector = &Filter_Criteria_ClassSelector{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProjectSelector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - v := &ProjectSelector{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Selector = &Filter_Criteria_ProjectSelector{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BatchSelector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - v := &BatchSelector{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Selector = &Filter_Criteria_BatchSelector{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ClassSelector protoreflect.MessageDescriptor - fd_ClassSelector_class_id protoreflect.FieldDescriptor - fd_ClassSelector_project_location protoreflect.FieldDescriptor - fd_ClassSelector_min_start_date protoreflect.FieldDescriptor - fd_ClassSelector_max_end_date protoreflect.FieldDescriptor -) - -func init() { - file_regen_ecocredit_marketplace_v1_types_proto_init() - md_ClassSelector = File_regen_ecocredit_marketplace_v1_types_proto.Messages().ByName("ClassSelector") - fd_ClassSelector_class_id = md_ClassSelector.Fields().ByName("class_id") - fd_ClassSelector_project_location = md_ClassSelector.Fields().ByName("project_location") - fd_ClassSelector_min_start_date = md_ClassSelector.Fields().ByName("min_start_date") - fd_ClassSelector_max_end_date = md_ClassSelector.Fields().ByName("max_end_date") -} - -var _ protoreflect.Message = (*fastReflection_ClassSelector)(nil) - -type fastReflection_ClassSelector ClassSelector - -func (x *ClassSelector) ProtoReflect() protoreflect.Message { - return (*fastReflection_ClassSelector)(x) -} - -func (x *ClassSelector) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ClassSelector_messageType fastReflection_ClassSelector_messageType -var _ protoreflect.MessageType = fastReflection_ClassSelector_messageType{} - -type fastReflection_ClassSelector_messageType struct{} - -func (x fastReflection_ClassSelector_messageType) Zero() protoreflect.Message { - return (*fastReflection_ClassSelector)(nil) -} -func (x fastReflection_ClassSelector_messageType) New() protoreflect.Message { - return new(fastReflection_ClassSelector) -} -func (x fastReflection_ClassSelector_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ClassSelector -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ClassSelector) Descriptor() protoreflect.MessageDescriptor { - return md_ClassSelector -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ClassSelector) Type() protoreflect.MessageType { - return _fastReflection_ClassSelector_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ClassSelector) New() protoreflect.Message { - return new(fastReflection_ClassSelector) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ClassSelector) Interface() protoreflect.ProtoMessage { - return (*ClassSelector)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ClassSelector) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ClassId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ClassId) - if !f(fd_ClassSelector_class_id, value) { - return - } - } - if x.ProjectLocation != "" { - value := protoreflect.ValueOfString(x.ProjectLocation) - if !f(fd_ClassSelector_project_location, value) { - return - } - } - if x.MinStartDate != nil { - value := protoreflect.ValueOfMessage(x.MinStartDate.ProtoReflect()) - if !f(fd_ClassSelector_min_start_date, value) { - return - } - } - if x.MaxEndDate != nil { - value := protoreflect.ValueOfMessage(x.MaxEndDate.ProtoReflect()) - if !f(fd_ClassSelector_max_end_date, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ClassSelector) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.ClassSelector.class_id": - return x.ClassId != uint64(0) - case "regen.ecocredit.marketplace.v1.ClassSelector.project_location": - return x.ProjectLocation != "" - case "regen.ecocredit.marketplace.v1.ClassSelector.min_start_date": - return x.MinStartDate != nil - case "regen.ecocredit.marketplace.v1.ClassSelector.max_end_date": - return x.MaxEndDate != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.ClassSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.ClassSelector does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ClassSelector) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.ClassSelector.class_id": - x.ClassId = uint64(0) - case "regen.ecocredit.marketplace.v1.ClassSelector.project_location": - x.ProjectLocation = "" - case "regen.ecocredit.marketplace.v1.ClassSelector.min_start_date": - x.MinStartDate = nil - case "regen.ecocredit.marketplace.v1.ClassSelector.max_end_date": - x.MaxEndDate = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.ClassSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.ClassSelector does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ClassSelector) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.ClassSelector.class_id": - value := x.ClassId - return protoreflect.ValueOfUint64(value) - case "regen.ecocredit.marketplace.v1.ClassSelector.project_location": - value := x.ProjectLocation - return protoreflect.ValueOfString(value) - case "regen.ecocredit.marketplace.v1.ClassSelector.min_start_date": - value := x.MinStartDate - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.ClassSelector.max_end_date": - value := x.MaxEndDate - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.ClassSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.ClassSelector does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ClassSelector) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.ClassSelector.class_id": - x.ClassId = value.Uint() - case "regen.ecocredit.marketplace.v1.ClassSelector.project_location": - x.ProjectLocation = value.Interface().(string) - case "regen.ecocredit.marketplace.v1.ClassSelector.min_start_date": - x.MinStartDate = value.Message().Interface().(*timestamppb.Timestamp) - case "regen.ecocredit.marketplace.v1.ClassSelector.max_end_date": - x.MaxEndDate = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.ClassSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.ClassSelector does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ClassSelector) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.ClassSelector.min_start_date": - if x.MinStartDate == nil { - x.MinStartDate = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.MinStartDate.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.ClassSelector.max_end_date": - if x.MaxEndDate == nil { - x.MaxEndDate = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.MaxEndDate.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.ClassSelector.class_id": - panic(fmt.Errorf("field class_id of message regen.ecocredit.marketplace.v1.ClassSelector is not mutable")) - case "regen.ecocredit.marketplace.v1.ClassSelector.project_location": - panic(fmt.Errorf("field project_location of message regen.ecocredit.marketplace.v1.ClassSelector is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.ClassSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.ClassSelector does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ClassSelector) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.ClassSelector.class_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "regen.ecocredit.marketplace.v1.ClassSelector.project_location": - return protoreflect.ValueOfString("") - case "regen.ecocredit.marketplace.v1.ClassSelector.min_start_date": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.ClassSelector.max_end_date": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.ClassSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.ClassSelector does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ClassSelector) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.ClassSelector", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ClassSelector) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ClassSelector) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ClassSelector) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ClassSelector) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ClassSelector) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.ClassId != 0 { - n += 1 + runtime.Sov(uint64(x.ClassId)) - } - l = len(x.ProjectLocation) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.MinStartDate != nil { - l = options.Size(x.MinStartDate) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.MaxEndDate != nil { - l = options.Size(x.MaxEndDate) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ClassSelector) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.MaxEndDate != nil { - encoded, err := options.Marshal(x.MaxEndDate) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.MinStartDate != nil { - encoded, err := options.Marshal(x.MinStartDate) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.ProjectLocation) > 0 { - i -= len(x.ProjectLocation) - copy(dAtA[i:], x.ProjectLocation) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ProjectLocation))) - i-- - dAtA[i] = 0x12 - } - if x.ClassId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ClassId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ClassSelector) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ClassSelector: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ClassSelector: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) - } - x.ClassId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ClassId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProjectLocation", 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.ProjectLocation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinStartDate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.MinStartDate == nil { - x.MinStartDate = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MinStartDate); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxEndDate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.MaxEndDate == nil { - x.MaxEndDate = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MaxEndDate); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ProjectSelector protoreflect.MessageDescriptor - fd_ProjectSelector_project_id protoreflect.FieldDescriptor - fd_ProjectSelector_min_start_date protoreflect.FieldDescriptor - fd_ProjectSelector_max_end_date protoreflect.FieldDescriptor -) - -func init() { - file_regen_ecocredit_marketplace_v1_types_proto_init() - md_ProjectSelector = File_regen_ecocredit_marketplace_v1_types_proto.Messages().ByName("ProjectSelector") - fd_ProjectSelector_project_id = md_ProjectSelector.Fields().ByName("project_id") - fd_ProjectSelector_min_start_date = md_ProjectSelector.Fields().ByName("min_start_date") - fd_ProjectSelector_max_end_date = md_ProjectSelector.Fields().ByName("max_end_date") -} - -var _ protoreflect.Message = (*fastReflection_ProjectSelector)(nil) - -type fastReflection_ProjectSelector ProjectSelector - -func (x *ProjectSelector) ProtoReflect() protoreflect.Message { - return (*fastReflection_ProjectSelector)(x) -} - -func (x *ProjectSelector) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_types_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ProjectSelector_messageType fastReflection_ProjectSelector_messageType -var _ protoreflect.MessageType = fastReflection_ProjectSelector_messageType{} - -type fastReflection_ProjectSelector_messageType struct{} - -func (x fastReflection_ProjectSelector_messageType) Zero() protoreflect.Message { - return (*fastReflection_ProjectSelector)(nil) -} -func (x fastReflection_ProjectSelector_messageType) New() protoreflect.Message { - return new(fastReflection_ProjectSelector) -} -func (x fastReflection_ProjectSelector_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ProjectSelector -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ProjectSelector) Descriptor() protoreflect.MessageDescriptor { - return md_ProjectSelector -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ProjectSelector) Type() protoreflect.MessageType { - return _fastReflection_ProjectSelector_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ProjectSelector) New() protoreflect.Message { - return new(fastReflection_ProjectSelector) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ProjectSelector) Interface() protoreflect.ProtoMessage { - return (*ProjectSelector)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ProjectSelector) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProjectId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProjectId) - if !f(fd_ProjectSelector_project_id, value) { - return - } - } - if x.MinStartDate != nil { - value := protoreflect.ValueOfMessage(x.MinStartDate.ProtoReflect()) - if !f(fd_ProjectSelector_min_start_date, value) { - return - } - } - if x.MaxEndDate != nil { - value := protoreflect.ValueOfMessage(x.MaxEndDate.ProtoReflect()) - if !f(fd_ProjectSelector_max_end_date, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ProjectSelector) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.ProjectSelector.project_id": - return x.ProjectId != uint64(0) - case "regen.ecocredit.marketplace.v1.ProjectSelector.min_start_date": - return x.MinStartDate != nil - case "regen.ecocredit.marketplace.v1.ProjectSelector.max_end_date": - return x.MaxEndDate != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.ProjectSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.ProjectSelector does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ProjectSelector) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.ProjectSelector.project_id": - x.ProjectId = uint64(0) - case "regen.ecocredit.marketplace.v1.ProjectSelector.min_start_date": - x.MinStartDate = nil - case "regen.ecocredit.marketplace.v1.ProjectSelector.max_end_date": - x.MaxEndDate = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.ProjectSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.ProjectSelector does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ProjectSelector) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.ProjectSelector.project_id": - value := x.ProjectId - return protoreflect.ValueOfUint64(value) - case "regen.ecocredit.marketplace.v1.ProjectSelector.min_start_date": - value := x.MinStartDate - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.ProjectSelector.max_end_date": - value := x.MaxEndDate - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.ProjectSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.ProjectSelector does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ProjectSelector) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.ProjectSelector.project_id": - x.ProjectId = value.Uint() - case "regen.ecocredit.marketplace.v1.ProjectSelector.min_start_date": - x.MinStartDate = value.Message().Interface().(*timestamppb.Timestamp) - case "regen.ecocredit.marketplace.v1.ProjectSelector.max_end_date": - x.MaxEndDate = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.ProjectSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.ProjectSelector does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ProjectSelector) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.ProjectSelector.min_start_date": - if x.MinStartDate == nil { - x.MinStartDate = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.MinStartDate.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.ProjectSelector.max_end_date": - if x.MaxEndDate == nil { - x.MaxEndDate = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.MaxEndDate.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.ProjectSelector.project_id": - panic(fmt.Errorf("field project_id of message regen.ecocredit.marketplace.v1.ProjectSelector is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.ProjectSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.ProjectSelector does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ProjectSelector) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.ProjectSelector.project_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "regen.ecocredit.marketplace.v1.ProjectSelector.min_start_date": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "regen.ecocredit.marketplace.v1.ProjectSelector.max_end_date": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.ProjectSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.ProjectSelector does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ProjectSelector) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.ProjectSelector", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ProjectSelector) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ProjectSelector) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ProjectSelector) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ProjectSelector) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ProjectSelector) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.ProjectId != 0 { - n += 1 + runtime.Sov(uint64(x.ProjectId)) - } - if x.MinStartDate != nil { - l = options.Size(x.MinStartDate) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.MaxEndDate != nil { - l = options.Size(x.MaxEndDate) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ProjectSelector) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.MaxEndDate != nil { - encoded, err := options.Marshal(x.MaxEndDate) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.MinStartDate != nil { - encoded, err := options.Marshal(x.MinStartDate) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.ProjectId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProjectId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ProjectSelector) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ProjectSelector: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ProjectSelector: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProjectId", wireType) - } - x.ProjectId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProjectId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinStartDate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.MinStartDate == nil { - x.MinStartDate = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MinStartDate); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxEndDate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.MaxEndDate == nil { - x.MaxEndDate = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MaxEndDate); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_BatchSelector protoreflect.MessageDescriptor - fd_BatchSelector_batch_id protoreflect.FieldDescriptor -) - -func init() { - file_regen_ecocredit_marketplace_v1_types_proto_init() - md_BatchSelector = File_regen_ecocredit_marketplace_v1_types_proto.Messages().ByName("BatchSelector") - fd_BatchSelector_batch_id = md_BatchSelector.Fields().ByName("batch_id") -} - -var _ protoreflect.Message = (*fastReflection_BatchSelector)(nil) - -type fastReflection_BatchSelector BatchSelector - -func (x *BatchSelector) ProtoReflect() protoreflect.Message { - return (*fastReflection_BatchSelector)(x) -} - -func (x *BatchSelector) slowProtoReflect() protoreflect.Message { - mi := &file_regen_ecocredit_marketplace_v1_types_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_BatchSelector_messageType fastReflection_BatchSelector_messageType -var _ protoreflect.MessageType = fastReflection_BatchSelector_messageType{} - -type fastReflection_BatchSelector_messageType struct{} - -func (x fastReflection_BatchSelector_messageType) Zero() protoreflect.Message { - return (*fastReflection_BatchSelector)(nil) -} -func (x fastReflection_BatchSelector_messageType) New() protoreflect.Message { - return new(fastReflection_BatchSelector) -} -func (x fastReflection_BatchSelector_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BatchSelector -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BatchSelector) Descriptor() protoreflect.MessageDescriptor { - return md_BatchSelector -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_BatchSelector) Type() protoreflect.MessageType { - return _fastReflection_BatchSelector_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BatchSelector) New() protoreflect.Message { - return new(fastReflection_BatchSelector) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BatchSelector) Interface() protoreflect.ProtoMessage { - return (*BatchSelector)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_BatchSelector) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BatchId != uint64(0) { - value := protoreflect.ValueOfUint64(x.BatchId) - if !f(fd_BatchSelector_batch_id, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_BatchSelector) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.BatchSelector.batch_id": - return x.BatchId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BatchSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BatchSelector does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BatchSelector) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.BatchSelector.batch_id": - x.BatchId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BatchSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BatchSelector does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_BatchSelector) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.ecocredit.marketplace.v1.BatchSelector.batch_id": - value := x.BatchId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BatchSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BatchSelector does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BatchSelector) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.BatchSelector.batch_id": - x.BatchId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BatchSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BatchSelector does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BatchSelector) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.BatchSelector.batch_id": - panic(fmt.Errorf("field batch_id of message regen.ecocredit.marketplace.v1.BatchSelector is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BatchSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BatchSelector does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_BatchSelector) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.ecocredit.marketplace.v1.BatchSelector.batch_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.marketplace.v1.BatchSelector")) - } - panic(fmt.Errorf("message regen.ecocredit.marketplace.v1.BatchSelector does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_BatchSelector) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.marketplace.v1.BatchSelector", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_BatchSelector) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BatchSelector) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_BatchSelector) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_BatchSelector) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BatchSelector) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.BatchId != 0 { - n += 1 + runtime.Sov(uint64(x.BatchId)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*BatchSelector) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.BatchId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BatchId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*BatchSelector) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BatchSelector: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BatchSelector: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BatchId", wireType) - } - x.BatchId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.BatchId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: regen/ecocredit/marketplace/v1/types.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Filter is used to create filtered buy orders which match credit batch -// sell orders based on selection criteria rather than matching individual -// sell orders -type Filter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // or is a list of criteria for matching credit batches. A credit which - // matches this filter must match at least one of these criteria. - Or []*Filter_Criteria `protobuf:"bytes,1,rep,name=or,proto3" json:"or,omitempty"` -} - -func (x *Filter) Reset() { - *x = Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Filter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Filter) ProtoMessage() {} - -// Deprecated: Use Filter.ProtoReflect.Descriptor instead. -func (*Filter) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_types_proto_rawDescGZIP(), []int{0} -} - -func (x *Filter) GetOr() []*Filter_Criteria { - if x != nil { - return x.Or - } - return nil -} - -// ClassSelector is a selector for a credit class. -type ClassSelector struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // class_id is the credit class ID. - ClassId uint64 `protobuf:"varint,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - // project_location can be specified in three levels of granularity: - // country, sub-national-code, or postal code. If just country is given, - // for instance "US" then any credits in the "US" will be matched even - // their project location is more specific, ex. "US-NY 12345". If - // a country, sub-national-code and postal code are all provided then - // only projects in that postal code will match. - ProjectLocation string `protobuf:"bytes,2,opt,name=project_location,json=projectLocation,proto3" json:"project_location,omitempty"` - // start_date is the beginning of the period during which a credit batch - // was quantified and verified. If it is empty then there is no start date - // limit. - MinStartDate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=min_start_date,json=minStartDate,proto3" json:"min_start_date,omitempty"` - // max_end_date is the end of the period during which a credit batch was - // quantified and verified. If it is empty then there is no end date - // limit. - MaxEndDate *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=max_end_date,json=maxEndDate,proto3" json:"max_end_date,omitempty"` -} - -func (x *ClassSelector) Reset() { - *x = ClassSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClassSelector) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClassSelector) ProtoMessage() {} - -// Deprecated: Use ClassSelector.ProtoReflect.Descriptor instead. -func (*ClassSelector) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_types_proto_rawDescGZIP(), []int{1} -} - -func (x *ClassSelector) GetClassId() uint64 { - if x != nil { - return x.ClassId - } - return 0 -} - -func (x *ClassSelector) GetProjectLocation() string { - if x != nil { - return x.ProjectLocation - } - return "" -} - -func (x *ClassSelector) GetMinStartDate() *timestamppb.Timestamp { - if x != nil { - return x.MinStartDate - } - return nil -} - -func (x *ClassSelector) GetMaxEndDate() *timestamppb.Timestamp { - if x != nil { - return x.MaxEndDate - } - return nil -} - -// ProjectSelector is a selector for a project. -type ProjectSelector struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // project_id is the project ID. - ProjectId uint64 `protobuf:"varint,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // start_date is the beginning of the period during which a credit batch - // was quantified and verified. If it is empty then there is no start date - // limit. - MinStartDate *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=min_start_date,json=minStartDate,proto3" json:"min_start_date,omitempty"` - // max_end_date is the end of the period during which a credit batch was - // quantified and verified. If it is empty then there is no end date - // limit. - MaxEndDate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=max_end_date,json=maxEndDate,proto3" json:"max_end_date,omitempty"` -} - -func (x *ProjectSelector) Reset() { - *x = ProjectSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_types_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProjectSelector) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProjectSelector) ProtoMessage() {} - -// Deprecated: Use ProjectSelector.ProtoReflect.Descriptor instead. -func (*ProjectSelector) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_types_proto_rawDescGZIP(), []int{2} -} - -func (x *ProjectSelector) GetProjectId() uint64 { - if x != nil { - return x.ProjectId - } - return 0 -} - -func (x *ProjectSelector) GetMinStartDate() *timestamppb.Timestamp { - if x != nil { - return x.MinStartDate - } - return nil -} - -func (x *ProjectSelector) GetMaxEndDate() *timestamppb.Timestamp { - if x != nil { - return x.MaxEndDate - } - return nil -} - -// BatchSelector is a selector for a credit batch. -type BatchSelector struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // batch_id is the credit batch ID. - BatchId uint64 `protobuf:"varint,1,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"` -} - -func (x *BatchSelector) Reset() { - *x = BatchSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_types_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BatchSelector) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BatchSelector) ProtoMessage() {} - -// Deprecated: Use BatchSelector.ProtoReflect.Descriptor instead. -func (*BatchSelector) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_types_proto_rawDescGZIP(), []int{3} -} - -func (x *BatchSelector) GetBatchId() uint64 { - if x != nil { - return x.BatchId - } - return 0 -} - -// Criteria is a simple filter criteria for matching a credit batch. -type Filter_Criteria struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Valid selector types are all - // attributes which are assigned to credit batches by some authority such - // as the credit issuer or a curator. Requiring some authority-based - // selector ensures that buy orders cannot just match some randomly issued - // credit based on location and dates. - // - // Types that are assignable to Selector: - // *Filter_Criteria_ClassSelector - // *Filter_Criteria_ProjectSelector - // *Filter_Criteria_BatchSelector - Selector isFilter_Criteria_Selector `protobuf_oneof:"selector"` -} - -func (x *Filter_Criteria) Reset() { - *x = Filter_Criteria{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_ecocredit_marketplace_v1_types_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Filter_Criteria) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Filter_Criteria) ProtoMessage() {} - -// Deprecated: Use Filter_Criteria.ProtoReflect.Descriptor instead. -func (*Filter_Criteria) Descriptor() ([]byte, []int) { - return file_regen_ecocredit_marketplace_v1_types_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Filter_Criteria) GetSelector() isFilter_Criteria_Selector { - if x != nil { - return x.Selector - } - return nil -} - -func (x *Filter_Criteria) GetClassSelector() *ClassSelector { - if x, ok := x.GetSelector().(*Filter_Criteria_ClassSelector); ok { - return x.ClassSelector - } - return nil -} - -func (x *Filter_Criteria) GetProjectSelector() *ProjectSelector { - if x, ok := x.GetSelector().(*Filter_Criteria_ProjectSelector); ok { - return x.ProjectSelector - } - return nil -} - -func (x *Filter_Criteria) GetBatchSelector() *BatchSelector { - if x, ok := x.GetSelector().(*Filter_Criteria_BatchSelector); ok { - return x.BatchSelector - } - return nil -} - -type isFilter_Criteria_Selector interface { - isFilter_Criteria_Selector() -} - -type Filter_Criteria_ClassSelector struct { - // class_selector is a credit class selector. - ClassSelector *ClassSelector `protobuf:"bytes,1,opt,name=class_selector,json=classSelector,proto3,oneof"` -} - -type Filter_Criteria_ProjectSelector struct { - // project_selector is a project selector. - ProjectSelector *ProjectSelector `protobuf:"bytes,2,opt,name=project_selector,json=projectSelector,proto3,oneof"` -} - -type Filter_Criteria_BatchSelector struct { - // batch_selector is a credit batch selector. - BatchSelector *BatchSelector `protobuf:"bytes,3,opt,name=batch_selector,json=batchSelector,proto3,oneof"` -} - -func (*Filter_Criteria_ClassSelector) isFilter_Criteria_Selector() {} - -func (*Filter_Criteria_ProjectSelector) isFilter_Criteria_Selector() {} - -func (*Filter_Criteria_BatchSelector) isFilter_Criteria_Selector() {} - -var File_regen_ecocredit_marketplace_v1_types_proto protoreflect.FileDescriptor - -var file_regen_ecocredit_marketplace_v1_types_proto_rawDesc = []byte{ - 0x0a, 0x2a, 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, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 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, 0x1a, 0x1f, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf0, 0x02, - 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x02, 0x6f, 0x72, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 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, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x69, - 0x74, 0x65, 0x72, 0x69, 0x61, 0x52, 0x02, 0x6f, 0x72, 0x1a, 0xa4, 0x02, 0x0a, 0x08, 0x43, 0x72, - 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x56, 0x0a, 0x0e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, - 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, - 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, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, - 0x0d, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x5c, - 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 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, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x56, 0x0a, 0x0e, - 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 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, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x22, 0xd5, 0x01, 0x0a, 0x0d, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x12, 0x29, 0x0a, - 0x10, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0e, 0x6d, 0x69, 0x6e, 0x5f, - 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, 0x52, 0x0c, 0x6d, 0x69, - 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x6d, 0x61, - 0x78, 0x5f, 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, 0x52, 0x0a, 0x6d, 0x61, - 0x78, 0x45, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0e, 0x6d, - 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 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, 0x52, - 0x0c, 0x6d, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, - 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x6e, 0x64, 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, 0x52, - 0x0a, 0x6d, 0x61, 0x78, 0x45, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x22, 0x2a, 0x0a, 0x0d, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, - 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, - 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x42, 0xa3, 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, 0x0a, - 0x54, 0x79, 0x70, 0x65, 0x73, 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 ( - file_regen_ecocredit_marketplace_v1_types_proto_rawDescOnce sync.Once - file_regen_ecocredit_marketplace_v1_types_proto_rawDescData = file_regen_ecocredit_marketplace_v1_types_proto_rawDesc -) - -func file_regen_ecocredit_marketplace_v1_types_proto_rawDescGZIP() []byte { - file_regen_ecocredit_marketplace_v1_types_proto_rawDescOnce.Do(func() { - file_regen_ecocredit_marketplace_v1_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_regen_ecocredit_marketplace_v1_types_proto_rawDescData) - }) - return file_regen_ecocredit_marketplace_v1_types_proto_rawDescData -} - -var file_regen_ecocredit_marketplace_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_regen_ecocredit_marketplace_v1_types_proto_goTypes = []interface{}{ - (*Filter)(nil), // 0: regen.ecocredit.marketplace.v1.Filter - (*ClassSelector)(nil), // 1: regen.ecocredit.marketplace.v1.ClassSelector - (*ProjectSelector)(nil), // 2: regen.ecocredit.marketplace.v1.ProjectSelector - (*BatchSelector)(nil), // 3: regen.ecocredit.marketplace.v1.BatchSelector - (*Filter_Criteria)(nil), // 4: regen.ecocredit.marketplace.v1.Filter.Criteria - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp -} -var file_regen_ecocredit_marketplace_v1_types_proto_depIdxs = []int32{ - 4, // 0: regen.ecocredit.marketplace.v1.Filter.or:type_name -> regen.ecocredit.marketplace.v1.Filter.Criteria - 5, // 1: regen.ecocredit.marketplace.v1.ClassSelector.min_start_date:type_name -> google.protobuf.Timestamp - 5, // 2: regen.ecocredit.marketplace.v1.ClassSelector.max_end_date:type_name -> google.protobuf.Timestamp - 5, // 3: regen.ecocredit.marketplace.v1.ProjectSelector.min_start_date:type_name -> google.protobuf.Timestamp - 5, // 4: regen.ecocredit.marketplace.v1.ProjectSelector.max_end_date:type_name -> google.protobuf.Timestamp - 1, // 5: regen.ecocredit.marketplace.v1.Filter.Criteria.class_selector:type_name -> regen.ecocredit.marketplace.v1.ClassSelector - 2, // 6: regen.ecocredit.marketplace.v1.Filter.Criteria.project_selector:type_name -> regen.ecocredit.marketplace.v1.ProjectSelector - 3, // 7: regen.ecocredit.marketplace.v1.Filter.Criteria.batch_selector:type_name -> regen.ecocredit.marketplace.v1.BatchSelector - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_regen_ecocredit_marketplace_v1_types_proto_init() } -func file_regen_ecocredit_marketplace_v1_types_proto_init() { - if File_regen_ecocredit_marketplace_v1_types_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_regen_ecocredit_marketplace_v1_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_regen_ecocredit_marketplace_v1_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClassSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_regen_ecocredit_marketplace_v1_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProjectSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_regen_ecocredit_marketplace_v1_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BatchSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_regen_ecocredit_marketplace_v1_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Filter_Criteria); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_regen_ecocredit_marketplace_v1_types_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*Filter_Criteria_ClassSelector)(nil), - (*Filter_Criteria_ProjectSelector)(nil), - (*Filter_Criteria_BatchSelector)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_regen_ecocredit_marketplace_v1_types_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_regen_ecocredit_marketplace_v1_types_proto_goTypes, - DependencyIndexes: file_regen_ecocredit_marketplace_v1_types_proto_depIdxs, - MessageInfos: file_regen_ecocredit_marketplace_v1_types_proto_msgTypes, - }.Build() - File_regen_ecocredit_marketplace_v1_types_proto = out.File - file_regen_ecocredit_marketplace_v1_types_proto_rawDesc = nil - file_regen_ecocredit_marketplace_v1_types_proto_goTypes = nil - file_regen_ecocredit_marketplace_v1_types_proto_depIdxs = nil -} diff --git a/proto/regen/ecocredit/marketplace/v1/events.proto b/proto/regen/ecocredit/marketplace/v1/events.proto index 5cb056bf65..6ca97323af 100644 --- a/proto/regen/ecocredit/marketplace/v1/events.proto +++ b/proto/regen/ecocredit/marketplace/v1/events.proto @@ -63,66 +63,6 @@ message EventUpdateSellOrder { google.protobuf.Timestamp new_expiration = 7 [ (gogoproto.stdtime) = true ]; } -// EventBuyOrderCreated is an event emitted when a buy order is created. -message EventBuyOrderCreated { - - // buy_order_id is the unique ID of buy order. - uint64 buy_order_id = 1; - - // sell_order_id is the sell order ID against which the buyer is trying to - // buy. - uint64 sell_order_id = 2; - - // quantity is the quantity of credits to buy. If the quantity of credits - // available is less than this amount the order will be partially filled - // unless disable_partial_fill is true. - string quantity = 3; - - // bid price is the bid price for this buy order. A credit unit will be - // settled at a purchase price that is no more than the bid price. The - // buy order will fail if the buyer does not have enough funds available - // to complete the purchase. - cosmos.base.v1beta1.Coin bid_price = 4; - - // disable_auto_retire allows auto-retirement to be disabled. If it is set to - // true the credits will not auto-retire and can be resold assuming that the - // corresponding sell order has auto-retirement disabled. If the sell order - // hasn't disabled auto-retirement and the buy order tries to disable it, - // that buy order will fail. - bool disable_auto_retire = 5; - - // disable_partial_fill disables the default behavior of partially filling - // buy orders if the requested quantity is not available. - bool disable_partial_fill = 6; - - // retirement_location is the optional retirement location for the credits - // which will be used only if disable_auto_retire is false. - string retirement_location = 7; - - // expiration is the optional timestamp when the buy order expires. When the - // expiration time is reached, the buy order is removed from state. - google.protobuf.Timestamp expiration = 8 [ (gogoproto.stdtime) = true ]; -} - -// EventBuyOrderFilled is an event emitted when a buy order is filled. -message EventBuyOrderFilled { - - // buy_order_id is the unique ID of the buy order. - uint64 buy_order_id = 1; - - // sell_order_id is the unique ID of the sell order. - uint64 sell_order_id = 2; - - // batch_denom is the credit batch ID of the purchased credits. - string batch_denom = 3; - - // quantity is the quantity of the purchased credits. - string quantity = 4; - - // total_price is the total price for the purchased credits. - cosmos.base.v1beta1.Coin total_price = 5; -} - // EventAllowAskDenom is an event emitted when an ask denom is added. message EventAllowAskDenom { diff --git a/proto/regen/ecocredit/marketplace/v1/query.proto b/proto/regen/ecocredit/marketplace/v1/query.proto index 1ffc74cb07..eda872c0fd 100644 --- a/proto/regen/ecocredit/marketplace/v1/query.proto +++ b/proto/regen/ecocredit/marketplace/v1/query.proto @@ -39,25 +39,6 @@ service Query { "/regen/ecocredit/marketplace/v1/sell-orders/address/{address}"; } - // BuyOrder queries a buy order by its id - rpc BuyOrder(QueryBuyOrderRequest) returns (QueryBuyOrderResponse) { - option (google.api.http).get = - "/regen/ecocredit/marketplace/v1/buy-orders/id/{buy_order_id}"; - } - - // BuyOrders queries a paginated list of all buy orders - rpc BuyOrders(QueryBuyOrdersRequest) returns (QueryBuyOrdersResponse) { - option (google.api.http).get = "/regen/ecocredit/marketplace/v1/buy-orders"; - } - - // BuyOrdersByAddress queries a paginated list of buy orders by creator - // address - rpc BuyOrdersByAddress(QueryBuyOrdersByAddressRequest) - returns (QueryBuyOrdersByAddressResponse) { - option (google.api.http).get = - "/regen/ecocredit/marketplace/v1/buy-orders/address/{address}"; - } - // AllowedDenoms queries all denoms allowed to be set in the AskPrice of a // sell order rpc AllowedDenoms(QueryAllowedDenomsRequest) @@ -136,55 +117,6 @@ message QuerySellOrdersByAddressResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryBuyOrderRequest is the Query/BuyOrder request type. -message QueryBuyOrderRequest { - // buy_order_id is the id of the buy order. - uint64 buy_order_id = 1; -} - -// QueryBuyOrderResponse is the Query/BuyOrder response type. -message QueryBuyOrderResponse { - // buy_order contains all information related to a buy order. - BuyOrder buy_order = 1; -} - -// QueryBuyOrdersRequest is the Query/BuyOrders request type. -message QueryBuyOrdersRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryBuyOrdersResponse is the Query/BuyOrders response type. -message QueryBuyOrdersResponse { - - // buy_orders is a list of buy orders. - repeated BuyOrder buy_orders = 1; - - // pagination defines an optional pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryBuyOrdersByAddressRequest is the Query/BuyOrdersByAddress request type -message QueryBuyOrdersByAddressRequest { - - // address of the buy order creator - string address = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryBuyOrdersByAddressResponse is the Query/BuyOrdersByAddress response -// type. -message QueryBuyOrdersByAddressResponse { - - // buy_orders is a list of buy orders. - repeated BuyOrder buy_orders = 1; - - // pagination defines an optional pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - // QueryAllowedDenomsRequest is the Query/AllowedDenoms request type. message QueryAllowedDenomsRequest { // pagination defines an optional pagination for the request. diff --git a/proto/regen/ecocredit/marketplace/v1/state.proto b/proto/regen/ecocredit/marketplace/v1/state.proto index 941f0efb86..c8bf8113fa 100644 --- a/proto/regen/ecocredit/marketplace/v1/state.proto +++ b/proto/regen/ecocredit/marketplace/v1/state.proto @@ -4,7 +4,6 @@ package regen.ecocredit.marketplace.v1; import "google/protobuf/timestamp.proto"; import "cosmos/orm/v1alpha1/orm.proto"; -import "regen/ecocredit/marketplace/v1/types.proto"; option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/marketplace"; @@ -53,74 +52,6 @@ message SellOrder { bool maker = 10; } -// BuyOrder represents the information for a buy order. -message BuyOrder { - option (cosmos.orm.v1alpha1.table) = { - id : 2, - primary_key : {fields : "id", auto_increment : true} - index : {id : 1 fields : "buyer"} - index : {id : 2 fields : "expiration"} - }; - - // Selection defines a buy order selection. - message Selection { - - // sum defines the type of selection. - oneof sum { - // sell_order_id is the sell order ID against which the buyer is trying to - // buy. When sell_order_id is set, this is known as a direct buy order - // because it is placed directly against a specific sell order. - uint64 sell_order_id = 1; - - // filter selects credits to buy based upon the specified filter criteria. - Filter filter = 2; - } - } - - // id is the unique ID of buy order. - uint64 id = 1; - - // buyer is the bytes address of the account that created the buy order - bytes buyer = 2; - - // selection is the buy order selection. - Selection selection = 3; - - // quantity is the decimal quantity of credits to buy. If the quantity of - // credits available is less than this amount the order will be partially - // filled unless disable_partial_fill is true. - string quantity = 4; - - // market_id is the market in which this sell order exists and specifies - // the bank_denom that ask_price corresponds to. - uint64 market_id = 5; - - // bid price is the integer bid price for this buy order. A credit unit will - // be settled at a purchase price that is no more than the bid price. The buy - // order will fail if the buyer does not have enough funds available to - // complete the purchase. - string bid_price = 6; - - // disable_auto_retire allows auto-retirement to be disabled. If it is set to - // true the credits will not auto-retire and can be resold assuming that the - // corresponding sell order has auto-retirement disabled. If the sell order - // hasn't disabled auto-retirement and the buy order tries to disable it, - // that buy order will fail. - bool disable_auto_retire = 7; - - // disable_partial_fill disables the default behavior of partially filling - // buy orders if the requested quantity is not available. - bool disable_partial_fill = 8; - - // expiration is the optional timestamp when the buy order expires. When the - // expiration time is reached, the buy order is removed from state. - google.protobuf.Timestamp expiration = 9; - - // maker indicates that this is a maker order, meaning that when it hit - // the order book, there were no matching sell orders. - bool maker = 10; -} - // AllowedDenom represents the information for an allowed ask/bid denom. message AllowedDenom { option (cosmos.orm.v1alpha1.table) = { diff --git a/proto/regen/ecocredit/marketplace/v1/tx.proto b/proto/regen/ecocredit/marketplace/v1/tx.proto index 457006042f..a662ebd9b7 100644 --- a/proto/regen/ecocredit/marketplace/v1/tx.proto +++ b/proto/regen/ecocredit/marketplace/v1/tx.proto @@ -5,7 +5,6 @@ package regen.ecocredit.marketplace.v1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "google/protobuf/timestamp.proto"; -import "regen/ecocredit/marketplace/v1/types.proto"; option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/marketplace"; @@ -22,8 +21,8 @@ service Msg { // CancelSellOrder cancels a sell order and returns the funds from escrow. rpc CancelSellOrder(MsgCancelSellOrder) returns (MsgCancelSellOrderResponse); - // Buy creates credit buy orders. - rpc Buy(MsgBuy) returns (MsgBuyResponse); + // BuyDirect purchases credits directly from the specified sell order. + rpc BuyDirect(MsgBuyDirect) returns (MsgBuyDirectResponse); // AllowAskDenom is a governance operation which authorizes a new ask denom to // be used in sell orders @@ -123,77 +122,42 @@ message MsgCancelSellOrder { // MsgCancelSellOrder is the Msg/CancelSellOrder response type. message MsgCancelSellOrderResponse {} -// MsgBuy is the Msg/Buy request type. -message MsgBuy { +// MsgBuyDirect is the Msg/BuyDirect request type. +message MsgBuyDirect { // buyer is the address of the credit buyer. string buyer = 1; - // orders are the new buy orders. + // orders is a list of orders for ecocredits. repeated Order orders = 2; - // Order is a buy order. + // Order contains the information needed to purchase an ecocredit. message Order { + // sell_order_id is the sell order ID against which the buyer is trying + // to buy. + uint64 sell_order_id = 2; - // Selection defines a buy order selection. - message Selection { + // quantity is the quantity of credits to buy. + string quantity = 3; - // sum defines the type of selection. - oneof sum { - // sell_order_id is the sell order ID against which the buyer is trying - // to buy. When sell_order_id is set, this is known as a direct buy - // order because it is placed directly against a specific sell order. - uint64 sell_order_id = 1; - - // filter selects credits to buy based upon the specified filter - // criteria. - Filter filter = 2; - } - } - - // selection is the buy order selection. - Selection selection = 1; - - // quantity is the quantity of credits to buy. If the quantity of credits - // available is less than this amount the order will be partially filled - // unless disable_partial_fill is true. - string quantity = 2; - - // bid price is the bid price for this buy order. A credit unit will be - // settled at a purchase price that is no more than the bid price. The - // buy order will fail if the buyer does not have enough funds available - // to complete the purchase. - cosmos.base.v1beta1.Coin bid_price = 3; + // bid_price is the price the buyer is willing to pay per credit. + cosmos.base.v1beta1.Coin bid_price = 4; // disable_auto_retire allows auto-retirement to be disabled. If it is set // to true the credits will not auto-retire and can be resold assuming that // the corresponding sell order has auto-retirement disabled. If the sell // order hasn't disabled auto-retirement and the buy order tries to disable // it, that buy order will fail. - bool disable_auto_retire = 4; - - // disable_partial_fill disables the default behavior of partially filling - // buy orders if the requested quantity is not available. - bool disable_partial_fill = 5; + bool disable_auto_retire = 5; // retirement_location is the optional retirement location for the credits // which will be used only if disable_auto_retire is false. string retirement_location = 6; - - // expiration is the optional timestamp when the buy order expires. When the - // expiration time is reached, the buy order is removed from state. - google.protobuf.Timestamp expiration = 7 [ (gogoproto.stdtime) = true ]; } } -// MsgBuyResponse is the Msg/Buy response type. -message MsgBuyResponse { - - // buy_order_ids are the buy order IDs of the newly created buy orders. Buy - // orders may not settle instantaneously, but rather in batches at specified - // batch epoch times. - repeated uint64 buy_order_ids = 1; -} +// MsgBuyDirectResponse is the Msg/BuyDirect response type. +message MsgBuyDirectResponse {} // MsgAllowAskDenom is the Msg/AllowAskDenom request type. message MsgAllowAskDenom { diff --git a/proto/regen/ecocredit/marketplace/v1/types.proto b/proto/regen/ecocredit/marketplace/v1/types.proto deleted file mode 100644 index 31fa5a611c..0000000000 --- a/proto/regen/ecocredit/marketplace/v1/types.proto +++ /dev/null @@ -1,82 +0,0 @@ -syntax = "proto3"; - -package regen.ecocredit.marketplace.v1; - -import "google/protobuf/timestamp.proto"; - -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/marketplace"; - -// Filter is used to create filtered buy orders which match credit batch -// sell orders based on selection criteria rather than matching individual -// sell orders -message Filter { - // or is a list of criteria for matching credit batches. A credit which - // matches this filter must match at least one of these criteria. - repeated Criteria or = 1; - - // Criteria is a simple filter criteria for matching a credit batch. - message Criteria { - // Valid selector types are all - // attributes which are assigned to credit batches by some authority such - // as the credit issuer or a curator. Requiring some authority-based - // selector ensures that buy orders cannot just match some randomly issued - // credit based on location and dates. - oneof selector { - // class_selector is a credit class selector. - ClassSelector class_selector = 1; - // project_selector is a project selector. - ProjectSelector project_selector = 2; - - // batch_selector is a credit batch selector. - BatchSelector batch_selector = 3; - } - } -} - -// ClassSelector is a selector for a credit class. -message ClassSelector { - // class_id is the credit class ID. - uint64 class_id = 1; - - // project_location can be specified in three levels of granularity: - // country, sub-national-code, or postal code. If just country is given, - // for instance "US" then any credits in the "US" will be matched even - // their project location is more specific, ex. "US-NY 12345". If - // a country, sub-national-code and postal code are all provided then - // only projects in that postal code will match. - string project_location = 2; - - // start_date is the beginning of the period during which a credit batch - // was quantified and verified. If it is empty then there is no start date - // limit. - google.protobuf.Timestamp min_start_date = 3; - - // max_end_date is the end of the period during which a credit batch was - // quantified and verified. If it is empty then there is no end date - // limit. - google.protobuf.Timestamp max_end_date = 4; -} - -// ProjectSelector is a selector for a project. -message ProjectSelector { - - // project_id is the project ID. - uint64 project_id = 1; - - // start_date is the beginning of the period during which a credit batch - // was quantified and verified. If it is empty then there is no start date - // limit. - google.protobuf.Timestamp min_start_date = 2; - - // max_end_date is the end of the period during which a credit batch was - // quantified and verified. If it is empty then there is no end date - // limit. - google.protobuf.Timestamp max_end_date = 3; -} - -// BatchSelector is a selector for a credit batch. -message BatchSelector { - - // batch_id is the credit batch ID. - uint64 batch_id = 1; -} diff --git a/x/ecocredit/marketplace/codec.go b/x/ecocredit/marketplace/codec.go index 9584556e03..9238033158 100644 --- a/x/ecocredit/marketplace/codec.go +++ b/x/ecocredit/marketplace/codec.go @@ -12,7 +12,7 @@ func RegisterTypes(registry codectypes.InterfaceRegistry) { func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgAllowAskDenom{}, "regen.marketplace/MsgAllowAskDenom", nil) - cdc.RegisterConcrete(&MsgBuy{}, "regen.marketplace/MsgBuy", nil) + cdc.RegisterConcrete(&MsgBuyDirect{}, "regen.marketplace/MsgBuyDirect", nil) cdc.RegisterConcrete(&MsgSell{}, "regen.marketplace/MsgSell", nil) cdc.RegisterConcrete(&MsgCancelSellOrder{}, "regen.marketplace/MsgCancelSellOrder", nil) cdc.RegisterConcrete(&MsgUpdateSellOrders{}, "regen.marketplace/MsgUpdateSellOrders", nil) diff --git a/x/ecocredit/marketplace/events.pb.go b/x/ecocredit/marketplace/events.pb.go index 7a042fd8fa..c78f70d11a 100644 --- a/x/ecocredit/marketplace/events.pb.go +++ b/x/ecocredit/marketplace/events.pb.go @@ -227,210 +227,6 @@ func (m *EventUpdateSellOrder) GetNewExpiration() *time.Time { return nil } -// EventBuyOrderCreated is an event emitted when a buy order is created. -type EventBuyOrderCreated struct { - // buy_order_id is the unique ID of buy order. - BuyOrderId uint64 `protobuf:"varint,1,opt,name=buy_order_id,json=buyOrderId,proto3" json:"buy_order_id,omitempty"` - // sell_order_id is the sell order ID against which the buyer is trying to - // buy. - SellOrderId uint64 `protobuf:"varint,2,opt,name=sell_order_id,json=sellOrderId,proto3" json:"sell_order_id,omitempty"` - // quantity is the quantity of credits to buy. If the quantity of credits - // available is less than this amount the order will be partially filled - // unless disable_partial_fill is true. - Quantity string `protobuf:"bytes,3,opt,name=quantity,proto3" json:"quantity,omitempty"` - // bid price is the bid price for this buy order. A credit unit will be - // settled at a purchase price that is no more than the bid price. The - // buy order will fail if the buyer does not have enough funds available - // to complete the purchase. - BidPrice *types.Coin `protobuf:"bytes,4,opt,name=bid_price,json=bidPrice,proto3" json:"bid_price,omitempty"` - // disable_auto_retire allows auto-retirement to be disabled. If it is set to - // true the credits will not auto-retire and can be resold assuming that the - // corresponding sell order has auto-retirement disabled. If the sell order - // hasn't disabled auto-retirement and the buy order tries to disable it, - // that buy order will fail. - DisableAutoRetire bool `protobuf:"varint,5,opt,name=disable_auto_retire,json=disableAutoRetire,proto3" json:"disable_auto_retire,omitempty"` - // disable_partial_fill disables the default behavior of partially filling - // buy orders if the requested quantity is not available. - DisablePartialFill bool `protobuf:"varint,6,opt,name=disable_partial_fill,json=disablePartialFill,proto3" json:"disable_partial_fill,omitempty"` - // retirement_location is the optional retirement location for the credits - // which will be used only if disable_auto_retire is false. - RetirementLocation string `protobuf:"bytes,7,opt,name=retirement_location,json=retirementLocation,proto3" json:"retirement_location,omitempty"` - // expiration is the optional timestamp when the buy order expires. When the - // expiration time is reached, the buy order is removed from state. - Expiration *time.Time `protobuf:"bytes,8,opt,name=expiration,proto3,stdtime" json:"expiration,omitempty"` -} - -func (m *EventBuyOrderCreated) Reset() { *m = EventBuyOrderCreated{} } -func (m *EventBuyOrderCreated) String() string { return proto.CompactTextString(m) } -func (*EventBuyOrderCreated) ProtoMessage() {} -func (*EventBuyOrderCreated) Descriptor() ([]byte, []int) { - return fileDescriptor_68b71b54d42cf1d9, []int{2} -} -func (m *EventBuyOrderCreated) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventBuyOrderCreated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventBuyOrderCreated.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventBuyOrderCreated) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventBuyOrderCreated.Merge(m, src) -} -func (m *EventBuyOrderCreated) XXX_Size() int { - return m.Size() -} -func (m *EventBuyOrderCreated) XXX_DiscardUnknown() { - xxx_messageInfo_EventBuyOrderCreated.DiscardUnknown(m) -} - -var xxx_messageInfo_EventBuyOrderCreated proto.InternalMessageInfo - -func (m *EventBuyOrderCreated) GetBuyOrderId() uint64 { - if m != nil { - return m.BuyOrderId - } - return 0 -} - -func (m *EventBuyOrderCreated) GetSellOrderId() uint64 { - if m != nil { - return m.SellOrderId - } - return 0 -} - -func (m *EventBuyOrderCreated) GetQuantity() string { - if m != nil { - return m.Quantity - } - return "" -} - -func (m *EventBuyOrderCreated) GetBidPrice() *types.Coin { - if m != nil { - return m.BidPrice - } - return nil -} - -func (m *EventBuyOrderCreated) GetDisableAutoRetire() bool { - if m != nil { - return m.DisableAutoRetire - } - return false -} - -func (m *EventBuyOrderCreated) GetDisablePartialFill() bool { - if m != nil { - return m.DisablePartialFill - } - return false -} - -func (m *EventBuyOrderCreated) GetRetirementLocation() string { - if m != nil { - return m.RetirementLocation - } - return "" -} - -func (m *EventBuyOrderCreated) GetExpiration() *time.Time { - if m != nil { - return m.Expiration - } - return nil -} - -// EventBuyOrderFilled is an event emitted when a buy order is filled. -type EventBuyOrderFilled struct { - // buy_order_id is the unique ID of the buy order. - BuyOrderId uint64 `protobuf:"varint,1,opt,name=buy_order_id,json=buyOrderId,proto3" json:"buy_order_id,omitempty"` - // sell_order_id is the unique ID of the sell order. - SellOrderId uint64 `protobuf:"varint,2,opt,name=sell_order_id,json=sellOrderId,proto3" json:"sell_order_id,omitempty"` - // batch_denom is the credit batch ID of the purchased credits. - BatchDenom string `protobuf:"bytes,3,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` - // quantity is the quantity of the purchased credits. - Quantity string `protobuf:"bytes,4,opt,name=quantity,proto3" json:"quantity,omitempty"` - // total_price is the total price for the purchased credits. - TotalPrice *types.Coin `protobuf:"bytes,5,opt,name=total_price,json=totalPrice,proto3" json:"total_price,omitempty"` -} - -func (m *EventBuyOrderFilled) Reset() { *m = EventBuyOrderFilled{} } -func (m *EventBuyOrderFilled) String() string { return proto.CompactTextString(m) } -func (*EventBuyOrderFilled) ProtoMessage() {} -func (*EventBuyOrderFilled) Descriptor() ([]byte, []int) { - return fileDescriptor_68b71b54d42cf1d9, []int{3} -} -func (m *EventBuyOrderFilled) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventBuyOrderFilled) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventBuyOrderFilled.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventBuyOrderFilled) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventBuyOrderFilled.Merge(m, src) -} -func (m *EventBuyOrderFilled) XXX_Size() int { - return m.Size() -} -func (m *EventBuyOrderFilled) XXX_DiscardUnknown() { - xxx_messageInfo_EventBuyOrderFilled.DiscardUnknown(m) -} - -var xxx_messageInfo_EventBuyOrderFilled proto.InternalMessageInfo - -func (m *EventBuyOrderFilled) GetBuyOrderId() uint64 { - if m != nil { - return m.BuyOrderId - } - return 0 -} - -func (m *EventBuyOrderFilled) GetSellOrderId() uint64 { - if m != nil { - return m.SellOrderId - } - return 0 -} - -func (m *EventBuyOrderFilled) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -func (m *EventBuyOrderFilled) GetQuantity() string { - if m != nil { - return m.Quantity - } - return "" -} - -func (m *EventBuyOrderFilled) GetTotalPrice() *types.Coin { - if m != nil { - return m.TotalPrice - } - return nil -} - // EventAllowAskDenom is an event emitted when an ask denom is added. type EventAllowAskDenom struct { // denom is the denom to allow (ex. ibc/GLKHDSG423SGS) @@ -446,7 +242,7 @@ func (m *EventAllowAskDenom) Reset() { *m = EventAllowAskDenom{} } func (m *EventAllowAskDenom) String() string { return proto.CompactTextString(m) } func (*EventAllowAskDenom) ProtoMessage() {} func (*EventAllowAskDenom) Descriptor() ([]byte, []int) { - return fileDescriptor_68b71b54d42cf1d9, []int{4} + return fileDescriptor_68b71b54d42cf1d9, []int{2} } func (m *EventAllowAskDenom) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,8 +295,6 @@ func (m *EventAllowAskDenom) GetExponent() uint32 { func init() { proto.RegisterType((*EventSell)(nil), "regen.ecocredit.marketplace.v1.EventSell") proto.RegisterType((*EventUpdateSellOrder)(nil), "regen.ecocredit.marketplace.v1.EventUpdateSellOrder") - proto.RegisterType((*EventBuyOrderCreated)(nil), "regen.ecocredit.marketplace.v1.EventBuyOrderCreated") - proto.RegisterType((*EventBuyOrderFilled)(nil), "regen.ecocredit.marketplace.v1.EventBuyOrderFilled") proto.RegisterType((*EventAllowAskDenom)(nil), "regen.ecocredit.marketplace.v1.EventAllowAskDenom") } @@ -509,50 +303,41 @@ func init() { } var fileDescriptor_68b71b54d42cf1d9 = []byte{ - // 674 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x4f, 0x6f, 0xd3, 0x30, - 0x18, 0xc6, 0x97, 0xae, 0xdd, 0x5a, 0x77, 0x45, 0xc2, 0xeb, 0xa1, 0xeb, 0x21, 0x2b, 0xe5, 0x52, - 0x09, 0x91, 0x30, 0x90, 0x38, 0x20, 0x4d, 0x62, 0x1b, 0x03, 0x4d, 0x42, 0x62, 0x04, 0x10, 0x12, - 0x97, 0xc8, 0x49, 0xde, 0x75, 0x56, 0x1d, 0x3b, 0x38, 0xce, 0xba, 0x7e, 0x00, 0x8e, 0x48, 0xfb, - 0x58, 0x1c, 0x38, 0xec, 0xc0, 0x81, 0x1b, 0x68, 0xfb, 0x22, 0xc8, 0x4e, 0xfa, 0x67, 0x1b, 0xa8, - 0xd5, 0xc4, 0xad, 0xaf, 0xdf, 0xc7, 0xf1, 0x93, 0xdf, 0xfb, 0xd4, 0x41, 0x0f, 0x24, 0xf4, 0x81, - 0xbb, 0x10, 0x8a, 0x50, 0x42, 0x44, 0x95, 0x1b, 0x13, 0x39, 0x00, 0x95, 0x30, 0x12, 0x82, 0x7b, - 0xb2, 0xe5, 0xc2, 0x09, 0x70, 0x95, 0x3a, 0x89, 0x14, 0x4a, 0x60, 0xdb, 0x88, 0x9d, 0x89, 0xd8, - 0x99, 0x11, 0x3b, 0x27, 0x5b, 0xed, 0x66, 0x5f, 0xf4, 0x85, 0x91, 0xba, 0xfa, 0x57, 0xbe, 0xab, - 0x6d, 0x87, 0x22, 0x8d, 0x45, 0xea, 0x06, 0x24, 0xd5, 0x8f, 0x0c, 0x40, 0x91, 0x2d, 0x37, 0x14, - 0x94, 0x17, 0xfd, 0xcd, 0xbe, 0x10, 0x7d, 0x06, 0xae, 0xa9, 0x82, 0xec, 0xc8, 0x55, 0x34, 0x86, - 0x54, 0x91, 0x38, 0xc9, 0x05, 0xdd, 0xaf, 0x25, 0x54, 0xdb, 0xd7, 0x3e, 0xde, 0x01, 0x63, 0x78, - 0x03, 0x55, 0x85, 0x8c, 0x40, 0xfa, 0x34, 0x6a, 0x59, 0x1d, 0xab, 0x57, 0xf6, 0x56, 0x4d, 0x7d, - 0x10, 0xe1, 0x4d, 0x54, 0x0f, 0x88, 0x0a, 0x8f, 0xfd, 0x08, 0xb8, 0x88, 0x5b, 0xa5, 0x8e, 0xd5, - 0xab, 0x79, 0xc8, 0x2c, 0xbd, 0xd0, 0x2b, 0xb8, 0x8d, 0xaa, 0x9f, 0x33, 0xc2, 0x15, 0x55, 0xa3, - 0xd6, 0xb2, 0xe9, 0x4e, 0x6a, 0xfc, 0x14, 0xd5, 0x48, 0x3a, 0xf0, 0x13, 0x49, 0x43, 0x68, 0x95, - 0x3b, 0x56, 0xaf, 0xfe, 0x78, 0xc3, 0xc9, 0xad, 0x3b, 0xda, 0xba, 0x53, 0x58, 0x77, 0xf6, 0x04, - 0xe5, 0x5e, 0x95, 0xa4, 0x83, 0x43, 0x2d, 0xc5, 0x0e, 0x5a, 0x8f, 0x68, 0x4a, 0x02, 0x06, 0x3e, - 0xc9, 0x94, 0xf0, 0x25, 0x28, 0x2a, 0xa1, 0x55, 0xe9, 0x58, 0xbd, 0xaa, 0x77, 0xb7, 0x68, 0xed, - 0x64, 0x4a, 0x78, 0xa6, 0x81, 0x9f, 0x23, 0x04, 0xa7, 0x09, 0x95, 0x44, 0x51, 0xc1, 0x5b, 0x2b, - 0xe6, 0xa0, 0xb6, 0x93, 0x33, 0x70, 0xc6, 0x0c, 0x9c, 0xf7, 0x63, 0x06, 0xbb, 0xe5, 0xb3, 0x5f, - 0x9b, 0x96, 0x37, 0xb3, 0xa7, 0xfb, 0xbd, 0x84, 0x9a, 0x86, 0xc7, 0x87, 0x24, 0x22, 0x0a, 0x34, - 0x95, 0x37, 0x9a, 0x00, 0x6e, 0xa2, 0x8a, 0x18, 0x72, 0x90, 0x86, 0x4b, 0xcd, 0xcb, 0x0b, 0xdc, - 0x45, 0x8d, 0x14, 0x18, 0xf3, 0x27, 0xd4, 0x4a, 0x86, 0x5a, 0x3d, 0x1d, 0xef, 0xbb, 0x49, 0x6e, - 0xf9, 0x06, 0xb9, 0x7b, 0x68, 0x8d, 0xc3, 0xd0, 0x9f, 0xd0, 0x2b, 0x1b, 0x45, 0x9d, 0xc3, 0xf0, - 0xed, 0x18, 0xe0, 0x36, 0x6a, 0x68, 0xc9, 0x14, 0x62, 0x65, 0x1e, 0x44, 0xbd, 0x7d, 0x67, 0x0e, - 0xc7, 0x95, 0x7f, 0x71, 0x7c, 0x85, 0xee, 0xe8, 0xe3, 0x66, 0x58, 0xae, 0x2e, 0xc8, 0x52, 0xdb, - 0xdc, 0x9f, 0xe2, 0xfc, 0xb2, 0x5c, 0xe0, 0xdc, 0xcd, 0x46, 0x86, 0xc7, 0x9e, 0x04, 0xa2, 0x20, - 0xc2, 0x1d, 0xb4, 0x16, 0x64, 0x23, 0xff, 0x5a, 0xda, 0x50, 0x50, 0xc8, 0x0e, 0xa2, 0x85, 0xd0, - 0xce, 0xc9, 0x5c, 0x40, 0xa3, 0x85, 0x33, 0x17, 0xd0, 0xe8, 0x76, 0x99, 0x7b, 0x84, 0x9a, 0x63, - 0x7d, 0x42, 0xa4, 0xa2, 0x84, 0xf9, 0x47, 0x94, 0xb1, 0x02, 0x2e, 0x2e, 0x7a, 0x87, 0x79, 0xeb, - 0x25, 0x65, 0x0c, 0xbb, 0x68, 0x3d, 0x7f, 0x68, 0x0c, 0x5c, 0xf9, 0x4c, 0x84, 0x53, 0xc4, 0x35, - 0x0f, 0x4f, 0x5b, 0xaf, 0x8b, 0xce, 0xb5, 0x58, 0x57, 0x6f, 0x11, 0xeb, 0x1f, 0x16, 0x5a, 0xbf, - 0x32, 0x07, 0x6d, 0xe4, 0xbf, 0x8d, 0x61, 0x6e, 0xc2, 0x67, 0xe7, 0x54, 0xbe, 0x36, 0xa7, 0x67, - 0xa8, 0xae, 0x84, 0x22, 0x6c, 0xd1, 0x60, 0x23, 0xa3, 0x36, 0xb3, 0xea, 0x0e, 0x10, 0x36, 0x6f, - 0xb5, 0xc3, 0x98, 0xd0, 0x69, 0xcf, 0x4f, 0x6b, 0xa2, 0x4a, 0x6e, 0xa4, 0xf8, 0xab, 0x9a, 0x02, - 0xdf, 0x47, 0x8d, 0x88, 0xa6, 0x09, 0x23, 0xa3, 0x2b, 0x57, 0xd8, 0x5a, 0xb1, 0x38, 0x31, 0x0a, - 0xa7, 0x89, 0xe0, 0xc0, 0x95, 0x79, 0x8d, 0x86, 0x37, 0xa9, 0x77, 0x3f, 0x7e, 0xbb, 0xb0, 0xad, - 0xf3, 0x0b, 0xdb, 0xfa, 0x7d, 0x61, 0x5b, 0x67, 0x97, 0xf6, 0xd2, 0xf9, 0xa5, 0xbd, 0xf4, 0xf3, - 0xd2, 0x5e, 0xfa, 0xb4, 0xdd, 0xa7, 0xea, 0x38, 0x0b, 0x9c, 0x50, 0xc4, 0xae, 0xb9, 0xc6, 0x1f, - 0x72, 0x50, 0x43, 0x21, 0x07, 0x45, 0xc5, 0x20, 0xea, 0x83, 0x74, 0x4f, 0xff, 0xfe, 0x29, 0x08, - 0x56, 0xcc, 0x08, 0x9f, 0xfc, 0x09, 0x00, 0x00, 0xff, 0xff, 0x15, 0xd1, 0xf6, 0x7b, 0x30, 0x06, - 0x00, 0x00, + // 539 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4f, 0x6f, 0xd3, 0x30, + 0x18, 0xc6, 0x9b, 0xae, 0xed, 0x5a, 0x77, 0x45, 0x22, 0xf4, 0x90, 0xf5, 0x90, 0x96, 0x72, 0xa9, + 0x84, 0x70, 0x54, 0x90, 0xb8, 0x4d, 0xa2, 0x83, 0x09, 0x71, 0x02, 0x02, 0x08, 0x89, 0x4b, 0xe4, + 0x24, 0x2f, 0x99, 0xd5, 0xc4, 0x0e, 0xb6, 0xfb, 0x67, 0x1f, 0x02, 0x69, 0x1f, 0x8b, 0x03, 0x87, + 0x1d, 0xb9, 0x81, 0xda, 0x2f, 0x82, 0xec, 0xa4, 0x59, 0xd1, 0x40, 0xe3, 0x96, 0xe7, 0x7d, 0x9f, + 0x37, 0x7e, 0xfc, 0x93, 0x5f, 0xf4, 0x50, 0x40, 0x02, 0xcc, 0x83, 0x88, 0x47, 0x02, 0x62, 0xaa, + 0xbc, 0x8c, 0x88, 0x39, 0xa8, 0x3c, 0x25, 0x11, 0x78, 0xcb, 0xa9, 0x07, 0x4b, 0x60, 0x4a, 0xe2, + 0x5c, 0x70, 0xc5, 0x6d, 0xd7, 0x98, 0x71, 0x65, 0xc6, 0x7b, 0x66, 0xbc, 0x9c, 0x0e, 0xfa, 0x09, + 0x4f, 0xb8, 0xb1, 0x7a, 0xfa, 0xab, 0x98, 0x1a, 0xb8, 0x11, 0x97, 0x19, 0x97, 0x5e, 0x48, 0xa4, + 0xfe, 0x65, 0x08, 0x8a, 0x4c, 0xbd, 0x88, 0x53, 0x56, 0xf6, 0x87, 0x09, 0xe7, 0x49, 0x0a, 0x9e, + 0x51, 0xe1, 0xe2, 0xb3, 0xa7, 0x68, 0x06, 0x52, 0x91, 0x2c, 0x2f, 0x0c, 0xe3, 0xaf, 0x75, 0xd4, + 0x39, 0xd3, 0x39, 0xde, 0x41, 0x9a, 0xda, 0xc7, 0xa8, 0xcd, 0x45, 0x0c, 0x22, 0xa0, 0xb1, 0x63, + 0x8d, 0xac, 0x49, 0xc3, 0x3f, 0x34, 0xfa, 0x55, 0x6c, 0x0f, 0x51, 0x37, 0x24, 0x2a, 0x3a, 0x0f, + 0x62, 0x60, 0x3c, 0x73, 0xea, 0x23, 0x6b, 0xd2, 0xf1, 0x91, 0x29, 0xbd, 0xd0, 0x15, 0x7b, 0x80, + 0xda, 0x5f, 0x16, 0x84, 0x29, 0xaa, 0x2e, 0x9c, 0x03, 0xd3, 0xad, 0xb4, 0xfd, 0x14, 0x75, 0x88, + 0x9c, 0x07, 0xb9, 0xa0, 0x11, 0x38, 0x8d, 0x91, 0x35, 0xe9, 0x3e, 0x3e, 0xc6, 0x45, 0x74, 0xac, + 0xa3, 0xe3, 0x32, 0x3a, 0x7e, 0xce, 0x29, 0xf3, 0xdb, 0x44, 0xce, 0xdf, 0x68, 0xab, 0x8d, 0xd1, + 0xbd, 0x98, 0x4a, 0x12, 0xa6, 0x10, 0x90, 0x85, 0xe2, 0x81, 0x00, 0x45, 0x05, 0x38, 0xcd, 0x91, + 0x35, 0x69, 0xfb, 0x77, 0xcb, 0xd6, 0x6c, 0xa1, 0xb8, 0x6f, 0x1a, 0xf6, 0x33, 0x84, 0x60, 0x9d, + 0x53, 0x41, 0x14, 0xe5, 0xcc, 0x69, 0x99, 0x83, 0x06, 0xb8, 0x60, 0x80, 0x77, 0x0c, 0xf0, 0xfb, + 0x1d, 0x83, 0xd3, 0xc6, 0xe5, 0xcf, 0xa1, 0xe5, 0xef, 0xcd, 0x8c, 0xbf, 0xd7, 0x51, 0xdf, 0xf0, + 0xf8, 0x90, 0xc7, 0x44, 0x81, 0xa6, 0xf2, 0x5a, 0x13, 0xb0, 0xfb, 0xa8, 0xc9, 0x57, 0x0c, 0x84, + 0xe1, 0xd2, 0xf1, 0x0b, 0x61, 0x8f, 0x51, 0x4f, 0x42, 0x9a, 0x06, 0x15, 0xb5, 0xba, 0xa1, 0xd6, + 0x95, 0xbb, 0xb9, 0x9b, 0xe4, 0x0e, 0x6e, 0x90, 0xbb, 0x8f, 0x8e, 0x18, 0xac, 0x82, 0x8a, 0x5e, + 0xc3, 0x38, 0xba, 0x0c, 0x56, 0x6f, 0x77, 0x00, 0x4f, 0x50, 0x4f, 0x5b, 0xae, 0x21, 0x36, 0x6f, + 0x83, 0xa8, 0xc7, 0x67, 0xb7, 0x70, 0x6c, 0xfd, 0x8b, 0xe3, 0x4b, 0x74, 0x47, 0x1f, 0xb7, 0xc7, + 0xf2, 0xf0, 0x3f, 0x59, 0xea, 0x98, 0x67, 0xd7, 0x38, 0xe7, 0xc8, 0x36, 0x34, 0x67, 0x69, 0xca, + 0x75, 0x9c, 0xe2, 0xc2, 0x7d, 0xd4, 0x2c, 0x58, 0x94, 0x2c, 0x8d, 0xb0, 0x1f, 0xa0, 0x5e, 0x4c, + 0x65, 0x9e, 0x92, 0x8b, 0x3f, 0xde, 0xd8, 0x51, 0x59, 0xac, 0x5e, 0x19, 0xac, 0x73, 0xce, 0x80, + 0x29, 0x43, 0xb2, 0xe7, 0x57, 0xfa, 0xf4, 0xe3, 0xb7, 0x8d, 0x6b, 0x5d, 0x6d, 0x5c, 0xeb, 0xd7, + 0xc6, 0xb5, 0x2e, 0xb7, 0x6e, 0xed, 0x6a, 0xeb, 0xd6, 0x7e, 0x6c, 0xdd, 0xda, 0xa7, 0x93, 0x84, + 0xaa, 0xf3, 0x45, 0x88, 0x23, 0x9e, 0x79, 0x66, 0xcf, 0x1e, 0x31, 0x50, 0x2b, 0x2e, 0xe6, 0xa5, + 0x4a, 0x21, 0x4e, 0x40, 0x78, 0xeb, 0xbf, 0xef, 0x6a, 0xd8, 0x32, 0xd7, 0x7d, 0xf2, 0x3b, 0x00, + 0x00, 0xff, 0xff, 0xc2, 0x66, 0xf8, 0x9f, 0xd1, 0x03, 0x00, 0x00, } func (m *EventSell) Marshal() (dAtA []byte, err error) { @@ -710,154 +495,6 @@ func (m *EventUpdateSellOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *EventBuyOrderCreated) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventBuyOrderCreated) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventBuyOrderCreated) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Expiration != nil { - n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.Expiration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.Expiration):]) - if err5 != nil { - return 0, err5 - } - i -= n5 - i = encodeVarintEvents(dAtA, i, uint64(n5)) - i-- - dAtA[i] = 0x42 - } - if len(m.RetirementLocation) > 0 { - i -= len(m.RetirementLocation) - copy(dAtA[i:], m.RetirementLocation) - i = encodeVarintEvents(dAtA, i, uint64(len(m.RetirementLocation))) - i-- - dAtA[i] = 0x3a - } - if m.DisablePartialFill { - i-- - if m.DisablePartialFill { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.DisableAutoRetire { - i-- - if m.DisableAutoRetire { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.BidPrice != nil { - { - size, err := m.BidPrice.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Quantity) > 0 { - i -= len(m.Quantity) - copy(dAtA[i:], m.Quantity) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Quantity))) - i-- - dAtA[i] = 0x1a - } - if m.SellOrderId != 0 { - i = encodeVarintEvents(dAtA, i, uint64(m.SellOrderId)) - i-- - dAtA[i] = 0x10 - } - if m.BuyOrderId != 0 { - i = encodeVarintEvents(dAtA, i, uint64(m.BuyOrderId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *EventBuyOrderFilled) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventBuyOrderFilled) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventBuyOrderFilled) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TotalPrice != nil { - { - size, err := m.TotalPrice.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.Quantity) > 0 { - i -= len(m.Quantity) - copy(dAtA[i:], m.Quantity) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Quantity))) - i-- - dAtA[i] = 0x22 - } - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintEvents(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0x1a - } - if m.SellOrderId != 0 { - i = encodeVarintEvents(dAtA, i, uint64(m.SellOrderId)) - i-- - dAtA[i] = 0x10 - } - if m.BuyOrderId != 0 { - i = encodeVarintEvents(dAtA, i, uint64(m.BuyOrderId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func (m *EventAllowAskDenom) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -977,86 +614,22 @@ func (m *EventUpdateSellOrder) Size() (n int) { return n } -func (m *EventBuyOrderCreated) Size() (n int) { +func (m *EventAllowAskDenom) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.BuyOrderId != 0 { - n += 1 + sovEvents(uint64(m.BuyOrderId)) - } - if m.SellOrderId != 0 { - n += 1 + sovEvents(uint64(m.SellOrderId)) - } - l = len(m.Quantity) + l = len(m.Denom) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } - if m.BidPrice != nil { - l = m.BidPrice.Size() + l = len(m.DisplayDenom) + if l > 0 { n += 1 + l + sovEvents(uint64(l)) } - if m.DisableAutoRetire { - n += 2 - } - if m.DisablePartialFill { - n += 2 - } - l = len(m.RetirementLocation) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - if m.Expiration != nil { - l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Expiration) - n += 1 + l + sovEvents(uint64(l)) - } - return n -} - -func (m *EventBuyOrderFilled) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BuyOrderId != 0 { - n += 1 + sovEvents(uint64(m.BuyOrderId)) - } - if m.SellOrderId != 0 { - n += 1 + sovEvents(uint64(m.SellOrderId)) - } - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.Quantity) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - if m.TotalPrice != nil { - l = m.TotalPrice.Size() - n += 1 + l + sovEvents(uint64(l)) - } - return n -} - -func (m *EventAllowAskDenom) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.DisplayDenom) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - if m.Exponent != 0 { - n += 1 + sovEvents(uint64(m.Exponent)) + if m.Exponent != 0 { + n += 1 + sovEvents(uint64(m.Exponent)) } return n } @@ -1549,458 +1122,6 @@ func (m *EventUpdateSellOrder) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventBuyOrderCreated) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventBuyOrderCreated: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventBuyOrderCreated: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BuyOrderId", wireType) - } - m.BuyOrderId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BuyOrderId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SellOrderId", wireType) - } - m.SellOrderId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SellOrderId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Quantity", 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.Quantity = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BidPrice", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BidPrice == nil { - m.BidPrice = &types.Coin{} - } - if err := m.BidPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DisableAutoRetire", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DisableAutoRetire = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DisablePartialFill", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DisablePartialFill = bool(v != 0) - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetirementLocation", 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.RetirementLocation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Expiration == nil { - m.Expiration = new(time.Time) - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.Expiration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventBuyOrderFilled) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventBuyOrderFilled: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventBuyOrderFilled: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BuyOrderId", wireType) - } - m.BuyOrderId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BuyOrderId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SellOrderId", wireType) - } - m.SellOrderId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SellOrderId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", 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.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Quantity", 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.Quantity = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalPrice", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TotalPrice == nil { - m.TotalPrice = &types.Coin{} - } - if err := m.TotalPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *EventAllowAskDenom) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/ecocredit/marketplace/msg_buy.go b/x/ecocredit/marketplace/msg_buy.go deleted file mode 100644 index 909a549032..0000000000 --- a/x/ecocredit/marketplace/msg_buy.go +++ /dev/null @@ -1,65 +0,0 @@ -package marketplace - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/auth/legacy/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/core" -) - -var _ legacytx.LegacyMsg = &MsgBuy{} - -// Route implements the LegacyMsg interface. -func (m MsgBuy) Route() string { return sdk.MsgTypeURL(&m) } - -// Type implements the LegacyMsg interface. -func (m MsgBuy) Type() string { return sdk.MsgTypeURL(&m) } - -// GetSignBytes implements the LegacyMsg interface. -func (m MsgBuy) GetSignBytes() []byte { - return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m)) -} - -// ValidateBasic does a sanity check on the provided data. -func (m *MsgBuy) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(m.Buyer); err != nil { - return sdkerrors.ErrInvalidAddress - } - - for _, order := range m.Orders { - - if _, err := math.NewPositiveDecFromString(order.Quantity); err != nil { - return sdkerrors.Wrapf(err, "quantity must be positive decimal: %s", order.Quantity) - } - - if order.BidPrice == nil { - return sdkerrors.ErrInvalidRequest.Wrap("bid price cannot be empty") - } - - if err := order.BidPrice.Validate(); err != nil { - return err - } - - if !order.BidPrice.Amount.IsPositive() { - return sdkerrors.ErrInvalidRequest.Wrap("bid price must be positive amount") - } - - if !order.DisableAutoRetire { - if err := core.ValidateLocation(order.RetirementLocation); err != nil { - // ValidateLocation returns an sdkerrors.ErrInvalidRequest, so we can just wrap it here - return sdkerrors.Wrap(err, "a valid retirement location is required when DisableAutoRetire is false") - } - } - } - - return nil -} - -// GetSigners returns the expected signers for MsgBuy. -func (m *MsgBuy) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(m.Buyer) - return []sdk.AccAddress{addr} -} diff --git a/x/ecocredit/marketplace/msg_buy_direct.go b/x/ecocredit/marketplace/msg_buy_direct.go new file mode 100644 index 0000000000..7565391325 --- /dev/null +++ b/x/ecocredit/marketplace/msg_buy_direct.go @@ -0,0 +1,53 @@ +package marketplace + +import ( + "github.com/regen-network/regen-ledger/types/math" + "github.com/regen-network/regen-ledger/x/ecocredit" + "github.com/regen-network/regen-ledger/x/ecocredit/core" + + "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" +) + +var _ legacytx.LegacyMsg = &MsgBuyDirect{} + +func (m MsgBuyDirect) ValidateBasic() error { + if _, err := types.AccAddressFromBech32(m.Buyer); err != nil { + return sdkerrors.ErrInvalidAddress.Wrap(err.Error()) + } + for _, order := range m.Orders { + if order.SellOrderId == 0 { + return sdkerrors.ErrInvalidRequest.Wrap("0 is not a valid sell order id") + } + if _, err := math.NewDecFromString(order.Quantity); err != nil { + return sdkerrors.ErrInvalidRequest.Wrap(err.Error()) + } + if !order.DisableAutoRetire { + if err := core.ValidateLocation(order.RetirementLocation); err != nil { + return sdkerrors.Wrapf(err, "when DisableAutoRetire is false, a valid retirement location must be provided") + } + } + if order.BidPrice == nil { + return sdkerrors.ErrInvalidRequest.Wrap("must specify price per credit") + } + if err := order.BidPrice.Validate(); err != nil { + return err + } + } + + return nil +} + +func (m MsgBuyDirect) GetSigners() []types.AccAddress { + addr, _ := types.AccAddressFromBech32(m.Buyer) + return []types.AccAddress{addr} +} + +func (m MsgBuyDirect) GetSignBytes() []byte { + return types.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m)) +} + +func (m MsgBuyDirect) Route() string { return types.MsgTypeURL(&m) } + +func (m MsgBuyDirect) Type() string { return types.MsgTypeURL(&m) } diff --git a/x/ecocredit/marketplace/msg_buy_direct_test.go b/x/ecocredit/marketplace/msg_buy_direct_test.go new file mode 100644 index 0000000000..4ea7ff37fc --- /dev/null +++ b/x/ecocredit/marketplace/msg_buy_direct_test.go @@ -0,0 +1,125 @@ +package marketplace + +import ( + "testing" + + "gotest.tools/v3/assert" + + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/regen-network/regen-ledger/types/math" +) + +func TestMsgBuyDirect_ValidateBasic(t *testing.T) { + type fields struct { + Buyer string + SellOrderId uint64 + Quantity string + PricePerCredit *sdk.Coin + DisableAutoRetire bool + RetirementLocation string + } + validCoin := sdk.NewInt64Coin("ufoo", 31) + _, _, addr := testdata.KeyTestPubAddr() + tests := []struct { + name string + fields fields + errMsg string + }{ + { + name: "valid", + fields: fields{ + Buyer: addr.String(), + SellOrderId: 1, + Quantity: "45.32", + PricePerCredit: &validCoin, + DisableAutoRetire: true, + }, + }, + { + name: "valid retirement location", + fields: fields{ + Buyer: addr.String(), + SellOrderId: 1, + Quantity: "45", + PricePerCredit: &validCoin, + DisableAutoRetire: false, + RetirementLocation: "US-NY"}, + }, + { + name: "invalid addr", + fields: fields{Buyer: "foobar"}, + errMsg: sdkerrors.ErrInvalidAddress.Error(), + }, + { + name: "invalid order id", + fields: fields{ + Buyer: addr.String(), + SellOrderId: 0}, + errMsg: "0 is not a valid sell order id", + }, + { + name: "invalid quantity", + fields: fields{ + Buyer: addr.String(), + SellOrderId: 1, + Quantity: "45.3xyz"}, + errMsg: math.ErrInvalidDecString.Error(), + }, + { + name: "no price per credit", + fields: fields{ + Buyer: addr.String(), + SellOrderId: 1, + Quantity: "45", + DisableAutoRetire: true, + PricePerCredit: nil}, + errMsg: "must specify price per credit", + }, + { + name: "invalid coin", + fields: fields{ + Buyer: addr.String(), + SellOrderId: 1, + Quantity: "45", + DisableAutoRetire: true, + PricePerCredit: &sdk.Coin{Denom: "foo3=21.", Amount: sdk.NewInt(3)}}, + errMsg: "invalid denom", + }, + { + name: "no retirement location when AutoRetiring", + fields: fields{ + Buyer: addr.String(), + SellOrderId: 1, + Quantity: "45", + PricePerCredit: &validCoin, + DisableAutoRetire: false}, + errMsg: "when DisableAutoRetire is false, a valid retirement location must be provided", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + m := MsgBuyDirect{ + Buyer: tt.fields.Buyer, + Orders: []*MsgBuyDirect_Order{ + { + SellOrderId: tt.fields.SellOrderId, + Quantity: tt.fields.Quantity, + BidPrice: tt.fields.PricePerCredit, + DisableAutoRetire: tt.fields.DisableAutoRetire, + RetirementLocation: tt.fields.RetirementLocation, + }, + }, + } + err := m.ValidateBasic() + if len(tt.errMsg) == 0 { + assert.NilError(t, err) + } else { + assert.Check(t, err != nil) + assert.ErrorContains(t, err, tt.errMsg) + } + }) + } +} diff --git a/x/ecocredit/marketplace/msg_buy_test.go b/x/ecocredit/marketplace/msg_buy_test.go deleted file mode 100644 index eaa411c9d1..0000000000 --- a/x/ecocredit/marketplace/msg_buy_test.go +++ /dev/null @@ -1,143 +0,0 @@ -package marketplace - -import ( - "testing" - "time" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func TestMsgBuy(t *testing.T) { - t.Parallel() - - _, _, a1 := testdata.KeyTestPubAddr() - - validExpiration := time.Date(2030, 01, 01, 0, 0, 0, 0, time.UTC) - - tests := map[string]struct { - src MsgBuy - expErr bool - }{ - "valid": { - src: MsgBuy{ - Buyer: a1.String(), - Orders: []*MsgBuy_Order{ - { - Quantity: "1.5", - BidPrice: &sdk.Coin{ - Denom: "uregen", - Amount: sdk.NewInt(20), - }, - DisableAutoRetire: false, - DisablePartialFill: true, - Expiration: &validExpiration, - RetirementLocation: "US-WA", - }, - }, - }, - expErr: false, - }, - "invalid: bad owner address": { - src: MsgBuy{ - Buyer: "foobar", - Orders: []*MsgBuy_Order{ - { - Quantity: "1.5", - BidPrice: &sdk.Coin{ - Denom: "uregen", - Amount: sdk.NewInt(20), - }, - DisableAutoRetire: true, - DisablePartialFill: true, - }, - }, - }, - expErr: true, - }, - "invalid: bad quantity": { - src: MsgBuy{ - Buyer: a1.String(), - Orders: []*MsgBuy_Order{ - { - Quantity: "-1.5", - BidPrice: &sdk.Coin{ - Denom: "uregen", - Amount: sdk.NewInt(20), - }, - DisableAutoRetire: true, - DisablePartialFill: true, - }, - }, - }, - expErr: true, - }, - "invalid: bad bid price": { - src: MsgBuy{ - Buyer: a1.String(), - Orders: []*MsgBuy_Order{ - { - Quantity: "1.5", - BidPrice: &sdk.Coin{ - Denom: "uregen", - Amount: sdk.NewInt(-20), - }, - DisableAutoRetire: true, - DisablePartialFill: true, - }, - }, - }, - expErr: true, - }, - "invalid: bad retirement location": { - src: MsgBuy{ - Buyer: a1.String(), - Orders: []*MsgBuy_Order{ - { - Quantity: "1.5", - BidPrice: &sdk.Coin{ - Denom: "uregen", - Amount: sdk.NewInt(20), - }, - DisableAutoRetire: false, - DisablePartialFill: true, - RetirementLocation: "foo", - }, - }, - }, - expErr: true, - }, - "invalid: retirement location required when DisableAutoRetire is false": { - src: MsgBuy{ - Buyer: a1.String(), - Orders: []*MsgBuy_Order{ - { - Quantity: "1.5", - BidPrice: &sdk.Coin{ - Denom: "uregen", - Amount: sdk.NewInt(20), - }, - DisableAutoRetire: false, - DisablePartialFill: true, - RetirementLocation: "", - }, - }, - }, - expErr: true, - }, - } - - for msg, test := range tests { - t.Run(msg, func(t *testing.T) { - t.Parallel() - err := test.src.ValidateBasic() - if test.expErr { - require.Error(t, err) - } else { - require.NoError(t, err) - } - }) - } -} diff --git a/x/ecocredit/marketplace/query.pb.go b/x/ecocredit/marketplace/query.pb.go index 302899f81a..dbce9b708e 100644 --- a/x/ecocredit/marketplace/query.pb.go +++ b/x/ecocredit/marketplace/query.pb.go @@ -444,310 +444,6 @@ func (m *QuerySellOrdersByAddressResponse) GetPagination() *query.PageResponse { return nil } -// QueryBuyOrderRequest is the Query/BuyOrder request type. -type QueryBuyOrderRequest struct { - // buy_order_id is the id of the buy order. - BuyOrderId uint64 `protobuf:"varint,1,opt,name=buy_order_id,json=buyOrderId,proto3" json:"buy_order_id,omitempty"` -} - -func (m *QueryBuyOrderRequest) Reset() { *m = QueryBuyOrderRequest{} } -func (m *QueryBuyOrderRequest) String() string { return proto.CompactTextString(m) } -func (*QueryBuyOrderRequest) ProtoMessage() {} -func (*QueryBuyOrderRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1f2df4a89dfae849, []int{8} -} -func (m *QueryBuyOrderRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBuyOrderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBuyOrderRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBuyOrderRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBuyOrderRequest.Merge(m, src) -} -func (m *QueryBuyOrderRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryBuyOrderRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBuyOrderRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBuyOrderRequest proto.InternalMessageInfo - -func (m *QueryBuyOrderRequest) GetBuyOrderId() uint64 { - if m != nil { - return m.BuyOrderId - } - return 0 -} - -// QueryBuyOrderResponse is the Query/BuyOrder response type. -type QueryBuyOrderResponse struct { - // buy_order contains all information related to a buy order. - BuyOrder *BuyOrder `protobuf:"bytes,1,opt,name=buy_order,json=buyOrder,proto3" json:"buy_order,omitempty"` -} - -func (m *QueryBuyOrderResponse) Reset() { *m = QueryBuyOrderResponse{} } -func (m *QueryBuyOrderResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBuyOrderResponse) ProtoMessage() {} -func (*QueryBuyOrderResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1f2df4a89dfae849, []int{9} -} -func (m *QueryBuyOrderResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBuyOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBuyOrderResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBuyOrderResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBuyOrderResponse.Merge(m, src) -} -func (m *QueryBuyOrderResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryBuyOrderResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBuyOrderResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBuyOrderResponse proto.InternalMessageInfo - -func (m *QueryBuyOrderResponse) GetBuyOrder() *BuyOrder { - if m != nil { - return m.BuyOrder - } - return nil -} - -// QueryBuyOrdersRequest is the Query/BuyOrders request type. -type QueryBuyOrdersRequest struct { - // pagination defines an optional pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryBuyOrdersRequest) Reset() { *m = QueryBuyOrdersRequest{} } -func (m *QueryBuyOrdersRequest) String() string { return proto.CompactTextString(m) } -func (*QueryBuyOrdersRequest) ProtoMessage() {} -func (*QueryBuyOrdersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1f2df4a89dfae849, []int{10} -} -func (m *QueryBuyOrdersRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBuyOrdersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBuyOrdersRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBuyOrdersRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBuyOrdersRequest.Merge(m, src) -} -func (m *QueryBuyOrdersRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryBuyOrdersRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBuyOrdersRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBuyOrdersRequest proto.InternalMessageInfo - -func (m *QueryBuyOrdersRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryBuyOrdersResponse is the Query/BuyOrders response type. -type QueryBuyOrdersResponse struct { - // buy_orders is a list of buy orders. - BuyOrders []*BuyOrder `protobuf:"bytes,1,rep,name=buy_orders,json=buyOrders,proto3" json:"buy_orders,omitempty"` - // pagination defines an optional pagination for the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryBuyOrdersResponse) Reset() { *m = QueryBuyOrdersResponse{} } -func (m *QueryBuyOrdersResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBuyOrdersResponse) ProtoMessage() {} -func (*QueryBuyOrdersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1f2df4a89dfae849, []int{11} -} -func (m *QueryBuyOrdersResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBuyOrdersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBuyOrdersResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBuyOrdersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBuyOrdersResponse.Merge(m, src) -} -func (m *QueryBuyOrdersResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryBuyOrdersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBuyOrdersResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBuyOrdersResponse proto.InternalMessageInfo - -func (m *QueryBuyOrdersResponse) GetBuyOrders() []*BuyOrder { - if m != nil { - return m.BuyOrders - } - return nil -} - -func (m *QueryBuyOrdersResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryBuyOrdersByAddressRequest is the Query/BuyOrdersByAddress request type -type QueryBuyOrdersByAddressRequest struct { - // address of the buy order creator - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryBuyOrdersByAddressRequest) Reset() { *m = QueryBuyOrdersByAddressRequest{} } -func (m *QueryBuyOrdersByAddressRequest) String() string { return proto.CompactTextString(m) } -func (*QueryBuyOrdersByAddressRequest) ProtoMessage() {} -func (*QueryBuyOrdersByAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1f2df4a89dfae849, []int{12} -} -func (m *QueryBuyOrdersByAddressRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBuyOrdersByAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBuyOrdersByAddressRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBuyOrdersByAddressRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBuyOrdersByAddressRequest.Merge(m, src) -} -func (m *QueryBuyOrdersByAddressRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryBuyOrdersByAddressRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBuyOrdersByAddressRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBuyOrdersByAddressRequest proto.InternalMessageInfo - -func (m *QueryBuyOrdersByAddressRequest) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *QueryBuyOrdersByAddressRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryBuyOrdersByAddressResponse is the Query/BuyOrdersByAddress response -// type. -type QueryBuyOrdersByAddressResponse struct { - // buy_orders is a list of buy orders. - BuyOrders []*BuyOrder `protobuf:"bytes,1,rep,name=buy_orders,json=buyOrders,proto3" json:"buy_orders,omitempty"` - // pagination defines an optional pagination for the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryBuyOrdersByAddressResponse) Reset() { *m = QueryBuyOrdersByAddressResponse{} } -func (m *QueryBuyOrdersByAddressResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBuyOrdersByAddressResponse) ProtoMessage() {} -func (*QueryBuyOrdersByAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1f2df4a89dfae849, []int{13} -} -func (m *QueryBuyOrdersByAddressResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBuyOrdersByAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBuyOrdersByAddressResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBuyOrdersByAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBuyOrdersByAddressResponse.Merge(m, src) -} -func (m *QueryBuyOrdersByAddressResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryBuyOrdersByAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBuyOrdersByAddressResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBuyOrdersByAddressResponse proto.InternalMessageInfo - -func (m *QueryBuyOrdersByAddressResponse) GetBuyOrders() []*BuyOrder { - if m != nil { - return m.BuyOrders - } - return nil -} - -func (m *QueryBuyOrdersByAddressResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - // QueryAllowedDenomsRequest is the Query/AllowedDenoms request type. type QueryAllowedDenomsRequest struct { // pagination defines an optional pagination for the request. @@ -758,7 +454,7 @@ func (m *QueryAllowedDenomsRequest) Reset() { *m = QueryAllowedDenomsReq func (m *QueryAllowedDenomsRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllowedDenomsRequest) ProtoMessage() {} func (*QueryAllowedDenomsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1f2df4a89dfae849, []int{14} + return fileDescriptor_1f2df4a89dfae849, []int{8} } func (m *QueryAllowedDenomsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -807,7 +503,7 @@ func (m *QueryAllowedDenomsResponse) Reset() { *m = QueryAllowedDenomsRe func (m *QueryAllowedDenomsResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllowedDenomsResponse) ProtoMessage() {} func (*QueryAllowedDenomsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1f2df4a89dfae849, []int{15} + return fileDescriptor_1f2df4a89dfae849, []int{9} } func (m *QueryAllowedDenomsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -859,12 +555,6 @@ func init() { proto.RegisterType((*QuerySellOrdersByBatchDenomResponse)(nil), "regen.ecocredit.marketplace.v1.QuerySellOrdersByBatchDenomResponse") proto.RegisterType((*QuerySellOrdersByAddressRequest)(nil), "regen.ecocredit.marketplace.v1.QuerySellOrdersByAddressRequest") proto.RegisterType((*QuerySellOrdersByAddressResponse)(nil), "regen.ecocredit.marketplace.v1.QuerySellOrdersByAddressResponse") - proto.RegisterType((*QueryBuyOrderRequest)(nil), "regen.ecocredit.marketplace.v1.QueryBuyOrderRequest") - proto.RegisterType((*QueryBuyOrderResponse)(nil), "regen.ecocredit.marketplace.v1.QueryBuyOrderResponse") - proto.RegisterType((*QueryBuyOrdersRequest)(nil), "regen.ecocredit.marketplace.v1.QueryBuyOrdersRequest") - proto.RegisterType((*QueryBuyOrdersResponse)(nil), "regen.ecocredit.marketplace.v1.QueryBuyOrdersResponse") - proto.RegisterType((*QueryBuyOrdersByAddressRequest)(nil), "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressRequest") - proto.RegisterType((*QueryBuyOrdersByAddressResponse)(nil), "regen.ecocredit.marketplace.v1.QueryBuyOrdersByAddressResponse") proto.RegisterType((*QueryAllowedDenomsRequest)(nil), "regen.ecocredit.marketplace.v1.QueryAllowedDenomsRequest") proto.RegisterType((*QueryAllowedDenomsResponse)(nil), "regen.ecocredit.marketplace.v1.QueryAllowedDenomsResponse") } @@ -874,62 +564,51 @@ func init() { } var fileDescriptor_1f2df4a89dfae849 = []byte{ - // 879 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x4b, 0x6f, 0xd3, 0x58, - 0x14, 0xee, 0xed, 0xbc, 0x9a, 0x93, 0x76, 0x16, 0x77, 0x66, 0x3a, 0x1d, 0x6b, 0xe4, 0x46, 0x1e, - 0x69, 0xa6, 0x53, 0x1a, 0x5b, 0x69, 0x29, 0xef, 0xbe, 0x42, 0x1f, 0x14, 0x09, 0x01, 0xe9, 0x02, - 0x89, 0x05, 0xc1, 0x8e, 0xaf, 0xd2, 0xa8, 0x8e, 0x9d, 0xfa, 0x3a, 0x2d, 0x51, 0x95, 0x4d, 0x59, - 0x23, 0x21, 0xf1, 0x2f, 0x58, 0x74, 0x01, 0x0b, 0xa4, 0x4a, 0x6c, 0x58, 0xb1, 0xac, 0xc4, 0x06, - 0x89, 0x05, 0x28, 0xe5, 0x07, 0xf0, 0x13, 0x50, 0xae, 0xaf, 0x1d, 0x27, 0x31, 0x4d, 0x9c, 0x46, - 0xa2, 0xbb, 0xda, 0x3d, 0x8f, 0xef, 0xfb, 0xee, 0xf1, 0x77, 0x6e, 0x60, 0xd2, 0x26, 0x79, 0x62, - 0x2a, 0x24, 0x67, 0xe5, 0x6c, 0xa2, 0x17, 0x1c, 0xa5, 0xa8, 0xda, 0x5b, 0xc4, 0x29, 0x19, 0x6a, - 0x8e, 0x28, 0x3b, 0x29, 0x65, 0xbb, 0x4c, 0xec, 0x8a, 0x5c, 0xb2, 0x2d, 0xc7, 0xc2, 0x22, 0x8b, - 0x95, 0xfd, 0x58, 0x39, 0x10, 0x2b, 0xef, 0xa4, 0x84, 0xbf, 0xf3, 0x96, 0x95, 0x37, 0x88, 0xa2, - 0x96, 0x0a, 0x8a, 0x6a, 0x9a, 0x96, 0xa3, 0x3a, 0x05, 0xcb, 0xa4, 0x6e, 0xb6, 0xd0, 0xa9, 0x13, - 0x75, 0x54, 0x87, 0x78, 0xb1, 0x39, 0x8b, 0x16, 0x2d, 0xaa, 0x68, 0x2a, 0x25, 0x2e, 0x04, 0x65, - 0x27, 0xa5, 0x11, 0x47, 0x4d, 0x29, 0x25, 0x35, 0x5f, 0x30, 0x59, 0x61, 0x37, 0x56, 0xba, 0x0a, - 0x7f, 0xdc, 0xad, 0x47, 0x6c, 0x10, 0xc3, 0xb8, 0x6d, 0xeb, 0xc4, 0xce, 0x90, 0xed, 0x32, 0xa1, - 0x0e, 0x96, 0x60, 0x84, 0x12, 0xc3, 0xc8, 0x5a, 0xf5, 0x97, 0xd9, 0x82, 0x3e, 0x86, 0x12, 0x68, - 0xe2, 0xc7, 0x4c, 0x9c, 0x7a, 0x81, 0xeb, 0xba, 0xa4, 0xc1, 0x68, 0x6b, 0x32, 0x2d, 0x59, 0x26, - 0x25, 0xf8, 0x06, 0x40, 0x23, 0x9b, 0xa5, 0xc6, 0xa7, 0xff, 0x97, 0x4f, 0x56, 0x40, 0x6e, 0x94, - 0x89, 0xf9, 0x5d, 0xa4, 0x87, 0xad, 0x3d, 0xa8, 0x87, 0x70, 0x15, 0xa0, 0x41, 0x87, 0xf7, 0xf8, - 0x57, 0x76, 0xb9, 0xcb, 0x75, 0xee, 0xb2, 0x2b, 0x3f, 0xe7, 0x2e, 0xdf, 0x51, 0xf3, 0x84, 0xe7, - 0x66, 0x02, 0x99, 0xd2, 0x01, 0x82, 0x3f, 0xdb, 0x5a, 0x70, 0x1e, 0x37, 0x21, 0xde, 0xe0, 0x41, - 0xc7, 0x50, 0xe2, 0x87, 0x68, 0x44, 0xc0, 0x27, 0x42, 0xf1, 0x5a, 0x13, 0xde, 0x41, 0x86, 0xf7, - 0xbf, 0x8e, 0x78, 0x5d, 0x20, 0x4d, 0x80, 0x9f, 0x20, 0x90, 0x5a, 0x00, 0xa7, 0x2b, 0x69, 0xd5, - 0xc9, 0x6d, 0x2e, 0x13, 0xd3, 0x2a, 0x7a, 0xfa, 0x8c, 0x43, 0x5c, 0xab, 0xbf, 0xcc, 0xea, 0xf5, - 0xb7, 0x4c, 0xa0, 0x58, 0x06, 0x34, 0x3f, 0xae, 0x45, 0xc0, 0xc1, 0x9e, 0x05, 0x3c, 0x44, 0xf0, - 0xcf, 0x89, 0x78, 0xce, 0xb2, 0x98, 0x8f, 0x11, 0x8c, 0xb7, 0x81, 0x5f, 0xd2, 0x75, 0x9b, 0x50, - 0x7f, 0xd2, 0xc6, 0xe0, 0x17, 0xd5, 0x7d, 0xc3, 0x55, 0xf4, 0x1e, 0xfb, 0x26, 0xe1, 0x2b, 0x04, - 0x89, 0x6f, 0xa3, 0x38, 0xcb, 0xfa, 0x5d, 0x82, 0xdf, 0x19, 0xf0, 0x74, 0xb9, 0xd2, 0xe4, 0x1f, - 0x09, 0x18, 0xd6, 0xca, 0x95, 0x56, 0xfb, 0x00, 0x8d, 0x87, 0xad, 0xeb, 0xd2, 0x03, 0x6e, 0x3d, - 0x8d, 0x4c, 0xce, 0x73, 0x05, 0x62, 0x7e, 0x2a, 0xff, 0xae, 0x27, 0x3a, 0xb1, 0xf4, 0x8b, 0x0c, - 0x79, 0x1d, 0xa4, 0x6c, 0x4b, 0xfd, 0xbe, 0x1b, 0xc7, 0x73, 0xc4, 0xbd, 0x29, 0xd0, 0x81, 0x53, - 0x58, 0x03, 0xf0, 0x29, 0x78, 0x27, 0xd5, 0x3d, 0x87, 0x98, 0xc7, 0xa1, 0x8f, 0xe7, 0xb4, 0x8f, - 0x40, 0x6c, 0x06, 0xfb, 0x1d, 0xc6, 0xfc, 0xa5, 0xf7, 0xb1, 0x85, 0x81, 0x38, 0xb3, 0xd2, 0xe5, - 0xe0, 0x2f, 0x06, 0x7a, 0xc9, 0x30, 0xac, 0x5d, 0xa2, 0x33, 0x53, 0xeb, 0xfb, 0x30, 0x1d, 0x22, - 0x10, 0xc2, 0xba, 0x70, 0x55, 0x36, 0xe0, 0x57, 0xd5, 0xfd, 0x87, 0x6b, 0xe7, 0x9e, 0x32, 0x53, - 0x9d, 0x94, 0x09, 0x96, 0xcb, 0x8c, 0xa8, 0xc1, 0xe2, 0x7d, 0x53, 0x68, 0xba, 0x36, 0x0c, 0x3f, - 0x31, 0xf0, 0xf8, 0x0d, 0x82, 0x98, 0xef, 0x38, 0x78, 0xb6, 0x13, 0xba, 0xd0, 0xbb, 0x87, 0x70, - 0x21, 0x6a, 0x9a, 0x0b, 0x49, 0x5a, 0xdd, 0x7f, 0xf7, 0xf9, 0xd9, 0xe0, 0x22, 0x9e, 0x57, 0x3a, - 0xdd, 0x96, 0x88, 0x61, 0x24, 0xdd, 0x09, 0x53, 0x0a, 0xba, 0xb2, 0xd7, 0x74, 0xd3, 0xa9, 0xe2, - 0x17, 0x08, 0xa0, 0x61, 0xc4, 0x38, 0x22, 0x1c, 0x6f, 0x34, 0x84, 0x8b, 0x91, 0xf3, 0x38, 0x8f, - 0x19, 0xc6, 0x23, 0x89, 0xcf, 0x45, 0xe0, 0x81, 0xbf, 0x20, 0x18, 0x0d, 0x5f, 0xc0, 0x38, 0x1d, - 0x11, 0x48, 0xc8, 0x6d, 0x42, 0xb8, 0x7e, 0xaa, 0x1a, 0x9c, 0xd8, 0x2d, 0x46, 0x6c, 0x0d, 0xaf, - 0x44, 0x39, 0x20, 0x76, 0x63, 0x49, 0xb2, 0xa9, 0x57, 0xf6, 0x02, 0x37, 0x9a, 0x2a, 0xfe, 0x88, - 0xe0, 0xb7, 0x90, 0x85, 0x89, 0x17, 0x22, 0x63, 0x6d, 0x76, 0x42, 0x61, 0xb1, 0xf7, 0x02, 0x9c, - 0xe9, 0x0a, 0x63, 0xba, 0x80, 0xe7, 0xa2, 0x30, 0xe5, 0x76, 0xab, 0xec, 0xf1, 0x3f, 0xaa, 0xf8, - 0x35, 0x82, 0x21, 0xcf, 0xdb, 0xf0, 0xf9, 0xae, 0x50, 0xb5, 0x2c, 0x62, 0x61, 0x36, 0x62, 0x16, - 0x27, 0xb0, 0xcc, 0x08, 0xcc, 0xe3, 0x6b, 0x9d, 0x08, 0x68, 0xe5, 0x4a, 0xf0, 0x53, 0x0a, 0x2e, - 0xfd, 0x2a, 0x3e, 0x40, 0x10, 0xf3, 0xbd, 0x1e, 0x47, 0x83, 0x42, 0xa3, 0xd9, 0x41, 0xdb, 0x12, - 0x96, 0xa6, 0x19, 0x85, 0x29, 0x3c, 0xd9, 0x3d, 0x05, 0xfc, 0x01, 0x01, 0x6e, 0x5f, 0x4e, 0x78, - 0x3e, 0x1a, 0x84, 0xb6, 0x81, 0x5a, 0xe8, 0x39, 0xff, 0x14, 0xc7, 0xd1, 0x3e, 0x4e, 0x87, 0x08, - 0x46, 0x9a, 0xf6, 0x0b, 0xbe, 0xdc, 0x15, 0xb0, 0xb0, 0xcd, 0x27, 0x5c, 0xe9, 0x25, 0x35, 0xea, - 0xd1, 0xa8, 0x74, 0xcb, 0xfd, 0xf4, 0x69, 0xfa, 0xde, 0xdb, 0x9a, 0x88, 0x8e, 0x6a, 0x22, 0xfa, - 0x54, 0x13, 0xd1, 0xd3, 0x63, 0x71, 0xe0, 0xe8, 0x58, 0x1c, 0x78, 0x7f, 0x2c, 0x0e, 0xdc, 0x9f, - 0xcb, 0x17, 0x9c, 0xcd, 0xb2, 0x26, 0xe7, 0xac, 0xa2, 0x5b, 0x2f, 0x69, 0x12, 0x67, 0xd7, 0xb2, - 0xb7, 0xf8, 0x93, 0x41, 0xf4, 0x3c, 0xb1, 0x95, 0x47, 0xe1, 0x6d, 0xb4, 0x9f, 0xd9, 0x4f, 0xe1, - 0x99, 0xaf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3d, 0x21, 0xa1, 0x39, 0xce, 0x0f, 0x00, 0x00, + // 702 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x96, 0xcd, 0x4f, 0xd4, 0x4e, + 0x18, 0xc7, 0x19, 0x7e, 0x3f, 0x5f, 0x78, 0x36, 0x78, 0x18, 0x23, 0x62, 0x63, 0x0a, 0xa9, 0x89, + 0x2f, 0xc8, 0x76, 0xb2, 0x10, 0x35, 0x6a, 0x10, 0x58, 0x05, 0xd4, 0xc4, 0xa8, 0xcb, 0xc1, 0xc4, + 0x0b, 0x4e, 0xdb, 0x49, 0x69, 0xe8, 0x76, 0x96, 0x4e, 0x01, 0x09, 0xe1, 0xa2, 0x67, 0x13, 0x13, + 0xfe, 0x0f, 0x0f, 0x5e, 0x4c, 0x38, 0x7a, 0xf2, 0x48, 0xe2, 0xc5, 0x9b, 0x06, 0xfc, 0x03, 0xfc, + 0x13, 0xcc, 0xce, 0x4c, 0xf7, 0x8d, 0xca, 0x5a, 0xe4, 0xc0, 0x6d, 0x3b, 0xfb, 0xbc, 0x7c, 0x3f, + 0xdf, 0x79, 0xf6, 0xe9, 0xc2, 0x48, 0xcc, 0x7c, 0x16, 0x11, 0xe6, 0x72, 0x37, 0x66, 0x5e, 0x90, + 0x90, 0x2a, 0x8d, 0x97, 0x58, 0x52, 0x0b, 0xa9, 0xcb, 0xc8, 0x6a, 0x89, 0x2c, 0xaf, 0xb0, 0x78, + 0xdd, 0xae, 0xc5, 0x3c, 0xe1, 0xd8, 0x94, 0xb1, 0x76, 0x23, 0xd6, 0x6e, 0x89, 0xb5, 0x57, 0x4b, + 0xc6, 0x45, 0x9f, 0x73, 0x3f, 0x64, 0x84, 0xd6, 0x02, 0x42, 0xa3, 0x88, 0x27, 0x34, 0x09, 0x78, + 0x24, 0x54, 0xb6, 0xd1, 0xad, 0x93, 0x48, 0x68, 0xc2, 0xd2, 0x58, 0x97, 0x8b, 0x2a, 0x17, 0xc4, + 0xa1, 0x82, 0x29, 0x09, 0x64, 0xb5, 0xe4, 0xb0, 0x84, 0x96, 0x48, 0x8d, 0xfa, 0x41, 0x24, 0x0b, + 0xab, 0x58, 0xeb, 0x2e, 0x9c, 0x7b, 0x5e, 0x8f, 0x98, 0x67, 0x61, 0xf8, 0x34, 0xf6, 0x58, 0x5c, + 0x61, 0xcb, 0x2b, 0x4c, 0x24, 0xd8, 0x82, 0x7e, 0xc1, 0xc2, 0x70, 0x81, 0xd7, 0x0f, 0x17, 0x02, + 0x6f, 0x10, 0x0d, 0xa3, 0xab, 0xff, 0x57, 0x0a, 0x22, 0x0d, 0x7c, 0xe4, 0x59, 0x0e, 0x0c, 0x74, + 0x26, 0x8b, 0x1a, 0x8f, 0x04, 0xc3, 0x0f, 0x01, 0x9a, 0xd9, 0x32, 0xb5, 0x30, 0x76, 0xcd, 0x3e, + 0xd8, 0x01, 0xbb, 0x59, 0xa6, 0xaf, 0xd1, 0xc5, 0x7a, 0xd5, 0xd9, 0x43, 0xa4, 0x0a, 0x67, 0x01, + 0x9a, 0x38, 0xba, 0xc7, 0x65, 0x5b, 0xb1, 0xdb, 0x75, 0x76, 0x5b, 0xd9, 0xaf, 0xd9, 0xed, 0x67, + 0xd4, 0x67, 0x3a, 0xb7, 0xd2, 0x92, 0x69, 0x7d, 0x40, 0x70, 0x7e, 0x5f, 0x0b, 0xcd, 0xf1, 0x18, + 0x0a, 0x4d, 0x0e, 0x31, 0x88, 0x86, 0xff, 0xcb, 0x07, 0x02, 0x0d, 0x10, 0x81, 0xe7, 0xda, 0xf4, + 0xf6, 0x4a, 0xbd, 0x57, 0xba, 0xea, 0x55, 0x42, 0xda, 0x04, 0xbf, 0x43, 0x60, 0x75, 0x08, 0x2e, + 0xaf, 0x97, 0x69, 0xe2, 0x2e, 0x3e, 0x60, 0x11, 0xaf, 0xa6, 0xfe, 0x0c, 0x41, 0xc1, 0xa9, 0x1f, + 0x2e, 0x78, 0xf5, 0x53, 0x69, 0x50, 0x5f, 0x05, 0x9c, 0x46, 0x5c, 0x87, 0x81, 0xbd, 0x87, 0x36, + 0x70, 0x1b, 0xc1, 0xa5, 0x03, 0xf5, 0x1c, 0x67, 0x33, 0xdf, 0x22, 0x18, 0xda, 0x27, 0x7e, 0xda, + 0xf3, 0x62, 0x26, 0x1a, 0x93, 0x36, 0x08, 0xa7, 0xa8, 0x3a, 0xd1, 0x2e, 0xa6, 0x8f, 0x47, 0x66, + 0xe1, 0x27, 0x04, 0xc3, 0x7f, 0x56, 0x71, 0x9c, 0xfd, 0x73, 0xe1, 0x82, 0x14, 0x3e, 0x1d, 0x86, + 0x7c, 0x8d, 0x79, 0xf2, 0xc6, 0x8f, 0xfc, 0x27, 0xba, 0x8d, 0xc0, 0xc8, 0xea, 0xa2, 0x8d, 0x99, + 0x87, 0x33, 0x54, 0x7d, 0xa1, 0x66, 0x3d, 0xf5, 0x66, 0xb4, 0x9b, 0x37, 0xad, 0xe5, 0x2a, 0xfd, + 0xb4, 0xb5, 0xf8, 0x91, 0x39, 0x34, 0xb6, 0x75, 0x1a, 0x4e, 0x48, 0xf1, 0xf8, 0x33, 0x82, 0xbe, + 0xc6, 0x75, 0xe0, 0x1b, 0xdd, 0xd4, 0x65, 0x2e, 0x66, 0xe3, 0x66, 0xde, 0x34, 0x25, 0xc9, 0x9a, + 0x7d, 0xf3, 0xf5, 0xe7, 0x56, 0xef, 0x14, 0xbe, 0x47, 0xba, 0xbd, 0x4a, 0x58, 0x18, 0x16, 0xd5, + 0x8c, 0x91, 0xc0, 0x23, 0x1b, 0x6d, 0xaf, 0x81, 0x4d, 0xfc, 0x11, 0x01, 0x34, 0xa7, 0x14, 0xe7, + 0x94, 0x93, 0x8e, 0x86, 0x71, 0x2b, 0x77, 0x9e, 0xe6, 0x18, 0x97, 0x1c, 0x45, 0x7c, 0x3d, 0x07, + 0x07, 0xfe, 0x85, 0x60, 0x20, 0x7b, 0x3b, 0xe1, 0x72, 0x4e, 0x21, 0x19, 0xab, 0xd6, 0xb8, 0xff, + 0x4f, 0x35, 0x34, 0xd8, 0x13, 0x09, 0x36, 0x87, 0x67, 0xf2, 0x5c, 0x90, 0x5c, 0xe7, 0x45, 0x39, + 0xf5, 0x64, 0xa3, 0x65, 0xdd, 0x6f, 0xe2, 0xef, 0x08, 0xce, 0x66, 0x6c, 0x13, 0x3c, 0x99, 0x5b, + 0x6b, 0xfb, 0x36, 0x34, 0xa6, 0x0e, 0x5f, 0x40, 0x93, 0xce, 0x48, 0xd2, 0x49, 0x3c, 0x91, 0x87, + 0x54, 0xaf, 0x5c, 0xb2, 0xa1, 0x3f, 0x6c, 0xe2, 0x6d, 0x04, 0xfd, 0x6d, 0x0b, 0x01, 0xdf, 0xfe, + 0x2b, 0x69, 0x59, 0xab, 0xca, 0xb8, 0x73, 0x98, 0x54, 0xcd, 0x33, 0x26, 0x79, 0x46, 0xf1, 0x48, + 0x37, 0x1e, 0x2a, 0x96, 0xd4, 0x5d, 0x89, 0xf2, 0x8b, 0x2f, 0xbb, 0x26, 0xda, 0xd9, 0x35, 0xd1, + 0x8f, 0x5d, 0x13, 0xbd, 0xdf, 0x33, 0x7b, 0x76, 0xf6, 0xcc, 0x9e, 0x6f, 0x7b, 0x66, 0xcf, 0xcb, + 0x09, 0x3f, 0x48, 0x16, 0x57, 0x1c, 0xdb, 0xe5, 0x55, 0x55, 0xaf, 0x18, 0xb1, 0x64, 0x8d, 0xc7, + 0x4b, 0xfa, 0x29, 0x64, 0x9e, 0xcf, 0x62, 0xf2, 0x3a, 0xbb, 0x8d, 0x73, 0x52, 0xfe, 0xb1, 0x1b, + 0xff, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xac, 0xac, 0x8c, 0x6e, 0x9c, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -954,13 +633,6 @@ type QueryClient interface { // SellOrdersByAddress queries a paginated list of all sell orders from a // specific address SellOrdersByAddress(ctx context.Context, in *QuerySellOrdersByAddressRequest, opts ...grpc.CallOption) (*QuerySellOrdersByAddressResponse, error) - // BuyOrder queries a buy order by its id - BuyOrder(ctx context.Context, in *QueryBuyOrderRequest, opts ...grpc.CallOption) (*QueryBuyOrderResponse, error) - // BuyOrders queries a paginated list of all buy orders - BuyOrders(ctx context.Context, in *QueryBuyOrdersRequest, opts ...grpc.CallOption) (*QueryBuyOrdersResponse, error) - // BuyOrdersByAddress queries a paginated list of buy orders by creator - // address - BuyOrdersByAddress(ctx context.Context, in *QueryBuyOrdersByAddressRequest, opts ...grpc.CallOption) (*QueryBuyOrdersByAddressResponse, error) // AllowedDenoms queries all denoms allowed to be set in the AskPrice of a // sell order AllowedDenoms(ctx context.Context, in *QueryAllowedDenomsRequest, opts ...grpc.CallOption) (*QueryAllowedDenomsResponse, error) @@ -1010,33 +682,6 @@ func (c *queryClient) SellOrdersByAddress(ctx context.Context, in *QuerySellOrde return out, nil } -func (c *queryClient) BuyOrder(ctx context.Context, in *QueryBuyOrderRequest, opts ...grpc.CallOption) (*QueryBuyOrderResponse, error) { - out := new(QueryBuyOrderResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.marketplace.v1.Query/BuyOrder", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) BuyOrders(ctx context.Context, in *QueryBuyOrdersRequest, opts ...grpc.CallOption) (*QueryBuyOrdersResponse, error) { - out := new(QueryBuyOrdersResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.marketplace.v1.Query/BuyOrders", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) BuyOrdersByAddress(ctx context.Context, in *QueryBuyOrdersByAddressRequest, opts ...grpc.CallOption) (*QueryBuyOrdersByAddressResponse, error) { - out := new(QueryBuyOrdersByAddressResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.marketplace.v1.Query/BuyOrdersByAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) AllowedDenoms(ctx context.Context, in *QueryAllowedDenomsRequest, opts ...grpc.CallOption) (*QueryAllowedDenomsResponse, error) { out := new(QueryAllowedDenomsResponse) err := c.cc.Invoke(ctx, "/regen.ecocredit.marketplace.v1.Query/AllowedDenoms", in, out, opts...) @@ -1058,13 +703,6 @@ type QueryServer interface { // SellOrdersByAddress queries a paginated list of all sell orders from a // specific address SellOrdersByAddress(context.Context, *QuerySellOrdersByAddressRequest) (*QuerySellOrdersByAddressResponse, error) - // BuyOrder queries a buy order by its id - BuyOrder(context.Context, *QueryBuyOrderRequest) (*QueryBuyOrderResponse, error) - // BuyOrders queries a paginated list of all buy orders - BuyOrders(context.Context, *QueryBuyOrdersRequest) (*QueryBuyOrdersResponse, error) - // BuyOrdersByAddress queries a paginated list of buy orders by creator - // address - BuyOrdersByAddress(context.Context, *QueryBuyOrdersByAddressRequest) (*QueryBuyOrdersByAddressResponse, error) // AllowedDenoms queries all denoms allowed to be set in the AskPrice of a // sell order AllowedDenoms(context.Context, *QueryAllowedDenomsRequest) (*QueryAllowedDenomsResponse, error) @@ -1086,15 +724,6 @@ func (*UnimplementedQueryServer) SellOrdersByBatchDenom(ctx context.Context, req func (*UnimplementedQueryServer) SellOrdersByAddress(ctx context.Context, req *QuerySellOrdersByAddressRequest) (*QuerySellOrdersByAddressResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SellOrdersByAddress not implemented") } -func (*UnimplementedQueryServer) BuyOrder(ctx context.Context, req *QueryBuyOrderRequest) (*QueryBuyOrderResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BuyOrder not implemented") -} -func (*UnimplementedQueryServer) BuyOrders(ctx context.Context, req *QueryBuyOrdersRequest) (*QueryBuyOrdersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BuyOrders not implemented") -} -func (*UnimplementedQueryServer) BuyOrdersByAddress(ctx context.Context, req *QueryBuyOrdersByAddressRequest) (*QueryBuyOrdersByAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BuyOrdersByAddress not implemented") -} func (*UnimplementedQueryServer) AllowedDenoms(ctx context.Context, req *QueryAllowedDenomsRequest) (*QueryAllowedDenomsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllowedDenoms not implemented") } @@ -1175,60 +804,6 @@ func _Query_SellOrdersByAddress_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } -func _Query_BuyOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBuyOrderRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BuyOrder(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.marketplace.v1.Query/BuyOrder", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BuyOrder(ctx, req.(*QueryBuyOrderRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_BuyOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBuyOrdersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BuyOrders(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.marketplace.v1.Query/BuyOrders", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BuyOrders(ctx, req.(*QueryBuyOrdersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_BuyOrdersByAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBuyOrdersByAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BuyOrdersByAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.marketplace.v1.Query/BuyOrdersByAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BuyOrdersByAddress(ctx, req.(*QueryBuyOrdersByAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_AllowedDenoms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryAllowedDenomsRequest) if err := dec(in); err != nil { @@ -1267,18 +842,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "SellOrdersByAddress", Handler: _Query_SellOrdersByAddress_Handler, }, - { - MethodName: "BuyOrder", - Handler: _Query_BuyOrder_Handler, - }, - { - MethodName: "BuyOrders", - Handler: _Query_BuyOrders_Handler, - }, - { - MethodName: "BuyOrdersByAddress", - Handler: _Query_BuyOrdersByAddress_Handler, - }, { MethodName: "AllowedDenoms", Handler: _Query_AllowedDenoms_Handler, @@ -1617,244 +1180,6 @@ func (m *QuerySellOrdersByAddressResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *QueryBuyOrderRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBuyOrderRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBuyOrderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BuyOrderId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.BuyOrderId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryBuyOrderResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBuyOrderResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBuyOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BuyOrder != nil { - { - size, err := m.BuyOrder.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBuyOrdersRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBuyOrdersRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBuyOrdersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBuyOrdersResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBuyOrdersResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBuyOrdersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.BuyOrders) > 0 { - for iNdEx := len(m.BuyOrders) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.BuyOrders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryBuyOrdersByAddressRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBuyOrdersByAddressRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBuyOrdersByAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBuyOrdersByAddressResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBuyOrdersByAddressResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBuyOrdersByAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.BuyOrders) > 0 { - for iNdEx := len(m.BuyOrders) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.BuyOrders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - func (m *QueryAllowedDenomsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2079,32 +1404,7 @@ func (m *QuerySellOrdersByAddressResponse) Size() (n int) { return n } -func (m *QueryBuyOrderRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BuyOrderId != 0 { - n += 1 + sovQuery(uint64(m.BuyOrderId)) - } - return n -} - -func (m *QueryBuyOrderResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BuyOrder != nil { - l = m.BuyOrder.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBuyOrdersRequest) Size() (n int) { +func (m *QueryAllowedDenomsRequest) Size() (n int) { if m == nil { return 0 } @@ -2117,14 +1417,14 @@ func (m *QueryBuyOrdersRequest) Size() (n int) { return n } -func (m *QueryBuyOrdersResponse) Size() (n int) { +func (m *QueryAllowedDenomsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.BuyOrders) > 0 { - for _, e := range m.BuyOrders { + if len(m.AllowedDenoms) > 0 { + for _, e := range m.AllowedDenoms { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } @@ -2136,76 +1436,8 @@ func (m *QueryBuyOrdersResponse) Size() (n int) { return n } -func (m *QueryBuyOrdersByAddressRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBuyOrdersByAddressResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.BuyOrders) > 0 { - for _, e := range m.BuyOrders { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAllowedDenomsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAllowedDenomsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.AllowedDenoms) > 0 { - for _, e := range m.AllowedDenoms { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 } func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -2243,400 +1475,7 @@ func (m *QuerySellOrderRequest) Unmarshal(dAtA []byte) error { if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SellOrderId", wireType) } - m.SellOrderId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SellOrderId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QuerySellOrderResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QuerySellOrderResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySellOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SellOrder", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SellOrder == nil { - m.SellOrder = &SellOrder{} - } - if err := m.SellOrder.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QuerySellOrdersRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QuerySellOrdersRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySellOrdersRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QuerySellOrdersResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QuerySellOrdersResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySellOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SellOrders", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SellOrders = append(m.SellOrders, &SellOrder{}) - if err := m.SellOrders[len(m.SellOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QuerySellOrdersByBatchDenomRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QuerySellOrdersByBatchDenomRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySellOrdersByBatchDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int + m.SellOrderId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2646,28 +1485,11 @@ func (m *QuerySellOrdersByBatchDenomRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.SellOrderId |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -2689,7 +1511,7 @@ func (m *QuerySellOrdersByBatchDenomRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QuerySellOrdersByBatchDenomResponse) Unmarshal(dAtA []byte) error { +func (m *QuerySellOrderResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2712,49 +1534,15 @@ func (m *QuerySellOrdersByBatchDenomResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QuerySellOrdersByBatchDenomResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySellOrderResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySellOrdersByBatchDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySellOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SellOrders", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SellOrders = append(m.SellOrders, &SellOrder{}) - if err := m.SellOrders[len(m.SellOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SellOrder", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2781,10 +1569,10 @@ func (m *QuerySellOrdersByBatchDenomResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} + if m.SellOrder == nil { + m.SellOrder = &SellOrder{} } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.SellOrder.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2809,7 +1597,7 @@ func (m *QuerySellOrdersByBatchDenomResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QuerySellOrdersByAddressRequest) Unmarshal(dAtA []byte) error { +func (m *QuerySellOrdersRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2832,45 +1620,13 @@ func (m *QuerySellOrdersByAddressRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QuerySellOrdersByAddressRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySellOrdersRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySellOrdersByAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySellOrdersRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } @@ -2927,7 +1683,7 @@ func (m *QuerySellOrdersByAddressRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QuerySellOrdersByAddressResponse) Unmarshal(dAtA []byte) error { +func (m *QuerySellOrdersResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2950,10 +1706,10 @@ func (m *QuerySellOrdersByAddressResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QuerySellOrdersByAddressResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySellOrdersResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySellOrdersByAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySellOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3047,76 +1803,7 @@ func (m *QuerySellOrdersByAddressResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBuyOrderRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBuyOrderRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBuyOrderRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BuyOrderId", wireType) - } - m.BuyOrderId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BuyOrderId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBuyOrderResponse) Unmarshal(dAtA []byte) error { +func (m *QuerySellOrdersByBatchDenomRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3139,17 +1826,17 @@ func (m *QueryBuyOrderResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBuyOrderResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySellOrdersByBatchDenomRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBuyOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySellOrdersByBatchDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuyOrder", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3159,79 +1846,25 @@ func (m *QueryBuyOrderResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.BuyOrder == nil { - m.BuyOrder = &BuyOrder{} - } - if err := m.BuyOrder.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.BatchDenom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBuyOrdersRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBuyOrdersRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBuyOrdersRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } @@ -3288,7 +1921,7 @@ func (m *QueryBuyOrdersRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBuyOrdersResponse) Unmarshal(dAtA []byte) error { +func (m *QuerySellOrdersByBatchDenomResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3311,15 +1944,15 @@ func (m *QueryBuyOrdersResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBuyOrdersResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySellOrdersByBatchDenomResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBuyOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySellOrdersByBatchDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuyOrders", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SellOrders", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3346,8 +1979,8 @@ func (m *QueryBuyOrdersResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BuyOrders = append(m.BuyOrders, &BuyOrder{}) - if err := m.BuyOrders[len(m.BuyOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.SellOrders = append(m.SellOrders, &SellOrder{}) + if err := m.SellOrders[len(m.SellOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3408,7 +2041,7 @@ func (m *QueryBuyOrdersResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBuyOrdersByAddressRequest) Unmarshal(dAtA []byte) error { +func (m *QuerySellOrdersByAddressRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3431,10 +2064,10 @@ func (m *QueryBuyOrdersByAddressRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBuyOrdersByAddressRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySellOrdersByAddressRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBuyOrdersByAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySellOrdersByAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3526,7 +2159,7 @@ func (m *QueryBuyOrdersByAddressRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBuyOrdersByAddressResponse) Unmarshal(dAtA []byte) error { +func (m *QuerySellOrdersByAddressResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3549,15 +2182,15 @@ func (m *QueryBuyOrdersByAddressResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBuyOrdersByAddressResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySellOrdersByAddressResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBuyOrdersByAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySellOrdersByAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuyOrders", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SellOrders", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3584,8 +2217,8 @@ func (m *QueryBuyOrdersByAddressResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BuyOrders = append(m.BuyOrders, &BuyOrder{}) - if err := m.BuyOrders[len(m.BuyOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.SellOrders = append(m.SellOrders, &SellOrder{}) + if err := m.SellOrders[len(m.SellOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/ecocredit/marketplace/query.pb.gw.go b/x/ecocredit/marketplace/query.pb.gw.go index 56b6547343..01353913f3 100644 --- a/x/ecocredit/marketplace/query.pb.gw.go +++ b/x/ecocredit/marketplace/query.pb.gw.go @@ -267,168 +267,6 @@ func local_request_Query_SellOrdersByAddress_0(ctx context.Context, marshaler ru } -func request_Query_BuyOrder_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBuyOrderRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["buy_order_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "buy_order_id") - } - - protoReq.BuyOrderId, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "buy_order_id", err) - } - - msg, err := client.BuyOrder(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_BuyOrder_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBuyOrderRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["buy_order_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "buy_order_id") - } - - protoReq.BuyOrderId, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "buy_order_id", err) - } - - msg, err := server.BuyOrder(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_BuyOrders_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_BuyOrders_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBuyOrdersRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_BuyOrders_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.BuyOrders(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_BuyOrders_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBuyOrdersRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_BuyOrders_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.BuyOrders(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_BuyOrdersByAddress_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_Query_BuyOrdersByAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBuyOrdersByAddressRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_BuyOrdersByAddress_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.BuyOrdersByAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_BuyOrdersByAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBuyOrdersByAddressRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_BuyOrdersByAddress_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.BuyOrdersByAddress(ctx, &protoReq) - return msg, metadata, err - -} - var ( filter_Query_AllowedDenoms_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -563,75 +401,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_BuyOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_BuyOrder_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_BuyOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_BuyOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_BuyOrders_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_BuyOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_BuyOrdersByAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_BuyOrdersByAddress_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_BuyOrdersByAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_AllowedDenoms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -776,66 +545,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_BuyOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_BuyOrder_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_BuyOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_BuyOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_BuyOrders_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_BuyOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_BuyOrdersByAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_BuyOrdersByAddress_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_BuyOrdersByAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_AllowedDenoms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -868,12 +577,6 @@ var ( pattern_Query_SellOrdersByAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 5}, []string{"regen", "ecocredit", "marketplace", "v1", "sell-orders", "address"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_BuyOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"regen", "ecocredit", "marketplace", "v1", "buy-orders", "id", "buy_order_id"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_BuyOrders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"regen", "ecocredit", "marketplace", "v1", "buy-orders"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_BuyOrdersByAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 5}, []string{"regen", "ecocredit", "marketplace", "v1", "buy-orders", "address"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_AllowedDenoms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"regen", "ecocredit", "marketplace", "v1", "ask-denoms"}, "", runtime.AssumeColonVerbOpt(false))) ) @@ -886,11 +589,5 @@ var ( forward_Query_SellOrdersByAddress_0 = runtime.ForwardResponseMessage - forward_Query_BuyOrder_0 = runtime.ForwardResponseMessage - - forward_Query_BuyOrders_0 = runtime.ForwardResponseMessage - - forward_Query_BuyOrdersByAddress_0 = runtime.ForwardResponseMessage - forward_Query_AllowedDenoms_0 = runtime.ForwardResponseMessage ) diff --git a/x/ecocredit/marketplace/state.pb.go b/x/ecocredit/marketplace/state.pb.go index 06c6bc3e67..433f38828b 100644 --- a/x/ecocredit/marketplace/state.pb.go +++ b/x/ecocredit/marketplace/state.pb.go @@ -149,234 +149,6 @@ func (m *SellOrder) GetMaker() bool { return false } -// BuyOrder represents the information for a buy order. -type BuyOrder struct { - // id is the unique ID of buy order. - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // buyer is the bytes address of the account that created the buy order - Buyer []byte `protobuf:"bytes,2,opt,name=buyer,proto3" json:"buyer,omitempty"` - // selection is the buy order selection. - Selection *BuyOrder_Selection `protobuf:"bytes,3,opt,name=selection,proto3" json:"selection,omitempty"` - // quantity is the decimal quantity of credits to buy. If the quantity of - // credits available is less than this amount the order will be partially - // filled unless disable_partial_fill is true. - Quantity string `protobuf:"bytes,4,opt,name=quantity,proto3" json:"quantity,omitempty"` - // market_id is the market in which this sell order exists and specifies - // the bank_denom that ask_price corresponds to. - MarketId uint64 `protobuf:"varint,5,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - // bid price is the integer bid price for this buy order. A credit unit will - // be settled at a purchase price that is no more than the bid price. The buy - // order will fail if the buyer does not have enough funds available to - // complete the purchase. - BidPrice string `protobuf:"bytes,6,opt,name=bid_price,json=bidPrice,proto3" json:"bid_price,omitempty"` - // disable_auto_retire allows auto-retirement to be disabled. If it is set to - // true the credits will not auto-retire and can be resold assuming that the - // corresponding sell order has auto-retirement disabled. If the sell order - // hasn't disabled auto-retirement and the buy order tries to disable it, - // that buy order will fail. - DisableAutoRetire bool `protobuf:"varint,7,opt,name=disable_auto_retire,json=disableAutoRetire,proto3" json:"disable_auto_retire,omitempty"` - // disable_partial_fill disables the default behavior of partially filling - // buy orders if the requested quantity is not available. - DisablePartialFill bool `protobuf:"varint,8,opt,name=disable_partial_fill,json=disablePartialFill,proto3" json:"disable_partial_fill,omitempty"` - // expiration is the optional timestamp when the buy order expires. When the - // expiration time is reached, the buy order is removed from state. - Expiration *types.Timestamp `protobuf:"bytes,9,opt,name=expiration,proto3" json:"expiration,omitempty"` - // maker indicates that this is a maker order, meaning that when it hit - // the order book, there were no matching sell orders. - Maker bool `protobuf:"varint,10,opt,name=maker,proto3" json:"maker,omitempty"` -} - -func (m *BuyOrder) Reset() { *m = BuyOrder{} } -func (m *BuyOrder) String() string { return proto.CompactTextString(m) } -func (*BuyOrder) ProtoMessage() {} -func (*BuyOrder) Descriptor() ([]byte, []int) { - return fileDescriptor_718b9cb8f10a9f3c, []int{1} -} -func (m *BuyOrder) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BuyOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BuyOrder.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BuyOrder) XXX_Merge(src proto.Message) { - xxx_messageInfo_BuyOrder.Merge(m, src) -} -func (m *BuyOrder) XXX_Size() int { - return m.Size() -} -func (m *BuyOrder) XXX_DiscardUnknown() { - xxx_messageInfo_BuyOrder.DiscardUnknown(m) -} - -var xxx_messageInfo_BuyOrder proto.InternalMessageInfo - -func (m *BuyOrder) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *BuyOrder) GetBuyer() []byte { - if m != nil { - return m.Buyer - } - return nil -} - -func (m *BuyOrder) GetSelection() *BuyOrder_Selection { - if m != nil { - return m.Selection - } - return nil -} - -func (m *BuyOrder) GetQuantity() string { - if m != nil { - return m.Quantity - } - return "" -} - -func (m *BuyOrder) GetMarketId() uint64 { - if m != nil { - return m.MarketId - } - return 0 -} - -func (m *BuyOrder) GetBidPrice() string { - if m != nil { - return m.BidPrice - } - return "" -} - -func (m *BuyOrder) GetDisableAutoRetire() bool { - if m != nil { - return m.DisableAutoRetire - } - return false -} - -func (m *BuyOrder) GetDisablePartialFill() bool { - if m != nil { - return m.DisablePartialFill - } - return false -} - -func (m *BuyOrder) GetExpiration() *types.Timestamp { - if m != nil { - return m.Expiration - } - return nil -} - -func (m *BuyOrder) GetMaker() bool { - if m != nil { - return m.Maker - } - return false -} - -// Selection defines a buy order selection. -type BuyOrder_Selection struct { - // sum defines the type of selection. - // - // Types that are valid to be assigned to Sum: - // *BuyOrder_Selection_SellOrderId - // *BuyOrder_Selection_Filter - Sum isBuyOrder_Selection_Sum `protobuf_oneof:"sum"` -} - -func (m *BuyOrder_Selection) Reset() { *m = BuyOrder_Selection{} } -func (m *BuyOrder_Selection) String() string { return proto.CompactTextString(m) } -func (*BuyOrder_Selection) ProtoMessage() {} -func (*BuyOrder_Selection) Descriptor() ([]byte, []int) { - return fileDescriptor_718b9cb8f10a9f3c, []int{1, 0} -} -func (m *BuyOrder_Selection) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BuyOrder_Selection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BuyOrder_Selection.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BuyOrder_Selection) XXX_Merge(src proto.Message) { - xxx_messageInfo_BuyOrder_Selection.Merge(m, src) -} -func (m *BuyOrder_Selection) XXX_Size() int { - return m.Size() -} -func (m *BuyOrder_Selection) XXX_DiscardUnknown() { - xxx_messageInfo_BuyOrder_Selection.DiscardUnknown(m) -} - -var xxx_messageInfo_BuyOrder_Selection proto.InternalMessageInfo - -type isBuyOrder_Selection_Sum interface { - isBuyOrder_Selection_Sum() - MarshalTo([]byte) (int, error) - Size() int -} - -type BuyOrder_Selection_SellOrderId struct { - SellOrderId uint64 `protobuf:"varint,1,opt,name=sell_order_id,json=sellOrderId,proto3,oneof" json:"sell_order_id,omitempty"` -} -type BuyOrder_Selection_Filter struct { - Filter *Filter `protobuf:"bytes,2,opt,name=filter,proto3,oneof" json:"filter,omitempty"` -} - -func (*BuyOrder_Selection_SellOrderId) isBuyOrder_Selection_Sum() {} -func (*BuyOrder_Selection_Filter) isBuyOrder_Selection_Sum() {} - -func (m *BuyOrder_Selection) GetSum() isBuyOrder_Selection_Sum { - if m != nil { - return m.Sum - } - return nil -} - -func (m *BuyOrder_Selection) GetSellOrderId() uint64 { - if x, ok := m.GetSum().(*BuyOrder_Selection_SellOrderId); ok { - return x.SellOrderId - } - return 0 -} - -func (m *BuyOrder_Selection) GetFilter() *Filter { - if x, ok := m.GetSum().(*BuyOrder_Selection_Filter); ok { - return x.Filter - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*BuyOrder_Selection) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*BuyOrder_Selection_SellOrderId)(nil), - (*BuyOrder_Selection_Filter)(nil), - } -} - // AllowedDenom represents the information for an allowed ask/bid denom. type AllowedDenom struct { // denom is the bank denom to allow (ex. ibc/GLKHDSG423SGS) @@ -394,7 +166,7 @@ func (m *AllowedDenom) Reset() { *m = AllowedDenom{} } func (m *AllowedDenom) String() string { return proto.CompactTextString(m) } func (*AllowedDenom) ProtoMessage() {} func (*AllowedDenom) Descriptor() ([]byte, []int) { - return fileDescriptor_718b9cb8f10a9f3c, []int{2} + return fileDescriptor_718b9cb8f10a9f3c, []int{1} } func (m *AllowedDenom) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -492,7 +264,7 @@ func (m *Market) Reset() { *m = Market{} } func (m *Market) String() string { return proto.CompactTextString(m) } func (*Market) ProtoMessage() {} func (*Market) Descriptor() ([]byte, []int) { - return fileDescriptor_718b9cb8f10a9f3c, []int{3} + return fileDescriptor_718b9cb8f10a9f3c, []int{2} } func (m *Market) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -551,8 +323,6 @@ func (m *Market) GetPrecisionModifier() uint32 { func init() { proto.RegisterType((*SellOrder)(nil), "regen.ecocredit.marketplace.v1.SellOrder") - proto.RegisterType((*BuyOrder)(nil), "regen.ecocredit.marketplace.v1.BuyOrder") - proto.RegisterType((*BuyOrder_Selection)(nil), "regen.ecocredit.marketplace.v1.BuyOrder.Selection") proto.RegisterType((*AllowedDenom)(nil), "regen.ecocredit.marketplace.v1.AllowedDenom") proto.RegisterType((*Market)(nil), "regen.ecocredit.marketplace.v1.Market") } @@ -562,54 +332,44 @@ func init() { } var fileDescriptor_718b9cb8f10a9f3c = []byte{ - // 749 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xdd, 0x8e, 0xdb, 0x44, - 0x14, 0xce, 0x38, 0x9b, 0x34, 0x9e, 0x24, 0x55, 0x3a, 0x5d, 0x55, 0x26, 0xd0, 0x34, 0x0a, 0x3f, - 0x8a, 0x80, 0xda, 0x64, 0xe1, 0x2a, 0x12, 0x12, 0x5d, 0xa1, 0xaa, 0x7b, 0x51, 0xb1, 0x72, 0x2b, - 0x21, 0x71, 0x63, 0x8d, 0x3d, 0x27, 0xd9, 0x51, 0xc6, 0x1e, 0x33, 0x1e, 0x6f, 0x37, 0x3c, 0x04, - 0xe2, 0x1e, 0x89, 0xb7, 0x40, 0xbc, 0x02, 0x97, 0x95, 0xb8, 0xe1, 0x12, 0x65, 0xdf, 0x80, 0x27, - 0x40, 0x1e, 0xff, 0x6c, 0x08, 0x15, 0x95, 0xa0, 0x97, 0xdf, 0x9c, 0xef, 0xcc, 0x39, 0xf3, 0x7d, - 0x9f, 0x8d, 0x3f, 0x54, 0xb0, 0x86, 0xc4, 0x83, 0x48, 0x46, 0x0a, 0x18, 0xd7, 0x5e, 0x4c, 0xd5, - 0x06, 0x74, 0x2a, 0x68, 0x04, 0xde, 0xe5, 0xc2, 0xcb, 0x34, 0xd5, 0xe0, 0xa6, 0x4a, 0x6a, 0x49, - 0x26, 0x86, 0xeb, 0x36, 0x5c, 0x77, 0x8f, 0xeb, 0x5e, 0x2e, 0xc6, 0x0f, 0xd6, 0x52, 0xae, 0x05, - 0x78, 0x86, 0x1d, 0xe6, 0x2b, 0x4f, 0xf3, 0x18, 0x32, 0x4d, 0xe3, 0xb4, 0xbc, 0x60, 0x7c, 0x3f, - 0x92, 0x59, 0x2c, 0x33, 0x4f, 0xaa, 0xd8, 0xbb, 0x5c, 0x50, 0x91, 0x5e, 0xd0, 0x45, 0x01, 0xaa, - 0xf2, 0xeb, 0x76, 0xd1, 0xdb, 0x14, 0xb2, 0x92, 0x3b, 0xdb, 0x59, 0xd8, 0x7e, 0x06, 0x42, 0x7c, - 0xa5, 0x18, 0x28, 0x72, 0x1b, 0x5b, 0x9c, 0x39, 0x68, 0x8a, 0xe6, 0x47, 0xbe, 0xc5, 0x19, 0xb9, - 0x87, 0xbb, 0x19, 0x08, 0x01, 0xca, 0xb1, 0xa6, 0x68, 0x3e, 0xf0, 0x2b, 0x44, 0xde, 0xc2, 0xbd, - 0x90, 0xea, 0xe8, 0x22, 0xe0, 0xcc, 0x69, 0x1b, 0xf6, 0x2d, 0x83, 0xcf, 0x18, 0x19, 0xe3, 0xde, - 0xb7, 0x39, 0x4d, 0x34, 0xd7, 0x5b, 0xe7, 0x68, 0x8a, 0xe6, 0xb6, 0xdf, 0x60, 0xf2, 0x36, 0xb6, - 0xcb, 0x55, 0x8a, 0xbe, 0x8e, 0xe9, 0xeb, 0x95, 0x07, 0x67, 0xac, 0x28, 0xd2, 0x6c, 0x13, 0xa4, - 0x8a, 0x47, 0xe0, 0x74, 0xcb, 0x4e, 0x9a, 0x6d, 0xce, 0x0b, 0x4c, 0x5c, 0x7c, 0x97, 0xf1, 0x8c, - 0x86, 0x02, 0x02, 0x9a, 0x6b, 0x19, 0x28, 0xd0, 0x5c, 0x81, 0x73, 0x6b, 0x8a, 0xe6, 0x3d, 0xff, - 0x4e, 0x55, 0x7a, 0x94, 0x6b, 0xe9, 0x9b, 0x02, 0x59, 0x62, 0x0c, 0x57, 0x29, 0x57, 0x54, 0x73, - 0x99, 0x38, 0xf6, 0x14, 0xcd, 0xfb, 0x27, 0x63, 0xb7, 0xd4, 0xd5, 0xad, 0x75, 0x75, 0x9f, 0xd7, - 0xba, 0xfa, 0x7b, 0x6c, 0x72, 0x8c, 0x3b, 0x31, 0xdd, 0x80, 0x72, 0xb0, 0xb9, 0xbd, 0x04, 0xcb, - 0xe5, 0x9f, 0x3f, 0xfd, 0xf6, 0x7d, 0xfb, 0x33, 0xdc, 0x2d, 0x24, 0x1a, 0x21, 0x32, 0xb8, 0x91, - 0x60, 0x84, 0x08, 0xae, 0x85, 0x1a, 0x59, 0xe4, 0xf6, 0xfe, 0xec, 0x51, 0xdb, 0x41, 0xb3, 0x9f, - 0x8f, 0x70, 0xef, 0x34, 0xdf, 0xbe, 0x5a, 0xe3, 0x63, 0xdc, 0x09, 0xf3, 0x6d, 0x23, 0x71, 0x09, - 0xc8, 0x39, 0xb6, 0x33, 0x10, 0x10, 0x99, 0xfd, 0xdb, 0x66, 0xff, 0x13, 0xf7, 0xdf, 0x73, 0xe3, - 0xd6, 0x23, 0xdc, 0x67, 0x75, 0xa7, 0x7f, 0x73, 0xc9, 0xff, 0x32, 0x26, 0xe4, 0xec, 0xef, 0xc6, - 0x84, 0x9c, 0xfd, 0x37, 0x63, 0x3e, 0xc1, 0xc7, 0x35, 0x3f, 0xa5, 0x4a, 0x73, 0x2a, 0x82, 0x15, - 0x17, 0xc2, 0xe9, 0x99, 0x06, 0x52, 0xd5, 0xce, 0xcb, 0xd2, 0x63, 0x2e, 0xc4, 0x9b, 0xb7, 0x72, - 0xfc, 0x9d, 0x89, 0x7c, 0x25, 0xcb, 0x7b, 0x78, 0x58, 0x38, 0x17, 0xc8, 0x42, 0xb9, 0xa0, 0x76, - 0xe6, 0x49, 0xcb, 0xef, 0x67, 0xf5, 0x67, 0x71, 0xc6, 0xc8, 0x17, 0xb8, 0xbb, 0xe2, 0x42, 0x57, - 0x2e, 0xf5, 0x4f, 0x3e, 0x78, 0x9d, 0x17, 0x8f, 0x0d, 0xfb, 0x49, 0xcb, 0xaf, 0xfa, 0x4e, 0x3b, - 0xb8, 0x9d, 0xe5, 0xf1, 0xf2, 0x23, 0x13, 0xa3, 0xf7, 0x9b, 0x18, 0xd9, 0x95, 0xfb, 0x23, 0x74, - 0x90, 0x1b, 0xcb, 0xb1, 0x66, 0x3f, 0x22, 0x3c, 0x78, 0x24, 0x84, 0x7c, 0x01, 0xec, 0x4b, 0x48, - 0x64, 0x4c, 0xee, 0x63, 0x1c, 0xd2, 0x64, 0x13, 0xb0, 0x02, 0x99, 0x4d, 0x6d, 0xdf, 0x2e, 0x4e, - 0xca, 0xf2, 0xbb, 0x78, 0xc8, 0x78, 0x96, 0x0a, 0xba, 0xad, 0x18, 0x96, 0x61, 0x0c, 0xaa, 0xc3, - 0x92, 0x34, 0xc6, 0x3d, 0xb8, 0x4a, 0x65, 0x02, 0x89, 0x36, 0xc1, 0x1a, 0xfa, 0x0d, 0x6e, 0xb6, - 0x1b, 0xec, 0xcf, 0x21, 0x77, 0x0f, 0xae, 0x1d, 0x21, 0x07, 0x39, 0xed, 0xd9, 0x2f, 0x08, 0x77, - 0x9f, 0x9a, 0x57, 0xff, 0x23, 0xd3, 0x0f, 0x70, 0xbf, 0x94, 0x25, 0x28, 0xfe, 0x35, 0xd5, 0x1a, - 0xb8, 0x3c, 0x7a, 0xbe, 0x4d, 0xe1, 0xe0, 0x21, 0xed, 0xc3, 0x87, 0x3c, 0xc4, 0x24, 0x55, 0x10, - 0xf1, 0x8c, 0xcb, 0x24, 0x88, 0x25, 0xe3, 0x2b, 0x0e, 0xca, 0xa4, 0x76, 0xe8, 0xdf, 0x69, 0x2a, - 0x4f, 0xab, 0xc2, 0xd2, 0x35, 0x6b, 0xcf, 0x1b, 0x51, 0xdf, 0xc1, 0xf7, 0xf6, 0xc6, 0x7f, 0x7c, - 0x33, 0xc9, 0x6c, 0x7e, 0x74, 0xfa, 0xf5, 0xaf, 0xbb, 0x09, 0x7a, 0xb9, 0x9b, 0xa0, 0x3f, 0x76, - 0x13, 0xf4, 0xc3, 0xf5, 0xa4, 0xf5, 0xf2, 0x7a, 0xd2, 0xfa, 0xfd, 0x7a, 0xd2, 0xfa, 0xe6, 0xf3, - 0x35, 0xd7, 0x17, 0x79, 0xe8, 0x46, 0x32, 0xf6, 0x8c, 0xc3, 0x0f, 0x13, 0xd0, 0x2f, 0xa4, 0xda, - 0x54, 0x48, 0x00, 0x5b, 0x83, 0xf2, 0xae, 0x5e, 0xfd, 0x73, 0x0d, 0xbb, 0x26, 0x8f, 0x9f, 0xfe, - 0x15, 0x00, 0x00, 0xff, 0xff, 0xc9, 0xd1, 0xbe, 0x70, 0x0e, 0x06, 0x00, 0x00, + // 581 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xee, 0x26, 0x6d, 0x9a, 0x4c, 0xd3, 0x2a, 0xdd, 0xa2, 0xca, 0x04, 0xea, 0x46, 0x45, 0x48, + 0x11, 0x50, 0x5b, 0x01, 0x4e, 0x91, 0x38, 0x14, 0x71, 0xe9, 0xa1, 0x02, 0x99, 0x4a, 0x48, 0x5c, + 0xac, 0x8d, 0x77, 0x9a, 0xae, 0xbc, 0xf6, 0x9a, 0xf5, 0xa6, 0x6d, 0x5e, 0x02, 0x71, 0x47, 0xe2, + 0x35, 0x78, 0x05, 0x8e, 0x95, 0xb8, 0x70, 0x44, 0xe9, 0x1b, 0xf0, 0x04, 0xc8, 0x6b, 0x37, 0x8d, + 0x02, 0xc7, 0x6f, 0xbe, 0x6f, 0x7e, 0xf6, 0x9b, 0x59, 0x78, 0xa2, 0x71, 0x8c, 0xa9, 0x8f, 0x91, + 0x8a, 0x34, 0x72, 0x61, 0xfc, 0x84, 0xe9, 0x18, 0x4d, 0x26, 0x59, 0x84, 0xfe, 0xc5, 0xc0, 0xcf, + 0x0d, 0x33, 0xe8, 0x65, 0x5a, 0x19, 0x45, 0x5d, 0xab, 0xf5, 0xe6, 0x5a, 0x6f, 0x41, 0xeb, 0x5d, + 0x0c, 0xba, 0xfb, 0x63, 0xa5, 0xc6, 0x12, 0x7d, 0xab, 0x1e, 0x4d, 0xce, 0x7c, 0x23, 0x12, 0xcc, + 0x0d, 0x4b, 0xb2, 0xb2, 0x40, 0x77, 0x2f, 0x52, 0x79, 0xa2, 0x72, 0x5f, 0xe9, 0xc4, 0xbf, 0x18, + 0x30, 0x99, 0x9d, 0xb3, 0x41, 0x01, 0x4a, 0xfa, 0x60, 0x56, 0x83, 0xd6, 0x7b, 0x94, 0xf2, 0xad, + 0xe6, 0xa8, 0xe9, 0x16, 0xd4, 0x04, 0x77, 0x48, 0x8f, 0xf4, 0x57, 0x83, 0x9a, 0xe0, 0x74, 0x17, + 0x1a, 0x39, 0x4a, 0x89, 0xda, 0xa9, 0xf5, 0x48, 0xbf, 0x1d, 0x54, 0x88, 0xde, 0x87, 0xe6, 0x88, + 0x99, 0xe8, 0x3c, 0x14, 0xdc, 0xa9, 0x5b, 0xf5, 0xba, 0xc5, 0xc7, 0x9c, 0x76, 0xa1, 0xf9, 0x69, + 0xc2, 0x52, 0x23, 0xcc, 0xd4, 0x59, 0xed, 0x91, 0x7e, 0x2b, 0x98, 0x63, 0xfa, 0x00, 0x5a, 0xe5, + 0xf8, 0x45, 0xde, 0x9a, 0xcd, 0x6b, 0x96, 0x81, 0x63, 0x5e, 0x90, 0x2c, 0x8f, 0xc3, 0x4c, 0x8b, + 0x08, 0x9d, 0x46, 0x99, 0xc9, 0xf2, 0xf8, 0x5d, 0x81, 0xa9, 0x07, 0x3b, 0x5c, 0xe4, 0x6c, 0x24, + 0x31, 0x64, 0x13, 0xa3, 0x42, 0x8d, 0x46, 0x68, 0x74, 0xd6, 0x7b, 0xa4, 0xdf, 0x0c, 0xb6, 0x2b, + 0xea, 0x68, 0x62, 0x54, 0x60, 0x09, 0x3a, 0x04, 0xc0, 0xab, 0x4c, 0x68, 0x66, 0x84, 0x4a, 0x9d, + 0x56, 0x8f, 0xf4, 0x37, 0x9e, 0x77, 0xbd, 0xd2, 0x2b, 0xef, 0xd6, 0x2b, 0xef, 0xf4, 0xd6, 0xab, + 0x60, 0x41, 0x4d, 0xef, 0xc1, 0x5a, 0xc2, 0x62, 0xd4, 0x0e, 0xd8, 0xea, 0x25, 0x18, 0x0e, 0xff, + 0x7c, 0xfb, 0xf9, 0xb9, 0xfe, 0x12, 0x1a, 0x85, 0x45, 0x1d, 0x42, 0xdb, 0x77, 0x16, 0x74, 0x08, + 0x85, 0x5b, 0xa3, 0x3a, 0x35, 0xba, 0xb5, 0xd8, 0xbb, 0x53, 0x77, 0xc8, 0xc1, 0x57, 0x02, 0xed, + 0x23, 0x29, 0xd5, 0x25, 0xf2, 0x37, 0x98, 0xaa, 0x84, 0xee, 0x01, 0x8c, 0x58, 0x1a, 0x87, 0xbc, + 0x40, 0xd6, 0xef, 0x56, 0xd0, 0x2a, 0x22, 0x25, 0xfd, 0x08, 0x36, 0xb9, 0xc8, 0x33, 0xc9, 0xa6, + 0x95, 0xa2, 0x66, 0x15, 0xed, 0x2a, 0x58, 0x8a, 0xba, 0xd0, 0xc4, 0xab, 0x4c, 0xa5, 0x98, 0x1a, + 0xbb, 0x83, 0xcd, 0x60, 0x8e, 0x87, 0x4f, 0xed, 0xb0, 0x8f, 0xa1, 0xbd, 0xd8, 0x87, 0xee, 0x2c, + 0x95, 0xed, 0x10, 0x87, 0x38, 0xf5, 0x83, 0xef, 0x04, 0x1a, 0x27, 0x76, 0x0b, 0xff, 0xec, 0x7f, + 0x1f, 0x36, 0xca, 0xb3, 0x0b, 0xcd, 0x34, 0xc3, 0x6a, 0x0c, 0x28, 0x43, 0xa7, 0xd3, 0x0c, 0x97, + 0x1e, 0x52, 0x5f, 0x7e, 0xc8, 0x21, 0xd0, 0x4c, 0x63, 0x24, 0x72, 0xa1, 0xd2, 0x30, 0x51, 0x5c, + 0x9c, 0x09, 0xd4, 0xf6, 0x2c, 0x36, 0x83, 0xed, 0x39, 0x73, 0x52, 0x11, 0x43, 0xcf, 0x8e, 0xdd, + 0x9f, 0x7b, 0xfc, 0x10, 0x76, 0x17, 0xda, 0x3f, 0xbb, 0xeb, 0x64, 0x27, 0x5f, 0x7d, 0xfd, 0xe1, + 0xc7, 0xcc, 0x25, 0xd7, 0x33, 0x97, 0xfc, 0x9e, 0xb9, 0xe4, 0xcb, 0x8d, 0xbb, 0x72, 0x7d, 0xe3, + 0xae, 0xfc, 0xba, 0x71, 0x57, 0x3e, 0xbe, 0x1a, 0x0b, 0x73, 0x3e, 0x19, 0x79, 0x91, 0x4a, 0x7c, + 0xfb, 0x83, 0x0e, 0x53, 0x34, 0x97, 0x4a, 0xc7, 0x15, 0x92, 0xc8, 0xc7, 0xa8, 0xfd, 0xab, 0xff, + 0x7f, 0xc2, 0x51, 0xc3, 0x9e, 0xc8, 0x8b, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x00, 0xf9, 0xf0, + 0x94, 0xaa, 0x03, 0x00, 0x00, } func (m *SellOrder) Marshal() (dAtA []byte, err error) { @@ -703,7 +463,7 @@ func (m *SellOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *BuyOrder) Marshal() (dAtA []byte, err error) { +func (m *AllowedDenom) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -713,105 +473,39 @@ func (m *BuyOrder) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *BuyOrder) MarshalTo(dAtA []byte) (int, error) { +func (m *AllowedDenom) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *BuyOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *AllowedDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Maker { - i-- - if m.Maker { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if m.Expiration != nil { - { - size, err := m.Expiration.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintState(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.DisablePartialFill { - i-- - if m.DisablePartialFill { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.DisableAutoRetire { - i-- - if m.DisableAutoRetire { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if len(m.BidPrice) > 0 { - i -= len(m.BidPrice) - copy(dAtA[i:], m.BidPrice) - i = encodeVarintState(dAtA, i, uint64(len(m.BidPrice))) - i-- - dAtA[i] = 0x32 - } - if m.MarketId != 0 { - i = encodeVarintState(dAtA, i, uint64(m.MarketId)) - i-- - dAtA[i] = 0x28 - } - if len(m.Quantity) > 0 { - i -= len(m.Quantity) - copy(dAtA[i:], m.Quantity) - i = encodeVarintState(dAtA, i, uint64(len(m.Quantity))) - i-- - dAtA[i] = 0x22 - } - if m.Selection != nil { - { - size, err := m.Selection.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintState(dAtA, i, uint64(size)) - } + if m.Exponent != 0 { + i = encodeVarintState(dAtA, i, uint64(m.Exponent)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x18 } - if len(m.Buyer) > 0 { - i -= len(m.Buyer) - copy(dAtA[i:], m.Buyer) - i = encodeVarintState(dAtA, i, uint64(len(m.Buyer))) + if len(m.DisplayDenom) > 0 { + i -= len(m.DisplayDenom) + copy(dAtA[i:], m.DisplayDenom) + i = encodeVarintState(dAtA, i, uint64(len(m.DisplayDenom))) i-- dAtA[i] = 0x12 } - if m.Id != 0 { - i = encodeVarintState(dAtA, i, uint64(m.Id)) + if len(m.BankDenom) > 0 { + i -= len(m.BankDenom) + copy(dAtA[i:], m.BankDenom) + i = encodeVarintState(dAtA, i, uint64(len(m.BankDenom))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *BuyOrder_Selection) Marshal() (dAtA []byte, err error) { +func (m *Market) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -821,146 +515,39 @@ func (m *BuyOrder_Selection) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *BuyOrder_Selection) MarshalTo(dAtA []byte) (int, error) { +func (m *Market) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *BuyOrder_Selection) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Market) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Sum != nil { - { - size := m.Sum.Size() - i -= size - if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *BuyOrder_Selection_SellOrderId) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuyOrder_Selection_SellOrderId) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintState(dAtA, i, uint64(m.SellOrderId)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} -func (m *BuyOrder_Selection_Filter) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuyOrder_Selection_Filter) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Filter != nil { - { - size, err := m.Filter.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintState(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *AllowedDenom) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AllowedDenom) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AllowedDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Exponent != 0 { - i = encodeVarintState(dAtA, i, uint64(m.Exponent)) - i-- - dAtA[i] = 0x18 - } - if len(m.DisplayDenom) > 0 { - i -= len(m.DisplayDenom) - copy(dAtA[i:], m.DisplayDenom) - i = encodeVarintState(dAtA, i, uint64(len(m.DisplayDenom))) - i-- - dAtA[i] = 0x12 - } - if len(m.BankDenom) > 0 { - i -= len(m.BankDenom) - copy(dAtA[i:], m.BankDenom) - i = encodeVarintState(dAtA, i, uint64(len(m.BankDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Market) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Market) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Market) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.PrecisionModifier != 0 { - i = encodeVarintState(dAtA, i, uint64(m.PrecisionModifier)) - i-- - dAtA[i] = 0x20 - } - if len(m.BankDenom) > 0 { - i -= len(m.BankDenom) - copy(dAtA[i:], m.BankDenom) - i = encodeVarintState(dAtA, i, uint64(len(m.BankDenom))) - i-- - dAtA[i] = 0x1a - } - if len(m.CreditType) > 0 { - i -= len(m.CreditType) - copy(dAtA[i:], m.CreditType) - i = encodeVarintState(dAtA, i, uint64(len(m.CreditType))) - i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintState(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 + if m.PrecisionModifier != 0 { + i = encodeVarintState(dAtA, i, uint64(m.PrecisionModifier)) + i-- + dAtA[i] = 0x20 + } + if len(m.BankDenom) > 0 { + i -= len(m.BankDenom) + copy(dAtA[i:], m.BankDenom) + i = encodeVarintState(dAtA, i, uint64(len(m.BankDenom))) + i-- + dAtA[i] = 0x1a + } + if len(m.CreditType) > 0 { + i -= len(m.CreditType) + copy(dAtA[i:], m.CreditType) + i = encodeVarintState(dAtA, i, uint64(len(m.CreditType))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintState(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } @@ -1016,83 +603,6 @@ func (m *SellOrder) Size() (n int) { return n } -func (m *BuyOrder) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovState(uint64(m.Id)) - } - l = len(m.Buyer) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - if m.Selection != nil { - l = m.Selection.Size() - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Quantity) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - if m.MarketId != 0 { - n += 1 + sovState(uint64(m.MarketId)) - } - l = len(m.BidPrice) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - if m.DisableAutoRetire { - n += 2 - } - if m.DisablePartialFill { - n += 2 - } - if m.Expiration != nil { - l = m.Expiration.Size() - n += 1 + l + sovState(uint64(l)) - } - if m.Maker { - n += 2 - } - return n -} - -func (m *BuyOrder_Selection) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Sum != nil { - n += m.Sum.Size() - } - return n -} - -func (m *BuyOrder_Selection_SellOrderId) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovState(uint64(m.SellOrderId)) - return n -} -func (m *BuyOrder_Selection_Filter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Filter != nil { - l = m.Filter.Size() - n += 1 + l + sovState(uint64(l)) - } - return n -} func (m *AllowedDenom) Size() (n int) { if m == nil { return 0 @@ -1423,429 +933,6 @@ func (m *SellOrder) Unmarshal(dAtA []byte) error { } return nil } -func (m *BuyOrder) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuyOrder: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuyOrder: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Buyer", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Buyer = append(m.Buyer[:0], dAtA[iNdEx:postIndex]...) - if m.Buyer == nil { - m.Buyer = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selection", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Selection == nil { - m.Selection = &BuyOrder_Selection{} - } - if err := m.Selection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - 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 ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Quantity = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) - } - m.MarketId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MarketId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BidPrice", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - 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 ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BidPrice = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DisableAutoRetire", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DisableAutoRetire = bool(v != 0) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DisablePartialFill", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DisablePartialFill = bool(v != 0) - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Expiration == nil { - m.Expiration = &types.Timestamp{} - } - if err := m.Expiration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Maker", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Maker = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipState(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthState - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuyOrder_Selection) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Selection: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Selection: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SellOrderId", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Sum = &BuyOrder_Selection_SellOrderId{v} - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Filter{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &BuyOrder_Selection_Filter{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipState(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthState - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *AllowedDenom) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/ecocredit/marketplace/tx.pb.go b/x/ecocredit/marketplace/tx.pb.go index b47c6cea4b..6b7702320c 100644 --- a/x/ecocredit/marketplace/tx.pb.go +++ b/x/ecocredit/marketplace/tx.pb.go @@ -494,26 +494,26 @@ func (m *MsgCancelSellOrderResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCancelSellOrderResponse proto.InternalMessageInfo -// MsgBuy is the Msg/Buy request type. -type MsgBuy struct { +// MsgBuyDirect is the Msg/BuyDirect request type. +type MsgBuyDirect struct { // buyer is the address of the credit buyer. Buyer string `protobuf:"bytes,1,opt,name=buyer,proto3" json:"buyer,omitempty"` - // orders are the new buy orders. - Orders []*MsgBuy_Order `protobuf:"bytes,2,rep,name=orders,proto3" json:"orders,omitempty"` + // orders is a list of orders for ecocredits. + Orders []*MsgBuyDirect_Order `protobuf:"bytes,2,rep,name=orders,proto3" json:"orders,omitempty"` } -func (m *MsgBuy) Reset() { *m = MsgBuy{} } -func (m *MsgBuy) String() string { return proto.CompactTextString(m) } -func (*MsgBuy) ProtoMessage() {} -func (*MsgBuy) Descriptor() ([]byte, []int) { +func (m *MsgBuyDirect) Reset() { *m = MsgBuyDirect{} } +func (m *MsgBuyDirect) String() string { return proto.CompactTextString(m) } +func (*MsgBuyDirect) ProtoMessage() {} +func (*MsgBuyDirect) Descriptor() ([]byte, []int) { return fileDescriptor_68c9b4e4b7fcb584, []int{6} } -func (m *MsgBuy) XXX_Unmarshal(b []byte) error { +func (m *MsgBuyDirect) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgBuy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgBuyDirect) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgBuy.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgBuyDirect.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -523,74 +523,64 @@ func (m *MsgBuy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *MsgBuy) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgBuy.Merge(m, src) +func (m *MsgBuyDirect) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBuyDirect.Merge(m, src) } -func (m *MsgBuy) XXX_Size() int { +func (m *MsgBuyDirect) XXX_Size() int { return m.Size() } -func (m *MsgBuy) XXX_DiscardUnknown() { - xxx_messageInfo_MsgBuy.DiscardUnknown(m) +func (m *MsgBuyDirect) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBuyDirect.DiscardUnknown(m) } -var xxx_messageInfo_MsgBuy proto.InternalMessageInfo +var xxx_messageInfo_MsgBuyDirect proto.InternalMessageInfo -func (m *MsgBuy) GetBuyer() string { +func (m *MsgBuyDirect) GetBuyer() string { if m != nil { return m.Buyer } return "" } -func (m *MsgBuy) GetOrders() []*MsgBuy_Order { +func (m *MsgBuyDirect) GetOrders() []*MsgBuyDirect_Order { if m != nil { return m.Orders } return nil } -// Order is a buy order. -type MsgBuy_Order struct { - // selection is the buy order selection. - Selection *MsgBuy_Order_Selection `protobuf:"bytes,1,opt,name=selection,proto3" json:"selection,omitempty"` - // quantity is the quantity of credits to buy. If the quantity of credits - // available is less than this amount the order will be partially filled - // unless disable_partial_fill is true. - Quantity string `protobuf:"bytes,2,opt,name=quantity,proto3" json:"quantity,omitempty"` - // bid price is the bid price for this buy order. A credit unit will be - // settled at a purchase price that is no more than the bid price. The - // buy order will fail if the buyer does not have enough funds available - // to complete the purchase. - BidPrice *types.Coin `protobuf:"bytes,3,opt,name=bid_price,json=bidPrice,proto3" json:"bid_price,omitempty"` +// Order contains the information needed to purchase an ecocredit. +type MsgBuyDirect_Order struct { + // sell_order_id is the sell order ID against which the buyer is trying + // to buy. + SellOrderId uint64 `protobuf:"varint,2,opt,name=sell_order_id,json=sellOrderId,proto3" json:"sell_order_id,omitempty"` + // quantity is the quantity of credits to buy. + Quantity string `protobuf:"bytes,3,opt,name=quantity,proto3" json:"quantity,omitempty"` + // bid_price is the price the buyer is willing to pay per credit. + BidPrice *types.Coin `protobuf:"bytes,4,opt,name=bid_price,json=bidPrice,proto3" json:"bid_price,omitempty"` // disable_auto_retire allows auto-retirement to be disabled. If it is set // to true the credits will not auto-retire and can be resold assuming that // the corresponding sell order has auto-retirement disabled. If the sell // order hasn't disabled auto-retirement and the buy order tries to disable // it, that buy order will fail. - DisableAutoRetire bool `protobuf:"varint,4,opt,name=disable_auto_retire,json=disableAutoRetire,proto3" json:"disable_auto_retire,omitempty"` - // disable_partial_fill disables the default behavior of partially filling - // buy orders if the requested quantity is not available. - DisablePartialFill bool `protobuf:"varint,5,opt,name=disable_partial_fill,json=disablePartialFill,proto3" json:"disable_partial_fill,omitempty"` + DisableAutoRetire bool `protobuf:"varint,5,opt,name=disable_auto_retire,json=disableAutoRetire,proto3" json:"disable_auto_retire,omitempty"` // retirement_location is the optional retirement location for the credits // which will be used only if disable_auto_retire is false. RetirementLocation string `protobuf:"bytes,6,opt,name=retirement_location,json=retirementLocation,proto3" json:"retirement_location,omitempty"` - // expiration is the optional timestamp when the buy order expires. When the - // expiration time is reached, the buy order is removed from state. - Expiration *time.Time `protobuf:"bytes,7,opt,name=expiration,proto3,stdtime" json:"expiration,omitempty"` } -func (m *MsgBuy_Order) Reset() { *m = MsgBuy_Order{} } -func (m *MsgBuy_Order) String() string { return proto.CompactTextString(m) } -func (*MsgBuy_Order) ProtoMessage() {} -func (*MsgBuy_Order) Descriptor() ([]byte, []int) { +func (m *MsgBuyDirect_Order) Reset() { *m = MsgBuyDirect_Order{} } +func (m *MsgBuyDirect_Order) String() string { return proto.CompactTextString(m) } +func (*MsgBuyDirect_Order) ProtoMessage() {} +func (*MsgBuyDirect_Order) Descriptor() ([]byte, []int) { return fileDescriptor_68c9b4e4b7fcb584, []int{6, 0} } -func (m *MsgBuy_Order) XXX_Unmarshal(b []byte) error { +func (m *MsgBuyDirect_Order) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgBuy_Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgBuyDirect_Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgBuy_Order.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgBuyDirect_Order.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -600,175 +590,69 @@ func (m *MsgBuy_Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *MsgBuy_Order) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgBuy_Order.Merge(m, src) +func (m *MsgBuyDirect_Order) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBuyDirect_Order.Merge(m, src) } -func (m *MsgBuy_Order) XXX_Size() int { +func (m *MsgBuyDirect_Order) XXX_Size() int { return m.Size() } -func (m *MsgBuy_Order) XXX_DiscardUnknown() { - xxx_messageInfo_MsgBuy_Order.DiscardUnknown(m) +func (m *MsgBuyDirect_Order) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBuyDirect_Order.DiscardUnknown(m) } -var xxx_messageInfo_MsgBuy_Order proto.InternalMessageInfo +var xxx_messageInfo_MsgBuyDirect_Order proto.InternalMessageInfo -func (m *MsgBuy_Order) GetSelection() *MsgBuy_Order_Selection { +func (m *MsgBuyDirect_Order) GetSellOrderId() uint64 { if m != nil { - return m.Selection + return m.SellOrderId } - return nil + return 0 } -func (m *MsgBuy_Order) GetQuantity() string { +func (m *MsgBuyDirect_Order) GetQuantity() string { if m != nil { return m.Quantity } return "" } -func (m *MsgBuy_Order) GetBidPrice() *types.Coin { +func (m *MsgBuyDirect_Order) GetBidPrice() *types.Coin { if m != nil { return m.BidPrice } return nil } -func (m *MsgBuy_Order) GetDisableAutoRetire() bool { +func (m *MsgBuyDirect_Order) GetDisableAutoRetire() bool { if m != nil { return m.DisableAutoRetire } return false } -func (m *MsgBuy_Order) GetDisablePartialFill() bool { - if m != nil { - return m.DisablePartialFill - } - return false -} - -func (m *MsgBuy_Order) GetRetirementLocation() string { +func (m *MsgBuyDirect_Order) GetRetirementLocation() string { if m != nil { return m.RetirementLocation } return "" } -func (m *MsgBuy_Order) GetExpiration() *time.Time { - if m != nil { - return m.Expiration - } - return nil -} - -// Selection defines a buy order selection. -type MsgBuy_Order_Selection struct { - // sum defines the type of selection. - // - // Types that are valid to be assigned to Sum: - // *MsgBuy_Order_Selection_SellOrderId - // *MsgBuy_Order_Selection_Filter - Sum isMsgBuy_Order_Selection_Sum `protobuf_oneof:"sum"` -} - -func (m *MsgBuy_Order_Selection) Reset() { *m = MsgBuy_Order_Selection{} } -func (m *MsgBuy_Order_Selection) String() string { return proto.CompactTextString(m) } -func (*MsgBuy_Order_Selection) ProtoMessage() {} -func (*MsgBuy_Order_Selection) Descriptor() ([]byte, []int) { - return fileDescriptor_68c9b4e4b7fcb584, []int{6, 0, 0} -} -func (m *MsgBuy_Order_Selection) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgBuy_Order_Selection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgBuy_Order_Selection.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgBuy_Order_Selection) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgBuy_Order_Selection.Merge(m, src) -} -func (m *MsgBuy_Order_Selection) XXX_Size() int { - return m.Size() -} -func (m *MsgBuy_Order_Selection) XXX_DiscardUnknown() { - xxx_messageInfo_MsgBuy_Order_Selection.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgBuy_Order_Selection proto.InternalMessageInfo - -type isMsgBuy_Order_Selection_Sum interface { - isMsgBuy_Order_Selection_Sum() - MarshalTo([]byte) (int, error) - Size() int -} - -type MsgBuy_Order_Selection_SellOrderId struct { - SellOrderId uint64 `protobuf:"varint,1,opt,name=sell_order_id,json=sellOrderId,proto3,oneof" json:"sell_order_id,omitempty"` -} -type MsgBuy_Order_Selection_Filter struct { - Filter *Filter `protobuf:"bytes,2,opt,name=filter,proto3,oneof" json:"filter,omitempty"` -} - -func (*MsgBuy_Order_Selection_SellOrderId) isMsgBuy_Order_Selection_Sum() {} -func (*MsgBuy_Order_Selection_Filter) isMsgBuy_Order_Selection_Sum() {} - -func (m *MsgBuy_Order_Selection) GetSum() isMsgBuy_Order_Selection_Sum { - if m != nil { - return m.Sum - } - return nil -} - -func (m *MsgBuy_Order_Selection) GetSellOrderId() uint64 { - if x, ok := m.GetSum().(*MsgBuy_Order_Selection_SellOrderId); ok { - return x.SellOrderId - } - return 0 -} - -func (m *MsgBuy_Order_Selection) GetFilter() *Filter { - if x, ok := m.GetSum().(*MsgBuy_Order_Selection_Filter); ok { - return x.Filter - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*MsgBuy_Order_Selection) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*MsgBuy_Order_Selection_SellOrderId)(nil), - (*MsgBuy_Order_Selection_Filter)(nil), - } +// MsgBuyDirectResponse is the Msg/BuyDirect response type. +type MsgBuyDirectResponse struct { } -// MsgBuyResponse is the Msg/Buy response type. -type MsgBuyResponse struct { - // buy_order_ids are the buy order IDs of the newly created buy orders. Buy - // orders may not settle instantaneously, but rather in batches at specified - // batch epoch times. - BuyOrderIds []uint64 `protobuf:"varint,1,rep,packed,name=buy_order_ids,json=buyOrderIds,proto3" json:"buy_order_ids,omitempty"` -} - -func (m *MsgBuyResponse) Reset() { *m = MsgBuyResponse{} } -func (m *MsgBuyResponse) String() string { return proto.CompactTextString(m) } -func (*MsgBuyResponse) ProtoMessage() {} -func (*MsgBuyResponse) Descriptor() ([]byte, []int) { +func (m *MsgBuyDirectResponse) Reset() { *m = MsgBuyDirectResponse{} } +func (m *MsgBuyDirectResponse) String() string { return proto.CompactTextString(m) } +func (*MsgBuyDirectResponse) ProtoMessage() {} +func (*MsgBuyDirectResponse) Descriptor() ([]byte, []int) { return fileDescriptor_68c9b4e4b7fcb584, []int{7} } -func (m *MsgBuyResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgBuyDirectResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgBuyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgBuyDirectResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgBuyResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgBuyDirectResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -778,24 +662,17 @@ func (m *MsgBuyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *MsgBuyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgBuyResponse.Merge(m, src) +func (m *MsgBuyDirectResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBuyDirectResponse.Merge(m, src) } -func (m *MsgBuyResponse) XXX_Size() int { +func (m *MsgBuyDirectResponse) XXX_Size() int { return m.Size() } -func (m *MsgBuyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgBuyResponse.DiscardUnknown(m) +func (m *MsgBuyDirectResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBuyDirectResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgBuyResponse proto.InternalMessageInfo - -func (m *MsgBuyResponse) GetBuyOrderIds() []uint64 { - if m != nil { - return m.BuyOrderIds - } - return nil -} +var xxx_messageInfo_MsgBuyDirectResponse proto.InternalMessageInfo // MsgAllowAskDenom is the Msg/AllowAskDenom request type. type MsgAllowAskDenom struct { @@ -918,10 +795,9 @@ func init() { proto.RegisterType((*MsgUpdateSellOrdersResponse)(nil), "regen.ecocredit.marketplace.v1.MsgUpdateSellOrdersResponse") proto.RegisterType((*MsgCancelSellOrder)(nil), "regen.ecocredit.marketplace.v1.MsgCancelSellOrder") proto.RegisterType((*MsgCancelSellOrderResponse)(nil), "regen.ecocredit.marketplace.v1.MsgCancelSellOrderResponse") - proto.RegisterType((*MsgBuy)(nil), "regen.ecocredit.marketplace.v1.MsgBuy") - proto.RegisterType((*MsgBuy_Order)(nil), "regen.ecocredit.marketplace.v1.MsgBuy.Order") - proto.RegisterType((*MsgBuy_Order_Selection)(nil), "regen.ecocredit.marketplace.v1.MsgBuy.Order.Selection") - proto.RegisterType((*MsgBuyResponse)(nil), "regen.ecocredit.marketplace.v1.MsgBuyResponse") + proto.RegisterType((*MsgBuyDirect)(nil), "regen.ecocredit.marketplace.v1.MsgBuyDirect") + proto.RegisterType((*MsgBuyDirect_Order)(nil), "regen.ecocredit.marketplace.v1.MsgBuyDirect.Order") + proto.RegisterType((*MsgBuyDirectResponse)(nil), "regen.ecocredit.marketplace.v1.MsgBuyDirectResponse") proto.RegisterType((*MsgAllowAskDenom)(nil), "regen.ecocredit.marketplace.v1.MsgAllowAskDenom") proto.RegisterType((*MsgAllowAskDenomResponse)(nil), "regen.ecocredit.marketplace.v1.MsgAllowAskDenomResponse") } @@ -931,68 +807,61 @@ func init() { } var fileDescriptor_68c9b4e4b7fcb584 = []byte{ - // 970 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xda, 0x8e, 0x93, 0x3c, 0xc7, 0x69, 0x99, 0x44, 0xc8, 0x2c, 0xe0, 0xb8, 0xa6, 0x6a, - 0x2d, 0x44, 0x67, 0x1b, 0x17, 0x15, 0x54, 0x54, 0xa9, 0x71, 0x3f, 0x28, 0x12, 0x16, 0x61, 0x13, - 0x84, 0x84, 0x84, 0x96, 0xfd, 0x98, 0x6c, 0x47, 0x19, 0xef, 0x2c, 0x3b, 0xb3, 0x4d, 0x0c, 0x27, - 0x10, 0x12, 0x07, 0x38, 0xf4, 0xcf, 0xe2, 0x84, 0x7a, 0x83, 0x1b, 0x28, 0x39, 0x71, 0xe1, 0x6f, - 0x40, 0x3b, 0xfb, 0x91, 0xc4, 0x0e, 0xcd, 0xda, 0x37, 0xbf, 0xf7, 0x7e, 0xef, 0xcd, 0xec, 0xef, - 0xf7, 0xde, 0x1b, 0xc3, 0xcd, 0x88, 0xf8, 0x24, 0x30, 0x88, 0xcb, 0xdd, 0x88, 0x78, 0x54, 0x1a, - 0x23, 0x3b, 0x3a, 0x20, 0x32, 0x64, 0xb6, 0x4b, 0x8c, 0xe7, 0x5b, 0x86, 0x3c, 0xc2, 0x61, 0xc4, - 0x25, 0x47, 0x6d, 0x05, 0xc4, 0x05, 0x10, 0x9f, 0x01, 0xe2, 0xe7, 0x5b, 0xfa, 0x86, 0xcf, 0x7d, - 0xae, 0xa0, 0x46, 0xf2, 0x2b, 0xcd, 0xd2, 0xdb, 0x2e, 0x17, 0x23, 0x2e, 0x0c, 0xc7, 0x16, 0x49, - 0x39, 0x87, 0x48, 0x7b, 0xcb, 0x70, 0x39, 0x0d, 0xb2, 0xf8, 0xa6, 0xcf, 0xb9, 0xcf, 0x88, 0xa1, - 0x2c, 0x27, 0xde, 0x37, 0x24, 0x1d, 0x11, 0x21, 0xed, 0x51, 0x98, 0x01, 0xde, 0xbd, 0xec, 0x7e, - 0xe3, 0x90, 0x88, 0x14, 0xdb, 0xfd, 0xa3, 0x02, 0x4b, 0x43, 0xe1, 0xef, 0x12, 0xc6, 0xd0, 0x06, - 0x2c, 0xf2, 0xc3, 0x80, 0x44, 0x2d, 0xad, 0xa3, 0xf5, 0x56, 0xcc, 0xd4, 0x40, 0x8f, 0xa1, 0xce, - 0x23, 0x8f, 0x44, 0xa2, 0x55, 0xe9, 0x54, 0x7b, 0x8d, 0xfe, 0x2d, 0xfc, 0xea, 0xaf, 0xc2, 0x59, - 0x39, 0xfc, 0x59, 0x92, 0x65, 0x66, 0xc9, 0xfa, 0xbf, 0x1a, 0x2c, 0x2a, 0x0f, 0xda, 0x84, 0x86, - 0x63, 0x4b, 0xf7, 0x99, 0xe5, 0x91, 0x80, 0x8f, 0xb2, 0xc3, 0x40, 0xb9, 0x1e, 0x25, 0x1e, 0xa4, - 0xc3, 0xf2, 0xb7, 0xb1, 0x1d, 0x48, 0x2a, 0xc7, 0xad, 0x8a, 0x8a, 0x16, 0x36, 0xba, 0x0b, 0x2b, - 0xb6, 0x38, 0xb0, 0xc2, 0x88, 0xba, 0xa4, 0x55, 0xed, 0x68, 0xbd, 0x46, 0xff, 0x0d, 0x9c, 0x12, - 0x86, 0x13, 0xc2, 0x70, 0x46, 0x18, 0x7e, 0xc8, 0x69, 0x60, 0x2e, 0xdb, 0xe2, 0x60, 0x27, 0x81, - 0x22, 0x0c, 0xeb, 0x1e, 0x15, 0xb6, 0xc3, 0x88, 0x65, 0xc7, 0x92, 0x5b, 0x11, 0x91, 0x34, 0x22, - 0xad, 0x5a, 0x47, 0xeb, 0x2d, 0x9b, 0xaf, 0x65, 0xa1, 0xed, 0x58, 0x72, 0x53, 0x05, 0xd0, 0x03, - 0x00, 0x72, 0x14, 0xd2, 0xc8, 0x96, 0x94, 0x07, 0xad, 0x45, 0x75, 0x90, 0x8e, 0x53, 0xe6, 0x71, - 0xce, 0x3c, 0xde, 0xcb, 0x99, 0x1f, 0xd4, 0x5e, 0xfc, 0xb5, 0xa9, 0x99, 0x67, 0x72, 0xba, 0x1f, - 0xc0, 0x95, 0x8c, 0x09, 0x93, 0x88, 0x90, 0x07, 0x82, 0xa0, 0xeb, 0xb0, 0x26, 0x08, 0x63, 0x96, - 0xa2, 0xc4, 0xa2, 0x9e, 0x68, 0x69, 0x9d, 0x6a, 0xaf, 0x66, 0xae, 0x26, 0x5e, 0x45, 0xce, 0x27, - 0x9e, 0xe8, 0xfe, 0x52, 0x85, 0xf5, 0xa1, 0xf0, 0xbf, 0x08, 0x3d, 0x5b, 0x92, 0xdd, 0x3c, 0x22, - 0xfe, 0x47, 0x9e, 0x3d, 0x58, 0x8a, 0x15, 0x32, 0xd7, 0xe7, 0x5e, 0x09, 0x7d, 0x26, 0x6b, 0xe3, - 0xd4, 0x61, 0xe6, 0xa5, 0xf4, 0x9f, 0x2b, 0x50, 0x4f, 0x7d, 0xa8, 0x0b, 0xcd, 0x73, 0x97, 0x56, - 0xc7, 0xd7, 0xcc, 0xc6, 0x99, 0x3b, 0xa3, 0x6b, 0xb0, 0x1a, 0x90, 0x43, 0x6b, 0x42, 0xb5, 0x46, - 0x40, 0x0e, 0x3f, 0xcf, 0x85, 0xbb, 0x0f, 0xcd, 0x04, 0x32, 0x83, 0x78, 0x49, 0xfa, 0xf6, 0xbc, - 0xfa, 0x7d, 0x0c, 0x6b, 0xc9, 0x71, 0x73, 0x68, 0x98, 0x5c, 0xf3, 0xf1, 0xa9, 0x8c, 0x6f, 0xc3, - 0x9b, 0x17, 0x10, 0x96, 0x4b, 0xda, 0xdd, 0x01, 0x34, 0x14, 0xfe, 0x43, 0x3b, 0x70, 0x09, 0x2b, - 0xc2, 0xe8, 0x75, 0xa8, 0x27, 0xf4, 0x14, 0x5a, 0x65, 0xd6, 0x34, 0x97, 0x95, 0x29, 0x2e, 0xbb, - 0x6f, 0x81, 0x3e, 0x5d, 0xb1, 0x38, 0xef, 0x9f, 0x1a, 0xd4, 0x87, 0xc2, 0x1f, 0xc4, 0xe3, 0xa4, - 0x1f, 0x9c, 0x78, 0x7c, 0xda, 0x0f, 0xca, 0x40, 0x8f, 0x26, 0xc6, 0xf5, 0xbd, 0x12, 0xed, 0x30, - 0x88, 0xc7, 0x13, 0xd3, 0xfa, 0x63, 0x2d, 0x9f, 0xd6, 0x3d, 0x58, 0x11, 0x84, 0x11, 0x57, 0x71, - 0xa8, 0x29, 0x0e, 0xef, 0xce, 0x52, 0x12, 0xef, 0xe6, 0xd9, 0xe6, 0x69, 0xa1, 0xcb, 0x46, 0xdc, - 0xa1, 0x5e, 0xe9, 0x11, 0x77, 0xa8, 0x37, 0x5f, 0x8b, 0xdc, 0x86, 0x8d, 0x1c, 0x1f, 0xda, 0x91, - 0xa4, 0x36, 0xb3, 0xf6, 0x29, 0x63, 0xaa, 0x51, 0x96, 0x4d, 0x94, 0xc5, 0x76, 0xd2, 0xd0, 0x13, - 0xca, 0x18, 0x32, 0x60, 0x3d, 0x2d, 0x3a, 0x22, 0x81, 0xb4, 0x18, 0x77, 0xd3, 0xce, 0xaa, 0xab, - 0x0f, 0x40, 0xa7, 0xa1, 0x4f, 0xb3, 0xc8, 0xc4, 0x16, 0x59, 0x9a, 0x7d, 0x8b, 0xe8, 0xdf, 0xc1, - 0x4a, 0x41, 0x20, 0xba, 0x7e, 0xe1, 0x28, 0x3e, 0x5d, 0x38, 0x3f, 0x8c, 0x0f, 0xa0, 0xbe, 0x4f, - 0x99, 0x24, 0x91, 0x62, 0xb6, 0xd1, 0xbf, 0x71, 0x99, 0x5c, 0x4f, 0x14, 0xfa, 0xe9, 0x82, 0x99, - 0xe5, 0x0d, 0x16, 0xa1, 0x2a, 0xe2, 0x51, 0xf7, 0x7d, 0x58, 0x4b, 0x95, 0x2c, 0x16, 0x58, 0x17, - 0x9a, 0x4e, 0x3c, 0x9e, 0xda, 0x5f, 0x0d, 0x27, 0x1e, 0x17, 0xeb, 0xeb, 0x57, 0x0d, 0xae, 0x0e, - 0x85, 0xbf, 0xcd, 0x18, 0x4f, 0xc6, 0x37, 0x5d, 0xe9, 0xd7, 0x60, 0x35, 0xe2, 0x5c, 0x5a, 0xb6, - 0xe7, 0x45, 0x44, 0x88, 0xac, 0x65, 0x1b, 0x89, 0x6f, 0x3b, 0x75, 0x25, 0xed, 0x9c, 0x3e, 0x08, - 0x69, 0x3f, 0xa4, 0x06, 0x7a, 0x07, 0x9a, 0x1e, 0x15, 0x21, 0xb3, 0xc7, 0xd9, 0x73, 0x51, 0x55, - 0xd1, 0xd5, 0xcc, 0x59, 0x3c, 0x18, 0xe4, 0x28, 0xe4, 0x01, 0x09, 0xa4, 0x92, 0xbb, 0x69, 0x16, - 0x76, 0x57, 0x87, 0xd6, 0xe4, 0x6d, 0xf2, 0xcf, 0xe9, 0xff, 0x5e, 0x83, 0xea, 0x50, 0xf8, 0xe8, - 0x1b, 0xa8, 0xa9, 0x07, 0xf0, 0x66, 0xc9, 0xa7, 0x4d, 0x37, 0x4a, 0x02, 0x0b, 0xe2, 0x7e, 0xd2, - 0xe0, 0xea, 0xd4, 0x42, 0xbf, 0x33, 0xc7, 0xa6, 0xd6, 0x3f, 0x9a, 0x23, 0xa9, 0xb8, 0xc6, 0x0f, - 0x1a, 0x5c, 0x99, 0xdc, 0x55, 0xfd, 0x12, 0x05, 0x27, 0x72, 0xf4, 0x7b, 0xb3, 0xe7, 0x14, 0x77, - 0xf8, 0x1a, 0xaa, 0xc9, 0xf6, 0xba, 0x51, 0x6e, 0x89, 0xe8, 0xb8, 0x1c, 0xae, 0x28, 0xff, 0x3d, - 0x34, 0xcf, 0xb7, 0xde, 0xed, 0x12, 0x05, 0xce, 0x65, 0xe8, 0x1f, 0xce, 0x9a, 0x91, 0x1f, 0x3e, - 0xf8, 0xf2, 0xb7, 0xe3, 0xb6, 0xf6, 0xf2, 0xb8, 0xad, 0xfd, 0x7d, 0xdc, 0xd6, 0x5e, 0x9c, 0xb4, - 0x17, 0x5e, 0x9e, 0xb4, 0x17, 0xfe, 0x3c, 0x69, 0x2f, 0x7c, 0x75, 0xdf, 0xa7, 0xf2, 0x59, 0xec, - 0x60, 0x97, 0x8f, 0x0c, 0x55, 0xfd, 0x56, 0x40, 0xe4, 0x21, 0x8f, 0x0e, 0x32, 0x8b, 0x11, 0xcf, - 0x27, 0x91, 0x71, 0x74, 0xf1, 0xbf, 0x36, 0xa7, 0xae, 0x96, 0xc5, 0x9d, 0xff, 0x02, 0x00, 0x00, - 0xff, 0xff, 0xd0, 0x94, 0xee, 0x8b, 0x7b, 0x0a, 0x00, 0x00, + // 863 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0x1b, 0x55, + 0x10, 0xce, 0xda, 0x8e, 0x9b, 0x8c, 0xed, 0xb6, 0xbc, 0x44, 0x95, 0x59, 0xc0, 0x71, 0x0d, 0x52, + 0x7d, 0xa0, 0x6f, 0x49, 0x8a, 0x00, 0x15, 0x55, 0x22, 0x69, 0x2b, 0x04, 0xc2, 0xa2, 0x6c, 0x8b, + 0x90, 0xb8, 0x2c, 0xfb, 0x63, 0xd8, 0x3e, 0x65, 0xbd, 0x6f, 0x79, 0xef, 0xb9, 0x49, 0xc4, 0x09, + 0x09, 0x89, 0x03, 0x1c, 0xfa, 0x67, 0x71, 0xac, 0xc4, 0x01, 0x6e, 0x44, 0xc9, 0x9d, 0xbf, 0x01, + 0xbd, 0xb7, 0x3f, 0x92, 0xd8, 0x6d, 0x6a, 0xfb, 0xb6, 0x33, 0xf3, 0xcd, 0xbc, 0xd1, 0xf7, 0xcd, + 0x8c, 0x16, 0x6e, 0x09, 0x8c, 0x31, 0x75, 0x30, 0xe4, 0xa1, 0xc0, 0x88, 0x29, 0x67, 0xec, 0x8b, + 0x7d, 0x54, 0x59, 0xe2, 0x87, 0xe8, 0x3c, 0xdb, 0x76, 0xd4, 0x21, 0xcd, 0x04, 0x57, 0x9c, 0xf4, + 0x0c, 0x90, 0x56, 0x40, 0x7a, 0x0e, 0x48, 0x9f, 0x6d, 0xdb, 0x9b, 0x31, 0x8f, 0xb9, 0x81, 0x3a, + 0xfa, 0x2b, 0xcf, 0xb2, 0x7b, 0x21, 0x97, 0x63, 0x2e, 0x9d, 0xc0, 0x97, 0xba, 0x5c, 0x80, 0xca, + 0xdf, 0x76, 0x42, 0xce, 0xd2, 0x22, 0xbe, 0x15, 0x73, 0x1e, 0x27, 0xe8, 0x18, 0x2b, 0x98, 0xfc, + 0xe8, 0x28, 0x36, 0x46, 0xa9, 0xfc, 0x71, 0x96, 0x03, 0x06, 0x7f, 0xd7, 0xe0, 0xca, 0x48, 0xc6, + 0x8f, 0x31, 0x49, 0xc8, 0x26, 0xac, 0xf2, 0x83, 0x14, 0x45, 0xd7, 0xea, 0x5b, 0xc3, 0x75, 0x37, + 0x37, 0xc8, 0x43, 0x68, 0x72, 0x11, 0xa1, 0x90, 0xdd, 0x5a, 0xbf, 0x3e, 0x6c, 0xed, 0xdc, 0xa6, + 0x97, 0x77, 0x4a, 0x8b, 0x72, 0xf4, 0x6b, 0x9d, 0xe5, 0x16, 0xc9, 0xf6, 0x7f, 0x16, 0xac, 0x1a, + 0x0f, 0xd9, 0x82, 0x56, 0xe0, 0xab, 0xf0, 0xa9, 0x17, 0x61, 0xca, 0xc7, 0xc5, 0x63, 0x60, 0x5c, + 0x0f, 0xb4, 0x87, 0xd8, 0xb0, 0xf6, 0xd3, 0xc4, 0x4f, 0x15, 0x53, 0x47, 0xdd, 0x9a, 0x89, 0x56, + 0x36, 0xf9, 0x08, 0xd6, 0x7d, 0xb9, 0xef, 0x65, 0x82, 0x85, 0xd8, 0xad, 0xf7, 0xad, 0x61, 0x6b, + 0xe7, 0x4d, 0x9a, 0x93, 0x40, 0x35, 0x09, 0xb4, 0x20, 0x81, 0xde, 0xe7, 0x2c, 0x75, 0xd7, 0x7c, + 0xb9, 0xff, 0x48, 0x43, 0x09, 0x85, 0x8d, 0x88, 0x49, 0x3f, 0x48, 0xd0, 0xf3, 0x27, 0x8a, 0x7b, + 0x02, 0x15, 0x13, 0xd8, 0x6d, 0xf4, 0xad, 0xe1, 0x9a, 0xfb, 0x46, 0x11, 0xda, 0x9d, 0x28, 0xee, + 0x9a, 0x00, 0xf9, 0x0c, 0x00, 0x0f, 0x33, 0x26, 0x7c, 0xc5, 0x78, 0xda, 0x5d, 0x35, 0x0f, 0xd9, + 0x34, 0x67, 0x93, 0x96, 0x6c, 0xd2, 0x27, 0x25, 0x9b, 0x7b, 0x8d, 0xe7, 0xff, 0x6e, 0x59, 0xee, + 0xb9, 0x9c, 0xc1, 0xc7, 0x70, 0xad, 0x60, 0xc2, 0x45, 0x99, 0xf1, 0x54, 0x22, 0x79, 0x0f, 0xae, + 0x4a, 0x4c, 0x12, 0xcf, 0x50, 0xe2, 0xb1, 0x48, 0x76, 0xad, 0x7e, 0x7d, 0xd8, 0x70, 0xdb, 0xda, + 0x6b, 0xc8, 0xf9, 0x22, 0x92, 0x83, 0xdf, 0xeb, 0xb0, 0x31, 0x92, 0xf1, 0xb7, 0x59, 0xe4, 0x2b, + 0x7c, 0x5c, 0x46, 0xe4, 0x2b, 0xe4, 0x79, 0x02, 0x57, 0x26, 0x06, 0x59, 0xea, 0x73, 0x77, 0x0e, + 0x7d, 0xa6, 0x6b, 0xd3, 0xdc, 0xe1, 0x96, 0xa5, 0xec, 0xdf, 0x6a, 0xd0, 0xcc, 0x7d, 0x64, 0x00, + 0x9d, 0x0b, 0x4d, 0x9b, 0xe7, 0x1b, 0x6e, 0xeb, 0x5c, 0xcf, 0xe4, 0x26, 0xb4, 0x53, 0x3c, 0xf0, + 0xa6, 0x54, 0x6b, 0xa5, 0x78, 0xf0, 0x4d, 0x29, 0xdc, 0x3d, 0xe8, 0x68, 0xc8, 0x02, 0xe2, 0xe9, + 0xf4, 0xdd, 0x65, 0xf5, 0xfb, 0x1c, 0xae, 0xea, 0xe7, 0x96, 0xd0, 0x50, 0xb7, 0xf9, 0xf0, 0x4c, + 0xc6, 0x77, 0xe0, 0xad, 0x97, 0x10, 0x56, 0x4a, 0x3a, 0x78, 0x04, 0x64, 0x24, 0xe3, 0xfb, 0x7e, + 0x1a, 0x62, 0x52, 0x85, 0xc9, 0x0d, 0x68, 0x6a, 0x7a, 0x2a, 0xad, 0x0a, 0x6b, 0x96, 0xcb, 0xda, + 0x0c, 0x97, 0x83, 0xb7, 0xc1, 0x9e, 0xad, 0x58, 0xbd, 0xf7, 0x57, 0x0d, 0xda, 0x23, 0x19, 0xef, + 0x4d, 0x8e, 0x1e, 0x30, 0x81, 0xa1, 0xd2, 0x53, 0x11, 0x4c, 0x8e, 0xce, 0xa6, 0xc2, 0x18, 0xe4, + 0xcb, 0xa9, 0xa5, 0xdd, 0x99, 0x63, 0x28, 0xaa, 0x9a, 0x53, 0x9b, 0x7b, 0x5c, 0x6d, 0xee, 0x1c, + 0xed, 0x5f, 0x58, 0xde, 0xfa, 0xec, 0xf2, 0x06, 0x2c, 0x2a, 0xf4, 0x6f, 0xbc, 0x76, 0x79, 0x03, + 0x16, 0x5d, 0x2a, 0xfe, 0xea, 0xab, 0xc4, 0x77, 0x60, 0x23, 0x87, 0x8c, 0x31, 0x55, 0x5e, 0xc2, + 0xc3, 0x7c, 0x02, 0x9a, 0xa6, 0x1d, 0x72, 0x16, 0xfa, 0xaa, 0x88, 0x0c, 0x6e, 0xc0, 0xe6, 0x79, + 0x02, 0x2a, 0xb6, 0xff, 0xb0, 0xe0, 0xfa, 0x48, 0xc6, 0xbb, 0x49, 0xc2, 0xf5, 0x28, 0xe6, 0xe7, + 0xe9, 0x26, 0xb4, 0x05, 0xe7, 0xca, 0xf3, 0xa3, 0x48, 0xa0, 0x94, 0x05, 0xf1, 0x2d, 0xed, 0xdb, + 0xcd, 0x5d, 0x5a, 0x94, 0xfc, 0xb8, 0xe5, 0x8b, 0x90, 0x1b, 0xe4, 0x5d, 0xe8, 0x44, 0x4c, 0x66, + 0x89, 0x7f, 0x54, 0x9c, 0xbe, 0x9c, 0x9f, 0x76, 0xe1, 0xac, 0x8e, 0x1f, 0x1e, 0x66, 0x3c, 0xc5, + 0x54, 0x19, 0x8a, 0x3a, 0x6e, 0x65, 0x0f, 0x6c, 0xe8, 0x4e, 0x77, 0x53, 0xb6, 0xba, 0x73, 0xdc, + 0x80, 0xfa, 0x48, 0xc6, 0xe4, 0x07, 0x68, 0x98, 0x63, 0x7e, 0x6b, 0xce, 0x33, 0x6d, 0x3b, 0x73, + 0x02, 0xab, 0x2b, 0xf6, 0xab, 0x05, 0xd7, 0x67, 0x8e, 0xd3, 0x9d, 0x25, 0xae, 0x8e, 0xfd, 0xe9, + 0x12, 0x49, 0x55, 0x1b, 0xbf, 0x58, 0x70, 0x6d, 0x7a, 0xef, 0xe6, 0x19, 0xf3, 0xa9, 0x1c, 0xfb, + 0xee, 0xe2, 0x39, 0x55, 0x0f, 0x1c, 0xd6, 0xcf, 0x36, 0xf1, 0xfd, 0x45, 0x76, 0xcc, 0xfe, 0x70, + 0x11, 0x74, 0xf5, 0xe0, 0xcf, 0xd0, 0xb9, 0x38, 0x8c, 0x1f, 0xcc, 0x51, 0xe6, 0x42, 0x86, 0xfd, + 0xc9, 0xa2, 0x19, 0xe5, 0xe3, 0x7b, 0xdf, 0xfd, 0x79, 0xd2, 0xb3, 0x5e, 0x9c, 0xf4, 0xac, 0xe3, + 0x93, 0x9e, 0xf5, 0xfc, 0xb4, 0xb7, 0xf2, 0xe2, 0xb4, 0xb7, 0xf2, 0xcf, 0x69, 0x6f, 0xe5, 0xfb, + 0x7b, 0x31, 0x53, 0x4f, 0x27, 0x01, 0x0d, 0xf9, 0xd8, 0x31, 0xd5, 0x6f, 0xa7, 0xa8, 0x0e, 0xb8, + 0xd8, 0x2f, 0xac, 0x04, 0xa3, 0x18, 0x85, 0x73, 0xf8, 0xf2, 0xff, 0xa0, 0xa0, 0x69, 0x8e, 0xf1, + 0x9d, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0xa7, 0x68, 0x35, 0x54, 0x2d, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1013,8 +882,8 @@ type MsgClient interface { UpdateSellOrders(ctx context.Context, in *MsgUpdateSellOrders, opts ...grpc.CallOption) (*MsgUpdateSellOrdersResponse, error) // CancelSellOrder cancels a sell order and returns the funds from escrow. CancelSellOrder(ctx context.Context, in *MsgCancelSellOrder, opts ...grpc.CallOption) (*MsgCancelSellOrderResponse, error) - // Buy creates credit buy orders. - Buy(ctx context.Context, in *MsgBuy, opts ...grpc.CallOption) (*MsgBuyResponse, error) + // BuyDirect purchases credits directly from the specified sell order. + BuyDirect(ctx context.Context, in *MsgBuyDirect, opts ...grpc.CallOption) (*MsgBuyDirectResponse, error) // AllowAskDenom is a governance operation which authorizes a new ask denom to // be used in sell orders AllowAskDenom(ctx context.Context, in *MsgAllowAskDenom, opts ...grpc.CallOption) (*MsgAllowAskDenomResponse, error) @@ -1055,9 +924,9 @@ func (c *msgClient) CancelSellOrder(ctx context.Context, in *MsgCancelSellOrder, return out, nil } -func (c *msgClient) Buy(ctx context.Context, in *MsgBuy, opts ...grpc.CallOption) (*MsgBuyResponse, error) { - out := new(MsgBuyResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.marketplace.v1.Msg/Buy", in, out, opts...) +func (c *msgClient) BuyDirect(ctx context.Context, in *MsgBuyDirect, opts ...grpc.CallOption) (*MsgBuyDirectResponse, error) { + out := new(MsgBuyDirectResponse) + err := c.cc.Invoke(ctx, "/regen.ecocredit.marketplace.v1.Msg/BuyDirect", in, out, opts...) if err != nil { return nil, err } @@ -1081,8 +950,8 @@ type MsgServer interface { UpdateSellOrders(context.Context, *MsgUpdateSellOrders) (*MsgUpdateSellOrdersResponse, error) // CancelSellOrder cancels a sell order and returns the funds from escrow. CancelSellOrder(context.Context, *MsgCancelSellOrder) (*MsgCancelSellOrderResponse, error) - // Buy creates credit buy orders. - Buy(context.Context, *MsgBuy) (*MsgBuyResponse, error) + // BuyDirect purchases credits directly from the specified sell order. + BuyDirect(context.Context, *MsgBuyDirect) (*MsgBuyDirectResponse, error) // AllowAskDenom is a governance operation which authorizes a new ask denom to // be used in sell orders AllowAskDenom(context.Context, *MsgAllowAskDenom) (*MsgAllowAskDenomResponse, error) @@ -1101,8 +970,8 @@ func (*UnimplementedMsgServer) UpdateSellOrders(ctx context.Context, req *MsgUpd func (*UnimplementedMsgServer) CancelSellOrder(ctx context.Context, req *MsgCancelSellOrder) (*MsgCancelSellOrderResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelSellOrder not implemented") } -func (*UnimplementedMsgServer) Buy(ctx context.Context, req *MsgBuy) (*MsgBuyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Buy not implemented") +func (*UnimplementedMsgServer) BuyDirect(ctx context.Context, req *MsgBuyDirect) (*MsgBuyDirectResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BuyDirect not implemented") } func (*UnimplementedMsgServer) AllowAskDenom(ctx context.Context, req *MsgAllowAskDenom) (*MsgAllowAskDenomResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllowAskDenom not implemented") @@ -1166,20 +1035,20 @@ func _Msg_CancelSellOrder_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Msg_Buy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgBuy) +func _Msg_BuyDirect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBuyDirect) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).Buy(ctx, in) + return srv.(MsgServer).BuyDirect(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.ecocredit.marketplace.v1.Msg/Buy", + FullMethod: "/regen.ecocredit.marketplace.v1.Msg/BuyDirect", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Buy(ctx, req.(*MsgBuy)) + return srv.(MsgServer).BuyDirect(ctx, req.(*MsgBuyDirect)) } return interceptor(ctx, in, info, handler) } @@ -1219,8 +1088,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_CancelSellOrder_Handler, }, { - MethodName: "Buy", - Handler: _Msg_Buy_Handler, + MethodName: "BuyDirect", + Handler: _Msg_BuyDirect_Handler, }, { MethodName: "AllowAskDenom", @@ -1577,7 +1446,7 @@ func (m *MsgCancelSellOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *MsgBuy) Marshal() (dAtA []byte, err error) { +func (m *MsgBuyDirect) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1587,12 +1456,12 @@ func (m *MsgBuy) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgBuy) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgBuyDirect) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgBuy) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgBuyDirect) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1621,7 +1490,7 @@ func (m *MsgBuy) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgBuy_Order) Marshal() (dAtA []byte, err error) { +func (m *MsgBuyDirect_Order) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1631,26 +1500,16 @@ func (m *MsgBuy_Order) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgBuy_Order) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgBuyDirect_Order) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgBuy_Order) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgBuyDirect_Order) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Expiration != nil { - n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.Expiration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.Expiration):]) - if err7 != nil { - return 0, err7 - } - i -= n7 - i = encodeVarintTx(dAtA, i, uint64(n7)) - i-- - dAtA[i] = 0x3a - } if len(m.RetirementLocation) > 0 { i -= len(m.RetirementLocation) copy(dAtA[i:], m.RetirementLocation) @@ -1658,16 +1517,6 @@ func (m *MsgBuy_Order) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - if m.DisablePartialFill { - i-- - if m.DisablePartialFill { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } if m.DisableAutoRetire { i-- if m.DisableAutoRetire { @@ -1676,7 +1525,7 @@ func (m *MsgBuy_Order) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x20 + dAtA[i] = 0x28 } if m.BidPrice != nil { { @@ -1688,96 +1537,24 @@ func (m *MsgBuy_Order) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } if len(m.Quantity) > 0 { i -= len(m.Quantity) copy(dAtA[i:], m.Quantity) i = encodeVarintTx(dAtA, i, uint64(len(m.Quantity))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } - if m.Selection != nil { - { - size, err := m.Selection.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } + if m.SellOrderId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.SellOrderId)) i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgBuy_Order_Selection) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgBuy_Order_Selection) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgBuy_Order_Selection) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sum != nil { - { - size := m.Sum.Size() - i -= size - if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } + dAtA[i] = 0x10 } return len(dAtA) - i, nil } -func (m *MsgBuy_Order_Selection_SellOrderId) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgBuy_Order_Selection_SellOrderId) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintTx(dAtA, i, uint64(m.SellOrderId)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} -func (m *MsgBuy_Order_Selection_Filter) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgBuy_Order_Selection_Filter) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Filter != nil { - { - size, err := m.Filter.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *MsgBuyResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgBuyDirectResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1787,34 +1564,16 @@ func (m *MsgBuyResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgBuyResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgBuyDirectResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgBuyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgBuyDirectResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.BuyOrderIds) > 0 { - dAtA12 := make([]byte, len(m.BuyOrderIds)*10) - var j11 int - for _, num := range m.BuyOrderIds { - for num >= 1<<7 { - dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j11++ - } - dAtA12[j11] = uint8(num) - j11++ - } - i -= j11 - copy(dAtA[i:], dAtA12[:j11]) - i = encodeVarintTx(dAtA, i, uint64(j11)) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } @@ -2044,7 +1803,7 @@ func (m *MsgCancelSellOrderResponse) Size() (n int) { return n } -func (m *MsgBuy) Size() (n int) { +func (m *MsgBuyDirect) Size() (n int) { if m == nil { return 0 } @@ -2063,15 +1822,14 @@ func (m *MsgBuy) Size() (n int) { return n } -func (m *MsgBuy_Order) Size() (n int) { +func (m *MsgBuyDirect_Order) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Selection != nil { - l = m.Selection.Size() - n += 1 + l + sovTx(uint64(l)) + if m.SellOrderId != 0 { + n += 1 + sovTx(uint64(m.SellOrderId)) } l = len(m.Quantity) if l > 0 { @@ -2084,66 +1842,19 @@ func (m *MsgBuy_Order) Size() (n int) { if m.DisableAutoRetire { n += 2 } - if m.DisablePartialFill { - n += 2 - } l = len(m.RetirementLocation) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.Expiration != nil { - l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Expiration) - n += 1 + l + sovTx(uint64(l)) - } return n } -func (m *MsgBuy_Order_Selection) Size() (n int) { +func (m *MsgBuyDirectResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Sum != nil { - n += m.Sum.Size() - } - return n -} - -func (m *MsgBuy_Order_Selection_SellOrderId) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovTx(uint64(m.SellOrderId)) - return n -} -func (m *MsgBuy_Order_Selection_Filter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Filter != nil { - l = m.Filter.Size() - n += 1 + l + sovTx(uint64(l)) - } - return n -} -func (m *MsgBuyResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.BuyOrderIds) > 0 { - l = 0 - for _, e := range m.BuyOrderIds { - l += sovTx(uint64(e)) - } - n += 1 + sovTx(uint64(l)) + l - } return n } @@ -3144,7 +2855,7 @@ func (m *MsgCancelSellOrderResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgBuy) Unmarshal(dAtA []byte) error { +func (m *MsgBuyDirect) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3167,10 +2878,10 @@ func (m *MsgBuy) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgBuy: wiretype end group for non-group") + return fmt.Errorf("proto: MsgBuyDirect: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBuy: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgBuyDirect: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3234,7 +2945,7 @@ func (m *MsgBuy) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Orders = append(m.Orders, &MsgBuy_Order{}) + m.Orders = append(m.Orders, &MsgBuyDirect_Order{}) if err := m.Orders[len(m.Orders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3260,7 +2971,7 @@ func (m *MsgBuy) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgBuy_Order) Unmarshal(dAtA []byte) error { +func (m *MsgBuyDirect_Order) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3289,11 +3000,11 @@ func (m *MsgBuy_Order) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: Order: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selection", wireType) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SellOrderId", wireType) } - var msglen int + m.SellOrderId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3303,29 +3014,12 @@ func (m *MsgBuy_Order) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.SellOrderId |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Selection == nil { - m.Selection = &MsgBuy_Order_Selection{} - } - if err := m.Selection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) } @@ -3357,7 +3051,7 @@ func (m *MsgBuy_Order) Unmarshal(dAtA []byte) error { } m.Quantity = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BidPrice", wireType) } @@ -3393,7 +3087,7 @@ func (m *MsgBuy_Order) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DisableAutoRetire", wireType) } @@ -3413,26 +3107,6 @@ func (m *MsgBuy_Order) Unmarshal(dAtA []byte) error { } } m.DisableAutoRetire = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DisablePartialFill", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DisablePartialFill = bool(v != 0) case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RetirementLocation", wireType) @@ -3465,147 +3139,6 @@ func (m *MsgBuy_Order) Unmarshal(dAtA []byte) error { } m.RetirementLocation = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Expiration == nil { - m.Expiration = new(time.Time) - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.Expiration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgBuy_Order_Selection) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Selection: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Selection: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SellOrderId", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Sum = &MsgBuy_Order_Selection_SellOrderId{v} - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Filter{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &MsgBuy_Order_Selection_Filter{v} - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -3627,7 +3160,7 @@ func (m *MsgBuy_Order_Selection) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgBuyResponse) Unmarshal(dAtA []byte) error { +func (m *MsgBuyDirectResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3650,88 +3183,12 @@ func (m *MsgBuyResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgBuyResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgBuyDirectResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBuyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgBuyDirectResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BuyOrderIds = append(m.BuyOrderIds, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.BuyOrderIds) == 0 { - m.BuyOrderIds = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BuyOrderIds = append(m.BuyOrderIds, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field BuyOrderIds", wireType) - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/ecocredit/orderbook/orderbook.go b/x/ecocredit/orderbook/orderbook.go index 83894f760a..bba55e5a1f 100644 --- a/x/ecocredit/orderbook/orderbook.go +++ b/x/ecocredit/orderbook/orderbook.go @@ -4,11 +4,14 @@ import ( "context" "github.com/cosmos/cosmos-sdk/orm/model/ormdb" + marketplacev1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/marketplace/v1" orderbookv1alpha1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/orderbook/v1alpha1" ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" ) +// TODO: revisit when BuyOrder is reintroduced for marketplace order-book https://github.com/regen-network/regen-ledger/issues/505 + type orderbook struct { memStore orderbookv1alpha1.MemoryStore marketplaceStore marketplacev1.StateStore @@ -41,7 +44,7 @@ func NewOrderBook(db ormdb.ModuleDB) (OrderBook, error) { type OrderBook interface { // OnInsertBuyOrder gets called whenever a buy order is inserted into the marketplace state. - OnInsertBuyOrder(ctx context.Context, buyOrder *marketplacev1.BuyOrder) error + //OnInsertBuyOrder(ctx context.Context, buyOrder *marketplacev1.BuyOrder) error // OnInsertSellOrder gets called whenever a sell order is inserted into the marketplace state. OnInsertSellOrder(ctx context.Context, sellOrder *marketplacev1.SellOrder, batchInfo *ecocreditv1.BatchInfo) error @@ -53,10 +56,11 @@ type OrderBook interface { Reload(ctx context.Context) error } +/* func (o orderbook) OnInsertBuyOrder(ctx context.Context, buyOrder *marketplacev1.BuyOrder) error { return nil } - +*/ func (o orderbook) OnInsertSellOrder(ctx context.Context, sellOrder *marketplacev1.SellOrder, batchInfo *ecocreditv1.BatchInfo) error { return nil } diff --git a/x/ecocredit/server/marketplace/buy.go b/x/ecocredit/server/marketplace/buy.go deleted file mode 100644 index 3d8ef0d13f..0000000000 --- a/x/ecocredit/server/marketplace/buy.go +++ /dev/null @@ -1,259 +0,0 @@ -package marketplace - -import ( - "context" - "fmt" - - api "github.com/regen-network/regen-ledger/api/regen/ecocredit/marketplace/v1" - ecoApi "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - "github.com/regen-network/regen-ledger/types/math" - "github.com/regen-network/regen-ledger/x/ecocredit" - "github.com/regen-network/regen-ledger/x/ecocredit/core" - "github.com/regen-network/regen-ledger/x/ecocredit/marketplace" - "github.com/regen-network/regen-ledger/x/ecocredit/server/utils" - - "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -// Buy allows users to purchase credits by either directly specifying a sell order, or -// defining a set of filters with attributes to match against. -// -// Currently, only the former is supported. Calls to this function with anything other than -// MsgBuy_Order_Selection_SellOrderId will fail. -func (k Keeper) Buy(ctx context.Context, req *marketplace.MsgBuy) (*marketplace.MsgBuyResponse, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - buyerAcc, err := sdk.AccAddressFromBech32(req.Buyer) - if err != nil { - return nil, err - } - - for _, order := range req.Orders { - switch selection := order.Selection.Sum.(type) { - case *marketplace.MsgBuy_Order_Selection_SellOrderId: - sellOrder, err := k.stateStore.SellOrderTable().Get(ctx, selection.SellOrderId) - if err != nil { - return nil, fmt.Errorf("sell order %d: %w", selection.SellOrderId, err) - } - if order.DisableAutoRetire && !sellOrder.DisableAutoRetire { - return nil, sdkerrors.ErrInvalidRequest.Wrapf("cannot disable auto retire when purchasing credits " + - "from a sell order that does not disable auto retire") - } - batch, err := k.coreStore.BatchInfoTable().Get(ctx, sellOrder.BatchId) - if err != nil { - - return nil, sdkerrors.ErrIO.Wrapf("error getting batch id %d: %s", sellOrder.BatchId, err.Error()) - } - ct, err := utils.GetCreditTypeFromBatchDenom(ctx, k.coreStore, k.paramsKeeper, batch.BatchDenom) - if err != nil { - return nil, err - } - creditOrderQty, err := math.NewPositiveFixedDecFromString(order.Quantity, ct.Precision) - if err != nil { - return nil, err - } - - // check that bid price and ask price denoms match - market, err := k.stateStore.MarketTable().Get(ctx, sellOrder.MarketId) - if err != nil { - return nil, fmt.Errorf("market id %d: %w", sellOrder.MarketId, err) - } - if order.BidPrice.Denom != market.BankDenom { - return nil, sdkerrors.ErrInvalidRequest.Wrapf("bid price denom does not match ask price denom: "+ - " %s, expected %s", order.BidPrice.Denom, market.BankDenom) - } - // check that bid price >= sell price - sellOrderPricePerCredit, ok := sdk.NewIntFromString(sellOrder.AskPrice) - if !ok { - return nil, fmt.Errorf("could not convert %s to %T", sellOrder.AskPrice, sdk.Int{}) - } - sellOrderPriceCoin := sdk.Coin{Denom: market.BankDenom, Amount: sellOrderPricePerCredit} - if sellOrderPricePerCredit.GT(order.BidPrice.Amount) { - return nil, ErrBidTooLow.Wrapf("sell order ask: %v, bid: %v", sellOrderPriceCoin, order.BidPrice) - } - - // check address has the total cost (price per * order quantity) - bal := k.bankKeeper.GetBalance(sdkCtx, buyerAcc, order.BidPrice.Denom) - cost, err := getTotalCost(sellOrderPricePerCredit, order.Quantity) - if err != nil { - return nil, err - } - coinCost := sdk.Coin{Amount: cost, Denom: market.BankDenom} - if bal.IsLT(coinCost) { - return nil, sdkerrors.ErrInsufficientFunds.Wrapf("requested to purchase %s credits @ %s%s per "+ - "credit (total %v) with a balance of %v", order.Quantity, sellOrder.AskPrice, market.BankDenom, coinCost, bal) - } - - // fill the order, updating balances and the sell order in state - if err = k.fillOrder(ctx, sellOrder, buyerAcc, creditOrderQty, coinCost, false, !order.DisableAutoRetire, order.RetirementLocation, batch.BatchDenom); err != nil { - return nil, fmt.Errorf("error updating balances: %w", err) - } - case *marketplace.MsgBuy_Order_Selection_Filter: - return nil, sdkerrors.ErrInvalidRequest.Wrap("only direct buy orders are enabled at this time") - // verify expiration is in the future - //if order.Expiration.Before(sdkCtx.BlockTime()) { - // return nil, sdkerrors.ErrInvalidRequest.Wrapf("expiration must be in the future: %s", order.Expiration) - //} - default: - return nil, sdkerrors.ErrInvalidRequest.Wrap("only direct buy orders are enabled at this time") - } - } - return &marketplace.MsgBuyResponse{}, nil -} - -// fillOrder moves credits according to the order. it will: -// - update a sell order, removing it if quantity becomes 0 as a result of this purchase. -// - remove the purchaseQty from the seller's escrowed balance. -// - add credits to the buyer's tradable/retired address (based on the DisableAutoRetire field). -// - update the supply accordingly. -// - send the coins specified in the bid to the seller. -func (k Keeper) fillOrder(ctx context.Context, sellOrder *api.SellOrder, buyerAcc sdk.AccAddress, purchaseQty math.Dec, cost sdk.Coin, canPartialFill, autoRetire bool, retireLocation, batchDenom string) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) - sellOrderQty, err := math.NewDecFromString(sellOrder.Quantity) - if err != nil { - return err - } - - switch sellOrderQty.Cmp(purchaseQty) { - case math.LessThan: - if !canPartialFill { - return ecocredit.ErrInsufficientCredits.Wrapf("cannot purchase %v credits from a sell order that has %s credits", purchaseQty, sellOrder.Quantity) - } else { - // if we can partially fill, we just delete the sellOrder and take whatever - // credits are left from that order. - if err := k.stateStore.SellOrderTable().Delete(ctx, sellOrder); err != nil { - return err - } - purchaseQty = sellOrderQty - } - case math.EqualTo: - if err := k.stateStore.SellOrderTable().Delete(ctx, sellOrder); err != nil { - return err - } - case math.GreaterThan: - newSellOrderQty, err := sellOrderQty.Sub(purchaseQty) - if err != nil { - return err - } - sellOrder.Quantity = newSellOrderQty.String() - if err = k.stateStore.SellOrderTable().Update(ctx, sellOrder); err != nil { - return err - } - } - - // remove the credits from the seller's escrowed balance - sellerBal, err := k.coreStore.BatchBalanceTable().Get(ctx, sellOrder.Seller, sellOrder.BatchId) - if err != nil { - return err - } - escrowBal, err := math.NewDecFromString(sellerBal.Escrowed) - if err != nil { - return err - } - escrowBal, err = math.SafeSubBalance(escrowBal, purchaseQty) - if err != nil { - return err - } - sellerBal.Escrowed = escrowBal.String() - if err = k.coreStore.BatchBalanceTable().Update(ctx, sellerBal); err != nil { - return err - } - - // update the buyers balance and the batch supply - supply, err := k.coreStore.BatchSupplyTable().Get(ctx, sellOrder.BatchId) - if err != nil { - return err - } - buyerBal, err := k.coreStore.BatchBalanceTable().Get(ctx, buyerAcc, sellOrder.BatchId) - if err != nil { - if ormerrors.IsNotFound(err) { - buyerBal = &ecoApi.BatchBalance{ - Address: buyerAcc, - BatchId: sellOrder.BatchId, - Tradable: "0", - Retired: "0", - Escrowed: "0", - } - } else { - return err - } - } - if !autoRetire { // if auto retire is disabled, we move the credits into the buyer's/supply's tradable balance. - tradableBalance, err := math.NewDecFromString(buyerBal.Tradable) - if err != nil { - return err - } - tradableBalance, err = math.SafeAddBalance(tradableBalance, purchaseQty) - if err != nil { - return err - } - buyerBal.Tradable = tradableBalance.String() - - supplyTradable, err := math.NewDecFromString(supply.TradableAmount) - if err != nil { - return err - } - supplyTradable, err = math.SafeAddBalance(supplyTradable, purchaseQty) - if err != nil { - return err - } - supply.TradableAmount = supplyTradable.String() - if err = sdkCtx.EventManager().EmitTypedEvent(&core.EventReceive{ - Sender: sdk.AccAddress(sellOrder.Seller).String(), - Recipient: buyerAcc.String(), - BatchDenom: batchDenom, - TradableAmount: purchaseQty.String(), - RetiredAmount: "", - BasketDenom: "", - }); err != nil { - return err - } - } else { - retiredBalance, err := math.NewDecFromString(buyerBal.Retired) - if err != nil { - return err - } - retiredBalance, err = math.SafeAddBalance(retiredBalance, purchaseQty) - if err != nil { - return err - } - buyerBal.Retired = retiredBalance.String() - - supplyRetired, err := math.NewDecFromString(supply.RetiredAmount) - if err != nil { - return err - } - supplyRetired, err = math.SafeAddBalance(supplyRetired, purchaseQty) - if err != nil { - return err - } - supply.RetiredAmount = supplyRetired.String() - if err = sdkCtx.EventManager().EmitTypedEvent(&core.EventRetire{ - Retirer: buyerAcc.String(), - BatchDenom: batchDenom, - Amount: purchaseQty.String(), - Location: retireLocation, - }); err != nil { - return err - } - } - if err = k.coreStore.BatchSupplyTable().Update(ctx, supply); err != nil { - return err - } - if err = k.coreStore.BatchBalanceTable().Save(ctx, buyerBal); err != nil { - return err - } - - return k.bankKeeper.SendCoins(sdkCtx, buyerAcc, sellOrder.Seller, sdk.NewCoins(cost)) -} - -// getTotalCost calculates the cost of the order by multiplying the price per credit, and the amount of credits -// desired in the order. -func getTotalCost(pricePerCredit sdk.Int, amtCredits string) (sdk.Int, error) { - amtCreditsInt, ok := sdk.NewIntFromString(amtCredits) - if !ok { - return sdk.Int{}, fmt.Errorf("could not convert %s to %T", amtCreditsInt, sdk.Int{}) - } - return pricePerCredit.Mul(amtCreditsInt), nil -} diff --git a/x/ecocredit/server/marketplace/buy_direct.go b/x/ecocredit/server/marketplace/buy_direct.go new file mode 100644 index 0000000000..f37a937302 --- /dev/null +++ b/x/ecocredit/server/marketplace/buy_direct.go @@ -0,0 +1,87 @@ +package marketplace + +import ( + "context" + "fmt" + + "github.com/regen-network/regen-ledger/types/math" + "github.com/regen-network/regen-ledger/x/ecocredit/marketplace" + "github.com/regen-network/regen-ledger/x/ecocredit/server/utils" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// BuyDirect allows for the purchase of credits directly from sell orders. +func (k Keeper) BuyDirect(ctx context.Context, req *marketplace.MsgBuyDirect) (*marketplace.MsgBuyDirectResponse, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + buyerAcc, err := sdk.AccAddressFromBech32(req.Buyer) + if err != nil { + return nil, err + } + for _, order := range req.Orders { + sellOrder, err := k.stateStore.SellOrderTable().Get(ctx, order.SellOrderId) + if err != nil { + return nil, fmt.Errorf("sell order %d: %w", order.SellOrderId, err) + } + if order.DisableAutoRetire && !sellOrder.DisableAutoRetire { + return nil, sdkerrors.ErrInvalidRequest.Wrapf("cannot disable auto retire when purchasing credits " + + "from a sell order that does not have auto retire disabled") + } + batch, err := k.coreStore.BatchInfoTable().Get(ctx, sellOrder.BatchId) + if err != nil { + return nil, sdkerrors.ErrIO.Wrapf("error getting batch id %d: %s", sellOrder.BatchId, err.Error()) + } + ct, err := utils.GetCreditTypeFromBatchDenom(ctx, k.coreStore, k.paramsKeeper, batch.BatchDenom) + if err != nil { + return nil, err + } + creditOrderQty, err := math.NewPositiveFixedDecFromString(order.Quantity, ct.Precision) + if err != nil { + return nil, err + } + + // check that bid price and ask price denoms match + market, err := k.stateStore.MarketTable().Get(ctx, sellOrder.MarketId) + if err != nil { + return nil, fmt.Errorf("market id %d: %w", sellOrder.MarketId, err) + } + if order.BidPrice.Denom != market.BankDenom { + return nil, sdkerrors.ErrInvalidRequest.Wrapf("bid price denom does not match ask price denom: "+ + "%s, expected %s", order.BidPrice.Denom, market.BankDenom) + } + // check that bid price >= sell price + sellOrderAskPrice, ok := sdk.NewIntFromString(sellOrder.AskPrice) + if !ok { + return nil, fmt.Errorf("could not convert %s to %T", sellOrder.AskPrice, sdk.Int{}) + } + sellOrderPriceCoin := sdk.Coin{Denom: market.BankDenom, Amount: sellOrderAskPrice} + if sellOrderAskPrice.GT(order.BidPrice.Amount) { + return nil, sdkerrors.ErrInvalidRequest.Wrapf("price per credit too low: sell order ask per credit: %v, request: %v", sellOrderPriceCoin, order.BidPrice) + } + + // check address has the total cost (price per * order quantity) + bal := k.bankKeeper.GetBalance(sdkCtx, buyerAcc, order.BidPrice.Denom) + cost, err := getTotalCost(sellOrderAskPrice, creditOrderQty) + if err != nil { + return nil, err + } + coinCost := sdk.Coin{Amount: cost, Denom: market.BankDenom} + if bal.IsLT(coinCost) { + return nil, sdkerrors.ErrInsufficientFunds.Wrapf("requested to purchase %s credits @ %s%s per "+ + "credit (total %v) with a balance of %v", order.Quantity, sellOrder.AskPrice, market.BankDenom, coinCost, bal) + } + + // fill the order, updating balances and the sell order in state + if err = k.fillOrder(ctx, sellOrder, buyerAcc, creditOrderQty, coinCost, orderOptions{ + autoRetire: !order.DisableAutoRetire, + canPartialFill: false, + batchDenom: batch.BatchDenom, + retirementLocation: order.RetirementLocation, + }); err != nil { + return nil, fmt.Errorf("error filling order: %w", err) + } + } + + return &marketplace.MsgBuyDirectResponse{}, nil +} diff --git a/x/ecocredit/server/marketplace/buy_test.go b/x/ecocredit/server/marketplace/buy_direct_test.go similarity index 65% rename from x/ecocredit/server/marketplace/buy_test.go rename to x/ecocredit/server/marketplace/buy_direct_test.go index 1bf17e16a3..23e541a8b4 100644 --- a/x/ecocredit/server/marketplace/buy_test.go +++ b/x/ecocredit/server/marketplace/buy_direct_test.go @@ -22,7 +22,8 @@ func TestBuy_ValidTradable(t *testing.T) { s := setupBase(t) _, _, buyerAddr := testdata.KeyTestPubAddr() userCoinBalance := sdk.NewInt64Coin("ufoo", 30) - testSellSetup(t, s, batchDenom, ask.Denom, ask.Denom[1:], "C01", start, end, creditType) + testSellSetup(t, s, batchDenom, ask.Denom, ask.Denom[1:], classId, start, end, creditType) + // make a sell order gmAny := gomock.Any() s.paramsKeeper.EXPECT().GetParamSet(gmAny, gmAny).Do(func(any interface{}, p *core.Params) { @@ -44,13 +45,7 @@ func TestBuy_ValidTradable(t *testing.T) { s.bankKeeper.EXPECT().SendCoins(gmAny, gmAny, gmAny, sdk.Coins{sdk.NewInt64Coin("ufoo", 30)}).Return(nil).Times(1) purchaseAmt := math.NewDecFromInt64(3) - _, err = s.k.Buy(s.ctx, &marketplace.MsgBuy{ - Buyer: buyerAddr.String(), - Orders: []*marketplace.MsgBuy_Order{ - {Selection: &marketplace.MsgBuy_Order_Selection{Sum: &marketplace.MsgBuy_Order_Selection_SellOrderId{SellOrderId: sellOrderId}}, - Quantity: purchaseAmt.String(), BidPrice: &ask, DisableAutoRetire: true, Expiration: &sellExp}, - }, - }) + _, err = buyDirect(s, buyerAddr.String(), sellOrderId, purchaseAmt.String(), &ask, true, "") assert.NilError(t, err) // sell order should now have quantity 10 - 3 -> 7 @@ -71,7 +66,8 @@ func TestBuy_ValidRetired(t *testing.T) { s := setupBase(t) _, _, buyerAddr := testdata.KeyTestPubAddr() userBalance := sdk.NewInt64Coin("ufoo", 30) - testSellSetup(t, s, batchDenom, ask.Denom, ask.Denom[1:], "C01", start, end, creditType) + + testSellSetup(t, s, batchDenom, ask.Denom, ask.Denom[1:], classId, start, end, creditType) // make a sell order gmAny := gomock.Any() s.paramsKeeper.EXPECT().GetParamSet(gmAny, gmAny).Do(func(any interface{}, p *core.Params) { @@ -92,13 +88,7 @@ func TestBuy_ValidRetired(t *testing.T) { s.bankKeeper.EXPECT().SendCoins(gmAny, gmAny, gmAny, gmAny).Return(nil).Times(1) purchaseAmt := math.NewDecFromInt64(3) - _, err = s.k.Buy(s.ctx, &marketplace.MsgBuy{ - Buyer: buyerAddr.String(), - Orders: []*marketplace.MsgBuy_Order{ - {Selection: &marketplace.MsgBuy_Order_Selection{Sum: &marketplace.MsgBuy_Order_Selection_SellOrderId{SellOrderId: sellOrderId}}, - Quantity: purchaseAmt.String(), BidPrice: &ask, DisableAutoRetire: false, Expiration: &sellExp}, - }, - }) + _, err = buyDirect(s, buyerAddr.String(), sellOrderId, purchaseAmt.String(), &ask, false, "US-NY") assert.NilError(t, err) // sell order should now have quantity 10 - 3 -> 7 @@ -119,7 +109,7 @@ func TestBuy_OrderFilled(t *testing.T) { s := setupBase(t) _, _, buyerAddr := testdata.KeyTestPubAddr() userBalance := sdk.NewInt64Coin("ufoo", 100) - testSellSetup(t, s, batchDenom, ask.Denom, ask.Denom[1:], "C01", start, end, creditType) + testSellSetup(t, s, batchDenom, ask.Denom, ask.Denom[1:], classId, start, end, creditType) // make a sell order gmAny := gomock.Any() s.paramsKeeper.EXPECT().GetParamSet(gmAny, gmAny).Do(func(any interface{}, p *core.Params) { @@ -140,13 +130,7 @@ func TestBuy_OrderFilled(t *testing.T) { s.bankKeeper.EXPECT().SendCoins(gmAny, gmAny, gmAny, gmAny).Return(nil).Times(1) purchaseAmt := math.NewDecFromInt64(10) - _, err = s.k.Buy(s.ctx, &marketplace.MsgBuy{ - Buyer: buyerAddr.String(), - Orders: []*marketplace.MsgBuy_Order{ - {Selection: &marketplace.MsgBuy_Order_Selection{Sum: &marketplace.MsgBuy_Order_Selection_SellOrderId{SellOrderId: sellOrderId}}, - Quantity: purchaseAmt.String(), BidPrice: &ask, DisableAutoRetire: false, Expiration: &sellExp}, - }, - }) + _, err = buyDirect(s, buyerAddr.String(), sellOrderId, purchaseAmt.String(), &ask, false, "US-OR") assert.NilError(t, err) // order was filled, so sell order should no longer exist @@ -164,7 +148,7 @@ func TestBuy_Invalid(t *testing.T) { s := setupBase(t) _, _, buyerAddr := testdata.KeyTestPubAddr() userBalance := sdk.NewInt64Coin("ufoo", 150) - testSellSetup(t, s, batchDenom, ask.Denom, ask.Denom[1:], "C01", start, end, creditType) + testSellSetup(t, s, batchDenom, ask.Denom, ask.Denom[1:], classId, start, end, creditType) // make a sell order gmAny := gomock.Any() s.paramsKeeper.EXPECT().GetParamSet(gmAny, gmAny).Do(func(any interface{}, p *core.Params) { @@ -184,66 +168,80 @@ func TestBuy_Invalid(t *testing.T) { s.bankKeeper.EXPECT().GetBalance(gmAny, gmAny, gmAny).Return(userBalance).Times(1) // sell order not found - _, err = s.k.Buy(s.ctx, &marketplace.MsgBuy{ - Buyer: buyerAddr.String(), - Orders: []*marketplace.MsgBuy_Order{ - {Selection: &marketplace.MsgBuy_Order_Selection{Sum: &marketplace.MsgBuy_Order_Selection_SellOrderId{SellOrderId: 532}}, - Quantity: "10", BidPrice: &ask, DisableAutoRetire: false, Expiration: &sellExp}, - }, - }) + _, err = buyDirect(s, buyerAddr.String(), 532, "10", &ask, false, "US-CA") assert.ErrorContains(t, err, ormerrors.NotFound.Error()) // exceeds decimal precision - _, err = s.k.Buy(s.ctx, &marketplace.MsgBuy{ - Buyer: buyerAddr.String(), - Orders: []*marketplace.MsgBuy_Order{ - {Selection: &marketplace.MsgBuy_Order_Selection{Sum: &marketplace.MsgBuy_Order_Selection_SellOrderId{SellOrderId: sellOrderId}}, - Quantity: "10.23958230958", BidPrice: &ask, DisableAutoRetire: false, Expiration: &sellExp}, - }, - }) + _, err = buyDirect(s, buyerAddr.String(), sellOrderId, "10.3235235235", &ask, false, "US-OR") assert.ErrorContains(t, err, "exceeds maximum decimal places") // mismatch auto retire settings - _, err = s.k.Buy(s.ctx, &marketplace.MsgBuy{ - Buyer: buyerAddr.String(), - Orders: []*marketplace.MsgBuy_Order{ - {Selection: &marketplace.MsgBuy_Order_Selection{Sum: &marketplace.MsgBuy_Order_Selection_SellOrderId{SellOrderId: sellOrderId}}, - Quantity: "10", BidPrice: &ask, DisableAutoRetire: true, Expiration: &sellExp}, - }, - }) + _, err = buyDirect(s, buyerAddr.String(), sellOrderId, "10", &ask, true, "") assert.ErrorContains(t, err, "cannot disable auto retire") // cannot buy more credits than available - _, err = s.k.Buy(s.ctx, &marketplace.MsgBuy{ - Buyer: buyerAddr.String(), - Orders: []*marketplace.MsgBuy_Order{ - {Selection: &marketplace.MsgBuy_Order_Selection{Sum: &marketplace.MsgBuy_Order_Selection_SellOrderId{SellOrderId: sellOrderId}}, - Quantity: "11", BidPrice: &ask, DisableAutoRetire: false, Expiration: &sellExp}, - }, - }) + _, err = buyDirect(s, buyerAddr.String(), sellOrderId, "11", &ask, false, "US-WA") assert.ErrorContains(t, err, "cannot purchase 11 credits from a sell order that has 10 credits") // mismatchDenom wrongDenom := sdk.NewInt64Coin("ubar", 10) - _, err = s.k.Buy(s.ctx, &marketplace.MsgBuy{ - Buyer: buyerAddr.String(), - Orders: []*marketplace.MsgBuy_Order{ - {Selection: &marketplace.MsgBuy_Order_Selection{Sum: &marketplace.MsgBuy_Order_Selection_SellOrderId{SellOrderId: sellOrderId}}, - Quantity: "10", BidPrice: &wrongDenom, DisableAutoRetire: false, Expiration: &sellExp}, - }, - }) + _, err = buyDirect(s, buyerAddr.String(), sellOrderId, "10", &wrongDenom, false, "US-CO") assert.ErrorContains(t, err, "bid price denom does not match ask price denom") // bidding more than in the bank inBank := sdk.NewInt64Coin("ufoo", 10) biddingWith := sdk.NewInt64Coin("ufoo", 100) s.bankKeeper.EXPECT().GetBalance(gmAny, gmAny, gmAny).Return(inBank).Times(1) - _, err = s.k.Buy(s.ctx, &marketplace.MsgBuy{ - Buyer: buyerAddr.String(), - Orders: []*marketplace.MsgBuy_Order{ - {Selection: &marketplace.MsgBuy_Order_Selection{Sum: &marketplace.MsgBuy_Order_Selection_SellOrderId{SellOrderId: sellOrderId}}, - Quantity: "10", BidPrice: &biddingWith, DisableAutoRetire: false, Expiration: &sellExp}, + _, err = buyDirect(s, buyerAddr.String(), sellOrderId, "10", &biddingWith, false, "US-NV") + assert.ErrorContains(t, err, sdkerrors.ErrInsufficientFunds.Error()) +} + +func TestBuy_Decimal(t *testing.T) { + t.Parallel() + s := setupBase(t) + _, _, buyerAddr := testdata.KeyTestPubAddr() + userCoinBalance := sdk.NewInt64Coin("ufoo", 50) + testSellSetup(t, s, batchDenom, ask.Denom, ask.Denom[1:], classId, start, end, creditType) + + // make a sell order + gmAny := gomock.Any() + s.paramsKeeper.EXPECT().GetParamSet(gmAny, gmAny).Do(func(any interface{}, p *core.Params) { + p.CreditTypes = []*core.CreditType{&creditType} + p.AllowedAskDenoms = []*core.AskDenom{{Denom: "ufoo"}} + }).Times(3) + sellExp := time.Now() + res, err := s.k.Sell(s.ctx, &marketplace.MsgSell{ + Owner: s.addr.String(), + Orders: []*marketplace.MsgSell_Order{ + {BatchDenom: batchDenom, Quantity: "10", AskPrice: &ask, DisableAutoRetire: true, Expiration: &sellExp}, + }, + }) + assert.NilError(t, err) + sellOrderId := res.SellOrderIds[0] + + s.bankKeeper.EXPECT().GetBalance(gmAny, gmAny, gmAny).Return(userCoinBalance).Times(1) + + purchaseAmt := "3.985321" + expectedCost := sdk.NewInt64Coin("ufoo", 39) + // sell order ask price: 10ufoo, buy order of 3.215 credits -> 10 * 3.215 = 32.15 + s.bankKeeper.EXPECT().SendCoins(gmAny, gmAny, gmAny, sdk.Coins{expectedCost}).Return(nil).Times(1) + + _, err = buyDirect(s, buyerAddr.String(), sellOrderId, purchaseAmt, &ask, true, "") + assert.NilError(t, err) +} + +func buyDirect(s *baseSuite, buyer string, sellOrderId uint64, qty string, pricePerCredit *sdk.Coin, disableAutoRetire bool, + retirementLocation string) (*marketplace.MsgBuyDirectResponse, error) { + return s.k.BuyDirect(s.ctx, &marketplace.MsgBuyDirect{ + Buyer: buyer, + Orders: []*marketplace.MsgBuyDirect_Order{ + { + SellOrderId: sellOrderId, + Quantity: qty, + BidPrice: pricePerCredit, + DisableAutoRetire: disableAutoRetire, + RetirementLocation: retirementLocation, + }, }, }) - assert.ErrorContains(t, err, sdkerrors.ErrInsufficientFunds.Error()) } diff --git a/x/ecocredit/server/marketplace/query_buy_order.go b/x/ecocredit/server/marketplace/query_buy_order.go deleted file mode 100644 index 9327fa452b..0000000000 --- a/x/ecocredit/server/marketplace/query_buy_order.go +++ /dev/null @@ -1,23 +0,0 @@ -package marketplace - -import ( - "context" - - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/regen-network/regen-ledger/types/ormutil" - "github.com/regen-network/regen-ledger/x/ecocredit/marketplace" -) - -// BuyOrder queries a single buy order. -func (k Keeper) BuyOrder(ctx context.Context, request *marketplace.QueryBuyOrderRequest) (*marketplace.QueryBuyOrderResponse, error) { - order, err := k.stateStore.BuyOrderTable().Get(ctx, request.BuyOrderId) - if err != nil { - return nil, sdkerrors.ErrInvalidRequest.Wrapf("could not get buy order %d: %s", request.BuyOrderId, err.Error()) - } - var gogoOrder marketplace.BuyOrder - if err = ormutil.PulsarToGogoSlow(order, &gogoOrder); err != nil { - return nil, err - } - return &marketplace.QueryBuyOrderResponse{BuyOrder: &gogoOrder}, nil -} diff --git a/x/ecocredit/server/marketplace/query_buy_order_test.go b/x/ecocredit/server/marketplace/query_buy_order_test.go deleted file mode 100644 index 9102491541..0000000000 --- a/x/ecocredit/server/marketplace/query_buy_order_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package marketplace - -import ( - "testing" - - "gotest.tools/v3/assert" - - "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" - sdk "github.com/cosmos/cosmos-sdk/types" - - api "github.com/regen-network/regen-ledger/api/regen/ecocredit/marketplace/v1" - "github.com/regen-network/regen-ledger/x/ecocredit/marketplace" -) - -func TestQueryBuyOrder(t *testing.T) { - t.Parallel() - s := setupBase(t) - assert.NilError(t, s.marketStore.BuyOrderTable().Insert(s.ctx, &api.BuyOrder{Buyer: s.addr})) - - res, err := s.k.BuyOrder(s.ctx, &marketplace.QueryBuyOrderRequest{BuyOrderId: 1}) - assert.NilError(t, err) - assert.Check(t, s.addr.Equals(sdk.AccAddress(res.BuyOrder.Buyer))) - - _, err = s.k.BuyOrder(s.ctx, &marketplace.QueryBuyOrderRequest{BuyOrderId: 35}) - assert.ErrorContains(t, err, ormerrors.NotFound.Error()) -} diff --git a/x/ecocredit/server/marketplace/query_buy_orders.go b/x/ecocredit/server/marketplace/query_buy_orders.go deleted file mode 100644 index 46d0a7dcd9..0000000000 --- a/x/ecocredit/server/marketplace/query_buy_orders.go +++ /dev/null @@ -1,85 +0,0 @@ -package marketplace - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/orm/model/ormlist" - sdk "github.com/cosmos/cosmos-sdk/types" - - api "github.com/regen-network/regen-ledger/api/regen/ecocredit/marketplace/v1" - "github.com/regen-network/regen-ledger/types/ormutil" - "github.com/regen-network/regen-ledger/x/ecocredit/marketplace" -) - -// BuyOrders queries all buy orders with optional pagination -func (k Keeper) BuyOrders(ctx context.Context, request *marketplace.QueryBuyOrdersRequest) (*marketplace.QueryBuyOrdersResponse, error) { - pg, err := ormutil.GogoPageReqToPulsarPageReq(request.Pagination) - if err != nil { - return nil, err - } - - it, err := k.stateStore.BuyOrderTable().List(ctx, api.BuyOrderPrimaryKey{}, ormlist.Paginate(pg)) - if err != nil { - return nil, err - } - defer it.Close() - - orders := make([]*marketplace.BuyOrder, 0, 10) - for it.Next() { - v, err := it.Value() - if err != nil { - return nil, err - } - var order marketplace.BuyOrder - if err = ormutil.PulsarToGogoSlow(v, &order); err != nil { - return nil, err - } - orders = append(orders, &order) - } - - pr, err := ormutil.PulsarPageResToGogoPageRes(it.PageResponse()) - if err != nil { - return nil, err - } - - return &marketplace.QueryBuyOrdersResponse{BuyOrders: orders, Pagination: pr}, nil -} - -// BuyOrdersByAddress queries all buy orders created by the given address with optional pagination -func (k Keeper) BuyOrdersByAddress(ctx context.Context, request *marketplace.QueryBuyOrdersByAddressRequest) (*marketplace.QueryBuyOrdersByAddressResponse, error) { - pg, err := ormutil.GogoPageReqToPulsarPageReq(request.Pagination) - if err != nil { - return nil, err - } - - buyer, err := sdk.AccAddressFromBech32(request.Address) - if err != nil { - return nil, err - } - - it, err := k.stateStore.BuyOrderTable().List(ctx, api.BuyOrderBuyerIndexKey{}.WithBuyer(buyer), ormlist.Paginate(pg)) - if err != nil { - return nil, err - } - defer it.Close() - - orders := make([]*marketplace.BuyOrder, 0, 10) - for it.Next() { - v, err := it.Value() - if err != nil { - return nil, err - } - var order marketplace.BuyOrder - if err = ormutil.PulsarToGogoSlow(v, &order); err != nil { - return nil, err - } - orders = append(orders, &order) - } - - pr, err := ormutil.PulsarPageResToGogoPageRes(it.PageResponse()) - if err != nil { - return nil, err - } - - return &marketplace.QueryBuyOrdersByAddressResponse{BuyOrders: orders, Pagination: pr}, nil -} diff --git a/x/ecocredit/server/marketplace/query_buy_orders_test.go b/x/ecocredit/server/marketplace/query_buy_orders_test.go deleted file mode 100644 index 8ab3a348f9..0000000000 --- a/x/ecocredit/server/marketplace/query_buy_orders_test.go +++ /dev/null @@ -1,66 +0,0 @@ -package marketplace - -import ( - "testing" - - "gotest.tools/v3/assert" - - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/query" - - api "github.com/regen-network/regen-ledger/api/regen/ecocredit/marketplace/v1" - "github.com/regen-network/regen-ledger/x/ecocredit/marketplace" -) - -func TestQueryBuyOrders(t *testing.T) { - t.Parallel() - s := setupBase(t) - assert.NilError(t, s.marketStore.BuyOrderTable().Insert(s.ctx, &api.BuyOrder{Buyer: s.addr})) - assert.NilError(t, s.marketStore.BuyOrderTable().Insert(s.ctx, &api.BuyOrder{Buyer: s.addr})) - - res, err := s.k.BuyOrders(s.ctx, &marketplace.QueryBuyOrdersRequest{}) - assert.NilError(t, err) - assert.Equal(t, 2, len(res.BuyOrders)) - - res, err = s.k.BuyOrders(s.ctx, &marketplace.QueryBuyOrdersRequest{Pagination: &query.PageRequest{Limit: 1, CountTotal: true}}) - assert.NilError(t, err) - assert.Equal(t, 1, len(res.BuyOrders)) - assert.Equal(t, uint64(2), res.Pagination.Total) -} - -func TestQueryBuyOrdersByAddress(t *testing.T) { - t.Parallel() - s := setupBase(t) - _, _, otherAddr := testdata.KeyTestPubAddr() - _, _, noOrdersAddr := testdata.KeyTestPubAddr() - - assert.NilError(t, s.marketStore.BuyOrderTable().Insert(s.ctx, &api.BuyOrder{Buyer: s.addr})) - assert.NilError(t, s.marketStore.BuyOrderTable().Insert(s.ctx, &api.BuyOrder{Buyer: otherAddr})) - - // valid queries - res, err := s.k.BuyOrdersByAddress(s.ctx, &marketplace.QueryBuyOrdersByAddressRequest{Address: s.addr.String()}) - assert.NilError(t, err) - assert.Equal(t, 1, len(res.BuyOrders)) - assert.Equal(t, s.addr.String(), sdk.AccAddress(res.BuyOrders[0].Buyer).String()) - - res, err = s.k.BuyOrdersByAddress(s.ctx, &marketplace.QueryBuyOrdersByAddressRequest{Address: otherAddr.String()}) - assert.NilError(t, err) - assert.Equal(t, 1, len(res.BuyOrders)) - assert.Equal(t, otherAddr.String(), sdk.AccAddress(res.BuyOrders[0].Buyer).String()) - - res, err = s.k.BuyOrdersByAddress(s.ctx, &marketplace.QueryBuyOrdersByAddressRequest{Address: otherAddr.String(), Pagination: &query.PageRequest{CountTotal: true}}) - assert.NilError(t, err) - assert.Equal(t, 1, len(res.BuyOrders)) - assert.Equal(t, otherAddr.String(), sdk.AccAddress(res.BuyOrders[0].Buyer).String()) - assert.Equal(t, uint64(1), res.Pagination.Total) - - // empty slice for addr with no orders - res, err = s.k.BuyOrdersByAddress(s.ctx, &marketplace.QueryBuyOrdersByAddressRequest{Address: noOrdersAddr.String()}) - assert.NilError(t, err) - assert.Equal(t, 0, len(res.BuyOrders)) - - // error on bad address - res, err = s.k.BuyOrdersByAddress(s.ctx, &marketplace.QueryBuyOrdersByAddressRequest{Address: "foobarasdfxxlck"}) - assert.ErrorContains(t, err, "decoding bech32 failed") -} diff --git a/x/ecocredit/server/marketplace/utils.go b/x/ecocredit/server/marketplace/utils.go index 5f3333c247..d5f77cec3b 100644 --- a/x/ecocredit/server/marketplace/utils.go +++ b/x/ecocredit/server/marketplace/utils.go @@ -1,10 +1,16 @@ package marketplace import ( - "github.com/regen-network/regen-ledger/x/ecocredit" - "github.com/regen-network/regen-ledger/x/ecocredit/core" + "context" + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" sdk "github.com/cosmos/cosmos-sdk/types" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/marketplace/v1" + ecoApi "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/types/math" + "github.com/regen-network/regen-ledger/x/ecocredit" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // isDenomAllowed checks if the denom is allowed to be used in orders. @@ -18,3 +24,170 @@ func isDenomAllowed(ctx sdk.Context, denom string, pk ecocredit.ParamKeeper) boo } return false } + +type orderOptions struct { + autoRetire bool + canPartialFill bool + batchDenom string + retirementLocation string +} + +// fillOrder moves credits and coins according to the order. It will: +// - update a sell order, removing it if quantity becomes 0 as a result of this purchase. +// - remove the purchaseQty from the seller's escrowed balance. +// - add credits to the buyer's tradable/retired address (based on the DisableAutoRetire field). +// - update the supply accordingly. +// - send the coins specified in the bid to the seller. +func (k Keeper) fillOrder(ctx context.Context, sellOrder *api.SellOrder, buyerAcc sdk.AccAddress, purchaseQty math.Dec, + cost sdk.Coin, opts orderOptions) error { + sdkCtx := sdk.UnwrapSDKContext(ctx) + sellOrderQty, err := math.NewDecFromString(sellOrder.Quantity) + if err != nil { + return err + } + + switch sellOrderQty.Cmp(purchaseQty) { + case math.LessThan: + if !opts.canPartialFill { + return ecocredit.ErrInsufficientCredits.Wrapf("cannot purchase %v credits from a sell order that has %s credits", purchaseQty, sellOrder.Quantity) + } else { + // if we can partially fill, we just delete the sellOrder and take whatever + // credits are left from that order. + if err := k.stateStore.SellOrderTable().Delete(ctx, sellOrder); err != nil { + return err + } + purchaseQty = sellOrderQty + } + case math.EqualTo: + if err := k.stateStore.SellOrderTable().Delete(ctx, sellOrder); err != nil { + return err + } + case math.GreaterThan: + newSellOrderQty, err := sellOrderQty.Sub(purchaseQty) + if err != nil { + return err + } + sellOrder.Quantity = newSellOrderQty.String() + if err = k.stateStore.SellOrderTable().Update(ctx, sellOrder); err != nil { + return err + } + } + + // remove the credits from the seller's escrowed balance + sellerBal, err := k.coreStore.BatchBalanceTable().Get(ctx, sellOrder.Seller, sellOrder.BatchId) + if err != nil { + return err + } + escrowBal, err := math.NewDecFromString(sellerBal.Escrowed) + if err != nil { + return err + } + escrowBal, err = math.SafeSubBalance(escrowBal, purchaseQty) + if err != nil { + return err + } + sellerBal.Escrowed = escrowBal.String() + if err = k.coreStore.BatchBalanceTable().Update(ctx, sellerBal); err != nil { + return err + } + + // update the buyers balance and the batch supply + supply, err := k.coreStore.BatchSupplyTable().Get(ctx, sellOrder.BatchId) + if err != nil { + return err + } + buyerBal, err := k.coreStore.BatchBalanceTable().Get(ctx, buyerAcc, sellOrder.BatchId) + if err != nil { + if ormerrors.IsNotFound(err) { + buyerBal = &ecoApi.BatchBalance{ + Address: buyerAcc, + BatchId: sellOrder.BatchId, + Tradable: "0", + Retired: "0", + Escrowed: "0", + } + } else { + return err + } + } + if !opts.autoRetire { // if auto retire is disabled, we move the credits into the buyer's/supply's tradable balance. + tradableBalance, err := math.NewDecFromString(buyerBal.Tradable) + if err != nil { + return err + } + tradableBalance, err = math.SafeAddBalance(tradableBalance, purchaseQty) + if err != nil { + return err + } + buyerBal.Tradable = tradableBalance.String() + + supplyTradable, err := math.NewDecFromString(supply.TradableAmount) + if err != nil { + return err + } + supplyTradable, err = math.SafeAddBalance(supplyTradable, purchaseQty) + if err != nil { + return err + } + supply.TradableAmount = supplyTradable.String() + if err = sdkCtx.EventManager().EmitTypedEvent(&core.EventReceive{ + Sender: sdk.AccAddress(sellOrder.Seller).String(), + Recipient: buyerAcc.String(), + BatchDenom: opts.batchDenom, + TradableAmount: purchaseQty.String(), + RetiredAmount: "0", + }); err != nil { + return err + } + } else { + retiredBalance, err := math.NewDecFromString(buyerBal.Retired) + if err != nil { + return err + } + retiredBalance, err = math.SafeAddBalance(retiredBalance, purchaseQty) + if err != nil { + return err + } + buyerBal.Retired = retiredBalance.String() + + supplyRetired, err := math.NewDecFromString(supply.RetiredAmount) + if err != nil { + return err + } + supplyRetired, err = math.SafeAddBalance(supplyRetired, purchaseQty) + if err != nil { + return err + } + supply.RetiredAmount = supplyRetired.String() + if err = sdkCtx.EventManager().EmitTypedEvent(&core.EventRetire{ + Retirer: buyerAcc.String(), + BatchDenom: opts.batchDenom, + Amount: purchaseQty.String(), + Location: opts.retirementLocation, + }); err != nil { + return err + } + } + if err = k.coreStore.BatchSupplyTable().Update(ctx, supply); err != nil { + return err + } + if err = k.coreStore.BatchBalanceTable().Save(ctx, buyerBal); err != nil { + return err + } + + return k.bankKeeper.SendCoins(sdkCtx, buyerAcc, sellOrder.Seller, sdk.NewCoins(cost)) +} + +// getTotalCost calculates the cost of the order by multiplying the price per credit, and the amount of credits +// desired in the order. +func getTotalCost(pricePerCredit sdk.Int, amtCredits math.Dec) (sdk.Int, error) { + unitPrice, err := math.NewPositiveFixedDecFromString(pricePerCredit.String(), amtCredits.NumDecimalPlaces()) + if err != nil { + return sdk.Int{}, err + } + cost, err := amtCredits.Mul(unitPrice) + if err != nil { + return sdk.Int{}, err + } + return cost.SdkIntTrim(), nil +}