syntax = "proto3";
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";

service Msg {
  rpc CreateStableswapPool(MsgCreateStableswapPool)
      returns (MsgCreateStableswapPoolResponse);
  rpc StableSwapAdjustScalingFactors(MsgStableSwapAdjustScalingFactors)
      returns (MsgStableSwapAdjustScalingFactorsResponse);
}

// ===================== 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\"" ];

  repeated cosmos.base.v1beta1.Coin initial_pool_liquidity = 3 [
    (gogoproto.nullable) = false,
    (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
  ];

  repeated uint64 scaling_factors = 4
      [ (gogoproto.moretags) = "yaml:\"stableswap_scaling_factor\"" ];

  string future_pool_governor = 5
      [ (gogoproto.moretags) = "yaml:\"future_pool_governor\"" ];

  string scaling_factor_controller = 6
      [ (gogoproto.moretags) = "yaml:\"scaling_factor_controller\"" ];
}

// Returns a poolID with custom poolName.
message MsgCreateStableswapPoolResponse {
  uint64 pool_id = 1 [ (gogoproto.customname) = "PoolID" ];
}

// 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" ];

  repeated uint64 scaling_factors = 3
      [ (gogoproto.moretags) = "yaml:\"stableswap_scaling_factor\"" ];
}

message MsgStableSwapAdjustScalingFactorsResponse {}
