Swisstronik Docs
  • 🇨🇭About Swisstronik
    • What is Swisstronik?
    • Swisstronik vs Ethereum
    • Useful links
  • 🌐General
    • Intel SGX
    • Governance
      • On-Chain Proposal
      • Formatting a Proposal
      • Submitting a Proposal
      • Governable Parameters
    • Community Pool
    • Accounts
    • Transactions
    • Gas and Fees
    • Coin & Tokens
  • ⚒️Development
    • Endpoints
    • Connect wallets
      • MetaMask (EVM) - Manual
      • Keplr (Cosmos)
      • Testnet Metamask (EVM) - Chainlist
      • Testnet MetaMask (EVM) - Manual
      • Testnet Keplr (Cosmos)
    • Get test coins
    • SwisstronikJS SDK
      • SwisstronikJS Functions
      • Swisstronik & Ethereum transactions
      • Transaction - code sample
      • Swisstronik & Ethereum calls
      • Call - code sample
    • Swisstronik CLI
      • Installation
      • Configuration
      • Key management
      • Queries
      • Sending SWTR
      • For SDI Issuers
    • Guides
      • Contract deployment - Hardhat
        • 1. Setting up the Hardhat environment
        • 2. Configure hardhat.config.js
        • 3. Write and compile the smart contract
        • 4. Deploy the smart contract
        • 5. Interact with the contract - Transaction
        • 6. Interact with the contract - Call
      • Contract deployment - Remix IDE
      • Deployment & Interaction PERC-20
        • ERC-20 & PERC-20
        • Sample PERC20 contract
        • Deployment & Interaction with contract
        • How to use encryption
      • Contract verification
      • SDI for dapp developers
    • Local testnet
    • Web3JS, Ethers, Viem and other third-party libraries
  • 🖥️Node setup
    • Setup SGX
      • Supported Hardware
      • Setup Intel SGX
    • Setup node
      • Mainnet
        • v1.0.1 Upgrade
      • Testnet
        • Install from .deb package
        • Configure node
        • Upgrade your testnet node
          • Swisstronik v3 Testnet
          • Swisstronik v4 Testnet
          • Swisstronik v5 Testnet
          • Swisstronik v5.1 Testnet
          • Swisstronik v6 Testnet
          • Swisstronik v7 Testnet
          • Swisstronik v8 Testnet
        • Seed Node
        • Live Peers
        • Genesis Mirror Download
    • CLI Cheatsheet
  • 🤝Delegators
    • What is a delegator?
    • Delegator Guide (CLI)
    • Delegators Security
Powered by GitBook
On this page
  • Chain IDs:
  • Swisstronik Testnet CLI Cheatsheet
  1. Node setup

CLI Cheatsheet

This page describes usefull commands, which can be used both in swisstronikd or swisstronikcli.

Chain IDs:

Testnet chain ID is used in the examples. If you want to interact with mainnet, ensure that you're using appropriate chain ID

Type
Chain ID

Mainnet

swisstronik_1848-1

Testnet

swisstronik_1291-1

Swisstronik Testnet 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 use our own RPC endpoints

  • 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

swisstronikd tx bank send KEY RECEIVER_ADDRESS 1000000uswtr \
  --chain-id swisstronik_1291-1 \
  --node http://148.113.8.228:26657  \
  --from KEY

Distribution: Withdraw Rewards including Commission

swisstronikd tx distribution withdraw-rewards VALIDATOR_OPERATOR \
  --commission \
  --chain-id swisstronik_1291-1 \
  --node http://148.113.8.228:26657  \
  --from KEY

Gov: Query Proposal

swisstronikd query gov proposal PROPOSAL_NUMBER \
  --chain-id swisstronik_1291-1 \
  --node http://148.113.8.228:26657 \
  --output json | jq

Gov: Vote

VOTE_OTION: yes, no, no_with_veto and abstain.

swisstronikd tx gov vote PROPOSAL_NUMBER VOTE_OPTION \
  --chain-id swisstronik_1291-1 \
  --node http://148.113.8.228:26657  \
  --from KEY

Slashing: Unjail

swisstronikd tx slashing unjail \
  --chain-id swisstronik_1291-1 \
  --node http://148.113.8.228:26657  \
  --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.

swisstronikd tx staking create-validator \
  --amount 1000000uswtr \
  --commission-max-change-rate "0.05" \
  --commission-max-rate "0.10" \
  --commission-rate "0.05" \
  --min-self-delegation "1" \
  --pubkey=$(swisstronikd tendermint show-validator) \
  --moniker 'validator' \
  --website "https://validator.com" \
  --identity "0A6AF02D1557E5B4" \
  --details "Validator is the trusted staking service provider for blockchain projects. 100% refund for downtime slash. " \
  --security-contact="hello@validator.com" \
  --chain-id swisstronik_1291-1 \
  --node http://148.113.8.228:26657  \
  --from KEY

If you have feedback or find errors in this cheatsheet, please let us know your feedback. Thanks!

PreviousGenesis Mirror DownloadNextWhat is a delegator?

Last updated 23 days ago

🖥️