From 97c8574d9b4f53599b9cca734447c19811fe5e73 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Tue, 28 Jul 2020 11:22:53 +0200 Subject: [PATCH] Remove wasmgovd scripts and add some to README --- README.md | 10 ++++++++++ docker/run_wasmgovd.sh | 10 ---------- docker/setup_wasmgovd.sh | 24 ------------------------ 3 files changed, 10 insertions(+), 34 deletions(-) delete mode 100755 docker/run_wasmgovd.sh delete mode 100755 docker/setup_wasmgovd.sh diff --git a/README.md b/README.md index b95d5469..4faa5a4b 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,16 @@ Examples: * [`gaiaflex`](./Makefile#L78-L87) is a generic, *permissioned* version using the `cosmos` bech32 prefix * [`coral`](./Makefile#L63-L71) is a permissionless version designed for a specific testnet, with a `coral` bech32 prefix +## Genesis Configuration + +@alpe we should document all the genesis config for x/wasm even more. + +Tip: if you want to lock this down to a permisisoned network, the following script can edit the genesis file +to only allow permissioned use of code upload or instantiating. (Make sure you set `app.ProposalsEnabled=true` +in this binary): + +`sed -i 's/permission": "Everybody"/permission": "Nobody"/' .../config/genesis.json` + ## Contributors Much thanks to all who have contributed to this project, from this app, to the `cosmwasm` framework, to example contracts and documentation. diff --git a/docker/run_wasmgovd.sh b/docker/run_wasmgovd.sh deleted file mode 100755 index 7e5d1217..00000000 --- a/docker/run_wasmgovd.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -if test -n "$1"; then - # need -R not -r to copy hidden files - cp -R "$1/.wasmd" /root - cp -R "$1/.wasmcli" /root -fi - -mkdir -p /root/log -wasmgovd start --rpc.laddr tcp://0.0.0.0:26657 --trace diff --git a/docker/setup_wasmgovd.sh b/docker/setup_wasmgovd.sh deleted file mode 100755 index 40198c40..00000000 --- a/docker/setup_wasmgovd.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -#set -o errexit -o nounset -o pipefail - -PASSWORD=${PASSWORD:-1234567890} -STAKE=${STAKE_TOKEN:-ustake} -FEE=${FEE_TOKEN:-ucosm} - -wasmgovd init --chain-id=testing testing -sed -i 's/permission": "Everybody"/permission": "Nobody"/' "$HOME"/.wasmgovd/config/genesis.json -# staking/governance token is hardcoded in config, change this -sed -i "s/\"stake\"/\"$STAKE\"/" "$HOME"/.wasmgovd/config/genesis.json -if ! wasmcli keys show validator; then - (echo "$PASSWORD"; echo "$PASSWORD") | wasmcli keys add validator -fi -# hardcode the validator account for this instance -echo "$PASSWORD" | wasmgovd add-genesis-account validator "1000000000$STAKE,1000000000$FEE" -# (optionally) add a few more genesis accounts -for addr in "$@"; do - echo $addr - wasmgovd add-genesis-account "$addr" "1000000000$STAKE,1000000000$FEE" -done -# submit a genesis validator tx -(echo "$PASSWORD"; echo "$PASSWORD"; echo "$PASSWORD") | wasmgovd gentx --name validator --amount "250000000$STAKE" -wasmgovd collect-gentxs