This is a fork of the Snowbridge project (docs below).
mainfollows and should always match themainbranch of the Snowbridge repo.solochainis the default branch, and the one with all the custom changes made for Snowbridge to work with a Substrate solochain instead of the BridgeHub parachain in Polkadot. PRs with new features and changes should be made to this branch.- There's a PR to track the diff between the
mainbranch and thesolochainbranch.
Snowbridge is a trustless bridge between Polkadot and Ethereum. For documentation, visit https://docs.snowbridge.network.
Found a security issue in Snowbridge? Please view our bug bounty programme to submit a finding.
The Snowbridge project lives in two repositories:
- Snowfork/polkadot-sdk: The Snowbridge parachain and pallets live in a fork of the polkadot-sdk. Changes are eventually contributed back to paritytech/polkadot-sdk
- Snowfork/snowbridge: The rest of the Snowbridge components, like contracts, off-chain relayer, end-to-end tests and test-net setup code.
Polkadot parachain and our pallets. See https://github.com/Snowfork/polkadot-sdk.
Ethereum contracts and unit tests. See contracts/README.md
Off-chain relayer services for relaying messages between Polkadot and Ethereum. See relayer/README.md
Scripts to provision a local testnet, running the above services to bridge between local deployments of Polkadot and Ethereum. See web/packages/test/README.md.
Integration tests for our local testnet. See smoketest/README.md.
We use the Nix package manager to provide a reproducible and maintainable developer environment.
After installing Nix, enable flakes:
mkdir -p ~/.config/nix
echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.confThen activate a developer shell in the root of our repo, where
flake.nix is located:
nix developAlso make sure to run this initialization script once:
scripts/init.shTo ensure your code editor (such as VS Code) can execute tools in the nix shell, startup your editor within the interactive shell.
Example for VS Code:
nix develop
code .The developer shell is bash by default. To preserve your existing shell:
nix develop --command $SHELLTo automatically enter the developer shell whenever you open the project, install
direnv and use the template .envrc:
cp .envrc.example .envrc
direnv allowSometimes we would like to upgrade rust toolchain. First update polkadot-sdk/rust-toolchain.toml as required and then
update flake.lock running
nix flake lock --update-input rust-overlayCheck the contents of all .envrc files.
Remove untracked files:
git clean -idxEnsure that the current Rust toolchain is the one selected in scripts/init.sh.
Ensure submodules are up-to-date:
git submodule updateCheck untracked files & directories:
git clean -ndx | awk '{print $3}'After removing node_modules directories (eg. with git clean above), clear the pnpm cache:
pnpm store pruneCheck Nix config in ~/.config/nix/nix.conf.
Run a pure developer shell (note that this removes access to your local tools):
nix develop -i --pure-evalThe security policy and procedures can be found in SECURITY.md.