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

Commit 05ca6b9

Browse files
authored
Merge pull request #162 from horuslabsio/feat/upgrade-scarb-to-2.9.2
Feat/upgrade scarb to 2.9.2
2 parents d0bc192 + 52c99e6 commit 05ca6b9

File tree

12 files changed

+78
-154
lines changed

12 files changed

+78
-154
lines changed

.github/workflows/build_contract.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
- uses: software-mansion/setup-scarb@v1
1414
with:
15-
scarb-version: "2.8.2"
15+
scarb-version: "2.9.2"
1616

1717
- name: Check cairo format
1818
run: cd contracts && scarb fmt --check

.github/workflows/test_contract.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111

1212
- uses: software-mansion/setup-scarb@v1
1313
with:
14-
scarb-version: "2.8.2"
14+
scarb-version: "2.9.2"
1515

1616
- uses: foundry-rs/setup-snfoundry@v3
1717
with:
18-
starknet-foundry-version: 0.31.0
18+
starknet-foundry-version: 0.36.0
1919

2020
- name: Run cairo tests
2121
run: cd contracts && snforge test

.tool-versions

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

contracts/.DS_Store

0 Bytes
Binary file not shown.

contracts/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
target
22
.snfoundry_cache/
3-
run
3+
run
4+
.DS_Store

contracts/Scarb.lock

Lines changed: 24 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -4,106 +4,67 @@ version = 1
44
[[package]]
55
name = "contracts"
66
version = "0.1.0"
7-
dependencies = [
8-
"openzeppelin",
9-
"snforge_std",
10-
]
11-
12-
[[package]]
13-
name = "openzeppelin"
14-
version = "0.15.0"
15-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
167
dependencies = [
178
"openzeppelin_access",
18-
"openzeppelin_account",
19-
"openzeppelin_governance",
20-
"openzeppelin_introspection",
21-
"openzeppelin_presets",
22-
"openzeppelin_security",
239
"openzeppelin_token",
24-
"openzeppelin_upgrades",
2510
"openzeppelin_utils",
11+
"snforge_std",
2612
]
2713

2814
[[package]]
2915
name = "openzeppelin_access"
30-
version = "0.15.0"
31-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
16+
version = "0.20.0"
17+
source = "registry+https://scarbs.xyz/"
18+
checksum = "sha256:7734901a0ca7a7065e69416fea615dd1dc586c8dc9e76c032f25ee62e8b2a06c"
3219
dependencies = [
3320
"openzeppelin_introspection",
34-
"openzeppelin_utils",
3521
]
3622

3723
[[package]]
3824
name = "openzeppelin_account"
39-
version = "0.15.0"
40-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
25+
version = "0.20.0"
26+
source = "registry+https://scarbs.xyz/"
27+
checksum = "sha256:1aa3a71e2f40f66f98d96aa9bf9f361f53db0fd20fa83ef7df04426a3c3a926a"
4128
dependencies = [
4229
"openzeppelin_introspection",
43-
"openzeppelin_token",
4430
"openzeppelin_utils",
4531
]
4632

47-
[[package]]
48-
name = "openzeppelin_governance"
49-
version = "0.15.0"
50-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
51-
dependencies = [
52-
"openzeppelin_access",
53-
"openzeppelin_introspection",
54-
]
55-
5633
[[package]]
5734
name = "openzeppelin_introspection"
58-
version = "0.15.0"
59-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
60-
61-
[[package]]
62-
name = "openzeppelin_presets"
63-
version = "0.15.0"
64-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
65-
dependencies = [
66-
"openzeppelin_access",
67-
"openzeppelin_account",
68-
"openzeppelin_introspection",
69-
"openzeppelin_token",
70-
"openzeppelin_upgrades",
71-
]
72-
73-
[[package]]
74-
name = "openzeppelin_security"
75-
version = "0.15.0"
76-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
35+
version = "0.20.0"
36+
source = "registry+https://scarbs.xyz/"
37+
checksum = "sha256:13e04a2190684e6804229a77a6c56de7d033db8b9ef519e5e8dee400a70d8a3d"
7738

