Skip to content

Commit

Permalink
add annotations for client tooling and codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
pyramation committed Dec 18, 2022
1 parent 6206709 commit 476ab3d
Show file tree
Hide file tree
Showing 15 changed files with 101 additions and 1 deletion.
4 changes: 4 additions & 0 deletions proto/osmosis/gamm/pool-models/balancer/balancerPool.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package osmosis.gamm.v1beta1;

import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "amino/amino.proto";

import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
Expand Down Expand Up @@ -74,6 +75,8 @@ 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 {
option (amino.name) = "osmosis/gamm/BalancerPoolParams";

string swap_fee = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"swap_fee\"",
Expand Down Expand Up @@ -111,6 +114,7 @@ message Pool {
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false;
option (cosmos_proto.implements_interface) = "PoolI";
option (amino.name) = "osmosis/gamm/BalancerPool";

string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ];
uint64 id = 2;
Expand Down
3 changes: 3 additions & 0 deletions proto/osmosis/gamm/pool-models/balancer/tx/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package osmosis.gamm.poolmodels.balancer.v1beta1;

import "gogoproto/gogo.proto";
import "amino/amino.proto";
import "osmosis/gamm/pool-models/balancer/balancerPool.proto";

option go_package = "github.com/osmosis-labs/osmosis/v13/x/gamm/pool-models/balancer";
Expand All @@ -13,6 +14,8 @@ service Msg {

// ===================== MsgCreatePool
message MsgCreateBalancerPool {
option (amino.name) = "osmosis/gamm/create-balancer-pool";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];

osmosis.gamm.v1beta1.PoolParams pool_params = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package osmosis.gamm.poolmodels.stableswap.v1beta1;

import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "amino/amino.proto";

import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
Expand All @@ -17,6 +18,8 @@ option go_package = "github.com/osmosis-labs/osmosis/v13/x/gamm/pool-models/stab
// 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 {
option (amino.name) = "osmosis/gamm/StableswapPoolParams";

string swap_fee = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"swap_fee\"",
Expand All @@ -34,6 +37,7 @@ message Pool {
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false;
option (cosmos_proto.implements_interface) = "PoolI";
option (amino.name) = "osmosis/gamm/StableswapPool";

string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ];
uint64 id = 2;
Expand Down
5 changes: 5 additions & 0 deletions proto/osmosis/gamm/pool-models/stableswap/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package osmosis.gamm.poolmodels.stableswap.v1beta1;

import "cosmos/base/v1beta1/coin.proto";
import "gogoproto/gogo.proto";
import "amino/amino.proto";
import "osmosis/gamm/pool-models/stableswap/stableswap_pool.proto";

option go_package = "github.com/osmosis-labs/osmosis/v13/x/gamm/pool-models/stableswap";
Expand All @@ -16,6 +17,8 @@ service Msg {

// ===================== MsgCreatePool
message MsgCreateStableswapPool {
option (amino.name) = "osmosis/gamm/create-stableswap-pool";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];

PoolParams pool_params = 2 [ (gogoproto.moretags) = "yaml:\"pool_params\"" ];
Expand Down Expand Up @@ -43,6 +46,8 @@ message MsgCreateStableswapPoolResponse {
// Sender must be the pool's scaling_factor_governor in order for the tx to
// succeed. Adjusts stableswap scaling factors.
message MsgStableSwapAdjustScalingFactors {
option (amino.name) = "osmosis/gamm/stableswap-adjust-scaling-factors";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 pool_id = 2 [ (gogoproto.customname) = "PoolID" ];

Expand Down
17 changes: 17 additions & 0 deletions proto/osmosis/gamm/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ 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/osmosis-labs/osmosis/v13/x/gamm/types";
Expand All @@ -26,6 +27,8 @@ service Msg {
// ===================== MsgJoinPool
// This is really MsgJoinPoolNoSwap
message MsgJoinPool {
option (amino.name) = "osmosis/gamm/join-pool";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ];
string share_out_amount = 3 [
Expand Down Expand Up @@ -53,6 +56,8 @@ message MsgJoinPoolResponse {

// ===================== MsgExitPool
message MsgExitPool {
option (amino.name) = "osmosis/gamm/exit-pool";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ];
string share_in_amount = 3 [
Expand Down Expand Up @@ -82,6 +87,8 @@ message SwapAmountInRoute {
}

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 [
Expand Down Expand Up @@ -111,6 +118,8 @@ message SwapAmountOutRoute {
}

message MsgSwapExactAmountOut {
option (amino.name) = "osmosis/gamm/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 @@ -135,6 +144,8 @@ message MsgSwapExactAmountOutResponse {
// ===================== MsgJoinSwapExternAmountIn
// TODO: Rename to MsgJoinSwapExactAmountIn
message MsgJoinSwapExternAmountIn {
option (amino.name) = "osmosis/gamm/join-swap-extern-amount-in";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ];
cosmos.base.v1beta1.Coin token_in = 3 [
Expand Down Expand Up @@ -162,6 +173,8 @@ message MsgJoinSwapExternAmountInResponse {

// ===================== MsgJoinSwapShareAmountOut
message MsgJoinSwapShareAmountOut {
option (amino.name) = "osmosis/gamm/join-swap-share-amount-out";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ];
string token_in_denom = 3
Expand All @@ -188,6 +201,8 @@ message MsgJoinSwapShareAmountOutResponse {

// ===================== MsgExitSwapShareAmountIn
message MsgExitSwapShareAmountIn {
option (amino.name) = "osmosis/gamm/exit-swap-share-amount-in";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ];
string token_out_denom = 3
Expand All @@ -214,6 +229,8 @@ message MsgExitSwapShareAmountInResponse {

// ===================== MsgExitSwapExternAmountOut
message MsgExitSwapExternAmountOut {
option (amino.name) = "osmosis/gamm/exit-swap-extern-amount-out";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ];
cosmos.base.v1beta1.Coin token_out = 3 [
Expand Down
5 changes: 5 additions & 0 deletions proto/osmosis/incentives/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package osmosis.incentives;

import "gogoproto/gogo.proto";
import "amino/amino.proto";
import "google/protobuf/timestamp.proto";
import "cosmos/base/v1beta1/coin.proto";
import "osmosis/incentives/gauge.proto";
Expand All @@ -16,6 +17,8 @@ service Msg {

// MsgCreateGauge creates a gague to distribute rewards to users
message MsgCreateGauge {
option (amino.name) = "osmosis/incentives/create-gauge";

// is_perpetual shows if it's a perpetual or non-perpetual gauge
// Non-perpetual gauges distribute their tokens equally per epoch while the
// gauge is in the active period. Perpetual gauges distribute all their tokens
Expand Down Expand Up @@ -47,6 +50,8 @@ message MsgCreateGaugeResponse {}

// MsgAddToGauge adds coins to a previously created gauge
message MsgAddToGauge {
option (amino.name) = "osmosis/incentives/add-to-gauge";

// owner is the gauge owner's address
string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ];
// gauge_id is the ID of gauge that rewards are getting added to
Expand Down
7 changes: 7 additions & 0 deletions proto/osmosis/lockup/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package osmosis.lockup;

import "gogoproto/gogo.proto";
import "amino/amino.proto";
import "google/protobuf/duration.proto";
import "cosmos/base/v1beta1/coin.proto";
import "osmosis/lockup/lock.proto";
Expand All @@ -23,6 +24,8 @@ service Msg {
}

message MsgLockTokens {
option (amino.name) = "osmosis/lockup/lock-tokens";

string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ];
google.protobuf.Duration duration = 2 [
(gogoproto.nullable) = false,
Expand All @@ -38,11 +41,15 @@ message MsgLockTokens {
message MsgLockTokensResponse { uint64 ID = 1; }

message MsgBeginUnlockingAll {
option (amino.name) = "osmosis/lockup/begin-unlock-tokens";

string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ];
}
message MsgBeginUnlockingAllResponse { repeated PeriodLock unlocks = 1; }

message MsgBeginUnlocking {
option (amino.name) = "osmosis/lockup/begin-unlock-period-lock";

string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ];
uint64 ID = 2;
// Amount of unlocking coins. Unlock all if not set.
Expand Down
7 changes: 6 additions & 1 deletion proto/osmosis/pool-incentives/v1beta1/gov.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ syntax = "proto3";
package osmosis.poolincentives.v1beta1;

import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "amino/amino.proto";
import "osmosis/pool-incentives/v1beta1/incentives.proto";

option go_package = "github.com/osmosis-labs/osmosis/v13/x/pool-incentives/types";
Expand All @@ -17,7 +19,8 @@ message ReplacePoolIncentivesProposal {
option (gogoproto.equal) = true;
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false;

option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";

string title = 1;
string description = 2;
repeated DistrRecord records = 3 [ (gogoproto.nullable) = false ];
Expand All @@ -42,6 +45,8 @@ message UpdatePoolIncentivesProposal {
option (gogoproto.equal) = true;
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false;
option (amino.name) = "osmosis/UpdatePoolIncentivesProposal";
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";

string title = 1;
string description = 2;
Expand Down
3 changes: 3 additions & 0 deletions proto/osmosis/protorev/v1beta1/gov.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package osmosis.protorev.v1beta1;

import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "osmosis/protorev/v1beta1/protorev.proto";

option go_package = "github.com/osmosis-labs/osmosis/v13/x/protorev/types";
Expand All @@ -12,6 +13,7 @@ message SetProtoRevEnabledProposal {
option (gogoproto.equal) = true;
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false;
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";

string title = 1;
string description = 2;
Expand All @@ -25,6 +27,7 @@ message SetProtoRevAdminAccountProposal {
option (gogoproto.equal) = true;
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false;
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";

string title = 1;
string description = 2;
Expand Down
5 changes: 5 additions & 0 deletions proto/osmosis/protorev/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package osmosis.protorev.v1beta1;

import "gogoproto/gogo.proto";
import "amino/amino.proto";
import "google/api/annotations.proto";
import "osmosis/protorev/v1beta1/protorev.proto";

Expand All @@ -25,6 +26,8 @@ service Msg {

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

// admin is the account that is authorized to set the hot routes.
string admin = 1;
// hot_routes is the list of hot routes to set.
Expand All @@ -36,6 +39,8 @@ message MsgSetHotRoutesResponse {}

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

// admin is the account that is authorized to set the developer account.
string admin = 1;
// developer_account is the account that will receive a portion of the profits
Expand Down
11 changes: 11 additions & 0 deletions proto/osmosis/superfluid/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package osmosis.superfluid;

import "gogoproto/gogo.proto";
import "amino/amino.proto";
import "google/protobuf/duration.proto";
import "cosmos/base/v1beta1/coin.proto";
import "osmosis/superfluid/superfluid.proto";
Expand Down Expand Up @@ -36,19 +37,25 @@ service Msg {
}

message MsgSuperfluidDelegate {
option (amino.name) = "osmosis/superfluid-delegate";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 lock_id = 2;
string val_addr = 3;
}
message MsgSuperfluidDelegateResponse {}

message MsgSuperfluidUndelegate {
option (amino.name) = "osmosis/superfluid-undelegate";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 lock_id = 2;
}
message MsgSuperfluidUndelegateResponse {}

message MsgSuperfluidUnbondLock {
option (amino.name) = "osmosis/superfluid-unbond-lock";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 lock_id = 2;
}
Expand All @@ -65,6 +72,8 @@ message MsgSuperfluidUnbondLockResponse {}
// and then does a superfluid lock from the newly created lockup, to the
// specified validator addr.
message MsgLockAndSuperfluidDelegate {
option (amino.name) = "osmosis/lock-and-superfluid-delegate";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
repeated cosmos.base.v1beta1.Coin coins = 2 [
(gogoproto.nullable) = false,
Expand All @@ -83,6 +92,8 @@ message MsgLockAndSuperfluidDelegateResponse { uint64 ID = 1; }
// If the lock was unbonding, the new lockup durations should be the time left
// until unbond completion.
message MsgUnPoolWhitelistedPool {
option (amino.name) = "osmosis/unpool-whitelisted-pool";

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

import "gogoproto/gogo.proto";
import "amino/amino.proto";
import "cosmos_proto/cosmos.proto";
import "osmosis/superfluid/superfluid.proto";

option go_package = "github.com/osmosis-labs/osmosis/v13/x/superfluid/types";
Expand All @@ -12,6 +14,8 @@ message SetSuperfluidAssetsProposal {
option (gogoproto.equal) = true;
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false;
option (amino.name) = "osmosis/set-superfluid-assets-proposal";
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";

string title = 1;
string description = 2;
Expand All @@ -24,6 +28,8 @@ message RemoveSuperfluidAssetsProposal {
option (gogoproto.equal) = true;
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false;
option (amino.name) = "osmosis/del-superfluid-assets-proposal";
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";

string title = 1;
string description = 2;
Expand All @@ -36,6 +42,8 @@ message UpdateUnpoolWhiteListProposal {
option (gogoproto.equal) = true;
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false;
option (amino.name) = "osmosis/update-unpool-whitelist";
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";

string title = 1;
string description = 2;
Expand Down
Loading

0 comments on commit 476ab3d

Please sign in to comment.