Skip to main content

Installation

This section provides detailed instructions on how to install the Invariant protocol on Casper, including prerequisites and steps for setting up the development environment.

Prerequisites

Rust & Cargo

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

wasm-strip

sudo apt install wabt

Add WASM

rustup target add wasm32-unknown-unknown

cargo-odra

cargo install cargo-odra --locked

Build protocol

Clone repository

git clone git@github.com:invariant-labs/protocol-cspr.git

Build contract

cargo odra build -b casper

Run tests

Run command

# Run tests on MockVM
cargo odra test
# Run tests on Casper backend
cargo odra test -b casper

Build SDK

Build SDK with its associated dependencies

cd sdk
./build.sh

Run e2e tests

./tests.sh