Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use gov v1 instead of v1beta1 for new proposals #1269

Merged
merged 13 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ import (
"github.com/spf13/cast"

"github.com/CosmWasm/wasmd/x/wasm"
wasmclient "github.com/CosmWasm/wasmd/x/wasm/client"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
govclient "github.com/cosmos/cosmos-sdk/x/gov/client"
)

const appName = "WasmApp"
Expand Down Expand Up @@ -194,14 +194,13 @@ var (
mint.AppModuleBasic{},
distr.AppModuleBasic{},
gov.NewAppModuleBasic(
append(
wasmclient.ProposalHandlers,
[]govclient.ProposalHandler{
paramsclient.ProposalHandler,
upgradeclient.LegacyProposalHandler,
upgradeclient.LegacyCancelProposalHandler,
ibcclientclient.UpdateClientProposalHandler,
ibcclientclient.UpgradeProposalHandler,
),
},
),
params.AppModuleBasic{},
crisis.AppModuleBasic{},
Expand Down
238 changes: 216 additions & 22 deletions docs/proto/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,16 @@
- [MsgInstantiateContractResponse](#cosmwasm.wasm.v1.MsgInstantiateContractResponse)
- [MsgMigrateContract](#cosmwasm.wasm.v1.MsgMigrateContract)
- [MsgMigrateContractResponse](#cosmwasm.wasm.v1.MsgMigrateContractResponse)
- [MsgPinCodes](#cosmwasm.wasm.v1.MsgPinCodes)
- [MsgPinCodesResponse](#cosmwasm.wasm.v1.MsgPinCodesResponse)
- [MsgStoreAndInstantiateContract](#cosmwasm.wasm.v1.MsgStoreAndInstantiateContract)
- [MsgStoreAndInstantiateContractResponse](#cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse)
- [MsgStoreCode](#cosmwasm.wasm.v1.MsgStoreCode)
- [MsgStoreCodeResponse](#cosmwasm.wasm.v1.MsgStoreCodeResponse)
- [MsgSudoContract](#cosmwasm.wasm.v1.MsgSudoContract)
- [MsgSudoContractResponse](#cosmwasm.wasm.v1.MsgSudoContractResponse)
- [MsgUnpinCodes](#cosmwasm.wasm.v1.MsgUnpinCodes)
- [MsgUnpinCodesResponse](#cosmwasm.wasm.v1.MsgUnpinCodesResponse)
- [MsgUpdateAdmin](#cosmwasm.wasm.v1.MsgUpdateAdmin)
- [MsgUpdateAdminResponse](#cosmwasm.wasm.v1.MsgUpdateAdminResponse)
- [MsgUpdateInstantiateConfig](#cosmwasm.wasm.v1.MsgUpdateInstantiateConfig)
Expand Down Expand Up @@ -628,8 +636,10 @@ applied.
<a name="cosmwasm.wasm.v1.ClearAdminProposal"></a>

### ClearAdminProposal
ClearAdminProposal gov proposal content type to clear the admin of a
contract.
Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
an explicit ClearAdminProposal. To clear the admin of a contract,
a simple MsgClearAdmin can be invoked from the x/gov module via
a v1 governance proposal.


| Field | Type | Label | Description |
Expand All @@ -646,8 +656,10 @@ contract.
<a name="cosmwasm.wasm.v1.ExecuteContractProposal"></a>

### ExecuteContractProposal
ExecuteContractProposal gov proposal content type to call execute on a
contract.
Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
an explicit ExecuteContractProposal. To call execute on a contract,
a simple MsgExecuteContract can be invoked from the x/gov module via
a v1 governance proposal.


| Field | Type | Label | Description |
Expand All @@ -667,8 +679,10 @@ contract.
<a name="cosmwasm.wasm.v1.InstantiateContract2Proposal"></a>

### InstantiateContract2Proposal
InstantiateContract2Proposal gov proposal content type to instantiate
contract 2
Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
an explicit InstantiateContract2Proposal. To instantiate contract 2,
a simple MsgInstantiateContract2 can be invoked from the x/gov module via
a v1 governance proposal.


| Field | Type | Label | Description |
Expand All @@ -692,8 +706,10 @@ contract 2
<a name="cosmwasm.wasm.v1.InstantiateContractProposal"></a>

### InstantiateContractProposal
InstantiateContractProposal gov proposal content type to instantiate a
contract.
Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
an explicit InstantiateContractProposal. To instantiate a contract,
a simple MsgInstantiateContract can be invoked from the x/gov module via
a v1 governance proposal.


| Field | Type | Label | Description |
Expand All @@ -715,7 +731,10 @@ contract.
<a name="cosmwasm.wasm.v1.MigrateContractProposal"></a>

### MigrateContractProposal
MigrateContractProposal gov proposal content type to migrate a contract.
Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
an explicit MigrateContractProposal. To migrate a contract,
a simple MsgMigrateContract can be invoked from the x/gov module via
a v1 governance proposal.


| Field | Type | Label | Description |
Expand All @@ -736,8 +755,10 @@ Note: skipping 3 as this was previously used for unneeded run_as |
<a name="cosmwasm.wasm.v1.PinCodesProposal"></a>

### PinCodesProposal
PinCodesProposal gov proposal content type to pin a set of code ids in the
wasmvm cache.
Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
an explicit PinCodesProposal. To pin a set of code ids in the wasmvm
cache, a simple MsgPinCodes can be invoked from the x/gov module via
a v1 governance proposal.


| Field | Type | Label | Description |
Expand All @@ -754,8 +775,10 @@ wasmvm cache.
<a name="cosmwasm.wasm.v1.StoreAndInstantiateContractProposal"></a>

### StoreAndInstantiateContractProposal
StoreAndInstantiateContractProposal gov proposal content type to store
and instantiate the contract.
Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
an explicit StoreAndInstantiateContractProposal. To store and instantiate
the contract, a simple MsgStoreAndInstantiateContract can be invoked from
the x/gov module via a v1 governance proposal.


| Field | Type | Label | Description |
Expand All @@ -782,7 +805,10 @@ and instantiate the contract.
<a name="cosmwasm.wasm.v1.StoreCodeProposal"></a>

### StoreCodeProposal
StoreCodeProposal gov proposal content type to submit WASM code to the system
Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
an explicit StoreCodeProposal. To submit WASM code to the system,
a simple MsgStoreCode can be invoked from the x/gov module via
a v1 governance proposal.


| Field | Type | Label | Description |
Expand All @@ -805,7 +831,10 @@ StoreCodeProposal gov proposal content type to submit WASM code to the system
<a name="cosmwasm.wasm.v1.SudoContractProposal"></a>

### SudoContractProposal
SudoContractProposal gov proposal content type to call sudo on a contract.
Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
an explicit SudoContractProposal. To call sudo on a contract,
a simple MsgSudoContract can be invoked from the x/gov module via
a v1 governance proposal.


| Field | Type | Label | Description |
Expand All @@ -823,8 +852,10 @@ SudoContractProposal gov proposal content type to call sudo on a contract.
<a name="cosmwasm.wasm.v1.UnpinCodesProposal"></a>

### UnpinCodesProposal
UnpinCodesProposal gov proposal content type to unpin a set of code ids in
the wasmvm cache.
Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
an explicit UnpinCodesProposal. To unpin a set of code ids in the wasmvm
cache, a simple MsgUnpinCodes can be invoked from the x/gov module via
a v1 governance proposal.


| Field | Type | Label | Description |
Expand All @@ -841,7 +872,10 @@ the wasmvm cache.
<a name="cosmwasm.wasm.v1.UpdateAdminProposal"></a>

### UpdateAdminProposal
UpdateAdminProposal gov proposal content type to set an admin for a contract.
Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
an explicit UpdateAdminProposal. To set an admin for a contract,
a simple MsgUpdateAdmin can be invoked from the x/gov module via
a v1 governance proposal.


| Field | Type | Label | Description |
Expand All @@ -859,8 +893,10 @@ UpdateAdminProposal gov proposal content type to set an admin for a contract.
<a name="cosmwasm.wasm.v1.UpdateInstantiateConfigProposal"></a>

### UpdateInstantiateConfigProposal
UpdateInstantiateConfigProposal gov proposal content type to update
instantiate config to a set of code ids.
Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
an explicit UpdateInstantiateConfigProposal. To update instantiate config
to a set of code ids, a simple MsgUpdateInstantiateConfig can be invoked from
the x/gov module via a v1 governance proposal.


| Field | Type | Label | Description |
Expand Down Expand Up @@ -1467,6 +1503,84 @@ MsgMigrateContractResponse returns contract migration result data.



<a name="cosmwasm.wasm.v1.MsgPinCodes"></a>

### MsgPinCodes
MsgPinCodes is the MsgPinCodes request type.

Since: 0.40


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `authority` | [string](#string) | | Authority is the address of the governance account. |
| `code_ids` | [uint64](#uint64) | repeated | CodeIDs references the new WASM codes |






<a name="cosmwasm.wasm.v1.MsgPinCodesResponse"></a>

### MsgPinCodesResponse
MsgPinCodesResponse defines the response structure for executing a
MsgPinCodes message.

Since: 0.40






<a name="cosmwasm.wasm.v1.MsgStoreAndInstantiateContract"></a>

### MsgStoreAndInstantiateContract
MsgStoreAndInstantiateContract is the MsgStoreAndInstantiateContract
request type.

Since: 0.40


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `authority` | [string](#string) | | Authority is the address of the governance account. |
| `wasm_byte_code` | [bytes](#bytes) | | WASMByteCode can be raw or gzip compressed |
| `instantiate_permission` | [AccessConfig](#cosmwasm.wasm.v1.AccessConfig) | | InstantiatePermission to apply on contract creation, optional |
| `unpin_code` | [bool](#bool) | | UnpinCode code on upload, optional. As default the uploaded contract is pinned to cache. |
| `admin` | [string](#string) | | Admin is an optional address that can execute migrations |
| `label` | [string](#string) | | Label is optional metadata to be stored with a constract instance. |
| `msg` | [bytes](#bytes) | | Msg json encoded message to be passed to the contract on instantiation |
| `funds` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | Funds coins that are transferred from the authority account to the contract on instantiation |
| `source` | [string](#string) | | Source is the URL where the code is hosted |
| `builder` | [string](#string) | | Builder is the docker image used to build the code deterministically, used for smart contract verification |
| `code_hash` | [bytes](#bytes) | | CodeHash is the SHA256 sum of the code outputted by builder, used for smart contract verification |






<a name="cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse"></a>

### MsgStoreAndInstantiateContractResponse
MsgStoreAndInstantiateContractResponse defines the response structure
for executing a MsgStoreAndInstantiateContract message.

Since: 0.40


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `address` | [string](#string) | | Address is the bech32 address of the new contract instance. |
| `data` | [bytes](#bytes) | | Data contains bytes to returned from the contract |






<a name="cosmwasm.wasm.v1.MsgStoreCode"></a>

### MsgStoreCode
Expand Down Expand Up @@ -1500,6 +1614,74 @@ MsgStoreCodeResponse returns store result data.



<a name="cosmwasm.wasm.v1.MsgSudoContract"></a>

### MsgSudoContract
MsgSudoContract is the MsgSudoContract request type.

Since: 0.40


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `authority` | [string](#string) | | Authority is the address of the governance account. |
| `contract` | [string](#string) | | Contract is the address of the smart contract |
| `msg` | [bytes](#bytes) | | Msg json encoded message to be passed to the contract as sudo |






<a name="cosmwasm.wasm.v1.MsgSudoContractResponse"></a>

### MsgSudoContractResponse
MsgSudoContractResponse defines the response structure for executing a
MsgSudoContract message.

Since: 0.40


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `data` | [bytes](#bytes) | | Data contains bytes to returned from the contract |






<a name="cosmwasm.wasm.v1.MsgUnpinCodes"></a>

### MsgUnpinCodes
MsgUnpinCodes is the MsgUnpinCodes request type.

Since: 0.40


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `authority` | [string](#string) | | Authority is the address of the governance account. |
| `code_ids` | [uint64](#uint64) | repeated | CodeIDs references the WASM codes |






<a name="cosmwasm.wasm.v1.MsgUnpinCodesResponse"></a>

### MsgUnpinCodesResponse
MsgUnpinCodesResponse defines the response structure for executing a
MsgUnpinCodes message.

Since: 0.40






<a name="cosmwasm.wasm.v1.MsgUpdateAdmin"></a>

### MsgUpdateAdmin
Expand Down Expand Up @@ -1557,14 +1739,14 @@ MsgUpdateInstantiateConfigResponse returns empty data
<a name="cosmwasm.wasm.v1.MsgUpdateParams"></a>

### MsgUpdateParams
MsgUpdateParams is the Msg/UpdateParams request type.
MsgUpdateParams is the MsgUpdateParams request type.

Since: 0.40


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `authority` | [string](#string) | | authority is the address of the governance account. |
| `authority` | [string](#string) | | Authority is the address of the governance account. |
| `params` | [Params](#cosmwasm.wasm.v1.Params) | | params defines the x/wasm parameters to update.

NOTE: All parameters must be supplied. |
Expand Down Expand Up @@ -1610,6 +1792,18 @@ Msg defines the wasm Msg service.
| `UpdateInstantiateConfig` | [MsgUpdateInstantiateConfig](#cosmwasm.wasm.v1.MsgUpdateInstantiateConfig) | [MsgUpdateInstantiateConfigResponse](#cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse) | UpdateInstantiateConfig updates instantiate config for a smart contract | |
| `UpdateParams` | [MsgUpdateParams](#cosmwasm.wasm.v1.MsgUpdateParams) | [MsgUpdateParamsResponse](#cosmwasm.wasm.v1.MsgUpdateParamsResponse) | UpdateParams defines a governance operation for updating the x/wasm module parameters. The authority is defined in the keeper.

Since: 0.40 | |
| `SudoContract` | [MsgSudoContract](#cosmwasm.wasm.v1.MsgSudoContract) | [MsgSudoContractResponse](#cosmwasm.wasm.v1.MsgSudoContractResponse) | SudoContract defines a governance operation for calling sudo on a contract. The authority is defined in the keeper.

Since: 0.40 | |
| `PinCodes` | [MsgPinCodes](#cosmwasm.wasm.v1.MsgPinCodes) | [MsgPinCodesResponse](#cosmwasm.wasm.v1.MsgPinCodesResponse) | PinCodes defines a governance operation for pinning a set of code ids in the wasmvm cache. The authority is defined in the keeper.

Since: 0.40 | |
| `UnpinCodes` | [MsgUnpinCodes](#cosmwasm.wasm.v1.MsgUnpinCodes) | [MsgUnpinCodesResponse](#cosmwasm.wasm.v1.MsgUnpinCodesResponse) | UnpinCodes defines a governance operation for unpinning a set of code ids in the wasmvm cache. The authority is defined in the keeper.

Since: 0.40 | |
| `StoreAndInstantiateContract` | [MsgStoreAndInstantiateContract](#cosmwasm.wasm.v1.MsgStoreAndInstantiateContract) | [MsgStoreAndInstantiateContractResponse](#cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse) | StoreAndInstantiateContract defines a governance operation for storing and instantiating the contract. The authority is defined in the keeper.

Since: 0.40 | |

<!-- end services -->
Expand Down
Loading