Useful Commands/
testnet/
lava

Rpc status: Active

Service operations

#check logs
sudo journalctl -u lavad -f

#start service
sudo systemctl start lavad

#stop service
sudo systemctl stop lavad

#restart service
sudo systemctl restart lavad

#service status
sudo systemctl status lavad

#enable service
sudo systemctl enable lavad

#disable service
sudo systemctl disable lavad

#reload all service files
sudo systemctl daemon-reload

#get node info
lavad status 2>&1 | jq -r

#get node id
lavad tendermint show-node-id

Key management

#add new wallet
lavad keys add <wallet-name>

#restore existing wallet
lavad keys add <wallet-name> --recover

#delete wallet
lavad keys delete <wallet-name>

#list all wallets
lavad keys list

#check balance
lavad q bank balances <wallet-address>

Tokens operations

#withdraw all rewards
lavad tx distribution withdraw-all-rewards --from <wallet-name> --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025ulava --node "https://rpc.lava.testnet.dteam.tech:443" -y

#withdraw rewards from specific validator
lavad tx distribution withdraw-rewards <validator-valoper-address> --from <wallet-name> --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025ulava --node "https://rpc.lava.testnet.dteam.tech:443" -y

#delegate
lavad tx staking delegate <validator-valoper-address> ${10**network.other.denom_exponent}ulava --from <wallet-name> --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025ulava --node "https://rpc.lava.testnet.dteam.tech:443" -y

#redelegate
lavad tx staking redelegate <from-validator-valoper-address> <to-validator-valoper-address> ${10**network.other.denom_exponent}ulava --from <wallet-name> --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025ulava --node "https://rpc.lava.testnet.dteam.tech:443" -y

#unbond
lavad tx staking unbond <validator-valoper-address> ${10**network.other.denom_exponent}ulava --from <wallet-name> --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025ulava --node "https://rpc.lava.testnet.dteam.tech:443" -y

#transfer
lavad tx bank send <wallet-name> <wallet-address> ${10**network.other.denom_exponent}ulava --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025ulava --node "https://rpc.lava.testnet.dteam.tech:443" -y

Governance operations

#vote "yes"
lavad tx gov vote <proposal-id> yes --from <wallet-name> --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025ulava --node "https://rpc.lava.testnet.dteam.tech:443" -y

#vote "no"
lavad tx gov vote <proposal-id> no --from <wallet-name> --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025ulava --node "https://rpc.lava.testnet.dteam.tech:443" -y

#vote "no with veto"
lavad tx gov vote <proposal-id> no_with_veto --from <wallet-name> --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025ulava --node "https://rpc.lava.testnet.dteam.tech:443" -y

#vote "abstain"
lavad tx gov vote <proposal-id> abstain --from <wallet-name> --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025ulava --node "https://rpc.lava.testnet.dteam.tech:443" -y

#view all proposals
lavad query gov proposals

#view proposal by ID
lavad query gov proposal <proposal-id>

Validator operations

#create validator
lavad tx staking create-validator \
--amount 1000000ulava \
--moniker "" \
--identity "" \
--details "" \
--website "" \
--security-contact "" \
--pubkey $(lavad tendermint show-validator) \
--commission-rate 0.05 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--chain-id lava-testnet-2 \
--from <wallet-name> \
--gas auto \
--gas-adjustment 1.5 \
--gas-prices 0.025ulava \
--node "https://rpc.lava.testnet.dteam.tech:443" \
-y

#edit validator
lavad tx staking edit-validator \
--new-moniker "" \
--identity "" \
--details "" \
--website "" \
--security-contact "" \
--commission-rate 0.05 \
--chain-id lava-testnet-2 \
--from <wallet-name> \
--gas auto \
--gas-adjustment 1.5 \
--gas-prices 0.025ulava \
--node "https://rpc.lava.testnet.dteam.tech:443" \
-y

#unjail validator
lavad tx slashing unjail --from <wallet-name> --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025ulava --node "https://rpc.lava.testnet.dteam.tech:443" -y