Service operations ⚙️
Check logs
Copy sudo journalctl -u ojod -f
Start service
Copy sudo systemctl start ojod
Stop service
Copy sudo systemctl stop ojod
Restart service
Copy sudo systemctl restart ojod
Check service status
Copy sudo systemctl status ojod
Reload services
Copy sudo systemctl daemon-reload
Enable Service
Copy sudo systemctl enable ojod
Disable Service
Copy sudo systemctl disable ojod
Sync info
Copy ojod status 2>&1 | jq .SyncInfo
Node info
Copy ojod status 2>&1 | jq .NodeInfo
Your node peer
Copy echo $(ojod tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.ojo/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Key management
Add New Wallet
Copy ojod keys add $WALLET
Restore executing wallet
Copy ojod keys add $WALLET --recover
List All Wallets
Delete wallet
Copy ojod keys delete $WALLET
Check Balance
Copy ojod q bank balances $( ojod keys show $WALLET -a )
Export Key (save to wallet.backup)
Copy ojod keys export $WALLET
Import Key (restore from wallet.backup)
Copy ojod keys import $WALLET wallet.backup
Tokens
Withdraw all rewards
Copy ojod tx distribution withdraw-all-rewards --from $WALLET --chain-id ojo-devnet --gas auto --gas-adjustment 1.5
Withdraw rewards and commission from your validator
Copy ojod tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id ojo-devnet --gas auto --gas-adjustment 1.5 -y
Check your balance
Copy ojod query bank balances $WALLET_ADDRESS
Delegate to Yourself
Copy ojod tx staking delegate $(ojod keys show $WALLET --bech val -a) 1000000uojo --from $WALLET --chain-id ojo-devnet --gas auto --gas-adjustment 1.5 -y
Delegate
Copy ojod tx staking delegate <TO_VALOPER_ADDRESS> 1000000uojo --from $WALLET --chain-id ojo-devnet --gas auto --gas-adjustment 1.5 -y
Redelegate Stake to Another Validator
Copy ojod tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000uojo --from $WALLET --chain-id ojo-devnet --gas auto --gas-adjustment 1.5 -y
Unbond
Copy ojod tx staking unbond $(ojod keys show $WALLET --bech val -a) 1000000uojo --from $WALLET --chain-id ojo-devnet --gas auto --gas-adjustment 1.5 -y
Transfer Funds
Copy ojod tx bank send $WALLET_ADDRESS < TO_WALLET_ADDRES S > 1000000uojo --gas auto --gas-adjustment 1.5 -y
Validator operations
Create New Validator
Copy ojod tx staking create-validator \
--amount 1000000uojo \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $( ojod tendermint show-validator ) \
--moniker "$MONIKER" \
--identity "" \
--details "XXXXXXXXXX" \
--chain-id ojo-devnet \
--gas auto --gas-adjustment 1.5 \
-y
Edit Existing Validator
Copy ojod tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "XXXXXXXXXXXXX" \
--from $WALLET \
--chain-id ojo-devnet \
--gas auto --gas-adjustment 1.5 \
-y
Validator info
Copy ojod status 2>&1 | jq .ValidatorInfo
Validator Details
Copy ojod q staking validator $( ojod keys show $WALLET --bech val -a )
Jailing info
Copy ojod q slashing signing-info $( ojod tendermint show-validator )
Unjail validator
Copy ojod tx slashing unjail --from $WALLET --chain-id ojo-devnet --gas auto --gas-adjustment 1.5 -y
Active Validators List
Copy ojod 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
Copy [[ $(ojod q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(ojod status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
Signing info
Copy ojod q slashing signing-info $( ojod tendermint show-validator )
Governance
Create New Text Proposal
Copy ojod tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000uojo \
--type Text \
--from $WALLET \
--gas auto --gas-adjustment 1.5 \
-y
Proposals List
Copy ojod query gov proposals
Proposal
View proposal
Copy ojod query gov proposal 1
Vote
Copy ojod tx gov vote 1 yes --from $WALLET --chain-id ojo-devnet --gas auto --gas-adjustment 1.5 -y
Delete Node
Copy sudo systemctl stop ojod
sudo systemctl disable ojod
sudo rm -rf /etc/systemd/system/ojod.service
sudo rm $(which ojod)
sudo rm -rf $HOME/.ojo
sed -i "/OJO_/d" $HOME/.bash_profile
Last updated 8 months ago