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

feat: more getter methods #8

Merged
merged 6 commits into from
Oct 18, 2020
Merged
Show file tree
Hide file tree
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
9 changes: 6 additions & 3 deletions proto/osmosis/gamm/v1beta1/pool.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ message Record {
}

message LP {
string name = 1 [
(gogoproto.moretags) = "yaml:\"name\""
string denom = 1 [
(gogoproto.moretags) = "yaml:\"denom\""
];
string totalSupply = 2 [
string description = 2 [
(gogoproto.moretags) = "yaml:\"description\""
];
string totalSupply = 3 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"total_supply\"",
(gogoproto.nullable) = false
Expand Down
150 changes: 82 additions & 68 deletions proto/osmosis/gamm/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -71,102 +71,116 @@ message MsgExitPool {
}

// ===================== MsgCreatePool
message TokenInfo {
message LPTokenInfo {
string denom = 1 [
(gogoproto.moretags) = "yaml:\"denom\""
];
string ratio = 2 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"ratio\"",
(gogoproto.nullable) = false
];
(gogoproto.moretags) = "yaml:\"denom\""
];
string description = 2 [
(gogoproto.moretags) = "yaml:\"description\""
];
}

message BindTokenInfo {
string denom = 1 [
(gogoproto.moretags) = "yaml:\"denom\""
];
string weight = 2 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"weight\"",
(gogoproto.nullable) = false
];
string amount = 3 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"amount\"",
(gogoproto.nullable) = false
];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"amount\"",
(gogoproto.nullable) = false
];
}

message MsgCreatePool {
bytes sender = 1 [
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
(gogoproto.moretags) = "yaml:\"sender\""
];
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
(gogoproto.moretags) = "yaml:\"sender\""
];

string swapFee = 2 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"swap_fee\"",
(gogoproto.nullable) = false
];

repeated TokenInfo tokenInfo = 3 [
(gogoproto.moretags) = "yaml:\"token_info\"",
(gogoproto.nullable) = false
];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"swap_fee\"",
(gogoproto.nullable) = false
];

LPTokenInfo lpToken = 3 [
(gogoproto.moretags) = "yaml:\"lp_token\"",
(gogoproto.nullable) = false
];

repeated BindTokenInfo bindTokens = 4 [
(gogoproto.moretags) = "yaml:\"token_info\"",
(gogoproto.nullable) = false
];
}

// ===================== MsgSwapExactAmountIn
message MsgSwapExactAmountIn {
bytes sender = 1 [
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
(gogoproto.moretags) = "yaml:\"sender\""
];
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
(gogoproto.moretags) = "yaml:\"sender\""
];
bytes targetPool = 2 [
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
(gogoproto.moretags) = "yaml:\"target_pool\""
];
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
(gogoproto.moretags) = "yaml:\"target_pool\""
];
cosmos.base.v1beta1.Coin tokenIn = 3 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin",
(gogoproto.moretags) = "yaml:\"token_in\"",
(gogoproto.nullable) = false
];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin",
(gogoproto.moretags) = "yaml:\"token_in\"",
(gogoproto.nullable) = false
];
string tokenAmountIn = 4 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"token_amount_in\"",
(gogoproto.nullable) = false
];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"token_amount_in\"",
(gogoproto.nullable) = false
];
cosmos.base.v1beta1.Coin tokenOut = 5 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin",
(gogoproto.moretags) = "yaml:\"token_out\"",
(gogoproto.nullable) = false
];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin",
(gogoproto.moretags) = "yaml:\"token_out\"",
(gogoproto.nullable) = false
];
string minAmountOut = 6 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"min_amount_out\"",
(gogoproto.nullable) = false
];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"min_amount_out\"",
(gogoproto.nullable) = false
];
string maxPrice = 7 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"max_price\"",
(gogoproto.nullable) = false
];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"max_price\"",
(gogoproto.nullable) = false
];
}

// ===================== MsgSwapExactAmountOut
message MsgSwapExactAmountOut {
bytes sender = 1 [
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
(gogoproto.moretags) = "yaml:\"sender\""
];
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
(gogoproto.moretags) = "yaml:\"sender\""
];
bytes targetPool = 2 [
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
(gogoproto.moretags) = "yaml:\"target_pool\""
];
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
(gogoproto.moretags) = "yaml:\"target_pool\""
];
cosmos.base.v1beta1.Coin tokenIn = 3 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin",
(gogoproto.moretags) = "yaml:\"token_in\"",
(gogoproto.nullable) = false
];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin",
(gogoproto.moretags) = "yaml:\"token_in\"",
(gogoproto.nullable) = false
];
string maxAmountIn = 4 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"max_amount_in\"",
(gogoproto.nullable) = false
];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"max_amount_in\"",
(gogoproto.nullable) = false
];
cosmos.base.v1beta1.Coin tokenOut = 5 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin",
(gogoproto.moretags) = "yaml:\"token_out\"",
(gogoproto.nullable) = false
];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin",
(gogoproto.moretags) = "yaml:\"token_out\"",
(gogoproto.nullable) = false
];
string tokenAmountOut = 6 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"token_amount_out\"",
Expand Down
Loading