7839
[[package]]
7940
name = "openzeppelin_token"
80-
version = "0.15.0"
81-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
41+
version = "0.20.0"
42+
source = "registry+https://scarbs.xyz/"
43+
checksum = "sha256:4452f449dc6c1ea97cf69d1d9182749abd40e85bd826cd79652c06a627eafd91"
8244
dependencies = [
45+
"openzeppelin_access",
8346
"openzeppelin_account",
84-
"openzeppelin_governance",
8547
"openzeppelin_introspection",
48+
"openzeppelin_utils",
8649
]
8750

88-
[[package]]
89-
name = "openzeppelin_upgrades"
90-
version = "0.15.0"
91-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
92-
9351
[[package]]
9452
name = "openzeppelin_utils"
95-
version = "0.15.0"
96-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
53+
version = "0.20.0"
54+
source = "registry+https://scarbs.xyz/"
55+
checksum = "sha256:44f32d242af1e43982decc49c563e613a9b67ade552f5c3d5cde504e92f74607"
9756

9857
[[package]]
9958
name = "snforge_scarb_plugin"
100-
version = "0.31.0"
101-
source = "git+https://github.com/foundry-rs/starknet-foundry?tag=v0.31.0#72ea785ca354e9e506de3e5d687da9fb2c1b3c67"
59+
version = "0.36.0"
60+
source = "registry+https://scarbs.xyz/"
61+
checksum = "sha256:b9550f5c921502be3e240e83aa9e2dc6ee63ae76bfecee082b7a15bead0460c0"
10262

10363
[[package]]
10464
name = "snforge_std"
105-
version = "0.31.0"
106-
source = "git+https://github.com/foundry-rs/starknet-foundry?tag=v0.31.0#72ea785ca354e9e506de3e5d687da9fb2c1b3c67"
65+
version = "0.36.0"
66+
source = "registry+https://scarbs.xyz/"
67+
checksum = "sha256:9f38c6c376447cfe225c5869905122f6a64bc301f5872c7855d2abe6e9c0a1da"
10768
dependencies = [
10869
"snforge_scarb_plugin",
10970
]

contracts/Scarb.toml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
[package]
22
name = "contracts"
33
version = "0.1.0"
4+
edition = "2023_11"
45

56
[dependencies]
6-
starknet = "2.8.2"
7-
snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry", tag = "v0.31.0" }
8-
openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.15.0" }
7+
starknet = "2.9.2"
8+
openzeppelin_access = "0.20.0"
9+
openzeppelin_token = "0.20.0"
10+
11+
[dev-dependencies]
12+
openzeppelin_utils = "0.20.0"
13+
snforge_std = "0.36.0"
914

1015
[[target.starknet-contract]]
1116
casm = true
1217
sierra = true
1318

1419
[tool.fmt]
15-
sort-module-level-items = false
20+
sort-module-level-items = true
1621

17-
[tool.snforge]
18-
exit_first = false
22+
[[tool.snforge.fork]]
23+
name = "SEPOLIA_LATEST"
24+
url = "https://starknet-sepolia.public.blastapi.io/rpc/v0_7"
25+
block_id.tag = "latest"

contracts/scripts/Scarb.lock

