Install Docker
https://docs.docker.com/get-docker/
docker compose down -v
Note: The -v
flag is important here to ensure that we clean up storage in between runs.
If you have a partial or complete existing run, it's recommended to shut down the whole stack (see Stop) before re-running it.
For convenience we have included a .env.secrets
file with example keys and other info. When starting the stack locally, make sure you source ./.env.secrets
.
To run the whole stack:
docker compose up -d
To additionally run an instance of the Executor Service (and a Redis server as dependency), you can use the executor-service
profile:
docker compose --profile executor-service up -d
- You need to add the
--profile
flag to all commands, e.g.docker compose --profile ... down
- Important: The Executor Service must run on the
host
network. As detailed in docker's documentation, thehost
networking driver only works on Linux. This means Mac/Windows users cannot use this flag and must run the Executor Service natively on the host.
The integration tests are located in the ./tests
directory (see README.md).
A few environment variables are editable from the .env
file found on the root of this repository.
TOPOS_EDGE_VERSION
:topos-protocol/polygon-edge
's versionTOPOS_VERSION
:topos-protocol/topos
's versionTOPOS_MESSAGING_PROTOCOL_CONTRACTS_VERSION
:toposware/topos-smart-contracts
's versionEXECUTOR_SERVICE_VERSION
:topos-protocol/executor-service
's versionTOPOS_CORE_CONTRACT_ADDRESS
:ToposCore
contract's address
Other (private) environment variables need be set in the environment (e.g., ~/.zshrc
, ~/.bashrc
):
PRIVATE_KEY
: ToposDeployer's private key (see here)—ToposDeployer is a account with funds on every subnetTOKEN_DEPLOYER_SALT
: salt for TokenDeployer's deployment (see here)TOPOS_CORE_SALT
: salt for ToposCore's deployment (see here)TOPOS_CORE_PROXY_SALT
: salt for ToposCoreProxy's deployment (see here)SUBNET_REGISTRATOR_SALT
: salt for SubnetRegistrator's deployment (see here)ERC20_MESSAGING_SALT
: salt for ERC20Messaging's deployment (see here)
To find the right ToposCore
contract address (to be passed as TOPOS_CORE_CONTRACT_ADDRESS
), you can:
- Run the whole stack once (see Run) with any or no address
- Run
docker logs -f contracts
and wait forToposCoreProxy
to be deployed - Set
ToposCoreProxy
's address found in the logs above asTOPOS_CORE_CONTRACT_ADDRESS
- Stop and Run the whole stack again!
- Website: https://toposware.com
- Technical Documentation: https://docs.toposware.com
- Medium: https://toposware.medium.com
- Whitepaper: Topos: A Secure, Trustless, and Decentralized Interoperability Protocol
This project is released under the terms of the MIT license.