syntax = "proto3";
package cosmos.sanction.v1beta1;

import "amino/amino.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";

option go_package = "github.com/provenance-io/provenance/x/sanction";

// Params defines the configurable parameters of the sanction module.
message Params {
  // immediate_sanction_min_deposit is the minimum deposit for a sanction to happen immediately.
  // If this is zero, immediate sanctioning is not available.
  // Otherwise, if a sanction governance proposal is issued with a deposit at least this large, a temporary sanction
  // will be immediately issued that will expire when voting ends on the governance proposal.
  repeated cosmos.base.v1beta1.Coin immediate_sanction_min_deposit = 1 [
    (gogoproto.nullable)     = false,
    (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
    (amino.dont_omitempty)   = true,
    (amino.encoding)         = "legacy_coins"
  ];

  // immediate_unsanction_min_deposit is the minimum deposit for an unsanction to happen immediately.
  // If this is zero, immediate unsanctioning is not available.
  // Otherwise, if an unsanction governance proposal is issued with a deposit at least this large, a temporary
  // unsanction will be immediately issued that will expire when voting ends on the governance proposal.
  repeated cosmos.base.v1beta1.Coin immediate_unsanction_min_deposit = 2 [
    (gogoproto.nullable)     = false,
    (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
    (amino.dont_omitempty)   = true,
    (amino.encoding)         = "legacy_coins"
  ];
}

// TemporaryEntry defines the information involved in a temporary sanction or unsanction.
message TemporaryEntry {
  // address is the address of this temporary entry.
  string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // proposal_id is the governance proposal id associated with this temporary entry.
  uint64 proposal_id = 2;
  // status is whether the entry is a sanction or unsanction.
  TempStatus status = 3;
}

// TempStatus is whether a temporary entry is a sanction or unsanction.
enum TempStatus {
  option (gogoproto.goproto_enum_prefix) = false;

  // TEMP_STATUS_UNSPECIFIED represents and unspecified status value.
  TEMP_STATUS_UNSPECIFIED = 0;
  // TEMP_STATUS_SANCTIONED indicates a sanction is in place.
  TEMP_STATUS_SANCTIONED = 1;
  // TEMP_STATUS_UNSANCTIONED indicates an unsanctioned is in place.
  TEMP_STATUS_UNSANCTIONED = 2;
}