Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorder commits - have vault deposit fix (2a3077) right after release rc4 (e24902) #1582

Closed
wants to merge 8 commits into from
2 changes: 1 addition & 1 deletion .github/workflows/indexer-api-documentation-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/indexer/v0.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.x' # e.g. release/indexer/v1.x
paths:
- 'indexer/**'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/indexer-build-and-push-dev-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/[a-z]+/v0.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/[a-z]+/v[0-9]+.x' # e.g. release/indexer/v1.x
- 'release/indexer/v[0-9]+.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.x' # e.g. release/indexer/v1.x
# TODO(DEC-837): Customize github build and push to ECR by service with paths

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/indexer-build-and-push-mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/[a-z]+/0.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/[a-z]+/v[0-9]+.x' # e.g. release/indexer/v1.x
- 'release/indexer/v[0-9]+.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.x' # e.g. release/indexer/v1.x
# TODO(DEC-837): Customize github build and push to ECR by service with paths

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/indexer-build-and-push-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/[a-z]+/v0.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/[a-z]+/v[0-9]+.x' # e.g. release/indexer/v1.x
- 'release/indexer/v[0-9]+.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.x' # e.g. release/indexer/v1.x
# TODO(DEC-837): Customize github build and push to ECR by service with paths

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/indexer-build-docker-image-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/indexer/v0.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.x' # e.g. release/indexer/v1.x
paths:
- 'indexer/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/indexer-build-test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/indexer/v0.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.x' # e.g. release/indexer/v1.x
paths:
- 'indexer/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/indexer-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/indexer/v0.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.x' # e.g. release/indexer/v1.x
paths:
- 'indexer/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/protocol/v0.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x
paths:
# Keep in sync with above
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/protocol-build-and-push-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/[a-z]+/v0.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/[a-z]+/v[0-9]+.x' # e.g. release/protocol/v1.x
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x

jobs:
build-and-push-snapshot-dev:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/protocol-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/[a-z]+/v0.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/[a-z]+/v[0-9]+.x' # e.g. release/protocol/v1.x
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x

jobs:
build-and-push-dev:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/protocol-container-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/protocol/v0.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x
paths:
- 'protocol/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/protocol-exchange-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/protocol/v0.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x
paths:
- 'protocol/daemons/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/protocol-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- "release/protocol/v0.[0-9]+.x" # e.g. release/protocol/v0.1.x
- "release/protocol/v[0-9]+.[0-9]+.x" # e.g. release/protocol/v0.1.x
- "release/protocol/v[0-9]+.x" # e.g. release/protocol/v1.x
paths:
- "protocol/**"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/protocol-pregenesis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/protocol/v0.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x
paths:
- protocol/**
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/protocol-sim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/protocol/v0.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x
paths:
- 'protocol/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/protocol-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/protocol/v0.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x
paths:
- 'protocol/**'
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -22,6 +22,9 @@ export interface Query {
/** Queries LiquidationsConfiguration. */

liquidationsConfiguration(request?: QueryLiquidationsConfigurationRequest): Promise<QueryLiquidationsConfigurationResponse>;
/** Queries the stateful order for a given order id. */

statefulOrder(request: QueryStatefulOrderRequest): Promise<QueryStatefulOrderResponse>;
/** Streams orderbook updates. */

streamOrderbookUpdates(request: StreamOrderbookUpdatesRequest): Promise<StreamOrderbookUpdatesResponse>;
Expand All @@ -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);
}

Expand Down Expand Up @@ -78,6 +82,12 @@ export class QueryClientImpl implements Query {
return promise.then(data => QueryLiquidationsConfigurationResponse.decode(new _m0.Reader(data)));
}

statefulOrder(request: QueryStatefulOrderRequest): Promise<QueryStatefulOrderResponse> {
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<StreamOrderbookUpdatesResponse> {
const data = StreamOrderbookUpdatesRequest.encode(request).finish();
const promise = this.rpc.request("dydxprotocol.clob.Query", "StreamOrderbookUpdates", data);
Expand Down Expand Up @@ -113,6 +123,10 @@ export const createRpcQueryExtension = (base: QueryClient) => {
return queryService.liquidationsConfiguration(request);
},

statefulOrder(request: QueryStatefulOrderRequest): Promise<QueryStatefulOrderResponse> {
return queryService.statefulOrder(request);
},

streamOrderbookUpdates(request: StreamOrderbookUpdatesRequest): Promise<StreamOrderbookUpdatesResponse> {
return queryService.streamOrderbookUpdates(request);
}
Expand Down
153 changes: 153 additions & 0 deletions indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/query.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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>): 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>): 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 {};
}
Expand Down
Loading
Loading