Skip to content

Commit

Permalink
[Chore] Add amino name for tx msgs (backport #5784) (#5787)
Browse files Browse the repository at this point in the history
* [Chore] Add amino name for tx msgs (#5784)

* updated amino name

* updated

(cherry picked from commit 1e3149f)

* cleanup

* more cleanup

* fixed conflicts

* rebased

* Delete atom

---------

Co-authored-by: Sishir Giri <[email protected]>
Co-authored-by: Dev Ojha <[email protected]>
  • Loading branch information
3 people authored Jul 14, 2023
1 parent 8102ef4 commit 1059bce
Show file tree
Hide file tree
Showing 10 changed files with 361 additions and 305 deletions.
13 changes: 13 additions & 0 deletions proto/osmosis/concentrated-liquidity/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package osmosis.concentratedliquidity.v1beta1;

import "gogoproto/gogo.proto";
import "amino/amino.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
import "cosmos/base/v1beta1/coin.proto";
Expand All @@ -26,6 +27,8 @@ service Msg {

// ===================== MsgCreatePosition
message MsgCreatePosition {
option (amino.name) = "osmosis/cl-create-position";

uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ];
string sender = 2 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
int64 lower_tick = 3 [ (gogoproto.moretags) = "yaml:\"lower_tick\"" ];
Expand Down Expand Up @@ -77,6 +80,8 @@ message MsgCreatePositionResponse {

// ===================== MsgAddToPosition
message MsgAddToPosition {
option (amino.name) = "osmosis/cl-add-to-position";

uint64 position_id = 1 [ (gogoproto.moretags) = "yaml:\"position_id\"" ];
string sender = 2 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
// amount0 represents the amount of token0 willing to put in.
Expand Down Expand Up @@ -127,6 +132,8 @@ message MsgAddToPositionResponse {

// ===================== MsgWithdrawPosition
message MsgWithdrawPosition {
option (amino.name) = "osmosis/cl-withdraw-position";

uint64 position_id = 1 [ (gogoproto.moretags) = "yaml:\"position_id\"" ];
string sender = 2 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
string liquidity_amount = 3 [
Expand All @@ -151,6 +158,8 @@ message MsgWithdrawPositionResponse {

// ===================== MsgCollectSpreadRewards
message MsgCollectSpreadRewards {
option (amino.name) = "osmosis/cl-col-sp-rewards";

repeated uint64 position_ids = 1
[ (gogoproto.moretags) = "yaml:\"position_ids\"" ];
string sender = 2 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
Expand All @@ -166,6 +175,8 @@ message MsgCollectSpreadRewardsResponse {

// ===================== MsgCollectIncentives
message MsgCollectIncentives {
option (amino.name) = "osmosis/cl-collect-incentives";

repeated uint64 position_ids = 1
[ (gogoproto.moretags) = "yaml:\"position_ids\"" ];
string sender = 2 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
Expand All @@ -186,6 +197,8 @@ message MsgCollectIncentivesResponse {

// ===================== MsgFungifyChargedPositions
message MsgFungifyChargedPositions {
option (amino.name) = "osmosis/cl-fungify-charged-positions";

repeated uint64 position_ids = 1
[ (gogoproto.moretags) = "yaml:\"position_ids\"" ];
string sender = 2 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
Expand Down
9 changes: 9 additions & 0 deletions proto/osmosis/poolmanager/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package osmosis.poolmanager.v1beta1;

import "gogoproto/gogo.proto";
import "amino/amino.proto";
import "cosmos/base/v1beta1/coin.proto";
import "osmosis/poolmanager/v1beta1/swap_route.proto";

Expand All @@ -20,6 +21,8 @@ service Msg {

// ===================== MsgSwapExactAmountIn
message MsgSwapExactAmountIn {
option (amino.name) = "osmosis/poolmanager/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 [
Expand All @@ -43,6 +46,8 @@ message MsgSwapExactAmountInResponse {

// ===================== MsgSplitRouteSwapExactAmountIn
message MsgSplitRouteSwapExactAmountIn {
option (amino.name) = "osmosis/poolmanager/split-amount-in";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
repeated SwapAmountInSplitRoute routes = 2 [ (gogoproto.nullable) = false ];
string token_in_denom = 3
Expand All @@ -64,6 +69,8 @@ message MsgSplitRouteSwapExactAmountInResponse {

// ===================== MsgSwapExactAmountOut
message MsgSwapExactAmountOut {
option (amino.name) = "osmosis/poolmanager/swap-exact-amount-out";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
repeated SwapAmountOutRoute routes = 2 [ (gogoproto.nullable) = false ];
string token_in_max_amount = 3 [
Expand All @@ -87,6 +94,8 @@ message MsgSwapExactAmountOutResponse {

// ===================== MsgSplitRouteSwapExactAmountOut
message MsgSplitRouteSwapExactAmountOut {
option (amino.name) = "osmosis/poolmanager/split-amount-out";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
repeated SwapAmountOutSplitRoute routes = 2 [ (gogoproto.nullable) = false ];
string token_out_denom = 3
Expand Down
8 changes: 8 additions & 0 deletions proto/osmosis/protorev/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ message MsgSetDeveloperAccountResponse {}

// MsgSetPoolWeights defines the Msg/SetPoolWeights request type.
message MsgSetPoolWeights {
option (amino.name) = "osmosis/MsgSetPoolWeights";

// admin is the account that is authorized to set the pool weights.
string admin = 1 [
(gogoproto.moretags) = "yaml:\"admin\"",
Expand All @@ -110,6 +112,8 @@ message MsgSetPoolWeightsResponse {}

// MsgSetMaxPoolPointsPerTx defines the Msg/SetMaxPoolPointsPerTx request type.
message MsgSetMaxPoolPointsPerTx {
option (amino.name) = "osmosis/MsgSetMaxPoolPointsPerTx";

// admin is the account that is authorized to set the max pool points per tx.
string admin = 1 [
(gogoproto.moretags) = "yaml:\"admin\"",
Expand All @@ -128,6 +132,8 @@ message MsgSetMaxPoolPointsPerTxResponse {}
// MsgSetMaxPoolPointsPerBlock defines the Msg/SetMaxPoolPointsPerBlock request
// type.
message MsgSetMaxPoolPointsPerBlock {
option (amino.name) = "osmosis/MsgSetPoolWeights";

// admin is the account that is authorized to set the max pool points per
// block.
string admin = 1 [
Expand All @@ -146,6 +152,8 @@ message MsgSetMaxPoolPointsPerBlockResponse {}

// MsgSetBaseDenoms defines the Msg/SetBaseDenoms request type.
message MsgSetBaseDenoms {
option (amino.name) = "osmosis/MsgSetBaseDenoms";

// admin is the account that is authorized to set the base denoms.
string admin = 1 [
(gogoproto.moretags) = "yaml:\"admin\"",
Expand Down
6 changes: 6 additions & 0 deletions proto/osmosis/superfluid/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ message MsgLockAndSuperfluidDelegateResponse { uint64 ID = 1; }
// MsgCreateFullRangePositionAndSuperfluidDelegate creates a full range position
// in a concentrated liquidity pool, then superfluid delegates.
message MsgCreateFullRangePositionAndSuperfluidDelegate {
option (amino.name) = "osmosis/full-range-and-sf-delegate";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
repeated cosmos.base.v1beta1.Coin coins = 2 [
(gogoproto.nullable) = false,
Expand Down Expand Up @@ -153,6 +155,8 @@ message MsgUnPoolWhitelistedPoolResponse {
// =====================
// MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition
message MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition {
option (amino.name) = "osmosis/unlock-and-migrate";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
int64 lock_id = 2 [ (gogoproto.moretags) = "yaml:\"lock_id\"" ];
cosmos.base.v1beta1.Coin shares_to_migrate = 3 [
Expand Down Expand Up @@ -192,6 +196,8 @@ message MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionResponse {

// ===================== MsgAddToConcentratedLiquiditySuperfluidPosition
message MsgAddToConcentratedLiquiditySuperfluidPosition {
option (amino.name) = "osmosis/add-to-cl-superfluid-position";

uint64 position_id = 1 [ (gogoproto.moretags) = "yaml:\"position_id\"" ];
string sender = 2 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
cosmos.base.v1beta1.Coin token_desired0 = 3 [
Expand Down
2 changes: 2 additions & 0 deletions proto/osmosis/tokenfactory/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ message MsgSetDenomMetadata {
message MsgSetDenomMetadataResponse {}

message MsgForceTransfer {
option (amino.name) = "osmosis/tokenfactory/force-transfer";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
cosmos.base.v1beta1.Coin amount = 2 [
(gogoproto.moretags) = "yaml:\"amount\"",
Expand Down
Loading

0 comments on commit 1059bce

Please sign in to comment.