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

TRAD-210 swap with route specification #24

Merged
merged 17 commits into from
Oct 12, 2022

Conversation

tinystarinagalaxy
Copy link
Contributor

No description provided.

proto/api.proto Outdated
@@ -288,6 +288,17 @@ service Api {
};
}

rpc PostMultiRouteTradeSwap(MultiRouteTradeSwapRequest) returns (MultiRouteTradeSwapResponse) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming: I don't think Multi should be part of this name. This is a swap with a route specification, and it's valid if the user decides to give a route specification of size 1. So I think PostRouteTradeSwap or PostRouteSwap would be better

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok done.

proto/api.proto Outdated
string outToken = 4;
double inAmount = 5;
double slippage = 6;
string middleToken = 4;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does middle token need to be made to the original request?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, removed it

Copy link

@aspin aspin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

proto/api.proto Outdated
@@ -289,6 +289,17 @@ service Api {
};
}

rpc PostRouteTradeSwap(RouteTradeSwapRequest) returns (RouteTradeSwapResponse) {
option(google.api.http) = {
get: "/api/v1/amm/route-trade-swap"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

endpoint needs to be updated: should be /api/v1/trade/route-swap

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

proto/api.proto Outdated
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
description: "routes swap(s) from supported amms";
summary: "Routes swaps";
tags: "AMMs";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Trade/AMM"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

proto/api.proto Outdated
get: "/api/v1/amm/route-trade-swap"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
description: "routes swap(s) from supported amms";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description for consistency: "Generates an unsigned transaction object for the AMM swap on the specified route"

summary for consistency: "Unsigned AMM swap transaction along route"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

proto/api.proto Outdated
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
description: "Generates an unsigned transaction object for the AMM swap on the specified route";
summary: "Unsigned AMM swap transaction along route";
tags: "Trade/AMM";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually should be ["Trade", "AMM"] now, after some review changes on my end

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bump

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

proto/api.proto Outdated
@@ -311,6 +311,17 @@ service Api {
};
}

rpc PostRouteTradeSwap(RouteTradeSwapRequest) returns (RouteTradeSwapResponse) {
option(google.api.http) = {
get: "/api/v1/amm/route-swap"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

endpoint needs to be /api/v1/trade/route-swap

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@aspin
Copy link

aspin commented Oct 12, 2022

bump on the tags comment

@tinystarinagalaxy tinystarinagalaxy merged commit 7a1a7c7 into develop Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants