Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
16 changes: 16 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Build contracts and check formatting
on:
push:
merge_group:
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.12.2"
- run: scarb build
- run: scarb fmt --check
- run: scarb lint
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test Contracts
on:
push:
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Starknet Foundry
uses: foundry-rs/setup-snfoundry@v3

- name: Setup Scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-lock: ../../Scarb.lock

- name: Run tests
run: scarb build && scarb run test
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
target
.snfoundry_cache/
snfoundry_trace/
coverage/
profile/
branch_structure.json
temp_auto_push.bat
temp_interactive_push.bat
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
starknet-foundry 0.48.1
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Cairo Bootcamp 5.0
This repository contains all the codes for Cairo Bootcamp 5.0

## Set up instructions
To set up this repository, you will need to install [Starkup](https://github.com/software-mansion/starkup).

StarkUp installs and setup the following packages in your machine:
- Scarb - the Cairo package manager
- Starknet Foundry - the Cairo and Starknet testing framework
- Universal Sierra Compiler - compiler for any ever-existing Sierra version
- Cairo Profiler - profiler for Cairo programming language & Starknet
- Cairo Coverage - utility for coverage reports generation for code written in Cairo programming language
- CairoLS - vscode extension


Run the following command to install StarkUp:
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.starkup.sh | sh
```

## Build and Test Contracts
To build and test the contracts, run the following commands

**Build contracts**
```bash
scarb build
```

**Run contract tests**
```bash
scarb run test
```

> `scarb run test` runs `snforge test` under the hood. So you can optionally use `snforge test` to test the contracts
22 changes: 11 additions & 11 deletions starknet_contracts/Scarb.lock → Scarb.lock
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Code generated by scarb DO NOT EDIT.
version = 1

[[package]]
name = "cairo_bootcamp_5"
version = "0.1.0"
dependencies = [
"snforge_std",
]

[[package]]
name = "snforge_scarb_plugin"
version = "0.43.1"
version = "0.48.1"
source = "registry+https://scarbs.xyz/"
checksum = "sha256:178e1e2081003ae5e40b5a8574654bed15acbd31cce651d4e74fe2f009bc0122"
checksum = "sha256:2dd27e8215eea8785b3930e9f452e11b429ca262b1c1fbb071bfc173b9ebc125"

[[package]]
name = "snforge_std"
version = "0.43.1"
version = "0.48.1"
source = "registry+https://scarbs.xyz/"
checksum = "sha256:17bc65b0abfb9b174784835df173f9c81c9ad39523dba760f30589ef53cf8bb5"
checksum = "sha256:89f759fa685d48ed0ba7152d2ac2eb168da08dfa8b84b2bee96e203dc5b2413e"
dependencies = [
"snforge_scarb_plugin",
]

[[package]]
name = "Starknet_contracts"
version = "0.1.0"
dependencies = [
"snforge_std",
]
12 changes: 6 additions & 6 deletions starknet_contracts/Scarb.toml → Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[package]
name = "Starknet_contracts"
name = "cairo_bootcamp_5"
version = "0.1.0"
edition = "2024_07"

# See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest.html

[dependencies]
Starknet = "2.11.4"
starknet = "2.12.2"

[dev-dependencies]
snforge_std = "0.43.1"
assert_macros = "2.11.4"
snforge_std = "0.48.1"
assert_macros = "2.12.2"

[[target.Starknet-contract]]
[[target.starknet-contract]]
sierra = true

[scripts]
Expand All @@ -21,7 +21,7 @@ test = "snforge test"
[tool.scarb]
allow-prebuilt-plugins = ["snforge_std"]

# Visit https://foundry-rs.github.io/Starknet-foundry/appendix/scarb-toml.html for more information
# Visit https://foundry-rs.github.io/starknet-foundry/appendix/scarb-toml.html for more information

# [tool.snforge] # Define `snforge` tool section
# exit_first = true # Stop tests execution immediately upon the first failure
Expand Down
1 change: 0 additions & 1 deletion cairo_deep_dive/.gitignore

This file was deleted.

43 changes: 0 additions & 43 deletions cairo_deep_dive/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions cairo_deep_dive/Scarb.lock

This file was deleted.

22 changes: 0 additions & 22 deletions cairo_deep_dive/Scarb.toml

This file was deleted.

40 changes: 0 additions & 40 deletions cairo_deep_dive/Tasks.md

This file was deleted.

Loading