OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Starknet Foundry

Starknet Foundry is an open-source Rust toolkit for developing Starknet smart contracts, with snforge for running Cairo tests and sncast for contract interaction, transaction submission and chain-data retrieval.

Independent OpenViST project profile, based on linked sources.

Starknet Foundry — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use snforge when developing or testing Cairo contracts; use sncast when the task involves interacting with Starknet contracts, submitting transactions or retrieving chain data.

Who it is for

  • Developers building or testing Starknet smart contracts in Cairo.
  • Developers who need command-line contract interaction or Starknet chain data.

Documented uses

  • Run Cairo contract tests, including fuzz tests and parallel test execution.
  • Exercise contracts with cheatcodes, multicall support or forked Starknet state.
  • Interact with Starknet contracts, submit transactions and retrieve chain data through a CLI.
Before you choose

Requirements & limits

The project is available as a public GitHub repository with an MIT license. It provides an installation manual and a Starknet Foundry Book.

  • The toolkit is written in Rust and based on a native Cairo test runner and Blockifier.
  • snforge and sncast cover different stages: testing versus contract interaction and chain operations.
  • The project roadmap lists transaction profiling, debugging utilities, coverage reports and L1–L2 messaging and cross-chain testing as unfinished items.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install Starknet Foundry on Linux or macOS with asdf

Install Starknet Foundry and verify its command-line tools are available.

Before you start

  • Linux or macOS
  • asdf installed
  • Scarb version 2.13.1 or newer installed
  • Rust version 1.80.1 or newer where required; the installation guide lists supported platforms where Rust installation is not required

Steps

  1. Add the Scarb plugin, install the latest Scarb version, and set it globally: asdf plugin add scarb, asdf install scarb latest, and asdf set --home scarb latest.

  2. Add the Starknet Foundry plugin, install its latest version, and set it globally: asdf plugin add starknet-foundry, asdf install starknet-foundry latest, and asdf set --home starknet-foundry latest.

  3. Verify the installation by running snforge --version or sncast --version.

Expected outcome

Starknet Foundry is installed, and its version can be checked using snforge or sncast.

Guide limitations

  • Windows installation is supported through WSL; the guide directs Windows users to follow the Linux and macOS instructions inside WSL.
  • The guide specifies minimum Scarb and Rust versions. Rust installation is only required for platforms outside the listed supported platform set.
Source-based practical guide

Configure Scarb to run Starknet Foundry tests

Set Scarb's test script to invoke the Starknet Foundry test runner.

Before you start

  • Starknet Foundry installed and available as snforge
  • A Scarb project with a Scarb.toml file

Steps

  1. Open the project's Scarb.toml.

  2. Add or update the [scripts] section so it contains test = "snforge test".

Expected outcome

The Scarb test script is configured to use snforge when running tests.

Guide limitations

  • Scarb does not use snforge for scarb test by default; the script configuration is required.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
10 October 2026
Original website title
foundry-rs/starknet-foundry · Official homepage title · retained in its source language