Republic Testnet Logo

Republic Testnet

Active

Republic is a decentralized system that leverages blockchain technology to coordinate and verify computational tasks.

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

republicd keys add $WALLET

Keep the generated seed phrase safe. It is the only way to recover your wallet.

Recover Wallet from Seed Phrase

republicd keys add $WALLET --recover

You will be prompted to enter your seed phrase.

List Wallets

republicd keys list

Show Wallet Details

republicd keys show $WALLET

Delete Wallet

republicd keys delete $WALLET

2. Wallet Operations

Check Balance

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

Send Tokens

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 -y

Example:

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 -y

Replace <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 Command

republicd comet show-validator > $HOME/.republic/validator_pubkey.json
cat <<EOF > $HOME/.republic/validator.json
{
  "pubkey": $(cat $HOME/.republic/validator_pubkey.json),
  "amount": "1000000000000000000arai",
  "moniker": "",
  "identity": "",
  "website": "",
  "security": "",
  "details": "🚀 Built by node runners.",
  "commission-rate": "0.1",
  "commission-max-rate": "0.20",
  "commission-max-change-rate": "0.05",
  "min-self-delegation": "1"
}
EOF
republicd tx staking create-validator $HOME/.republic/validator.json \
  --from=$WALLET \
  --chain-id=raitestnet_77701-1 \
  --gas-prices 2500000000arai \
  --gas=auto \
  --gas-adjustment=1.5 \
  --home ~/.republic \
  -y
Parameter Explanation:
ParameterDetails
--amountTokens self-delegated to the validator. 1000000000000000000arai = 1 RAI
--fromWallet used for the transaction.
--commission-rateInitial commission rate.
--commission-max-rateMaximum allowed commission rate.
--commission-max-change-rateMax daily commission change.
--min-self-delegationMinimum tokens for self-delegation.
--pubkeyValidator's public key.
--monikerValidator nickname.
--identityKeybase ID for identity verification.
--websiteValidator's website URL.
--detailsValidator description.
--security-contactEmail for security-related contact.

Edit Validator

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 \
-y

Delegate Tokens

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 \
-y

Withdraw Rewards (Delegator)

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 \
-y

Withdraw Rewards (Validator Commission)

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 \
-y

Unbond Tokens

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 \
-y

Redelegate Tokens

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 \
-y

4. Node Status & Info

Check Sync Status

republicd status 2>&1 | jq .result.sync_info

Check Peer Info

republicd status 2>&1 | jq .result.sync_info.catching_up
republicd status 2>&1 | jq .result.node_info.listen_addr

Show Node ID

republicd tendermint show-node-id

Restart Node

sudo systemctl restart republicd

View Node Logs

sudo journalctl -u republicd -fo cat

5. Governance

List Proposals

republicd query gov proposals

View Proposal Details

republicd query gov proposal <proposal_id>

Vote on Proposal

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 \
-y

6. Environment Variables

Make sure to set these in your ~/.bash_profile or equivalent shell config:

export WALLET="wallet"
export MONIKER="YourMoniker"
export REPUBLIC_CHAIN_ID="raitestnet_77701-1"
export REPUBLIC_PORT="14"

Apply the changes with:

source ~/.bash_profile

This cheat sheet is provided to streamline Republic validator and wallet management.