StarkNet Project Template
This is an opinionated StarkNet project template. It is based around the Python's ecosystem and best practices.
toxto manage project tasksbrownieto build and test L1 contractscairo-langto build and test StarkNet contractsblackfor formatting Python filesisortfor sorting imports in Python and Cairo files
Getting Started
- Create a new virtual environment with
python -m venv venv - Activate the virtual environment with
source venv/bin/activate - Install the project and it's dependencies with
python -m pip install -e .[testing]. This will make the Cairo contracts available to other Cairo projects on your machine (as long as they share the same virtual environment).
Configuration
Configure brownie using .env, for example:
export WEB3_INFURA_PROJECT_ID=
export ETHERSCAN_TOKEN=
Commands
tox -av: list available commandstox: run teststox -e build: build smart contractstox -e lint: lint filestox -e format: automatically format files
Alternatives
I prefer dapptools to brownie for layer-1 development. In the future I will explore a template where I mix dapptools with nile.