syntax = "proto3";

package elys.parameter;

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

option go_package = "github.com/elys-network/elys/x/parameter/types";

// Msg defines the Msg service.
service Msg {
  option (cosmos.msg.v1.service) = true;
  rpc UpdateMinCommission(MsgUpdateMinCommission)
      returns (MsgUpdateMinCommissionResponse);
  rpc UpdateMaxVotingPower(MsgUpdateMaxVotingPower)
      returns (MsgUpdateMaxVotingPowerResponse);
  rpc UpdateMinSelfDelegation(MsgUpdateMinSelfDelegation)
      returns (MsgUpdateMinSelfDelegationResponse);
  rpc UpdateTotalBlocksPerYear(MsgUpdateTotalBlocksPerYear)
      returns (MsgUpdateTotalBlocksPerYearResponse);
  rpc UpdateRewardsDataLifetime(MsgUpdateRewardsDataLifetime)
      returns (MsgUpdateRewardsDataLifetimeResponse);
  rpc UpdateTakerFees(MsgUpdateTakerFees) returns (MsgUpdateTakerFeesResponse);
}
message MsgUpdateMinCommission {
  option (cosmos.msg.v1.signer) = "creator";
  option (amino.name) = "parameter/MsgUpdateMinCommission";
  string creator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
  string min_commission = 2 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
}

message MsgUpdateMinCommissionResponse {}

message MsgUpdateMaxVotingPower {
  option (cosmos.msg.v1.signer) = "creator";
  option (amino.name) = "parameter/MsgUpdateMaxVotingPower";
  string creator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
  string max_voting_power = 2 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
}

message MsgUpdateMaxVotingPowerResponse {}

message MsgUpdateMinSelfDelegation {
  option (cosmos.msg.v1.signer) = "creator";
  option (amino.name) = "parameter/MsgUpdateMinSelfDelegation";
  string creator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
  string min_self_delegation = 2 [
    (cosmos_proto.scalar) = "cosmos.Int",
    (gogoproto.customtype) = "cosmossdk.io/math.Int",
    (gogoproto.nullable) = false
  ];
}

message MsgUpdateMinSelfDelegationResponse {}

message MsgUpdateTotalBlocksPerYear {
  option (cosmos.msg.v1.signer) = "creator";
  option (amino.name) = "parameter/MsgUpdateTotalBlocksPerYear";
  string creator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
  uint64 total_blocks_per_year = 2;
}

message MsgUpdateTotalBlocksPerYearResponse {}

message MsgUpdateRewardsDataLifetime {
  option (cosmos.msg.v1.signer) = "creator";
  option (amino.name) = "parameter/MsgUpdateRewardsDataLifetime";
  string creator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
  uint64 rewards_data_lifetime = 2;
}

message MsgUpdateRewardsDataLifetimeResponse {}

message MsgUpdateTakerFees {
  option (cosmos.msg.v1.signer) = "creator";
  option (amino.name) = "parameter/MsgUpdateTakerFees";
  string creator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
  string taker_fees = 2 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
}

message MsgUpdateTakerFeesResponse {}
