Installation and Usage
Installationβ
Dependenciesβ
- Install command on macOS:
brew install z3 gmp
If you're on an arm based Apple machine (m1/m2 mac) you'll need to install gmp
and export some
environment variables
export CFLAGS=-I`brew --prefix gmp`/include
export LDFLAGS=-L`brew --prefix gmp`/lib
- Install command on Ubuntu:
sudo apt install libz3-dev libgmp3-dev
- Install Python3.9 with dev dependencies (
python3.9 python3.9-venv python3.9-dev
) into your base env. If you do not have the dev dependencies installed the installation will fail.
- Install commands on MacOS:
brew install python@3.9
With python3.9 already installed you have venv covered:
If you are using Python 3.3 or newer (...) venv is included in the Python standard library and requires no additional installation.
Then you can install dev package using pip:
pip install python-dev-tools
- Install commands on Ubuntu:
sudo apt install python3.9 python3.9-venv python3.9-dev
Or you can just install python3.9 and then install python-dev-tools using pip.
- Install Python dependencies. You can find them in requirements.txt file in repository:
https://github.com/NethermindEth/warp/blob/develop/requirements.txt. You can install them via
pip3.9 install <package-name>
command.
Note: It is important to install dependencies for Python 3.9, not for any other version of Python you may have installed on your machine.
Installationβ
The first step is to make sure you have all required external dependencies installed.
Then perform the following instructions in order:
- Add the warp package from npm.
yarn global add @nethermindeth/warp
- Ensure the package was added by checking the version number:
warp version
- Install the dependencies:
warp install --verbose
Use the --python
flag to pass the path to python3.9
binary, if the above command complains.
warp install --python <path/to/python3.9> --verbose
- Test the installation worked by transpiling an example ERC20 contract:
warp transpile <contract-path>