syntax = "proto3";
package secret.compute.v1beta1;

option go_package = "github.com/enigmampc/SecretNetwork/x/compute/internal/types";

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

//import "x/compute/internal/types/types.proto";


message MsgStoreCode {
  option (gogoproto.goproto_getters) = false;

  bytes sender = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
  // WASMByteCode can be raw or gzip compressed
  bytes wasm_byte_code = 2 [(gogoproto.customname) = "WASMByteCode"];
  // Source is a valid absolute HTTPS URI to the contract's source code, optional
  string source = 3;
  // Builder is a valid docker image name with tag, optional
  string builder = 4;
  // InstantiatePermission to apply on contract creation, optional
//  AccessConfig InstantiatePermission = 5;
}

message MsgInstantiateContract {
  option (gogoproto.goproto_getters) = false;

  bytes sender = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
  // Admin is an optional address that can execute migrations
//  bytes admin = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
  string callback_code_hash = 2;
  uint64 code_id = 3 [(gogoproto.customname) = "CodeID"];
  string label = 4;
  bytes init_msg = 5;
  repeated cosmos.base.v1beta1.Coin init_funds = 6 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
  bytes callback_sig = 7 [(gogoproto.customname) = "CallbackSig"];
}

message MsgExecuteContract {
  option (gogoproto.goproto_getters) = false;

  bytes sender = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
  bytes contract = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
  bytes msg = 3;
  string callback_code_hash = 4;
  repeated cosmos.base.v1beta1.Coin sent_funds = 5 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
  bytes callback_sig = 6 [(gogoproto.customname) = "CallbackSig"];
}

// Todo: keeping this here for future replacing of bytes -> string
//syntax = "proto3";
//package secret.compute.v1beta1;
//
//option go_package = "github.com/enigmampc/SecretNetwork/x/compute/internal/types";
//
//import "gogoproto/gogo.proto";
//import "cosmos/base/v1beta1/coin.proto";
//
////import "x/compute/internal/types/types.proto";
//
//
//message MsgStoreCode {
//  option (gogoproto.goproto_getters) = false;
//
//  //
//  string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""];
//  // WASMByteCode can be raw or gzip compressed
//  bytes wasm_byte_code = 2 [(gogoproto.customname) = "WASMByteCode"];
//  // Source is a valid absolute HTTPS URI to the contract's source code, optional
//  string source = 3 [(gogoproto.moretags) = "yaml:\"source\""];
//  // Builder is a valid docker image name with tag, optional
//  string builder = 4 [(gogoproto.moretags) = "yaml:\"builder\""];
//}
//
//message MsgInstantiateContract {
//  option (gogoproto.goproto_getters) = false;
//
//  //
//  string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""];
//  //
//  string callback_code_hash = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"callback_code_hash\"" ];
//  //
//  uint64 code_id = 3 [(gogoproto.customname) = "CodeID", (gogoproto.moretags) = "yaml:\"code_id\""];
//  //
//  string label = 4 [(gogoproto.moretags) = "yaml:\"label\""];
//  //
//  bytes init_msg = 5 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"init_msg\"" ];
//  //
//  repeated cosmos.base.v1beta1.Coin init_funds = 6 [
//    (gogoproto.nullable) = false,
//    (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
//    (gogoproto.moretags) = "yaml:\"init_funds\""
//  ];
//  //
//  bytes callback_sig = 7 [(gogoproto.customname) = "CallbackSig", (gogoproto.moretags) = "yaml:\"callback_sig\""];
//}
//
//message MsgExecuteContract {
//  option (gogoproto.goproto_getters) = false;
//  //
//  string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""];
//  //
//  string contract = 2 [(gogoproto.moretags) = "yaml:\"contract\""];
//  //
//  bytes msg = 3 [(gogoproto.moretags) = "yaml:\"msg\""];
//  //
//  string callback_code_hash = 4 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"callback_code_hash\"" ];
//  //
//  repeated cosmos.base.v1beta1.Coin sent_funds = 5 [
//    (gogoproto.nullable) = false,
//    (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
//    (gogoproto.moretags) = "yaml:\"sent_funds\""
//  ];
//  //
//  bytes callback_sig = 6 [(gogoproto.customname) = "CallbackSig", (gogoproto.moretags) = "yaml:\"callback_sig\""];
//}