From 1972a2325061ca9b0deece22e10d030f93e36424 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Thu, 13 Jun 2024 21:33:21 +0000 Subject: [PATCH 1/8] Revert Proto to original --- proto/market/drop.proto | 28 +- proto/market/pool.proto | 1 - x/market/migrations/v1/types/drop.pb.go | 955 -------------------- x/market/migrations/v1/types/pool.pb.go | 1066 ----------------------- 4 files changed, 3 insertions(+), 2047 deletions(-) delete mode 100644 x/market/migrations/v1/types/drop.pb.go delete mode 100644 x/market/migrations/v1/types/pool.pb.go diff --git a/proto/market/drop.proto b/proto/market/drop.proto index c4700ffc..d60b0176 100644 --- a/proto/market/drop.proto +++ b/proto/market/drop.proto @@ -11,37 +11,15 @@ message Drop { uint64 uid = 1; string owner = 2; string pair = 3; - bool active = 4; - string drops = 5 [ + string drops = 4 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; - int64 time_beg = 6; - string coin1_beg = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; - string coin2_beg = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; - string product_beg = 9 [ + string product = 5 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false - ]; - int64 time_end = 10; - string coin1_end = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; - string coin2_end = 12 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false ]; - string product_end = 13 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; + bool active = 6; } message Drops { diff --git a/proto/market/pool.proto b/proto/market/pool.proto index b5640274..8c828462 100644 --- a/proto/market/pool.proto +++ b/proto/market/pool.proto @@ -19,7 +19,6 @@ message Pool { (gogoproto.nullable) = false ]; uint64 history = 8; - uint64 last_drop = 9; } message Leader { diff --git a/x/market/migrations/v1/types/drop.pb.go b/x/market/migrations/v1/types/drop.pb.go deleted file mode 100644 index 0a8863e8..00000000 --- a/x/market/migrations/v1/types/drop.pb.go +++ /dev/null @@ -1,955 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: market/drop.proto - -package types - -import ( - fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - 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 - -type Drop struct { - Uid uint64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` - Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` - Pair string `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - Drops github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=drops,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"drops"` - Product github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=product,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"product"` - Active bool `protobuf:"varint,6,opt,name=active,proto3" json:"active,omitempty"` -} - -func (m *Drop) Reset() { *m = Drop{} } -func (m *Drop) String() string { return proto.CompactTextString(m) } -func (*Drop) ProtoMessage() {} -func (*Drop) Descriptor() ([]byte, []int) { - return fileDescriptor_3961bee11a1276cb, []int{0} -} -func (m *Drop) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Drop) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Drop.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 *Drop) XXX_Merge(src proto.Message) { - xxx_messageInfo_Drop.Merge(m, src) -} -func (m *Drop) XXX_Size() int { - return m.Size() -} -func (m *Drop) XXX_DiscardUnknown() { - xxx_messageInfo_Drop.DiscardUnknown(m) -} - -var xxx_messageInfo_Drop proto.InternalMessageInfo - -type Drops struct { - Uids []uint64 `protobuf:"varint,1,rep,packed,name=uids,proto3" json:"uids,omitempty"` - Sum github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=sum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"sum"` -} - -func (m *Drops) Reset() { *m = Drops{} } -func (m *Drops) String() string { return proto.CompactTextString(m) } -func (*Drops) ProtoMessage() {} -func (*Drops) Descriptor() ([]byte, []int) { - return fileDescriptor_3961bee11a1276cb, []int{1} -} -func (m *Drops) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Drops) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Drops.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 *Drops) XXX_Merge(src proto.Message) { - xxx_messageInfo_Drops.Merge(m, src) -} -func (m *Drops) XXX_Size() int { - return m.Size() -} -func (m *Drops) XXX_DiscardUnknown() { - xxx_messageInfo_Drops.DiscardUnknown(m) -} - -var xxx_messageInfo_Drops proto.InternalMessageInfo - -type DropPairs struct { - Pairs []string `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs,omitempty"` -} - -func (m *DropPairs) Reset() { *m = DropPairs{} } -func (m *DropPairs) String() string { return proto.CompactTextString(m) } -func (*DropPairs) ProtoMessage() {} -func (*DropPairs) Descriptor() ([]byte, []int) { - return fileDescriptor_3961bee11a1276cb, []int{2} -} -func (m *DropPairs) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DropPairs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DropPairs.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 *DropPairs) XXX_Merge(src proto.Message) { - xxx_messageInfo_DropPairs.Merge(m, src) -} -func (m *DropPairs) XXX_Size() int { - return m.Size() -} -func (m *DropPairs) XXX_DiscardUnknown() { - xxx_messageInfo_DropPairs.DiscardUnknown(m) -} - -var xxx_messageInfo_DropPairs proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Drop)(nil), "pendulumlabs.market.market.Drop") - proto.RegisterType((*Drops)(nil), "pendulumlabs.market.market.Drops") - proto.RegisterType((*DropPairs)(nil), "pendulumlabs.market.market.DropPairs") -} - -func init() { proto.RegisterFile("market/drop.proto", fileDescriptor_3961bee11a1276cb) } - -var fileDescriptor_3961bee11a1276cb = []byte{ - // 331 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x51, 0xbd, 0x6e, 0xf2, 0x30, - 0x14, 0x8d, 0xbf, 0x24, 0x7c, 0xe5, 0x4e, 0xad, 0x85, 0x2a, 0x8b, 0xc1, 0xa4, 0x0c, 0x55, 0x16, - 0x92, 0xa1, 0x2f, 0x50, 0x21, 0x86, 0x76, 0x43, 0x19, 0x2b, 0x75, 0x08, 0x49, 0x44, 0x23, 0x08, - 0xb6, 0xfc, 0xd3, 0x9f, 0xb7, 0xe8, 0x63, 0x31, 0x32, 0xa2, 0x0e, 0xa8, 0xc0, 0xd6, 0xa7, 0xa8, - 0x6c, 0x07, 0xa9, 0x6b, 0x3b, 0xdd, 0x73, 0xae, 0x7d, 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0x2b, 0xe8, - 0x9a, 0xf1, 0xd3, 0xbc, 0x16, 0xd2, 0x6c, 0xcf, 0xec, 0xc6, 0x79, 0x74, 0x33, 0x47, 0xc6, 0xd3, - 0xf5, 0x9e, 0x7a, 0xdb, 0x3d, 0x45, 0xeb, 0x03, 0x45, 0x9b, 0x03, 0x45, 0x9f, 0x07, 0x8a, 0xde, - 0x8f, 0xd4, 0xdb, 0x1c, 0xa9, 0xb7, 0x3d, 0x52, 0xef, 0x21, 0xf9, 0xe1, 0x78, 0x4a, 0x73, 0x64, - 0xe2, 0x4c, 0xdb, 0xb8, 0x5f, 0x4f, 0xc0, 0xba, 0xcf, 0x3a, 0x36, 0xc7, 0x9b, 0xef, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x3b, 0x24, 0x4e, 0x03, 0x0e, 0x02, 0x00, 0x00, -} - -func (m *Drop) 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 *Drop) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Drop) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Active { - i-- - if m.Active { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - { - size := m.Product.Size() - i -= size - if _, err := m.Product.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintDrop(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size := m.Drops.Size() - i -= size - if _, err := m.Drops.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintDrop(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if len(m.Pair) > 0 { - i -= len(m.Pair) - copy(dAtA[i:], m.Pair) - i = encodeVarintDrop(dAtA, i, uint64(len(m.Pair))) - i-- - dAtA[i] = 0x1a - } - if len(m.Owner) > 0 { - i -= len(m.Owner) - copy(dAtA[i:], m.Owner) - i = encodeVarintDrop(dAtA, i, uint64(len(m.Owner))) - i-- - dAtA[i] = 0x12 - } - if m.Uid != 0 { - i = encodeVarintDrop(dAtA, i, uint64(m.Uid)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Drops) 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 *Drops) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Drops) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Sum.Size() - i -= size - if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintDrop(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Uids) > 0 { - dAtA2 := make([]byte, len(m.Uids)*10) - var j1 int - for _, num := range m.Uids { - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ - } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) - i = encodeVarintDrop(dAtA, i, uint64(j1)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DropPairs) 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 *DropPairs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DropPairs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Pairs) > 0 { - for iNdEx := len(m.Pairs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Pairs[iNdEx]) - copy(dAtA[i:], m.Pairs[iNdEx]) - i = encodeVarintDrop(dAtA, i, uint64(len(m.Pairs[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintDrop(dAtA []byte, offset int, v uint64) int { - offset -= sovDrop(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Drop) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Uid != 0 { - n += 1 + sovDrop(uint64(m.Uid)) - } - l = len(m.Owner) - if l > 0 { - n += 1 + l + sovDrop(uint64(l)) - } - l = len(m.Pair) - if l > 0 { - n += 1 + l + sovDrop(uint64(l)) - } - l = m.Drops.Size() - n += 1 + l + sovDrop(uint64(l)) - l = m.Product.Size() - n += 1 + l + sovDrop(uint64(l)) - if m.Active { - n += 2 - } - return n -} - -func (m *Drops) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Uids) > 0 { - l = 0 - for _, e := range m.Uids { - l += sovDrop(uint64(e)) - } - n += 1 + sovDrop(uint64(l)) + l - } - l = m.Sum.Size() - n += 1 + l + sovDrop(uint64(l)) - return n -} - -func (m *DropPairs) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Pairs) > 0 { - for _, s := range m.Pairs { - l = len(s) - n += 1 + l + sovDrop(uint64(l)) - } - } - return n -} - -func sovDrop(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozDrop(x uint64) (n int) { - return sovDrop(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Drop) 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 ErrIntOverflowDrop - } - 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: Drop: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Drop: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType) - } - m.Uid = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Uid |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - 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 ErrIntOverflowDrop - } - 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 ErrInvalidLengthDrop - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDrop - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pair", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - 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 ErrInvalidLengthDrop - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDrop - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pair = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Drops", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - 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 ErrInvalidLengthDrop - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDrop - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Drops.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Product", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - 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 ErrInvalidLengthDrop - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDrop - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Product.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Active = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipDrop(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDrop - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Drops) 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 ErrIntOverflowDrop - } - 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: Drops: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Drops: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Uids = append(m.Uids, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthDrop - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthDrop - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Uids) == 0 { - m.Uids = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Uids = append(m.Uids, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Uids", wireType) - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - 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 ErrInvalidLengthDrop - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDrop - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Sum.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDrop(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDrop - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DropPairs) 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 ErrIntOverflowDrop - } - 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: DropPairs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DropPairs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pairs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - 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 ErrInvalidLengthDrop - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDrop - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pairs = append(m.Pairs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDrop(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDrop - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipDrop(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, ErrIntOverflowDrop - } - 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, ErrIntOverflowDrop - } - 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, ErrIntOverflowDrop - } - 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, ErrInvalidLengthDrop - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupDrop - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthDrop - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthDrop = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDrop = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupDrop = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/market/migrations/v1/types/pool.pb.go b/x/market/migrations/v1/types/pool.pb.go deleted file mode 100644 index 9155701a..00000000 --- a/x/market/migrations/v1/types/pool.pb.go +++ /dev/null @@ -1,1066 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: market/pool.proto - -package types - -import ( - fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - 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 - -type Pool struct { - Pair string `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` - Denom1 string `protobuf:"bytes,2,opt,name=denom1,proto3" json:"denom1,omitempty"` - Denom2 string `protobuf:"bytes,3,opt,name=denom2,proto3" json:"denom2,omitempty"` - Volume1 *Volume `protobuf:"bytes,4,opt,name=volume1,proto3" json:"volume1,omitempty"` - Volume2 *Volume `protobuf:"bytes,5,opt,name=volume2,proto3" json:"volume2,omitempty"` - Leaders []*Leader `protobuf:"bytes,6,rep,name=leaders,proto3" json:"leaders,omitempty"` - Drops github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=drops,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"drops"` - History uint64 `protobuf:"varint,8,opt,name=history,proto3" json:"history,omitempty"` -} - -func (m *Pool) Reset() { *m = Pool{} } -func (m *Pool) String() string { return proto.CompactTextString(m) } -func (*Pool) ProtoMessage() {} -func (*Pool) Descriptor() ([]byte, []int) { - return fileDescriptor_adb392bd01694df9, []int{0} -} -func (m *Pool) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Pool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Pool.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 *Pool) XXX_Merge(src proto.Message) { - xxx_messageInfo_Pool.Merge(m, src) -} -func (m *Pool) XXX_Size() int { - return m.Size() -} -func (m *Pool) XXX_DiscardUnknown() { - xxx_messageInfo_Pool.DiscardUnknown(m) -} - -var xxx_messageInfo_Pool proto.InternalMessageInfo - -type Leader struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Drops github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=drops,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"drops"` -} - -func (m *Leader) Reset() { *m = Leader{} } -func (m *Leader) String() string { return proto.CompactTextString(m) } -func (*Leader) ProtoMessage() {} -func (*Leader) Descriptor() ([]byte, []int) { - return fileDescriptor_adb392bd01694df9, []int{1} -} -func (m *Leader) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Leader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Leader.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 *Leader) XXX_Merge(src proto.Message) { - xxx_messageInfo_Leader.Merge(m, src) -} -func (m *Leader) XXX_Size() int { - return m.Size() -} -func (m *Leader) XXX_DiscardUnknown() { - xxx_messageInfo_Leader.DiscardUnknown(m) -} - -var xxx_messageInfo_Leader proto.InternalMessageInfo - -type Volume struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` -} - -func (m *Volume) Reset() { *m = Volume{} } -func (m *Volume) String() string { return proto.CompactTextString(m) } -func (*Volume) ProtoMessage() {} -func (*Volume) Descriptor() ([]byte, []int) { - return fileDescriptor_adb392bd01694df9, []int{2} -} -func (m *Volume) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Volume) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Volume.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 *Volume) XXX_Merge(src proto.Message) { - xxx_messageInfo_Volume.Merge(m, src) -} -func (m *Volume) XXX_Size() int { - return m.Size() -} -func (m *Volume) XXX_DiscardUnknown() { - xxx_messageInfo_Volume.DiscardUnknown(m) -} - -var xxx_messageInfo_Volume proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Pool)(nil), "pendulumlabs.market.market.Pool") - proto.RegisterType((*Leader)(nil), "pendulumlabs.market.market.Leader") - proto.RegisterType((*Volume)(nil), "pendulumlabs.market.market.Volume") -} - -func init() { proto.RegisterFile("market/pool.proto", fileDescriptor_adb392bd01694df9) } - -var fileDescriptor_adb392bd01694df9 = []byte{ - // 366 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0x31, 0x4f, 0xc2, 0x40, - 0x14, 0xc7, 0x7b, 0x50, 0x8a, 0x9e, 0x93, 0x17, 0x62, 0x2e, 0x0c, 0x47, 0xd3, 0xc1, 0xb0, 0x70, - 0x0d, 0x75, 0x75, 0x22, 0xc6, 0xc4, 0xc4, 0x81, 0x74, 0x70, 0x70, 0x2b, 0xf4, 0x04, 0x42, 0xdb, - 0xd7, 0xf4, 0x5a, 0x23, 0xdf, 0xc2, 0x8f, 0xc5, 0xc8, 0x48, 0x1c, 0x88, 0x80, 0x1f, 0xc4, 0xf4, - 0xda, 0x0a, 0x8b, 0x31, 0xea, 0x74, 0xef, 0xbd, 0xfe, 0x7f, 0xf7, 0x7f, 0xbd, 0xf7, 0xf0, 0x79, - 0xe8, 0x25, 0x73, 0x91, 0xda, 0x31, 0x40, 0xc0, 0xe3, 0x04, 0x52, 0x20, 0xed, 0x58, 0x44, 0x7e, - 0x16, 0x64, 0x61, 0xe0, 0x8d, 0x24, 0x2f, 0xbe, 0x97, 0x47, 0xbb, 0x35, 0x81, 0x09, 0x28, 0x99, - 0x9d, 0x47, 0x05, 0x61, 0x7d, 0xd4, 0xb0, 0x3e, 0x04, 0x08, 0x08, 0xc1, 0x7a, 0xec, 0xcd, 0x12, - 0x8a, 0x4c, 0xd4, 0x3d, 0x75, 0x55, 0x4c, 0x2e, 0xb0, 0xe1, 0x8b, 0x08, 0xc2, 0x3e, 0xad, 0xa9, - 0x6a, 0x99, 0x7d, 0xd5, 0x1d, 0x5a, 0x3f, 0xaa, 0x3b, 0xe4, 0x1a, 0x37, 0x9f, 0x21, 0xc8, 0x42, - 0xd1, 0xa7, 0x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, 0xd4, 0xed, 0x23, 0x43, 0x6d, 0xe4, 0xd5, - 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xf2, 0x98, 0x47, 0xd8, 0x02, 0x00, 0x00, -} - -func (m *Pool) 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 *Pool) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.History != 0 { - i = encodeVarintPool(dAtA, i, uint64(m.History)) - i-- - dAtA[i] = 0x40 - } - { - size := m.Drops.Size() - i -= size - if _, err := m.Drops.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - if len(m.Leaders) > 0 { - for iNdEx := len(m.Leaders) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Leaders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if m.Volume2 != nil { - { - size, err := m.Volume2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.Volume1 != nil { - { - size, err := m.Volume1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Denom2) > 0 { - i -= len(m.Denom2) - copy(dAtA[i:], m.Denom2) - i = encodeVarintPool(dAtA, i, uint64(len(m.Denom2))) - i-- - dAtA[i] = 0x1a - } - if len(m.Denom1) > 0 { - i -= len(m.Denom1) - copy(dAtA[i:], m.Denom1) - i = encodeVarintPool(dAtA, i, uint64(len(m.Denom1))) - i-- - dAtA[i] = 0x12 - } - if len(m.Pair) > 0 { - i -= len(m.Pair) - copy(dAtA[i:], m.Pair) - i = encodeVarintPool(dAtA, i, uint64(len(m.Pair))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Leader) 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 *Leader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Leader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Drops.Size() - i -= size - if _, err := m.Drops.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintPool(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Volume) 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 *Volume) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Volume) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintPool(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintPool(dAtA []byte, offset int, v uint64) int { - offset -= sovPool(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Pool) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Pair) - if l > 0 { - n += 1 + l + sovPool(uint64(l)) - } - l = len(m.Denom1) - if l > 0 { - n += 1 + l + sovPool(uint64(l)) - } - l = len(m.Denom2) - if l > 0 { - n += 1 + l + sovPool(uint64(l)) - } - if m.Volume1 != nil { - l = m.Volume1.Size() - n += 1 + l + sovPool(uint64(l)) - } - if m.Volume2 != nil { - l = m.Volume2.Size() - n += 1 + l + sovPool(uint64(l)) - } - if len(m.Leaders) > 0 { - for _, e := range m.Leaders { - l = e.Size() - n += 1 + l + sovPool(uint64(l)) - } - } - l = m.Drops.Size() - n += 1 + l + sovPool(uint64(l)) - if m.History != 0 { - n += 1 + sovPool(uint64(m.History)) - } - return n -} - -func (m *Leader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovPool(uint64(l)) - } - l = m.Drops.Size() - n += 1 + l + sovPool(uint64(l)) - return n -} - -func (m *Volume) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovPool(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovPool(uint64(l)) - return n -} - -func sovPool(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozPool(x uint64) (n int) { - return sovPool(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Pool) 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 ErrIntOverflowPool - } - 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: Pool: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Pool: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pair", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pair = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom1 = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom2", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom2 = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Volume1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Volume1 == nil { - m.Volume1 = &Volume{} - } - if err := m.Volume1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Volume2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Volume2 == nil { - m.Volume2 = &Volume{} - } - if err := m.Volume2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Leaders", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Leaders = append(m.Leaders, &Leader{}) - if err := m.Leaders[len(m.Leaders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Drops", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Drops.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field History", wireType) - } - m.History = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.History |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Leader) 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 ErrIntOverflowPool - } - 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: Leader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Leader: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Drops", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Drops.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Volume) 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 ErrIntOverflowPool - } - 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: Volume: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Volume: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - 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 ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipPool(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, ErrIntOverflowPool - } - 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, ErrIntOverflowPool - } - 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, ErrIntOverflowPool - } - 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, ErrInvalidLengthPool - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupPool - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthPool - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthPool = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPool = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupPool = fmt.Errorf("proto: unexpected end of group") -) From df914e8fe96050025a20cfc1cd2f50507a8730bb Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Thu, 13 Jun 2024 16:41:35 -0500 Subject: [PATCH 2/8] Revert proto generated files --- docs/static/openapi.yml | 257 +---------- .../pendulumlabs.market.market/index.ts | 64 +-- .../module/index.ts | 18 +- .../pendulumlabs.market.market/module/rest.ts | 36 +- .../cosmos/base/query/v1beta1/pagination.ts | 30 +- .../module/types/market/drop.ts | 187 ++------ .../module/types/market/pool.ts | 19 - x/market/types/drop.pb.go | 398 +++--------------- x/market/types/pool.pb.go | 94 ++--- 9 files changed, 170 insertions(+), 933 deletions(-) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 4ec1468d..70e02768 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -28918,16 +28918,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/pendulum-labs/market/market/bookends/{coinA}/{coinB}/{orderType}/{rate}': @@ -29142,16 +29132,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/pendulum-labs/market/market/burnings/{denom}': @@ -29218,28 +29198,12 @@ paths: type: string pair: type: string - active: - type: boolean drops: type: string - time_beg: - type: string - format: int64 - coin1_beg: - type: string - coin2_beg: - type: string - product_beg: - type: string - time_end: - type: string - format: int64 - coin1_end: - type: string - coin2_end: - type: string - product_end: + product: type: string + active: + type: boolean pagination: type: object properties: @@ -29332,16 +29296,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/pendulum-labs/market/market/drop/amounts/{uid}': @@ -29547,28 +29501,12 @@ paths: type: string pair: type: string - active: - type: boolean drops: type: string - time_beg: - type: string - format: int64 - coin1_beg: - type: string - coin2_beg: - type: string - product_beg: - type: string - time_end: - type: string - format: int64 - coin1_end: - type: string - coin2_end: - type: string - product_end: + product: type: string + active: + type: boolean pagination: type: object properties: @@ -29669,16 +29607,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/pendulum-labs/market/market/drop/{uid}': @@ -29701,28 +29629,12 @@ paths: type: string pair: type: string - active: - type: boolean drops: type: string - time_beg: - type: string - format: int64 - coin1_beg: - type: string - coin2_beg: - type: string - product_beg: - type: string - time_end: - type: string - format: int64 - coin1_end: - type: string - coin2_end: - type: string - product_end: + product: type: string + active: + type: boolean default: description: An unexpected error response. schema: @@ -29895,16 +29807,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query /pendulum-labs/market/market/member: @@ -30030,16 +29932,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/pendulum-labs/market/market/member/{denomA}/{denomB}': @@ -30238,16 +30130,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/pendulum-labs/market/market/order/uids/{address}': @@ -30364,16 +30246,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/pendulum-labs/market/market/order/{address}': @@ -30518,16 +30390,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/pendulum-labs/market/market/order/{uid}': @@ -30702,9 +30564,6 @@ paths: history: type: string format: uint64 - last_drop: - type: string - format: uint64 pagination: type: object properties: @@ -30797,16 +30656,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/pendulum-labs/market/market/pool/{pair}': @@ -30856,9 +30705,6 @@ paths: history: type: string format: uint64 - last_drop: - type: string - format: uint64 default: description: An unexpected error response. schema: @@ -31046,16 +30892,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/pendulum-labs/market/market/volume/{denom}': @@ -50282,28 +50118,12 @@ definitions: type: string pair: type: string - active: - type: boolean drops: type: string - time_beg: - type: string - format: int64 - coin1_beg: - type: string - coin2_beg: - type: string - product_beg: - type: string - time_end: - type: string - format: int64 - coin1_end: - type: string - coin2_end: - type: string - product_end: + product: type: string + active: + type: boolean pendulumlabs.market.market.Leader: type: object properties: @@ -50536,9 +50356,6 @@ definitions: history: type: string format: uint64 - last_drop: - type: string - format: uint64 pendulumlabs.market.market.QueryAllBurningsResponse: type: object properties: @@ -50667,9 +50484,6 @@ definitions: history: type: string format: uint64 - last_drop: - type: string - format: uint64 pagination: type: object properties: @@ -50860,28 +50674,12 @@ definitions: type: string pair: type: string - active: - type: boolean drops: type: string - time_beg: - type: string - format: int64 - coin1_beg: - type: string - coin2_beg: - type: string - product_beg: - type: string - time_end: - type: string - format: int64 - coin1_end: - type: string - coin2_end: - type: string - product_end: + product: type: string + active: + type: boolean pendulumlabs.market.market.QueryDropsResponse: type: object properties: @@ -50897,28 +50695,12 @@ definitions: type: string pair: type: string - active: - type: boolean drops: type: string - time_beg: - type: string - format: int64 - coin1_beg: - type: string - coin2_beg: - type: string - product_beg: - type: string - time_end: - type: string - format: int64 - coin1_end: - type: string - coin2_end: - type: string - product_end: + product: type: string + active: + type: boolean pagination: type: object properties: @@ -51027,9 +50809,6 @@ definitions: history: type: string format: uint64 - last_drop: - type: string - format: uint64 pendulumlabs.market.market.QueryHistoryResponse: type: object properties: diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts index da870fd6..008f3b41 100755 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts @@ -915,18 +915,18 @@ export default { }, - async sendMsgCreateDrop({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgRedeemDrop({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateDrop(value) + const msg = await txClient.msgRedeemDrop(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateDrop:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateDrop:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgRedeemDrop:Send Could not broadcast Tx: '+ e.message) } } }, @@ -945,33 +945,33 @@ export default { } } }, - async sendMsgCreateOrder({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateDrop({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateOrder(value) + const msg = await txClient.msgCreateDrop(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateDrop:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateOrder:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateDrop:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgCancelOrder({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateOrder({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCancelOrder(value) + const msg = await txClient.msgCreateOrder(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCancelOrder:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateOrder:Send Could not broadcast Tx: '+ e.message) } } }, @@ -990,32 +990,32 @@ export default { } } }, - async sendMsgRedeemDrop({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCancelOrder({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgRedeemDrop(value) + const msg = await txClient.msgCancelOrder(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgRedeemDrop:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCancelOrder:Send Could not broadcast Tx: '+ e.message) } } }, - async MsgCreateDrop({ rootGetters }, { value }) { + async MsgRedeemDrop({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateDrop(value) + const msg = await txClient.msgRedeemDrop(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateDrop:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreateDrop:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgRedeemDrop:Create Could not create message: ' + e.message) } } }, @@ -1032,29 +1032,29 @@ export default { } } }, - async MsgCreateOrder({ rootGetters }, { value }) { + async MsgCreateDrop({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateOrder(value) + const msg = await txClient.msgCreateDrop(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateDrop:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreateOrder:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateDrop:Create Could not create message: ' + e.message) } } }, - async MsgCancelOrder({ rootGetters }, { value }) { + async MsgCreateOrder({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCancelOrder(value) + const msg = await txClient.msgCreateOrder(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCancelOrder:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateOrder:Create Could not create message: ' + e.message) } } }, @@ -1071,16 +1071,16 @@ export default { } } }, - async MsgRedeemDrop({ rootGetters }, { value }) { + async MsgCancelOrder({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgRedeemDrop(value) + const msg = await txClient.msgCancelOrder(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgRedeemDrop:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCancelOrder:Create Could not create message: ' + e.message) } } }, diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts index 6bf2ded3..f9168b56 100755 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts @@ -4,21 +4,21 @@ import { StdFee } from "@cosmjs/launchpad"; import { SigningStargateClient } from "@cosmjs/stargate"; import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { Api } from "./rest"; -import { MsgCreateDrop } from "./types/market/tx"; +import { MsgRedeemDrop } from "./types/market/tx"; import { MsgMarketOrder } from "./types/market/tx"; +import { MsgCreateDrop } from "./types/market/tx"; import { MsgCreateOrder } from "./types/market/tx"; -import { MsgCancelOrder } from "./types/market/tx"; import { MsgCreatePool } from "./types/market/tx"; -import { MsgRedeemDrop } from "./types/market/tx"; +import { MsgCancelOrder } from "./types/market/tx"; const types = [ - ["/pendulumlabs.market.market.MsgCreateDrop", MsgCreateDrop], + ["/pendulumlabs.market.market.MsgRedeemDrop", MsgRedeemDrop], ["/pendulumlabs.market.market.MsgMarketOrder", MsgMarketOrder], + ["/pendulumlabs.market.market.MsgCreateDrop", MsgCreateDrop], ["/pendulumlabs.market.market.MsgCreateOrder", MsgCreateOrder], - ["/pendulumlabs.market.market.MsgCancelOrder", MsgCancelOrder], ["/pendulumlabs.market.market.MsgCreatePool", MsgCreatePool], - ["/pendulumlabs.market.market.MsgRedeemDrop", MsgRedeemDrop], + ["/pendulumlabs.market.market.MsgCancelOrder", MsgCancelOrder], ]; export const MissingWalletError = new Error("wallet is required"); @@ -51,12 +51,12 @@ const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = return { signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgCreateDrop: (data: MsgCreateDrop): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreateDrop", value: MsgCreateDrop.fromPartial( data ) }), + msgRedeemDrop: (data: MsgRedeemDrop): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgRedeemDrop", value: MsgRedeemDrop.fromPartial( data ) }), msgMarketOrder: (data: MsgMarketOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgMarketOrder", value: MsgMarketOrder.fromPartial( data ) }), + msgCreateDrop: (data: MsgCreateDrop): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreateDrop", value: MsgCreateDrop.fromPartial( data ) }), msgCreateOrder: (data: MsgCreateOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreateOrder", value: MsgCreateOrder.fromPartial( data ) }), - msgCancelOrder: (data: MsgCancelOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCancelOrder", value: MsgCancelOrder.fromPartial( data ) }), msgCreatePool: (data: MsgCreatePool): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreatePool", value: MsgCreatePool.fromPartial( data ) }), - msgRedeemDrop: (data: MsgRedeemDrop): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgRedeemDrop", value: MsgRedeemDrop.fromPartial( data ) }), + msgCancelOrder: (data: MsgCancelOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCancelOrder", value: MsgCancelOrder.fromPartial( data ) }), }; }; diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts index 1d1e2d5a..3a5c96b7 100644 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts @@ -316,20 +316,9 @@ export interface MarketmarketDrop { uid?: string; owner?: string; pair?: string; - active?: boolean; drops?: string; - - /** @format int64 */ - time_beg?: string; - coin1_beg?: string; - coin2_beg?: string; - product_beg?: string; - - /** @format int64 */ - time_end?: string; - coin1_end?: string; - coin2_end?: string; - product_end?: string; + product?: string; + active?: boolean; } export interface MarketmarketMember { @@ -391,9 +380,6 @@ export interface MarketmarketPool { /** @format uint64 */ history?: string; - - /** @format uint64 */ - last_drop?: string; } export interface MarketmarketVolume { @@ -449,13 +435,6 @@ export interface V1Beta1PageRequest { * is set. */ count_total?: boolean; - - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse?: boolean; } /** @@ -688,7 +667,6 @@ export class Api extends HttpClient @@ -746,7 +724,6 @@ export class Api extends HttpClient @@ -788,7 +765,6 @@ export class Api extends HttpClient @@ -880,7 +856,6 @@ export class Api extends HttpClient @@ -924,7 +899,6 @@ export class Api extends HttpClient @@ -950,7 +924,6 @@ export class Api extends HttpClient @@ -992,7 +965,6 @@ export class Api extends HttpClient @@ -1019,7 +991,6 @@ export class Api extends HttpClient @@ -1046,7 +1017,6 @@ export class Api extends HttpClient @@ -1104,7 +1074,6 @@ export class Api extends HttpClient @@ -1162,7 +1131,6 @@ export class Api extends HttpClient diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/cosmos/base/query/v1beta1/pagination.ts index 9c87ac0c..0bc568f4 100644 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/cosmos/base/query/v1beta1/pagination.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/cosmos/base/query/v1beta1/pagination.ts @@ -38,12 +38,6 @@ export interface PageRequest { * is set. */ count_total: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; } /** @@ -68,12 +62,7 @@ export interface PageResponse { total: number; } -const basePageRequest: object = { - offset: 0, - limit: 0, - count_total: false, - reverse: false, -}; +const basePageRequest: object = { offset: 0, limit: 0, count_total: false }; export const PageRequest = { encode(message: PageRequest, writer: Writer = Writer.create()): Writer { @@ -89,9 +78,6 @@ export const PageRequest = { if (message.count_total === true) { writer.uint32(32).bool(message.count_total); } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } return writer; }, @@ -114,9 +100,6 @@ export const PageRequest = { case 4: message.count_total = reader.bool(); break; - case 5: - message.reverse = reader.bool(); - break; default: reader.skipType(tag & 7); break; @@ -145,11 +128,6 @@ export const PageRequest = { } else { message.count_total = false; } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } else { - message.reverse = false; - } return message; }, @@ -163,7 +141,6 @@ export const PageRequest = { message.limit !== undefined && (obj.limit = message.limit); message.count_total !== undefined && (obj.count_total = message.count_total); - message.reverse !== undefined && (obj.reverse = message.reverse); return obj; }, @@ -189,11 +166,6 @@ export const PageRequest = { } else { message.count_total = false; } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } else { - message.reverse = false; - } return message; }, }; diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/drop.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/drop.ts index f7fac3e0..92dcfafc 100644 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/drop.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/drop.ts @@ -8,16 +8,9 @@ export interface Drop { uid: number; owner: string; pair: string; - active: boolean; drops: string; - time_beg: number; - coin1_beg: string; - coin2_beg: string; - product_beg: string; - time_end: number; - coin1_end: string; - coin2_end: string; - product_end: string; + product: string; + active: boolean; } export interface Drops { @@ -33,16 +26,9 @@ const baseDrop: object = { uid: 0, owner: "", pair: "", - active: false, drops: "", - time_beg: 0, - coin1_beg: "", - coin2_beg: "", - product_beg: "", - time_end: 0, - coin1_end: "", - coin2_end: "", - product_end: "", + product: "", + active: false, }; export const Drop = { @@ -56,35 +42,14 @@ export const Drop = { if (message.pair !== "") { writer.uint32(26).string(message.pair); } - if (message.active === true) { - writer.uint32(32).bool(message.active); - } if (message.drops !== "") { - writer.uint32(42).string(message.drops); - } - if (message.time_beg !== 0) { - writer.uint32(48).int64(message.time_beg); - } - if (message.coin1_beg !== "") { - writer.uint32(58).string(message.coin1_beg); - } - if (message.coin2_beg !== "") { - writer.uint32(66).string(message.coin2_beg); + writer.uint32(34).string(message.drops); } - if (message.product_beg !== "") { - writer.uint32(74).string(message.product_beg); + if (message.product !== "") { + writer.uint32(42).string(message.product); } - if (message.time_end !== 0) { - writer.uint32(80).int64(message.time_end); - } - if (message.coin1_end !== "") { - writer.uint32(90).string(message.coin1_end); - } - if (message.coin2_end !== "") { - writer.uint32(98).string(message.coin2_end); - } - if (message.product_end !== "") { - writer.uint32(106).string(message.product_end); + if (message.active === true) { + writer.uint32(48).bool(message.active); } return writer; }, @@ -106,34 +71,13 @@ export const Drop = { message.pair = reader.string(); break; case 4: - message.active = reader.bool(); + message.drops = reader.string(); break; case 5: - message.drops = reader.string(); + message.product = reader.string(); break; case 6: - message.time_beg = longToNumber(reader.int64() as Long); - break; - case 7: - message.coin1_beg = reader.string(); - break; - case 8: - message.coin2_beg = reader.string(); - break; - case 9: - message.product_beg = reader.string(); - break; - case 10: - message.time_end = longToNumber(reader.int64() as Long); - break; - case 11: - message.coin1_end = reader.string(); - break; - case 12: - message.coin2_end = reader.string(); - break; - case 13: - message.product_end = reader.string(); + message.active = reader.bool(); break; default: reader.skipType(tag & 7); @@ -160,55 +104,20 @@ export const Drop = { } else { message.pair = ""; } - if (object.active !== undefined && object.active !== null) { - message.active = Boolean(object.active); - } else { - message.active = false; - } if (object.drops !== undefined && object.drops !== null) { message.drops = String(object.drops); } else { message.drops = ""; } - if (object.time_beg !== undefined && object.time_beg !== null) { - message.time_beg = Number(object.time_beg); - } else { - message.time_beg = 0; - } - if (object.coin1_beg !== undefined && object.coin1_beg !== null) { - message.coin1_beg = String(object.coin1_beg); - } else { - message.coin1_beg = ""; - } - if (object.coin2_beg !== undefined && object.coin2_beg !== null) { - message.coin2_beg = String(object.coin2_beg); + if (object.product !== undefined && object.product !== null) { + message.product = String(object.product); } else { - message.coin2_beg = ""; + message.product = ""; } - if (object.product_beg !== undefined && object.product_beg !== null) { - message.product_beg = String(object.product_beg); - } else { - message.product_beg = ""; - } - if (object.time_end !== undefined && object.time_end !== null) { - message.time_end = Number(object.time_end); - } else { - message.time_end = 0; - } - if (object.coin1_end !== undefined && object.coin1_end !== null) { - message.coin1_end = String(object.coin1_end); - } else { - message.coin1_end = ""; - } - if (object.coin2_end !== undefined && object.coin2_end !== null) { - message.coin2_end = String(object.coin2_end); - } else { - message.coin2_end = ""; - } - if (object.product_end !== undefined && object.product_end !== null) { - message.product_end = String(object.product_end); + if (object.active !== undefined && object.active !== null) { + message.active = Boolean(object.active); } else { - message.product_end = ""; + message.active = false; } return message; }, @@ -218,18 +127,9 @@ export const Drop = { message.uid !== undefined && (obj.uid = message.uid); message.owner !== undefined && (obj.owner = message.owner); message.pair !== undefined && (obj.pair = message.pair); - message.active !== undefined && (obj.active = message.active); message.drops !== undefined && (obj.drops = message.drops); - message.time_beg !== undefined && (obj.time_beg = message.time_beg); - message.coin1_beg !== undefined && (obj.coin1_beg = message.coin1_beg); - message.coin2_beg !== undefined && (obj.coin2_beg = message.coin2_beg); - message.product_beg !== undefined && - (obj.product_beg = message.product_beg); - message.time_end !== undefined && (obj.time_end = message.time_end); - message.coin1_end !== undefined && (obj.coin1_end = message.coin1_end); - message.coin2_end !== undefined && (obj.coin2_end = message.coin2_end); - message.product_end !== undefined && - (obj.product_end = message.product_end); + message.product !== undefined && (obj.product = message.product); + message.active !== undefined && (obj.active = message.active); return obj; }, @@ -250,55 +150,20 @@ export const Drop = { } else { message.pair = ""; } - if (object.active !== undefined && object.active !== null) { - message.active = object.active; - } else { - message.active = false; - } if (object.drops !== undefined && object.drops !== null) { message.drops = object.drops; } else { message.drops = ""; } - if (object.time_beg !== undefined && object.time_beg !== null) { - message.time_beg = object.time_beg; - } else { - message.time_beg = 0; - } - if (object.coin1_beg !== undefined && object.coin1_beg !== null) { - message.coin1_beg = object.coin1_beg; - } else { - message.coin1_beg = ""; - } - if (object.coin2_beg !== undefined && object.coin2_beg !== null) { - message.coin2_beg = object.coin2_beg; - } else { - message.coin2_beg = ""; - } - if (object.product_beg !== undefined && object.product_beg !== null) { - message.product_beg = object.product_beg; - } else { - message.product_beg = ""; - } - if (object.time_end !== undefined && object.time_end !== null) { - message.time_end = object.time_end; - } else { - message.time_end = 0; - } - if (object.coin1_end !== undefined && object.coin1_end !== null) { - message.coin1_end = object.coin1_end; - } else { - message.coin1_end = ""; - } - if (object.coin2_end !== undefined && object.coin2_end !== null) { - message.coin2_end = object.coin2_end; + if (object.product !== undefined && object.product !== null) { + message.product = object.product; } else { - message.coin2_end = ""; + message.product = ""; } - if (object.product_end !== undefined && object.product_end !== null) { - message.product_end = object.product_end; + if (object.active !== undefined && object.active !== null) { + message.active = object.active; } else { - message.product_end = ""; + message.active = false; } return message; }, diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/pool.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/pool.ts index 57ff2a21..72676705 100644 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/pool.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/pool.ts @@ -13,7 +13,6 @@ export interface Pool { leaders: Leader[]; drops: string; history: number; - last_drop: number; } export interface Leader { @@ -32,7 +31,6 @@ const basePool: object = { denom2: "", drops: "", history: 0, - last_drop: 0, }; export const Pool = { @@ -61,9 +59,6 @@ export const Pool = { if (message.history !== 0) { writer.uint32(64).uint64(message.history); } - if (message.last_drop !== 0) { - writer.uint32(72).uint64(message.last_drop); - } return writer; }, @@ -99,9 +94,6 @@ export const Pool = { case 8: message.history = longToNumber(reader.uint64() as Long); break; - case 9: - message.last_drop = longToNumber(reader.uint64() as Long); - break; default: reader.skipType(tag & 7); break; @@ -153,11 +145,6 @@ export const Pool = { } else { message.history = 0; } - if (object.last_drop !== undefined && object.last_drop !== null) { - message.last_drop = Number(object.last_drop); - } else { - message.last_drop = 0; - } return message; }, @@ -183,7 +170,6 @@ export const Pool = { } message.drops !== undefined && (obj.drops = message.drops); message.history !== undefined && (obj.history = message.history); - message.last_drop !== undefined && (obj.last_drop = message.last_drop); return obj; }, @@ -230,11 +216,6 @@ export const Pool = { } else { message.history = 0; } - if (object.last_drop !== undefined && object.last_drop !== null) { - message.last_drop = object.last_drop; - } else { - message.last_drop = 0; - } return message; }, }; diff --git a/x/market/types/drop.pb.go b/x/market/types/drop.pb.go index 86de0ee9..0a8863e8 100644 --- a/x/market/types/drop.pb.go +++ b/x/market/types/drop.pb.go @@ -25,19 +25,12 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Drop struct { - Uid uint64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` - Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` - Pair string `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - Active bool `protobuf:"varint,4,opt,name=active,proto3" json:"active,omitempty"` - Drops github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=drops,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"drops"` - TimeBeg int64 `protobuf:"varint,6,opt,name=time_beg,json=timeBeg,proto3" json:"time_beg,omitempty"` - Coin1Beg github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,7,opt,name=coin1_beg,json=coin1Beg,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"coin1_beg"` - Coin2Beg github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,8,opt,name=coin2_beg,json=coin2Beg,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"coin2_beg"` - ProductBeg github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,9,opt,name=product_beg,json=productBeg,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"product_beg"` - TimeEnd int64 `protobuf:"varint,10,opt,name=time_end,json=timeEnd,proto3" json:"time_end,omitempty"` - Coin1End github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,11,opt,name=coin1_end,json=coin1End,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"coin1_end"` - Coin2End github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,12,opt,name=coin2_end,json=coin2End,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"coin2_end"` - ProductEnd github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,13,opt,name=product_end,json=productEnd,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"product_end"` + Uid uint64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + Pair string `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + Drops github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=drops,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"drops"` + Product github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=product,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"product"` + Active bool `protobuf:"varint,6,opt,name=active,proto3" json:"active,omitempty"` } func (m *Drop) Reset() { *m = Drop{} } @@ -157,35 +150,28 @@ func init() { func init() { proto.RegisterFile("market/drop.proto", fileDescriptor_3961bee11a1276cb) } var fileDescriptor_3961bee11a1276cb = []byte{ - // 436 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0x4f, 0x6e, 0xd4, 0x30, - 0x14, 0xc6, 0x63, 0x92, 0x4c, 0x27, 0xaf, 0x20, 0x81, 0x55, 0xa1, 0xd0, 0x45, 0x1a, 0x66, 0x01, - 0xd9, 0x34, 0x11, 0xc3, 0x05, 0xd0, 0x30, 0x5d, 0x20, 0x21, 0x51, 0x79, 0x89, 0x84, 0x50, 0x26, - 0xb6, 0x82, 0xd5, 0xc6, 0x8e, 0x6c, 0x87, 0x3f, 0xb7, 0xe0, 0x28, 0x1c, 0x63, 0x96, 0x5d, 0x56, - 0x2c, 0x2a, 0x3a, 0x73, 0x11, 0x64, 0x27, 0xa3, 0xce, 0x12, 0x9a, 0x95, 0xdf, 0x8b, 0xfd, 0x7e, - 0x5f, 0xf4, 0xe9, 0x7d, 0xf0, 0xa4, 0x29, 0xd5, 0x05, 0x33, 0x05, 0x55, 0xb2, 0xcd, 0x5b, 0x25, - 0x8d, 0xc4, 0xc7, 0x2d, 0x13, 0xb4, 0xbb, 0xec, 0x9a, 0xcb, 0x72, 0xa5, 0xf3, 0xfe, 0x7e, 0x38, - 0x8e, 0x8f, 0x6a, 0x59, 0x4b, 0xf7, 0xac, 0xb0, 0x55, 0x3f, 0x31, 0xfb, 0x15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 0x3d, 0xda, 0xdc, 0xd1, 0x1e, 0x8e, 0xf1, 0xc1, 0xd2, 0xf6, 0x7c, 0xb0, - 0xbc, 0x47, 0xa3, 0x7c, 0x38, 0x13, 0x74, 0xf6, 0x09, 0xc2, 0xa5, 0x5b, 0x0c, 0x0c, 0x41, 0xc7, - 0xa9, 0x8e, 0x51, 0xea, 0x67, 0x01, 0x71, 0x35, 0x7e, 0x03, 0xbe, 0xee, 0x9a, 0x7e, 0x65, 0xff, - 0x5b, 0xc5, 0x8e, 0xce, 0x9e, 0x43, 0x64, 0xf1, 0xe7, 0x25, 0x57, 0xda, 0x66, 0xc0, 0x6e, 0x78, - 0xaf, 0x11, 0x91, 0xbe, 0x59, 0x9c, 0xaf, 0x6f, 0x13, 0xef, 0xfa, 0x36, 0x41, 0xeb, 0x4d, 0x82, - 0xae, 0x36, 0x09, 0xfa, 0xb3, 0x49, 0xd0, 0xcf, 0x6d, 0xe2, 0x5d, 0x6d, 0x13, 0xef, 0x7a, 0x9b, - 0x78, 0x1f, 0xf3, 0x3d, 0xc5, 0x5d, 0x26, 0x4f, 0x6d, 0x28, 0x8b, 0x21, 0xb4, 0xdf, 0x77, 0x85, - 0x53, 0x5f, 0x4d, 0x5c, 0x1a, 0x5f, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x5a, 0x27, 0xd8, 0x1a, - 0xd4, 0x03, 0x00, 0x00, + // 331 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x51, 0xbd, 0x6e, 0xf2, 0x30, + 0x14, 0x8d, 0xbf, 0x24, 0x7c, 0xe5, 0x4e, 0xad, 0x85, 0x2a, 0x8b, 0xc1, 0xa4, 0x0c, 0x55, 0x16, + 0x92, 0xa1, 0x2f, 0x50, 0x21, 0x86, 0x76, 0x43, 0x19, 0x2b, 0x75, 0x08, 0x49, 0x44, 0x23, 0x08, + 0xb6, 0xfc, 0xd3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c2, 0x10, 0xe8, 0xba, 0x94, 0x04, 0x45, 0x7e, 0x1c, + 0x64, 0x16, 0xe3, 0x5b, 0xf0, 0xa5, 0x6e, 0xdc, 0x67, 0x7f, 0x6d, 0x6d, 0xa4, 0xc3, 0x2b, 0xe8, + 0x9a, 0xf1, 0xd3, 0xbc, 0x16, 0xd2, 0x6c, 0xcf, 0xec, 0xc6, 0x79, 0x74, 0x33, 0x47, 0xc6, 0xd3, + 0xf5, 0x9e, 0x7a, 0xdb, 0x3d, 0x45, 0xeb, 0x03, 0x45, 0x9b, 0x03, 0x45, 0x9f, 0x07, 0x8a, 0xde, + 0x8f, 0xd4, 0xdb, 0x1c, 0xa9, 0xb7, 0x3d, 0x52, 0xef, 0x21, 0xf9, 0xe1, 0x78, 0x4a, 0x73, 0x64, + 0xe2, 0x4c, 0xdb, 0xb8, 0x5f, 0x4f, 0xc0, 0xba, 0xcf, 0x3a, 0x36, 0xc7, 0x9b, 0xef, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x3b, 0x24, 0x4e, 0x03, 0x0e, 0x02, 0x00, 0x00, } func (m *Drop) Marshal() (dAtA []byte, err error) { @@ -208,76 +194,26 @@ func (m *Drop) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size := m.ProductEnd.Size() - i -= size - if _, err := m.ProductEnd.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintDrop(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - { - size := m.Coin2End.Size() - i -= size - if _, err := m.Coin2End.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintDrop(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - { - size := m.Coin1End.Size() - i -= size - if _, err := m.Coin1End.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintDrop(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - if m.TimeEnd != 0 { - i = encodeVarintDrop(dAtA, i, uint64(m.TimeEnd)) + if m.Active { i-- - dAtA[i] = 0x50 - } - { - size := m.ProductBeg.Size() - i -= size - if _, err := m.ProductBeg.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintDrop(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - { - size := m.Coin2Beg.Size() - i -= size - if _, err := m.Coin2Beg.MarshalTo(dAtA[i:]); err != nil { - return 0, err + if m.Active { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i = encodeVarintDrop(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x30 } - i-- - dAtA[i] = 0x42 { - size := m.Coin1Beg.Size() + size := m.Product.Size() i -= size - if _, err := m.Coin1Beg.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.Product.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintDrop(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x3a - if m.TimeBeg != 0 { - i = encodeVarintDrop(dAtA, i, uint64(m.TimeBeg)) - i-- - dAtA[i] = 0x30 - } + dAtA[i] = 0x2a { size := m.Drops.Size() i -= size @@ -287,17 +223,7 @@ func (m *Drop) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintDrop(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a - if m.Active { - i-- - if m.Active { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } + dAtA[i] = 0x22 if len(m.Pair) > 0 { i -= len(m.Pair) copy(dAtA[i:], m.Pair) @@ -431,29 +357,13 @@ func (m *Drop) Size() (n int) { if l > 0 { n += 1 + l + sovDrop(uint64(l)) } - if m.Active { - n += 2 - } l = m.Drops.Size() n += 1 + l + sovDrop(uint64(l)) - if m.TimeBeg != 0 { - n += 1 + sovDrop(uint64(m.TimeBeg)) - } - l = m.Coin1Beg.Size() - n += 1 + l + sovDrop(uint64(l)) - l = m.Coin2Beg.Size() + l = m.Product.Size() n += 1 + l + sovDrop(uint64(l)) - l = m.ProductBeg.Size() - n += 1 + l + sovDrop(uint64(l)) - if m.TimeEnd != 0 { - n += 1 + sovDrop(uint64(m.TimeEnd)) + if m.Active { + n += 2 } - l = m.Coin1End.Size() - n += 1 + l + sovDrop(uint64(l)) - l = m.Coin2End.Size() - n += 1 + l + sovDrop(uint64(l)) - l = m.ProductEnd.Size() - n += 1 + l + sovDrop(uint64(l)) return n } @@ -609,26 +519,6 @@ func (m *Drop) Unmarshal(dAtA []byte) error { m.Pair = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Active = bool(v != 0) - case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Drops", wireType) } @@ -662,96 +552,9 @@ func (m *Drop) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeBeg", wireType) - } - m.TimeBeg = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TimeBeg |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coin1Beg", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - 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 ErrInvalidLengthDrop - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDrop - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Coin1Beg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coin2Beg", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - 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 ErrInvalidLengthDrop - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDrop - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Coin2Beg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProductBeg", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Product", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -779,102 +582,15 @@ func (m *Drop) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ProductBeg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Product.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 10: + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeEnd", wireType) - } - m.TimeEnd = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TimeEnd |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coin1End", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - 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 ErrInvalidLengthDrop - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDrop - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Coin1End.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coin2End", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDrop - } - 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 ErrInvalidLengthDrop - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDrop - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Coin2End.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProductEnd", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDrop @@ -884,26 +600,12 @@ func (m *Drop) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDrop - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDrop - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ProductEnd.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex + m.Active = bool(v != 0) default: iNdEx = preIndex skippy, err := skipDrop(dAtA[iNdEx:]) diff --git a/x/market/types/pool.pb.go b/x/market/types/pool.pb.go index 74438acb..9155701a 100644 --- a/x/market/types/pool.pb.go +++ b/x/market/types/pool.pb.go @@ -25,15 +25,14 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Pool struct { - Pair string `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` - Denom1 string `protobuf:"bytes,2,opt,name=denom1,proto3" json:"denom1,omitempty"` - Denom2 string `protobuf:"bytes,3,opt,name=denom2,proto3" json:"denom2,omitempty"` - Volume1 *Volume `protobuf:"bytes,4,opt,name=volume1,proto3" json:"volume1,omitempty"` - Volume2 *Volume `protobuf:"bytes,5,opt,name=volume2,proto3" json:"volume2,omitempty"` - Leaders []*Leader `protobuf:"bytes,6,rep,name=leaders,proto3" json:"leaders,omitempty"` - Drops github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=drops,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"drops"` - History uint64 `protobuf:"varint,8,opt,name=history,proto3" json:"history,omitempty"` - LastDrop uint64 `protobuf:"varint,9,opt,name=last_drop,json=lastDrop,proto3" json:"last_drop,omitempty"` + Pair string `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` + Denom1 string `protobuf:"bytes,2,opt,name=denom1,proto3" json:"denom1,omitempty"` + Denom2 string `protobuf:"bytes,3,opt,name=denom2,proto3" json:"denom2,omitempty"` + Volume1 *Volume `protobuf:"bytes,4,opt,name=volume1,proto3" json:"volume1,omitempty"` + Volume2 *Volume `protobuf:"bytes,5,opt,name=volume2,proto3" json:"volume2,omitempty"` + Leaders []*Leader `protobuf:"bytes,6,rep,name=leaders,proto3" json:"leaders,omitempty"` + Drops github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=drops,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"drops"` + History uint64 `protobuf:"varint,8,opt,name=history,proto3" json:"history,omitempty"` } func (m *Pool) Reset() { *m = Pool{} } @@ -154,32 +153,30 @@ func init() { func init() { proto.RegisterFile("market/pool.proto", fileDescriptor_adb392bd01694df9) } var fileDescriptor_adb392bd01694df9 = []byte{ - // 386 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xb1, 0xee, 0xda, 0x30, - 0x10, 0xc6, 0x63, 0x08, 0x01, 0xdc, 0xa9, 0x16, 0xaa, 0x2c, 0x2a, 0x99, 0x28, 0x43, 0xc5, 0x82, - 0x23, 0xd2, 0xb5, 0x13, 0x42, 0x95, 0x2a, 0x75, 0x40, 0x19, 0x3a, 0x74, 0xa9, 0x02, 0x71, 0x01, - 0x91, 0xe4, 0x22, 0xdb, 0xa9, 0xca, 0xd8, 0x37, 0xe8, 0x63, 0x31, 0x32, 0xa2, 0x0e, 0xa8, 0xc0, - 0x8b, 0x54, 0x71, 0x92, 0xc2, 0x52, 0x55, 0xed, 0x7f, 0xf2, 0xdd, 0xf9, 0x7e, 0x77, 0x5f, 0xf2, - 0x19, 0x3f, 0x4f, 0x23, 0xb9, 0x13, 0xda, 0xcf, 0x01, 0x12, 0x9e, 0x4b, 0xd0, 0x40, 0x86, 0xb9, - 0xc8, 0xe2, 0x22, 0x29, 0xd2, 0x24, 0x5a, 0x2a, 0x5e, 0xdd, 0xd7, 0xc7, 0x70, 0xb0, 0x86, 0x35, - 0x98, 0x36, 0xbf, 0x8c, 0x2a, 0xc2, 0xfb, 0xd6, 0xc6, 0xf6, 0x02, 0x20, 0x21, 0x04, 0xdb, 0x79, - 0xb4, 0x95, 0x14, 0xb9, 0x68, 0xdc, 0x0f, 0x4d, 0x4c, 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x8a, 0x4c, - 0xff, 0xe7, 0x9a, 0x9a, 0x9e, 0x2d, 0x0e, 0x17, 0x66, 0x9d, 0x2e, 0x0c, 0x1d, 0xae, 0x0c, 0x1d, - 0xaf, 0x0c, 0xfd, 0xbc, 0x32, 0xf4, 0xfd, 0xc6, 0xac, 0xe3, 0x8d, 0x59, 0xa7, 0x1b, 0xb3, 0x3e, - 0xf2, 0x87, 0x89, 0x8d, 0x4f, 0x93, 0xd2, 0x28, 0xbf, 0x7e, 0xd5, 0x5f, 0x9b, 0xc0, 0x4c, 0x5f, - 0x3a, 0xe6, 0xb9, 0xbe, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, 0x3a, 0x42, 0x08, 0xe9, 0xf5, 0x02, - 0x00, 0x00, + // 366 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0x31, 0x4f, 0xc2, 0x40, + 0x14, 0xc7, 0x7b, 0x50, 0x8a, 0x9e, 0x93, 0x17, 0x62, 0x2e, 0x0c, 0x47, 0xd3, 0xc1, 0xb0, 0x70, + 0x0d, 0x75, 0x75, 0x22, 0xc6, 0xc4, 0xc4, 0x81, 0x74, 0x70, 0x70, 0x2b, 0xf4, 0x04, 0x42, 0xdb, + 0xd7, 0xf4, 0x5a, 0x23, 0xdf, 0xc2, 0x8f, 0xc5, 0xc8, 0x48, 0x1c, 0x88, 0x80, 0x1f, 0xc4, 0xf4, + 0xda, 0x0a, 0x8b, 0x31, 0xea, 0x74, 0xef, 0xbd, 0xfe, 0x7f, 0xf7, 0x7f, 0xbd, 0xf7, 0xf0, 0x79, + 0xe8, 0x25, 0x73, 0x91, 0xda, 0x31, 0x40, 0xc0, 0xe3, 0x04, 0x52, 0x20, 0xed, 0x58, 0x44, 0x7e, + 0x16, 0x64, 0x61, 0xe0, 0x8d, 0x24, 0x2f, 0xbe, 0x97, 0x47, 0xbb, 0x35, 0x81, 0x09, 0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53, 0x24, 0xe4, 0x16, 0x1b, 0x5e, 0x08, 0x59, 0x94, 0xfe, 0xd1, 0xa6, 0xa4, + 0x07, 0xc3, 0xe5, 0x96, 0x69, 0xeb, 0x2d, 0x43, 0xcb, 0x1d, 0x43, 0xab, 0x1d, 0x43, 0xef, 0x3b, + 0x86, 0x5e, 0xf7, 0x4c, 0x5b, 0xed, 0x99, 0xb6, 0xde, 0x33, 0xed, 0x91, 0x1f, 0xdd, 0x58, 0x8d, + 0xa2, 0x97, 0xcf, 0xc2, 0x2e, 0x17, 0xf7, 0xa5, 0x0a, 0xd4, 0xed, 0x23, 0x43, 0x6d, 0xe4, 0xd5, + 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xf2, 0x98, 0x47, 0xd8, 0x02, 0x00, 0x00, } func (m *Pool) Marshal() (dAtA []byte, err error) { @@ -202,11 +199,6 @@ func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.LastDrop != 0 { - i = encodeVarintPool(dAtA, i, uint64(m.LastDrop)) - i-- - dAtA[i] = 0x48 - } if m.History != 0 { i = encodeVarintPool(dAtA, i, uint64(m.History)) i-- @@ -412,9 +404,6 @@ func (m *Pool) Size() (n int) { if m.History != 0 { n += 1 + sovPool(uint64(m.History)) } - if m.LastDrop != 0 { - n += 1 + sovPool(uint64(m.LastDrop)) - } return n } @@ -738,25 +727,6 @@ func (m *Pool) Unmarshal(dAtA []byte) error { break } } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastDrop", wireType) - } - m.LastDrop = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastDrop |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipPool(dAtA[iNdEx:]) From 763cfda960cd72e1196c62664a5e7d458fc82d49 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Thu, 13 Jun 2024 16:52:34 -0500 Subject: [PATCH 3/8] Update TX responses --- docs/static/openapi.yml | 12 +- proto/market/tx.proto | 8 +- .../pendulumlabs.market.market/index.ts | 48 +-- .../module/index.ts | 18 +- .../pendulumlabs.market.market/module/rest.ts | 26 +- .../cosmos/base/query/v1beta1/pagination.ts | 30 +- .../module/types/market/tx.ts | 124 ++----- x/market/types/tx.pb.go | 336 ++++-------------- 8 files changed, 174 insertions(+), 428 deletions(-) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 70e02768..f0d298d8 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -50213,17 +50213,9 @@ definitions: type: string drops: type: string - time_beg: - type: string - coin1_beg: - type: string - coin2_beg: - type: string - time_end: - type: string - coin1_end: + coin1: type: string - coin2_end: + coin2: type: string pendulumlabs.market.market.Order: type: object diff --git a/proto/market/tx.proto b/proto/market/tx.proto index ddb4a7a2..e03efbd7 100644 --- a/proto/market/tx.proto +++ b/proto/market/tx.proto @@ -56,12 +56,8 @@ message MsgRedeemDropResponse { uint64 uid = 2; string pair = 3; string drops = 4; - string time_beg = 5; - string coin1_beg = 6; - string coin2_beg = 7; - string time_end = 8; - string coin1_end = 9; - string coin2_end = 10; + string coin1 = 9; + string coin2 = 10; } message MsgCreateOrder { diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts index 008f3b41..2b3897b5 100755 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts @@ -915,18 +915,18 @@ export default { }, - async sendMsgRedeemDrop({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateOrder({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgRedeemDrop(value) + const msg = await txClient.msgCreateOrder(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgRedeemDrop:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateOrder:Send Could not broadcast Tx: '+ e.message) } } }, @@ -960,18 +960,18 @@ export default { } } }, - async sendMsgCreateOrder({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCancelOrder({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateOrder(value) + const msg = await txClient.msgCancelOrder(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateOrder:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCancelOrder:Send Could not broadcast Tx: '+ e.message) } } }, @@ -990,32 +990,32 @@ export default { } } }, - async sendMsgCancelOrder({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgRedeemDrop({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCancelOrder(value) + const msg = await txClient.msgRedeemDrop(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCancelOrder:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgRedeemDrop:Send Could not broadcast Tx: '+ e.message) } } }, - async MsgRedeemDrop({ rootGetters }, { value }) { + async MsgCreateOrder({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgRedeemDrop(value) + const msg = await txClient.msgCreateOrder(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgRedeemDrop:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateOrder:Create Could not create message: ' + e.message) } } }, @@ -1045,16 +1045,16 @@ export default { } } }, - async MsgCreateOrder({ rootGetters }, { value }) { + async MsgCancelOrder({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateOrder(value) + const msg = await txClient.msgCancelOrder(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreateOrder:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCancelOrder:Create Could not create message: ' + e.message) } } }, @@ -1071,16 +1071,16 @@ export default { } } }, - async MsgCancelOrder({ rootGetters }, { value }) { + async MsgRedeemDrop({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCancelOrder(value) + const msg = await txClient.msgRedeemDrop(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCancelOrder:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgRedeemDrop:Create Could not create message: ' + e.message) } } }, diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts index f9168b56..f37e2e66 100755 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts @@ -4,21 +4,21 @@ import { StdFee } from "@cosmjs/launchpad"; import { SigningStargateClient } from "@cosmjs/stargate"; import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { Api } from "./rest"; -import { MsgRedeemDrop } from "./types/market/tx"; +import { MsgCreateOrder } from "./types/market/tx"; import { MsgMarketOrder } from "./types/market/tx"; import { MsgCreateDrop } from "./types/market/tx"; -import { MsgCreateOrder } from "./types/market/tx"; -import { MsgCreatePool } from "./types/market/tx"; import { MsgCancelOrder } from "./types/market/tx"; +import { MsgCreatePool } from "./types/market/tx"; +import { MsgRedeemDrop } from "./types/market/tx"; const types = [ - ["/pendulumlabs.market.market.MsgRedeemDrop", MsgRedeemDrop], + ["/pendulumlabs.market.market.MsgCreateOrder", MsgCreateOrder], ["/pendulumlabs.market.market.MsgMarketOrder", MsgMarketOrder], ["/pendulumlabs.market.market.MsgCreateDrop", MsgCreateDrop], - ["/pendulumlabs.market.market.MsgCreateOrder", MsgCreateOrder], - ["/pendulumlabs.market.market.MsgCreatePool", MsgCreatePool], ["/pendulumlabs.market.market.MsgCancelOrder", MsgCancelOrder], + ["/pendulumlabs.market.market.MsgCreatePool", MsgCreatePool], + ["/pendulumlabs.market.market.MsgRedeemDrop", MsgRedeemDrop], ]; export const MissingWalletError = new Error("wallet is required"); @@ -51,12 +51,12 @@ const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = return { signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgRedeemDrop: (data: MsgRedeemDrop): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgRedeemDrop", value: MsgRedeemDrop.fromPartial( data ) }), + msgCreateOrder: (data: MsgCreateOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreateOrder", value: MsgCreateOrder.fromPartial( data ) }), msgMarketOrder: (data: MsgMarketOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgMarketOrder", value: MsgMarketOrder.fromPartial( data ) }), msgCreateDrop: (data: MsgCreateDrop): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreateDrop", value: MsgCreateDrop.fromPartial( data ) }), - msgCreateOrder: (data: MsgCreateOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreateOrder", value: MsgCreateOrder.fromPartial( data ) }), - msgCreatePool: (data: MsgCreatePool): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreatePool", value: MsgCreatePool.fromPartial( data ) }), msgCancelOrder: (data: MsgCancelOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCancelOrder", value: MsgCancelOrder.fromPartial( data ) }), + msgCreatePool: (data: MsgCreatePool): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreatePool", value: MsgCreatePool.fromPartial( data ) }), + msgRedeemDrop: (data: MsgRedeemDrop): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgRedeemDrop", value: MsgRedeemDrop.fromPartial( data ) }), }; }; diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts index 3a5c96b7..e2b3fa56 100644 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts @@ -57,12 +57,8 @@ export interface MarketMsgRedeemDropResponse { uid?: string; pair?: string; drops?: string; - time_beg?: string; - coin1_beg?: string; - coin2_beg?: string; - time_end?: string; - coin1_end?: string; - coin2_end?: string; + coin1?: string; + coin2?: string; } export interface MarketOrderResponse { @@ -435,6 +431,13 @@ export interface V1Beta1PageRequest { * is set. */ count_total?: boolean; + + /** + * reverse is set to true if results are to be returned in the descending order. + * + * Since: cosmos-sdk 0.43 + */ + reverse?: boolean; } /** @@ -667,6 +670,7 @@ export class Api extends HttpClient @@ -724,6 +728,7 @@ export class Api extends HttpClient @@ -765,6 +770,7 @@ export class Api extends HttpClient @@ -856,6 +862,7 @@ export class Api extends HttpClient @@ -899,6 +906,7 @@ export class Api extends HttpClient @@ -924,6 +932,7 @@ export class Api extends HttpClient @@ -965,6 +974,7 @@ export class Api extends HttpClient @@ -991,6 +1001,7 @@ export class Api extends HttpClient @@ -1017,6 +1028,7 @@ export class Api extends HttpClient @@ -1074,6 +1086,7 @@ export class Api extends HttpClient @@ -1131,6 +1144,7 @@ export class Api extends HttpClient diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/cosmos/base/query/v1beta1/pagination.ts index 0bc568f4..9c87ac0c 100644 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/cosmos/base/query/v1beta1/pagination.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/cosmos/base/query/v1beta1/pagination.ts @@ -38,6 +38,12 @@ export interface PageRequest { * is set. */ count_total: boolean; + /** + * reverse is set to true if results are to be returned in the descending order. + * + * Since: cosmos-sdk 0.43 + */ + reverse: boolean; } /** @@ -62,7 +68,12 @@ export interface PageResponse { total: number; } -const basePageRequest: object = { offset: 0, limit: 0, count_total: false }; +const basePageRequest: object = { + offset: 0, + limit: 0, + count_total: false, + reverse: false, +}; export const PageRequest = { encode(message: PageRequest, writer: Writer = Writer.create()): Writer { @@ -78,6 +89,9 @@ export const PageRequest = { if (message.count_total === true) { writer.uint32(32).bool(message.count_total); } + if (message.reverse === true) { + writer.uint32(40).bool(message.reverse); + } return writer; }, @@ -100,6 +114,9 @@ export const PageRequest = { case 4: message.count_total = reader.bool(); break; + case 5: + message.reverse = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -128,6 +145,11 @@ export const PageRequest = { } else { message.count_total = false; } + if (object.reverse !== undefined && object.reverse !== null) { + message.reverse = Boolean(object.reverse); + } else { + message.reverse = false; + } return message; }, @@ -141,6 +163,7 @@ export const PageRequest = { message.limit !== undefined && (obj.limit = message.limit); message.count_total !== undefined && (obj.count_total = message.count_total); + message.reverse !== undefined && (obj.reverse = message.reverse); return obj; }, @@ -166,6 +189,11 @@ export const PageRequest = { } else { message.count_total = false; } + if (object.reverse !== undefined && object.reverse !== null) { + message.reverse = object.reverse; + } else { + message.reverse = false; + } return message; }, }; diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/tx.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/tx.ts index 86a80edf..a1d0b3bf 100644 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/tx.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/tx.ts @@ -44,12 +44,8 @@ export interface MsgRedeemDropResponse { uid: number; pair: string; drops: string; - time_beg: string; - coin1_beg: string; - coin2_beg: string; - time_end: string; - coin1_end: string; - coin2_end: string; + coin1: string; + coin2: string; } export interface MsgCreateOrder { @@ -650,12 +646,8 @@ const baseMsgRedeemDropResponse: object = { uid: 0, pair: "", drops: "", - time_beg: "", - coin1_beg: "", - coin2_beg: "", - time_end: "", - coin1_end: "", - coin2_end: "", + coin1: "", + coin2: "", }; export const MsgRedeemDropResponse = { @@ -675,23 +667,11 @@ export const MsgRedeemDropResponse = { if (message.drops !== "") { writer.uint32(34).string(message.drops); } - if (message.time_beg !== "") { - writer.uint32(42).string(message.time_beg); - } - if (message.coin1_beg !== "") { - writer.uint32(50).string(message.coin1_beg); - } - if (message.coin2_beg !== "") { - writer.uint32(58).string(message.coin2_beg); - } - if (message.time_end !== "") { - writer.uint32(66).string(message.time_end); - } - if (message.coin1_end !== "") { - writer.uint32(74).string(message.coin1_end); + if (message.coin1 !== "") { + writer.uint32(74).string(message.coin1); } - if (message.coin2_end !== "") { - writer.uint32(82).string(message.coin2_end); + if (message.coin2 !== "") { + writer.uint32(82).string(message.coin2); } return writer; }, @@ -715,23 +695,11 @@ export const MsgRedeemDropResponse = { case 4: message.drops = reader.string(); break; - case 5: - message.time_beg = reader.string(); - break; - case 6: - message.coin1_beg = reader.string(); - break; - case 7: - message.coin2_beg = reader.string(); - break; - case 8: - message.time_end = reader.string(); - break; case 9: - message.coin1_end = reader.string(); + message.coin1 = reader.string(); break; case 10: - message.coin2_end = reader.string(); + message.coin2 = reader.string(); break; default: reader.skipType(tag & 7); @@ -763,35 +731,15 @@ export const MsgRedeemDropResponse = { } else { message.drops = ""; } - if (object.time_beg !== undefined && object.time_beg !== null) { - message.time_beg = String(object.time_beg); - } else { - message.time_beg = ""; - } - if (object.coin1_beg !== undefined && object.coin1_beg !== null) { - message.coin1_beg = String(object.coin1_beg); - } else { - message.coin1_beg = ""; - } - if (object.coin2_beg !== undefined && object.coin2_beg !== null) { - message.coin2_beg = String(object.coin2_beg); - } else { - message.coin2_beg = ""; - } - if (object.time_end !== undefined && object.time_end !== null) { - message.time_end = String(object.time_end); - } else { - message.time_end = ""; - } - if (object.coin1_end !== undefined && object.coin1_end !== null) { - message.coin1_end = String(object.coin1_end); + if (object.coin1 !== undefined && object.coin1 !== null) { + message.coin1 = String(object.coin1); } else { - message.coin1_end = ""; + message.coin1 = ""; } - if (object.coin2_end !== undefined && object.coin2_end !== null) { - message.coin2_end = String(object.coin2_end); + if (object.coin2 !== undefined && object.coin2 !== null) { + message.coin2 = String(object.coin2); } else { - message.coin2_end = ""; + message.coin2 = ""; } return message; }, @@ -802,12 +750,8 @@ export const MsgRedeemDropResponse = { message.uid !== undefined && (obj.uid = message.uid); message.pair !== undefined && (obj.pair = message.pair); message.drops !== undefined && (obj.drops = message.drops); - message.time_beg !== undefined && (obj.time_beg = message.time_beg); - message.coin1_beg !== undefined && (obj.coin1_beg = message.coin1_beg); - message.coin2_beg !== undefined && (obj.coin2_beg = message.coin2_beg); - message.time_end !== undefined && (obj.time_end = message.time_end); - message.coin1_end !== undefined && (obj.coin1_end = message.coin1_end); - message.coin2_end !== undefined && (obj.coin2_end = message.coin2_end); + message.coin1 !== undefined && (obj.coin1 = message.coin1); + message.coin2 !== undefined && (obj.coin2 = message.coin2); return obj; }, @@ -835,35 +779,15 @@ export const MsgRedeemDropResponse = { } else { message.drops = ""; } - if (object.time_beg !== undefined && object.time_beg !== null) { - message.time_beg = object.time_beg; - } else { - message.time_beg = ""; - } - if (object.coin1_beg !== undefined && object.coin1_beg !== null) { - message.coin1_beg = object.coin1_beg; - } else { - message.coin1_beg = ""; - } - if (object.coin2_beg !== undefined && object.coin2_beg !== null) { - message.coin2_beg = object.coin2_beg; - } else { - message.coin2_beg = ""; - } - if (object.time_end !== undefined && object.time_end !== null) { - message.time_end = object.time_end; - } else { - message.time_end = ""; - } - if (object.coin1_end !== undefined && object.coin1_end !== null) { - message.coin1_end = object.coin1_end; + if (object.coin1 !== undefined && object.coin1 !== null) { + message.coin1 = object.coin1; } else { - message.coin1_end = ""; + message.coin1 = ""; } - if (object.coin2_end !== undefined && object.coin2_end !== null) { - message.coin2_end = object.coin2_end; + if (object.coin2 !== undefined && object.coin2 !== null) { + message.coin2 = object.coin2; } else { - message.coin2_end = ""; + message.coin2 = ""; } return message; }, diff --git a/x/market/types/tx.pb.go b/x/market/types/tx.pb.go index 9be43ec6..79d8a714 100644 --- a/x/market/types/tx.pb.go +++ b/x/market/types/tx.pb.go @@ -368,16 +368,12 @@ func (m *MsgRedeemDrop) GetUid() string { } type MsgRedeemDropResponse struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Uid uint64 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"` - Pair string `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - Drops string `protobuf:"bytes,4,opt,name=drops,proto3" json:"drops,omitempty"` - TimeBeg string `protobuf:"bytes,5,opt,name=time_beg,json=timeBeg,proto3" json:"time_beg,omitempty"` - Coin1Beg string `protobuf:"bytes,6,opt,name=coin1_beg,json=coin1Beg,proto3" json:"coin1_beg,omitempty"` - Coin2Beg string `protobuf:"bytes,7,opt,name=coin2_beg,json=coin2Beg,proto3" json:"coin2_beg,omitempty"` - TimeEnd string `protobuf:"bytes,8,opt,name=time_end,json=timeEnd,proto3" json:"time_end,omitempty"` - Coin1End string `protobuf:"bytes,9,opt,name=coin1_end,json=coin1End,proto3" json:"coin1_end,omitempty"` - Coin2End string `protobuf:"bytes,10,opt,name=coin2_end,json=coin2End,proto3" json:"coin2_end,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Uid uint64 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"` + Pair string `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + Drops string `protobuf:"bytes,4,opt,name=drops,proto3" json:"drops,omitempty"` + Coin1 string `protobuf:"bytes,9,opt,name=coin1,proto3" json:"coin1,omitempty"` + Coin2 string `protobuf:"bytes,10,opt,name=coin2,proto3" json:"coin2,omitempty"` } func (m *MsgRedeemDropResponse) Reset() { *m = MsgRedeemDropResponse{} } @@ -441,44 +437,16 @@ func (m *MsgRedeemDropResponse) GetDrops() string { return "" } -func (m *MsgRedeemDropResponse) GetTimeBeg() string { - if m != nil { - return m.TimeBeg - } - return "" -} - -func (m *MsgRedeemDropResponse) GetCoin1Beg() string { - if m != nil { - return m.Coin1Beg - } - return "" -} - -func (m *MsgRedeemDropResponse) GetCoin2Beg() string { - if m != nil { - return m.Coin2Beg - } - return "" -} - -func (m *MsgRedeemDropResponse) GetTimeEnd() string { - if m != nil { - return m.TimeEnd - } - return "" -} - -func (m *MsgRedeemDropResponse) GetCoin1End() string { +func (m *MsgRedeemDropResponse) GetCoin1() string { if m != nil { - return m.Coin1End + return m.Coin1 } return "" } -func (m *MsgRedeemDropResponse) GetCoin2End() string { +func (m *MsgRedeemDropResponse) GetCoin2() string { if m != nil { - return m.Coin2End + return m.Coin2 } return "" } @@ -886,50 +854,46 @@ func init() { func init() { proto.RegisterFile("market/tx.proto", fileDescriptor_2966ca2342567dca) } var fileDescriptor_2966ca2342567dca = []byte{ - // 678 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0x8e, 0xf3, 0x6b, 0x0f, 0xe2, 0x47, 0x16, 0x54, 0x6e, 0xa8, 0xac, 0xca, 0x27, 0xa8, 0x84, - 0xa3, 0x98, 0x23, 0x5c, 0x1a, 0xa8, 0xc4, 0x25, 0x02, 0x05, 0x7a, 0xe1, 0x52, 0x39, 0xf1, 0xca, - 0xb8, 0x8d, 0xbd, 0x96, 0xed, 0xa0, 0xf4, 0xca, 0x13, 0x70, 0x02, 0x71, 0xe5, 0x31, 0x78, 0x02, - 0x8e, 0x3d, 0x70, 0xe0, 0x88, 0x92, 0x17, 0x41, 0xbb, 0xde, 0xf5, 0xae, 0x49, 0x88, 0x2d, 0x55, - 0x3d, 0x65, 0x67, 0xbe, 0xf1, 0x7c, 0xf3, 0x7d, 0xeb, 0xdd, 0x18, 0xee, 0x86, 0x6e, 0x72, 0x81, - 0xb2, 0x41, 0xb6, 0xb4, 0xe3, 0x04, 0x67, 0x58, 0xef, 0xc7, 0x28, 0xf2, 0x16, 0xf3, 0x45, 0x38, - 0x77, 0xa7, 0xa9, 0x9d, 0xa3, 0xec, 0xc7, 0x3a, 0x85, 0xdb, 0xe3, 0xd4, 0x7f, 0x91, 0x20, 0x37, - 0x43, 0x6f, 0x30, 0x9e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x08, 0x00, 0x00, + // 619 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xbd, 0x8e, 0xd3, 0x40, + 0x10, 0x3e, 0xe7, 0x3f, 0x83, 0xf8, 0x91, 0x05, 0xa7, 0x25, 0x3a, 0x59, 0x27, 0x57, 0x70, 0x12, + 0x8e, 0x12, 0x4a, 0x68, 0x2e, 0x50, 0xd0, 0x44, 0xa0, 0xc0, 0x35, 0x34, 0xc8, 0x89, 0x57, 0xc1, + 0x77, 0xb1, 0xd7, 0x5a, 0x3b, 0xa7, 0x5c, 0xcb, 0x13, 0x50, 0x21, 0xd1, 0xf2, 0x18, 0x3c, 0x01, + 0xe5, 0x15, 0x14, 0x94, 0x28, 0x79, 0x11, 0xb4, 0x3f, 0xde, 0x5d, 0x93, 0x10, 0x5b, 0x42, 0x50, + 0x65, 0x67, 0x76, 0x3c, 0xdf, 0x8f, 0x33, 0x23, 0xc3, 0xed, 0xc8, 0xa7, 0x17, 0x38, 0xeb, 0x67, + 0x2b, 0x2f, 0xa1, 0x24, 0x23, 0x76, 0x2f, 0xc1, 0x71, 0xb0, 0x5c, 0x2c, 0xa3, 0x85, 0x3f, 0x4d, + 0x3d, 0x71, 0x2b, 0x7f, 0xdc, 0x33, 0xb8, 0x39, 0x4e, 0xe7, 0xcf, 0x28, 0xf6, 0x33, 0xfc, 0x8a, + 0x90, 0x85, 0x8d, 0xa0, 0x3d, 0x63, 0x11, 0xa1, 0xc8, 0x3a, 0xb6, 0x1e, 0x74, 0x27, 0x79, 0x68, + 0xdf, 0x85, 0xe6, 0x8c, 0x84, 0xf1, 0x29, 0xaa, 0xf1, 0xbc, 0x08, 0xf2, 0xec, 0x08, 0xd5, 0x75, + 0x76, 0xe4, 0x7e, 0xb1, 0xe0, 0x5e, 0xa1, 0xef, 0x04, 0xa7, 0x09, 0x89, 0x53, 0xbc, 0xa7, 0xff, + 0x7d,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, 0x32, 0x38, + 0xa3, 0xb6, 0x14, 0x6e, 0xc7, 0x08, 0x8c, 0x5e, 0x7c, 0x5b, 0x3b, 0xd6, 0xf5, 0xda, 0xb1, 0x7e, + 0xae, 0x1d, 0xeb, 0xe3, 0xc6, 0x39, 0xb8, 0xde, 0x38, 0x07, 0x3f, 0x36, 0xce, 0xc1, 0x5b, 0x6f, + 0x1e, 0x66, 0xef, 0x97, 0x53, 0x6f, 0x46, 0xa2, 0x7e, 0xde, 0xf7, 0x11, 0x6b, 0xdc, 0x97, 0xdf, + 0x16, 0xab, 0xfc, 0x90, 0x5d, 0x25, 0x38, 0x9d, 0xb6, 0xf8, 0x87, 0xc6, 0xe3, 0x5f, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x1a, 0x81, 0x71, 0x5e, 0x7b, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1463,48 +1427,20 @@ func (m *MsgRedeemDropResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Coin2End) > 0 { - i -= len(m.Coin2End) - copy(dAtA[i:], m.Coin2End) - i = encodeVarintTx(dAtA, i, uint64(len(m.Coin2End))) + if len(m.Coin2) > 0 { + i -= len(m.Coin2) + copy(dAtA[i:], m.Coin2) + i = encodeVarintTx(dAtA, i, uint64(len(m.Coin2))) i-- dAtA[i] = 0x52 } - if len(m.Coin1End) > 0 { - i -= len(m.Coin1End) - copy(dAtA[i:], m.Coin1End) - i = encodeVarintTx(dAtA, i, uint64(len(m.Coin1End))) + if len(m.Coin1) > 0 { + i -= len(m.Coin1) + copy(dAtA[i:], m.Coin1) + i = encodeVarintTx(dAtA, i, uint64(len(m.Coin1))) i-- dAtA[i] = 0x4a } - if len(m.TimeEnd) > 0 { - i -= len(m.TimeEnd) - copy(dAtA[i:], m.TimeEnd) - i = encodeVarintTx(dAtA, i, uint64(len(m.TimeEnd))) - i-- - dAtA[i] = 0x42 - } - if len(m.Coin2Beg) > 0 { - i -= len(m.Coin2Beg) - copy(dAtA[i:], m.Coin2Beg) - i = encodeVarintTx(dAtA, i, uint64(len(m.Coin2Beg))) - i-- - dAtA[i] = 0x3a - } - if len(m.Coin1Beg) > 0 { - i -= len(m.Coin1Beg) - copy(dAtA[i:], m.Coin1Beg) - i = encodeVarintTx(dAtA, i, uint64(len(m.Coin1Beg))) - i-- - dAtA[i] = 0x32 - } - if len(m.TimeBeg) > 0 { - i -= len(m.TimeBeg) - copy(dAtA[i:], m.TimeBeg) - i = encodeVarintTx(dAtA, i, uint64(len(m.TimeBeg))) - i-- - dAtA[i] = 0x2a - } if len(m.Drops) > 0 { i -= len(m.Drops) copy(dAtA[i:], m.Drops) @@ -1974,27 +1910,11 @@ func (m *MsgRedeemDropResponse) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.TimeBeg) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Coin1Beg) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Coin2Beg) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.TimeEnd) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Coin1End) + l = len(m.Coin1) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Coin2End) + l = len(m.Coin2) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -3154,137 +3074,9 @@ func (m *MsgRedeemDropResponse) Unmarshal(dAtA []byte) error { } m.Drops = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeBeg", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TimeBeg = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coin1Beg", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Coin1Beg = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coin2Beg", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Coin2Beg = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeEnd", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TimeEnd = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coin1End", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Coin1", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3312,11 +3104,11 @@ func (m *MsgRedeemDropResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Coin1End = string(dAtA[iNdEx:postIndex]) + m.Coin1 = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coin2End", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Coin2", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3344,7 +3136,7 @@ func (m *MsgRedeemDropResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Coin2End = string(dAtA[iNdEx:postIndex]) + m.Coin2 = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex From 4469b0469ecdaa96d734328430b22acac707c582 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Thu, 13 Jun 2024 16:52:53 -0500 Subject: [PATCH 4/8] Remove drop events from drop.go --- x/market/keeper/drop.go | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/x/market/keeper/drop.go b/x/market/keeper/drop.go index 8c551998..3a4d51fe 100644 --- a/x/market/keeper/drop.go +++ b/x/market/keeper/drop.go @@ -3,7 +3,6 @@ package keeper import ( "math/big" "sort" - "strconv" "strings" "github.com/cosmos/cosmos-sdk/store/prefix" @@ -22,45 +21,6 @@ func (k Keeper) SetDrop(ctx sdk.Context, drop types.Drop) { store.Set(types.DropKey( drop.Uid, ), a) - - if drop.Active { - // drop creation event - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeDrop, - sdk.NewAttribute(types.AttributeKeyUid, strconv.FormatUint(drop.Uid, 10)), - sdk.NewAttribute(types.AttributeKeyOwner, drop.Owner), - sdk.NewAttribute(types.AttributeKeyActive, strconv.FormatBool(drop.Active)), - sdk.NewAttribute(types.AttributeKeyPair, drop.Pair), - sdk.NewAttribute(types.AttributeKeyDrops, drop.Drops.String()), - sdk.NewAttribute(types.AttributeKeyBeginTime, strconv.FormatInt(drop.TimeBeg, 10)), - sdk.NewAttribute(types.AttributeKeyCoin1Beg, drop.Coin1Beg.String()), - sdk.NewAttribute(types.AttributeKeyCoin2Beg, drop.Coin2Beg.String()), - sdk.NewAttribute(types.AttributeKeyProductBeg, drop.ProductBeg.String()), - ), - ) - } else { - // drop end event - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeDrop, - sdk.NewAttribute(types.AttributeKeyUid, strconv.FormatUint(drop.Uid, 10)), - sdk.NewAttribute(types.AttributeKeyOwner, drop.Owner), - sdk.NewAttribute(types.AttributeKeyActive, strconv.FormatBool(drop.Active)), - sdk.NewAttribute(types.AttributeKeyPair, drop.Pair), - sdk.NewAttribute(types.AttributeKeyDrops, drop.Drops.String()), - sdk.NewAttribute(types.AttributeKeyBeginTime, strconv.FormatInt(drop.TimeBeg, 10)), - sdk.NewAttribute(types.AttributeKeyCoin1Beg, drop.Coin1Beg.String()), - sdk.NewAttribute(types.AttributeKeyCoin2Beg, drop.Coin2Beg.String()), - sdk.NewAttribute(types.AttributeKeyProductBeg, drop.ProductBeg.String()), - sdk.NewAttribute(types.AttributeKeyEndTime, strconv.FormatInt(drop.TimeBeg, 10)), - sdk.NewAttribute(types.AttributeKeyCoin1End, drop.Coin1End.String()), - sdk.NewAttribute(types.AttributeKeyCoin2End, drop.Coin2End.String()), - sdk.NewAttribute(types.AttributeKeyProductEnd, drop.ProductEnd.String()), - ), - ) - } - } // GetDrop returns a drop from its index From 5cc387eda9cdc4a0c4f1d614f254e7860e1c5b0f Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Thu, 13 Jun 2024 16:53:23 -0500 Subject: [PATCH 5/8] Add drop events and remove reverted fields --- x/market/keeper/msg_server_create_drop.go | 32 ++++++++++++++++------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/x/market/keeper/msg_server_create_drop.go b/x/market/keeper/msg_server_create_drop.go index b1b7e485..21bf5571 100644 --- a/x/market/keeper/msg_server_create_drop.go +++ b/x/market/keeper/msg_server_create_drop.go @@ -3,6 +3,7 @@ package keeper import ( "context" "sort" + "strconv" "strings" sdk "github.com/cosmos/cosmos-sdk/types" @@ -125,20 +126,15 @@ func (k msgServer) CreateDrop(goCtx context.Context, msg *types.MsgCreateDrop) ( uid := k.GetUidCount(ctx) pool.Drops = pool.Drops.Add(drops) - pool.LastDrop = uid k.SetPool(ctx, pool) var drop = types.Drop{ - Uid: uid, - Owner: msg.Creator, - Pair: pair, - Drops: drops, - ProductBeg: dropProduct, - TimeBeg: ctx.BlockHeader().Time.Unix(), - Coin1Beg: coin1, - Coin2Beg: coin2, - Active: true, + Uid: uid, + Owner: msg.Creator, + Pair: pair, + Drops: drops, + Active: true, } // Add the drop to the keeper @@ -155,6 +151,22 @@ func (k msgServer) CreateDrop(goCtx context.Context, msg *types.MsgCreateDrop) ( // Update drop uid count k.SetUidCount(ctx, uid+1) + // drop creation event + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeDrop, + sdk.NewAttribute(types.AttributeKeyUid, strconv.FormatUint(drop.Uid, 10)), + sdk.NewAttribute(types.AttributeKeyOwner, drop.Owner), + sdk.NewAttribute(types.AttributeKeyActive, strconv.FormatBool(drop.Active)), + sdk.NewAttribute(types.AttributeKeyPair, drop.Pair), + sdk.NewAttribute(types.AttributeKeyDrops, drop.Drops.String()), + sdk.NewAttribute(types.AttributeKeyBeginTime, strconv.FormatInt(ctx.BlockHeader().Time.Unix(), 10)), + sdk.NewAttribute(types.AttributeKeyCoin1Beg, coin1.String()), + sdk.NewAttribute(types.AttributeKeyCoin2Beg, coin2.String()), + sdk.NewAttribute(types.AttributeKeyProductBeg, dropProduct.String()), + ), + ) + return &types.MsgCreateDropResponse{ Creator: msg.Creator, Uid: uid, From f0497e2c6b6d4264f4058ba46838c960fe0d475d Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Thu, 13 Jun 2024 16:54:05 -0500 Subject: [PATCH 6/8] Add drop event and remove reverted fields --- x/market/keeper/msg_server_redeem_drop.go | 36 ++++++++++++++--------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/x/market/keeper/msg_server_redeem_drop.go b/x/market/keeper/msg_server_redeem_drop.go index 7a654999..f46a3473 100644 --- a/x/market/keeper/msg_server_redeem_drop.go +++ b/x/market/keeper/msg_server_redeem_drop.go @@ -100,10 +100,6 @@ func (k msgServer) RedeemDrop(goCtx context.Context, msg *types.MsgRedeemDrop) ( // Deactivate drop and add final accounting drop.Active = false - drop.TimeEnd = ctx.BlockHeader().Time.Unix() - drop.Coin1End = coinOwner1 - drop.Coin2End = coinOwner2 - drop.ProductEnd = total1.Mul(total2) // Set Pool Member and Drop k.SetDrop( @@ -131,16 +127,28 @@ func (k msgServer) RedeemDrop(goCtx context.Context, msg *types.MsgRedeemDrop) ( member2, ) + // drop end event + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeDrop, + sdk.NewAttribute(types.AttributeKeyUid, strconv.FormatUint(drop.Uid, 10)), + sdk.NewAttribute(types.AttributeKeyOwner, drop.Owner), + sdk.NewAttribute(types.AttributeKeyActive, strconv.FormatBool(drop.Active)), + sdk.NewAttribute(types.AttributeKeyPair, drop.Pair), + sdk.NewAttribute(types.AttributeKeyDrops, drop.Drops.String()), + sdk.NewAttribute(types.AttributeKeyEndTime, strconv.FormatInt(ctx.BlockHeader().Time.Unix(), 10)), + sdk.NewAttribute(types.AttributeKeyCoin1End, coinOwner1.String()), + sdk.NewAttribute(types.AttributeKeyCoin2End, coinOwner2.String()), + sdk.NewAttribute(types.AttributeKeyProductEnd, (total1.Mul(total2)).String()), + ), + ) + return &types.MsgRedeemDropResponse{ - Creator: msg.Creator, - Uid: uid, - Pair: drop.Pair, - Drops: drop.Drops.String(), - TimeBeg: strconv.FormatInt(drop.TimeBeg, 10), - Coin1Beg: drop.Coin1Beg.String(), - Coin2Beg: drop.Coin2Beg.String(), - TimeEnd: strconv.FormatInt(drop.TimeEnd, 10), - Coin1End: coinOwner1.String(), - Coin2End: coinOwner2.String(), + Creator: msg.Creator, + Uid: uid, + Pair: drop.Pair, + Drops: drop.Drops.String(), + Coin1: coinOwner1.String(), + Coin2: coinOwner2.String(), }, nil } From 3b693943ab8073ae6ad560388bc63a5152b60235 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Thu, 13 Jun 2024 16:54:35 -0500 Subject: [PATCH 7/8] Add drop event and remove reverted fields --- x/market/keeper/msg_server_create_pool.go | 37 +++++++++++++++-------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/x/market/keeper/msg_server_create_pool.go b/x/market/keeper/msg_server_create_pool.go index a579f875..470717c3 100644 --- a/x/market/keeper/msg_server_create_pool.go +++ b/x/market/keeper/msg_server_create_pool.go @@ -3,6 +3,7 @@ package keeper import ( "context" "math/big" + "strconv" "strings" sdk "github.com/cosmos/cosmos-sdk/types" @@ -90,7 +91,6 @@ func (k msgServer) CreatePool(goCtx context.Context, msg *types.MsgCreatePool) ( if found { pool.Drops = drops pool.Leaders = []*types.Leader{&leader} - pool.LastDrop = count member1.Balance = coin1.Amount member2.Balance = coin2.Amount } else { @@ -107,9 +107,8 @@ func (k msgServer) CreatePool(goCtx context.Context, msg *types.MsgCreatePool) ( Denom: coinPair.GetDenomByIndex(1), Amount: sdk.ZeroInt(), }, - Drops: drops, - History: uint64(0), - LastDrop: count, + Drops: drops, + History: uint64(0), } member1 = types.Member{ @@ -132,15 +131,11 @@ func (k msgServer) CreatePool(goCtx context.Context, msg *types.MsgCreatePool) ( } var drop = types.Drop{ - Uid: count, - Owner: msg.Creator, - Pair: pair, - Drops: drops, - TimeBeg: ctx.BlockHeader().Time.Unix(), - ProductBeg: drops, - Coin1Beg: coin1, - Coin2Beg: coin2, - Active: true, + Uid: count, + Owner: msg.Creator, + Pair: pair, + Drops: drops, + Active: true, } k.SetPool( @@ -172,6 +167,22 @@ func (k msgServer) CreatePool(goCtx context.Context, msg *types.MsgCreatePool) ( // Update drop uid count k.SetUidCount(ctx, count+1) + // drop creation event + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeDrop, + sdk.NewAttribute(types.AttributeKeyUid, strconv.FormatUint(drop.Uid, 10)), + sdk.NewAttribute(types.AttributeKeyOwner, drop.Owner), + sdk.NewAttribute(types.AttributeKeyActive, strconv.FormatBool(drop.Active)), + sdk.NewAttribute(types.AttributeKeyPair, drop.Pair), + sdk.NewAttribute(types.AttributeKeyDrops, drop.Drops.String()), + sdk.NewAttribute(types.AttributeKeyBeginTime, strconv.FormatInt(ctx.BlockHeader().Time.Unix(), 10)), + sdk.NewAttribute(types.AttributeKeyCoin1Beg, coin1.String()), + sdk.NewAttribute(types.AttributeKeyCoin2Beg, coin2.String()), + sdk.NewAttribute(types.AttributeKeyProductBeg, (coin1.Amount.Mul(coin2.Amount)).String()), + ), + ) + return &types.MsgCreatePoolResponse{ Creator: msg.Creator, DropUid: drop.Uid, From bc88d46cd47076218aaf42cde4993ae80c50b48c Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Thu, 13 Jun 2024 17:57:37 -0500 Subject: [PATCH 8/8] Fix errors in tests due to proto revert --- x/market/client/cli/query_drop_test.go | 10 ++++---- x/market/genesis_test.go | 24 +++++++++---------- x/market/keeper/drop_test.go | 2 +- .../keeper/msg_server_create_drop_test.go | 11 ++------- .../keeper/msg_server_redeem_drop_test.go | 14 +---------- x/market/types/genesis_test.go | 24 +++++++++---------- 6 files changed, 33 insertions(+), 52 deletions(-) diff --git a/x/market/client/cli/query_drop_test.go b/x/market/client/cli/query_drop_test.go index e55f8c9f..22944885 100644 --- a/x/market/client/cli/query_drop_test.go +++ b/x/market/client/cli/query_drop_test.go @@ -30,11 +30,11 @@ func networkWithDropObjects(t *testing.T, n int) (*network.Network, []types.Drop for i := 0; i < n; i++ { drop := types.Drop{ - Uid: uint64(i), - Owner: strconv.Itoa(i), - Pair: strconv.Itoa(i), - Drops: sdk.NewIntFromUint64(uint64(i)), - ProductBeg: sdk.NewIntFromUint64(uint64(i)), + Uid: uint64(i), + Owner: strconv.Itoa(i), + Pair: strconv.Itoa(i), + Drops: sdk.NewIntFromUint64(uint64(i)), + Product: sdk.NewIntFromUint64(uint64(i)), } nullify.Fill(&drop) state.DropList = append(state.DropList, drop) diff --git a/x/market/genesis_test.go b/x/market/genesis_test.go index b7ad2385..7277a8b6 100644 --- a/x/market/genesis_test.go +++ b/x/market/genesis_test.go @@ -42,20 +42,20 @@ func TestGenesis(t *testing.T) { }, DropList: []types.Drop{ { - Uid: 0, - Owner: "0", - Pair: "0", - Drops: sdk.NewIntFromUint64(uint64(0)), - ProductBeg: sdk.NewIntFromUint64(uint64(0)), - Active: true, + Uid: 0, + Owner: "0", + Pair: "0", + Drops: sdk.NewIntFromUint64(uint64(0)), + Product: sdk.NewIntFromUint64(uint64(0)), + Active: true, }, { - Uid: 1, - Owner: "1", - Pair: "1", - Drops: sdk.NewIntFromUint64(uint64(1)), - ProductBeg: sdk.NewIntFromUint64(uint64(0)), - Active: true, + Uid: 1, + Owner: "1", + Pair: "1", + Drops: sdk.NewIntFromUint64(uint64(1)), + Product: sdk.NewIntFromUint64(uint64(0)), + Active: true, }, }, MemberList: []types.Member{ diff --git a/x/market/keeper/drop_test.go b/x/market/keeper/drop_test.go index 377aa26c..1a2c7fd5 100644 --- a/x/market/keeper/drop_test.go +++ b/x/market/keeper/drop_test.go @@ -22,7 +22,7 @@ func createNDrop(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.Drop { items[i].Owner = strconv.Itoa(i) items[i].Pair = strconv.Itoa(i) items[i].Drops = sdk.NewIntFromUint64(uint64(i)) - items[i].ProductBeg = sdk.NewIntFromUint64(uint64(i)) + items[i].Product = sdk.NewIntFromUint64(uint64(i)) keeper.SetDrop(ctx, items[i]) } diff --git a/x/market/keeper/msg_server_create_drop_test.go b/x/market/keeper/msg_server_create_drop_test.go index 67aeb876..0d7a09b0 100644 --- a/x/market/keeper/msg_server_create_drop_test.go +++ b/x/market/keeper/msg_server_create_drop_test.go @@ -1,7 +1,6 @@ package keeper_test import ( - "strconv" "strings" "testing" @@ -234,10 +233,7 @@ func TestCreateDrop_Pool_Not_Active(t *testing.T) { pair, _, _, testdata := dropCommon(t, testInput) - pool, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) - require.True(t, found) - - var rd = types.MsgRedeemDrop{Creator: addr, Uid: strconv.FormatUint(pool.LastDrop, 10)} + var rd = types.MsgRedeemDrop{Creator: addr, Uid: "1"} createRedeemDropResponse, redeemdropErr := keeper.NewMsgServerImpl(*testInput.MarketKeeper).RedeemDrop(sdk.WrapSDKContext(testInput.Context), &rd) require.NoError(t, redeemdropErr) require.Contains(t, createRedeemDropResponse.String(), rd.GetCreator()) @@ -299,11 +295,8 @@ func TestCreateDrop_Negative(t *testing.T) { pair, denomA, denomB, _ := dropCommon(t, testInput) - pool, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) - require.True(t, found) - //validate GetDrop - drop, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, pool.LastDrop) + drop, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, uint64(1)) require.True(t, dropFound) require.Equal(t, drop.Pair, pair) //validate CreateDrop diff --git a/x/market/keeper/msg_server_redeem_drop_test.go b/x/market/keeper/msg_server_redeem_drop_test.go index 4014412c..a6140f84 100644 --- a/x/market/keeper/msg_server_redeem_drop_test.go +++ b/x/market/keeper/msg_server_redeem_drop_test.go @@ -65,21 +65,9 @@ func TestRedeemDrop(t *testing.T) { // Validate RedeemDrop Uid := strconv.FormatUint(createDropResponse.Uid, 10) var rd = types.MsgRedeemDrop{Creator: addr2, Uid: Uid} - redeemDropResponse, redeemdropErr := keeper.NewMsgServerImpl(*testInput.MarketKeeper).RedeemDrop(sdk.WrapSDKContext(testInput.Context), &rd) + _, redeemdropErr := keeper.NewMsgServerImpl(*testInput.MarketKeeper).RedeemDrop(sdk.WrapSDKContext(testInput.Context), &rd) require.NoError(t, redeemdropErr) - coin1Beg, err := sdk.ParseCoinNormalized(redeemDropResponse.Coin1Beg) - require.NoError(t, err) - - coin1End, err := sdk.ParseCoinNormalized(redeemDropResponse.Coin1End) - require.NoError(t, err) - - // Drop coinEnd should be greater than coinBeg except in cases where there - // is no profit accrued in the pool since the drop was created. - // In that case round up +1 added to round down division requires coin1End+1 - // to ensure invariant is not violated. - require.True(t, (coin1End.AddAmount(sdk.NewIntFromUint64(1))).IsGTE(coin1Beg)) - // Validate Drop After Redeem Drop drop1, drop1Found := testInput.MarketKeeper.GetDrop(testInput.Context, createDropResponse.Uid) require.True(t, drop1Found) diff --git a/x/market/types/genesis_test.go b/x/market/types/genesis_test.go index aaf6e66d..61f68657 100644 --- a/x/market/types/genesis_test.go +++ b/x/market/types/genesis_test.go @@ -51,20 +51,20 @@ func TestGenesisState_Validate(t *testing.T) { }, DropList: []types.Drop{ { - Uid: 0, - Owner: "0", - Pair: "0", - Drops: sdk.NewIntFromUint64(uint64(0)), - ProductBeg: sdk.NewIntFromUint64(uint64(0)), - Active: true, + Uid: 0, + Owner: "0", + Pair: "0", + Drops: sdk.NewIntFromUint64(uint64(0)), + Product: sdk.NewIntFromUint64(uint64(0)), + Active: true, }, { - Uid: 1, - Owner: "1", - Pair: "1", - Drops: sdk.NewIntFromUint64(uint64(1)), - ProductBeg: sdk.NewIntFromUint64(uint64(0)), - Active: true, + Uid: 1, + Owner: "1", + Pair: "1", + Drops: sdk.NewIntFromUint64(uint64(1)), + Product: sdk.NewIntFromUint64(uint64(0)), + Active: true, }, }, MemberList: []types.Member{