Lines changed: 20 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -12,103 +12,56 @@ dependencies = [
1212
[[package]]
1313
name = "contracts"
1414
version = "0.1.0"
15-
dependencies = [
16-
"openzeppelin",
17-
"snforge_std",
18-
]
19-
20-
[[package]]
21-
name = "openzeppelin"
22-
version = "0.15.0"
23-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
2415
dependencies = [
2516
"openzeppelin_access",
26-
"openzeppelin_account",
27-
"openzeppelin_governance",
28-
"openzeppelin_introspection",
29-
"openzeppelin_presets",
30-
"openzeppelin_security",
3117
"openzeppelin_token",
32-
"openzeppelin_upgrades",
33-
"openzeppelin_utils",
3418
]
3519

3620
[[package]]
3721
name = "openzeppelin_access"
38-
version = "0.15.0"
39-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
22+
version = "0.20.0"
23+
source = "registry+https://scarbs.xyz/"
24+
checksum = "sha256:7734901a0ca7a7065e69416fea615dd1dc586c8dc9e76c032f25ee62e8b2a06c"
4025
dependencies = [
4126
"openzeppelin_introspection",
42-
"openzeppelin_utils",
4327
]
4428

4529
[[package]]
4630
name = "openzeppelin_account"
47-
version = "0.15.0"
48-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
31+
version = "0.20.0"
32+
source = "registry+https://scarbs.xyz/"
33+
checksum = "sha256:1aa3a71e2f40f66f98d96aa9bf9f361f53db0fd20fa83ef7df04426a3c3a926a"
4934
dependencies = [
5035
"openzeppelin_introspection",
51-
"openzeppelin_token",
5236
"openzeppelin_utils",
5337
]
5438

55-
[[package]]
56-
name = "openzeppelin_governance"
57-
version = "0.15.0"
58-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
59-
dependencies = [
60-
"openzeppelin_access",
61-
"openzeppelin_introspection",
62-
]
63-
6439
[[package]]
6540
name = "openzeppelin_introspection"
66-
version = "0.15.0"
67-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
68-
69-
[[package]]
70-
name = "openzeppelin_presets"
71-
version = "0.15.0"
72-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
73-
dependencies = [
74-
"openzeppelin_access",
75-
"openzeppelin_account",
76-
"openzeppelin_introspection",
77-
"openzeppelin_token",
78-
"openzeppelin_upgrades",
79-
]
80-
81-
[[package]]
82-
name = "openzeppelin_security"
83-
version = "0.15.0"
84-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
41+
version = "0.20.0"
42+
source = "registry+https://scarbs.xyz/"
43+
checksum = "sha256:13e04a2190684e6804229a77a6c56de7d033db8b9ef519e5e8dee400a70d8a3d"
8544

8645
[[package]]
8746
name = "openzeppelin_token"
88-
version = "0.15.0"
89-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
47+
version = "0.20.0"
48+
source = "registry+https://scarbs.xyz/"
49+
checksum = "sha256:4452f449dc6c1ea97cf69d1d9182749abd40e85bd826cd79652c06a627eafd91"
9050
dependencies = [
51+
"openzeppelin_access",
9152
"openzeppelin_account",
92-
"openzeppelin_governance",
9353
"openzeppelin_introspection",
54+
"openzeppelin_utils",
9455
]
9556

96-
[[package]]
97-
name = "openzeppelin_upgrades"
98-
version = "0.15.0"
99-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
100-
10157
[[package]]
10258
name = "openzeppelin_utils"
103-
version = "0.15.0"
104-
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.0#f57642960f1c8cffafefb88bfff418eca8510634"
59+
version = "0.20.0"
60+
source = "registry+https://scarbs.xyz/"
61+
checksum = "sha256:44f32d242af1e43982decc49c563e613a9b67ade552f5c3d5cde504e92f74607"
10562

10663
[[package]]
10764
name = "sncast_std"
108-
version = "0.27.0"
109-
source = "git+https://github.com/foundry-rs/starknet-foundry?tag=v0.27.0#2d99b7c00678ef0363881ee0273550c44a9263de"
110-
111-
[[package]]
112-
name = "snforge_std"
113-
version = "0.27.0"
114-
source = "git+https://github.com/foundry-rs/starknet-foundry?tag=v0.27.0#2d99b7c00678ef0363881ee0273550c44a9263de"
65+
version = "0.36.0"
66+
source = "registry+https://scarbs.xyz/"
67+
checksum = "sha256:5012ac1b1dd4fe9c0b5c01c4f45f791edd5f217b5b3e54196d7d26848f802af1"

contracts/scripts/Scarb.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ edition = "2023_11"
66
# See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest.html
77

88
[dependencies]
9-
sncast_std = { git = "https://github.com/foundry-rs/starknet-foundry", tag = "v0.31.0" }
10-
starknet = "2.8.2"
9+
sncast_std = "0.36.0"
10+
starknet = "2.9.2"
1111
contracts = { path = "../" }
1212

1313
[lib]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"version": 1,
3+
"transactions": null
4+
}

0 commit comments

Comments
 (0)