starknet-foundry
developed by Software Mansion in collaboration with Foundry Foundation.
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:
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
Python 3.9.14
using the Python version management tool and activate that version
PYTHON_CONFIGURE_OPTS="--enable-shared"
python -V
poetry env use 3.9
poetry shell
pip install --upgrade pip
poetry install
CFLAGS=-I/opt/homebrew/opt/gmp/include LDFLAGS=-L/opt/homebrew/opt/gmp/lib poetry install
poetry run poe install_all_bindings
git config --global protocol.file.allow always
(needed for some tests to pass) poe test
poe build
dist/protostar/protostar
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
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).
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.
Run the following script to enable lint checks and automatic formatting before commit/push.
./scripts/apply_hooks.sh
Please read website/README.md.