Useful commands

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

WALLET MANAGEMENT

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

#Add new key
galacticad keys add wallet

#Recover Wallet
galacticad keys add wallet --recover

#List Wallet
galacticad keys list

#Delete Wallet
galacticad keys delete wallet

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

VALIDATOR MANAGEMENT

Please adjust , MONIKER , YOUR_KEYBASE_ID , YOUR_DETAILS , YOUR_WEBSITE_URL

#Create Validator
galacticad tx staking create-validator \
--amount=10000000agnet \
--pubkey=$(galacticad tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$GALACTICA_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=10agnet\ 
-y

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

#Unjail Validator
galacticad tx slashing unjail --from wallet --chain-id $GALACTICA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10agnet -y

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

TOKEN MANAGEMENT

#Withdraw Rewards
galacticad tx distribution withdraw-all-rewards --from wallet --chain-id $GALACTICA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10agnet -y

#Withdraw Rewards with Comission
galacticad tx distribution withdraw-rewards $(galacticad keys show wallet --bech val -a) --commission --from wallet --chain-id $GALACTICA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10agnet -y

#Delegate Token to your own validator
galacticad tx staking delegate $(galacticad keys show wallet --bech val -a) 1000000agnet --from wallet --chain-id $GALACTICA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10agnet -y

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

#Unbond Token from your validator
galacticad tx staking unbond $(galacticad keys show wallet --bech val -a) 1000000agnet --from wallet --chain-id $GALACTICA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10agnet -y

#Send Token to another wallet
galacticad tx bank send wallet <TO_WALLET_ADDRESS> 1000000agnet --from wallet --chain-id $GALACTICA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10agnet -y

GOVERNANCE

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

#List all proposals
galacticad query gov proposals

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

SERVICES MANAGEMENT

# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable galacticad

# Disable Service
sudo systemctl disable galacticad

# Start Service
sudo systemctl start galacticad

# Stop Service
sudo systemctl stop galacticad

# Restart Service
sudo systemctl restart galacticad

# Check Service Status
sudo systemctl status galacticad

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

UTILITY

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

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

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

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

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

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

DELETE NODE

sudo systemctl stop galacticad && sudo systemctl disable galacticad && sudo rm /etc/systemd/system/galacticad.service && sudo systemctl daemon-reload && sudo rm -rf $(which galacticad) && rm -rf $HOME/.galactica && rm -rf $HOME/go/bin/galactica

Last updated