Technical references

The Casperswap protocol consists of 2 repositories with smart contracts

  1. Casperswap core - Github repository

  2. Casperswap router - Github repository


You can install the required software by running the following commands. If you already have an up-to-date Casper node, you probably already have all of the prerequisites installed so you can skip this step.

# Update package repositories
sudo apt update

# Install the command-line JSON processor
sudo apt install jq -y

# Install rust
curl --proto '=https' --tlsv1.2 -sSf | sh

#Install the nightly version (by default stable toolchain is installed)
rustup install nightly

#Check that nightly toolchain version is installed (this will list stable and nightly versions)
rustup toolchain list

#Set rust nightly as default
rustup default nightly

# Install wasm32-unknown-unknown
rustup target add wasm32-unknown-unknown

#rust Version
rustup --version

#Install Cmake
 sudo apt-get -y install cmake

# Note:

#cmake Version
cmake --version

#Installing the Casper Crates
cargo install cargo-casper

# Add Casper repository
echo "deb" bionic main | sudo tee -a /etc/apt/sources.list.d/casper.list
curl -O
sudo apt-key add casper-repo-pubkey.ascr
sudo apt update

# Install the Casper client software
Install Casper-client

cargo +nightly install casper-client

# To check Casper Client Version
Casper-client --version

# Commands for help
casper-client --help

casper-client <command> --help

Creating Keys

# Create keys
casper-client keygen <TARGET DIRECTORY>

All Test Cases

Tests require that the CasperLabs-UniswapV2-core repository to be checked out into a sibling directory of CasperLabs-UniswapV2-router.

git clone
git clone

To build the contracts and run the tests, first navigate back to this directory and run:

make all

To run all the tests:

make test

To clean up:

make clean

Known contract hashes

Router contract has already being deployed. In order to interact with it you need to call it by its hash. The table below contains the contract hash (without the hash- prefix) for Router contract on public Casper networks:

NetworkAccount info contract hashContract owner



Casper Association

Last updated