Skip to main content

StarkNet/Cairo development toolbelt

Project description

OpenZeppelin Nile ⛵

Navigate your StarkNet projects written in Cairo.

Getting started

Create a folder for your project and cd into it:

mkdir myproject
cd myproject

Create a virtualenv and activate it:

python3 -m venv env
source env/bin/activate

Install nile:

pip install cairo-nile

Use nile to quickly set up your development environment:

nile init
...
✨  Cairo successfully installed!
...
✅ Dependencies successfully installed
🗄  Creating project directory tree
⛵️ Nile project ready! Try running:

This command creates the project directory structure and installs cairo-lang, pytest, and pytest-asyncio for you. The template includes a makefile to build the project (make build) and run tests (make test).

Usage

compile

Compile Cairo contracts. Compilation articacts are written into the artifacts/ directory.

nile compile # compiles all contracts under contracts/
nile compile contracts/MyContract.cairo # compiles single contract

Example output:

$ nile compile
Creating artifacts/abis/ to store compilation artifacts
🤖 Compiling all Cairo contracts in the contracts/ directory
🔨 Compiling contracts/Account.cairo
🔨 Compiling contracts/Initializable.cairo
🔨 Compiling contracts/Ownable.cairo
✅ Done

clean

Deletes the artifacts/ directory for a fresh start ❄️

nile clean

install

Install the latest version of the Cairo language

nile install

version

Print out the Nile version

nile version

Hacking on Nile

Nile uses tox to manage development tasks, you can get a list of available task with tox -av.

  • Install a development version of the package with python -m pip install .
  • Run tests with tox
  • Build the package with tox -e build
  • Format all files with tox -e format
  • Check files formatting with tox -e lint

License

Nile is released under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cairo-nile-0.0.15.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cairo_nile-0.0.15-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file cairo-nile-0.0.15.tar.gz.

File metadata

  • Download URL: cairo-nile-0.0.15.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for cairo-nile-0.0.15.tar.gz
Algorithm Hash digest
SHA256 9a84cf06c42cc400a2c4ce0e72b6d1440f50702146c4f365b358c7dd0fa14d64
MD5 a7d4a2651764e574cce3e3fee681f117
BLAKE2b-256 44251696c6ad6d1f7b4f553aed0254e59295ff681afbe6faf4b7c91591837dcb

See more details on using hashes here.

File details

Details for the file cairo_nile-0.0.15-py3-none-any.whl.

File metadata

  • Download URL: cairo_nile-0.0.15-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for cairo_nile-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 d6643cf7eebcdbbb22c4634d920754db89e214fc8c1754102d84eae92813390e
MD5 c82301ac6a48241ab35679b47cec28bf
BLAKE2b-256 c8ac91dfbeabe848e57f60d2cc83d1afb5b4e34e481c1b14b44f61bbac23897f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page