Skip to content

Commit

Permalink
Proto: camelCase to snake_case (#1656)
Browse files Browse the repository at this point in the history
* camelCase => snake_case

* fix

* regen proto

* add to changelog

* go through all proto files
  • Loading branch information
hieuvubk authored Jun 7, 2022
1 parent 205ce35 commit a1ca194
Show file tree
Hide file tree
Showing 23 changed files with 623 additions and 614 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Cosmwasm bindings have been added, to make swapping and creating these new token
* Cosmwasm builds on M1 macs
* [#1435](https://github.com/osmosis-labs/osmosis/pull/1435) `x/tokenfactory` create denom fee for spam resistance
* [#1253](https://github.com/osmosis-labs/osmosis/pull/1253) Add a message to increase the duration of a bonded lock.
* [#1656](https://github.com/osmosis-labs/osmosis/pull/1656) Change camelCase to snake_case in proto.
* [#1632](https://github.com/osmosis-labs/osmosis/pull/1632) augment SuperfluidDelegationsByDelegator query, return osmo equivilent is staked via superfluid

## [v8.0.0 - Emergency proposals upgrade](https://github.com/osmosis-labs/osmosis/releases/tag/v8.0.0)
Expand Down
110 changes: 55 additions & 55 deletions docs/core/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,9 +537,9 @@ Params holds parameters for the incentives module
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | |
| `poolId` | [uint64](#uint64) | | |
| `shareInAmount` | [string](#string) | | |
| `tokenOutMins` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | |
| `pool_id` | [uint64](#uint64) | | |
| `share_in_amount` | [string](#string) | | |
| `token_out_mins` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | |



Expand All @@ -565,9 +565,9 @@ Params holds parameters for the incentives module
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | |
| `poolId` | [uint64](#uint64) | | |
| `tokenOut` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |
| `shareInMaxAmount` | [string](#string) | | |
| `pool_id` | [uint64](#uint64) | | |
| `token_out` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |
| `share_in_max_amount` | [string](#string) | | |



Expand All @@ -582,7 +582,7 @@ Params holds parameters for the incentives module

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `shareInAmount` | [string](#string) | | |
| `share_in_amount` | [string](#string) | | |



Expand All @@ -598,10 +598,10 @@ Params holds parameters for the incentives module
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | |
| `poolId` | [uint64](#uint64) | | |
| `tokenOutDenom` | [string](#string) | | |
| `shareInAmount` | [string](#string) | | |
| `tokenOutMinAmount` | [string](#string) | | |
| `pool_id` | [uint64](#uint64) | | |
| `token_out_denom` | [string](#string) | | |
| `share_in_amount` | [string](#string) | | |
| `token_out_min_amount` | [string](#string) | | |



Expand All @@ -616,7 +616,7 @@ Params holds parameters for the incentives module

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `tokenOutAmount` | [string](#string) | | |
| `token_out_amount` | [string](#string) | | |



Expand All @@ -633,9 +633,9 @@ This is really MsgJoinPoolNoSwap
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | |
| `poolId` | [uint64](#uint64) | | |
| `shareOutAmount` | [string](#string) | | |
| `tokenInMaxs` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | |
| `pool_id` | [uint64](#uint64) | | |
| `share_out_amount` | [string](#string) | | |
| `token_in_maxs` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | |



Expand All @@ -662,9 +662,9 @@ TODO: Rename to MsgJoinSwapExactAmountIn
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | |
| `poolId` | [uint64](#uint64) | | |
| `tokenIn` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |
| `shareOutMinAmount` | [string](#string) | | repeated cosmos.base.v1beta1.Coin tokensIn = 5 [ (gogoproto.moretags) = "yaml:\"tokens_in\"", (gogoproto.nullable) = false ]; |
| `pool_id` | [uint64](#uint64) | | |
| `token_in` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |
| `share_out_min_amount` | [string](#string) | | repeated cosmos.base.v1beta1.Coin tokensIn = 5 [ (gogoproto.moretags) = "yaml:\"tokens_in\"", (gogoproto.nullable) = false ]; |



Expand All @@ -679,7 +679,7 @@ TODO: Rename to MsgJoinSwapExactAmountIn

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `shareOutAmount` | [string](#string) | | |
| `share_out_amount` | [string](#string) | | |



Expand All @@ -695,10 +695,10 @@ TODO: Rename to MsgJoinSwapExactAmountIn
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | |
| `poolId` | [uint64](#uint64) | | |
| `tokenInDenom` | [string](#string) | | |
| `shareOutAmount` | [string](#string) | | |
| `tokenInMaxAmount` | [string](#string) | | |
| `pool_id` | [uint64](#uint64) | | |
| `token_in_denom` | [string](#string) | | |
| `share_out_amount` | [string](#string) | | |
| `token_in_max_amount` | [string](#string) | | |



Expand All @@ -713,7 +713,7 @@ TODO: Rename to MsgJoinSwapExactAmountIn

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `tokenInAmount` | [string](#string) | | |
| `token_in_amount` | [string](#string) | | |



Expand All @@ -730,8 +730,8 @@ TODO: Rename to MsgJoinSwapExactAmountIn
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | |
| `routes` | [SwapAmountInRoute](#osmosis.gamm.v1beta1.SwapAmountInRoute) | repeated | |
| `tokenIn` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |
| `tokenOutMinAmount` | [string](#string) | | |
| `token_in` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |
| `token_out_min_amount` | [string](#string) | | |



Expand All @@ -746,7 +746,7 @@ TODO: Rename to MsgJoinSwapExactAmountIn

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `tokenOutAmount` | [string](#string) | | |
| `token_out_amount` | [string](#string) | | |



Expand All @@ -763,8 +763,8 @@ TODO: Rename to MsgJoinSwapExactAmountIn
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | |
| `routes` | [SwapAmountOutRoute](#osmosis.gamm.v1beta1.SwapAmountOutRoute) | repeated | |
| `tokenInMaxAmount` | [string](#string) | | |
| `tokenOut` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |
| `token_in_max_amount` | [string](#string) | | |
| `token_out` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |



Expand All @@ -779,7 +779,7 @@ TODO: Rename to MsgJoinSwapExactAmountIn

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `tokenInAmount` | [string](#string) | | |
| `token_in_amount` | [string](#string) | | |



Expand All @@ -794,8 +794,8 @@ TODO: Rename to MsgJoinSwapExactAmountIn

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `poolId` | [uint64](#uint64) | | |
| `tokenOutDenom` | [string](#string) | | |
| `pool_id` | [uint64](#uint64) | | |
| `token_out_denom` | [string](#string) | | |



Expand All @@ -810,8 +810,8 @@ TODO: Rename to MsgJoinSwapExactAmountIn

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `poolId` | [uint64](#uint64) | | |
| `tokenInDenom` | [string](#string) | | |
| `pool_id` | [uint64](#uint64) | | |
| `token_in_denom` | [string](#string) | | |



Expand Down Expand Up @@ -869,7 +869,7 @@ TODO: Rename to MsgJoinSwapExactAmountIn

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `numPools` | [uint64](#uint64) | | |
| `num_pools` | [uint64](#uint64) | | |



Expand All @@ -884,7 +884,7 @@ TODO: Rename to MsgJoinSwapExactAmountIn

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `poolId` | [uint64](#uint64) | | |
| `pool_id` | [uint64](#uint64) | | |



Expand Down Expand Up @@ -914,7 +914,7 @@ TODO: Rename to MsgJoinSwapExactAmountIn

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `poolId` | [uint64](#uint64) | | |
| `pool_id` | [uint64](#uint64) | | |



Expand Down Expand Up @@ -976,7 +976,7 @@ query.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `poolId` | [uint64](#uint64) | | |
| `pool_id` | [uint64](#uint64) | | |
| `base_asset_denom` | [string](#string) | | |
| `quote_asset_denom` | [string](#string) | | |

Expand All @@ -994,7 +994,7 @@ query.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `spotPrice` | [string](#string) | | String of the Dec. Ex) 10.203uatom |
| `spot_price` | [string](#string) | | String of the Dec. Ex) 10.203uatom |



Expand All @@ -1010,8 +1010,8 @@ query.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | |
| `poolId` | [uint64](#uint64) | | |
| `tokenIn` | [string](#string) | | |
| `pool_id` | [uint64](#uint64) | | |
| `token_in` | [string](#string) | | |
| `routes` | [SwapAmountInRoute](#osmosis.gamm.v1beta1.SwapAmountInRoute) | repeated | |


Expand All @@ -1027,7 +1027,7 @@ query.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `tokenOutAmount` | [string](#string) | | |
| `token_out_amount` | [string](#string) | | |



Expand All @@ -1043,9 +1043,9 @@ query.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | |
| `poolId` | [uint64](#uint64) | | |
| `pool_id` | [uint64](#uint64) | | |
| `routes` | [SwapAmountOutRoute](#osmosis.gamm.v1beta1.SwapAmountOutRoute) | repeated | |
| `tokenOut` | [string](#string) | | |
| `token_out` | [string](#string) | | |



Expand All @@ -1060,7 +1060,7 @@ query.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `tokenInAmount` | [string](#string) | | |
| `token_in_amount` | [string](#string) | | |



Expand Down Expand Up @@ -1100,7 +1100,7 @@ query.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `poolId` | [uint64](#uint64) | | |
| `pool_id` | [uint64](#uint64) | | |



Expand Down Expand Up @@ -1130,7 +1130,7 @@ query.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `poolId` | [uint64](#uint64) | | |
| `pool_id` | [uint64](#uint64) | | |



Expand All @@ -1145,7 +1145,7 @@ query.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `totalShares` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |
| `total_shares` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |



Expand All @@ -1168,13 +1168,13 @@ query.
| `Pools` | [QueryPoolsRequest](#osmosis.gamm.v1beta1.QueryPoolsRequest) | [QueryPoolsResponse](#osmosis.gamm.v1beta1.QueryPoolsResponse) | | GET|/osmosis/gamm/v1beta1/pools|
| `NumPools` | [QueryNumPoolsRequest](#osmosis.gamm.v1beta1.QueryNumPoolsRequest) | [QueryNumPoolsResponse](#osmosis.gamm.v1beta1.QueryNumPoolsResponse) | | GET|/osmosis/gamm/v1beta1/num_pools|
| `TotalLiquidity` | [QueryTotalLiquidityRequest](#osmosis.gamm.v1beta1.QueryTotalLiquidityRequest) | [QueryTotalLiquidityResponse](#osmosis.gamm.v1beta1.QueryTotalLiquidityResponse) | | GET|/osmosis/gamm/v1beta1/total_liquidity|
| `Pool` | [QueryPoolRequest](#osmosis.gamm.v1beta1.QueryPoolRequest) | [QueryPoolResponse](#osmosis.gamm.v1beta1.QueryPoolResponse) | Per Pool gRPC Endpoints | GET|/osmosis/gamm/v1beta1/pools/{poolId}|
| `PoolParams` | [QueryPoolParamsRequest](#osmosis.gamm.v1beta1.QueryPoolParamsRequest) | [QueryPoolParamsResponse](#osmosis.gamm.v1beta1.QueryPoolParamsResponse) | | GET|/osmosis/gamm/v1beta1/pools/{poolId}/params|
| `TotalPoolLiquidity` | [QueryTotalPoolLiquidityRequest](#osmosis.gamm.v1beta1.QueryTotalPoolLiquidityRequest) | [QueryTotalPoolLiquidityResponse](#osmosis.gamm.v1beta1.QueryTotalPoolLiquidityResponse) | | GET|/osmosis/gamm/v1beta1/pools/{poolId}/total_pool_liquidity|
| `TotalShares` | [QueryTotalSharesRequest](#osmosis.gamm.v1beta1.QueryTotalSharesRequest) | [QueryTotalSharesResponse](#osmosis.gamm.v1beta1.QueryTotalSharesResponse) | | GET|/osmosis/gamm/v1beta1/pools/{poolId}/total_shares|
| `SpotPrice` | [QuerySpotPriceRequest](#osmosis.gamm.v1beta1.QuerySpotPriceRequest) | [QuerySpotPriceResponse](#osmosis.gamm.v1beta1.QuerySpotPriceResponse) | SpotPrice defines a gRPC query handler that returns the spot price given a base denomination and a quote denomination. | GET|/osmosis/gamm/v1beta1/pools/{poolId}/prices|
| `EstimateSwapExactAmountIn` | [QuerySwapExactAmountInRequest](#osmosis.gamm.v1beta1.QuerySwapExactAmountInRequest) | [QuerySwapExactAmountInResponse](#osmosis.gamm.v1beta1.QuerySwapExactAmountInResponse) | Estimate the swap. | GET|/osmosis/gamm/v1beta1/{poolId}/estimate/swap_exact_amount_in|
| `EstimateSwapExactAmountOut` | [QuerySwapExactAmountOutRequest](#osmosis.gamm.v1beta1.QuerySwapExactAmountOutRequest) | [QuerySwapExactAmountOutResponse](#osmosis.gamm.v1beta1.QuerySwapExactAmountOutResponse) | | GET|/osmosis/gamm/v1beta1/{poolId}/estimate/swap_exact_amount_out|
| `Pool` | [QueryPoolRequest](#osmosis.gamm.v1beta1.QueryPoolRequest) | [QueryPoolResponse](#osmosis.gamm.v1beta1.QueryPoolResponse) | Per Pool gRPC Endpoints | GET|/osmosis/gamm/v1beta1/pools/{pool_id}|
| `PoolParams` | [QueryPoolParamsRequest](#osmosis.gamm.v1beta1.QueryPoolParamsRequest) | [QueryPoolParamsResponse](#osmosis.gamm.v1beta1.QueryPoolParamsResponse) | | GET|/osmosis/gamm/v1beta1/pools/{pool_id}/params|
| `TotalPoolLiquidity` | [QueryTotalPoolLiquidityRequest](#osmosis.gamm.v1beta1.QueryTotalPoolLiquidityRequest) | [QueryTotalPoolLiquidityResponse](#osmosis.gamm.v1beta1.QueryTotalPoolLiquidityResponse) | | GET|/osmosis/gamm/v1beta1/pools/{pool_id}/total_pool_liquidity|
| `TotalShares` | [QueryTotalSharesRequest](#osmosis.gamm.v1beta1.QueryTotalSharesRequest) | [QueryTotalSharesResponse](#osmosis.gamm.v1beta1.QueryTotalSharesResponse) | | GET|/osmosis/gamm/v1beta1/pools/{pool_id}/total_shares|
| `SpotPrice` | [QuerySpotPriceRequest](#osmosis.gamm.v1beta1.QuerySpotPriceRequest) | [QuerySpotPriceResponse](#osmosis.gamm.v1beta1.QuerySpotPriceResponse) | SpotPrice defines a gRPC query handler that returns the spot price given a base denomination and a quote denomination. | GET|/osmosis/gamm/v1beta1/pools/{pool_id}/prices|
| `EstimateSwapExactAmountIn` | [QuerySwapExactAmountInRequest](#osmosis.gamm.v1beta1.QuerySwapExactAmountInRequest) | [QuerySwapExactAmountInResponse](#osmosis.gamm.v1beta1.QuerySwapExactAmountInResponse) | Estimate the swap. | GET|/osmosis/gamm/v1beta1/{pool_id}/estimate/swap_exact_amount_in|
| `EstimateSwapExactAmountOut` | [QuerySwapExactAmountOutRequest](#osmosis.gamm.v1beta1.QuerySwapExactAmountOutRequest) | [QuerySwapExactAmountOutResponse](#osmosis.gamm.v1beta1.QuerySwapExactAmountOutResponse) | | GET|/osmosis/gamm/v1beta1/{pool_id}/estimate/swap_exact_amount_out|

<!-- end services -->

Expand Down
18 changes: 9 additions & 9 deletions proto/osmosis/gamm/pool-models/balancer/balancerPool.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ message SmoothWeightChangeParams {
// The amount PoolAsset.token.amount field is ignored if present,
// future type refactorings should just have a type with the denom & weight
// here.
repeated osmosis.gamm.v1beta1.PoolAsset initialPoolWeights = 3 [
repeated osmosis.gamm.v1beta1.PoolAsset initial_pool_weights = 3 [
(gogoproto.moretags) = "yaml:\"initial_pool_weights\"",
(gogoproto.nullable) = false
];
// The target pool weights. The pool weights will change linearly with respect
// to time between start_time, and start_time + duration. The amount
// PoolAsset.token.amount field is ignored if present, future type
// refactorings should just have a type with the denom & weight here.
repeated osmosis.gamm.v1beta1.PoolAsset targetPoolWeights = 4 [
repeated osmosis.gamm.v1beta1.PoolAsset target_pool_weights = 4 [
(gogoproto.moretags) = "yaml:\"target_pool_weights\"",
(gogoproto.nullable) = false
];
Expand All @@ -74,17 +74,17 @@ message SmoothWeightChangeParams {
// governance. Instead they will be managed by the token holders of the pool.
// The pool's token holders are specified in future_pool_governor.
message PoolParams {
string swapFee = 1 [
string swap_fee = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"swap_fee\"",
(gogoproto.nullable) = false
];
string exitFee = 2 [
string exit_fee = 2 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"exit_fee\"",
(gogoproto.nullable) = false
];
SmoothWeightChangeParams smoothWeightChangeParams = 3 [
SmoothWeightChangeParams smooth_weight_change_params = 3 [
(gogoproto.moretags) = "yaml:\"smooth_weight_change_params\"",
(gogoproto.nullable) = true
];
Expand Down Expand Up @@ -115,7 +115,7 @@ message Pool {
string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ];
uint64 id = 2;

PoolParams poolParams = 3 [
PoolParams pool_params = 3 [
(gogoproto.moretags) = "yaml:\"balancer_pool_params\"",
(gogoproto.nullable) = false
];
Expand All @@ -132,18 +132,18 @@ message Pool {
string future_pool_governor = 4
[ (gogoproto.moretags) = "yaml:\"future_pool_governor\"" ];
// sum of all LP tokens sent out
cosmos.base.v1beta1.Coin totalShares = 5 [
cosmos.base.v1beta1.Coin total_shares = 5 [
(gogoproto.moretags) = "yaml:\"total_shares\"",
(gogoproto.nullable) = false
];
// These are assumed to be sorted by denomiation.
// They contain the pool asset and the information about the weight
repeated osmosis.gamm.v1beta1.PoolAsset poolAssets = 6 [
repeated osmosis.gamm.v1beta1.PoolAsset pool_assets = 6 [
(gogoproto.moretags) = "yaml:\"pool_assets\"",
(gogoproto.nullable) = false
];
// sum of all non-normalized pool weights
string totalWeight = 7 [
string total_weight = 7 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"total_weight\"",
(gogoproto.nullable) = false
Expand Down
Loading

0 comments on commit a1ca194

Please sign in to comment.