Useful commands

# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ATOMONE_T_CHAIN_ID="atomone-testnet-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile

WALLET MANAGEMENT

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

#Add new wallet
atomoned keys add wallet

#Recover Wallet
atomoned keys add wallet --recover

#List Wallet
atomoned keys list

#Delete Wallet
atomoned keys delete wallet

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

VALIDATOR MANAGEMENT

Please adjust , MONIKER , YOUR_KEYBASE_ID , YOUR_DETAILS , YOUR_WEBSITE_URL

#Create Validator
atomoned tx staking create-validator \
--amount=1000000uatone \
--pubkey=$(atomoned tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$ATOMONE_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=1uatone \ 
-y

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

#Unjail Validator
atomoned tx slashing unjail --from wallet --chain-id $ATOMONE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uatone -y

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

TOKEN MANAGEMENT

#Withdraw Rewards
atomoned tx distribution withdraw-all-rewards --from wallet --chain-id $ATOMONE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uatone -y

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

#Delegate Token to your own validator
atomoned tx staking delegate $(atomoned keys show wallet --bech val -a) 100000uatone --from wallet --chain-id $ATOMONE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uatone -y

#Delegate Token to other validator
atomoned tx staking redelegate $(atomoned keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 100000uatone --from wallet --chain-id $ATOMONE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uatone -y

#Unbond Token from your validator
atomoned tx staking unbond $(atomoned keys show wallet --bech val -a) 100000uatone --from wallet --chain-id $ATOMONE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uatone -y

#Send Token to another wallet
atomoned tx bank send wallet <TO_WALLET_ADDRESS> 100000uatone --from wallet --chain-id $ATOMONE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uatone -y

GOVERNANCE

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

#List all proposals
atomoned query gov proposals

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

SERVICES MANAGEMENT

# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable atomoned

# Disable Service
sudo systemctl disable atomoned

# Start Service
sudo systemctl start atomoned

# Stop Service
sudo systemctl stop atomoned

# Restart Service
sudo systemctl restart atomoned

# Check Service Status
sudo systemctl status atomoned

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

UTILITY

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

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

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

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

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

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

DELETE NODE

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

Last updated