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.
- Clone repository and
cd warp/
- Build docker containers:
docker-compose up
- Install javascript dependencies :
docker-compose exec warp yarn
- Compile the project:
docker-compose exec warp yarn build
- Build warplib:
docker-compose exec warp yarn warplib
- 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:
Clone this repo and change directory into the
warp
folder.Install the JavaScript dependencies:
yarn
- 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.
- Compile the project:
yarn build
- Compile Warp libraries
yarn warplib
- Test the installation worked by transpiling an example ERC20 contract:
bin/warp transpile exampleContracts/ERC20.sol