Useful Commands

Information

# Check the blocks
andromedad status 2>&1 | jq ."SyncInfo"."latest_block_height"
# Check logs
journalctl -u andromedad -f -o cat
# Check status
andromedad status 2>&1 | jq .SyncInfo
# Check balance
andromedad q bank balances $WALLET_ANDROMEDA
# Check pubkey of validator
andromedad tendermint show-validator
# Check validator
andromedad q staking validator $MONIKER_ANDROMEDA
andromedad q staking validators --limit 1000000 -o json | jq '.validators[] | select(.description.moniker="$MONIKER_ANDROMEDA")' | jq
# Check information of TX_HASH
andromedad q tx <TX_HASH>
# Check how many blocks were passed by the validator and from which block the asset
andromedad q slashing signing-info $(andromedad tendermint show-validator)

Транзакции

# Collect rewards from all validators delegated to them (without commission)
andromedad tx distribution withdraw-all-rewards --from <name_wallet> -y
# Collect rewards from a separate validator or rewards + commission from your own validator
andromedad tx distribution withdraw-rewards <valoper_address> --from <name_wallet> --commission -y
# Delegate yourself (this is how 1 coin is sent)
andromedad tx staking delegate $VALOPER_ANDROMEDA 1000000uandr --from wallet --fees=5000uandr -y
# Redelegate to other validator
andromedad tx staking redelegate <src-validator-addr> <dst-validator-addr> 1000000uandr --from wallet -y
# unbond 
andromedad tx staking unbond $VALOPER_ANDROMEDA 1000000uandr --from wallet -y
# Send tokens to other adress
andromedad tx bank send wallet <address> 1000000uandr -y
# Unjail
andromedad tx slashing unjail --from wallet -y

! If the transactions are not sent with the error account sequence mismatch, expected 18, got 17: incorrect account sequence, then add the flag -s 18 to the command (replace the number with the one that is waiting for the sequence)

Work with wallets

# Chech the wallets list
andromedad keys list
# Delete wallet
andromedad keys delete <name_wallet>

Delete Node

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

Governance

# List proposals
andromedad q gov proposals
# Check voting result
andromedad q gov proposals --voter $VALOPER_ANDROMEDA
# Vote 
andromedad tx gov vote 1 yes --from $WALLET_ANDROMEDA
# Make Deposit for proposal
humansd tx gov deposit 1 1000000uheart --from $WALLET_ANDROMEDA

Peers and RPC

FOLDER=.andromedad

# Check your peer
PORTR=$(grep -A 3 "\[p2p\]" ~/$FOLDER/config/config.toml | egrep -o ":[0-9]+") && \
echo $(andromedad tendermint show-node-id)@$(curl ifconfig.me)$PORTR

# Check port of RPC
echo -e "\033[0;32m$(grep -A 3 "\[rpc\]" ~/$FOLDER/config/config.toml | egrep -o ":[0-9]+")\033[0m"

# Check peers quantity
PORT=
curl -s http://localhost:$PORT_ANDROMEDA/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr | split(":")[2])"' | wc -l

Last updated

Was this helpful?