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

add annotations for client tooling and codegen #3782

Closed
Closed
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
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 @@ -114,6 +117,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";
import "cosmos/base/v1beta1/coin.proto";
import "google/protobuf/timestamp.proto";
Expand All @@ -18,6 +19,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/v15/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 @@ -37,6 +40,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/v15/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";
import "osmosis/poolmanager/v1beta1/swap_route.proto";

Expand All @@ -27,6 +28,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 @@ -54,6 +57,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 All @@ -77,6 +82,8 @@ message MsgExitPoolResponse {

// ===================== MsgSwapExactAmountIn
message MsgSwapExactAmountIn {
option (amino.name) = "osmosis/gamm/swap-exact-amount-in";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
repeated osmosis.poolmanager.v1beta1.SwapAmountInRoute routes = 2
[ (gogoproto.nullable) = false ];
Expand All @@ -100,6 +107,8 @@ message MsgSwapExactAmountInResponse {
}

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

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
repeated osmosis.poolmanager.v1beta1.SwapAmountOutRoute routes = 2
[ (gogoproto.nullable) = false ];
Expand All @@ -125,6 +134,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 @@ -152,6 +163,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 @@ -178,6 +191,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 @@ -204,6 +219,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/v15/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/v15/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";
import "cosmos_proto/cosmos.proto";
Expand Down Expand Up @@ -54,6 +55,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 [
(gogoproto.moretags) = "yaml:\"admin\"",
Expand All @@ -71,6 +74,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 [
(gogoproto.moretags) = "yaml:\"admin\"",
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 "google/protobuf/timestamp.proto";
Expand Down Expand Up @@ -46,19 +47,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 @@ -84,6 +91,8 @@ message MsgSuperfluidUndelegateAndUnbondLockResponse {}
// 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 @@ -102,6 +111,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/v15/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