diff --git a/proto/sge/orderbook/participation.proto b/proto/sge/orderbook/participation.proto index 41d9d0eb..321981c5 100644 --- a/proto/sge/orderbook/participation.proto +++ b/proto/sge/orderbook/participation.proto @@ -122,3 +122,20 @@ message ParticipationBetPair { json_name = "bet_uid" ]; } + +// SettledOrderbookParticipation is the type for a settled orderbook participation. +message SettledOrderbookParticipation { + // index is the index of the participation in the participation queue. + uint64 index = 1 [ (gogoproto.moretags) = "yaml:\"index\"" ]; + + // order_book_uid is the unique identifier corresponding to the order book. + string order_book_uid = 2 [ + (gogoproto.customname) = "OrderBookUID", + (gogoproto.jsontag) = "order_book_uid", + json_name = "order_book_uid" + ]; + + // participant_address is the bech32-encoded address of the participant. + string participant_address = 3 + [ (gogoproto.moretags) = "yaml:\"participant_address\"" ]; +} \ No newline at end of file diff --git a/proto/sge/orderbook/query.proto b/proto/sge/orderbook/query.proto index 24f4ed42..4a581f81 100644 --- a/proto/sge/orderbook/query.proto +++ b/proto/sge/orderbook/query.proto @@ -93,6 +93,12 @@ service Query { "/sge/orderbook/{order_book_uid}/participations/" "{participation_index}/fulfilled_bets"; } + + // Queries list of settled Orderbook Participation items of a certain height. + rpc SettledOrderbookParticipationsOfHeight(QuerySettledOrderBookParticipationsOfHeightRequest) + returns (QuerySettledOrderBookParticipationsOfHeightResponse) { + option (google.api.http).get = "/sge/orderbook/participations/settled/{block_height}"; + } } // QueryParamsRequest is the request type for the Query/Params RPC method @@ -304,3 +310,17 @@ message QueryParticipationFulfilledBetsResponse { // pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } + +// QuerySettledOrderBookParticipationsOfHeightRequest is the request type for the settled orderbook participations of a +// certain height list query. +message QuerySettledOrderBookParticipationsOfHeightRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; + int64 block_height = 2; +} + +// QuerySettledOrderBookParticipationsOfHeightResponse is the response type for the settled orderbook participations of +// a certain height list query. +message QuerySettledOrderBookParticipationsOfHeightResponse { + repeated OrderBookParticipation participations = 1 [ (gogoproto.nullable) = false ]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/x/orderbook/keeper/grpc_query_participation.go b/x/orderbook/keeper/grpc_query_participation.go index aeab159f..c3135908 100644 --- a/x/orderbook/keeper/grpc_query_participation.go +++ b/x/orderbook/keeper/grpc_query_participation.go @@ -90,3 +90,48 @@ func (k Keeper) OrderBookParticipations( Pagination: pageRes, }, nil } + +// SettledOrderbookParticipationsOfHeight returns settled orderbook participations of a certain height +func (k Keeper) SettledOrderbookParticipationsOfHeight( + c context.Context, + req *types.QuerySettledOrderBookParticipationsOfHeightRequest, +) (*types.QuerySettledOrderBookParticipationsOfHeightResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, consts.ErrTextInvalidRequest) + } + + var orderbookParticipations []types.OrderBookParticipation + ctx := sdk.UnwrapSDKContext(c) + + settledOrderbookParticipationStore := prefix.NewStore( + ctx.KVStore(k.storeKey), + types.SettledOrderbookParticipationListOfBlockHeightPrefix(req.BlockHeight), + ) + + pageRes, err := query.Paginate( + settledOrderbookParticipationStore, + req.Pagination, + func(key []byte, value []byte) error { + var settledOrderbookParticipation types.SettledOrderbookParticipation + if err := k.cdc.Unmarshal(value, &settledOrderbookParticipation); err != nil { + return err + } + + orderBookParticipation, found := k.GetOrderBookParticipation( + ctx, + settledOrderbookParticipation.OrderBookUID, + settledOrderbookParticipation.Index, + ) + if found { + orderbookParticipations = append(orderbookParticipations, orderBookParticipation) + } + + return nil + }, + ) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QuerySettledOrderBookParticipationsOfHeightResponse{Participations: orderbookParticipations, Pagination: pageRes}, nil +} diff --git a/x/orderbook/types/keys.go b/x/orderbook/types/keys.go index d88eda32..4d8eda74 100644 --- a/x/orderbook/types/keys.go +++ b/x/orderbook/types/keys.go @@ -46,6 +46,8 @@ var ( 0x07, } // prefix for keys that store book participation and bet pairs FeeGrantPrefix = []byte{0x08} // prefix for keys that store fee grants + // SettledOrderbookParticipationListPrefix is the prefix to retrieve all settled orderbook participations + SettledOrderbookParticipationListPrefix = []byte{0x09} ) // GetOrderBookKey returns the bytes of an book key @@ -109,3 +111,9 @@ func GetParticipationBetPairKey(bookUID string, bookParticipationIndex uint64, b GetParticipationByIndexKey(bookUID, bookParticipationIndex), utils.Uint64ToBytes(betID)...) } + +// SettledOrderbookParticipationListOfBlockHeightPrefix returns prefix of +// settled orderbook participation list on a certain block height. +func SettledOrderbookParticipationListOfBlockHeightPrefix(blockHeight int64) []byte { + return append(SettledOrderbookParticipationListPrefix, utils.Int64ToBytes(blockHeight)...) +} diff --git a/x/orderbook/types/participation.pb.go b/x/orderbook/types/participation.pb.go index a453156c..404e884c 100644 --- a/x/orderbook/types/participation.pb.go +++ b/x/orderbook/types/participation.pb.go @@ -157,62 +157,128 @@ func (m *ParticipationBetPair) GetBetUID() string { return "" } +// SettledOrderbookParticipation is the type for a settled orderbook participation. +type SettledOrderbookParticipation struct { + // index is the index of the participation in the participation queue. + Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty" yaml:"index"` + // order_book_uid is the unique identifier corresponding to the order book. + OrderBookUID string `protobuf:"bytes,2,opt,name=order_book_uid,proto3" json:"order_book_uid"` + // participant_address is the bech32-encoded address of the participant. + ParticipantAddress string `protobuf:"bytes,3,opt,name=participant_address,json=participantAddress,proto3" json:"participant_address,omitempty" yaml:"participant_address"` +} + +func (m *SettledOrderbookParticipation) Reset() { *m = SettledOrderbookParticipation{} } +func (m *SettledOrderbookParticipation) String() string { return proto.CompactTextString(m) } +func (*SettledOrderbookParticipation) ProtoMessage() {} +func (*SettledOrderbookParticipation) Descriptor() ([]byte, []int) { + return fileDescriptor_2962bcb47b63c36a, []int{2} +} +func (m *SettledOrderbookParticipation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SettledOrderbookParticipation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SettledOrderbookParticipation.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 *SettledOrderbookParticipation) XXX_Merge(src proto.Message) { + xxx_messageInfo_SettledOrderbookParticipation.Merge(m, src) +} +func (m *SettledOrderbookParticipation) XXX_Size() int { + return m.Size() +} +func (m *SettledOrderbookParticipation) XXX_DiscardUnknown() { + xxx_messageInfo_SettledOrderbookParticipation.DiscardUnknown(m) +} + +var xxx_messageInfo_SettledOrderbookParticipation proto.InternalMessageInfo + +func (m *SettledOrderbookParticipation) GetIndex() uint64 { + if m != nil { + return m.Index + } + return 0 +} + +func (m *SettledOrderbookParticipation) GetOrderBookUID() string { + if m != nil { + return m.OrderBookUID + } + return "" +} + +func (m *SettledOrderbookParticipation) GetParticipantAddress() string { + if m != nil { + return m.ParticipantAddress + } + return "" +} + func init() { proto.RegisterType((*OrderBookParticipation)(nil), "sgenetwork.sge.orderbook.OrderBookParticipation") proto.RegisterType((*ParticipationBetPair)(nil), "sgenetwork.sge.orderbook.ParticipationBetPair") + proto.RegisterType((*SettledOrderbookParticipation)(nil), "sgenetwork.sge.orderbook.SettledOrderbookParticipation") } func init() { proto.RegisterFile("sge/orderbook/participation.proto", fileDescriptor_2962bcb47b63c36a) } var fileDescriptor_2962bcb47b63c36a = []byte{ - // 747 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4f, 0x6f, 0xd3, 0x3e, - 0x18, 0x6e, 0xf6, 0xbf, 0x5e, 0xb7, 0xdf, 0x7e, 0x59, 0xb7, 0x45, 0x45, 0xc4, 0xc3, 0x12, 0xd3, - 0x0e, 0xac, 0x3d, 0xc0, 0x69, 0xe2, 0xb2, 0x80, 0x26, 0x15, 0x8d, 0xb5, 0x18, 0x10, 0x12, 0x42, - 0x32, 0x69, 0xe3, 0x16, 0xab, 0x6d, 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 0x70, 0xd6, 0x7a, 0x11, 0xfc, 0xbf, 0x1f, 0xbb, 0xc9, - 0x19, 0xc2, 0x69, 0x26, 0x9e, 0xea, 0xf5, 0x6e, 0xe6, 0xf8, 0x04, 0xa6, 0x3e, 0x9e, 0xc0, 0xd4, - 0xcf, 0x13, 0x98, 0x42, 0x3f, 0x0c, 0x90, 0x1d, 0xc9, 0x71, 0x87, 0xca, 0xb2, 0xcb, 0x82, 0x31, - 0x31, 0x6d, 0xfc, 0x93, 0x98, 0x8e, 0x35, 0x88, 0x1e, 0x14, 0x53, 0x2a, 0x17, 0xc6, 0xc5, 0xf4, - 0x00, 0x34, 0x1c, 0xd3, 0x71, 0xb5, 0xa8, 0x66, 0x48, 0x01, 0xcc, 0xc7, 0x9f, 0x4b, 0xec, 0x4a, - 0x67, 0xfd, 0x5a, 0x37, 0x82, 0x73, 0x0e, 0x95, 0xda, 0xcf, 0xc5, 0x21, 0xbe, 0x58, 0x38, 0xfb, - 0xa7, 0x5d, 0xdb, 0x38, 0xeb, 0xda, 0xc6, 0xf7, 0xae, 0x6d, 0x7c, 0x38, 0xb7, 0x53, 0x67, 0xe7, - 0x76, 0xea, 0xeb, 0xb9, 0x9d, 0x7a, 0x79, 0x67, 0xe8, 0x91, 0x88, 0x3a, 0xdd, 0xe9, 0x4f, 0xc3, - 0x78, 0x5d, 0xe8, 0x0c, 0x4d, 0x4f, 0xf5, 0x70, 0x2a, 0x73, 0x6a, 0x0c, 0xde, 0xfd, 0x1d, 0x00, - 0x00, 0xff, 0xff, 0x32, 0xe0, 0x24, 0x5d, 0x5b, 0x07, 0x00, 0x00, + // 762 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x3f, 0x6f, 0xd3, 0x4e, + 0x18, 0x8e, 0xfb, 0x3f, 0xd7, 0xb4, 0xbf, 0xfe, 0xdc, 0xb4, 0xb5, 0x82, 0xea, 0x2b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fd, 0xac, 0xf8, 0xe0, 0x67, 0x08, 0x2f, 0x55, 0xda, 0x97, 0xf6, 0x7a, + 0x09, 0xac, 0xc6, 0x5d, 0x79, 0x02, 0x3b, 0xae, 0xeb, 0x13, 0xce, 0x8d, 0x69, 0x09, 0x68, 0xf6, + 0x42, 0x98, 0x53, 0x0a, 0x26, 0x14, 0x21, 0x5b, 0x1f, 0x89, 0xee, 0xab, 0xa0, 0xfe, 0x0a, 0xa4, + 0x9b, 0xf4, 0x4d, 0x40, 0x5d, 0x2a, 0x8e, 0x8d, 0x19, 0x09, 0x63, 0x9d, 0x85, 0x30, 0xf5, 0x35, + 0x84, 0xdb, 0x75, 0x2a, 0x5e, 0x07, 0x95, 0x7c, 0x95, 0xb5, 0x0a, 0x55, 0xc6, 0x5b, 0x8c, 0xf7, + 0x7f, 0x76, 0xb9, 0xdb, 0x28, 0x88, 0xe3, 0x36, 0xe1, 0xf9, 0xa2, 0x27, 0x7a, 0x21, 0x5c, 0x51, + 0xa4, 0x31, 0x10, 0xb2, 0x87, 0xa0, 0xfa, 0x11, 0x98, 0xae, 0x11, 0x62, 0xcc, 0x4a, 0xec, 0x7b, + 0x89, 0xb1, 0x81, 0xc2, 0xae, 0x11, 0x82, 0xec, 0x08, 0x48, 0x3f, 0xd1, 0xc0, 0x46, 0x35, 0xf0, + 0x7d, 0xe2, 0x09, 0xec, 0xb3, 0xc0, 0x73, 0xf1, 0xb0, 0x81, 0x39, 0x49, 0x52, 0x4e, 0x4c, 0x62, + 0x2a, 0x92, 0xdf, 0xc0, 0x22, 0x7b, 0xad, 0x9f, 0xb1, 0xa3, 0xc4, 0x61, 0xdc, 0xda, 0x63, 0x90, + 0x25, 0x9d, 0x36, 0xe3, 0x81, 0x4f, 0x38, 0xf6, 0x98, 0xc0, 0x35, 0xda, 0x6c, 0x12, 0xd7, 0x98, + 0x97, 0x17, 0x02, 0xf6, 0x42, 0x78, 0x43, 0x01, 0x4f, 0xaa, 0x42, 0xb6, 0x1e, 0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, 0x03, 0x43, 0x76, 0x46, 0xed, 0xcb, 0x72, 0xab, 0xdf, 0x05, 0x80, 0x72, + 0xcc, 0x89, 0x10, 0xd1, 0x2b, 0x5b, 0xde, 0xd2, 0x76, 0x16, 0xac, 0xb5, 0x5e, 0x08, 0xff, 0xef, + 0xdb, 0x6e, 0x9c, 0x43, 0x76, 0x9a, 0xf2, 0x27, 0x6a, 0xbd, 0x97, 0x39, 0x39, 0x85, 0xa9, 0x0f, + 0xa7, 0x30, 0xf5, 0xe3, 0x14, 0xa6, 0xd0, 0x77, 0x0d, 0x64, 0xc7, 0x7c, 0xdc, 0x22, 0xa2, 0xec, + 0x50, 0x7f, 0x82, 0x4d, 0x6b, 0x7f, 0xc5, 0xa6, 0x23, 0x0e, 0xac, 0x06, 0xc5, 0x94, 0xf4, 0x85, + 0x49, 0x36, 0x3d, 0x2c, 0x1a, 0xb5, 0xe9, 0x28, 0x5a, 0x94, 0x33, 0xa4, 0x00, 0xe6, 0xa3, 0xe7, + 0x12, 0xa9, 0x52, 0x5e, 0xbf, 0xd6, 0x0d, 0xe1, 0x9c, 0x45, 0x84, 0xd2, 0x33, 0x48, 0xda, 0x83, + 0x45, 0xd4, 0xe6, 0x66, 0xff, 0x00, 0x4a, 0x83, 0x11, 0xf7, 0xef, 0x8d, 0x2f, 0xeb, 0xe0, 0xac, + 0x6b, 0x6a, 0xe7, 0x5d, 0x53, 0xfb, 0xd6, 0x35, 0xb5, 0xf7, 0x17, 0x66, 0xea, 0xfc, 0xc2, 0x4c, + 0x7d, 0xb9, 0x30, 0x53, 0x2f, 0x6e, 0x8f, 0xdc, 0x3c, 0x5e, 0x27, 0xbb, 0xfd, 0xa1, 0x1f, 0xad, + 0x0b, 0x9d, 0x91, 0x8f, 0x04, 0x79, 0x07, 0x2b, 0x73, 0x72, 0xda, 0xdf, 0xf9, 0x15, 0x00, 0x00, + 0xff, 0xff, 0x19, 0x1e, 0xdc, 0xad, 0x42, 0x08, 0x00, 0x00, } func (m *OrderBookParticipation) Marshal() (dAtA []byte, err error) { @@ -401,6 +467,48 @@ func (m *ParticipationBetPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *SettledOrderbookParticipation) 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 *SettledOrderbookParticipation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SettledOrderbookParticipation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ParticipantAddress) > 0 { + i -= len(m.ParticipantAddress) + copy(dAtA[i:], m.ParticipantAddress) + i = encodeVarintParticipation(dAtA, i, uint64(len(m.ParticipantAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.OrderBookUID) > 0 { + i -= len(m.OrderBookUID) + copy(dAtA[i:], m.OrderBookUID) + i = encodeVarintParticipation(dAtA, i, uint64(len(m.OrderBookUID))) + i-- + dAtA[i] = 0x12 + } + if m.Index != 0 { + i = encodeVarintParticipation(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintParticipation(dAtA []byte, offset int, v uint64) int { offset -= sovParticipation(v) base := offset @@ -478,6 +586,26 @@ func (m *ParticipationBetPair) Size() (n int) { return n } +func (m *SettledOrderbookParticipation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Index != 0 { + n += 1 + sovParticipation(uint64(m.Index)) + } + l = len(m.OrderBookUID) + if l > 0 { + n += 1 + l + sovParticipation(uint64(l)) + } + l = len(m.ParticipantAddress) + if l > 0 { + n += 1 + l + sovParticipation(uint64(l)) + } + return n +} + func sovParticipation(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1093,6 +1221,139 @@ func (m *ParticipationBetPair) Unmarshal(dAtA []byte) error { } return nil } +func (m *SettledOrderbookParticipation) 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 ErrIntOverflowParticipation + } + 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: SettledOrderbookParticipation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SettledOrderbookParticipation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + m.Index = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParticipation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Index |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderBookUID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParticipation + } + 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 ErrInvalidLengthParticipation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParticipation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderBookUID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParticipantAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParticipation + } + 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 ErrInvalidLengthParticipation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParticipation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ParticipantAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParticipation(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParticipation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipParticipation(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/orderbook/types/query.pb.go b/x/orderbook/types/query.pb.go index 55bf6e8d..9c92294b 100644 --- a/x/orderbook/types/query.pb.go +++ b/x/orderbook/types/query.pb.go @@ -1234,6 +1234,122 @@ func (m *QueryParticipationFulfilledBetsResponse) GetPagination() *query.PageRes return nil } +// QuerySettledOrderBookParticipationsOfHeightRequest is the request type for the settled orderbook participations of a +// certain height list query. +type QuerySettledOrderBookParticipationsOfHeightRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` + BlockHeight int64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` +} + +func (m *QuerySettledOrderBookParticipationsOfHeightRequest) Reset() { + *m = QuerySettledOrderBookParticipationsOfHeightRequest{} +} +func (m *QuerySettledOrderBookParticipationsOfHeightRequest) String() string { + return proto.CompactTextString(m) +} +func (*QuerySettledOrderBookParticipationsOfHeightRequest) ProtoMessage() {} +func (*QuerySettledOrderBookParticipationsOfHeightRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8b016841afa49a45, []int{22} +} +func (m *QuerySettledOrderBookParticipationsOfHeightRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySettledOrderBookParticipationsOfHeightRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySettledOrderBookParticipationsOfHeightRequest.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 *QuerySettledOrderBookParticipationsOfHeightRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySettledOrderBookParticipationsOfHeightRequest.Merge(m, src) +} +func (m *QuerySettledOrderBookParticipationsOfHeightRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySettledOrderBookParticipationsOfHeightRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySettledOrderBookParticipationsOfHeightRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySettledOrderBookParticipationsOfHeightRequest proto.InternalMessageInfo + +func (m *QuerySettledOrderBookParticipationsOfHeightRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +func (m *QuerySettledOrderBookParticipationsOfHeightRequest) GetBlockHeight() int64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +// QuerySettledOrderBookParticipationsOfHeightResponse is the response type for the settled orderbook participations of +// a certain height list query. +type QuerySettledOrderBookParticipationsOfHeightResponse struct { + Participations []OrderBookParticipation `protobuf:"bytes,1,rep,name=participations,proto3" json:"participations"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QuerySettledOrderBookParticipationsOfHeightResponse) Reset() { + *m = QuerySettledOrderBookParticipationsOfHeightResponse{} +} +func (m *QuerySettledOrderBookParticipationsOfHeightResponse) String() string { + return proto.CompactTextString(m) +} +func (*QuerySettledOrderBookParticipationsOfHeightResponse) ProtoMessage() {} +func (*QuerySettledOrderBookParticipationsOfHeightResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8b016841afa49a45, []int{23} +} +func (m *QuerySettledOrderBookParticipationsOfHeightResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySettledOrderBookParticipationsOfHeightResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySettledOrderBookParticipationsOfHeightResponse.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 *QuerySettledOrderBookParticipationsOfHeightResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySettledOrderBookParticipationsOfHeightResponse.Merge(m, src) +} +func (m *QuerySettledOrderBookParticipationsOfHeightResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySettledOrderBookParticipationsOfHeightResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySettledOrderBookParticipationsOfHeightResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySettledOrderBookParticipationsOfHeightResponse proto.InternalMessageInfo + +func (m *QuerySettledOrderBookParticipationsOfHeightResponse) GetParticipations() []OrderBookParticipation { + if m != nil { + return m.Participations + } + return nil +} + +func (m *QuerySettledOrderBookParticipationsOfHeightResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "sgenetwork.sge.orderbook.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "sgenetwork.sge.orderbook.QueryParamsResponse") @@ -1257,84 +1373,92 @@ func init() { proto.RegisterType((*QueryHistoricalParticipationExposuresResponse)(nil), "sgenetwork.sge.orderbook.QueryHistoricalParticipationExposuresResponse") proto.RegisterType((*QueryParticipationFulfilledBetsRequest)(nil), "sgenetwork.sge.orderbook.QueryParticipationFulfilledBetsRequest") proto.RegisterType((*QueryParticipationFulfilledBetsResponse)(nil), "sgenetwork.sge.orderbook.QueryParticipationFulfilledBetsResponse") + proto.RegisterType((*QuerySettledOrderBookParticipationsOfHeightRequest)(nil), "sgenetwork.sge.orderbook.QuerySettledOrderBookParticipationsOfHeightRequest") + proto.RegisterType((*QuerySettledOrderBookParticipationsOfHeightResponse)(nil), "sgenetwork.sge.orderbook.QuerySettledOrderBookParticipationsOfHeightResponse") } func init() { proto.RegisterFile("sge/orderbook/query.proto", fileDescriptor_8b016841afa49a45) } var fileDescriptor_8b016841afa49a45 = []byte{ - // 1139 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4f, 0x6f, 0xdc, 0x44, - 0x14, 0xcf, 0xa4, 0x25, 0x90, 0x57, 0x84, 0x94, 0x97, 0x34, 0x9b, 0x58, 0xcd, 0x26, 0x75, 0xab, - 0xa6, 0xd0, 0xc4, 0x4e, 0x02, 0xea, 0x1f, 0x29, 0x29, 0xb0, 0x6a, 0xd3, 0x16, 0x81, 0x12, 0x82, - 0x72, 0x81, 0x43, 0xf0, 0xee, 0x4e, 0x5d, 0x2b, 0x9b, 0x1d, 0xd7, 0xf6, 0x42, 0xaa, 0x28, 0x17, - 0x84, 0xc4, 0x0d, 0x21, 0x7a, 0xe8, 0x01, 0xbe, 0x02, 0xdf, 0x80, 0x1b, 0x48, 0xf4, 0x18, 0xa9, - 0x07, 0x38, 0x55, 0x28, 0x8b, 0x04, 0x07, 0x2e, 0x7c, 0x01, 0x40, 0x1e, 0x8f, 0x9d, 0xf5, 0xda, - 0x5e, 0xff, 0xc9, 0x4a, 0xa5, 0xdc, 0x76, 0xf7, 0xf9, 0xbd, 0xf7, 0xfb, 0xf3, 0x66, 0x3c, 0xb3, - 0x30, 0x69, 0xeb, 0x54, 0x65, 0x56, 0x9d, 0x5a, 0x55, 0xc6, 0xb6, 0xd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0x0d, 0x71, - 0x1c, 0x86, 0x6c, 0x47, 0x73, 0x5a, 0x5e, 0xe5, 0xe1, 0x0d, 0xf1, 0x0d, 0x57, 0x01, 0x8e, 0x24, - 0x9e, 0x18, 0xe4, 0x5d, 0x2f, 0x28, 0x9e, 0x1f, 0x8a, 0xeb, 0x87, 0xe2, 0x59, 0x28, 0xfc, 0x50, - 0xd6, 0x35, 0x9d, 0x8a, 0x9a, 0x1b, 0x1d, 0x99, 0xf2, 0x77, 0x04, 0x4a, 0x91, 0xd6, 0x82, 0xd5, - 0x1d, 0x80, 0x00, 0xb7, 0xdb, 0xff, 0xc4, 0xc5, 0x53, 0x4b, 0xe7, 0x92, 0x99, 0x05, 0x15, 0x04, - 0xb9, 0x8e, 0x64, 0xbc, 0x15, 0x03, 0x77, 0x36, 0x15, 0xae, 0x87, 0x23, 0x84, 0x77, 0x05, 0x4e, - 0x87, 0xe1, 0xfa, 0x42, 0x9d, 0x87, 0x57, 0x78, 0xbf, 0x2d, 0xb7, 0xe1, 0x56, 0xcb, 0xa8, 0x0b, - 0xc1, 0x5e, 0x66, 0xfe, 0x93, 0x9b, 0x46, 0x5d, 0xae, 0x76, 0x0b, 0x1d, 0x90, 0xbd, 0x2d, 0xc8, - 0xf2, 0x7c, 0x61, 0x63, 0x0e, 0xb2, 0xc3, 0x41, 0x1b, 0xf9, 0x21, 0x81, 0x73, 0xe1, 0x26, 0xeb, - 0x9d, 0xd3, 0x67, 0xe7, 0x42, 0xdc, 0x37, 0xa3, 0xdb, 0x04, 0xce, 0xf7, 0x46, 0x25, 0x84, 0xb0, - 0x60, 0xb2, 0x03, 0x56, 0x68, 0xe1, 0xf8, 0x43, 0xb0, 0x90, 0x41, 0x97, 0x50, 0x75, 0x21, 0x52, - 0x89, 0xc5, 0xf7, 0xee, 0xdf, 0x78, 0xec, 0x81, 0xdc, 0x83, 0x64, 0x3e, 0xe5, 0x55, 0x18, 0x0d, - 0xb1, 0xdf, 0x32, 0x9a, 0x75, 0xba,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 0x4f, 0x32, 0xfc, 0x6f, 0x02, 0x52, 0xf2, - 0xc1, 0x05, 0xdf, 0xca, 0x63, 0x5b, 0xdc, 0xe9, 0x4d, 0x7a, 0xfb, 0x18, 0x15, 0x04, 0xdf, 0x8f, - 0x38, 0xdf, 0x4d, 0xfc, 0xa0, 0x1f, 0x9b, 0xab, 0x7a, 0xd7, 0xef, 0xc1, 0x0f, 0x5f, 0x95, 0xd5, - 0xc7, 0x87, 0x65, 0x72, 0x70, 0x58, 0x26, 0xbf, 0x1e, 0x96, 0xc9, 0x57, 0xed, 0xf2, 0xc0, 0x41, - 0xbb, 0x3c, 0xf0, 0x4b, 0xbb, 0x3c, 0xf0, 0xe1, 0x9c, 0x6e, 0x38, 0xf7, 0x5a, 0x55, 0xa5, 0xc6, - 0x76, 0xdc, 0xc6, 0xf3, 0x82, 0x04, 0x07, 0xb1, 0xdb, 0x01, 0xc3, 0x79, 0x60, 0x52, 0xbb, 0x3a, - 0xc4, 0xff, 0xb0, 0x7e, 0xfd, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x89, 0x3e, 0x08, 0xc3, - 0x17, 0x00, 0x00, + // 1241 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0x5f, 0x4f, 0x1c, 0x55, + 0x14, 0xe7, 0xd2, 0x8a, 0x72, 0x68, 0x9a, 0xf4, 0x40, 0x59, 0x98, 0x94, 0x05, 0xa6, 0x0d, 0x54, + 0x0b, 0x33, 0x40, 0x4d, 0xff, 0x24, 0x50, 0x75, 0xd3, 0x52, 0x6a, 0xda, 0x80, 0xdb, 0xf0, 0xa2, + 0x89, 0x38, 0xbb, 0x7b, 0x19, 0x26, 0x2c, 0x7b, 0xa7, 0x3b, 0xb3, 0x4a, 0x43, 0x78, 0x51, 0x13, + 0xdf, 0x8c, 0xb1, 0x0f, 0x7d, 0xd0, 0xc4, 0x4f,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dd, 0x67, 0xa5, 0x42, 0xdc, 0x31, 0xa3, 0x0f, 0x08, 0x5c, 0x38, 0x1a, 0x95, + 0x10, 0xa2, 0x0e, 0xc3, 0x4d, 0xb0, 0x02, 0x1b, 0xc7, 0x6b, 0x82, 0x99, 0x04, 0xba, 0x04, 0xb2, + 0x0b, 0x91, 0x72, 0x2c, 0xbc, 0x76, 0xe7, 0xda, 0x63, 0x07, 0xe4, 0x23, 0x48, 0xa6, 0x53, 0x5e, + 0x85, 0xfe, 0x00, 0xfb, 0x35, 0xa3, 0x56, 0xa1, 0xdb, 0x1c, 0xdd, 0xc9, 0x22, 0x06, 0x96, 0xee, + 0x38, 0x2b, 0xf2, 0xe3, 0xa3, 0x8d, 0xf7, 0x15, 0x36, 0x61, 0x28, 0x4a, 0x61, 0xd1, 0x78, 0x59, + 0x05, 0x1e, 0x0c, 0x17, 0x58, 0xfe, 0x92, 0x40, 0x3e, 0x88, 0xec, 0x96, 0x38, 0xed, 0x5e, 0x50, + 0x37, 0x3e, 0x25, 0x30, 0x1a, 0x09, 0x48, 0xc8, 0xa4, 0xc3, 0x40, 0x13, 0x22, 0xef, 0x78, 0xf6, + 0x7a, 0x50, 0x4d, 0x20, 0xd1, 0x72, 0xa5, 0x62, 0x79, 0x79, 0x85, 0x42, 0xc8, 0xda, 0x0a, 0x76, + 0xae, 0xfb, 0x3e, 0x82, 0x91, 0x70, 0x52, 0xe9, 0x44, 0x1e, 0x86, 0xd7, 0x58, 0xa5, 0x62, 0xf1, + 0xf5, 0x6e, 0xbe, 0xfe, 0xaa, 0xf3, 0xb7, 0x73, 0x7e, 0x7d, 0x11, 0x69, 0xa4, 0x2f, 0x1b, 0x85, + 0xfe, 0x10, 0xd9, 0x44, 0x63, 0x65, 0x54, 0xed, 0x4c, 0x9b, 0x6a, 0xf2, 0x37, 0x04, 0x2e, 0x1d, + 0xd1, 0xec, 0x2f, 0xb8, 0xbf, 0xfe, 0x20, 0x30, 0x95, 0x0c, 0x9d, 0x50, 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0x37, 0xab, 0xba, + 0xd3, 0x3c, 0xdd, 0xee, 0x16, 0x16, 0x9f, 0xec, 0xe7, 0xc9, 0xde, 0x7e, 0x9e, 0xfc, 0xb6, 0x9f, + 0x27, 0x5f, 0x1d, 0xe4, 0xbb, 0xf6, 0x0e, 0xf2, 0x5d, 0xbf, 0x1e, 0xe4, 0xbb, 0xde, 0x9f, 0xd2, + 0x0d, 0x7b, 0xa3, 0x51, 0x52, 0xca, 0x6c, 0xcb, 0xc9, 0x3c, 0x2d, 0x10, 0xf3, 0x2a, 0xdb, 0x4d, + 0x75, 0xec, 0x87, 0x26, 0xb5, 0x4a, 0x3d, 0xfc, 0x3f, 0x27, 0x97, 0xff, 0x0d, 0x00, 0x00, 0xff, + 0xff, 0xeb, 0x7c, 0xb0, 0x77, 0x4c, 0x1a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1378,6 +1502,8 @@ type QueryClient interface { // ParticipationFulfilledBets queries fulfilled bets for given order book // participation. ParticipationFulfilledBets(ctx context.Context, in *QueryParticipationFulfilledBetsRequest, opts ...grpc.CallOption) (*QueryParticipationFulfilledBetsResponse, error) + // Queries list of settled Orderbook Participation items of a certain height. + SettledOrderbookParticipationsOfHeight(ctx context.Context, in *QuerySettledOrderBookParticipationsOfHeightRequest, opts ...grpc.CallOption) (*QuerySettledOrderBookParticipationsOfHeightResponse, error) } type queryClient struct { @@ -1487,6 +1613,15 @@ func (c *queryClient) ParticipationFulfilledBets(ctx context.Context, in *QueryP return out, nil } +func (c *queryClient) SettledOrderbookParticipationsOfHeight(ctx context.Context, in *QuerySettledOrderBookParticipationsOfHeightRequest, opts ...grpc.CallOption) (*QuerySettledOrderBookParticipationsOfHeightResponse, error) { + out := new(QuerySettledOrderBookParticipationsOfHeightResponse) + err := c.cc.Invoke(ctx, "/sgenetwork.sge.orderbook.Query/SettledOrderbookParticipationsOfHeight", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Params queries the parameters of the module. @@ -1518,6 +1653,8 @@ type QueryServer interface { // ParticipationFulfilledBets queries fulfilled bets for given order book // participation. ParticipationFulfilledBets(context.Context, *QueryParticipationFulfilledBetsRequest) (*QueryParticipationFulfilledBetsResponse, error) + // Queries list of settled Orderbook Participation items of a certain height. + SettledOrderbookParticipationsOfHeight(context.Context, *QuerySettledOrderBookParticipationsOfHeightRequest) (*QuerySettledOrderBookParticipationsOfHeightResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1557,6 +1694,9 @@ func (*UnimplementedQueryServer) HistoricalParticipationExposures(ctx context.Co func (*UnimplementedQueryServer) ParticipationFulfilledBets(ctx context.Context, req *QueryParticipationFulfilledBetsRequest) (*QueryParticipationFulfilledBetsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ParticipationFulfilledBets not implemented") } +func (*UnimplementedQueryServer) SettledOrderbookParticipationsOfHeight(ctx context.Context, req *QuerySettledOrderBookParticipationsOfHeightRequest) (*QuerySettledOrderBookParticipationsOfHeightResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SettledOrderbookParticipationsOfHeight not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1760,6 +1900,24 @@ func _Query_ParticipationFulfilledBets_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _Query_SettledOrderbookParticipationsOfHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySettledOrderBookParticipationsOfHeightRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SettledOrderbookParticipationsOfHeight(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sgenetwork.sge.orderbook.Query/SettledOrderbookParticipationsOfHeight", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SettledOrderbookParticipationsOfHeight(ctx, req.(*QuerySettledOrderBookParticipationsOfHeightRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "sgenetwork.sge.orderbook.Query", HandlerType: (*QueryServer)(nil), @@ -1808,6 +1966,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ParticipationFulfilledBets", Handler: _Query_ParticipationFulfilledBets_Handler, }, + { + MethodName: "SettledOrderbookParticipationsOfHeight", + Handler: _Query_SettledOrderbookParticipationsOfHeight_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "sge/orderbook/query.proto", @@ -2717,6 +2879,95 @@ func (m *QueryParticipationFulfilledBetsResponse) MarshalToSizedBuffer(dAtA []by return len(dAtA) - i, nil } +func (m *QuerySettledOrderBookParticipationsOfHeightRequest) 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 *QuerySettledOrderBookParticipationsOfHeightRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySettledOrderBookParticipationsOfHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x10 + } + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySettledOrderBookParticipationsOfHeightResponse) 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 *QuerySettledOrderBookParticipationsOfHeightResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySettledOrderBookParticipationsOfHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Participations) > 0 { + for iNdEx := len(m.Participations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Participations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -3085,6 +3336,41 @@ func (m *QueryParticipationFulfilledBetsResponse) Size() (n int) { return n } +func (m *QuerySettledOrderBookParticipationsOfHeightRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.BlockHeight != 0 { + n += 1 + sovQuery(uint64(m.BlockHeight)) + } + return n +} + +func (m *QuerySettledOrderBookParticipationsOfHeightResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Participations) > 0 { + for _, e := range m.Participations { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -5474,6 +5760,231 @@ func (m *QueryParticipationFulfilledBetsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QuerySettledOrderBookParticipationsOfHeightRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySettledOrderBookParticipationsOfHeightRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySettledOrderBookParticipationsOfHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySettledOrderBookParticipationsOfHeightResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySettledOrderBookParticipationsOfHeightResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySettledOrderBookParticipationsOfHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Participations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Participations = append(m.Participations, OrderBookParticipation{}) + if err := m.Participations[len(m.Participations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/orderbook/types/query.pb.gw.go b/x/orderbook/types/query.pb.gw.go index b3472daf..21a77d62 100644 --- a/x/orderbook/types/query.pb.gw.go +++ b/x/orderbook/types/query.pb.gw.go @@ -805,6 +805,78 @@ func local_request_Query_ParticipationFulfilledBets_0(ctx context.Context, marsh } +var ( + filter_Query_SettledOrderbookParticipationsOfHeight_0 = &utilities.DoubleArray{Encoding: map[string]int{"block_height": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_SettledOrderbookParticipationsOfHeight_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySettledOrderBookParticipationsOfHeightRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["block_height"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "block_height") + } + + protoReq.BlockHeight, err = runtime.Int64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "block_height", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SettledOrderbookParticipationsOfHeight_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SettledOrderbookParticipationsOfHeight(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SettledOrderbookParticipationsOfHeight_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySettledOrderBookParticipationsOfHeightRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["block_height"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "block_height") + } + + protoReq.BlockHeight, err = runtime.Int64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "block_height", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SettledOrderbookParticipationsOfHeight_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SettledOrderbookParticipationsOfHeight(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -1064,6 +1136,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_SettledOrderbookParticipationsOfHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_SettledOrderbookParticipationsOfHeight_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SettledOrderbookParticipationsOfHeight_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1325,6 +1420,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_SettledOrderbookParticipationsOfHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_SettledOrderbookParticipationsOfHeight_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SettledOrderbookParticipationsOfHeight_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1350,6 +1465,8 @@ var ( pattern_Query_HistoricalParticipationExposures_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"sge", "orderbook", "order_book_uid", "historical-participation-exposures"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_ParticipationFulfilledBets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"sge", "orderbook", "order_book_uid", "participations", "participation_index", "fulfilled_bets"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_SettledOrderbookParticipationsOfHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sge", "orderbook", "participations", "settled", "block_height"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1374,4 +1491,6 @@ var ( forward_Query_HistoricalParticipationExposures_0 = runtime.ForwardResponseMessage forward_Query_ParticipationFulfilledBets_0 = runtime.ForwardResponseMessage + + forward_Query_SettledOrderbookParticipationsOfHeight_0 = runtime.ForwardResponseMessage )