Skip to content

Commit

Permalink
order
Browse files Browse the repository at this point in the history
  • Loading branch information
kimurayu45z committed Nov 21, 2024
1 parent c6f02a1 commit 0f9a4de
Show file tree
Hide file tree
Showing 38 changed files with 2,206 additions and 5,449 deletions.
257 changes: 92 additions & 165 deletions api/gluon/contract/order.pulsar.go

Large diffs are not rendered by default.

1,897 changes: 0 additions & 1,897 deletions api/gluon/contract/order_old.pulsar.go

This file was deleted.

164 changes: 82 additions & 82 deletions api/gluon/contract/query.pulsar.go

Large diffs are not rendered by default.

2,954 changes: 1,090 additions & 1,864 deletions api/gluon/contract/tx.pulsar.go

Large diffs are not rendered by default.

141 changes: 52 additions & 89 deletions api/gluon/contract/tx_grpc.pb.go

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

2 changes: 2 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ func New(
app.txConfig.TxEncoder(),
func(msg sdk.Msg) bool {
switch msg.(type) {
case *contractmoduletypes.MsgCreateOrder:
case *contractmoduletypes.MsgDeleteOrder:
case *contractmoduletypes.MsgMatchOrder:
case *contractmoduletypes.MsgMatchLazyOrder:
case *customauthmoduletypes.MsgCreatePairing:
Expand Down
64 changes: 31 additions & 33 deletions proto/gluon/contract/order.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ import "google/protobuf/timestamp.proto";
option go_package = "gluon/x/contract/types";

message Order {
string index = 1;
string user = 2;
OrderBody body = 3 [ (gogoproto.nullable) = false ];
uint64 paring_id = 4;
bytes signature = 5;
string id = 1;
OrderBody body = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
uint64 paring_id = 3;
bytes signature = 4;
}


enum OrderDirection {
UNKNOWN = 0;
BUY = 1;
Expand All @@ -29,31 +27,31 @@ enum OrderType {
}

message OrderBody {
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string base_denom = 2;
string quote_denom = 3;
OrderDirection direction = 4;
OrderType type = 5;
string amount = 6 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
string limit_price = 7 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = true,
(amino.dont_omitempty) = true
];
string stop_price = 8 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = true,
(amino.dont_omitempty) = true
];
google.protobuf.Timestamp expiry = 9 [
(gogoproto.nullable) = false,
(gogoproto.stdtime) = true
];
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string base_denom = 2;
string quote_denom = 3;
OrderDirection direction = 4;
OrderType type = 5;
string amount = 6 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
string limit_price = 7 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = true,
(amino.dont_omitempty) = true
];
string stop_price = 8 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = true,
(amino.dont_omitempty) = true
];
google.protobuf.Timestamp expiry = 9 [
(gogoproto.nullable) = false,
(gogoproto.stdtime) = true
];
}
4 changes: 2 additions & 2 deletions proto/gluon/contract/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ service Query {

// Queries a list of Order items.
rpc Order (QueryGetOrderRequest) returns (QueryGetOrderResponse) {
option (google.api.http).get = "/gluon/contract/order/{index}";
option (google.api.http).get = "/gluon/contract/order/{id}";

}
rpc OrderAll (QueryAllOrderRequest) returns (QueryAllOrderResponse) {
Expand All @@ -41,7 +41,7 @@ message QueryParamsResponse {
}

message QueryGetOrderRequest {
string index = 1;
string id = 1;
}

message QueryGetOrderResponse {
Expand Down
Loading

0 comments on commit 0f9a4de

Please sign in to comment.