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

[OTE-163] Fix query: add amino.oneof option to clob oneof metadata #1077

Merged
merged 2 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions proto/dydxprotocol/clob/clob_pair.proto
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
syntax = "proto3";
package dydxprotocol.clob;

import "amino/amino.proto";

option go_package = "github.com/dydxprotocol/v4-chain/protocol/x/clob/types";

// PerpetualClobMetadata contains metadata for a `ClobPair`
// representing a Perpetual product.
message PerpetualClobMetadata {
option (amino.name) = "dydxprotocol/clob/PerpetualClobMetadata";

// Id of the Perpetual the CLOB allows trading of.
uint32 perpetual_id = 1;
}

// PerpetualClobMetadata contains metadata for a `ClobPair`
// representing a Spot product.
message SpotClobMetadata {
option (amino.name) = "dydxprotocol/clob/SpotClobMetadata";

// Id of the base Asset in the trading pair.
uint32 base_asset_id = 1;

Expand All @@ -29,8 +35,8 @@ message ClobPair {
// Product-specific metadata. Perpetual CLOBs will have
// PerpetualClobMetadata, and Spot CLOBs will have SpotClobMetadata.
oneof metadata {
PerpetualClobMetadata perpetual_clob_metadata = 2;
SpotClobMetadata spot_clob_metadata = 3;
PerpetualClobMetadata perpetual_clob_metadata = 2 [(amino.oneof_name) = "dydxprotocol/clob/PerpetualClobMetadata"];
SpotClobMetadata spot_clob_metadata = 3 [(amino.oneof_name) = "dydxprotocol/clob/SpotClobMetadata"];
}

// Minimum increment in the size of orders on the CLOB, in base quantums.
Expand Down
75 changes: 40 additions & 35 deletions protocol/x/clob/types/clob_pair.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.