syntax = "proto3";
package elys.commitment;
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";

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

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

// GenesisState defines the commitment module's genesis state.
message Commitments {
  string creator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
  repeated CommittedTokens committed_tokens = 2;
  repeated cosmos.base.v1beta1.Coin claimed = 3 [
    (gogoproto.nullable) = false,
    (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
  ];
  repeated VestingTokens vesting_tokens = 4;
}

message Lockup {
  string amount = 1 [
    (cosmos_proto.scalar) = "cosmos.Int",
    (gogoproto.customtype) = "cosmossdk.io/math.Int",
    (gogoproto.nullable) = false
  ];
  uint64 unlock_timestamp = 2;
}

message CommittedTokens {
  string denom = 1;
  string amount = 2 [
    (cosmos_proto.scalar) = "cosmos.Int",
    (gogoproto.customtype) = "cosmossdk.io/math.Int",
    (gogoproto.nullable) = false
  ];
  repeated Lockup lockups = 3 [ (gogoproto.nullable) = false ];
}

message VestingTokens {
  string denom = 1;
  string total_amount = 2 [
    (cosmos_proto.scalar) = "cosmos.Int",
    (gogoproto.customtype) = "cosmossdk.io/math.Int",
    (gogoproto.nullable) = false
  ];
  string claimed_amount = 3 [
    (cosmos_proto.scalar) = "cosmos.Int",
    (gogoproto.customtype) = "cosmossdk.io/math.Int",
    (gogoproto.nullable) = false
  ];
  int64 num_blocks = 5;
  int64 start_block = 6;
  int64 vest_started_timestamp = 7;
}

message TotalSupply {
  string total_eden_supply = 1 [
    (cosmos_proto.scalar) = "cosmos.Int",
    (gogoproto.customtype) = "cosmossdk.io/math.Int",
    (gogoproto.nullable) = false
  ];
  string total_edenb_supply = 2 [
    (cosmos_proto.scalar) = "cosmos.Int",
    (gogoproto.customtype) = "cosmossdk.io/math.Int",
    (gogoproto.nullable) = false
  ];
  string total_eden_vested = 3 [
    (cosmos_proto.scalar) = "cosmos.Int",
    (gogoproto.customtype) = "cosmossdk.io/math.Int",
    (gogoproto.nullable) = false
  ];
}
