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

Adding isCleanUp to Transaction #38

Merged
merged 6 commits into from
Oct 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions proto/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,11 @@ message PostCancelAllRequest {
repeated string openOrdersAddresses = 3;
}

message TransactionMessage {
string content = 1;
bool isCleanup = 2;
}

message PostCancelAllResponse {
repeated string transactions = 1;
}
Expand Down Expand Up @@ -700,16 +705,20 @@ message PostSubmitRequest {
bool skipPreFlight = 2;
}

message PostSubmitRequestEntry {
TransactionMessage transaction = 1 [(google.api.field_behavior) = REQUIRED];
bool skipPreFlight = 2;
}

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 {
repeated PostSubmitRequest entries = 1;
repeated PostSubmitRequestEntry entries = 1;
SubmitStrategy SubmitStrategy = 2;
}

Expand Down Expand Up @@ -856,7 +865,7 @@ message RouteStep {

message TradeSwapResponse{
Project project = 1;
repeated string transactions = 2;
repeated TransactionMessage transactions = 2;
double outAmount = 3;
double minOutAmount = 4;
PriceImpactPercent priceImpact = 5;
Expand Down