Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Update submit proposal page #427

Merged
merged 2 commits into from
Dec 2, 2022
Merged
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
16 changes: 7 additions & 9 deletions tutorials/governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,16 @@ There are two options to get the sample contract:
Deployment command is down below:

```shell
wasmcli tx gov submit-proposal wasm-store cw1-subkeys.wasm \
--source "https://github.com/CosmWasm/cw-plus" \
—-builder "cosmwasm/workspace-optimizer:0.10.3" \
wasmd tx gov submit-proposal wasm-store cw1-subkeys.wasm \
—-title "Enable cw1-subkeys functionality" \
—-description "DAO and DSOs need this!" \
—-instantiate-everybody "true" \
—-run-as $(wasmcli keys show -a account)
—-run-as $(wasmd keys show -a account)
—-deposit "10000umuon"
--from account
```

If you run `wasmcli tx gov submit-proposal wasm-store -h`, you will notice two more important flags:
If you run `wasmd tx gov submit-proposal wasm-store -h`, you will notice two more important flags:

```shell
--instantiate-everybody string Everybody can instantiate a contract from the code, optional
Expand All @@ -103,7 +101,7 @@ Instantiate-everybody might make sense for a multisig (everyone makes their own)
After the proposal creation, it needs to be approved by governance voting.

```shell
wasmcli tx gov vote [proposal-id] yes --from account
wasmd tx gov vote [proposal-id] yes --from account
```

## Instantiate {#instantiate}
Expand All @@ -112,7 +110,7 @@ After the proposal passes the code will be deployed. Now you can instantiate the

```shell
INIT='{"admins": ["cosmos12at9uplen85jt2vrfc5fs36s9ed4ahgduclk5a","cosmos1v7mjgfyxvlqt7tzj2j9fwee82fh6ra0jvhrxyp","cosmos18rkzfn65485wq68p3ylv4afhgguq904djepfkk","cosmos1xxkueklal9vejv9unqu80w9vptyepfa95pd53u"], "mutable": true}'
wasmcli tx wasm instantiate [code_id] "$INIT" \
wasmd tx wasm instantiate [code_id] "$INIT" \
--label "UP-101 Funding Account"
—-amount 2000000uatom
--from account
Expand All @@ -124,13 +122,13 @@ If you have admin access to the contract you can add or remove admins by running

```
export UPDATE_ADMINS_MSG='{"update_admins": {"admins":["cosmos1u3nufc2kjslj2t3pugxhjv4zc8adw5thuwu0tm", "cosmos1fp9qlazkm8kgq304kalev6e69pyp5kmdd5pcgj"]}}'
wasmcli tx wasm execute $CONTRACT_ADDRESS "$UPDATE_ADMINS_MSG" \
wasmd tx wasm execute $CONTRACT_ADDRESS "$UPDATE_ADMINS_MSG" \
--from account
```

Subkey allowances can execute send token transaction using the command:

```
export SEND_MSG='{"execute":{"msgs":[{"bank":{"send":{"amount":[{"denom":"umuon","amount":"1000"}],"from_address":"cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5","to_address":"cosmos1cs63ehtq6lw86vc87t42cnhcmydtnrffzdjhkz"}}}]}}'
wasmcli tx wasm execute $CONTRACT_ADDRESS "$SEND_MSG" --from account
wasmd tx wasm execute $CONTRACT_ADDRESS "$SEND_MSG" --from account
```