Service operations ⚙️
Check logs
sudo journalctl -u 0gchaind -fo catStart service
sudo systemctl start 0gchaindStop service
sudo systemctl stop 0gchaindRestart service
sudo systemctl restart 0gchaindCheck service status
sudo systemctl status 0gchaindReload services
sudo systemctl daemon-reloadEnable Service
sudo systemctl enable 0gchaindDisable Service
sudo systemctl disable 0gchaindNode info
0gchaind status 2>&1 | jqYour node peer
echo $(0gchaind tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.0gchaind/0g-home/0gchaind-home/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')Key management
Add New Wallet
0gchaind keys add $WALLETRestore executing wallet
0gchaind keys add $WALLET --recoverList All Wallets
0gchaind keys listDelete wallet
0gchaind keys delete $WALLETCheck Balance
0gchaind q bank balances $WALLET_ADDRESS Export Key (save to wallet.backup)
0gchaind keys export $WALLETView EVM Prived Key
0gchaind keys unsafe-export-eth-key $WALLETImport Key (restore from wallet.backup)
0gchaind keys import $WALLET wallet.backupTokens
To valoper address
To wallet address
Amount, ua0gi
Withdraw all rewards
0gchaind tx distribution withdraw-all-rewards --from $WALLET --chain-id 0gchain-16601 --gas-adjustment 1.5 --gas auto --gas-prices 0.00252ua0gi Withdraw rewards and commission from your validator
0gchaind tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id 0gchain-16601 --gas-adjustment 1.5 --gas auto --gas-prices 0.00252ua0gi -y Check your balance
0gchaind query bank balances $WALLET_ADDRESSDelegate to Yourself
0gchaind tx staking delegate $(0gchaind keys show $WALLET --bech val -a) 1000000ua0gi --from $WALLET --chain-id 0gchain-16601 --gas-adjustment 1.5 --gas auto --gas-prices 0.00252ua0gi -y Delegate
0gchaind tx staking delegate <TO_VALOPER_ADDRESS> 1000000ua0gi --from $WALLET --chain-id 0gchain-16601 --gas-adjustment 1.5 --gas auto --gas-prices 0.00252ua0gi -y Redelegate Stake to Another Validator
0gchaind tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000ua0gi --from $WALLET --chain-id 0gchain-16601 --gas-adjustment 1.5 --gas auto --gas-prices 0.00252ua0gi -y Unbond
0gchaind tx staking unbond $(0gchaind keys show $WALLET --bech val -a) 1000000ua0gi --from $WALLET --chain-id 0gchain-16601 --gas-adjustment 1.5 --gas auto --gas-prices 0.00252ua0gi -y Transfer Funds
0gchaind tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000ua0gi --gas-adjustment 1.5 --gas auto --gas-prices 0.00252ua0gi -y Validator operations
Moniker
Identity
Details
Amount, ua0gi
Commission rate
Commission max rate
Commission max change rate
Create New Validator
0gchaind tx staking create-validator \
--amount 1000000ua0gi \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(0gchaind tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "I love blockchain ❤️" \
--chain-id 0gchain-16601 \
--gas-adjustment 1.5 --gas auto --gas-prices 0.00252ua0gi \
-y
Edit Existing Validator
0gchaind tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "I love blockchain ❤️" \
--from $WALLET \
--chain-id 0gchain-16601 \
--gas-adjustment 1.5 --gas auto --gas-prices 0.00252ua0gi \
-y
Validator info
0gchaind status 2>&1 | jqValidator Details
0gchaind q staking validator $(0gchaind keys show $WALLET --bech val -a) Jailing info
0gchaind q slashing signing-info $(0gchaind tendermint show-validator) Slashing parameters
0gchaind q slashing params Unjail validator
0gchaind tx slashing unjail --from $WALLET --chain-id 0gchain-16601 --gas-adjustment 1.5 --gas auto --gas-prices 0.00252ua0gi -y Active Validators List
0gchaind q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " " + .description.moniker' | sort -gr | nl Check Validator key
[[ $(0gchaind q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(0gchaind status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"Signing info
0gchaind q slashing signing-info $(0gchaind tendermint show-validator) Governance
Title
Description
Deposit, ua0gi
Create New Text Proposal
0gchaind tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000ua0gi \
--type Text \
--from $WALLET \
--gas-adjustment 1.5 --gas auto --gas-prices 0.00252ua0gi \
-y
Proposals List
0gchaind query gov proposals Proposal ID
Proposal option
View proposal
0gchaind query gov proposal 1 Vote
0gchaind tx gov vote 1 yes --from $WALLET --chain-id 0gchain-16601 --gas-adjustment 1.5 --gas auto --gas-prices 0.00252ua0gi -y