Archway CLI Cheatsheet

This cheatsheet provides a collection of commonly used CLI commands for Archway node operators. It’s designed for easy copying and pasting, with a few conventions:

  • Capitalized words are placeholders.
  • Use specific endpoints for consistency.
  • Always include --chain-id and --node flags.
  • Query commands output in JSON format and are piped through jq.

Account Management

  • Create a New Account:

        archwayd keys add <account_name> --keyring-backend <keyring_backend>
    
        
    
  • List All Accounts:

        archwayd keys list --keyring-backend <keyring_backend>
    
        
    
  • Show Account Details:

        archwayd keys show <account_name> --keyring-backend <keyring_backend>
    
        
    

Bank: Send Tokens

    archwayd tx bank send <sender_address> <receiver_address> <amount>aarch \
  --chain-id archway-1 \
  --node https://archway-rpc.chainroot.io:443 --gas=auto --gas-adjustment=1.5 \
  --from <your_key>

    

Staking: Delegate Tokens

    archwayd tx staking delegate <validator_address> <amount>aarch \
  --chain-id archway-1 \
  --node https://archway-rpc.chainroot.io:443 --gas=auto --gas-adjustment=1.5 \
  --from <your_key>

    

Governance: Vote on Proposal

    archwayd tx gov vote PROPOSAL_NUMBER VOTE_OPTION \
  --chain-id archway-1 \
  --node https://archway-rpc.chainroot.io:443 --gas=auto --gas-adjustment=1.5 \
  --from <your_key>

    
  • Note: VOTE_OPTION can be yes, no, no_with_veto, or abstain.

Querying the Blockchain

  • Get Blockchain Status:

        archwayd status
    
        
    
  • Query Account Balances:

        archwayd query bank balances <account_address> --chain-id archway-1 --node https://archway-rpc.chainroot.io:443
    
        
    

Advanced Commands

  • Simulate a Transaction:

        archwayd tx simulate --from <your_key> [additional flags]
    
        
    
  • Broadcast a Transaction:

        archwayd tx broadcast <tx_file> --chain-id archway-1 --node https://archway-rpc.chainroot.io:443
    
        
    

Remember, always double-check your commands and configurations. For a complete list of commands and options, use archwayd --help or consult the Archway documentation.