|
| 1 | +syntax = "proto3"; |
| 2 | +package cosmwasm.wasm.v1; |
| 3 | + |
| 4 | +import "gogoproto/gogo.proto"; |
| 5 | +import "cosmos/base/v1beta1/coin.proto"; |
| 6 | +import "cosmwasm/wasm/v1/types.proto"; |
| 7 | + |
| 8 | +option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; |
| 9 | +option (gogoproto.goproto_stringer_all) = false; |
| 10 | +option (gogoproto.goproto_getters_all) = false; |
| 11 | +option (gogoproto.equal_all) = true; |
| 12 | + |
| 13 | +// StoreCodeProposal gov proposal content type to submit WASM code to the system |
| 14 | +message StoreCodeProposal { |
| 15 | + // Title is a short summary |
| 16 | + string title = 1; |
| 17 | + // Description is a human readable text |
| 18 | + string description = 2; |
| 19 | + // RunAs is the address that is passed to the contract's environment as sender |
| 20 | + string run_as = 3; |
| 21 | + // WASMByteCode can be raw or gzip compressed |
| 22 | + bytes wasm_byte_code = 4 [ (gogoproto.customname) = "WASMByteCode" ]; |
| 23 | + // Used in v1beta1 |
| 24 | + reserved 5, 6; |
| 25 | + // InstantiatePermission to apply on contract creation, optional |
| 26 | + AccessConfig instantiate_permission = 7; |
| 27 | +} |
| 28 | + |
| 29 | +// InstantiateContractProposal gov proposal content type to instantiate a |
| 30 | +// contract. |
| 31 | +message InstantiateContractProposal { |
| 32 | + // Title is a short summary |
| 33 | + string title = 1; |
| 34 | + // Description is a human readable text |
| 35 | + string description = 2; |
| 36 | + // RunAs is the address that is passed to the contract's environment as sender |
| 37 | + string run_as = 3; |
| 38 | + // Admin is an optional address that can execute migrations |
| 39 | + string admin = 4; |
| 40 | + // CodeID is the reference to the stored WASM code |
| 41 | + uint64 code_id = 5 [ (gogoproto.customname) = "CodeID" ]; |
| 42 | + // Label is optional metadata to be stored with a constract instance. |
| 43 | + string label = 6; |
| 44 | + // Msg json encoded message to be passed to the contract on instantiation |
| 45 | + bytes msg = 7; |
| 46 | + // Funds coins that are transferred to the contract on instantiation |
| 47 | + repeated cosmos.base.v1beta1.Coin funds = 8 [ |
| 48 | + (gogoproto.nullable) = false, |
| 49 | + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" |
| 50 | + ]; |
| 51 | +} |
| 52 | + |
| 53 | +// MigrateContractProposal gov proposal content type to migrate a contract. |
| 54 | +message MigrateContractProposal { |
| 55 | + // Title is a short summary |
| 56 | + string title = 1; |
| 57 | + // Description is a human readable text |
| 58 | + string description = 2; |
| 59 | + // RunAs is the address that is passed to the contract's environment as sender |
| 60 | + string run_as = 3; |
| 61 | + // Contract is the address of the smart contract |
| 62 | + string contract = 4; |
| 63 | + // CodeID references the new WASM code |
| 64 | + uint64 code_id = 5 [ (gogoproto.customname) = "CodeID" ]; |
| 65 | + // Msg json encoded message to be passed to the contract on migration |
| 66 | + bytes msg = 6; |
| 67 | +} |
| 68 | + |
| 69 | +// UpdateAdminProposal gov proposal content type to set an admin for a contract. |
| 70 | +message UpdateAdminProposal { |
| 71 | + // Title is a short summary |
| 72 | + string title = 1; |
| 73 | + // Description is a human readable text |
| 74 | + string description = 2; |
| 75 | + // NewAdmin address to be set |
| 76 | + string new_admin = 3 [ (gogoproto.moretags) = "yaml:\"new_admin\"" ]; |
| 77 | + // Contract is the address of the smart contract |
| 78 | + string contract = 4; |
| 79 | +} |
| 80 | + |
| 81 | +// ClearAdminProposal gov proposal content type to clear the admin of a |
| 82 | +// contract. |
| 83 | +message ClearAdminProposal { |
| 84 | + // Title is a short summary |
| 85 | + string title = 1; |
| 86 | + // Description is a human readable text |
| 87 | + string description = 2; |
| 88 | + // Contract is the address of the smart contract |
| 89 | + string contract = 3; |
| 90 | +} |
| 91 | + |
| 92 | +// PinCodesProposal gov proposal content type to pin a set of code ids in the |
| 93 | +// wasmvm cache. |
| 94 | +message PinCodesProposal { |
| 95 | + // Title is a short summary |
| 96 | + string title = 1 [ (gogoproto.moretags) = "yaml:\"title\"" ]; |
| 97 | + // Description is a human readable text |
| 98 | + string description = 2 [ (gogoproto.moretags) = "yaml:\"description\"" ]; |
| 99 | + // CodeIDs references the new WASM codes |
| 100 | + repeated uint64 code_ids = 3 [ |
| 101 | + (gogoproto.customname) = "CodeIDs", |
| 102 | + (gogoproto.moretags) = "yaml:\"code_ids\"" |
| 103 | + ]; |
| 104 | +} |
| 105 | + |
| 106 | +// UnpinCodesProposal gov proposal content type to unpin a set of code ids in |
| 107 | +// the wasmvm cache. |
| 108 | +message UnpinCodesProposal { |
| 109 | + // Title is a short summary |
| 110 | + string title = 1 [ (gogoproto.moretags) = "yaml:\"title\"" ]; |
| 111 | + // Description is a human readable text |
| 112 | + string description = 2 [ (gogoproto.moretags) = "yaml:\"description\"" ]; |
| 113 | + // CodeIDs references the WASM codes |
| 114 | + repeated uint64 code_ids = 3 [ |
| 115 | + (gogoproto.customname) = "CodeIDs", |
| 116 | + (gogoproto.moretags) = "yaml:\"code_ids\"" |
| 117 | + ]; |
| 118 | +} |
0 commit comments