LOGOSNODOS
  • LOGOSNODOS
  • 🖥️Mainnet Node
    • Avail Network
      • ▶️Installation
      • ▶️Staking / Bonding
    • BlockX
      • ▶️Installation
      • ▶️Cheat Sheet
    • Muon Network
      • ▶️Installation
      • ▶️Troubleshooting
    • RaiblocksOne
      • ▶️Installation
      • ▶️Cheat Sheet
    • SGE Network
      • ▶️Installation
      • ▶️Cheat Sheet
    • Quicksilver Protocol
      • ▶️Installation
      • ▶️Cheat Sheet
  • 🛠️TESTNET NODE
    • 0gchain
      • ▶️Installation
      • ▶️Cheat Sheet
    • Airchains
      • ▶️Installation
      • ▶️Cheat Sheet
    • Avail Network
      • ▶️Installation
      • ▶️Challenge Set Identity
      • ▶️Challenge Add Pool
    • Cortensor
      • ▶️Staking and Funding
      • ▶️Installation
      • ▶️Node Management
      • ▶️Monitoring
    • CrossFi
      • ▶️Installation
      • ▶️Cheat Sheet
    • Juneo Network
      • ▶️Installation
      • ▶️Create Supernet
      • ▶️Deploy a VM
    • Namada
      • ▶️Installation
      • ▶️Cheat Sheet
    • Pryzm
      • ▶️Installation
      • ▶️Cheat Sheet
    • Quicksilver Protocol
      • ▶️Installation
      • ▶️Cheat Sheet
    • Swisstronik
      • ▶️Installation
      • ▶️Cheat Sheet
    • Symphony
      • ▶️Installation
      • ▶️Cheat Sheet
  • ⛑️Solidity Compiler
    • Hardhat
      • ▶️Installation
      • ▶️Setup Hardhat on Swisstronik Network
      • ▶️Write and compile the smart contract
      • ▶️Deploy the smart contract
      • ▶️Interact with the contract-Transaction
      • ▶️Interact with the contract-Call
      • ▶️Crafts and Mint Token ERC20
      • ▶️PERC20 (Private ERC20) Deploy, Mint and Transfer.
      • ▶️JSON RPC Call using ETH getStorage
Powered by GitBook
On this page
  • Key management
  • Validator management
  • Token management
  • Governance
  • Utility

Was this helpful?

  1. TESTNET NODE
  2. Swisstronik

Cheat Sheet

Key management

If you got an error "Error: provided algorithm "eth_secp256k1" is not supported", specify an additional parameter for keyring --keyring-backend test or --keyring-backend file

Add new key

swisstronikd keys add wallet

Recover existing key

swisstronikd keys add wallet --recover

List all keys

swisstronikd keys list

Delete key

swisstronikd keys delete wallet

Export key to the file

swisstronikd keys export wallet

Import key from the file

swisstronikd keys import wallet wallet.backup

Query wallet balance

swisstronikd q bank balances $(sged keys show wallet -a)

Validator management

Please make sure you have adjusted moniker, identity, details and website to match your values.

Create new validator

swisstronikd tx staking create-validator \
  --amount 1000000uswtr \
  --commission-max-change-rate "0.1" \
  --commission-max-rate "0.2" \
  --commission-rate "0.1" \
  --min-self-delegation "1" \
  --pubkey  $(swisstronikd tendermint show-validator) \
  --moniker "<your moniker>" \
  --website "<your website>" \
  --identity "<your identity> \
  --details "<your descriptions> \
  --chain-id $SWISSTRONIK_CHAIN_ID \
  --gas-prices 7uswtr \
  --from wallet \
  -y

Edit existing validator

swisstronikd tx staking edit-validator \
  --moniker=<your moniker> \
  --identity=<your_keybase_id> \
  --website=<your_website> \
  --details=<your_validator_description> \
  --chain-id=$SWISSTRONIK_CHAIN_ID \
  --from=wallet \
  -y

Unjail validator

swisstronikd tx slashing unjail \
  --broadcast-mode=block \
  --chain-id=$SWISSTRONIK_CHAIN_ID \
  --gas=auto \
  --from=wallet \
  -y

