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:
nile compile
This command creates the project directory structure and installs cairo-lang
, pytest
, and pytest-asyncio
for you.
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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cairo_nile-0.0.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a72a9e994d125977bb983545c4b64e75b9a67537e305814a400411c29e4bba3 |
|
MD5 | 397845b0fb657bb82b5812a8a52b4882 |
|
BLAKE2b-256 | 1440043bdc2a4f343fb929b9f6a7badbbfdfe5c11af568681e50c2eba51af45b |