Swisstronik is a layer 1 solution built on the Cosmos SDK framework. It aims to combine the benefits of the Ethereum Virtual Machine (EVM) with the underlying infrastructure provided by the Cosmos SDK. This integration allows Swisstronik to offer Ethereum compatibility while providing additional features such as private EVM execution using Intel SGX.
swisstronikd keys addswisstronikd keys add --recoverswisstronikd keys listswisstronikd keys deleteswisstronikd keys exportswisstronikd keys import .backup
swisstronikd q bank balances $(swisstronikd keys show -a)
sudo journalctl -u swisstronikd -f --no-hostname -o catsudo systemctl start swisstronikdsudo systemctl stop swisstronikdsudo systemctl restart swisstronikdsudo systemctl status swisstronikdsudo systemctl daemon-reloadsudo systemctl enable swisstronikdsudo systemctl disable swisstronikdswisstronikd status 2>&1 | jq .SyncInfoecho $(swisstronikd tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.swisstronik/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')curl -sS http://localhost:657/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'
swisstronikd tx staking create-validator \
--amount=000000000000000000uswtr \
--moniker="" \
--pubkey=$(swisstronikd tendermint show-validator) \
--identity="" \
--details="" \
--website="" \
--security-contact= \
--chain-id= \
--commission-rate=0. \
--commission-max-rate=0.20 \
--commission-max-change-rate=0. \
--min-self-delegation=1 \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr"
swisstronikd tx staking edit-validator \
--new-moniker="" \
--chain-id= \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr" -yswisstronikd tx staking edit-validator \
--identity="" \
--chain-id= \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr"swisstronikd tx staking edit-validator \
--details="" \
--chain-id= \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr"swisstronikd tx staking edit-validator \
--commission-rate=0. \
--chain-id= \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr"swisstronikd tx staking edit-validator \
--new-moniker="" \
--identity="" \
--chain-id= \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr"swisstronikd tx staking edit-validator \
--new-moniker="" \
--details="" \
--chain-id= \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr"swisstronikd tx staking edit-validator \
--new-moniker="" \
--commission-rate=0. \
--chain-id= \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr"swisstronikd tx staking edit-validator \
--identity="" \
--details="" \
--chain-id= \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr"swisstronikd tx staking edit-validator \
--identity="" \
--commission-rate=0. \
--chain-id= \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr"swisstronikd tx staking edit-validator \
--details="" \
--commission-rate=0. \
--chain-id= \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr"swisstronikd tx staking edit-validator \
--new-moniker="" \
--identity="" \
--details="" \
--chain-id= \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr"swisstronikd tx staking edit-validator \
--new-moniker="" \
--identity="" \
--commission-rate=0. \
--chain-id= \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr"swisstronikd tx staking edit-validator \
--new-moniker="" \
--details="" \
--commission-rate=0. \
--chain-id= \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr"swisstronikd tx staking edit-validator \
--identity="" \
--details="" \
--commission-rate=0. \
--chain-id= \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr"swisstronikd tx staking edit-validator \
--new-moniker="" \
--identity="" \
--details="" \
--commission-rate=0. \
--chain-id= \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr"swisstronikd tx staking edit-validator \
--new-moniker="" \
--identity="" \
--details="" \
--website="" \
--security-contact= \
--chain-id= \
--commission-rate=0. \
--from= \
--gas="1000000" \
--gas-prices="30000000000uswtr"
swisstronikd status 2>&1 | jq .ValidatorInfoswisstronikd q staking validator $(swisstronikd keys show --bech val -a)swisstronikd q slashing signing-info $(swisstronikd tendermint show-validator)swisstronikd tx slashing unjail --broadcast-mode=block --from --chain-id --gas="1000000" --gas-prices="30000000000uswtr"swisstronikd q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " " + .description.moniker' | sort -gr | nl[[ $(swisstronikd q staking validator $(swisstronikd keys show --bech val -a) -oj | jq -r .consensus_pubkey.key) = $(swisstronikd status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"swisstronikd q slashing signing-info $(swisstronikd tendermint show-validator)
swisstronikd tx distribution withdraw-all-rewards --from --chain-id --gas="1000000" --gas-prices="30000000000uswtr"swisstronikd tx distribution withdraw-rewards $(swisstronikd keys show --bech val -a) --commission --from --chain-id --gas="1000000" --gas-prices="30000000000uswtr"swisstronikd tx staking delegate $(swisstronikd keys show --bech val -a) 000000000000000000uswtr --from --chain-id --gas="1000000" --gas-prices="30000000000uswtr"swisstronikd tx staking redelegate $(swisstronikd keys show --bech val -a) 000000000000000000uswtr --from --chain-id --gas="1000000" --gas-prices="30000000000uswtr"swisstronikd tx staking delegate 000000000000000000uswtr --from --chain-id --gas="1000000" --gas-prices="30000000000uswtr"swisstronikd tx staking unbond $(swisstronikd keys show --bech val -a) 000000000000000000uswtr --from --chain-id --gas="1000000" --gas-prices="30000000000uswtr"swisstronikd tx bank send 000000000000000000uswtr --from --chain-id --gas="1000000" --gas-prices="30000000000uswtr"
swisstronikd query gov proposal
swisstronikd tx gov vote --from --chain-id --gas="1000000" --gas-prices="30000000000uswtr"
CUSTOM_PORT=
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${CUSTOM_PORT}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${CUSTOM_PORT}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${CUSTOM_PORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${CUSTOM_PORT}660\"%" $HOME/.swisstronik/config/config.toml
sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${CUSTOM_PORT}317\"%; s%^address = \":8080\"%address = \":${CUSTOM_PORT}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${CUSTOM_PORT}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${CUSTOM_PORT}091\"%; s%^address = \"127.0.0.1:8545\"%address = \"0.0.0.0:${CUSTOM_PORT}545\"%; s%^ws-address = \"127.0.0.1:8546\"%ws-address = \"0.0.0.0:${CUSTOM_PORT}546\"%" $HOME/.swisstronik/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "kv"|' $HOME/.swisstronik/config/config.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.swisstronik/config/config.toml
swisstronikd tendermint unsafe-reset-all --home $HOME/.swisstronik --keep-addr-book
sudo systemctl stop swisstronikd && \
sudo systemctl disable swisstronikd && \
rm /etc/systemd/system/swisstronikd.service && \
sudo systemctl daemon-reload && \
cd $HOME && \
rm -rf .swisstronik && \
rm -rf $(which swisstronikd)
wget -O $HOME/.swisstronik/config/genesis.json "https://snap.swisstronik.kynraze.com/genesis.json"
wget -O $HOME/.swisstronik/config/addrbook.json "https://snap.swisstronik.kynraze.com/addrbook.json"
PEERS=
sed -i -e "s|^persistent_peers *=.*|persistent_peers = "$PEERS"|" $HOME/.swisstronik/config/config.toml
Coming Soon
SWISSTRONIK
_NODENAME=""
echo "exportSWISSTRONIK_NODENAME=$SWISSTRONIK_NODENAME" >> $HOME/.bash_profileif [ ! $WALLET ]; thenecho "export WALLET=wallet" >> $HOME/.bash_profilefiecho "exportSWISSTRONIK_CHAIN_ID=" >> $HOME/.bash_profilesource $HOME/.bash_profile
sudo apt update && sudo apt upgrade -y && sudo apt install curl tar wget unzip clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
ver="1.20"cd $HOMEwget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"sudo rm -rf /usr/local/gosudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"rm "go$ver.linux-amd64.tar.gz"echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profilesource ~/.bash_profile
go version
wget https://github.com/SigmaGmbH/swisstronik-chain/releases/download/v1.0.1/swisstronikd.deb.zipunzip swisstronikd.deb.zip sudo dpkg -i swisstronik_1.0.1-updated-binaries_amd64.deb swisstronikd version
git clone https://github.com/SigmaGmbH/swisstronik-chain.git cd swisstronik-chain git submodule update
--init --recursivemake build make install
swisstronikd version
--long
sudo cp /usr/lib/enclave.signed.so $HOME/.swisstronik-enclave/enclave.signed.so
sudo chown -R $USER:$USER $HOME/.swisstronik-enclave
swisstronikd enclave request-master-key rpc.testnet.swisstronik.com:46789
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"7uswtr\"|" $HOME/.swisstronik/config/app.toml
CUSTOM_PORT=
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${CUSTOM_PORT}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${CUSTOM_PORT}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${CUSTOM_PORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${CUSTOM_PORT}660\"%"$HOME/.swisstronik/config/config.tomlsed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${CUSTOM_PORT}317\"%; s%^address = \":8080\"%address = \":${CUSTOM_PORT}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${CUSTOM_PORT}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${CUSTOM_PORT}091\"%; s%^address = \"127.0.0.1:8545\"%address = \"0.0.0.0:${CUSTOM_PORT}545\"%; s%^ws-address = \"127.0.0.1:8546\"%ws-address = \"0.0.0.0:${CUSTOM_PORT}546\"%"$HOME/.swisstronik/config/app.toml
swisstronikd config chain-id $SWISSTRONIK_CHAIN_ID swisstronikd config keyring-backend file swisstronikd config node tcp://localhost:657
swisstronikd init $SWISSTRONIK_NODENAME
--chain-id$SWISSTRONIK_CHAIN_ID
wget -O $HOME/.swisstronik/config/genesis.json "https://snap.swisstronik.kynraze.com/genesis.json"
wget -O $HOME/.swisstronik/config/addrbook.json "https://snap.swisstronik.kynraze.com/addrbook.json"
PEERS=""sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.swisstronik/config/config.tomlsed -i -e "s|^seeds *=.*|seeds = \"\"|" $HOME/.swisstronik/config/config.toml
pruning="custom"pruning_keep_recent="100"pruning_keep_every="0"pruning_interval="10"sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.swisstronik/config/app.tomlsed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.swisstronik/config/app.tomlsed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.swisstronik/config/app.tomlsed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.swisstronik/config/app.toml
sudo tee /etc/systemd/system/swisstronikd.service > /dev/null << EOF[Unit]Description=swisstronikdAfter=network-online.target
[Service]User=$USERExecStart=$(whichswisstronikd)start --home $HOME/.swisstronikRestart=on-failureRestartSec=3LimitNOFILE=65535
[Install]WantedBy=multi-user.targetEOF
curl -o - -Lhttps://snap.swisstronik.kynraze.com/snapshot-latest.tar.lz4| lz4 -c -d - | tar -x -C $HOME/.swisstronik
sudo systemctl daemon-reloadsudo systemctl enableswisstronikdsudo systemctl restartswisstronikdsudo journalctl -fuswisstronikd-o cat
# Update & install lz4(Required)
sudo apt install snapd lz4 -y
# Reset Chain Data
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1false|" $HOME/.swisstronik/config/config.toml
sudo systemctl stop swisstronikd
cp $HOME/.swisstronik/data/priv_validator_state.json $HOME/.swisstronik/priv_validator_state.json.backup
rm -rf $HOME/.swisstronik/data
# Download Data Snapshot
curl -o - -L https://snap.swisstronik.kynraze.com/snapshot-latest.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.swisstronik
mv $HOME/.swisstronik/priv_validator_state.json.backup $HOME/.swisstronik/data/priv_validator_state.json
# Restart
sudo systemctl restart swisstronikd
sudo journalctl -fu swisstronikd -o cat
systemctl stop swisstronikd
swisstronikd tendermint unsafe-reset-all --home $HOME/.swisstronik --keep-addr-book
STATE_SYNC_RPC=""
LATEST_HEIGHT=$(curl -s $STATE_SYNC_RPC/block | jq -r .result.block.header.height) \
SYNC_BLOCK_HEIGHT=$(($LATEST_HEIGHT - 2000)) \
SYNC_BLOCK_HASH=$(curl -s "$STATE_SYNC_RPC/block?height=$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $SYNC_BLOCK_HEIGHT $SYNC_BLOCK_HASH
PEERS=""
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.swisstronik/config/config.toml
sed -i.bak -e "s|^enable *=.*|enable = true|" $HOME/.swisstronik/config/config.toml
sed -i.bak -e "s|^rpc_servers *=.*|rpc_servers = \"$STATE_SYNC_RPC,$STATE_SYNC_RPC\"|" \
$HOME/.swisstronik/config/config.toml
sed -i.bak -e "s|^trust_height *=.*|trust_height = $SYNC_BLOCK_HEIGHT|" \
$HOME/.swisstronik/config/config.toml
sed -i.bak -e "s|^trust_hash *=.*|trust_hash = \"$SYNC_BLOCK_HASH\"|" \
$HOME/.swisstronik/config/config.toml
systemctl restart swisstronikd && journalctl -fu swisstronikd -o cat