From 4091a699c8724de0e909e3560ad7703822ffb3a6 Mon Sep 17 00:00:00 2001 From: Mahmoud Taabodi Date: Wed, 26 Oct 2022 16:35:42 -0400 Subject: [PATCH 1/6] Adding isCleanUp to Transaction --- proto/api.proto | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/proto/api.proto b/proto/api.proto index 6c64f1d0..35499fdb 100644 --- a/proto/api.proto +++ b/proto/api.proto @@ -610,8 +610,13 @@ message PostCancelAllRequest { repeated string openOrdersAddresses = 3; } +message Transaction { + string messageContent = 1; + bool isCleanup = 2; +} + message PostCancelAllResponse { - repeated string transactions = 1; + repeated Transaction transactions = 1; } message PostSettleRequest { @@ -696,7 +701,7 @@ message GetOrderStatusResponse { } message PostSubmitRequest { - string transaction = 1 [(google.api.field_behavior) = REQUIRED]; + Transaction transaction = 1 [(google.api.field_behavior) = REQUIRED]; bool skipPreFlight = 2; } @@ -704,8 +709,7 @@ enum SubmitStrategy { P_UKNOWN = 0; P_SUBMIT_ALL = 1; P_ABORT_ON_FIRST_ERROR = 2; - P_ALWAYS_EXECUTE_LAST = 3; - P_WAIT_FOR_CONFIRMATION = 4; + P_WAIT_FOR_CONFIRMATION = 3; } message PostSubmitBatchRequest { @@ -715,6 +719,7 @@ message PostSubmitBatchRequest { message PostSubmitResponse { string signature = 1; + bool isCleanUpTransaction = 2; } message PostSubmitBatchResponseEntry { @@ -856,7 +861,7 @@ message RouteStep { message TradeSwapResponse{ Project project = 1; - repeated string transactions = 2; + repeated Transaction transactions = 2; double outAmount = 3; double minOutAmount = 4; PriceImpactPercent priceImpact = 5; From 74221262391b14325213e0b1719fb4ea58f8d8df Mon Sep 17 00:00:00 2001 From: Mahmoud Taabodi Date: Thu, 27 Oct 2022 15:38:19 -0400 Subject: [PATCH 2/6] separate the requests --- proto/api.proto | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/proto/api.proto b/proto/api.proto index 35499fdb..133353b1 100644 --- a/proto/api.proto +++ b/proto/api.proto @@ -701,6 +701,11 @@ message GetOrderStatusResponse { } message PostSubmitRequest { + string transaction = 1 [(google.api.field_behavior) = REQUIRED]; + bool skipPreFlight = 2; +} + +message PostSubmitRequestEntry { Transaction transaction = 1 [(google.api.field_behavior) = REQUIRED]; bool skipPreFlight = 2; } @@ -713,7 +718,7 @@ enum SubmitStrategy { } message PostSubmitBatchRequest { - repeated PostSubmitRequest entries = 1; + repeated PostSubmitRequestEntry entries = 1; SubmitStrategy SubmitStrategy = 2; } From 4b7018b3805a0b0e64f3e6cb8c144578bee96163 Mon Sep 17 00:00:00 2001 From: Mahmoud Taabodi Date: Thu, 27 Oct 2022 15:52:45 -0400 Subject: [PATCH 3/6] revert extra --- proto/api.proto | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/proto/api.proto b/proto/api.proto index 133353b1..1174810d 100644 --- a/proto/api.proto +++ b/proto/api.proto @@ -616,7 +616,7 @@ message Transaction { } message PostCancelAllResponse { - repeated Transaction transactions = 1; + repeated string transactions = 1; } message PostSettleRequest { @@ -724,7 +724,6 @@ message PostSubmitBatchRequest { message PostSubmitResponse { string signature = 1; - bool isCleanUpTransaction = 2; } message PostSubmitBatchResponseEntry { @@ -866,7 +865,7 @@ message RouteStep { message TradeSwapResponse{ Project project = 1; - repeated Transaction transactions = 2; + repeated string transactions = 2; double outAmount = 3; double minOutAmount = 4; PriceImpactPercent priceImpact = 5; From 774b19a813f27ea9d5b36925e4e758d404ecd887 Mon Sep 17 00:00:00 2001 From: Mahmoud Taabodi Date: Thu, 27 Oct 2022 16:42:11 -0400 Subject: [PATCH 4/6] tradeswap --- proto/api.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/api.proto b/proto/api.proto index 1174810d..26c5bc5b 100644 --- a/proto/api.proto +++ b/proto/api.proto @@ -865,7 +865,7 @@ message RouteStep { message TradeSwapResponse{ Project project = 1; - repeated string transactions = 2; + repeated Transaction transactions = 2; double outAmount = 3; double minOutAmount = 4; PriceImpactPercent priceImpact = 5; From e13d5f5c1e5b12ebfebe6b8c961350474f85f98d Mon Sep 17 00:00:00 2001 From: Mahmoud Taabodi Date: Fri, 28 Oct 2022 13:59:42 -0400 Subject: [PATCH 5/6] rename --- proto/api.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/api.proto b/proto/api.proto index 26c5bc5b..d22bdf68 100644 --- a/proto/api.proto +++ b/proto/api.proto @@ -610,8 +610,8 @@ message PostCancelAllRequest { repeated string openOrdersAddresses = 3; } -message Transaction { - string messageContent = 1; +message TransactionMessage { + string content = 1; bool isCleanup = 2; } From ea383c145ead0034674bcecf93994858cd129ee0 Mon Sep 17 00:00:00 2001 From: Mahmoud Taabodi Date: Fri, 28 Oct 2022 14:03:33 -0400 Subject: [PATCH 6/6] Rest of rename --- proto/api.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/api.proto b/proto/api.proto index d22bdf68..79c7cad0 100644 --- a/proto/api.proto +++ b/proto/api.proto @@ -706,7 +706,7 @@ message PostSubmitRequest { } message PostSubmitRequestEntry { - Transaction transaction = 1 [(google.api.field_behavior) = REQUIRED]; + TransactionMessage transaction = 1 [(google.api.field_behavior) = REQUIRED]; bool skipPreFlight = 2; } @@ -865,7 +865,7 @@ message RouteStep { message TradeSwapResponse{ Project project = 1; - repeated Transaction transactions = 2; + repeated TransactionMessage transactions = 2; double outAmount = 3; double minOutAmount = 4; PriceImpactPercent priceImpact = 5;