Useful commands
Useful commands
Key Management
Add new key
Copy
swisstronikd keys add walletRecover existing key
Copy
swisstronikd keys add wallet --recoverList All key
Copy
swisstronikd keys listDelete key
Copy
swisstronikd keys delete walletExport Key (save to wallet.backup)
Copy
swisstronikd keys export walletImport key
Copy
swisstronikd keys import wallet wallet.backupQuery Wallet Balance
Copy
swisstronikd q bank balances $(swisstronikd keys show wallet -a)Validator Management
Create Validator
Copy
swisstronikd tx staking create-validator \
--amount "1000000uswrt" \
--pubkey $(swisstronikd tendermint show-validator) \
--moniker "<MONIKER>" \
--identity "" \
--website "YOUR WEBSITE" \
--chain-id swisstronik_1291-1 \
--commission-rate "0.01" \
--commission-max-rate "0.2" \
--commission-max-change-rate "0.01" \
--min-self-delegation "1" \
--gas-prices 7uswrt \
--gas "auto" \
--gas-adjustment "1.5" \
--from wallet \
-yEdit Validator
Copy
swisstronikd tx staking edit-validator \
--new-moniker "<MONIKER>" \
--identity "" \
--details "Indonode Guide" \
--website "YOUR WEBSITE" \
--chain-id swisstronik_1291-1 \
--commission-rate "0.01" \
--gas-prices 7uswrt \
--gas "auto" \
--gas-adjustment "1.5" \
--from wallet \
-yUnjail Validator
Copy
swisstronikd tx slashing unjail \
--chain-id swisstronik_1291-1 \
--gas-prices 7uswrt \
--gas-adjustment 1.5\
--gas "auto" \
--from wallet \
-y Signing Info
Copy
swisstronikd query slashing signing-info $(swisstronikd tendermint show-validator) List all active validators
Copy
swisstronikd q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " " + .description.moniker' | sort -gr | nl List all inactive validators
Copy
swisstronikd q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED") or .status=="BOND_STATUS_UNBONDING")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " " + .description.moniker' | sort -gr | nl View validators details
Copy
swisstronikd q staking validator $(swisstronikd keys show wallet --bech val -a) Token Management
To valoper addressTo wallet addressAmount, uswrt
Withdraw rewards from all validators
Copy
swisstronikd tx distribution withdraw-all-rewards --from wallet --chain-id swisstronik_1291-1 --gas-prices 7uswrt --gas-adjustment 1.5 --gas "auto" -y Withdraw comission and rewards from your validator
Copy
swisstronikd tx distribution withdraw-rewards $(swisstronikd keys show wallet --bech val -a) --commission --from wallet --chain-id swisstronik_1291-1 --gas-prices 7uswrt --gas-adjustment 1.5 --gas "auto" -y Delegate to your validator
Copy
swisstronikd tx staking delegate $(swisstronikd keys show wallet --bech val -a) 1000000uswrt --from wallet --chain-id swisstronik_1291-1 --gas-prices 7uswrt --gas-adjustment 1.5 --gas "auto" -y Delegate to other
Copy
c4ed tx staking delegate <TO_VALOPER_ADDRESS> 1000000uswrt --from wallet --chain-id swisstronik_1291-1 --gas-prices 7uswrt --gas-adjustment 1.5 --gas "auto" -y Redelegate your stake to other validators
Copy
swisstronikd tx staking redelegate $(swisstronikd keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uswrt --from wallet --chain-id swisstronik_1291-1 --gas-prices 7uswrt --gas-adjustment 1.5 --gas "auto" -y Unbond stake
Copy
swisstronikd tx staking unbond $(swisstronikd keys show wallet --bech val -a) 1000000uswrt --from wallet --chain-id swisstronik_1291-1 --gas-prices 7uswrt --gas-adjustment 1.5 --gas "auto" -y Send tokens
Copy
swisstronikd tx bank send wallet <TO_WALLET_ADDRESS> 1000000uswrt --from wallet --chain-id swisstronik_1291-1 --gas-prices 7uswrt --gas-adjustment 1.5 --gas "auto" -y Governance
Create new text proposal
Copy
swisstronikd tx gov submit-proposal \
--title "" \
--description "" \
--deposit "1000000uswrt" \
--type "Text" \
--from wallet \
--gas-prices 7uswrt \
--gas-adjustment 1.5 \
--gas "auto" \
-y List all proposals
Copy
swisstronikd query gov proposalsProposal IDProposal optionYesNoNo with vetoAbstain
Vote
Copy
swisstronikd tx gov vote 1 yes \
--from wallet \
--chain-id swisstronik_1291-1 \
--gas-prices 7uswrt \
--gas-adjustment 1.5 \
--gas "auto" \
-y Utility
Set IndexerNULLKV
Copy
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.swisstronik/config/config.tomlGet Validator info
Copy
swisstronikd status 2>&1 | jq .ValidatorInfoGet denom info
Copy
swisstronikd q bank denom-metadata -oj | jqGet sync status
Copy
swisstronikd status 2>&1 | jq .SyncInfo.catching_upGet latest height
Copy
swisstronikd status 2>&1 | jq .SyncInfo.latest_block_heightReset Node
Copy
swisstronikd tendermint unsafe-reset-all --home $HOME/.swisstronik --keep-addr-bookDelete Node
Copy
cd $HOME && sudo systemctl stop swisstronikd && sudo systemctl disable swisstronikd && sudo rm /etc/systemd/system/swisstronikd.service && sudo systemctl daemon-reload && sudo rm -rf $(which swisstronikd) && sudo rm -rf $HOME/.swisstronik && sudo rm -rf $(which swisstronikd) Services Management
Reload Service
Copy
sudo systemctl daemon-reloadEnable Service
Copy
sudo systemctl enable swisstronikdDisable Service
Copy
sudo systemctl disable swisstronikdStart Service
Copy
sudo systemctl start swisstronikdStop Service
Copy
sudo systemctl stop swisstronikdRestart Service
Copy
sudo systemctl restart swisstronikdCheck Service Status
Copy
sudo systemctl status swisstronikdCheck Service Logs
Copy
sudo journalctl -u swisstronikd -f --no-hostname -o catLast updated