CLI Cheatsheet

Chain ID: | Current Node Version: v1.0.0

Mantra Chain CLI Cheatsheet

This cheatsheet collects commonly used CLI commands for node operators to easily copy and paste. A few conventions we follow:

  • Capitalized words indicate placeholders

  • Always specify --chain-id and --node flags even when they are unnecessary

  • Query CLI command always uses --output json flag and pipes result through jq

Bank: Send

mantrachaind tx bank send <KEY> <RECEIVER_ADDRESS> 1000000uaum \
  --chain-id mantrachain-testnet-1 \
  --node https://YOURIPADDRESSHERE:PORT --gas-prices 25000000000uaum --gas 250000 --gas-adjustment 1.2 \
  --from KEY

Distribution: Withdraw Rewards including Commission

mantrachaind tx distribution withdraw-rewards VALIDATOR_OPERATOR \
  --commission \
  --chain-id mantrachain-testnet-1 \
  --node https://YOURIPADDRESSHERE:PORT --gas auto --gas-adjustment 1.5 \
  --from KEY

Gov: Query Proposal

mantrachaind query gov proposal PROPOSAL_NUMBER \
  --chain-id mantrachain-testnet-1 \
  --node https://YOURIPADDRESSHERE:PORT \
  --output json | jq

Gov: Vote

VOTE_OTION: yes, no, no_with_veto and abstain.

mantrachaind tx gov vote PROPOSAL_NUMBER VOTE_OPTION \
  --chain-id mantrachain-testnet-1 \
  --node https://YOURIPADDRESSHERE:PORT --gas auto --gas-adjustment 1.5 \
  --from KEY

Slashing: Unjail

mantrachaind tx slashing unjail \
  --chain-id mantrachain-testnet-1 \
  --node https://YOURIPADDRESSHERE:PORT --gas auto --gas-adjustment 1.5 \
  --from KEY

Staking: Create Validator

Note: We use example filed values instead of capitalized dummy words for demo purpose in this command. Please make sure to adjust accordingly for your use.

mantrachaind tx staking create-validator \
  --amount 1000000uaum \
  --commission-max-change-rate "0.1" \
  --commission-max-rate "0.20" \
  --commission-rate "0.1" \
  --min-self-delegation "1" \
  --details "your bio goes here" \
  --pubkey=$(mantrachaind tendermint show-validator) \
  --moniker $MONIKER_NAME \
  --chain-id mantrachain-testnet-1 \
  --gas auto --gas-adjustment 1.5 \
  --from <KEYNAME>

Last updated

Logo

Made with ❤️ by WhisperNode // © 2024.