Starknet developer tools
Cairo is a turing complete language for writing provable programs. It is also the language used for writing smart contracts for Starknet. Starknet uses a different model than the Ethereum Virtual Machine (EVM), and as such, requires specialized tools for development.
This list of tools is dynamic and is being updated as more tools are added. If a tool you are using is missing, please consider editing this page and creating a Pull Request. |
Command-line tools
starkli
Starkli is a fast command-line interface for interacting with the Starknet network. It supports fetching data from the Starknet network, deploying accounts, and interacting with contracts. Developed by Jonathan Lei. Starkli also includes useful utilities for developers, such as:
-
Compute class hashes from the Cairo file that defines the class.
-
Compute a function’s selector.
-
Encode messages.
-
Deploying new accounts or fetching existing accounts
-
Submitting multi-calls to your account
Relevant links
-
GitHub: starkli on GitHub
-
Documentation: Starkli Book
-
Starkli: The New Starknet CLI, on Medium, includes information on getting started, including installation instructions.
sncast
Starknet Cast, part of the Starknet Foundry suite, is a command line tool for interacting with the Starknet network, with deep integration with Starknet Foundry projects.
Starknet SDKs
A Software Development Kit (SDK) is a library that abstracts the complexities of Starknet when building transactions and interacting with the blockchain, including the following:
-
Read the chain state.
-
Account creation and management.
-
Cryptography: signature verification and signing, computing hashes used by Starknet.
-
Contract declaration and deployment.
-
Contract interactions: ABI import, constructing transactions.
SDKs implement the Starknet JSON RPC specification, and are updated to support the latest API changes. There are SDKs for various languages, so you can choose the SDK according to your needs.
SDK name | Github | Package | Docs | Support | Maintainer |
---|---|---|---|---|---|
Starknet.js |
starknet.js channel on Starknet Discord |
||||
Starknet.py |
|||||
Starknet-rs |
|||||
Starknet.go |
|||||
starknet-jvm |
|||||
starknet.swift |
|||||
starknet.dart |
Smart Contract Development
The following tools are the recommended tools for developing Starknet smart contracts. These cover compilation, package management, testing and deployment.
Scarb: The Cairo package manager
Scarb is a package manager for Cairo, but it is much more than that. It is the easiest and recommended way to build and maintain Cairo code. Think Cargo for Rust. Scarb is developed by Software Mansion.
Scarb includes the following features:
-
Initiating a new Cairo project.
-
Compiling Cairo projects.
-
Adding and removing Cairo dependencies.
-
Generating Cairo documentation.
-
Fetching and uploading packages Scarbs.xyz, the Cairo Registry.
-
Integration with the Cairo Language Server
-
It integrates with other tools in the Cairo ecosystem, such as Starknet Foundry and the Dojo gaming engine.
Relevant links
-
GitHub: Scarb on GitHub
-
Documentation: Scarb Docs
-
Support: Scarb on Telegram
-
Cairo Registry: scarbs.xyz
Starknet Foundry
Starknet Foundry is the go-to toolchain for developing Starknet smart contracts. Similarly to its EVM counterpart, Starknet Foundry supports a plethora of features focused on testing Cairo smart contracts for Starknet.
Starknet Forge, and snforge_std
allow the use of "cheatcodes" to test various aspects of the contracts.
For example:
-
Setting caller address
-
Manipulating the timestamp and block number
-
Forking the chain at a specific block and testing with that state
-
Fuzz testing
-
Getting accurate gas and resource reports
-
Profiling
Starknet Cast is a command line tool for interacting with the Starknet network, with deep integration with Starknet Foundry projects.
With sncast
it is possible to:
-
Declare and deploy contracts
-
Read from Starknet contracts
-
Deploy accounts
-
Interact with contracts
Relevant links
-
GitHub: starknet-foundry on GitHub
-
Documentation: starknet-foundry Docs
-
Support: Starknet Foundry Support on Telegram
The Starknet Remix plugin
Remix is a browser-based integrated development environment (IDE) for Ethereum that you can use for learning, experimenting and finding vulnerabilities in smart contracts, without installing anything. The Starknet Remix plugin lets you use Remix for testing Starknet smart contracts, so you can focus on learning Cairo and Starknet in the comfort of your browser.
Remix and the Starknet Remix plugin include the following features:
-
Integrated compiling.
-
You can deploy contracts to testnet, mainnet and the plugin’s own integrated devnet.
-
You can call functions of contracts that you have already deployed, to facilitate testing and interaction.
-
The Starknet Remix Plugin is integrated with Starknet By Example, a rich repository of practical learning content.
Relevant links
Remix Project: Remix Project site.
The Visual Studio Code Cairo extension
An extension for the Microsoft VSCode IDE that provides assistance when writing Cairo smart contracts, by using the Cairo Language Server. It integrates with Scarb, and works best when Scarb is installed via asdf
.
Features include:
-
Live diagnostic highlighting for compile errors
-
Quick fixes with suggestions
-
Go to definition
-
Code formatting
-
Code completion for imports
Relevant links
Local Development nodes
A Starknet devnet is a local node Starknet node implementations, aimed for testing and development. A devnet behaves just like a real Starknet node, but everything is executed locally. This enables much faster and more private development of Starknet applications.
starknet-devnet-rs
starknet-devnet-rs can is a Rust implementation of a local Starknet node. Developed by SpaceShard.
With starknet-devnet-rs includes many featured tailored for testing and development, which are not present on testnet/mainnet. Some of the features include:
-
Pre-deployed and pre-funded accounts
-
Forking the chain at a specific block.
-
Dumping current state (and loading in future runs)
-
Impersonating account
-
Mock L1<>L2 communication
Relevant links
-
GitHub: starknet-devnet-rs on GitHub
-
Crates: starknet-devnet-rs on Crates
-
Documentation: starknet-devnet-rs Docs
-
Support: devnet channel on Starknet Discord
Katana
Katana, developed by the Dojo team, is an extremely fast devnet designed to support local development with Dojo, which is a gaming engine for Starknet. You can use Katana as a general purpose devnet as well.
Relevant links
-
GitHub: Dojo Engine on GitHub
-
Documentation: Katana Docs
Libraries for Dapps
Starknet React
Starknet React is a collection of React hooks for Starknet. It is inspired by wagmi, powered by starknet.js. Developed by Apibara.
Relevant links
-
GitHub: starknet-react on GitHub
-
Package: starknet-react on NPM
-
Documentation: Starknet-React Docs
-
Beta Version Documentation: Starknet-React V3 Docs
Get Starknet
Starknet wallet<>Dapp connection bridge. Easy discovery and UI for Starknet wallets.
Supporting popular Starknet browser wallets
-
ArgentX
-
Braavos
-
Metamask Snaps
-
OKx
Relevant links
-
GitHub: get-starknet on GitHub
-
Package: get-starknet on NPM
Starknetkit
A Starknet wallet connection kit, built by Argent. Built using Starknet.js and starknet-react.
Relevant links
-
Website: strknetkit website
-
Docs: starknetkit Docs
-
GitHub: starknetkit on GitHub
Dapp Frameworks
Scaffold-Stark
Built using NextJS, Starknet.js, Scarb, Starknet-React, Starknet Foundry and Typescript. Designed to make it easier for developers to create, deploy and interact with smart contracts.
Relevant links
-
Website: Scaffold-Stark website
-
Docs: Scaffold-Stark Docs
-
GitHub: starknetkit on GitHub
Starknet Scaffold
An open-source, up-to-date toolkit for building decentralized applications (dapps) on Starknet. Move from prototyping to production-grade apps seamlessly.
Relevant links
-
Website: Starknet-Scaffold website
-
Docs: Starknet-Scaffold Docs
-
GitHub: Starknet-Scaffold on GitHub
Utilities
While not under any specific category, these tools can be helpful in various stages of development.
Universal Sierra Compiler
While Scarb compiles full projects, and produces both Sierra and CASM files, it is often needed to only compile a single Sierra file to CASM (for example, when getting a class from Starknet mainnet). The Universal Sierra Compiler supports all sierra versions, and can compile the the a CASM file.
The USC comes bundled with Starknet Foundry and does not need to be installed separately if Starknet Foundry is installed. |
Links:
RPC Request Builder
The Starknet RPC Request Builder is a useful tool to generate RPC queries for Starknet, with support for basic example for JavaScript, Go and Rust.
Links:
Open Zeppelin Contract Wizard
The Open Zeppelin Contract Wizard is a tool that helps you create smart contracts with Open Zeppelin libraries. Easily toggle on and off features for popular smart contract patterns, and the wizard will generate the code for you.
Links:
Cairo Profiler
Cairo-profiler can be used to create profiles of Cairo executions from execution traces. These can be analyzed and displayed to show Flame Graphs, and other useful information.
Cairo-profiler is currently integrated into Starknet Foundry, but can be used as a standalone tool. |
Links:
Cairo Playground
If want to dive deep into the Cairo VM, and experiment writing Cairo online, and don’t want to deploy a smart contract on Starknet, the Cairo Playground is a great way to do so.
Links:
Starknet Devnet JS
A JavaScript package, abstracting the Starknet Devnet API, making it easier to interact with starknet-devnet-rs. This simplifies writing end-to-end tests using Devnet, including tests for L1<>L2 communications.
Notable features: * Spawn a new Devnet instance without installing it * Wrapping RPC calls to Devnet * Abstracting complex L1<>L2 communication setup with a local L1 node (e.g. Anvil)
Links:
Security and Analysis tools
Sierra Analyzer
Sierra-Analyzer is a security toolkit for analyzing Sierra files, developed by FuzzingLabs.
Supported featrued include:
-
Decompile a Sierra file
-
Print the contracts Control Flow Graph
-
Run Static Analysis detectors
Links: