Skip to content

Commit

Permalink
Add signer annotation (cosmos/cosmos-sdk#10933), minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
alpe committed Jan 9, 2023
1 parent 5dc6c8b commit 66913a1
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 119 deletions.
3 changes: 1 addition & 2 deletions proto/cosmwasm/wasm/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,7 @@ message QueryPinnedCodesRequest {
// QueryPinnedCodesResponse is the response type for the
// Query/PinnedCodes RPC method
message QueryPinnedCodesResponse {
repeated uint64 code_ids = 1
[ (gogoproto.nullable) = false, (gogoproto.customname) = "CodeIDs" ];
repeated uint64 code_ids = 1 [ (gogoproto.customname) = "CodeIDs" ];
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
Expand Down
17 changes: 17 additions & 0 deletions proto/cosmwasm/wasm/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package cosmwasm.wasm.v1;

import "cosmos/base/v1beta1/coin.proto";
import "cosmos/msg/v1/msg.proto";
import "gogoproto/gogo.proto";
import "cosmwasm/wasm/v1/types.proto";

Expand Down Expand Up @@ -35,6 +36,8 @@ service Msg {

// MsgStoreCode submit Wasm code to the system
message MsgStoreCode {
option (cosmos.msg.v1.signer) = "sender";

// Sender is the that actor that signed the messages
string sender = 1;
// WASMByteCode can be raw or gzip compressed
Expand All @@ -56,6 +59,8 @@ message MsgStoreCodeResponse {
// MsgInstantiateContract create a new smart contract instance for the given
// code id.
message MsgInstantiateContract {
option (cosmos.msg.v1.signer) = "sender";

// Sender is the that actor that signed the messages
string sender = 1;
// Admin is an optional address that can execute migrations
Expand All @@ -76,6 +81,8 @@ message MsgInstantiateContract {
// MsgInstantiateContract2 create a new smart contract instance for the given
// code id with a predicable address.
message MsgInstantiateContract2 {
option (cosmos.msg.v1.signer) = "sender";

// Sender is the that actor that signed the messages
string sender = 1;
// Admin is an optional address that can execute migrations
Expand Down Expand Up @@ -116,6 +123,8 @@ message MsgInstantiateContract2Response {

// MsgExecuteContract submits the given message data to a smart contract
message MsgExecuteContract {
option (cosmos.msg.v1.signer) = "sender";

// Sender is the that actor that signed the messages
string sender = 1;
// Contract is the address of the smart contract
Expand All @@ -137,6 +146,8 @@ message MsgExecuteContractResponse {

// MsgMigrateContract runs a code upgrade/ downgrade for a smart contract
message MsgMigrateContract {
option (cosmos.msg.v1.signer) = "sender";

// Sender is the that actor that signed the messages
string sender = 1;
// Contract is the address of the smart contract
Expand All @@ -156,6 +167,8 @@ message MsgMigrateContractResponse {

// MsgUpdateAdmin sets a new admin for a smart contract
message MsgUpdateAdmin {
option (cosmos.msg.v1.signer) = "sender";

// Sender is the that actor that signed the messages
string sender = 1;
// NewAdmin address to be set
Expand All @@ -169,6 +182,8 @@ message MsgUpdateAdminResponse {}

// MsgClearAdmin removes any admin stored for a smart contract
message MsgClearAdmin {
option (cosmos.msg.v1.signer) = "sender";

// Sender is the actor that signed the messages
string sender = 1;
// Contract is the address of the smart contract
Expand All @@ -180,6 +195,8 @@ message MsgClearAdminResponse {}

// MsgUpdateInstantiateConfig updates instantiate config for a smart contract
message MsgUpdateInstantiateConfig {
option (cosmos.msg.v1.signer) = "sender";

// Sender is the that actor that signed the messages
string sender = 1;
// CodeID references the stored WASM code
Expand Down
120 changes: 60 additions & 60 deletions x/wasm/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 66913a1

Please sign in to comment.