• Stars
    star
    247
  • Rank 164,117 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Protostar is a toolchain for developing and testing Starknet contracts

⚠️ WARNING ⚠️

This project is now considered legacy!

If you want to use Cairo 2.0 contracts, consider migrating to starknet-foundry developed by Software Mansion in collaboration with Foundry Foundation.
New features will not be added to this project.
https://github.com/foundry-rs/starknet-foundry

protostar-logo protostar-logo

Starknet smart contract development toolchain


Protostar helps with writing, deploying, and testing your smart contracts. It is loosely inspired by Foundry.

Protostar is actively developed 🔨 . 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 📄

Table of contents

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

  1. Install Python version management tool: pyenv or asdf
  2. Install Python 3.9.14 using 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"
  3. Clone this repository
  4. Verify the active Python version: python -V
  5. Install Poetry — a dependency manager
  6. Create Python virtual environment in the project directory: poetry env use 3.9
  7. Activate environment: poetry shell
  8. Upgrade pip: pip install --upgrade pip
  9. Install project dependencies: poetry install
    • MacBook M1/M2: CFLAGS=-I/opt/homebrew/opt/gmp/include LDFLAGS=-L/opt/homebrew/opt/gmp/lib poetry install
  10. Install bindings for the rust tools used by protostar:
  11. Patch the git's config by always allowing file transport: git config --global protocol.file.allow always (needed for some tests to pass)
  12. Verify the setup by running tests: poe test
  13. Build Protostar: poe build
    • You can find the newly created binary at dist/protostar/protostar

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.

More Repositories

1

react-native-reanimated

React Native's Animated library reimplemented
TypeScript
8,941
star
2

react-native-svg

SVG library for React Native, React Native Web, and plain React web projects.
Java
7,475
star
3

react-native-gesture-handler

Declarative API exposing platform native touch and gesture system to React Native.
TypeScript
6,090
star
4

react-native-screens

Native navigation primitives for your React Native app.
TypeScript
3,039
star
5

react-freeze

Prevent React component subtrees from rendering.
TypeScript
1,539
star
6

radon-ide

VSCode extension that turns your editor into a fully fledged IDE for React Native and Expo.
JavaScript
947
star
7

starknet.py

✨ 🐍 Python SDK for Starknet.
Python
259
star
8

scarb

The Cairo package manager
Rust
178
star
9

live-compositor

Media server for real-time, low latency, programmable video and audio mixing.
Rust
146
star
10

TypeGPU

TypeScript library that enhances the WebGPU API, allowing resource management in a type-safe, declarative way.
TypeScript
124
star
11

setup-ci

CLI to spin your CI/CD for react-native!
TypeScript
119
star
12

starknet-jvm

Starknet SDK for JVM languages (Java, Kotlin, Scala)
Kotlin
63
star
13

state-of-react-native

Repository for collaborating on the shape of the State of React Native surveys.
62
star
14

starknet.swift

Starknet SDK for Swift language
Swift
24
star
15

cairo-profiler

Profiler for Cairo programming language & Starknet
Rust
24
star
16

setup-scarb

Sets up Scarb in your GitHub Actions workflow.
JavaScript
19
star
17

docker-janus-gateway

Docker image of the Janus Gateway
Dockerfile
18
star
18

universal-sierra-compiler

Rust
15
star
19

asdf-scarb

Scarb plugin for the asdf version manager
Shell
7
star
20

cairo-coverage

Code coverage tool for cairo
Rust
6
star
21

scarb-nightlies

This repository stores nightly builds of Scarb, go to Releases to obtain them
3
star
22

software-mansion.github.io

2
star