Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 2.37 KB

README.md

File metadata and controls

60 lines (42 loc) · 2.37 KB

Snowbridge Parachain

Check Coverage Status

A Polkadot parachain for bridging arbitrary data from and to Ethereum.

Development

Follow these steps to prepare your local environment for Substrate development.

Requirements

Refer to the instructions at the Substrate Developer Hub.

To add context to the above instructions, the parachain is known to compile with the following versions of Rust:

  • stable: 1.58
  • nightly: 1.60.0-nightly

Build

Once the development environment is set up, build the parachain. This command will build the Wasm and native code:

Several runtimes can be built:

  • snowbase: Local development
  • snowblink: Staging & Kusama parachain
  • snowbridge: Polkadot parachain

To build with snowbase and snowblink runtimes (the default):

cargo build --release --features rococo-native

Configuration

Note: This section is not necessary for local development, as there are scripts to auto-configure the parachain.

For a fully operational chain, further configuration of the initial chain spec is required. The specific configuration will depend heavily on your environment, so this guide will remain high-level.

Build an initial spec for the snowbase runtime:

target/debug/snowbridge build-spec --chain snowbase --disable-default-bootnode > spec.json

Now edit the spec and configure the following:

  1. Recently finalized ethereum header and difficulty for the ethereum light client
  2. Contract addresses for the Ether, Erc20, and Dot apps.
  3. Authorized principal for the basic channel
  4. Fee and reward parameters for the incentivized channel

For an example configuration, consult the setup script for our local development stack. Specifically the start_polkadot_launch bash function.