From c09da8a66c8881dfd43226f93e96c9d5af644b06 Mon Sep 17 00:00:00 2001 From: technicallyty <48813565+tytech3@users.noreply.github.com> Date: Wed, 9 Feb 2022 14:27:13 -0800 Subject: [PATCH] feat: backport proto generation --- x/ecocredit/basket/events.pb.go | 1069 +++++++++++++++ x/ecocredit/basket/query.pb.go | 2051 +++++++++++++++++++++++++++++ x/ecocredit/basket/query.pb.gw.go | 514 ++++++++ x/ecocredit/basket/state.pb.go | 69 +- x/ecocredit/basket/tx.pb.go | 101 +- x/ecocredit/basket/types.pb.go | 8 +- 6 files changed, 3725 insertions(+), 87 deletions(-) create mode 100644 x/ecocredit/basket/events.pb.go create mode 100644 x/ecocredit/basket/query.pb.go create mode 100644 x/ecocredit/basket/query.pb.gw.go diff --git a/x/ecocredit/basket/events.pb.go b/x/ecocredit/basket/events.pb.go new file mode 100644 index 0000000000..78d2e79a32 --- /dev/null +++ b/x/ecocredit/basket/events.pb.go @@ -0,0 +1,1069 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: regen/ecocredit/basket/v1/events.proto + +package basket + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// EventCreate is an event emitted when a basket is created. +type EventCreate struct { + // basket_denom is the basket bank denom. + BasketDenom string `protobuf:"bytes,1,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` + // curator is the address of the basket curator who is able to change certain + // basket settings. + Curator string `protobuf:"bytes,2,opt,name=curator,proto3" json:"curator,omitempty"` +} + +func (m *EventCreate) Reset() { *m = EventCreate{} } +func (m *EventCreate) String() string { return proto.CompactTextString(m) } +func (*EventCreate) ProtoMessage() {} +func (*EventCreate) Descriptor() ([]byte, []int) { + return fileDescriptor_bc7fc2fbcbd93cbc, []int{0} +} +func (m *EventCreate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventCreate.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 *EventCreate) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventCreate.Merge(m, src) +} +func (m *EventCreate) XXX_Size() int { + return m.Size() +} +func (m *EventCreate) XXX_DiscardUnknown() { + xxx_messageInfo_EventCreate.DiscardUnknown(m) +} + +var xxx_messageInfo_EventCreate proto.InternalMessageInfo + +func (m *EventCreate) GetBasketDenom() string { + if m != nil { + return m.BasketDenom + } + return "" +} + +func (m *EventCreate) GetCurator() string { + if m != nil { + return m.Curator + } + return "" +} + +// EventPut is an event emitted when credits are put into a basket in return +// for basket tokens. +type EventPut struct { + // owner is the owner of the credits put into the basket. + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + // basket_denom is the basket bank denom that the credits were added to. + BasketDenom string `protobuf:"bytes,2,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` + // credits are the credits that were added to the basket. + Credits []*BasketCredit `protobuf:"bytes,3,rep,name=credits,proto3" json:"credits,omitempty"` + // amount is the integer number of basket tokens converted from credits. + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (m *EventPut) Reset() { *m = EventPut{} } +func (m *EventPut) String() string { return proto.CompactTextString(m) } +func (*EventPut) ProtoMessage() {} +func (*EventPut) Descriptor() ([]byte, []int) { + return fileDescriptor_bc7fc2fbcbd93cbc, []int{1} +} +func (m *EventPut) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventPut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventPut.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 *EventPut) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventPut.Merge(m, src) +} +func (m *EventPut) XXX_Size() int { + return m.Size() +} +func (m *EventPut) XXX_DiscardUnknown() { + xxx_messageInfo_EventPut.DiscardUnknown(m) +} + +var xxx_messageInfo_EventPut proto.InternalMessageInfo + +func (m *EventPut) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *EventPut) GetBasketDenom() string { + if m != nil { + return m.BasketDenom + } + return "" +} + +func (m *EventPut) GetCredits() []*BasketCredit { + if m != nil { + return m.Credits + } + return nil +} + +func (m *EventPut) GetAmount() string { + if m != nil { + return m.Amount + } + return "" +} + +// EventTake is an event emitted when credits are taken from a basket starting +// from the oldest credits first. +type EventTake struct { + // owner is the owner of the credits taken from the basket. + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + // basket_denom is the basket bank denom that credits were taken from. + BasketDenom string `protobuf:"bytes,2,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` + // credits are the credits that were taken from the basket. + Credits []*BasketCredit `protobuf:"bytes,3,rep,name=credits,proto3" json:"credits,omitempty"` + // amount is the integer number of basket tokens converted to credits. + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (m *EventTake) Reset() { *m = EventTake{} } +func (m *EventTake) String() string { return proto.CompactTextString(m) } +func (*EventTake) ProtoMessage() {} +func (*EventTake) Descriptor() ([]byte, []int) { + return fileDescriptor_bc7fc2fbcbd93cbc, []int{2} +} +func (m *EventTake) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventTake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventTake.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 *EventTake) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventTake.Merge(m, src) +} +func (m *EventTake) XXX_Size() int { + return m.Size() +} +func (m *EventTake) XXX_DiscardUnknown() { + xxx_messageInfo_EventTake.DiscardUnknown(m) +} + +var xxx_messageInfo_EventTake proto.InternalMessageInfo + +func (m *EventTake) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *EventTake) GetBasketDenom() string { + if m != nil { + return m.BasketDenom + } + return "" +} + +func (m *EventTake) GetCredits() []*BasketCredit { + if m != nil { + return m.Credits + } + return nil +} + +func (m *EventTake) GetAmount() string { + if m != nil { + return m.Amount + } + return "" +} + +func init() { + proto.RegisterType((*EventCreate)(nil), "regen.ecocredit.basket.v1.EventCreate") + proto.RegisterType((*EventPut)(nil), "regen.ecocredit.basket.v1.EventPut") + proto.RegisterType((*EventTake)(nil), "regen.ecocredit.basket.v1.EventTake") +} + +func init() { + proto.RegisterFile("regen/ecocredit/basket/v1/events.proto", fileDescriptor_bc7fc2fbcbd93cbc) +} + +var fileDescriptor_bc7fc2fbcbd93cbc = []byte{ + // 297 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2b, 0x4a, 0x4d, 0x4f, + 0xcd, 0xd3, 0x4f, 0x4d, 0xce, 0x4f, 0x2e, 0x4a, 0x4d, 0xc9, 0x2c, 0xd1, 0x4f, 0x4a, 0x2c, 0xce, + 0x4e, 0x2d, 0xd1, 0x2f, 0x33, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, + 0x2f, 0xc9, 0x17, 0x92, 0x04, 0xab, 0xd3, 0x83, 0xab, 0xd3, 0x83, 0xa8, 0xd3, 0x2b, 0x33, 0x94, + 0x52, 0xc5, 0x6d, 0x44, 0x49, 0x65, 0x41, 0x2a, 0xd4, 0x04, 0x25, 0x2f, 0x2e, 0x6e, 0x57, 0x90, + 0x89, 0xce, 0x45, 0xa9, 0x89, 0x25, 0xa9, 0x42, 0x8a, 0x5c, 0x3c, 0x10, 0x75, 0xf1, 0x29, 0xa9, + 0x79, 0xf9, 0xb9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0xdc, 0x10, 0x31, 0x17, 0x90, 0x90, + 0x90, 0x04, 0x17, 0x7b, 0x72, 0x69, 0x51, 0x62, 0x49, 0x7e, 0x91, 0x04, 0x13, 0x58, 0x16, 0xc6, + 0x55, 0x9a, 0xc7, 0xc8, 0xc5, 0x01, 0x36, 0x2c, 0xa0, 0xb4, 0x44, 0x48, 0x84, 0x8b, 0x35, 0xbf, + 0x3c, 0x2f, 0xb5, 0x08, 0x6a, 0x04, 0x84, 0x83, 0x61, 0x3e, 0x13, 0xa6, 0xf9, 0x8e, 0x5c, 0xec, + 0x10, 0x17, 0x17, 0x4b, 0x30, 0x2b, 0x30, 0x6b, 0x70, 0x1b, 0xa9, 0xeb, 0xe1, 0xf4, 0xa5, 0x9e, + 0x13, 0x98, 0xe5, 0x0c, 0x16, 0x0e, 0x82, 0xe9, 0x13, 0x12, 0xe3, 0x62, 0x4b, 0xcc, 0xcd, 0x2f, + 0xcd, 0x2b, 0x91, 0x60, 0x01, 0x9b, 0x0f, 0xe5, 0x29, 0xcd, 0x67, 0xe4, 0xe2, 0x04, 0x3b, 0x30, + 0x24, 0x31, 0x3b, 0x75, 0x30, 0xba, 0xd0, 0x29, 0xe8, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, + 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, + 0xe5, 0x18, 0xa2, 0x2c, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xc1, + 0xb6, 0xe9, 0xe6, 0xa5, 0x96, 0x94, 0xe7, 0x17, 0x65, 0x43, 0x79, 0x39, 0xa9, 0x29, 0xe9, 0xa9, + 0x45, 0xfa, 0x15, 0x18, 0x31, 0x9e, 0xc4, 0x06, 0x8e, 0x69, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x1b, 0x36, 0xc6, 0x2a, 0x55, 0x02, 0x00, 0x00, +} + +func (m *EventCreate) 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 *EventCreate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventCreate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Curator) > 0 { + i -= len(m.Curator) + copy(dAtA[i:], m.Curator) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Curator))) + i-- + dAtA[i] = 0x12 + } + if len(m.BasketDenom) > 0 { + i -= len(m.BasketDenom) + copy(dAtA[i:], m.BasketDenom) + i = encodeVarintEvents(dAtA, i, uint64(len(m.BasketDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventPut) 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 *EventPut) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventPut) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0x22 + } + if len(m.Credits) > 0 { + for iNdEx := len(m.Credits) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Credits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.BasketDenom) > 0 { + i -= len(m.BasketDenom) + copy(dAtA[i:], m.BasketDenom) + i = encodeVarintEvents(dAtA, i, uint64(len(m.BasketDenom))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventTake) 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 *EventTake) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventTake) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0x22 + } + if len(m.Credits) > 0 { + for iNdEx := len(m.Credits) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Credits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.BasketDenom) > 0 { + i -= len(m.BasketDenom) + copy(dAtA[i:], m.BasketDenom) + i = encodeVarintEvents(dAtA, i, uint64(len(m.BasketDenom))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventCreate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BasketDenom) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Curator) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventPut) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.BasketDenom) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if len(m.Credits) > 0 { + for _, e := range m.Credits { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventTake) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.BasketDenom) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if len(m.Credits) > 0 { + for _, e := range m.Credits { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventCreate) 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: EventCreate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventCreate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", 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.BasketDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Curator", 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.Curator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventPut) 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: EventPut: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventPut: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", 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.BasketDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Credits", 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 + } + m.Credits = append(m.Credits, &BasketCredit{}) + if err := m.Credits[len(m.Credits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventTake) 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: EventTake: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventTake: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", 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.BasketDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Credits", 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 + } + m.Credits = append(m.Credits, &BasketCredit{}) + if err := m.Credits[len(m.Credits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/ecocredit/basket/query.pb.go b/x/ecocredit/basket/query.pb.go new file mode 100644 index 0000000000..c88bdb53f5 --- /dev/null +++ b/x/ecocredit/basket/query.pb.go @@ -0,0 +1,2051 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: regen/ecocredit/basket/v1/query.proto + +package basket + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryBasketRequest is the Query/Basket request type. +type QueryBasketRequest struct { + // basket_denom represents the denom of the basket to query. + BasketDenom string `protobuf:"bytes,1,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` +} + +func (m *QueryBasketRequest) Reset() { *m = QueryBasketRequest{} } +func (m *QueryBasketRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBasketRequest) ProtoMessage() {} +func (*QueryBasketRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_a83a50529e6be723, []int{0} +} +func (m *QueryBasketRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBasketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBasketRequest.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 *QueryBasketRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBasketRequest.Merge(m, src) +} +func (m *QueryBasketRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBasketRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBasketRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBasketRequest proto.InternalMessageInfo + +func (m *QueryBasketRequest) GetBasketDenom() string { + if m != nil { + return m.BasketDenom + } + return "" +} + +// QueryBasketResponse is the Query/Basket response type. +type QueryBasketResponse struct { + // basket is the queried basket. + Basket *Basket `protobuf:"bytes,1,opt,name=basket,proto3" json:"basket,omitempty"` +} + +func (m *QueryBasketResponse) Reset() { *m = QueryBasketResponse{} } +func (m *QueryBasketResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBasketResponse) ProtoMessage() {} +func (*QueryBasketResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a83a50529e6be723, []int{1} +} +func (m *QueryBasketResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBasketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBasketResponse.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 *QueryBasketResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBasketResponse.Merge(m, src) +} +func (m *QueryBasketResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBasketResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBasketResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBasketResponse proto.InternalMessageInfo + +func (m *QueryBasketResponse) GetBasket() *Basket { + if m != nil { + return m.Basket + } + return nil +} + +// QueryBasketsRequest is the Query/Baskets request type. +type QueryBasketsRequest struct { + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryBasketsRequest) Reset() { *m = QueryBasketsRequest{} } +func (m *QueryBasketsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBasketsRequest) ProtoMessage() {} +func (*QueryBasketsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_a83a50529e6be723, []int{2} +} +func (m *QueryBasketsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBasketsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBasketsRequest.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 *QueryBasketsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBasketsRequest.Merge(m, src) +} +func (m *QueryBasketsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBasketsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBasketsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBasketsRequest proto.InternalMessageInfo + +func (m *QueryBasketsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryBasketsResponse is the Query/Baskets response type. +type QueryBasketsResponse struct { + // baskets are the fetched baskets. + Baskets []*Basket `protobuf:"bytes,1,rep,name=baskets,proto3" json:"baskets,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryBasketsResponse) Reset() { *m = QueryBasketsResponse{} } +func (m *QueryBasketsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBasketsResponse) ProtoMessage() {} +func (*QueryBasketsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a83a50529e6be723, []int{3} +} +func (m *QueryBasketsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBasketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBasketsResponse.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 *QueryBasketsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBasketsResponse.Merge(m, src) +} +func (m *QueryBasketsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBasketsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBasketsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBasketsResponse proto.InternalMessageInfo + +func (m *QueryBasketsResponse) GetBaskets() []*Basket { + if m != nil { + return m.Baskets + } + return nil +} + +func (m *QueryBasketsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryBasketBalancesRequest is the Query/BasketBalances request type. +type QueryBasketBalancesRequest struct { + // basket_denom is the denom of the basket. + BasketDenom string `protobuf:"bytes,1,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryBasketBalancesRequest) Reset() { *m = QueryBasketBalancesRequest{} } +func (m *QueryBasketBalancesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBasketBalancesRequest) ProtoMessage() {} +func (*QueryBasketBalancesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_a83a50529e6be723, []int{4} +} +func (m *QueryBasketBalancesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBasketBalancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBasketBalancesRequest.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 *QueryBasketBalancesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBasketBalancesRequest.Merge(m, src) +} +func (m *QueryBasketBalancesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBasketBalancesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBasketBalancesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBasketBalancesRequest proto.InternalMessageInfo + +func (m *QueryBasketBalancesRequest) GetBasketDenom() string { + if m != nil { + return m.BasketDenom + } + return "" +} + +func (m *QueryBasketBalancesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryBasketBalancesResponse is the Query/BasketBalances response type. +type QueryBasketBalancesResponse struct { + // balances is a list of credit balances in the basket. + Balances []*BasketBalance `protobuf:"bytes,1,rep,name=balances,proto3" json:"balances,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryBasketBalancesResponse) Reset() { *m = QueryBasketBalancesResponse{} } +func (m *QueryBasketBalancesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBasketBalancesResponse) ProtoMessage() {} +func (*QueryBasketBalancesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a83a50529e6be723, []int{5} +} +func (m *QueryBasketBalancesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBasketBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBasketBalancesResponse.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 *QueryBasketBalancesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBasketBalancesResponse.Merge(m, src) +} +func (m *QueryBasketBalancesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBasketBalancesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBasketBalancesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBasketBalancesResponse proto.InternalMessageInfo + +func (m *QueryBasketBalancesResponse) GetBalances() []*BasketBalance { + if m != nil { + return m.Balances + } + return nil +} + +func (m *QueryBasketBalancesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryBasketBalanceRequest is the Query/BasketBalance request type. +type QueryBasketBalanceRequest struct { + // basket_denom is the denom of the basket. + BasketDenom string `protobuf:"bytes,1,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` + // batch_denom is the denom of the credit batch. + BatchDenom string `protobuf:"bytes,2,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` +} + +func (m *QueryBasketBalanceRequest) Reset() { *m = QueryBasketBalanceRequest{} } +func (m *QueryBasketBalanceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBasketBalanceRequest) ProtoMessage() {} +func (*QueryBasketBalanceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_a83a50529e6be723, []int{6} +} +func (m *QueryBasketBalanceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBasketBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBasketBalanceRequest.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 *QueryBasketBalanceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBasketBalanceRequest.Merge(m, src) +} +func (m *QueryBasketBalanceRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBasketBalanceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBasketBalanceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBasketBalanceRequest proto.InternalMessageInfo + +func (m *QueryBasketBalanceRequest) GetBasketDenom() string { + if m != nil { + return m.BasketDenom + } + return "" +} + +func (m *QueryBasketBalanceRequest) GetBatchDenom() string { + if m != nil { + return m.BatchDenom + } + return "" +} + +// QueryBasketBalanceResponse is the Query/BasketBalance response type. +type QueryBasketBalanceResponse struct { + // balance is the amount of the queried credit batch in the basket. + Balance string `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` +} + +func (m *QueryBasketBalanceResponse) Reset() { *m = QueryBasketBalanceResponse{} } +func (m *QueryBasketBalanceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBasketBalanceResponse) ProtoMessage() {} +func (*QueryBasketBalanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a83a50529e6be723, []int{7} +} +func (m *QueryBasketBalanceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBasketBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBasketBalanceResponse.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 *QueryBasketBalanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBasketBalanceResponse.Merge(m, src) +} +func (m *QueryBasketBalanceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBasketBalanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBasketBalanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBasketBalanceResponse proto.InternalMessageInfo + +func (m *QueryBasketBalanceResponse) GetBalance() string { + if m != nil { + return m.Balance + } + return "" +} + +func init() { + proto.RegisterType((*QueryBasketRequest)(nil), "regen.ecocredit.basket.v1.QueryBasketRequest") + proto.RegisterType((*QueryBasketResponse)(nil), "regen.ecocredit.basket.v1.QueryBasketResponse") + proto.RegisterType((*QueryBasketsRequest)(nil), "regen.ecocredit.basket.v1.QueryBasketsRequest") + proto.RegisterType((*QueryBasketsResponse)(nil), "regen.ecocredit.basket.v1.QueryBasketsResponse") + proto.RegisterType((*QueryBasketBalancesRequest)(nil), "regen.ecocredit.basket.v1.QueryBasketBalancesRequest") + proto.RegisterType((*QueryBasketBalancesResponse)(nil), "regen.ecocredit.basket.v1.QueryBasketBalancesResponse") + proto.RegisterType((*QueryBasketBalanceRequest)(nil), "regen.ecocredit.basket.v1.QueryBasketBalanceRequest") + proto.RegisterType((*QueryBasketBalanceResponse)(nil), "regen.ecocredit.basket.v1.QueryBasketBalanceResponse") +} + +func init() { + proto.RegisterFile("regen/ecocredit/basket/v1/query.proto", fileDescriptor_a83a50529e6be723) +} + +var fileDescriptor_a83a50529e6be723 = []byte{ + // 585 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0xbf, 0x6f, 0xd3, 0x4e, + 0x18, 0xc6, 0x73, 0xf9, 0xaa, 0xe9, 0x97, 0x0b, 0x30, 0x1c, 0x0c, 0xa9, 0x41, 0xa6, 0xb5, 0xf8, + 0x51, 0x55, 0xea, 0x9d, 0xd2, 0xd2, 0x42, 0x81, 0x29, 0xaa, 0x00, 0x31, 0x85, 0x8c, 0x48, 0xa8, + 0x3a, 0x3b, 0xaf, 0xdc, 0xa8, 0x89, 0x2f, 0xf5, 0x5d, 0x02, 0x08, 0x75, 0x61, 0x61, 0x45, 0x42, + 0x62, 0x62, 0x62, 0xe6, 0xbf, 0x60, 0x61, 0x42, 0x95, 0x58, 0x18, 0x18, 0x50, 0xc2, 0x1f, 0x82, + 0x7c, 0x77, 0x09, 0x71, 0xd3, 0x36, 0x76, 0xc5, 0xe8, 0x37, 0xef, 0xf3, 0xdc, 0xe7, 0x7d, 0xfc, + 0x5e, 0x8c, 0x6f, 0xc4, 0x10, 0x42, 0xc4, 0x20, 0x10, 0x41, 0x0c, 0xcd, 0x96, 0x62, 0x3e, 0x97, + 0x7b, 0xa0, 0x58, 0xbf, 0xca, 0xf6, 0x7b, 0x10, 0xbf, 0xa2, 0xdd, 0x58, 0x28, 0x41, 0x16, 0x74, + 0x1b, 0x1d, 0xb7, 0x51, 0xd3, 0x46, 0xfb, 0x55, 0xe7, 0x6a, 0x28, 0x44, 0xd8, 0x06, 0xc6, 0xbb, + 0x2d, 0xc6, 0xa3, 0x48, 0x28, 0xae, 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0xc7, 0xf7, 0xe4, 0xa0, 0xd6, 0xf8, 0x3a, 0x70, 0xd1, 0xe1, 0xc0, 0x45, 0xbf, 0x06, 0x2e, 0x7a, + 0x37, 0x74, 0x0b, 0x87, 0x43, 0xb7, 0xf0, 0x63, 0xe8, 0x16, 0x9e, 0xdd, 0x0d, 0x5b, 0x6a, 0xb7, + 0xe7, 0xd3, 0x40, 0x74, 0xcc, 0x69, 0xab, 0x11, 0xa8, 0x17, 0x22, 0xde, 0xb3, 0x4f, 0x6d, 0x68, + 0x86, 0x10, 0xb3, 0x97, 0x53, 0x10, 0x7e, 0x49, 0x7f, 0x94, 0xd6, 0xff, 0x04, 0x00, 0x00, 0xff, + 0xff, 0x87, 0x41, 0xc7, 0xc6, 0x49, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Basket queries one basket by denom. + Basket(ctx context.Context, in *QueryBasketRequest, opts ...grpc.CallOption) (*QueryBasketResponse, error) + // Baskets lists all baskets in the ecocredit module. + Baskets(ctx context.Context, in *QueryBasketsRequest, opts ...grpc.CallOption) (*QueryBasketsResponse, error) + // BasketBalances lists the balance of each credit batch in the basket. + BasketBalances(ctx context.Context, in *QueryBasketBalancesRequest, opts ...grpc.CallOption) (*QueryBasketBalancesResponse, error) + // BasketBalance queries the balance of a specific credit batch in the basket. + BasketBalance(ctx context.Context, in *QueryBasketBalanceRequest, opts ...grpc.CallOption) (*QueryBasketBalanceResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Basket(ctx context.Context, in *QueryBasketRequest, opts ...grpc.CallOption) (*QueryBasketResponse, error) { + out := new(QueryBasketResponse) + err := c.cc.Invoke(ctx, "/regen.ecocredit.basket.v1.Query/Basket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Baskets(ctx context.Context, in *QueryBasketsRequest, opts ...grpc.CallOption) (*QueryBasketsResponse, error) { + out := new(QueryBasketsResponse) + err := c.cc.Invoke(ctx, "/regen.ecocredit.basket.v1.Query/Baskets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) BasketBalances(ctx context.Context, in *QueryBasketBalancesRequest, opts ...grpc.CallOption) (*QueryBasketBalancesResponse, error) { + out := new(QueryBasketBalancesResponse) + err := c.cc.Invoke(ctx, "/regen.ecocredit.basket.v1.Query/BasketBalances", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) BasketBalance(ctx context.Context, in *QueryBasketBalanceRequest, opts ...grpc.CallOption) (*QueryBasketBalanceResponse, error) { + out := new(QueryBasketBalanceResponse) + err := c.cc.Invoke(ctx, "/regen.ecocredit.basket.v1.Query/BasketBalance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Basket queries one basket by denom. + Basket(context.Context, *QueryBasketRequest) (*QueryBasketResponse, error) + // Baskets lists all baskets in the ecocredit module. + Baskets(context.Context, *QueryBasketsRequest) (*QueryBasketsResponse, error) + // BasketBalances lists the balance of each credit batch in the basket. + BasketBalances(context.Context, *QueryBasketBalancesRequest) (*QueryBasketBalancesResponse, error) + // BasketBalance queries the balance of a specific credit batch in the basket. + BasketBalance(context.Context, *QueryBasketBalanceRequest) (*QueryBasketBalanceResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Basket(ctx context.Context, req *QueryBasketRequest) (*QueryBasketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Basket not implemented") +} +func (*UnimplementedQueryServer) Baskets(ctx context.Context, req *QueryBasketsRequest) (*QueryBasketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Baskets not implemented") +} +func (*UnimplementedQueryServer) BasketBalances(ctx context.Context, req *QueryBasketBalancesRequest) (*QueryBasketBalancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BasketBalances not implemented") +} +func (*UnimplementedQueryServer) BasketBalance(ctx context.Context, req *QueryBasketBalanceRequest) (*QueryBasketBalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BasketBalance not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Basket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBasketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Basket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/regen.ecocredit.basket.v1.Query/Basket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Basket(ctx, req.(*QueryBasketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Baskets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBasketsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Baskets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/regen.ecocredit.basket.v1.Query/Baskets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Baskets(ctx, req.(*QueryBasketsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_BasketBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBasketBalancesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).BasketBalances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/regen.ecocredit.basket.v1.Query/BasketBalances", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BasketBalances(ctx, req.(*QueryBasketBalancesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_BasketBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBasketBalanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).BasketBalance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/regen.ecocredit.basket.v1.Query/BasketBalance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BasketBalance(ctx, req.(*QueryBasketBalanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "regen.ecocredit.basket.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Basket", + Handler: _Query_Basket_Handler, + }, + { + MethodName: "Baskets", + Handler: _Query_Baskets_Handler, + }, + { + MethodName: "BasketBalances", + Handler: _Query_BasketBalances_Handler, + }, + { + MethodName: "BasketBalance", + Handler: _Query_BasketBalance_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "regen/ecocredit/basket/v1/query.proto", +} + +func (m *QueryBasketRequest) 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 *QueryBasketRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBasketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BasketDenom) > 0 { + i -= len(m.BasketDenom) + copy(dAtA[i:], m.BasketDenom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.BasketDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryBasketResponse) 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 *QueryBasketResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBasketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Basket != nil { + { + size, err := m.Basket.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 *QueryBasketsRequest) 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 *QueryBasketsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBasketsRequest) 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 *QueryBasketsResponse) 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 *QueryBasketsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBasketsResponse) 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.Baskets) > 0 { + for iNdEx := len(m.Baskets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Baskets[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 *QueryBasketBalancesRequest) 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 *QueryBasketBalancesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBasketBalancesRequest) 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.BasketDenom) > 0 { + i -= len(m.BasketDenom) + copy(dAtA[i:], m.BasketDenom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.BasketDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryBasketBalancesResponse) 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 *QueryBasketBalancesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBasketBalancesResponse) 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.Balances) > 0 { + for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Balances[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 *QueryBasketBalanceRequest) 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 *QueryBasketBalanceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBasketBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BatchDenom) > 0 { + i -= len(m.BatchDenom) + copy(dAtA[i:], m.BatchDenom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.BatchDenom))) + i-- + dAtA[i] = 0x12 + } + if len(m.BasketDenom) > 0 { + i -= len(m.BasketDenom) + copy(dAtA[i:], m.BasketDenom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.BasketDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryBasketBalanceResponse) 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 *QueryBasketBalanceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBasketBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Balance) > 0 { + i -= len(m.Balance) + copy(dAtA[i:], m.Balance) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Balance))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryBasketRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BasketDenom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryBasketResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Basket != nil { + l = m.Basket.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryBasketsRequest) 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 *QueryBasketsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Baskets) > 0 { + for _, e := range m.Baskets { + 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 *QueryBasketBalancesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BasketDenom) + 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 *QueryBasketBalancesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Balances) > 0 { + for _, e := range m.Balances { + 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 *QueryBasketBalanceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BasketDenom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.BatchDenom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryBasketBalanceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Balance) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +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)))) +} +func (m *QueryBasketRequest) 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: QueryBasketRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBasketRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", 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.BasketDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBasketResponse) 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: QueryBasketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBasketResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Basket", 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.Basket == nil { + m.Basket = &Basket{} + } + if err := m.Basket.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 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBasketsRequest) 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: QueryBasketsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBasketsRequest: 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 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBasketsResponse) 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: QueryBasketsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBasketsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Baskets", 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.Baskets = append(m.Baskets, &Basket{}) + if err := m.Baskets[len(m.Baskets)-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 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBasketBalancesRequest) 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: QueryBasketBalancesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBasketBalancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", 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.BasketDenom = 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 + 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 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBasketBalancesResponse) 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: QueryBasketBalancesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBasketBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balances", 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.Balances = append(m.Balances, &BasketBalance{}) + if err := m.Balances[len(m.Balances)-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 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBasketBalanceRequest) 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: QueryBasketBalanceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBasketBalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", 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.BasketDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBasketBalanceResponse) 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: QueryBasketBalanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBasketBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", 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.Balance = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/ecocredit/basket/query.pb.gw.go b/x/ecocredit/basket/query.pb.gw.go new file mode 100644 index 0000000000..210400ead3 --- /dev/null +++ b/x/ecocredit/basket/query.pb.gw.go @@ -0,0 +1,514 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: regen/ecocredit/basket/v1/query.proto + +/* +Package basket is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package basket + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Basket_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBasketRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["basket_denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "basket_denom") + } + + protoReq.BasketDenom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "basket_denom", err) + } + + msg, err := client.Basket(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Basket_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBasketRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["basket_denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "basket_denom") + } + + protoReq.BasketDenom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "basket_denom", err) + } + + msg, err := server.Basket(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Baskets_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Baskets_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBasketsRequest + 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_Baskets_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Baskets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Baskets_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBasketsRequest + 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_Baskets_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Baskets(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_BasketBalances_0 = &utilities.DoubleArray{Encoding: map[string]int{"basket_denom": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_BasketBalances_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBasketBalancesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["basket_denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "basket_denom") + } + + protoReq.BasketDenom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "basket_denom", 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_BasketBalances_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.BasketBalances(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_BasketBalances_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBasketBalancesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["basket_denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "basket_denom") + } + + protoReq.BasketDenom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "basket_denom", 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_BasketBalances_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.BasketBalances(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_BasketBalance_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBasketBalanceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["basket_denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "basket_denom") + } + + protoReq.BasketDenom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "basket_denom", err) + } + + val, ok = pathParams["batch_denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "batch_denom") + } + + protoReq.BatchDenom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "batch_denom", err) + } + + msg, err := client.BasketBalance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_BasketBalance_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBasketBalanceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["basket_denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "basket_denom") + } + + protoReq.BasketDenom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "basket_denom", err) + } + + val, ok = pathParams["batch_denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "batch_denom") + } + + protoReq.BatchDenom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "batch_denom", err) + } + + msg, err := server.BasketBalance(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Basket_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_Basket_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_Basket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Baskets_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_Baskets_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_Baskets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BasketBalances_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_BasketBalances_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_BasketBalances_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BasketBalance_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_BasketBalance_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_BasketBalance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Basket_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_Basket_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_Basket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Baskets_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_Baskets_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_Baskets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BasketBalances_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_BasketBalances_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_BasketBalances_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BasketBalance_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_BasketBalance_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_BasketBalance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Basket_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"regen", "ecocredit", "basket", "v1", "baskets", "basket_denom"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Baskets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"regen", "ecocredit", "basket", "v1", "baskets"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_BasketBalances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"regen", "ecocredit", "basket", "v1", "baskets", "basket_denom", "balances"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_BasketBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"regen", "ecocredit", "basket", "v1", "baskets", "basket_denom", "balances", "batch_denom"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Basket_0 = runtime.ForwardResponseMessage + + forward_Query_Baskets_0 = runtime.ForwardResponseMessage + + forward_Query_BasketBalances_0 = runtime.ForwardResponseMessage + + forward_Query_BasketBalance_0 = runtime.ForwardResponseMessage +) diff --git a/x/ecocredit/basket/state.pb.go b/x/ecocredit/basket/state.pb.go index 350b7bfd33..57df890eca 100644 --- a/x/ecocredit/basket/state.pb.go +++ b/x/ecocredit/basket/state.pb.go @@ -29,7 +29,7 @@ type Basket struct { // id is the uint64 ID of the basket. It is used internally for reducing // storage space. Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // basket_denom is the basket denom. + // basket_denom is the basket bank denom. BasketDenom string `protobuf:"bytes,2,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` // disable_auto_retire indicates whether or not the credits will be retired upon withdraw from the basket. DisableAutoRetire bool `protobuf:"varint,3,opt,name=disable_auto_retire,json=disableAutoRetire,proto3" json:"disable_auto_retire,omitempty"` @@ -180,7 +180,8 @@ type BasketBalance struct { BatchDenom string `protobuf:"bytes,2,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` // balance is the amount of ecocredits held in the basket Balance string `protobuf:"bytes,3,opt,name=balance,proto3" json:"balance,omitempty"` - // batch_start_date is the start date of the batch. + // batch_start_date is the start date of the batch. This field is used + // to create an index which is used to remove the oldest credits first. BatchStartDate *types.Timestamp `protobuf:"bytes,4,opt,name=batch_start_date,json=batchStartDate,proto3" json:"batch_start_date,omitempty"` } @@ -257,38 +258,38 @@ func init() { var fileDescriptor_c416a19075224f85 = []byte{ // 512 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x53, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0xed, 0x26, 0x21, 0x4d, 0x26, 0x6d, 0x14, 0x96, 0x22, 0xb6, 0x41, 0xb8, 0x21, 0x02, 0xc9, - 0x07, 0xb0, 0x15, 0x38, 0x20, 0x85, 0x0b, 0x84, 0x5c, 0x7a, 0xe1, 0x60, 0xca, 0x85, 0x8b, 0xb5, - 0xb6, 0x87, 0xc4, 0xaa, 0xd7, 0x6b, 0x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0x37, 0x56, 0xed, 0x72, 0x63, 0xd5, 0x7e, 0x6c, 0xac, 0xda, + 0xfb, 0x97, 0xf3, 0x58, 0x2d, 0x96, 0x81, 0x13, 0x4a, 0xe1, 0xea, 0x6f, 0xfd, 0x69, 0x8a, 0xea, + 0xa3, 0xcc, 0xcf, 0xb6, 0x28, 0xc1, 0x68, 0x8e, 0xb9, 0x7b, 0x7e, 0xeb, 0x4f, 0x09, 0x5a, 0xfa, + 0xc1, 0xcf, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x7f, 0x78, 0x82, 0x7a, 0x4a, 0x03, 0x00, 0x00, } func (m *Basket) Marshal() (dAtA []byte, err error) { diff --git a/x/ecocredit/basket/tx.pb.go b/x/ecocredit/basket/tx.pb.go index 5fdf42adc0..e7761519a4 100644 --- a/x/ecocredit/basket/tx.pb.go +++ b/x/ecocredit/basket/tx.pb.go @@ -45,9 +45,9 @@ type MsgCreate struct { // tokens and for bank denom metadata. An exponent of 6 will mean that 10^6 // units of a basket token will be issued for 1.0 credits and that // this should be displayed as one unit in user interfaces. The exponent - // must be >= the precision of the credit type to minimize the need for rounding - // (rounding may still be needed if the precision changes to be great than - // the exponent). + // must be >= the precision of the credit type to minimize the need for + // rounding (rounding may still be needed if the precision changes to be great + // than the exponent). Exponent uint32 `protobuf:"varint,4,opt,name=exponent,proto3" json:"exponent,omitempty"` // disable_auto_retire allows auto-retirement to be disabled. // The credits will be auto-retired if disable_auto_retire is @@ -63,7 +63,10 @@ type MsgCreate struct { // into the basket. MinStartDate *types.Timestamp `protobuf:"bytes,8,opt,name=min_start_date,json=minStartDate,proto3" json:"min_start_date,omitempty"` // fee is the fee that the curator will pay to create the basket. It must be >= - // the required Params.basket_creation_fee. + // the required Params.basket_creation_fee. We include the fee explicitly + // here so that the curator explicitly acknowledges paying this fee and + // is not surprised to learn that the paid a big fee and didn't know + // beforehand. Fee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,9,rep,name=fee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"fee"` } @@ -326,7 +329,7 @@ func (m *MsgPutResponse) GetAmountReceived() string { type MsgTake struct { // owner is the owner of the basket tokens. Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - // basket_denom is the basket denom to take credits from. + // basket_denom is the basket bank denom to take credits from. BasketDenom string `protobuf:"bytes,2,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` // amount is the integer number of basket tokens to convert into credits. Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` @@ -467,52 +470,52 @@ func init() { } var fileDescriptor_a60f962a3c61f018 = []byte{ - // 712 bytes of a gzipped FileDescriptorProto + // 710 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4f, 0x4f, 0xdb, 0x48, 0x14, 0x8f, 0x31, 0x24, 0x64, 0xc2, 0x86, 0xc5, 0xa0, 0x95, 0xc9, 0x21, 0x04, 0x8b, 0x15, 0xd9, - 0xd5, 0x62, 0x6f, 0x58, 0x69, 0xa5, 0xd5, 0x5e, 0x16, 0xc2, 0x71, 0xd3, 0x22, 0x93, 0xf6, 0x50, - 0xb5, 0xb2, 0x26, 0xf6, 0xc3, 0xb5, 0x62, 0xcf, 0x44, 0x9e, 0x71, 0x80, 0x7b, 0x3f, 0x00, 0x1f, - 0xa0, 0x9f, 0xa0, 0xb7, 0x7e, 0x0b, 0x8e, 0x1c, 0x7b, 0x6a, 0x2b, 0xf8, 0x22, 0xd5, 0xfc, 0x89, - 0x8b, 0x44, 0x1b, 0x2a, 0x4e, 0x9e, 0xf7, 0x7b, 0xbf, 0xf7, 0xe6, 0xbd, 0xdf, 0x7b, 0x63, 0xe4, - 0xe4, 0x10, 0x03, 0xf1, 0x20, 0xa4, 0x61, 0x0e, 0x51, 0xc2, 0xbd, 0x11, 0x66, 0x63, 0xe0, 0xde, - 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 0x57, 0x36, 0x15, 0x3e, 0xbc, 0x98, 0x80, 0xbc, - 0x75, 0x17, 0xad, 0xe2, 0x34, 0xa5, 0x67, 0x10, 0x05, 0x61, 0x8a, 0x19, 0x03, 0x66, 0xd7, 0x3a, - 0xa6, 0x20, 0x6a, 0xb8, 0xaf, 0x50, 0xeb, 0x3f, 0xd4, 0xcc, 0x12, 0x12, 0x30, 0x8e, 0x73, 0x1e, - 0x44, 0x98, 0x83, 0xbd, 0xdc, 0x31, 0xba, 0x8d, 0xfd, 0x96, 0xab, 0xe4, 0x77, 0x67, 0xf2, 0xbb, - 0xc3, 0x99, 0xfc, 0xfe, 0x4a, 0x96, 0x90, 0x13, 0x11, 0x70, 0x24, 0x14, 0x7b, 0x85, 0xcc, 0x53, - 0x00, 0xbb, 0xde, 0x31, 0xbb, 0x8d, 0xfd, 0x4d, 0x57, 0xa9, 0x2d, 0xa6, 0x0b, 0xae, 0x56, 0xdb, - 0xed, 0xd3, 0x84, 0x1c, 0xfe, 0x79, 0xf5, 0x71, 0xab, 0xf2, 0xee, 0xd3, 0x56, 0x37, 0x4e, 0xf8, - 0xeb, 0x62, 0xe4, 0x86, 0x34, 0xf3, 0xf4, 0x68, 0xd4, 0x67, 0x8f, 0x45, 0x63, 0x3d, 0x39, 0x11, - 0xc0, 0x7c, 0x91, 0xd7, 0xf9, 0x1b, 0xad, 0x95, 0xd3, 0xf1, 0x81, 0x4d, 0x28, 0x61, 0x52, 0x77, - 0x35, 0xec, 0x20, 0x02, 0x42, 0x33, 0x3d, 0xaa, 0x86, 0xc2, 0x8e, 0x04, 0xe4, 0xbc, 0x31, 0x50, - 0x75, 0xc0, 0xe2, 0xe3, 0x82, 0x5b, 0x1b, 0x68, 0x89, 0x9e, 0x11, 0x98, 0x4d, 0x54, 0x19, 0xf7, - 0x72, 0x2c, 0xdc, 0xcb, 0x61, 0x1d, 0xa0, 0x9a, 0xd2, 0x95, 0xd9, 0xa6, 0x6c, 0x6f, 0xd7, 0xfd, - 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d, 0xcb, 0x43, 0xeb, 0x6a, 0xdb, 0x32, 0x20, 0x3c, 0x48, 0x69, + 0x88, 0x79, 0x42, 0x89, 0xdc, 0xd0, 0xba, 0x6f, 0xfd, 0x70, 0x3d, 0xd7, 0x1e, 0x6b, 0x07, 0x35, + 0x15, 0x1a, 0x50, 0x12, 0x70, 0x3c, 0x9e, 0xad, 0xe9, 0x8a, 0x42, 0x5f, 0x12, 0x51, 0xa7, 0x33, + 0x44, 0xab, 0xba, 0xe4, 0xb2, 0xdf, 0x3b, 0x22, 0x1a, 0x8f, 0x13, 0x71, 0xff, 0x72, 0x01, 0x99, + 0x03, 0x16, 0x5b, 0x6f, 0x50, 0x55, 0x3f, 0xd3, 0x9d, 0x39, 0x39, 0xca, 0x75, 0x69, 0xfd, 0xf3, + 0x2b, 0xac, 0xb2, 0xd0, 0x13, 0x64, 0x8a, 0x6d, 0xd9, 0x9e, 0x1f, 0x74, 0x5c, 0xf0, 0xd6, 0x5f, + 0x0f, 0x52, 0xca, 0xa4, 0xaf, 0xd0, 0xa2, 0x1c, 0xa0, 0x33, 0x3f, 0x44, 0x70, 0x5a, 0x7f, 0x3f, + 0xcc, 0x99, 0xe5, 0x3d, 0xf4, 0xaf, 0x6e, 0xda, 0xc6, 0xf5, 0x4d, 0xdb, 0xf8, 0x76, 0xd3, 0x36, + 0x2e, 0x6f, 0xdb, 0x95, 0xeb, 0xdb, 0x76, 0xe5, 0xf3, 0x6d, 0xbb, 0xf2, 0xfa, 0xc9, 0x9d, 0xf7, + 0x25, 0xf3, 0xed, 0x11, 0xe0, 0x67, 0x34, 0x1f, 0x6b, 0x2b, 0x85, 0x28, 0x86, 0xdc, 0x3b, 0xbf, + 0xf7, 0xe3, 0x1c, 0x55, 0xe5, 0x5b, 0xff, 0xef, 0x7b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xec, 0xcf, + 0xd0, 0x67, 0xcf, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/ecocredit/basket/types.pb.go b/x/ecocredit/basket/types.pb.go index 63300e0fb3..c32674ae43 100644 --- a/x/ecocredit/basket/types.pb.go +++ b/x/ecocredit/basket/types.pb.go @@ -96,12 +96,12 @@ var fileDescriptor_e6c256e957c69c4d = []byte{ 0xe7, 0xe2, 0x71, 0x02, 0x73, 0x9c, 0xc1, 0x32, 0x42, 0xf2, 0x5c, 0xdc, 0x49, 0x89, 0x25, 0xc9, 0x19, 0xf1, 0x29, 0xa9, 0x79, 0xf9, 0xb9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x5c, 0x60, 0x21, 0x17, 0x90, 0x88, 0x90, 0x18, 0x17, 0x5b, 0x62, 0x6e, 0x7e, 0x69, 0x5e, 0x89, 0x04, 0x13, - 0x58, 0x0e, 0xca, 0x73, 0x0a, 0x3d, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, + 0x58, 0x0e, 0xca, 0x73, 0x0a, 0x3a, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, - 0xeb, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xb0, 0x43, 0x74, 0xf3, + 0x8b, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xb0, 0x43, 0x74, 0xf3, 0x52, 0x4b, 0xca, 0xf3, 0x8b, 0xb2, 0xa1, 0xbc, 0x9c, 0xd4, 0x94, 0xf4, 0xd4, 0x22, 0xfd, 0x0a, - 0x6c, 0xde, 0x48, 0x62, 0x03, 0xfb, 0xc0, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x05, 0xe9, 0x93, - 0x63, 0xea, 0x00, 0x00, 0x00, + 0x0c, 0x6f, 0x24, 0xb1, 0x81, 0x9d, 0x6f, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x71, 0xfc, + 0x2f, 0xe7, 0x00, 0x00, 0x00, } func (m *BasketCredit) Marshal() (dAtA []byte, err error) {