Skip to main content

Setuping development environment

Development environment may be setup manually or via docker-compose.

Docker​

Note: Executing Warp using Docker works only for x86 architecture. If you're using ARM architecture (such as Apple's M1) you can find manual installation instructions below.

  1. Clone repository and cd warp/
  2. Build docker containers:
docker-compose up
  1. Install javascript dependencies :
docker-compose exec warp yarn
  1. Compile the project:
docker-compose exec warp yarn build
  1. Build warplib:
docker-compose exec warp yarn warplib
  1. Test the installation worked by transpiling an example ERC20 contract:
bin/warp transpile exampleContracts/ERC20.sol

Manually​

First, please make sure you have all the required external dependencies installed.

Then, with a Python3.9 virtual environment activated, perform the following instructions:

  1. Clone this repo and change directory into the warp folder.

  2. Install the JavaScript dependencies:

yarn
  1. Install the Python dependencies:
pip install -r requirements.txt

If you are using a M1 chipped Mac and getting a 'gmp.h' file not found error when installing Cairo run the following:

CFLAGS=-I`brew --prefix gmp`/include LDFLAGS=-L`brew --prefix gmp`/lib pip install ecdsa fastecdsa sympy

Then run the pip command above again.

  1. Compile the project:
yarn build
  1. Compile Warp libraries
yarn warplib
  1. Test the installation worked by transpiling an example ERC20 contract:
bin/warp transpile exampleContracts/ERC20.sol