Protostar
Protostar is a toolchain for developing and testing Starknet contracts
Install / Use
/learn @software-mansion/ProtostarREADME
<div align="center"> <img src="./readme/protostar-logo--light.svg#gh-light-mode-only" width=300 alt="protostar-logo" /> <img src="./readme/protostar-logo--dark.svg#gh-dark-mode-only" width=300 alt="protostar-logo" /> <h4>Starknet smart contract development toolchain</h4> </div>
Protostar helps with writing, deploying, and testing your smart contracts. It is loosely inspired by Foundry.
Protostar is actively developed :hammer: . We release every two weeks. Our roadmap is public, see what is coming soon!
Install with
curl -L https://raw.githubusercontent.com/software-mansion/protostar/master/install.sh | bash
Documentation :page_facing_up:
Table of contents <!-- omit in toc -->
Additional resources
Installation
To install Protostar, run:
curl -L https://raw.githubusercontent.com/software-mansion/protostar/master/install.sh | bash
If you want to specify a version, run the following command with the requested version:
curl -L https://raw.githubusercontent.com/software-mansion/protostar/master/install.sh | bash -s -- -v 0.3.2
Development
Setting up environment
- Install Python version management tool: pyenv or asdf
- Install
Python 3.9.14using the Python version management tool and activate that version- To be able to build Protostar, set the following environmental variable before installing Python:
PYTHON_CONFIGURE_OPTS="--enable-shared"
- To be able to build Protostar, set the following environmental variable before installing Python:
- Clone this repository
- Verify the active Python version:
python -V - Install Poetry — a dependency manager
- Create Python virtual environment in the project directory:
poetry env use 3.9 - Activate environment:
poetry shell - Upgrade pip:
pip install --upgrade pip - Install project dependencies:
poetry install- MacBook M1/M2:
CFLAGS=-I/opt/homebrew/opt/gmp/include LDFLAGS=-L/opt/homebrew/opt/gmp/lib poetry install
- MacBook M1/M2:
- Install bindings for the rust tools used by protostar:
- install rust
poetry run poe install_all_bindings
- Patch the git's config by always allowing file transport:
git config --global protocol.file.allow always(needed for some tests to pass) - Verify the setup by running tests:
poe test - Build Protostar:
poe build- You can find the newly created binary at
dist/protostar/protostar
- You can find the newly created binary at
Bumping cairo bindings version
To bump cairo bindings version to the latest commit on fork (master branch), run:
poetry run poe bump_cairo_bindings
After this, you can pull & rebuild your local version of bindings by running:
poetry run poe install_all_bindings
Caveats:
Remember to have your working tree clean, since it creates a commit on the current branch.
The command will check if the tracking branch is master, so you don't commit/push to master by accident (would be rejected by branch protection).
Submodules development
You can use submodules from a different branch than main. Run commands
git submodule set-branch --branch <your-branch>
poetry run poe install_all_bindings
Remember to not push those changes to the repository.
Git hooks
Run the following script to enable lint checks and automatic formatting before commit/push.
./scripts/apply_hooks.sh
Updating website/docs
Please read website/README.md.
Related Skills
gh-issues
334.5kFetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
node-connect
334.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
82.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Writing Hookify Rules
82.2kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
