An open API service indexing awesome lists of open source software.

https://github.com/shramee/starklings-cairo1

An interactive tutorial to get you up and running with Cairo v1 and Starknet
https://github.com/shramee/starklings-cairo1

Last synced: 3 months ago
JSON representation

An interactive tutorial to get you up and running with Cairo v1 and Starknet

Awesome Lists containing this project

README

        









# STARKLINGS

![STARKLINGS](./.github/hero-banner.svg)

### An interactive tutorial to get you up and running with Cairo and Starknet

## Overview

Starklings is an interactive tutorial project designed to help you learn Cairo and Starknet development through practical exercises. The project consists of two main components:

### Starklings APP Readme APP

CLI-based interactive tutorial

### Starklings CLI Readme CLI

A web-based in browser Starklings experience

#### Both versions share the same core exercises and hints, with a single source of truth for all content.

## Contributing

Thanks for your interest in the project. You can fork the repo, create a branch with a descriptive name (maybe the issue number and a word or two to describe it) and submit a pull request.

### Testing

#### Cairo related tests

```
cargo test cairo
```

#### All tests

```
cargo test
```

#### App tests

_Coming soon_

### Adding new exercises

#### Here's what an exercise looks like,
1. An exercise is pretty much a single well commented Cairo file.
2. Exercises are organised into modules and are placed in `./exercises//.cairo`
3. Exercise accompanies some metadata describing it in `./info.toml`
4. When introducing a concept for the first time, try to start minimally.
5. Subsequent exercises for the same concept can grow in complexity.

#### Contributing with a new exercise
1. Add the exercise file in the `./exercises` directory.
2. Insert information about the exercise in `./info.toml` file. For example
```toml
[[exercises]]
name = "new_exercise"
path = "exercises/new_module/new_exercise.cairo"
mode = "test"
hint = """
Try the Harlem shake
"""
```
3. Run your exercise with `starklings run` as you write
```
cargo run -r --bin starklings run new_exercise
```
4. Check that the [tests](#testing) pass.
5. Send your PR!

### Updating Rust logic/Cairo version

1. [Test](#testing) your changes.
2. Make sure you have solutions to all the exercises in `./solutions` directory.
3. Run `cargo run -r --bin starklings compile_solutions` to confirm all exercise solutions still compile.
4. Make your pull request.