Useful commands

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

WALLET MANAGEMENT

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

#Create Wallet
artelad keys add wallet

#Recover Wallet
artelad keys add wallet --recover

#List Wallet
artelad keys list

#Delete Wallet
artelad keys delete wallet

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

VALIDATOR MANAGEMENT

Please adjust , MONIKER , YOUR_KEYBASE_ID , YOUR_DETAILS , YOUR_WEBSITE_URL

#Create Validator (Staking)
artelad tx staking create-validator \
--amount=10000000uart \
--pubkey=$(artelad 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=10uart \
-y

#Edit Validator
artelad 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=10uart \
-y

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

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

TOKEN MANAGEMENT

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

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

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

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

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

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

GOVERNANCE

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

#List all proposals
artelad query gov proposals

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

SERVICES MANAGEMENT

# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable artelad

# Disable Service
sudo systemctl disable artelad

# Start Service
sudo systemctl start artelad

# Stop Service
sudo systemctl stop artelad

# Restart Service
sudo systemctl restart artelad

# Check Service Status
sudo systemctl status artelad

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

UTILITY

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

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

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

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

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

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

DELETE NODE

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

Last updated