// Since: cosmos-sdk 0.46
syntax = "proto3";
package cosmos.upgrade.v1beta1;

import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/upgrade/v1beta1/upgrade.proto";
import "cosmos/msg/v1/msg.proto";

option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types";

// Msg defines the upgrade Msg service.
service Msg {
  // SoftwareUpgrade is a governance operation for initiating a software upgrade.
  //
  // Since: cosmos-sdk 0.46
  rpc SoftwareUpgrade(MsgSoftwareUpgrade) returns (MsgSoftwareUpgradeResponse);
  // CancelUpgrade is a governance operation for cancelling a previously
  // approvid software upgrade.
  //
  // Since: cosmos-sdk 0.46
  rpc CancelUpgrade(MsgCancelUpgrade) returns (MsgCancelUpgradeResponse);
}

// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type.
//
// Since: cosmos-sdk 0.46
message MsgSoftwareUpgrade {
  option (cosmos.msg.v1.signer) = "authority";

  // authority is the address of the governance account.
  string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

  // plan is the upgrade plan.
  Plan plan = 2 [(gogoproto.nullable) = false];
}

// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type.
//
// Since: cosmos-sdk 0.46
message MsgSoftwareUpgradeResponse {}

// MsgCancelUpgrade is the Msg/CancelUpgrade request type.
//
// Since: cosmos-sdk 0.46
message MsgCancelUpgrade {
  option (cosmos.msg.v1.signer) = "authority";

  // authority is the address of the governance account.
  string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type.
//
// Since: cosmos-sdk 0.46
message MsgCancelUpgradeResponse {}