-
Navigate to the Contracts Directory 🔍
Ensure you are in the correct directory where the Cairo contracts are stored.
cd gostarkme/contracts
-
Setup your environment
-
Option #1: Install Scarb and Starknet Foundry using asdf (Only macOS)
-
Option #2: Install Scarb and Starknet Foundry using curl (Only macOS)
- Scarb v2.6.5 : here.
Place it in the path:
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -v 2.6.5
It is recommended to restart the terminal.export PATH="$HOME/.local/bin:$PATH"
- Scarb v2.6.5 : here.
-
Option #3: Install Scarb and Starknet Foundry (Only Ubuntu)
-
Scarb v2.6.5
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -v 2.6.5
Run at terminal:
code ~ /.bashrc
Place it at the end of the path/code:
export PATH="$HOME/.local/bin:$PATH"
It is recommended to restart the terminal.
-
Starknet Foundry v0.27.0: here.
curl -L https://raw.githubusercontent.com/foundry-rs/starknet-foundry/master/scripts/install.sh | sh -s -- -v 0.27.0
Place it in the path (Option for macOS):
echo 'export PATH="$HOME/.asdf/shims:$HOME/.asdf/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="$HOME/.foundry/bin:$PATH"' >> ~/.zshrc
Place it in the path (Option for Ubuntu):
In the terminal: code ~ /.bashrc
Place it at the end of the path/code:
export PATH="$HOME/.asdf/shims:$HOME/.asdf/bin:$PATH"
export PATH="$HOME/.foundry/bin:$PATH"
-
-
Compile Go Stark Me Backend 🛠️
To build the contracts, run the command:
scarb build
-
Run Go Stark Me Unit Tests ✅
To run the unit tests for the contracts, run the following command:
scarb run test
or
snforge test
-
Run Code Formatter 📝
To format your contracts, simply run the command:
scarb fmt