0gchaind q bank balances $(0gchaind keys show wallet -a)
0gchaind q bank balances "Any other or your wallet"
โ๏ธ Validator Commands
Create validator
0gchaind tx staking create-validator \
--amount 1000000ua0gi \
--chain-id=zgtendermint_16600-2 \
--pubkey $(0gchaind tendermint show-validator) \
--moniker "$NODE_MONIKER" \ #Validator name, displayed in explorers.
--identity "" \ #Use your KeyBase ID. If you don't have one, leave it empty.
--website "" \ #Your website
--details "" \ #Any details about your validator.
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--from YOUR_WALLET \ #Wallet name, as specified during creation, or typically 'wallet'.
--gas-prices=0.25ua0gi \
--gas-adjustment=1.5 \
--gas=auto \
-y
You can leave the text after # unchanged - it's a commented hint that won't affect validator creation.
โฝ Replace the following values with your own: WALLET - usually it's 'wallet', or your wallet's name.
MONIKER - any convenient name for your validator, displayed in the explorer.
IDENTITY - validator's avatar, displayed in the explorer. Create a KeyBase ID following the instructions or leave it empty, and it will default to a standard one.
DETAILS - details about your validator, also displayed in the explorer.
Replace all necessary values indicated above with the $ sign to successfully create your validator.
โฝ Example:
0gchaind tx staking create-validator \
--amount=1000000ua0gi \
--chain-id=zgtendermint_16600-2 \
--pubkey=$(0gchaind tendermint show-validator) \
--moniker="Oliver" \ #Validator name, displayed in explorers.
--identity "" \ #Use your KeyBase ID. If you don't have one, leave it empty.
--details "Reliable validator for your network." \ #Any details about your validator.
--chain-id=zgtendermint_16600-2 \
--commission-rate=0.1 \
--commission-max-rate=0.2 \
--commission-max-change-rate=0.05 \
--min-self-delegation="1" \
--gas-prices=0.25ua0gi \
--gas-adjustment=1.5 \
--gas=auto \
--from=wallet \ #Wallet name, as specified during creation, or typically 'wallet'.
-y
0gchaind tx gov submit-proposal \
--title="Title" \ #Change Title
--description="Description" \
--deposit=1000000ua0gi \
--type="Text" \ #Change text proposal
--from=wallet \ #Change name wallet
--gas-adjustment=1.5 \
--gas auto \
-y
โ๏ธ Utility
Set Custom Port
# Change CUSTOM_PORT to any other value, or leave it as is.
CUSTOM_PORT=27
sed -i.bak -e "s%:26658%:${CUSTOM_PORT}658%; s%:26657%:${CUSTOM_PORT}657%; s%:6060%:${CUSTOM_PORT}060%; s%:26656%:${CUSTOM_PORT}656%; s%:26660%:${CUSTOM_PORT}660%" $HOME/.0gchain/config/config.toml && sed -i.bak -e "s%:9090%:${CUSTOM_PORT}090%; s%:9091%:${CUSTOM_PORT}091%; s%:1317%:${CUSTOM_PORT}317%; s%:8545%:${CUSTOM_PORT}545%; s%:8546%:${CUSTOM_PORT}546%; s%:6065%:${CUSTOM_PORT}065%" $HOME/.0gchain/config/app.toml && sed -i.bak -e "s%:26657%:${CUSTOM_PORT}657%" $HOME/.0gchain/config/client.toml
sudo systemctl restart 0gchaind
journalctl -u 0gchaind -f -o cat
Set Indexer
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.0gchain/config/config.toml
sed -i 's|^indexer *=.*|indexer = "kv"|' $HOME/.0gchain/config/config.toml
echo $(0gchaind tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.0gchain/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')