Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

Commit b7d405f

Browse files
authored
Prepare release 2.9.2 (#282)
* fix(app): correct sidebar placement * fix(app): responsive content centering * fix(app): responsive content centering * Update issue templates, Close #273 close #273 * Feat: add logos (#278) * fix #276 * feat: updated logo * Feat: upgrade to `2.9.2` (#280) * chore: update 2.9.2 * chore: apply fmt * fix: hide AA for upcoming fixes * fix: github edit link * fix: starknet book deadlink * fix #279 * small improvement: increase footer bottom padding * fix #275 * fix: minor * fix: remove print from cairo_cheatsheet * Update verify_cairo_programs.yml
1 parent badf4db commit b7d405f

File tree

101 files changed

+904
-643
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+904
-643
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior
15+
16+
**Expected behavior**
17+
A clear and concise description of what you expected to happen.
18+
19+
**Screenshots**
20+
If applicable, add screenshots to help explain your problem.
21+
22+
**Checklist:**
23+
- Using the correct tooling versions, from https://github.com/NethermindEth/StarknetByExample/blob/dev/.tool-versions
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea of example or concept to showcase
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the concept/idea you would like to see**
11+
12+
**Is it a new example or a modification/extension of a current one**
13+
If you consider editing some content, explain exactly why and what.
14+
15+
**Additional context**
16+
Add any other context or screenshots about the request here.

.github/workflows/verify_cairo_programs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Verify Cairo programs compilation
33
on:
44
pull_request:
55
branches:
6-
- main
6+
- dev
77
workflow_dispatch:
88

99
jobs:

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
scarb 2.8.2
2-
starknet-foundry 0.30.0
1+
scarb 2.9.2
2+
starknet-foundry 0.35.0

Scarb.lock

Lines changed: 50 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -128,105 +128,126 @@ dependencies = [
128128

129129
[[package]]
130130
name = "openzeppelin"
131-
version = "0.16.0"
131+
version = "0.20.0"
132132
source = "registry+https://scarbs.xyz/"
133-
checksum = "sha256:5dc87a71f0f5d045e02e5bc5ea7a9b0360bbbc3f388b846006280d266feac192"
133+
checksum = "sha256:05fd9365be85a4a3e878135d5c52229f760b3861ce4ed314cb1e75b178b553da"
134134
dependencies = [
135+
"openzeppelin_access",
136+
"openzeppelin_account",
137+
"openzeppelin_finance",
138+
"openzeppelin_governance",
139+
"openzeppelin_introspection",
135140
"openzeppelin_merkle_tree",
136141
"openzeppelin_presets",
137142
"openzeppelin_security",
138143
"openzeppelin_token",
139144
"openzeppelin_upgrades",
145+
"openzeppelin_utils",
140146
]
141147

142148
[[package]]
143149
name = "openzeppelin_access"
144-
version = "0.16.0"
150+
version = "0.20.0"
145151
source = "registry+https://scarbs.xyz/"
146-
checksum = "sha256:b9139449e53d715992b2d9e887c0c723d886419bee7ceb5561648c70bd6d3174"
152+
checksum = "sha256:7734901a0ca7a7065e69416fea615dd1dc586c8dc9e76c032f25ee62e8b2a06c"
147153
dependencies = [
148154
"openzeppelin_introspection",
149-
"openzeppelin_utils",
150155
]
151156

152157
[[package]]
153158
name = "openzeppelin_account"
154-
version = "0.16.0"
159+
version = "0.20.0"
155160
source = "registry+https://scarbs.xyz/"
156-
checksum = "sha256:841bb881adbe98b64fee1dc1329f6e3fbabdfbd9fa65c66ffb54c55f13764bce"
161+
checksum = "sha256:1aa3a71e2f40f66f98d96aa9bf9f361f53db0fd20fa83ef7df04426a3c3a926a"
157162
dependencies = [
158163
"openzeppelin_introspection",
159164
"openzeppelin_utils",
160165
]
161166

167+
[[package]]
168+
name = "openzeppelin_finance"
169+
version = "0.20.0"
170+
source = "registry+https://scarbs.xyz/"
171+
checksum = "sha256:f0c507fbff955e4180ea3fa17949c0ff85518c40101f4948948d9d9a74143d6c"
172+
dependencies = [
173+
"openzeppelin_access",
174+
"openzeppelin_token",
175+
]
176+
162177
[[package]]
163178
name = "openzeppelin_governance"
164-
version = "0.16.0"
179+
version = "0.20.0"
165180
source = "registry+https://scarbs.xyz/"
166-
checksum = "sha256:a9d9c983cfd4369e7bbb69433fb264edf376805ed873b1f70a287825a6bd1eaf"
181+
checksum = "sha256:c0fb60fad716413d537fabd5fcbb2c499ca6beb95af5f0d1699955ecec4c6f63"
167182
dependencies = [
168183
"openzeppelin_access",
184+
"openzeppelin_account",
169185
"openzeppelin_introspection",
186+
"openzeppelin_token",
187+
"openzeppelin_utils",
170188
]
171189

172190
[[package]]
173191
name = "openzeppelin_introspection"
174-
version = "0.16.0"
192+
version = "0.20.0"
175193
source = "registry+https://scarbs.xyz/"
176-
checksum = "sha256:312bc2e531f036480ad7392dbb31042c38d875ef9dbb5578ea8de5c05e35b7d8"
194+
checksum = "sha256:13e04a2190684e6804229a77a6c56de7d033db8b9ef519e5e8dee400a70d8a3d"
177195

178196
[[package]]
179197
name = "openzeppelin_merkle_tree"
180-
version = "0.16.0"
198+
version = "0.20.0"
181199
source = "registry+https://scarbs.xyz/"
182-
checksum = "sha256:8e264c8d5f0591262a235a445b8ca78dd5580c251707b218b829b6b4d6f84a34"
200+
checksum = "sha256:039608900e92f3dcf479bf53a49a1fd76452acd97eb86e390d1eb92cacdaf3af"
183201

184202
[[package]]
185203
name = "openzeppelin_presets"
186-
version = "0.16.0"
204+
version = "0.20.0"
187205
source = "registry+https://scarbs.xyz/"
188-
checksum = "sha256:7bc9db7563e434535ebd06c7598ba0f8494e791c5f80401389b356a3ebd65a08"
206+
checksum = "sha256:5c07a8de32e5d9abe33988c7927eaa8b5f83bc29dc77302d9c8c44c898611042"
189207
dependencies = [
190208
"openzeppelin_access",
191209
"openzeppelin_account",
210+
"openzeppelin_finance",
192211
"openzeppelin_introspection",
193212
"openzeppelin_token",
194213
"openzeppelin_upgrades",
214+
"openzeppelin_utils",
195215
]
196216

197217
[[package]]
198218
name = "openzeppelin_security"
199-
version = "0.16.0"
219+
version = "0.20.0"
200220
source = "registry+https://scarbs.xyz/"
201-
checksum = "sha256:b7497f5e55c6d9f1d7606ad0d12719e3c04765e266fb91fb72740e0af41d03f3"
221+
checksum = "sha256:27155597019ecf971c48d7bfb07fa58cdc146d5297745570071732abca17f19f"
202222

203223
[[package]]
204224
name = "openzeppelin_token"
205-
version = "0.16.0"
225+
version = "0.20.0"
206226
source = "registry+https://scarbs.xyz/"
207-
checksum = "sha256:7074c23fbc300b3cccff1037264dfdbe976fb11ae42ce687f4a8ce469adc552a"
227+
checksum = "sha256:4452f449dc6c1ea97cf69d1d9182749abd40e85bd826cd79652c06a627eafd91"
208228
dependencies = [
229+
"openzeppelin_access",
209230
"openzeppelin_account",
210-
"openzeppelin_governance",
211231
"openzeppelin_introspection",
232+
"openzeppelin_utils",
212233
]
213234

214235
[[package]]
215236
name = "openzeppelin_upgrades"
216-
version = "0.16.0"
237+
version = "0.20.0"
217238
source = "registry+https://scarbs.xyz/"
218-
checksum = "sha256:4de95a7fb8955e63711f34bb954676f6cef127b44b570c0535d7781297821b44"
239+
checksum = "sha256:15fdd63f6b50a0fda7b3f8f434120aaf7637bcdfe6fd8d275ad57343d5ede5e1"
219240

220241
[[package]]
221242
name = "openzeppelin_utils"
222-
version = "0.16.0"
243+
version = "0.20.0"
223244
source = "registry+https://scarbs.xyz/"
224-
checksum = "sha256:a494aeb5f1371db7f22e922196aa41d1d1698877a766a838350c0b6ffe49fda2"
245+
checksum = "sha256:44f32d242af1e43982decc49c563e613a9b67ade552f5c3d5cde504e92f74607"
225246

226247
[[package]]
227248
name = "pragma_lib"
228249
version = "1.0.0"
229-
source = "git+https://github.com/astraly-labs/pragma-lib#86d7ccdc15b349b8b48d9796fc8464c947bea6e1"
250+
source = "git+https://github.com/astraly-labs/pragma-lib?tag=2.9.1#ee1f3f7e9276cf64e19e267832de380d84c04d28"
230251

231252
[[package]]
232253
name = "simple_account"
@@ -248,15 +269,15 @@ dependencies = [
248269

249270
[[package]]
250271
name = "snforge_scarb_plugin"
251-
version = "0.2.0"
272+
version = "0.35.0"
252273
source = "registry+https://scarbs.xyz/"
253-
checksum = "sha256:2e4ce3ebe3f49548bd26908391b5d78537a765d827df0d96c32aeb88941d0d67"
274+
checksum = "sha256:20bd6a488fda7201ce2a5fd680d8e715b10e3545147b276747ad079c96c3d5d2"
254275

255276
[[package]]
256277
name = "snforge_std"
257-
version = "0.30.0"
278+
version = "0.35.0"
258279
source = "registry+https://scarbs.xyz/"
259-
checksum = "sha256:2f3c4846881813ac0f5d1460981249c9f5e2a6831e752beedf9b70975495b4ec"
280+
checksum = "sha256:fe4e1b1526c815441183baed7f93e73bc76a6393d23e1f9c34fbe227bfaedfd6"
260281
dependencies = [
261282
"snforge_scarb_plugin",
262283
]

Scarb.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ test = "$(git rev-parse --show-toplevel)/scripts/test_resolver.sh"
1212
[workspace.tool.snforge]
1313

1414
[workspace.dependencies]
15-
starknet = "2.8.2"
16-
cairo_test = "2.8.2"
17-
assert_macros = "2.8.2"
18-
snforge_std = "0.30.0"
19-
openzeppelin = "0.16.0"
15+
starknet = "2.9.2"
16+
cairo_test = "2.9.2"
17+
assert_macros = "2.9.2"
18+
snforge_std = "0.35.0"
19+
openzeppelin = "0.20.0"
2020
components = { path = "listings/applications/components" }
21-
pragma_lib = { git = "https://github.com/astraly-labs/pragma-lib" }
21+
pragma_lib = { git = "https://github.com/astraly-labs/pragma-lib", tag = "2.9.1" }
2222

2323
[workspace.package]
2424
description = "Collection of examples of how to use the Cairo programming language to create smart contracts on Starknet."

components/ThemeImage.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { useEffect, useState } from "react";
2+
import { useTheme } from "./useTheme";
3+
4+
export const ThemeImage = ({
5+
light,
6+
dark,
7+
alt,
8+
...props
9+
}: {
10+
light: string;
11+
dark: string;
12+
alt: string;
13+
[key: string]: any;
14+
}) => {
15+
const [mounted, setMounted] = useState(false);
16+
const theme = useTheme();
17+
18+
useEffect(() => {
19+
setMounted(true);
20+
}, []);
21+
if (!mounted) {
22+
return <img src={light} alt={alt} {...props} />;
23+
}
24+
25+
// Client-side rendering after hydrating
26+
return <img src={theme === "light" ? light : dark} alt={alt} {...props} />;
27+
};

components/useTheme.tsx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { useEffect, useState } from "react";
2+
3+
export function useTheme() {
4+
const [theme, setTheme] = useState<"dark" | "light">(() => {
5+
if (typeof window === "undefined") return "light";
6+
return document.documentElement.classList.contains("dark")
7+
? "dark"
8+
: "light";
9+
});
10+
11+
useEffect(() => {
12+
const handleThemeChange = () => {
13+
const newTheme = document.documentElement.classList.contains("dark")
14+
? "dark"
15+
: "light";
16+
setTheme(newTheme);
17+
};
18+
19+
// Watch for class changes on documentElement
20+
const observer = new MutationObserver(handleThemeChange);
21+
observer.observe(document.documentElement, {
22+
attributes: true,
23+
attributeFilter: ["class"],
24+
});
25+
26+
return () => {
27+
observer.disconnect();
28+
};
29+
}, []);
30+
31+
return theme;
32+
}

footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default function Footer() {
22
return (
3-
<div className="flex flex-col items-center pb-2 gap-2 opacity-50 hover:opacity-70 transition-opacity duration-500 ease-in-out">
3+
<div className="flex flex-col items-center pb-4 gap-2 opacity-50 hover:opacity-70 transition-opacity duration-500 ease-in-out">
44
<img
55
className="w-40"
66
src="/collaborators/PoweredByNethermind.svg"

listings/advanced-concepts/commit_reveal/src/commit_reveal.cairo

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ pub mod CommitmentRevealTraits {
3232

3333
#[cfg(test)]
3434
mod tests {
35-
use starknet::SyscallResultTrait;
3635
use super::{
3736
CommitmentRevealTraits, ICommitmentRevealTraitDispatcher,
38-
ICommitmentRevealTraitDispatcherTrait
37+
ICommitmentRevealTraitDispatcherTrait,
3938
};
4039

4140
use core::hash::HashStateTrait;
@@ -44,9 +43,9 @@ mod tests {
4443

4544
fn deploy() -> ICommitmentRevealTraitDispatcher {
4645
let (contract_address, _) = deploy_syscall(
47-
CommitmentRevealTraits::TEST_CLASS_HASH.try_into().unwrap(), 0, array![].span(), false
46+
CommitmentRevealTraits::TEST_CLASS_HASH.try_into().unwrap(), 0, array![].span(), false,
4847
)
49-
.unwrap_syscall();
48+
.unwrap();
5049
ICommitmentRevealTraitDispatcher { contract_address }
5150
}
5251

0 commit comments

Comments
 (0)