From c194c385ffd602277c84ba46457963e8fdd4f66d Mon Sep 17 00:00:00 2001 From: Jonathan Fung Date: Fri, 2 Aug 2024 16:03:33 -0400 Subject: [PATCH] properly format the protos --- proto/dydxprotocol/clob/order.proto | 10 ++++++---- proto/dydxprotocol/clob/query.proto | 13 +++++++------ protocol/x/clob/types/order.pb.go | 10 ++++++---- protocol/x/clob/types/query.pb.go | 13 +++++++------ 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/proto/dydxprotocol/clob/order.proto b/proto/dydxprotocol/clob/order.proto index 4357913474..7045122ace 100644 --- a/proto/dydxprotocol/clob/order.proto +++ b/proto/dydxprotocol/clob/order.proto @@ -229,16 +229,18 @@ message TransactionOrdering { uint32 transaction_index = 2; } -// StreamLiquidationOrder represents an protocol-generated IOC liquidation order. -// Used in full node streaming. +// StreamLiquidationOrder represents an protocol-generated IOC liquidation +// order. Used in full node streaming. message StreamLiquidationOrder { // Information about this liquidation order. PerpetualLiquidationInfo liquidation_info = 1; - // CLOB pair ID of the CLOB pair the liquidation order will be matched against. + // CLOB pair ID of the CLOB pair the liquidation order will be matched + // against. uint32 clob_pair_id = 2; - // True if this is a buy order liquidating a short position, false if vice versa. + // True if this is a buy order liquidating a short position, false if vice + // versa. bool is_buy = 3; // The number of base quantums for this liquidation order. diff --git a/proto/dydxprotocol/clob/query.proto b/proto/dydxprotocol/clob/query.proto index c7eb3d3aba..1642ad15cf 100644 --- a/proto/dydxprotocol/clob/query.proto +++ b/proto/dydxprotocol/clob/query.proto @@ -241,17 +241,18 @@ message StreamTakerOrder { // after it is attempted to be matched on the orderbook. // It is intended to be used only in full node streaming. message StreamTakerOrderStatus { - // The state of the taker order after attempting to match it against the orderbook. - // Possible enum values can be found here: + // The state of the taker order after attempting to match it against the + // orderbook. Possible enum values can be found here: // https://github.com/dydxprotocol/v4-chain/blob/main/protocol/x/clob/types/orderbook.go#L105 uint32 order_status = 1; // The amount of remaining (non-matched) base quantums of this taker order. uint64 remaining_quantums = 2; - // The amount of base quantums that were *optimistically* filled for this taker order - // when the order is matched against the orderbook. Note that if any quantums of this order - // were optimistically filled or filled in state before this invocation of the matching loop, - // this value will not include them. + // The amount of base quantums that were *optimistically* filled for this + // taker order when the order is matched against the orderbook. Note that if + // any quantums of this order were optimistically filled or filled in state + // before this invocation of the matching loop, this value will not include + // them. uint64 optimistically_filled_quantums = 3; } diff --git a/protocol/x/clob/types/order.pb.go b/protocol/x/clob/types/order.pb.go index ad17410e45..cad93b7f8c 100644 --- a/protocol/x/clob/types/order.pb.go +++ b/protocol/x/clob/types/order.pb.go @@ -807,14 +807,16 @@ func (m *TransactionOrdering) GetTransactionIndex() uint32 { return 0 } -// StreamLiquidationOrder represents an protocol-generated IOC liquidation order. -// Used in full node streaming. +// StreamLiquidationOrder represents an protocol-generated IOC liquidation +// order. Used in full node streaming. type StreamLiquidationOrder struct { // Information about this liquidation order. LiquidationInfo *PerpetualLiquidationInfo `protobuf:"bytes,1,opt,name=liquidation_info,json=liquidationInfo,proto3" json:"liquidation_info,omitempty"` - // CLOB pair ID of the CLOB pair the liquidation order will be matched against. + // CLOB pair ID of the CLOB pair the liquidation order will be matched + // against. ClobPairId uint32 `protobuf:"varint,2,opt,name=clob_pair_id,json=clobPairId,proto3" json:"clob_pair_id,omitempty"` - // True if this is a buy order liquidating a short position, false if vice versa. + // True if this is a buy order liquidating a short position, false if vice + // versa. IsBuy bool `protobuf:"varint,3,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` // The number of base quantums for this liquidation order. Quantums uint64 `protobuf:"varint,4,opt,name=quantums,proto3" json:"quantums,omitempty"` diff --git a/protocol/x/clob/types/query.pb.go b/protocol/x/clob/types/query.pb.go index 1d66576185..ebbe6e5f4d 100644 --- a/protocol/x/clob/types/query.pb.go +++ b/protocol/x/clob/types/query.pb.go @@ -1201,16 +1201,17 @@ func (*StreamTakerOrder) XXX_OneofWrappers() []interface{} { // after it is attempted to be matched on the orderbook. // It is intended to be used only in full node streaming. type StreamTakerOrderStatus struct { - // The state of the taker order after attempting to match it against the orderbook. - // Possible enum values can be found here: + // The state of the taker order after attempting to match it against the + // orderbook. Possible enum values can be found here: // https://github.com/dydxprotocol/v4-chain/blob/main/protocol/x/clob/types/orderbook.go#L105 OrderStatus uint32 `protobuf:"varint,1,opt,name=order_status,json=orderStatus,proto3" json:"order_status,omitempty"` // The amount of remaining (non-matched) base quantums of this taker order. RemainingQuantums uint64 `protobuf:"varint,2,opt,name=remaining_quantums,json=remainingQuantums,proto3" json:"remaining_quantums,omitempty"` - // The amount of base quantums that were *optimistically* filled for this taker order - // when the order is matched against the orderbook. Note that if any quantums of this order - // were optimistically filled or filled in state before this invocation of the matching loop, - // this value will not include them. + // The amount of base quantums that were *optimistically* filled for this + // taker order when the order is matched against the orderbook. Note that if + // any quantums of this order were optimistically filled or filled in state + // before this invocation of the matching loop, this value will not include + // them. OptimisticallyFilledQuantums uint64 `protobuf:"varint,3,opt,name=optimistically_filled_quantums,json=optimisticallyFilledQuantums,proto3" json:"optimistically_filled_quantums,omitempty"` }