Chain ID: mantra-1 | Node Version: v6.1.4
note
First You Need Set Variabels
MONIKER=<YOUR_MONIKER_NAME>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export MANTRA_CHAIN_ID="mantra-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
- Wallet
- Validator
- Token
- Service
- Governance
- Utility
- Delete
Wallet
Create Wallet
mantrachaind keys add wallet
Recovery Wallet
mantrachaind keys add wallet --recover
List All Wallet
mantrachaind keys list
Delete Wallet
mantrachaind keys delete wallet
Check Wallet Balance
mantrachaind q bank balances $(mantrachaind keys show wallet -a)
Validator
note
Make sure you have adjust YOUR_KEYBASE_ID, YOUR_DETAILS, YOUR_WEBSITE_URL
Check Pubkey
mantrachaind comet show-validator
Make File validator.json
tee $HOME/.mantrachain/validator.json > /dev/null << EOF
{
"pubkey": YOUR_PUBKEY,
"amount": "1000000000uom",
"moniker": "MONIKER",
"identity": "YOUR_KEYBASE_ID",
"website": "YOUR_WEBSITE_URL",
"security": "YOUR_CONTACT_MAIL",
"details": "YOUR_DETAILS.",
"commission-rate": "0.1",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}
EOF
Create Validator
mantrachaind tx staking create-validator $HOME/.mantrachain/validator.json --from wallet --chain-id $MANTRA_CHAIN_ID --gas-adjustment 1.5 --gas 225000 --gas-prices 0.01uom
Edit Validator
mantrachaind tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$MANTRA_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=0.01uom
Check Jailed Reason
mantrachaind query slashing signing-info $(mantrachaind tendermint show-validator)
Unjail Validator
mantrachaind tx slashing unjail --from wallet --chain-id $MANTRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.01uom -y
Token
Withdraw Rewards
mantrachaind tx distribution withdraw-all-rewards --from wallet --chain-id $MANTRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.01uom -y
Withdraw Rewards with Comission
mantrachaind tx distribution withdraw-rewards $(mantrachaind keys show wallet --bech val -a) --commission --from wallet --chain-id $MANTRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.01uom -y
Delegate Tokens to Your Validator
mantrachaind tx staking delegate $(mantrachaind keys show wallet --bech val -a) 1000000uom --from wallet --chain-id $MANTRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.01uom -y
Redelegate Tokens to Another Validator
mantrachaind tx staking redelegate $(mantrachaind keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uom --from wallet --chain-id $MANTRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.01uom -y
Unbond Tokens from Your Validator
mantrachaind tx staking unbond $(mantrachaind keys show wallet --bech val -a) 1000000uom --from wallet --chain-id $MANTRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.01uom -y
Send Tokens to Any Wallet
mantrachaind tx bank send wallet <TO_WALLET_ADDRESS> 1000000uom --from wallet --chain-id $MANTRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.01uom -y
Service
Reload Service
sudo systemctl daemon-reload
Enable Service
sudo systemctl enable mantrachaind
Disable Service
sudo systemctl disable mantrachaind
Start Service
sudo systemctl start mantrachaind
Stop Service
sudo systemctl stop mantrachaind
Restart Service
sudo systemctl restart mantrachaind
Check Service Status
sudo systemctl status mantrachaind
Check Service Logs
sudo journalctl -u mantrachaind -f --no-hostname -o cat
Governance
tip
For Vote, You can change the value of yes to no, abstain, no_with_veto
Vote
mantrachaind tx gov vote 1 yes --from wallet --chain-id $MANTRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.01uom -y
List all Proposals
mantrachaind query gov proposals
Check Vote
mantrachaind tx gov vote PROPOSAL_NUMBER VOTE_OPTION --from wallet --chain-id $MANTRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.01uom -y
Create new Proposal
mantrachaind tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=10000000uom \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=0.01uom \
-y
Utility
Set Indexer null / kv
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.mantrachain/config/config.toml
Get Validator Info
mantrachaind status 2>&1 | jq .ValidatorInfo
Get Denom Info
mantrachaind q bank denom-metadata -oj | jq
Get Sync Status
mantrachaind status 2>&1 | jq .SyncInfo.catching_up
Get Latest Height
mantrachaind status 2>&1 | jq .SyncInfo.latest_block_height
Get Node Peer
echo $(mantrachaind tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.mantrachain/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Set Minimum Gas Price
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.01uom\"/" $HOME/.mantrachain/config/app.toml
Enable Prometheus
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.mantrachain/config/config.toml
Reset Chain Data
mantrachaind tendermint unsafe-reset-all --home $HOME/.mantrachain --keep-addr-book
Delete
WARNING!!! Please, before you advance to the following step! The entire chain data will be gone! Make sure you have a backup of your priv_validator_key.json!
Delete Node
sudo systemctl stop mantrachaind && sudo systemctl disable mantrachaind && sudo rm /etc/systemd/system/mantrachaind.service && sudo systemctl daemon-reload && sudo rm -rf $(which mantrachaind) && rm -rf $HOME/.mantrachain