diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/query.rpc.Query.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/query.rpc.Query.ts index 4b5ccc331b..03e7723538 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/query.rpc.Query.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/query.rpc.Query.ts @@ -1,7 +1,7 @@ import { Rpc } from "../../helpers"; import * as _m0 from "protobufjs/minimal"; import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate"; -import { QueryGetClobPairRequest, QueryClobPairResponse, QueryAllClobPairRequest, QueryClobPairAllResponse, MevNodeToNodeCalculationRequest, MevNodeToNodeCalculationResponse, QueryEquityTierLimitConfigurationRequest, QueryEquityTierLimitConfigurationResponse, QueryBlockRateLimitConfigurationRequest, QueryBlockRateLimitConfigurationResponse, QueryLiquidationsConfigurationRequest, QueryLiquidationsConfigurationResponse, StreamOrderbookUpdatesRequest, StreamOrderbookUpdatesResponse } from "./query"; +import { QueryGetClobPairRequest, QueryClobPairResponse, QueryAllClobPairRequest, QueryClobPairAllResponse, MevNodeToNodeCalculationRequest, MevNodeToNodeCalculationResponse, QueryEquityTierLimitConfigurationRequest, QueryEquityTierLimitConfigurationResponse, QueryBlockRateLimitConfigurationRequest, QueryBlockRateLimitConfigurationResponse, QueryLiquidationsConfigurationRequest, QueryLiquidationsConfigurationResponse, QueryStatefulOrderRequest, QueryStatefulOrderResponse, StreamOrderbookUpdatesRequest, StreamOrderbookUpdatesResponse } from "./query"; /** Query defines the gRPC querier service. */ export interface Query { @@ -22,6 +22,9 @@ export interface Query { /** Queries LiquidationsConfiguration. */ liquidationsConfiguration(request?: QueryLiquidationsConfigurationRequest): Promise; + /** Queries the stateful order for a given order id. */ + + statefulOrder(request: QueryStatefulOrderRequest): Promise; /** Streams orderbook updates. */ streamOrderbookUpdates(request: StreamOrderbookUpdatesRequest): Promise; @@ -37,6 +40,7 @@ export class QueryClientImpl implements Query { this.equityTierLimitConfiguration = this.equityTierLimitConfiguration.bind(this); this.blockRateLimitConfiguration = this.blockRateLimitConfiguration.bind(this); this.liquidationsConfiguration = this.liquidationsConfiguration.bind(this); + this.statefulOrder = this.statefulOrder.bind(this); this.streamOrderbookUpdates = this.streamOrderbookUpdates.bind(this); } @@ -78,6 +82,12 @@ export class QueryClientImpl implements Query { return promise.then(data => QueryLiquidationsConfigurationResponse.decode(new _m0.Reader(data))); } + statefulOrder(request: QueryStatefulOrderRequest): Promise { + const data = QueryStatefulOrderRequest.encode(request).finish(); + const promise = this.rpc.request("dydxprotocol.clob.Query", "StatefulOrder", data); + return promise.then(data => QueryStatefulOrderResponse.decode(new _m0.Reader(data))); + } + streamOrderbookUpdates(request: StreamOrderbookUpdatesRequest): Promise { const data = StreamOrderbookUpdatesRequest.encode(request).finish(); const promise = this.rpc.request("dydxprotocol.clob.Query", "StreamOrderbookUpdates", data); @@ -113,6 +123,10 @@ export const createRpcQueryExtension = (base: QueryClient) => { return queryService.liquidationsConfiguration(request); }, + statefulOrder(request: QueryStatefulOrderRequest): Promise { + return queryService.statefulOrder(request); + }, + streamOrderbookUpdates(request: StreamOrderbookUpdatesRequest): Promise { return queryService.streamOrderbookUpdates(request); } diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/query.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/query.ts index aa31787820..938280147a 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/query.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/query.ts @@ -1,5 +1,6 @@ import { PageRequest, PageRequestSDKType, PageResponse, PageResponseSDKType } from "../../cosmos/base/query/v1beta1/pagination"; import { ValidatorMevMatches, ValidatorMevMatchesSDKType, MevNodeToNodeMetrics, MevNodeToNodeMetricsSDKType } from "./mev"; +import { OrderId, OrderIdSDKType, LongTermOrderPlacement, LongTermOrderPlacementSDKType } from "./order"; import { ClobPair, ClobPairSDKType } from "./clob_pair"; import { EquityTierLimitConfiguration, EquityTierLimitConfigurationSDKType } from "./equity_tier_limit_config"; import { BlockRateLimitConfiguration, BlockRateLimitConfigurationSDKType } from "./block_rate_limit_config"; @@ -171,6 +172,48 @@ export interface QueryBlockRateLimitConfigurationResponse { export interface QueryBlockRateLimitConfigurationResponseSDKType { block_rate_limit_config?: BlockRateLimitConfigurationSDKType; } +/** QueryStatefulOrderRequest is a request message for StatefulOrder. */ + +export interface QueryStatefulOrderRequest { + /** Order id to query. */ + orderId?: OrderId; +} +/** QueryStatefulOrderRequest is a request message for StatefulOrder. */ + +export interface QueryStatefulOrderRequestSDKType { + /** Order id to query. */ + order_id?: OrderIdSDKType; +} +/** + * QueryStatefulOrderResponse is a response message that contains the stateful + * order. + */ + +export interface QueryStatefulOrderResponse { + /** Stateful order placement. */ + orderPlacement?: LongTermOrderPlacement; + /** Fill amounts. */ + + fillAmount: Long; + /** Triggered status. */ + + triggered: boolean; +} +/** + * QueryStatefulOrderResponse is a response message that contains the stateful + * order. + */ + +export interface QueryStatefulOrderResponseSDKType { + /** Stateful order placement. */ + order_placement?: LongTermOrderPlacementSDKType; + /** Fill amounts. */ + + fill_amount: Long; + /** Triggered status. */ + + triggered: boolean; +} /** * QueryLiquidationsConfigurationRequest is a request message for * LiquidationsConfiguration. @@ -783,6 +826,116 @@ export const QueryBlockRateLimitConfigurationResponse = { }; +function createBaseQueryStatefulOrderRequest(): QueryStatefulOrderRequest { + return { + orderId: undefined + }; +} + +export const QueryStatefulOrderRequest = { + encode(message: QueryStatefulOrderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.orderId !== undefined) { + OrderId.encode(message.orderId, writer.uint32(10).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryStatefulOrderRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryStatefulOrderRequest(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.orderId = OrderId.decode(reader, reader.uint32()); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): QueryStatefulOrderRequest { + const message = createBaseQueryStatefulOrderRequest(); + message.orderId = object.orderId !== undefined && object.orderId !== null ? OrderId.fromPartial(object.orderId) : undefined; + return message; + } + +}; + +function createBaseQueryStatefulOrderResponse(): QueryStatefulOrderResponse { + return { + orderPlacement: undefined, + fillAmount: Long.UZERO, + triggered: false + }; +} + +export const QueryStatefulOrderResponse = { + encode(message: QueryStatefulOrderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.orderPlacement !== undefined) { + LongTermOrderPlacement.encode(message.orderPlacement, writer.uint32(10).fork()).ldelim(); + } + + if (!message.fillAmount.isZero()) { + writer.uint32(16).uint64(message.fillAmount); + } + + if (message.triggered === true) { + writer.uint32(24).bool(message.triggered); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryStatefulOrderResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryStatefulOrderResponse(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.orderPlacement = LongTermOrderPlacement.decode(reader, reader.uint32()); + break; + + case 2: + message.fillAmount = (reader.uint64() as Long); + break; + + case 3: + message.triggered = reader.bool(); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): QueryStatefulOrderResponse { + const message = createBaseQueryStatefulOrderResponse(); + message.orderPlacement = object.orderPlacement !== undefined && object.orderPlacement !== null ? LongTermOrderPlacement.fromPartial(object.orderPlacement) : undefined; + message.fillAmount = object.fillAmount !== undefined && object.fillAmount !== null ? Long.fromValue(object.fillAmount) : Long.UZERO; + message.triggered = object.triggered ?? false; + return message; + } + +}; + function createBaseQueryLiquidationsConfigurationRequest(): QueryLiquidationsConfigurationRequest { return {}; } diff --git a/proto/dydxprotocol/clob/query.proto b/proto/dydxprotocol/clob/query.proto index 3745756894..5151a838c6 100644 --- a/proto/dydxprotocol/clob/query.proto +++ b/proto/dydxprotocol/clob/query.proto @@ -9,6 +9,7 @@ import "dydxprotocol/clob/clob_pair.proto"; import "dydxprotocol/clob/equity_tier_limit_config.proto"; import "dydxprotocol/clob/liquidations_config.proto"; import "dydxprotocol/clob/mev.proto"; +import "dydxprotocol/clob/order.proto"; import "dydxprotocol/indexer/off_chain_updates/off_chain_updates.proto"; option go_package = "github.com/dydxprotocol/v4-chain/protocol/x/clob/types"; @@ -52,6 +53,10 @@ service Query { option (google.api.http).get = "/dydxprotocol/clob/liquidations_config"; } + // Queries the stateful order for a given order id. + rpc StatefulOrder(QueryStatefulOrderRequest) + returns (QueryStatefulOrderResponse) {} + // GRPC Streams // Streams orderbook updates. @@ -124,6 +129,25 @@ message QueryBlockRateLimitConfigurationResponse { [ (gogoproto.nullable) = false ]; } +// QueryStatefulOrderRequest is a request message for StatefulOrder. +message QueryStatefulOrderRequest { + // Order id to query. + OrderId order_id = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryStatefulOrderResponse is a response message that contains the stateful +// order. +message QueryStatefulOrderResponse { + // Stateful order placement. + LongTermOrderPlacement order_placement = 1 [ (gogoproto.nullable) = false ]; + + // Fill amounts. + uint64 fill_amount = 2; + + // Triggered status. + bool triggered = 3; +} + // QueryLiquidationsConfigurationRequest is a request message for // LiquidationsConfiguration. message QueryLiquidationsConfigurationRequest {} diff --git a/protocol/mocks/QueryClient.go b/protocol/mocks/QueryClient.go index bd9c3832e8..ad66aec158 100644 --- a/protocol/mocks/QueryClient.go +++ b/protocol/mocks/QueryClient.go @@ -756,6 +756,43 @@ func (_m *QueryClient) PreviousBlockInfo(ctx context.Context, in *types.QueryPre return r0, r1 } +// StatefulOrder provides a mock function with given fields: ctx, in, opts +func (_m *QueryClient) StatefulOrder(ctx context.Context, in *clobtypes.QueryStatefulOrderRequest, opts ...grpc.CallOption) (*clobtypes.QueryStatefulOrderResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for StatefulOrder") + } + + var r0 *clobtypes.QueryStatefulOrderResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *clobtypes.QueryStatefulOrderRequest, ...grpc.CallOption) (*clobtypes.QueryStatefulOrderResponse, error)); ok { + return rf(ctx, in, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *clobtypes.QueryStatefulOrderRequest, ...grpc.CallOption) *clobtypes.QueryStatefulOrderResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*clobtypes.QueryStatefulOrderResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *clobtypes.QueryStatefulOrderRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // StreamOrderbookUpdates provides a mock function with given fields: ctx, in, opts func (_m *QueryClient) StreamOrderbookUpdates(ctx context.Context, in *clobtypes.StreamOrderbookUpdatesRequest, opts ...grpc.CallOption) (clobtypes.Query_StreamOrderbookUpdatesClient, error) { _va := make([]interface{}, len(opts)) diff --git a/protocol/x/clob/client/cli/query.go b/protocol/x/clob/client/cli/query.go index d6dcb9025d..6c7a49f77c 100644 --- a/protocol/x/clob/client/cli/query.go +++ b/protocol/x/clob/client/cli/query.go @@ -26,6 +26,7 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdGetBlockRateLimitConfiguration()) cmd.AddCommand(CmdGetEquityTierLimitConfig()) cmd.AddCommand(CmdGetLiquidationsConfiguration()) + cmd.AddCommand(CmdQueryStatefulOrder()) return cmd } diff --git a/protocol/x/clob/client/cli/query_stateful_order.go b/protocol/x/clob/client/cli/query_stateful_order.go new file mode 100644 index 0000000000..09cf30dc8e --- /dev/null +++ b/protocol/x/clob/client/cli/query_stateful_order.go @@ -0,0 +1,70 @@ +package cli + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/dydxprotocol/v4-chain/protocol/x/clob/types" + satypes "github.com/dydxprotocol/v4-chain/protocol/x/subaccounts/types" + "github.com/spf13/cast" + "github.com/spf13/cobra" +) + +func CmdQueryStatefulOrder() *cobra.Command { + cmd := &cobra.Command{ + Use: "stateful-order subaccount_owner subaccount_number client_id clob_pair_id order_flags", + Short: "queries a stateful order by id", + Args: cobra.ExactArgs(5), + RunE: func(cmd *cobra.Command, args []string) (err error) { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + owner := args[0] + + number, err := cast.ToUint32E(args[1]) + if err != nil { + return err + } + + clientId, err := cast.ToUint32E(args[2]) + if err != nil { + return err + } + + clobPairId, err := cast.ToUint32E(args[3]) + if err != nil { + return err + } + + orderFlag, err := cast.ToUint32E(args[4]) + if err != nil { + return err + } + + req := &types.QueryStatefulOrderRequest{ + OrderId: types.OrderId{ + SubaccountId: satypes.SubaccountId{ + Owner: owner, + Number: number, + }, + ClientId: clientId, + ClobPairId: clobPairId, + OrderFlags: orderFlag, + }, + } + + res, err := queryClient.StatefulOrder(context.Background(), req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/protocol/x/clob/keeper/grpc_query_stateful_order.go b/protocol/x/clob/keeper/grpc_query_stateful_order.go new file mode 100644 index 0000000000..5fdb365695 --- /dev/null +++ b/protocol/x/clob/keeper/grpc_query_stateful_order.go @@ -0,0 +1,43 @@ +package keeper + +import ( + "context" + + "github.com/dydxprotocol/v4-chain/protocol/lib" + "github.com/dydxprotocol/v4-chain/protocol/x/clob/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) StatefulOrder( + c context.Context, + req *types.QueryStatefulOrderRequest, +) (*types.QueryStatefulOrderResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := lib.UnwrapSDKContext(c, types.ModuleName) + + val, found := k.GetLongTermOrderPlacement( + ctx, + req.OrderId, + ) + if !found { + return nil, status.Error(codes.NotFound, "not found") + } + + res := &types.QueryStatefulOrderResponse{ + OrderPlacement: val, + } + + // Get the fill amount + _, fillAmount, _ := k.GetOrderFillAmount(ctx, req.OrderId) + res.FillAmount = fillAmount.ToUint64() + + // Get triggered status for conditional orders + if req.OrderId.IsConditionalOrder() { + res.Triggered = k.IsConditionalOrderTriggered(ctx, req.OrderId) + } + + return res, nil +} diff --git a/protocol/x/clob/keeper/grpc_query_stateful_order_test.go b/protocol/x/clob/keeper/grpc_query_stateful_order_test.go new file mode 100644 index 0000000000..f99791d838 --- /dev/null +++ b/protocol/x/clob/keeper/grpc_query_stateful_order_test.go @@ -0,0 +1,52 @@ +package keeper_test + +import ( + "testing" + + testApp "github.com/dydxprotocol/v4-chain/protocol/testutil/app" + "github.com/dydxprotocol/v4-chain/protocol/testutil/constants" + "github.com/dydxprotocol/v4-chain/protocol/x/clob/types" + "github.com/stretchr/testify/require" +) + +func TestStatefulOrderTest(t *testing.T) { + tApp := testApp.NewTestAppBuilder(t).Build() + ctx := tApp.InitChain() + + tApp.App.ClobKeeper.SetLongTermOrderPlacement( + ctx, + constants.LongTermOrder_Alice_Num0_Id0_Clob0_Buy100_Price10_GTBT15, + 1, + ) + + tApp.App.ClobKeeper.SetOrderFillAmount( + ctx, + constants.LongTermOrder_Alice_Num0_Id0_Clob0_Buy100_Price10_GTBT15.OrderId, + 5, + 123456789, + ) + + res, err := tApp.App.ClobKeeper.StatefulOrder( + ctx, + &types.QueryStatefulOrderRequest{ + OrderId: constants.LongTermOrder_Alice_Num0_Id0_Clob0_Buy100_Price10_GTBT15.OrderId, + }, + ) + + require.NoError(t, err) + require.Equal( + t, + &types.QueryStatefulOrderResponse{ + OrderPlacement: types.LongTermOrderPlacement{ + Order: constants.LongTermOrder_Alice_Num0_Id0_Clob0_Buy100_Price10_GTBT15, + PlacementIndex: types.TransactionOrdering{ + BlockHeight: 1, + TransactionIndex: 0, + }, + }, + FillAmount: 5, + Triggered: false, + }, + res, + ) +} diff --git a/protocol/x/clob/module_test.go b/protocol/x/clob/module_test.go index 643abde49e..4217b6eb4d 100644 --- a/protocol/x/clob/module_test.go +++ b/protocol/x/clob/module_test.go @@ -250,12 +250,13 @@ func TestAppModuleBasic_GetQueryCmd(t *testing.T) { cmd := am.GetQueryCmd() require.Equal(t, "clob", cmd.Use) - require.Equal(t, 5, len(cmd.Commands())) + require.Equal(t, 6, len(cmd.Commands())) require.Equal(t, "get-block-rate-limit-config", cmd.Commands()[0].Name()) require.Equal(t, "get-equity-tier-limit-config", cmd.Commands()[1].Name()) require.Equal(t, "get-liquidations-config", cmd.Commands()[2].Name()) require.Equal(t, "list-clob-pair", cmd.Commands()[3].Name()) require.Equal(t, "show-clob-pair", cmd.Commands()[4].Name()) + require.Equal(t, "stateful-order", cmd.Commands()[5].Name()) } func TestAppModule_Name(t *testing.T) { diff --git a/protocol/x/clob/types/query.pb.go b/protocol/x/clob/types/query.pb.go index ee500746b5..d8ecfb7bf6 100644 --- a/protocol/x/clob/types/query.pb.go +++ b/protocol/x/clob/types/query.pb.go @@ -568,6 +568,117 @@ func (m *QueryBlockRateLimitConfigurationResponse) GetBlockRateLimitConfig() Blo return BlockRateLimitConfiguration{} } +// QueryStatefulOrderRequest is a request message for StatefulOrder. +type QueryStatefulOrderRequest struct { + // Order id to query. + OrderId OrderId `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id"` +} + +func (m *QueryStatefulOrderRequest) Reset() { *m = QueryStatefulOrderRequest{} } +func (m *QueryStatefulOrderRequest) String() string { return proto.CompactTextString(m) } +func (*QueryStatefulOrderRequest) ProtoMessage() {} +func (*QueryStatefulOrderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_3365c195b25c5bc0, []int{10} +} +func (m *QueryStatefulOrderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryStatefulOrderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryStatefulOrderRequest.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 *QueryStatefulOrderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryStatefulOrderRequest.Merge(m, src) +} +func (m *QueryStatefulOrderRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryStatefulOrderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryStatefulOrderRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryStatefulOrderRequest proto.InternalMessageInfo + +func (m *QueryStatefulOrderRequest) GetOrderId() OrderId { + if m != nil { + return m.OrderId + } + return OrderId{} +} + +// QueryStatefulOrderResponse is a response message that contains the stateful +// order. +type QueryStatefulOrderResponse struct { + // Stateful order placement. + OrderPlacement LongTermOrderPlacement `protobuf:"bytes,1,opt,name=order_placement,json=orderPlacement,proto3" json:"order_placement"` + // Fill amounts. + FillAmount uint64 `protobuf:"varint,2,opt,name=fill_amount,json=fillAmount,proto3" json:"fill_amount,omitempty"` + // Triggered status. + Triggered bool `protobuf:"varint,3,opt,name=triggered,proto3" json:"triggered,omitempty"` +} + +func (m *QueryStatefulOrderResponse) Reset() { *m = QueryStatefulOrderResponse{} } +func (m *QueryStatefulOrderResponse) String() string { return proto.CompactTextString(m) } +func (*QueryStatefulOrderResponse) ProtoMessage() {} +func (*QueryStatefulOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3365c195b25c5bc0, []int{11} +} +func (m *QueryStatefulOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryStatefulOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryStatefulOrderResponse.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 *QueryStatefulOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryStatefulOrderResponse.Merge(m, src) +} +func (m *QueryStatefulOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryStatefulOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryStatefulOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryStatefulOrderResponse proto.InternalMessageInfo + +func (m *QueryStatefulOrderResponse) GetOrderPlacement() LongTermOrderPlacement { + if m != nil { + return m.OrderPlacement + } + return LongTermOrderPlacement{} +} + +func (m *QueryStatefulOrderResponse) GetFillAmount() uint64 { + if m != nil { + return m.FillAmount + } + return 0 +} + +func (m *QueryStatefulOrderResponse) GetTriggered() bool { + if m != nil { + return m.Triggered + } + return false +} + // QueryLiquidationsConfigurationRequest is a request message for // LiquidationsConfiguration. type QueryLiquidationsConfigurationRequest struct { @@ -577,7 +688,7 @@ func (m *QueryLiquidationsConfigurationRequest) Reset() { *m = QueryLiqu func (m *QueryLiquidationsConfigurationRequest) String() string { return proto.CompactTextString(m) } func (*QueryLiquidationsConfigurationRequest) ProtoMessage() {} func (*QueryLiquidationsConfigurationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3365c195b25c5bc0, []int{10} + return fileDescriptor_3365c195b25c5bc0, []int{12} } func (m *QueryLiquidationsConfigurationRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -618,7 +729,7 @@ func (m *QueryLiquidationsConfigurationResponse) Reset() { func (m *QueryLiquidationsConfigurationResponse) String() string { return proto.CompactTextString(m) } func (*QueryLiquidationsConfigurationResponse) ProtoMessage() {} func (*QueryLiquidationsConfigurationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3365c195b25c5bc0, []int{11} + return fileDescriptor_3365c195b25c5bc0, []int{13} } func (m *QueryLiquidationsConfigurationResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -665,7 +776,7 @@ func (m *StreamOrderbookUpdatesRequest) Reset() { *m = StreamOrderbookUp func (m *StreamOrderbookUpdatesRequest) String() string { return proto.CompactTextString(m) } func (*StreamOrderbookUpdatesRequest) ProtoMessage() {} func (*StreamOrderbookUpdatesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3365c195b25c5bc0, []int{12} + return fileDescriptor_3365c195b25c5bc0, []int{14} } func (m *StreamOrderbookUpdatesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -722,7 +833,7 @@ func (m *StreamOrderbookUpdatesResponse) Reset() { *m = StreamOrderbookU func (m *StreamOrderbookUpdatesResponse) String() string { return proto.CompactTextString(m) } func (*StreamOrderbookUpdatesResponse) ProtoMessage() {} func (*StreamOrderbookUpdatesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3365c195b25c5bc0, []int{13} + return fileDescriptor_3365c195b25c5bc0, []int{15} } func (m *StreamOrderbookUpdatesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -791,6 +902,8 @@ func init() { proto.RegisterType((*QueryEquityTierLimitConfigurationResponse)(nil), "dydxprotocol.clob.QueryEquityTierLimitConfigurationResponse") proto.RegisterType((*QueryBlockRateLimitConfigurationRequest)(nil), "dydxprotocol.clob.QueryBlockRateLimitConfigurationRequest") proto.RegisterType((*QueryBlockRateLimitConfigurationResponse)(nil), "dydxprotocol.clob.QueryBlockRateLimitConfigurationResponse") + proto.RegisterType((*QueryStatefulOrderRequest)(nil), "dydxprotocol.clob.QueryStatefulOrderRequest") + proto.RegisterType((*QueryStatefulOrderResponse)(nil), "dydxprotocol.clob.QueryStatefulOrderResponse") proto.RegisterType((*QueryLiquidationsConfigurationRequest)(nil), "dydxprotocol.clob.QueryLiquidationsConfigurationRequest") proto.RegisterType((*QueryLiquidationsConfigurationResponse)(nil), "dydxprotocol.clob.QueryLiquidationsConfigurationResponse") proto.RegisterType((*StreamOrderbookUpdatesRequest)(nil), "dydxprotocol.clob.StreamOrderbookUpdatesRequest") @@ -800,77 +913,86 @@ func init() { func init() { proto.RegisterFile("dydxprotocol/clob/query.proto", fileDescriptor_3365c195b25c5bc0) } var fileDescriptor_3365c195b25c5bc0 = []byte{ - // 1112 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x4f, 0x24, 0x45, - 0x14, 0xa7, 0x00, 0x77, 0xe1, 0xb1, 0x6b, 0xb4, 0x58, 0xd8, 0x71, 0x80, 0x01, 0x5a, 0xf9, 0xdc, - 0xd8, 0x0d, 0xec, 0xc6, 0xac, 0xac, 0xd9, 0x04, 0x88, 0xa2, 0xc9, 0xe2, 0x62, 0xbb, 0xa2, 0xd1, - 0x4d, 0x3a, 0x35, 0xdd, 0xc5, 0x4c, 0x85, 0xee, 0xae, 0xa1, 0xbb, 0xa6, 0x03, 0x31, 0xc6, 0xc4, - 0x83, 0x17, 0x3d, 0x98, 0x78, 0xf0, 0xe0, 0xd1, 0xbb, 0xff, 0x81, 0x51, 0x6f, 0x7b, 0xdc, 0xc4, - 0xc4, 0x78, 0x30, 0xc6, 0x80, 0x67, 0xff, 0x86, 0x4d, 0x57, 0xd7, 0xcc, 0xce, 0xd0, 0x1f, 0x03, - 0x5c, 0x66, 0xba, 0x5f, 0xfd, 0xde, 0xeb, 0xdf, 0xfb, 0xa8, 0x5f, 0x15, 0x4c, 0x39, 0xc7, 0xce, - 0x51, 0x23, 0xe0, 0x82, 0xdb, 0xdc, 0x35, 0x6c, 0x97, 0x57, 0x8d, 0xc3, 0x26, 0x0d, 0x8e, 0x75, - 0x69, 0xc3, 0x2f, 0x77, 0x2e, 0xe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, 0x52, 0x41, 0x4f, 0x4f, 0x2a, 0xe8, 0xdf, 0x93, 0x0a, 0xfa, 0xee, - 0xb4, 0xd2, 0xf7, 0xf4, 0xb4, 0xd2, 0xf7, 0xd7, 0x69, 0xa5, 0xef, 0xd3, 0x37, 0x6a, 0x4c, 0xd4, - 0x9b, 0x55, 0xdd, 0xe6, 0x5e, 0x77, 0x32, 0xd1, 0x9d, 0xd7, 0xa5, 0xe0, 0x1a, 0x6d, 0xcb, 0x51, - 0x92, 0xa0, 0x38, 0x6e, 0xd0, 0xb0, 0x7a, 0x45, 0x9a, 0x6f, 0x3f, 0x0b, 0x00, 0x00, 0xff, 0xff, - 0xf1, 0xed, 0x1e, 0x02, 0x67, 0x0d, 0x00, 0x00, + // 1251 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcd, 0x6f, 0xdc, 0x44, + 0x14, 0x8f, 0x93, 0xd0, 0x6e, 0x5f, 0xda, 0x02, 0xd3, 0xaf, 0xad, 0x93, 0x6e, 0x52, 0x43, 0x3e, + 0x4b, 0xed, 0x24, 0xad, 0x50, 0x49, 0x50, 0xa5, 0x24, 0x82, 0x50, 0x29, 0xa1, 0x8b, 0x1b, 0x42, + 0x05, 0x95, 0x2c, 0xaf, 0x3d, 0xeb, 0xb5, 0x62, 0x7b, 0x36, 0xf6, 0x78, 0x95, 0x08, 0x21, 0x24, + 0x0e, 0x5c, 0xe0, 0x80, 0xc4, 0x81, 0x03, 0x12, 0x17, 0xfe, 0x06, 0x8e, 0x08, 0xb8, 0xf5, 0x58, + 0x09, 0x09, 0x71, 0x40, 0x08, 0x25, 0x9c, 0xf9, 0x1b, 0x90, 0x67, 0xc6, 0x9b, 0xdd, 0xd8, 0xde, + 0x4d, 0x72, 0xd9, 0x5d, 0xbf, 0xf7, 0x7b, 0x6f, 0x7e, 0xef, 0x63, 0xde, 0xf3, 0xc2, 0x2d, 0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3b, 0x49, 0x44, 0xdd, 0x13, 0x2b, 0xe2, 0xd8, 0x81, 0x1b, 0x05, 0xd3, 0x59, 0x84, 0xa1, + 0xe6, 0x84, 0xd1, 0xc3, 0xb1, 0x88, 0x82, 0x37, 0xf7, 0x31, 0x88, 0xf2, 0x14, 0x6e, 0x32, 0x62, + 0x4f, 0xa8, 0x49, 0x71, 0x3d, 0xf6, 0x1e, 0x27, 0x73, 0x34, 0xbd, 0x57, 0xcb, 0x50, 0x62, 0x73, + 0x35, 0xad, 0xf9, 0xc8, 0xa2, 0x9c, 0x73, 0x34, 0x33, 0x79, 0x64, 0xa7, 0xbd, 0x44, 0xf8, 0xa3, + 0xf2, 0x93, 0x04, 0x72, 0x9e, 0x6b, 0x11, 0xe5, 0x53, 0x78, 0x99, 0xfb, 0x6e, 0x7a, 0xa6, 0x85, + 0x7d, 0x1c, 0x50, 0x71, 0xc4, 0x6c, 0xce, 0x11, 0x1b, 0x24, 0x70, 0xb6, 0x70, 0xe8, 0x33, 0x17, + 0xd5, 0xd4, 0x40, 0x9c, 0x78, 0x99, 0x74, 0x49, 0xd1, 0x38, 0x8c, 0xd4, 0x5d, 0xcf, 0x33, 0x4c, + 0x9f, 0xc4, 0x01, 0x65, 0x3d, 0x39, 0xac, 0x43, 0x22, 0x5a, 0x61, 0x12, 0x34, 0x06, 0x17, 0x68, + 0xe8, 0x3a, 0x0e, 0x0e, 0xb1, 0xcd, 0xba, 0xb3, 0xa4, 0x1f, 0x09, 0x94, 0x69, 0x98, 0x64, 0xb4, + 0x37, 0x3a, 0x76, 0x53, 0x6e, 0x51, 0xbf, 0x94, 0x60, 0xaa, 0x1f, 0x52, 0x04, 0xfb, 0x0c, 0xae, + 0xe4, 0xac, 0x3a, 0x11, 0xf0, 0x64, 0x5e, 0xc0, 0x19, 0x97, 0x22, 0x58, 0xe4, 0x65, 0x34, 0xca, + 0x0a, 0xdc, 0x7a, 0x42, 0x43, 0x6c, 0xf2, 0xf4, 0xd4, 0x08, 0x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1, 0x9b, 0x8e, 0x4b, 0x1b, 0x71, 0x4d, 0xb5, 0x88, 0xdf, + 0x9d, 0xbc, 0xd6, 0xfd, 0xbb, 0x6c, 0xc0, 0x6b, 0x6d, 0xc9, 0x1e, 0x4f, 0x28, 0xdd, 0x6f, 0xe2, + 0xa8, 0x76, 0x8e, 0x89, 0xef, 0xfd, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xcd, 0x79, 0x36, 0x31, 0x08, + 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -897,6 +1019,8 @@ type QueryClient interface { BlockRateLimitConfiguration(ctx context.Context, in *QueryBlockRateLimitConfigurationRequest, opts ...grpc.CallOption) (*QueryBlockRateLimitConfigurationResponse, error) // Queries LiquidationsConfiguration. LiquidationsConfiguration(ctx context.Context, in *QueryLiquidationsConfigurationRequest, opts ...grpc.CallOption) (*QueryLiquidationsConfigurationResponse, error) + // Queries the stateful order for a given order id. + StatefulOrder(ctx context.Context, in *QueryStatefulOrderRequest, opts ...grpc.CallOption) (*QueryStatefulOrderResponse, error) // Streams orderbook updates. StreamOrderbookUpdates(ctx context.Context, in *StreamOrderbookUpdatesRequest, opts ...grpc.CallOption) (Query_StreamOrderbookUpdatesClient, error) } @@ -963,6 +1087,15 @@ func (c *queryClient) LiquidationsConfiguration(ctx context.Context, in *QueryLi return out, nil } +func (c *queryClient) StatefulOrder(ctx context.Context, in *QueryStatefulOrderRequest, opts ...grpc.CallOption) (*QueryStatefulOrderResponse, error) { + out := new(QueryStatefulOrderResponse) + err := c.cc.Invoke(ctx, "/dydxprotocol.clob.Query/StatefulOrder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) StreamOrderbookUpdates(ctx context.Context, in *StreamOrderbookUpdatesRequest, opts ...grpc.CallOption) (Query_StreamOrderbookUpdatesClient, error) { stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[0], "/dydxprotocol.clob.Query/StreamOrderbookUpdates", opts...) if err != nil { @@ -1009,6 +1142,8 @@ type QueryServer interface { BlockRateLimitConfiguration(context.Context, *QueryBlockRateLimitConfigurationRequest) (*QueryBlockRateLimitConfigurationResponse, error) // Queries LiquidationsConfiguration. LiquidationsConfiguration(context.Context, *QueryLiquidationsConfigurationRequest) (*QueryLiquidationsConfigurationResponse, error) + // Queries the stateful order for a given order id. + StatefulOrder(context.Context, *QueryStatefulOrderRequest) (*QueryStatefulOrderResponse, error) // Streams orderbook updates. StreamOrderbookUpdates(*StreamOrderbookUpdatesRequest, Query_StreamOrderbookUpdatesServer) error } @@ -1035,6 +1170,9 @@ func (*UnimplementedQueryServer) BlockRateLimitConfiguration(ctx context.Context func (*UnimplementedQueryServer) LiquidationsConfiguration(ctx context.Context, req *QueryLiquidationsConfigurationRequest) (*QueryLiquidationsConfigurationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LiquidationsConfiguration not implemented") } +func (*UnimplementedQueryServer) StatefulOrder(ctx context.Context, req *QueryStatefulOrderRequest) (*QueryStatefulOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StatefulOrder not implemented") +} func (*UnimplementedQueryServer) StreamOrderbookUpdates(req *StreamOrderbookUpdatesRequest, srv Query_StreamOrderbookUpdatesServer) error { return status.Errorf(codes.Unimplemented, "method StreamOrderbookUpdates not implemented") } @@ -1151,6 +1289,24 @@ func _Query_LiquidationsConfiguration_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _Query_StatefulOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryStatefulOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).StatefulOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dydxprotocol.clob.Query/StatefulOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).StatefulOrder(ctx, req.(*QueryStatefulOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_StreamOrderbookUpdates_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(StreamOrderbookUpdatesRequest) if err := stream.RecvMsg(m); err != nil { @@ -1200,6 +1356,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "LiquidationsConfiguration", Handler: _Query_LiquidationsConfiguration_Handler, }, + { + MethodName: "StatefulOrder", + Handler: _Query_StatefulOrder_Handler, + }, }, Streams: []grpc.StreamDesc{ { @@ -1591,6 +1751,87 @@ func (m *QueryBlockRateLimitConfigurationResponse) MarshalToSizedBuffer(dAtA []b return len(dAtA) - i, nil } +func (m *QueryStatefulOrderRequest) 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 *QueryStatefulOrderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryStatefulOrderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.OrderId.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 *QueryStatefulOrderResponse) 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 *QueryStatefulOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryStatefulOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Triggered { + i-- + if m.Triggered { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.FillAmount != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.FillAmount)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.OrderPlacement.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 *QueryLiquidationsConfigurationRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1668,20 +1909,20 @@ func (m *StreamOrderbookUpdatesRequest) MarshalToSizedBuffer(dAtA []byte) (int, var l int _ = l if len(m.ClobPairId) > 0 { - dAtA10 := make([]byte, len(m.ClobPairId)*10) - var j9 int + dAtA12 := make([]byte, len(m.ClobPairId)*10) + var j11 int for _, num := range m.ClobPairId { for num >= 1<<7 { - dAtA10[j9] = uint8(uint64(num)&0x7f | 0x80) + dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j9++ + j11++ } - dAtA10[j9] = uint8(num) - j9++ + dAtA12[j11] = uint8(num) + j11++ } - i -= j9 - copy(dAtA[i:], dAtA10[:j9]) - i = encodeVarintQuery(dAtA, i, uint64(j9)) + i -= j11 + copy(dAtA[i:], dAtA12[:j11]) + i = encodeVarintQuery(dAtA, i, uint64(j11)) i-- dAtA[i] = 0xa } @@ -1901,6 +2142,34 @@ func (m *QueryBlockRateLimitConfigurationResponse) Size() (n int) { return n } +func (m *QueryStatefulOrderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.OrderId.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryStatefulOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.OrderPlacement.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.FillAmount != 0 { + n += 1 + sovQuery(uint64(m.FillAmount)) + } + if m.Triggered { + n += 2 + } + return n +} + func (m *QueryLiquidationsConfigurationRequest) Size() (n int) { if m == nil { return 0 @@ -2896,6 +3165,211 @@ func (m *QueryBlockRateLimitConfigurationResponse) Unmarshal(dAtA []byte) error } return nil } +func (m *QueryStatefulOrderRequest) 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: QueryStatefulOrderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryStatefulOrderRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderId", 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 err := m.OrderId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryStatefulOrderResponse) 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: QueryStatefulOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryStatefulOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderPlacement", 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 err := m.OrderPlacement.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FillAmount", wireType) + } + m.FillAmount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FillAmount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Triggered", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Triggered = bool(v != 0) + 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 *QueryLiquidationsConfigurationRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0