StarkNet Project Template

This is an opinionated StarkNet project template. It is based around the Python’s ecosystem and best practices.

  • tox to manage project tasks
  • brownie to build and test L1 contracts
  • cairo-lang to build and test StarkNet contracts
  • black for formatting Python files
  • isort for 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:

<div class="snippet-clipboard-content position-relative overflow-auto" data-snippet-clipboard-copy-content="export WEB3_INFURA_PROJECT_ID=
export ETHERSCAN_TOKEN=
“>

export WEB3_INFURA_PROJECT_ID=
   
    
export ETHERSCAN_TOKEN=