Skip to content

Commit 27b8030

Browse files
authored
Add code comments for compatible Contracts versions (#331)
1 parent c62ae25 commit 27b8030

35 files changed

+230
-3
lines changed

packages/core-cairo/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.9.1 (2024-02-22)
4+
5+
- Add code comments for compatible OpenZeppelin Contracts for Cairo and Cairo lang versions. ([#331](https://github.com/OpenZeppelin/contracts-wizard/pull/331))
6+
37
## 0.9.0 (2024-02-12)
48

59
- **Breaking changes**:

packages/core-cairo/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openzeppelin/wizard-cairo",
3-
"version": "0.9.0",
3+
"version": "0.9.1",
44
"description": "A boilerplate generator to get started with OpenZeppelin Contracts for Cairo",
55
"license": "MIT",
66
"repository": "github:OpenZeppelin/contracts-wizard",
@@ -21,11 +21,13 @@
2121
"devDependencies": {
2222
"@types/bn.js": "^5.1.0",
2323
"@types/node": "^18.0.0",
24+
"@types/semver": "^7.5.7",
2425
"array.prototype.flat": "^1.2.4",
2526
"ava": "^5.0.0",
2627
"rimraf": "^5.0.0",
2728
"ts-node": "^10.4.0",
28-
"typescript": "^4.9.0"
29+
"typescript": "^4.9.0",
30+
"semver": "^7.6.0"
2931
},
3032
"dependencies": {
3133
"array.prototype.flatmap": "^1.2.4",

packages/core-cairo/src/contract.test.ts.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Generated by [AVA](https://avajs.dev).
99
> Snapshot 1
1010
1111
`// SPDX-License-Identifier: MIT␊
12+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
13+
// Cairo lang 2.5.3␊
1214
1315
#[starknet::contract]␊
1416
mod Foo {␊
@@ -23,6 +25,8 @@ Generated by [AVA](https://avajs.dev).
2325
> Snapshot 1
2426
2527
`// SPDX-License-Identifier: MIT␊
28+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
29+
// Cairo lang 2.5.3␊
2630
2731
#[starknet::contract]␊
2832
mod Foo {␊
@@ -42,6 +46,8 @@ Generated by [AVA](https://avajs.dev).
4246
> Snapshot 1
4347
4448
`// SPDX-License-Identifier: MIT␊
49+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
50+
// Cairo lang 2.5.3␊
4551
4652
#[starknet::contract]␊
4753
mod Foo {␊
@@ -61,6 +67,8 @@ Generated by [AVA](https://avajs.dev).
6167
> Snapshot 1
6268
6369
`// SPDX-License-Identifier: MIT␊
70+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
71+
// Cairo lang 2.5.3␊
6472
6573
#[starknet::contract]␊
6674
mod Foo {␊
@@ -85,6 +93,8 @@ Generated by [AVA](https://avajs.dev).
8593
> Snapshot 1
8694
8795
`// SPDX-License-Identifier: MIT␊
96+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
97+
// Cairo lang 2.5.3␊
8898
8999
#[starknet::contract]␊
90100
mod Foo {␊
@@ -109,6 +119,8 @@ Generated by [AVA](https://avajs.dev).
109119
> Snapshot 1
110120
111121
`// SPDX-License-Identifier: MIT␊
122+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
123+
// Cairo lang 2.5.3␊
112124
113125
#[starknet::contract]␊
114126
mod Foo {␊
@@ -146,6 +158,8 @@ Generated by [AVA](https://avajs.dev).
146158
> Snapshot 1
147159
148160
`// SPDX-License-Identifier: MIT␊
161+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
162+
// Cairo lang 2.5.3␊
149163
150164
#[starknet::contract]␊
151165
mod Foo {␊
60 Bytes
Binary file not shown.

packages/core-cairo/src/custom.test.ts.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Generated by [AVA](https://avajs.dev).
99
> Snapshot 1
1010
1111
`// SPDX-License-Identifier: MIT␊
12+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
13+
// Cairo lang 2.5.3␊
1214
1315
#[starknet::contract]␊
1416
mod MyContract {␊
@@ -23,6 +25,8 @@ Generated by [AVA](https://avajs.dev).
2325
> Snapshot 1
2426
2527
`// SPDX-License-Identifier: MIT␊
28+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
29+
// Cairo lang 2.5.3␊
2630
2731
#[starknet::contract]␊
2832
mod MyContract {␊
@@ -88,6 +92,8 @@ Generated by [AVA](https://avajs.dev).
8892
> Snapshot 1
8993
9094
`// SPDX-License-Identifier: MIT␊
95+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
96+
// Cairo lang 2.5.3␊
9197
9298
#[starknet::contract]␊
9399
mod MyContract {␊
@@ -145,6 +151,8 @@ Generated by [AVA](https://avajs.dev).
145151
> Snapshot 1
146152
147153
`// SPDX-License-Identifier: MIT␊
154+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
155+
// Cairo lang 2.5.3␊
148156
149157
#[starknet::contract]␊
150158
mod MyContract {␊
@@ -159,6 +167,8 @@ Generated by [AVA](https://avajs.dev).
159167
> Snapshot 1
160168
161169
`// SPDX-License-Identifier: MIT␊
170+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
171+
// Cairo lang 2.5.3␊
162172
163173
#[starknet::contract]␊
164174
mod MyContract {␊
@@ -199,6 +209,8 @@ Generated by [AVA](https://avajs.dev).
199209
> Snapshot 1
200210
201211
`// SPDX-License-Identifier: MIT␊
212+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
213+
// Cairo lang 2.5.3␊
202214
203215
#[starknet::contract]␊
204216
mod MyContract {␊
@@ -250,6 +262,8 @@ Generated by [AVA](https://avajs.dev).
250262
> Snapshot 1
251263
252264
`// SPDX-License-Identifier: MIT␊
265+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
266+
// Cairo lang 2.5.3␊
253267
254268
#[starknet::contract]␊
255269
mod MyContract {␊
49 Bytes
Binary file not shown.

packages/core-cairo/src/erc20.test.ts.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Generated by [AVA](https://avajs.dev).
99
> Snapshot 1
1010
1111
`// SPDX-License-Identifier: MIT␊
12+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
13+
// Cairo lang 2.5.3␊
1214
1315
#[starknet::contract]␊
1416
mod MyToken {␊
@@ -50,6 +52,8 @@ Generated by [AVA](https://avajs.dev).
5052
> Snapshot 1
5153
5254
`// SPDX-License-Identifier: MIT␊
55+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
56+
// Cairo lang 2.5.3␊
5357
5458
#[starknet::contract]␊
5559
mod MyToken {␊
@@ -102,6 +106,8 @@ Generated by [AVA](https://avajs.dev).
102106
> Snapshot 1
103107
104108
`// SPDX-License-Identifier: MIT␊
109+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
110+
// Cairo lang 2.5.3␊
105111
106112
#[starknet::contract]␊
107113
mod MyToken {␊
@@ -234,6 +240,8 @@ Generated by [AVA](https://avajs.dev).
234240
> Snapshot 1
235241
236242
`// SPDX-License-Identifier: MIT␊
243+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
244+
// Cairo lang 2.5.3␊
237245
238246
const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊
239247
@@ -381,6 +389,8 @@ Generated by [AVA](https://avajs.dev).
381389
> Snapshot 1
382390
383391
`// SPDX-License-Identifier: MIT␊
392+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
393+
// Cairo lang 2.5.3␊
384394
385395
#[starknet::contract]␊
386396
mod MyToken {␊
@@ -521,6 +531,8 @@ Generated by [AVA](https://avajs.dev).
521531
> Snapshot 1
522532
523533
`// SPDX-License-Identifier: MIT␊
534+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
535+
// Cairo lang 2.5.3␊
524536
525537
#[starknet::contract]␊
526538
mod MyToken {␊
@@ -565,6 +577,8 @@ Generated by [AVA](https://avajs.dev).
565577
> Snapshot 1
566578
567579
`// SPDX-License-Identifier: MIT␊
580+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
581+
// Cairo lang 2.5.3␊
568582
569583
#[starknet::contract]␊
570584
mod MyToken {␊
@@ -606,6 +620,8 @@ Generated by [AVA](https://avajs.dev).
606620
> Snapshot 1
607621
608622
`// SPDX-License-Identifier: MIT␊
623+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
624+
// Cairo lang 2.5.3␊
609625
610626
#[starknet::contract]␊
611627
mod MyToken {␊
@@ -670,6 +686,8 @@ Generated by [AVA](https://avajs.dev).
670686
> Snapshot 1
671687
672688
`// SPDX-License-Identifier: MIT␊
689+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
690+
// Cairo lang 2.5.3␊
673691
674692
const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊
675693
@@ -749,6 +767,8 @@ Generated by [AVA](https://avajs.dev).
749767
> Snapshot 1
750768
751769
`// SPDX-License-Identifier: MIT␊
770+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
771+
// Cairo lang 2.5.3␊
752772
753773
#[starknet::contract]␊
754774
mod MyToken {␊
@@ -915,6 +935,8 @@ Generated by [AVA](https://avajs.dev).
915935
> Snapshot 1
916936
917937
`// SPDX-License-Identifier: MIT␊
938+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
939+
// Cairo lang 2.5.3␊
918940
919941
const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊
920942
const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊
55 Bytes
Binary file not shown.

packages/core-cairo/src/erc721.test.ts.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Generated by [AVA](https://avajs.dev).
99
> Snapshot 1
1010
1111
`// SPDX-License-Identifier: MIT␊
12+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
13+
// Cairo lang 2.5.3␊
1214
1315
#[starknet::contract]␊
1416
mod MyToken {␊
@@ -60,6 +62,8 @@ Generated by [AVA](https://avajs.dev).
6062
> Snapshot 1
6163
6264
`// SPDX-License-Identifier: MIT␊
65+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
66+
// Cairo lang 2.5.3␊
6367
6468
#[starknet::contract]␊
6569
mod MyToken {␊
@@ -123,6 +127,8 @@ Generated by [AVA](https://avajs.dev).
123127
> Snapshot 1
124128
125129
`// SPDX-License-Identifier: MIT␊
130+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
131+
// Cairo lang 2.5.3␊
126132
127133
#[starknet::contract]␊
128134
mod MyToken {␊
@@ -304,6 +310,8 @@ Generated by [AVA](https://avajs.dev).
304310
> Snapshot 1
305311
306312
`// SPDX-License-Identifier: MIT␊
313+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
314+
// Cairo lang 2.5.3␊
307315
308316
#[starknet::contract]␊
309317
mod MyToken {␊
@@ -396,6 +404,8 @@ Generated by [AVA](https://avajs.dev).
396404
> Snapshot 1
397405
398406
`// SPDX-License-Identifier: MIT␊
407+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
408+
// Cairo lang 2.5.3␊
399409
400410
const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊
401411
@@ -495,6 +505,8 @@ Generated by [AVA](https://avajs.dev).
495505
> Snapshot 1
496506
497507
`// SPDX-License-Identifier: MIT␊
508+
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
509+
// Cairo lang 2.5.3␊
498510
499511
#[starknet::contract]␊
500512
mod MyToken {␊
55 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)