Skip to content

synapsecns/sanguine

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Synapse logo


GitHub GitHub commit activity (branch) GitHub pull requests Codecov Code Climate maintainability

Gitbook Discord Telegram X (formerly Twitter) Follow

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.

Contributing

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!

Projects

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
    • Contracts: The contracts used to power the synapse bridge.
    • Frontend: The frontend used to interact with the bridge.
    • SDK: The SDK used to interact with the bridge.
  • Explorer: A bridge explorer that allows users to view on-chain data state about the bridge.
    • Backend: The backend used to power the explorer.
    • Frontend: The frontend used to interact with the explorer.

Directory Structure

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

Setup

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

Install the Correct Version of NodeJS

Using nvm, install the correct version of NodeJS.

nvm use

Building the TypeScript packages

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.

Dealing with submodules

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.