View validator details

swisstronikd q staking validator $(swisstronikd keys show wallet --bech val -a)

Token management

Withdraw rewards from all validators

swisstronikd tx distribution withdraw-all-rewards --from wallet --chain-id $SWISSTRONIK_CHAIN_ID --gas-adjustment 1.4 --gas auto --gas-prices 7uswtr -y

Withdraw commission and rewards from your validator

swisstronikd tx distribution withdraw-rewards $(swisstronikd keys show wallet --bech val -a) --commission --from wallet --chain-id $SWISSTRONIK_CHAIN_ID --gas-adjustment 1.4 --gas auto --gas-prices 7uswtr -y

Delegate tokens to yourself

swisstronikd tx staking delegate $(swisstronikd keys show wallet --bech val -a) 10000000uswtr --from wallet --chain-id $SWISSTRONIK_CHAIN_ID --gas-adjustment 1.4 --gas auto --gas-prices 7uswtr -y

Redelegate tokens to another validator

swisstronikd tx staking redelegate $(swisstronikd keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 10000000usge --from wallet --chain-id $SWISSTRONIK_CHAIN_ID --gas-adjustment 1.4 --gas auto --gas-prices 7uswtr -y

Unbond tokens from your validator

swisstronikd tx staking unbond $(swisstronikd keys show wallet --bech val -a) 1000000usge --from wallet --chain-id $SWISSTRONIK_CHAIN_ID --gas-adjustment 1.4 --gas auto --gas-prices 7uswtr -y

Send tokens to the wallet

swisstronikd tx bank send wallet <TO_WALLET_ADDRESS> 1000000usge --from wallet --chain-id $SWISSTRONIK_CHAIN_ID --gas-adjustment 1.4 --gas auto --gas-prices 7uswtr -y

Governance

List all proposals

swisstronikd query gov proposals

View proposal by id

swisstronikd query gov proposal 1

Vote 'Yes'

swisstronikd tx gov vote 1 yes --from wallet --chain-id $SWISSTRONIK_CHAIN_ID --gas-adjustment 1.4 --gas auto --gas-prices 7uswtr -y

Vote 'No'

swisstronikd tx gov vote 1 no --from wallet --chain-id $SWISSTRONIK_CHAIN_ID --gas-adjustment 1.4 --gas auto --gas-prices 7uswtr -y

Vote 'Abstain'

swisstronikd tx gov vote 1 abstain --from wallet --chain-id $SWISSTRONIK_CHAIN_ID --gas-adjustment 1.4 --gas auto --gas-prices 7uswtr -y

Vote 'NoWithVeto'

swisstronikd tx gov vote 1 NoWithVeto --from wallet --chain-id $SWISSTRONIK_CHAIN_ID --gas-adjustment 1.4 --gas auto --gas-prices 7uswtr -y

Utility

Update ports

CUSTOM_PORT=110
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT}58\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${CUSTOM_PORT}57\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${CUSTOM_PORT}60\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${CUSTOM_PORT}56\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${CUSTOM_PORT}66\"%" $HOME/.swisstronik/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${CUSTOM_PORT}17\"%; s%^address = \":8080\"%address = \":${CUSTOM_PORT}80\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${CUSTOM_PORT}90\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${CUSTOM_PORT}91\"%" $HOME/.swisstronik/config/app.toml

Get sync info

swisstronikd status 2>&1 | jq .SyncInfo

Get live peers

curl -sS http://localhost:26657/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'

Enable prometheus

sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.swisstronik/config/config.toml

Reset chain data

swisstronikd tendermint unsafe-reset-all --keep-addr-book --home $HOME/.swisstronik --keep-addr-book

Remove node

Please, before proceeding with the next step! All chain data will be lost! Make sure you have backed up your priv_validator_key.json !

cd $HOME
sudo systemctl stop swisstronikd
sudo systemctl disable swisstronikd
sudo rm /etc/systemd/system/swisstronikd.service
sudo systemctl daemon-reload
rm -f $(which swisstronikd)
rm -rf $HOME/.swisstronik
rm -rf $HOME/swisstronik

Last updated 1 year ago

Was this helpful?

🛠️
▶️