mirror of https://github.com/certusone/wasmd.git
Merge pull request #59 from cosmwasm/customize-tickers-setup
Allow customization of denom in setup.sh
This commit is contained in:
commit
9842678d89
|
@ -1,17 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
PASSWORD=${PASSWORD:-1234567890}
|
||||
# we can override the default token tickers as cli args
|
||||
STAKE=${1:-ustake}
|
||||
FEE=${2:-ucosm}
|
||||
|
||||
wasmd init --chain-id=testing testing
|
||||
# staking/governance token is hardcoded in config, change this
|
||||
sed -i 's/"stake"/"ustake"/' "$HOME"/.wasmd/config/genesis.json
|
||||
sed -i "s/\"stake\"/\"$STAKE\"/" "$HOME"/.wasmd/config/genesis.json
|
||||
(echo $PASSWORD; echo $PASSWORD) | wasmcli keys add validator
|
||||
# hardcode the validator account for this instance
|
||||
echo $PASSWORD | wasmd add-genesis-account validator 1000000000ustake,1000000000ucosm
|
||||
echo $PASSWORD | wasmd add-genesis-account validator "1000000000$STAKE,1000000000$FEE"
|
||||
# (optionally) add a few more genesis accounts
|
||||
for addr in "$@"; do
|
||||
wasmd add-genesis-account $addr 1000000000ustake,1000000000ucosm
|
||||
wasmd add-genesis-account $addr "1000000000$STAKE,1000000000$FEE"
|
||||
done
|
||||
# submit a genesis validator tx
|
||||
(echo $PASSWORD; echo $PASSWORD; echo $PASSWORD) | wasmd gentx --name validator --amount 250000000ustake
|
||||
(echo $PASSWORD; echo $PASSWORD; echo $PASSWORD) | wasmd gentx --name validator --amount "250000000$STAKE"
|
||||
wasmd collect-gentxs
|
Loading…
Reference in New Issue