BitBadges Mainnet Cheat Sheet and Key Management

This guide provides essential commands for managing wallets, nodes, and validators on the BitBadges Mainnet network. Make sure the environment variables mentioned at the end are correctly configured before using these commands.

1. Key Management

Create a New Wallet

⚠️ Important: Keep the generated seed phrase safe. It is the only way to recover your wallet.
bitbadgeschaind keys add $WALLET

Recover Wallet from Seed Phrase

bitbadgeschaind keys add $WALLET --recover

List Wallets

bitbadgeschaind keys list

Show Wallet Details

bitbadgeschaind keys show $WALLET

Delete Wallet

bitbadgeschaind keys delete $WALLET

2. Wallet Operations

Check Balance

bitbadgeschaind query bank balances $(bitbadgeschaind keys show $WALLET -a)

Send Tokens

bitbadgeschaind tx bank send $WALLET <recipient_address> <amount>ubadge --chain-id bitbadges-1 --gas auto --gas-adjustment 1.5 --fees 500ubadge

3. Validator Management

💡 Note: Ensure you have enough tokens for self-delegation and transaction fees before creating a validator.

Create Validator

bitbadgeschaind tx staking create-validator \\
  --amount 1000000ubadge \\
  --from $WALLET \\
  --commission-rate 0.1 \\
  --commission-max-rate 0.2 \\
  --commission-max-change-rate 0.01 \\
  --min-self-delegation 1 \\
  --pubkey $(bitbadgeschaind tendermint show-validator) \\
  --moniker "$MONIKER" \\
  --identity "" \\
  --website "" \\
  --details "Your validator description" \\
  --security-contact "your@email.com" \\
  --chain-id bitbadges-1 \\
  --gas auto --gas-adjustment 1.5 \\
  --fees 500ubadge

Edit Validator

bitbadgeschaind tx staking edit-validator \\
  --new-moniker "$MONIKER" \\
  --identity "" \\
  --website "" \\
  --details "Your validator description" \\
  --chain-id bitbadges-1 \\
  --from $WALLET \\
  --gas auto --gas-adjustment 1.5 \\
  --fees 500ubadge

Delegate Tokens

bitbadgeschaind tx staking delegate $(bitbadgeschaind keys show $WALLET --bech val -a) 1000000ubadge --from $WALLET --chain-id bitbadges-1 --gas auto --gas-adjustment 1.5 --fees 500ubadge

Withdraw Rewards (Delegator)

bitbadgeschaind tx distribution withdraw-rewards $(bitbadgeschaind keys show $WALLET --bech val -a) --from $WALLET --chain-id bitbadges-1 --gas auto --gas-adjustment 1.5 --fees 500ubadge

Withdraw Rewards (Validator Commission)

bitbadgeschaind tx distribution withdraw-rewards $(bitbadgeschaind keys show $WALLET --bech val -a) --commission --from $WALLET --chain-id bitbadges-1 --gas auto --gas-adjustment 1.5 --fees 500ubadge

Unbond Tokens

bitbadgeschaind tx staking unbond $(bitbadgeschaind keys show $WALLET --bech val -a) 1000000ubadge --from $WALLET --chain-id bitbadges-1 --gas auto --gas-adjustment 1.5 --fees 500ubadge

Redelegate Tokens

bitbadgeschaind tx staking redelegate $(bitbadgeschaind keys show $WALLET --bech val -a) <destination_validator_address> 1000000ubadge --from $WALLET --chain-id bitbadges-1 --gas auto --gas-adjustment 1.5 --fees 500ubadge

4. Node Status & Info

Check Sync Status

bitbadgeschaind status 2>&1 | jq .SyncInfo

Check Peer Info

curl -s localhost:26657/net_info | jq -r '.result.peers[] | "\\(.node_info.id)@\\(.remote_ip):\\(.node_info.listen_addr | split(":")[2])"'

Show Node ID

bitbadgeschaind tendermint show-node-id

Restart Node

sudo systemctl restart bitbadgeschaind

View Node Logs

sudo journalctl -u bitbadgeschaind -f -o cat

5. Governance

List Proposals

bitbadgeschaind query gov proposals

View Proposal Details

bitbadgeschaind query gov proposal <proposal_id>

Vote on Proposal

bitbadgeschaind tx gov vote <proposal_id> yes --from $WALLET --chain-id bitbadges-1 --gas auto --gas-adjustment 1.5 --fees 500ubadge

6. Environment Variables

💡 Tip: Make sure to set these in your ~/.bash_profile or equivalent shell config.
echo "export WALLET=\"wallet\"" >> $HOME/.bash_profile
echo "export MONIKER=\"your-moniker\"" >> $HOME/.bash_profile
echo "export CHAIN_ID=\"bitbadges-1\"" >> $HOME/.bash_profile
source $HOME/.bash_profile

This cheat sheet is provided to streamline BitBadges Mainnet validator and wallet management. All commands use environment variables for easier management.