Service operations ⚙️
Check logs
Copy sudo journalctl -u mantrachaind -f
Start service
Copy sudo systemctl start mantrachaind
Stop service
Copy sudo systemctl stop mantrachaind
Restart service
Copy sudo systemctl restart mantrachaind
Check service status
Copy sudo systemctl status mantrachaind
Reload services
Copy sudo systemctl daemon-reload
Enable Service
Copy sudo systemctl enable mantrachaind
Disable Service
Copy sudo systemctl disable mantrachaind
Sync info
Copy mantrachaind status 2>&1 | jq .SyncInfo
Node info
Copy mantrachaind status 2>&1 | jq .NodeInfo
Your node peer
Copy echo $(mantrachaind tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.mantrachain/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Key management
Add New Wallet
Copy mantrachaind keys add $WALLET
Restore executing wallet
Copy mantrachaind keys add $WALLET --recover
List All Wallets
Copy mantrachaind keys list
Delete wallet
Copy mantrachaind keys delete $WALLET
Check Balance
Copy mantrachaind q bank balances $( mantrachaind keys show $WALLET -a )
Export Key (save to wallet.backup)
Copy mantrachaind keys export $WALLET
Import Key (restore from wallet.backup)
Copy mantrachaind keys import $WALLET wallet.backup
Tokens
Withdraw all rewards
Copy mantrachaind tx distribution withdraw-all-rewards --from $WALLET --chain-id mantrachain-testnet-1 --gas auto --gas-adjustment 1.5
Withdraw rewards and commission from your validator
Copy mantrachaind tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id mantrachain-testnet-1 --gas auto --gas-adjustment 1.5 -y
Check your balance
Copy mantrachaind query bank balances $WALLET_ADDRESS
Delegate to Yourself
Copy mantrachaind tx staking delegate $(mantrachaind keys show $WALLET --bech val -a) 1000000uaum --from $WALLET --chain-id mantrachain-testnet-1 --gas auto --gas-adjustment 1.5 -y
Delegate
Copy mantrachaind tx staking delegate <TO_VALOPER_ADDRESS> 1000000uaum --from $WALLET --chain-id mantrachain-testnet-1 --gas auto --gas-adjustment 1.5 -y
Redelegate Stake to Another Validator
Copy mantrachaind tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000uaum --from $WALLET --chain-id mantrachain-testnet-1 --gas auto --gas-adjustment 1.5 -y
Unbond
Copy mantrachaind tx staking unbond $(mantrachaind keys show $WALLET --bech val -a) 1000000uaum --from $WALLET --chain-id mantrachain-testnet-1 --gas auto --gas-adjustment 1.5 -y
Transfer Funds
Copy mantrachaind tx bank send $WALLET_ADDRESS < TO_WALLET_ADDRES S > 1000000uaum --gas auto --gas-adjustment 1.5 -y
Validator operations
Create New Validator
Copy mantrachaind tx staking create-validator \
--amount 1000000uaum \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $( mantrachaind tendermint show-validator ) \
--moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxx" \
--chain-id mantrachain-testnet-1 \
--gas auto --gas-adjustment 1.5 --fees 50uaum \
-y
Edit Existing Validator
Copy mantrachaind tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxx" \
--from $WALLET \
--chain-id mantrachain-testnet-1 \
--gas auto --gas-adjustment 1.5 --fees 50uaum \
-y
Validator info
Copy mantrachaind status 2>&1 | jq .ValidatorInfo
Validator Details
Copy mantrachaind q staking validator $( mantrachaind keys show $WALLET --bech val -a )
Jailing info
Copy mantrachaind q slashing signing-info $( mantrachaind tendermint show-validator )
Unjail validator
Copy mantrachaind tx slashing unjail --from $WALLET --chain-id mantrachain-testnet-1 --gas auto --gas-adjustment 1.5 -y
Active Validators List
Copy mantrachaind q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " " + .description.moniker' | sort -gr | nl
Check Validator key
Copy [[ $(mantrachaind q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(mantrachaind status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
Signing info
Copy mantrachaind q slashing signing-info $( mantrachaind tendermint show-validator )
Governance
Create New Text Proposal
Copy mantrachaind tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000uaum \
--type Text \
--from $WALLET \
--gas auto --gas-adjustment 1.5 \
-y
Proposals List
Copy mantrachaind query gov proposals
Proposal IDProposal optionYesNoNo with vetoAbstain
View proposal
Copy mantrachaind query gov proposal 1
Vote
Copy mantrachaind tx gov vote 1 yes --from $WALLET --chain-id mantrachain-testnet-1 --gas auto --gas-adjustment 1.5 -y
Delete Node
Copy sudo systemctl stop mantrachaind
sudo systemctl disable mantrachaind
sudo rm -rf /etc/systemd/system/mantrachaind.service
sudo rm $(which mantrachaind)
sudo rm -rf $HOME/.mantrachain
sed -i "/MANTRA_/d" $HOME/.bash_profile
Last updated 7 months ago