Useful commands

# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export AIR_CHAIN_ID="varanasi-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile

WALLET MANAGEMENT

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

#Add new wallet
junctiond keys add wallet

#Recover Wallet
junctiond keys add wallet --recover

#List Wallet
junctiond keys list

#Delete Wallet
junctiond keys delete wallet

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

VALIDATOR MANAGEMENT

Please adjust , MONIKER , YOUR_KEYBASE_ID , YOUR_DETAILS , YOUR_WEBSITE_URL

#Create Validator
junctiond tx staking create-validator \
--amount=10000000uamf \
--pubkey=$(junctiond tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$AIR_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices 0.1uamf\ 
-y

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

#Unjail Validator
junctiond tx slashing unjail --from wallet --chain-id $AIR_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.1uamf -y

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

TOKEN MANAGEMENT

#Withdraw Rewards
junctiond tx distribution withdraw-all-rewards --from wallet --chain-id $AIR_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.1uamf -y

#Withdraw Rewards with Comission
junctiond tx distribution withdraw-rewards $(junctiond keys show wallet --bech val -a) --commission --from wallet --chain-id $AIR_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.1uamf -y

#Delegate Token to your own validator
junctiond tx staking delegate $(junctiond keys show wallet --bech val -a) 1000000uamf --from wallet --chain-id $AIR_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.1uamf -y

#Delegate Token to other validator
junctiond tx staking redelegate $(junctiond keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uamf --from wallet --chain-id $AIR_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.1uamf -y

#Unbond Token from your validator
junctiond tx staking unbond $(junctiond keys show wallet --bech val -a) 1000000uamf --from wallet --chain-id $AIR_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.1uamf -y

#Send Token to another wallet
junctiond tx bank send wallet <TO_WALLET_ADDRESS> 1000000uamf --from wallet --chain-id $AIR_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.1uamf -y

GOVERNANCE

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

#List all proposals
junctiond query gov proposals

#Create new text proposal
junctiond tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000uamf \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices 0.1uamf\ 
-y 

SERVICES MANAGEMENT

# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable junctiond

# Disable Service
sudo systemctl disable junctiond

# Start Service
sudo systemctl start junctiond

# Stop Service
sudo systemctl stop junctiond

# Restart Service
sudo systemctl restart junctiond

# Check Service Status
sudo systemctl status junctiond

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

UTILITY

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

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

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

#Get sync status
junctiond status 2>&1 | jq .sync_info.catching_up

#Get latest height
junctiond status 2>&1 | jq .sync_info.latest_block_height

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

DELETE NODE

sudo systemctl stop junctiond && sudo systemctl disable junctiond && sudo rm /etc/systemd/system/junctiond.service && sudo systemctl daemon-reload && rm -rf $HOME/.junctiond && rm -rf $HOME/go/bin/junctiond

Last updated