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.

Devtools Flow

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

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 on GitHub

starknet.js on NPM

starknet.js Book

starknet.js channel on Starknet Discord

SpaceShard

Starknet.py

starknet.js on GitHub

starknet.py on PyPi

starknet.py Docs

starknet.py on Telegram

Software Mansion

Starknet-rs

starknet-rs on GitHub

starknet-rs on Crates

starknet-rs Docs

starknet-rs on Telegram

Jonathan Lei

Starknet.go

starknet.go on GitHub

starknet.go Docs

starknet.go on Telegram

Nethermind

starknet-jvm

starknet-jvm on GitHub

starknet-jvm Docs

Software Mansion

starknet.swift

starknet.swift on GitHub

starknet.swift Docs

Software Mansion

starknet.dart

starknet.dart on GitHub

starknet.dart on Pub

starknet.dart Docs

starknet.dart on Telegram

Focustree

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.


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


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.

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

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


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.

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.

Get Starknet

Starknet wallet<>Dapp connection bridge. Easy discovery and UI for Starknet wallets.

Supporting popular Starknet browser wallets

  • ArgentX

  • Braavos

  • Metamask Snaps

  • OKx

Starknetkit

A Starknet wallet connection kit, built by Argent. Built using Starknet.js and starknet-react.

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.

Starknet Scaffold

An open-source, up-to-date toolkit for building decentralized applications (dapps) on Starknet. Move from prototyping to production-grade apps seamlessly.

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:

Entro

Analyze and Decode Starknet Transactions and events.

Features: * Get contract class history * Decode contract ABI * Decode transaction data * Backfill data for faster analysis

Links: