Below you can find the guide how to setup local Swisstronik testnet with one or multiple validators using Docker
Single validator testnet
Apple M1 and M2 are not supported, even using QEMU. To fix it, we're working on fork of hardhat with enabled encryption which will simulate Swisstronik node behaviour
For convenient development and testing of your dApps we've prepared the Docker image which contains preconfigured network with one validator.
You can disregard the Can't add peer's address to addrbook warning. As long as the blocks are being produced and the app hashes are the same for each node, there should not be any issues.
You can also watch logs as they are produced via Docker with the --follow (-f) flag, for example:
docker logs -f node0
To interact with the testnet via WebSockets or RPC/API, you will send your request to the corresponding ports:
EVM JSON-RPC
Eth Websocket
8545
8546
You can send a curl command such as:
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' -H "Content-Type: application/json" 192.162.10.1:8545
Now you can start your local testnet using and docker-compose by running command below from root directory of clonedswisstronik-chain repo: