Useful commands

# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ORAI_CHAIN_ID="Oraichain"" >> $HOME/.bash_profile
source $HOME/.bash_profile

WALLET MANAGEMENT

Add Wallet Specify the value <wallet> with your own wallet name

#Create Wallet
oraid keys add wallet

#Recover Wallet
oraid keys add wallet --recover

#List Wallet
oraid keys list

#Delete Wallet
oraid keys delete wallet

#Check Wallet Balance
oraid q bank balances $(oraid keys show wallet -a)

VALIDATOR MANAGEMENT

Please adjust , MONIKER , YOUR_KEYBASE_ID , YOUR_DETAILS , YOUR_WEBSITE_URL

#Create Validator
oraid tx staking create-validator \
--amount=1000000orai \
--pubkey=$(oraid tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$ORAI_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=10000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1orai \
-y

#Edit Validator
oraid tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$ORAI_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1orai \
-y

#Unjail Validator
oraid tx slashing unjail --from wallet --chain-id $ORAI_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1orai -y

#Check Jailed Reason
oraid query slashing signing-info $(oraid tendermint show-validator)

TOKEN MANAGEMENT

#Withdraw Rewards
oraid tx distribution withdraw-all-rewards --from wallet --chain-id $ORAI_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1orai -y

#Withdraw Rewards with Comission
oraid tx distribution withdraw-rewards $(oraid keys show wallet --bech val -a) --commission --from wallet --chain-id $ORAI_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1orai -y

#Delegate Token to your own validator
oraid tx staking delegate $(oraid keys show wallet --bech val -a) 1000000orai --from wallet --chain-id $ORAI_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1orai -y

#Delegate Token to other validator
oraid tx staking redelegate $(oraid keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uaum --from wallet --chain-id $ORAI_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1orai -y

#Unbond Token from your validator
oraid tx staking unbond $(oraid keys show wallet --bech val -a) 10000000orai --from wallet --chain-id $ORAI_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1orai -y

#Send Token to another wallet
oraid tx bank send wallet <TO_WALLET_ADDRESS> 1000000orai --from wallet --chain-id $ORAI_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1orai -y

GOVERNANCE

#Vote, You can change the value of yes to no,abstain,nowithveto
oraid tx gov vote 1 yes --from wallet --chain-id $ORAI_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1orai -y

#List all proposals
oraid query gov proposals

#Create new text proposal
oraid tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=1000000000orai \
--type="Text" \
--from=wallet \
--gas-prices=1orai\ 
--gas-adjustment=1.5 \
--gas="auto" \
-y 

SERVICES MANAGEMENT

# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable oraid

# Disable Service
sudo systemctl disable oraid

# Start Service
sudo systemctl start oraid

# Stop Service
sudo systemctl stop oraid

# Restart Service
sudo systemctl restart oraid

# Check Service Status
sudo systemctl status oraid

# Check Service Logs
sudo journalctl -u oraid -f --no-hostname -o cat

UTILITY

#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.oraid/config/config.toml

#Get Validator info
oraid status 2>&1 | jq .ValidatorInfo

#Get denom info
oraid q bank denom-metadata -oj | jq

#Get sync status
oraid status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
oraid status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
oraid tendermint unsafe-reset-all --home $HOME/.oraid --keep-addr-book

DELETE NODE

sudo systemctl stop oraid && sudo systemctl disable oraid && sudo rm /etc/systemd/system/oraid.service && sudo systemctl daemon-reload && sudo rm -rf $(which oraid) && rm -rf $HOME/.oraid && rm -rf $HOME/orai

Last updated