Skip to content

Instantly share code, notes, and snippets.

@davepuchyr
Created June 17, 2021 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davepuchyr/47d1186d499ea0ea68c7c8d018d85fd1 to your computer and use it in GitHub Desktop.
Save davepuchyr/47d1186d499ea0ea68c7c8d018d85fd1 to your computer and use it in GitHub Desktop.
Create a validator on the `stargatenet` testnet
#!/bin/bash
export USER_IOV=iov # "iov" is not recommended
# become USER_IOV
su - ${USER_IOV}
set -o allexport ; source /etc/systemd/system/starnamed.env ; set +o allexport # pick-up env vars
export PATH=${PATH}:${DIR_STARNAMED}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${DIR_STARNAMED}
# get some tokens
curl https://faucet.cluster-stargatenet.iov.one/credit?address=$(starnamed keys show ${SIGNER} -a --home ${DIR_WORK})
# create your validator
starnamed tx staking create-validator \
--moniker "${MONIKER}" \
--amount 900000000uvoi \
--commission-max-change-rate 0.01 \
--commission-max-rate 0.2 \
--commission-rate 0.1 \
--min-self-delegation 1 \
--from ${SIGNER} \
--pubkey $(starnamed tendermint show-validator --home ${DIR_WORK}) \
--gas-prices 1.0uvoi \
--node https://rpc.cluster-stargatenet.iov.one:443 \
--chain-id ${CHAIN_ID} \
--home ${DIR_WORK}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment