# reset and download snapshot
mantrachaind tendermint unsafe-reset-all --home $HOME/.mantrachain
if curl -s --head curl https://server-4.itrocket.net/testnet/mantra/mantra_2024-11-24_1164029_snap.tar.lz4 | head -n 1 | grep "200" > /dev/null; then
curl https://server-4.itrocket.net/testnet/mantra/mantra_2024-11-24_1164029_snap.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.mantrachain
else
echo "no snapshot found"
fi
# enable and start service
sudo systemctl daemon-reload
sudo systemctl enable mantrachaind
sudo systemctl restart mantrachaind && sudo journalctl -u mantrachaind -f
Create wallet
# to create a new wallet, use the following command. don’t forget to save the mnemonic
mantrachaind keys add $WALLET
# to restore exexuting wallet, use the following command
mantrachaind keys add $WALLET --recover
# save wallet and validator address
WALLET_ADDRESS=$(mantrachaind keys show $WALLET -a)
VALOPER_ADDRESS=$(mantrachaind keys show $WALLET --bech val -a)
echo "export WALLET_ADDRESS="$WALLET_ADDRESS >> $HOME/.bash_profile
echo "export VALOPER_ADDRESS="$VALOPER_ADDRESS >> $HOME/.bash_profile
source $HOME/.bash_profile
# check sync status, once your node is fully synced, the output from above will print "false"
mantrachaind status 2>&1 | jq
# before creating a validator, you need to fund your wallet and check balance
mantrachaind query bank balances $WALLET_ADDRESS