Home

Awesome

Quick Start

Ape compiler plugin around the Starknet Cairo language.

Dependencies

Requirements

# Install via quick installation script
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh

or

# Install via asdf version manager
asdf plugin add scarb
asdf install scarb latest
asdf global scarb latest

Installation

via pip

You can install the latest release via pip:

pip install ape-cairo

via setuptools

You can clone the repository and use setuptools for the most up-to-date version:

git clone https://github.com/ApeWorX/ape-cairo.git
cd ape-cairo
python3 setup.py install

Quick Usage

ape-cairo can compile Scarb projects that defines Scarb.toml file.

✿ Scarb Projects

Scarb binary is required to compile Scarb projects. Please add it to your $PATH if you have not done so.

Using the Compiler

In a project directory where there are .cairo files in your contracts/ directory, run the compile command:

ape compile

It should compile your Cairo contracts. You can find the compiled contract artifacts (Sierra/Casm) in the .build/ directory.

You can also get debug outputs by running the command with the -v DEBUG flag.

ape compile -v DEBUG

Examples

See the examples directory for examples.

Development

Please see the contributing guide to learn more how to contribute to this project. Comments, questions, criticisms and pull requests are welcomed.