Skip to content

Latest commit

 

History

History
109 lines (90 loc) · 3.09 KB

SET_UP.md

File metadata and controls

109 lines (90 loc) · 3.09 KB

Go Stark Me - Backend Setup 💻

Steps to Run the Backend 🥳

  1. Navigate to the Contracts Directory 🔍

    Ensure you are in the correct directory where the Cairo contracts are stored.

    cd gostarkme/contracts
  2. Setup your environment

  • Option #1: Install Scarb and Starknet Foundry using asdf (Only macOS)

    • Scarb v2.6.5 : here.
      asdf install scarb 2.6.5
      asdf global scarb 2.6.5
    • Starknet Foundry v0.27.0: here.
      asdf install starknet-foundry 0.27.0   
      asdf global starknet-foundry 0.27.0   
  • Option #2: Install Scarb and Starknet Foundry using curl (Only macOS)

    • Scarb v2.6.5 : here.
      curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -v 2.6.5
      Place it in the path:
      export PATH="$HOME/.local/bin:$PATH"
      It is recommended to restart the terminal.
  • 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"
  1. Compile Go Stark Me Backend 🛠️

    To build the contracts, run the command:

    scarb build
  2. Run Go Stark Me Unit Tests ✅

    To run the unit tests for the contracts, run the following command:

    scarb run test

    or

    snforge test
  3. Run Code Formatter 📝

    To format your contracts, simply run the command:

    scarb fmt

UML Diagram

UML Class Diagram