Skip to main content

StarkNet/Cairo development toolbelt

Project description

⛵ 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.14.tar.gz (9.1 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.14-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cairo-nile-0.0.14.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 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.14.tar.gz
Algorithm Hash digest
SHA256 d888eb17cb6af9ba67c48d398486d45b7c9147887448e9976e49dd7998990c87
MD5 d28345899fd52b5c2f85aac444150f70
BLAKE2b-256 acc5c8af1b55bab39e752d50b3c48ac346012c2a2001b4d783e75168043e0ed6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cairo_nile-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 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.14-py3-none-any.whl
Algorithm Hash digest
SHA256 62c45ddfeeaca7991e2c87b4a7459b3052c98401ac62f5b4563fd5c6981aa24c
MD5 4b8e2927387cc7ffd98e5f6bdb2aef3b
BLAKE2b-256 06ad99e96716c5115d6b05b693cbbe0a87c6af1bff67b2f1a89c61d165295e68

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