Skip to content

Commit

Permalink
Regenerate protobuf files
Browse files Browse the repository at this point in the history
  • Loading branch information
iKapitonau committed Mar 21, 2024
1 parent 543d0ee commit 39c77de
Show file tree
Hide file tree
Showing 34 changed files with 560 additions and 438 deletions.
35 changes: 22 additions & 13 deletions proto/secret/compute/v1beta1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,38 @@ option go_package = "github.com/scrtlabs/SecretNetwork/x/compute/internal/types"

// GenesisState - genesis state of x/wasm
message GenesisState {
// Params params = 1 [(gogoproto.nullable) = false];
repeated Code codes = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "codes,omitempty"];
repeated Contract contracts = 3 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "contracts,omitempty"];
repeated Sequence sequences = 4 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "sequences,omitempty"];
// Params params = 1 [(gogoproto.nullable) = false];
repeated Code codes = 2
[ (gogoproto.nullable) = false, (gogoproto.jsontag) = "codes,omitempty" ];
repeated Contract contracts = 3 [
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "contracts,omitempty"
];
repeated Sequence sequences = 4 [
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "sequences,omitempty"
];
}

// Code struct encompasses CodeInfo and CodeBytes
message Code {
uint64 code_id = 1 [(gogoproto.customname) = "CodeID"];
CodeInfo code_info = 2 [(gogoproto.nullable) = false];
bytes code_bytes = 3;
uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ];
CodeInfo code_info = 2 [ (gogoproto.nullable) = false ];
bytes code_bytes = 3;
}

// Contract struct encompasses ContractAddress, ContractInfo, and ContractState
message Contract {
bytes contract_address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
ContractInfo contract_info = 2 [(gogoproto.nullable) = false];
repeated Model contract_state = 3 [(gogoproto.nullable) = false];
ContractCustomInfo contract_custom_info = 4;
bytes contract_address = 1
[ (gogoproto.casttype) =
"github.com/cosmos/cosmos-sdk/types.AccAddress" ];
ContractInfo contract_info = 2 [ (gogoproto.nullable) = false ];
repeated Model contract_state = 3 [ (gogoproto.nullable) = false ];
ContractCustomInfo contract_custom_info = 4;
}

// Sequence id and value of a counter
message Sequence {
bytes id_key = 1 [(gogoproto.customname) = "IDKey"];
uint64 value = 2;
bytes id_key = 1 [ (gogoproto.customname) = "IDKey" ];
uint64 value = 2;
}
65 changes: 42 additions & 23 deletions proto/secret/compute/v1beta1/msg.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ service Msg {
// StoreCode to submit Wasm code to the system
rpc StoreCode(MsgStoreCode) returns (MsgStoreCodeResponse);
// Instantiate creates a new smart contract instance for the given code id.
rpc InstantiateContract(MsgInstantiateContract) returns (MsgInstantiateContractResponse);
rpc InstantiateContract(MsgInstantiateContract)
returns (MsgInstantiateContractResponse);
// Execute submits the given message data to a smart contract
rpc ExecuteContract(MsgExecuteContract) returns (MsgExecuteContractResponse);
// Migrate runs a code upgrade/ downgrade for a smart contract
Expand All @@ -25,10 +26,12 @@ service Msg {
message MsgStoreCode {
option (gogoproto.goproto_getters) = false;
// sender is the canonical address of the sender
bytes sender = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
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
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;
Expand All @@ -44,15 +47,20 @@ message MsgInstantiateContract {
option (gogoproto.goproto_getters) = false;

// sender is the canonical address of the sender
bytes sender = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
bytes sender = 1 [ (gogoproto.casttype) =
"github.com/cosmos/cosmos-sdk/types.AccAddress" ];
string callback_code_hash = 2;
uint64 code_id = 3 [(gogoproto.customname) = "CodeID"];
uint64 code_id = 3 [ (gogoproto.customname) = "CodeID" ];
string label = 4;
// init_msg is an encrypted input to pass to the contract on init
bytes init_msg = 5;
repeated cosmos.base.v1beta1.Coin init_funds = 6 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
// used internally for encryption, should always be empty in a signed transaction
bytes callback_sig = 7 [(gogoproto.customname) = "CallbackSig"];
repeated cosmos.base.v1beta1.Coin init_funds = 6 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
// used internally for encryption, should always be empty in a signed
// transaction
bytes callback_sig = 7 [ (gogoproto.customname) = "CallbackSig" ];
// Admin is an optional address that can execute migrations
string admin = 8;
}
Expand All @@ -69,16 +77,23 @@ message MsgExecuteContract {
option (gogoproto.goproto_getters) = false;

// sender is the canonical address of the sender
bytes sender = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
bytes sender = 1 [ (gogoproto.casttype) =
"github.com/cosmos/cosmos-sdk/types.AccAddress" ];
// contract is the canonical address of the contract
bytes contract = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
bytes contract = 2 [ (gogoproto.casttype) =
"github.com/cosmos/cosmos-sdk/types.AccAddress" ];
// msg is an encrypted input to pass to the contract on execute
bytes msg = 3;
// used internally for encryption, should always be empty in a signed transaction
// used internally for encryption, should always be empty in a signed
// transaction
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"];
// used internally for encryption, should always be empty in a signed transaction
bytes callback_sig = 6 [(gogoproto.customname) = "CallbackSig"];
repeated cosmos.base.v1beta1.Coin sent_funds = 5 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
// used internally for encryption, should always be empty in a signed
// transaction
bytes callback_sig = 6 [ (gogoproto.customname) = "CallbackSig" ];
}

// MsgExecuteContractResponse returns execution result data.
Expand All @@ -95,11 +110,13 @@ message MsgMigrateContract {
string contract = 2;
// CodeID references the new WASM code
uint64 code_id = 3 [ (gogoproto.customname) = "CodeID" ];
// msg is an encrypted input to pass to the contract on migration
// msg is an encrypted input to pass to the contract on migration
bytes msg = 4;
// used internally for encryption, should always be empty in a signed transaction
bytes callback_sig = 7 [(gogoproto.customname) = "CallbackSig"];
// used internally for encryption, should always be empty in a signed transaction
// used internally for encryption, should always be empty in a signed
// transaction
bytes callback_sig = 7 [ (gogoproto.customname) = "CallbackSig" ];
// used internally for encryption, should always be empty in a signed
// transaction
string callback_code_hash = 8;
}

Expand All @@ -118,8 +135,9 @@ message MsgUpdateAdmin {
string new_admin = 2;
// Contract is the address of the smart contract
string contract = 3;
// used internally for encryption, should always be empty in a signed transaction
bytes callback_sig = 7 [(gogoproto.customname) = "CallbackSig"];
// used internally for encryption, should always be empty in a signed
// transaction
bytes callback_sig = 7 [ (gogoproto.customname) = "CallbackSig" ];
}

// MsgUpdateAdminResponse returns empty data
Expand All @@ -131,8 +149,9 @@ message MsgClearAdmin {
string sender = 1;
// Contract is the address of the smart contract
string contract = 3;
// used internally for encryption, should always be empty in a signed transaction
bytes callback_sig = 7 [(gogoproto.customname) = "CallbackSig"];
// used internally for encryption, should always be empty in a signed
// transaction
bytes callback_sig = 7 [ (gogoproto.customname) = "CallbackSig" ];
}

// MsgClearAdminResponse returns empty data
Expand Down
Loading

0 comments on commit 39c77de

Please sign in to comment.