- Published on
Quick Guide to Starknet Development Setup
Introduction
Install via Installation Script
Installing via the installation script is the quickest way to get Scarb up and running. This method works only on macOS and Linux.
- Open your terminal and run the following command:
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh
Follow the onscreen instructions. This command will install the latest stable release of Scarb.
- If you want to install a specific version of Scarb (such as a preview or nightly version), use the following command with the desired version number:
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -v 2.8.4
Verify Installation
Once the installation is complete, run the following command to check that everything was installed successfully:
$ scarb --version
scarb 2.8.0 (09590f5fc 2024-08-27)
cairo: 2.8.0 (https://crates.io/crates/cairo-lang-compiler/2.8.0)
sierra: 1.6.0
Setting Up Your Project
To begin your new project, follow these steps:
- Create an empty directory and navigate into it:
mkdir my_project/ && cd my_project/
- Initialize a new Scarb project by running:
scarb init
- After initialization, the contents of your my_project/ directory should look like this:
$ ls
Scarb.toml src
Conclusion
With these steps, you’re now ready to start developing smart contracts on Starknet! I hope this guide helps you streamline your setup process and focus on building innovative projects.
In the next article, I will guide you on how to write a basic smart contract, complete with practical examples.