-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding new traderoute types and keepers (#980)
Co-authored-by: sampocs <sam@stridelabs.co> Co-authored-by: sampocs <sam.pochyly@gmail.com>
- Loading branch information
1 parent
6476e39
commit 44c3f65
Showing
38 changed files
with
7,871 additions
and
3,909 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
syntax = "proto3"; | ||
package osmosis.gamm.v1beta1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "amino/amino.proto"; | ||
import "cosmos/base/v1beta1/coin.proto"; | ||
|
||
option go_package = "github.com/Stride-Labs/stride/v14/x/stakeibc/types"; | ||
|
||
// ===================== MsgSwapExactAmountIn | ||
message MsgSwapExactAmountIn { | ||
option (amino.name) = "osmosis/gamm/swap-exact-amount-in"; | ||
|
||
string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; | ||
repeated SwapAmountInRoute routes = 2 [ (gogoproto.nullable) = false ]; | ||
cosmos.base.v1beta1.Coin token_in = 3 [ | ||
(gogoproto.moretags) = "yaml:\"token_in\"", | ||
(gogoproto.nullable) = false | ||
]; | ||
string token_out_min_amount = 4 [ | ||
|
||
(gogoproto.customtype) = "cosmossdk.io/math.Int", | ||
(gogoproto.moretags) = "yaml:\"token_out_min_amount\"", | ||
(gogoproto.nullable) = false | ||
]; | ||
} | ||
|
||
message MsgSwapExactAmountInResponse { | ||
string token_out_amount = 1 [ | ||
|
||
(gogoproto.customtype) = "cosmossdk.io/math.Int", | ||
(gogoproto.moretags) = "yaml:\"token_out_amount\"", | ||
(gogoproto.nullable) = false | ||
]; | ||
} | ||
|
||
message SwapAmountInRoute { | ||
uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; | ||
string token_out_denom = 2 | ||
[ (gogoproto.moretags) = "yaml:\"token_out_denom\"" ]; | ||
} | ||
|
||
// This is the query and response type on gamm/v1beta1, there is also a similar | ||
// type on gamm/v2 This version is deprecated, the intended one is in | ||
// x/poolmanager which is the newer rpc route The most up to date is an rpc | ||
// route named SpotPriceV2 on poolmanager/v2 In poolmanager/v1beta1 and | ||
// poolmanager/v2 all fields are the same as defined here... But the messages | ||
// are called SpotPriceRequest/Response without Query in front | ||
|
||
// QuerySpotPriceRequest defines the gRPC request structure for a SpotPrice | ||
// query. | ||
message QuerySpotPriceRequest { | ||
option deprecated = true; | ||
uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; | ||
string base_asset_denom = 2 | ||
[ (gogoproto.moretags) = "yaml:\"base_asset_denom\"" ]; | ||
string quote_asset_denom = 3 | ||
[ (gogoproto.moretags) = "yaml:\"quote_asset_denom\"" ]; | ||
reserved 4; | ||
reserved "withSwapFee"; | ||
} | ||
|
||
// QuerySpotPriceResponse defines the gRPC response structure for a SpotPrice | ||
// query. | ||
message QuerySpotPriceResponse { | ||
option deprecated = true; | ||
// String of the Dec. Ex) 10.203uatom | ||
string spot_price = 1 [ (gogoproto.moretags) = "yaml:\"spot_price\"" ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.