Core Starknet devtools

Scarb

Scarb is much more than a package manager for Cairo: It is the easiest and most recommended way to build and maintain Cairo code. Developed by Software Mansion and inspired by Cargo for Rust, Scarb includes:

  • 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.

  • Integrating with the Cairo language server, as well as 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, which includes:

  • snforge, a command line interface that enables using of various "cheatcodes" for testing various aspects of the contracts, such as setting caller address, manipulating the timestamp and block number, forking the chain at a specific block, getting accurate gas and resource reports, profiling and more.

  • sncast, a command line interface with Starknet Foundry projects that enable to interact with Starknet with deep integration, including declaring, deploying, and interacting with contracts, deploying accounts, and more.

Starknet Devnet

Starknet Devnet, developed by SpaceShard, is a Rust implementation of a local Starknet node that includes many featured tailored for testing and development, which are not present on testnet or mainnet, including:

  • 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

Starknet Devnet JS is a JavaScript package that abstracts the Starknet Devnet API, making it easier to interact with it and write end-to-end tests for L1<>L2 communications.