Useful commands

# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export COMPOSABLE_CHAIN_ID="banksy-testnet-5"" >> $HOME/.bash_profile
source $HOME/.bash_profile

WALLET MANAGEMENT

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

#Create Wallet
centaurid keys add wallet

#Recover Wallet
centaurid keys add wallet --recover

#List Wallet
centaurid keys list

#Delete Wallet
centaurid keys delete wallet

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

VALIDATOR MANAGEMENT

Please adjust , MONIKER , YOUR_KEYBASE_ID , YOUR_DETAILS , YOUR_WEBSITE_URL

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

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

#Unjail Validator
centaurid tx slashing unjail --from wallet --chain-id $ARTELA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10ppica -y

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

TOKEN MANAGEMENT

#Withdraw Rewards
centaurid tx distribution withdraw-all-rewards --from wallet --chain-id $ARTELA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10ppica -y

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

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

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

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

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

GOVERNANCE

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

#List all proposals
centaurid query gov proposals

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

SERVICES MANAGEMENT

# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable centaurid

# Disable Service
sudo systemctl disable centaurid

# Start Service
sudo systemctl start centaurid

# Stop Service
sudo systemctl stop centaurid

# Restart Service
sudo systemctl restart centaurid

# Check Service Status
sudo systemctl status centaurid

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

UTILITY

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

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

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

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

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

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

DELETE NODE

sudo systemctl stop centaurid && sudo systemctl disable centaurid && sudo rm /etc/systemd/system/centaurid.service && sudo systemctl daemon-reload && sudo rm -rf $(which centaurid) && rm -rf $HOME/.banksy && rm -rf $HOME/composable-testnet

Last updated