Republic Cheat Sheet and Key Management
This guide provides essential commands for managing wallets, nodes, and validators on the Republic Testnet network. Make sure the environment variables mentioned at the end are correctly configured before using these commands.
1. Key Management
Create a New Wallet
bash
republicd keys add $WALLETKeep the generated seed phrase safe. It is the only way to recover your wallet.
Recover Wallet from Seed Phrase
bash
republicd keys add $WALLET --recoverYou will be prompted to enter your seed phrase.
List Wallets
bash
republicd keys listShow Wallet Details
bash
republicd keys show $WALLETDelete Wallet
bash
republicd keys delete $WALLET2. Wallet Operations
Check Balance
bash
republicd query bank balances $(republicd keys show $WALLET -a)Send Tokens
bash
republicd tx bank send $(republicd keys show $WALLET -a) <receiver_wallet_address> <amount><denom> --chain-id $REPUBLIC_CHAIN_ID --gas-prices 2500000000arai --gas-adjustment 1.5 --gas auto -yExample:
bash
republicd tx bank send $(republicd keys show $WALLET -a) rai1...yyy 1000000arai --chain-id $REPUBLIC_CHAIN_ID --gas-prices 2500000000arai --gas-adjustment 1.5 --gas auto -yReplace <amount> with the number of tokens and <denom> with the token denomination (e.g., arai).
3. Validator Management
Ensure you have enough arai tokens for self-delegation and transaction fees before creating a validator.
Create Validator
Configuration:
Generated Code:
Loading...Parameter Explanation:
| Parameter | Details |
|---|---|
--amount | Tokens self-delegated to the validator. 1000000000000000000arai = 1 RAI |
--from | Wallet used for the transaction. |
--commission-rate | Initial commission rate. |
--commission-max-rate | Maximum allowed commission rate. |
--commission-max-change-rate | Max daily commission change. |
--min-self-delegation | Minimum tokens for self-delegation. |
--pubkey | Validator's public key. |
--moniker | Validator nickname. |
--identity | Keybase ID for identity verification. |
--website | Validator's website URL. |
--details | Validator description. |
--security-contact | Email for security-related contact. |
Edit Validator
bash
republicd tx staking edit-validator \
--moniker "$MONIKER" \
--identity "<new_keybase_id>" \
--website "<new_website>" \
--security-contact "<new_contact_email>" \
--details "<new_description>" \
--commission-rate "0.07" \
--chain-id $REPUBLIC_CHAIN_ID \
--gas-prices 2500000000arai \
--gas-adjustment 1.5 \
--gas auto \
--from $WALLET \
-yDelegate Tokens
bash
republicd tx staking delegate $(republicd keys show $WALLET --bech val -a) <amount>arai \
--chain-id $REPUBLIC_CHAIN_ID \
--gas-prices 2500000000arai \
--gas-adjustment 1.5 \
--gas auto \
--from $WALLET \
-yWithdraw Rewards (Delegator)
bash
republicd tx distribution withdraw-rewards $(republicd keys show $WALLET --bech val -a) \
--chain-id $REPUBLIC_CHAIN_ID \
--gas-prices 2500000000arai \
--gas-adjustment 1.5 \
--gas auto \
--from $WALLET \
-yWithdraw Rewards (Validator Commission)
bash
republicd tx distribution withdraw-rewards $(republicd keys show $WALLET --bech val -a) --commission \
--chain-id $REPUBLIC_CHAIN_ID \
--gas-prices 2500000000arai \
--gas-adjustment 1.5 \
--gas auto \
--from $WALLET \
-yUnbond Tokens
bash
republicd tx staking unbond $(republicd keys show $WALLET --bech val -a) <amount>arai \
--chain-id $REPUBLIC_CHAIN_ID \
--gas-prices 2500000000arai \
--gas-adjustment 1.5 \
--gas auto \
--from $WALLET \
-yRedelegate Tokens
bash
republicd tx staking redelegate $(republicd keys show $WALLET --bech val -a) <destination_validator_address> <amount>arai \
--chain-id $REPUBLIC_CHAIN_ID \
--gas-prices 2500000000arai \
--gas-adjustment 1.5 \
--gas auto \
--from $WALLET \
-y4. Node Status & Info
Check Sync Status
bash
republicd status 2>&1 | jq .result.sync_infoCheck Peer Info
bash
republicd status 2>&1 | jq .result.sync_info.catching_up
republicd status 2>&1 | jq .result.node_info.listen_addrShow Node ID
bash
republicd tendermint show-node-idRestart Node
bash
sudo systemctl restart republicdView Node Logs
bash
sudo journalctl -u republicd -fo cat5. Governance
List Proposals
bash
republicd query gov proposalsView Proposal Details
bash
republicd query gov proposal <proposal_id>Vote on Proposal
bash
republicd tx gov vote <proposal_id> <yes|no|no_with_veto|abstain> \
--chain-id $REPUBLIC_CHAIN_ID \
--gas-prices 2500000000arai \
--gas-adjustment 1.5 \
--gas auto \
--from $WALLET \
-y6. Environment Variables
Make sure to set these in your ~/.bash_profile or equivalent shell config:
bash
export WALLET="wallet"
export MONIKER="YourMoniker"
export REPUBLIC_CHAIN_ID="raitestnet_77701-1"
export REPUBLIC_PORT="14"Apply the changes with:
bash
source ~/.bash_profileThis cheat sheet is provided to streamline Republic validator and wallet management.
