Synapse is a interchain messaging protocol & bridge that allows for the creation of decentralized applications that can be deployed across multiple chains. This repo contains a variety of tools, interfaces and services that form the basis of, or are built on top of Synapse.
This repo serves as (or will serve) as the monrepo for all synapse code. Currently, only the liquidity/bridge contracts still need to be migrated.
Read through CONTRIBUTING.md for a general overview of our contribution process. Then check out our list of good first issues to find something fun to work on!
There are a variety of different packages in this repo, covered comprehensively in the Directory Structure section of this document. However, for ease of use to new contributors, a comprehensive list of user-facing components are listed below, along with their source code components.
- Synapse Interchain Network: An optimistic proof-of-stake interchain messaging network. Please see docs here
- Synapse Bridge: A cross-chain liquidity + canonical token bridge. Please see docs here
- Explorer: A bridge explorer that allows users to view on-chain data state about the bridge.
root ├── agents: agents contain all the agents used in optimistic messaging ├── charts: The helm charts used for deploying sanguine related services ├── contrib: Devops related tools │ ├── git-changes-action: Github action for identifying changes in dependent modules in a go workspace │ ├── promexporter: Multi-service prometheus exporter │ ├── release-copier-action: Github action for copying releases from one repo to another │ ├── terraform-provider-iap: Terraform provider used for bastion proxy tunneling │ ├── terraform-provider-helmproxy: Terraform provider that allows helm to be proxied through an iap bastion proxy │ ├── terraform-provider-kubeproxy: Terraform provider that allows kube to be proxied through an iap bastion proxy │ ├── tfcore: Terraform core utilities + iap utilities ├── core: The Go core library with common utilities for use across the monorepo ├── ethergo: Go-based ethereum testing + common library ├── packages │ ├── contracts-core: Core contracts used for synapse, powered by Foundry │ ├── coverage-aggregator: Javascript coverage aggregator based on nyc │ ├── docs: Docasaurus documentation. Note: this is not yet in use, and docs are still maintained on gitbook │ ├── explorer-ui: Explorer UI │ ├── sdk-router: SDK router │ ├── synapse-interface: Synapse frontend code ├── services │ ├── explorer: Bridge/messaging explorer backend │ ├── omnirpc: Latency aware RPC Client used across multiple-chains at once │ ├── scribe: Generalized ethereum event logger ├── tools │ ├── abigen: Used to generate abigen bindings for go │ ├── bundle: Modified version of go bundler with improved shadowing support │ ├── module copier: Used to copy internal modules and export methods for testing
Clone the repository, open it, and install nodejs packages with yarn
:
git clone https://github.com/synapsecns/sanguine --recurse-submodules -j10
cd sanguine
yarn install
Using nvm
, install the correct version of NodeJS.
nvm use
To build all of the TypeScript packages, run:
yarn clean
yarn build
Packages compiled when on one branch may not be compatible with packages on a different branch. You should recompile all packages whenever you move from one branch to another. Use the above commands to recompile the packages.
This repo make use of multiple submodules. To avoid issues when checking out different branches, you can use git submodule update --init --recursive
after switching to a branch or git checkout feat/branch-name --recurse-submodules
when switching branches.