Skip to content

Commit 856f9c2

Browse files
Cairo: Support v3.0.0-alpha.1 (#638)
Co-authored-by: Eric Lau <[email protected]>
1 parent d86592c commit 856f9c2

25 files changed

+266
-237
lines changed

packages/core/cairo_alpha/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44

55
- **Breaking changes**:
6+
- Use OpenZeppelin Contracts for Cairo v3.0.0-alpha.1. ([#638](https://github.com/OpenZeppelin/contracts-wizard/pull/638))
67
- Use OpenZeppelin Contracts for Cairo v3.0.0-alpha.0. ([#623](https://github.com/OpenZeppelin/contracts-wizard/pull/623))
78

89
## 2.0.0 (2025-06-20)

packages/core/cairo_alpha/src/account.test.ts.md

Lines changed: 59 additions & 59 deletions
Large diffs are not rendered by default.
Binary file not shown.

packages/core/cairo_alpha/src/account.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function buildAccount(opts: AccountOptions): Contract {
5959
c.addComponent(components.AccountComponent, [{ lit: 'public_key' }], true);
6060
break;
6161
case 'eth':
62-
c.addUseClause('openzeppelin::account::interface', 'EthPublicKey');
62+
c.addUseClause('openzeppelin::interfaces::accounts', 'EthPublicKey');
6363
c.addConstructorArgument({ name: 'public_key', type: 'EthPublicKey' });
6464
c.addComponent(components.EthAccountComponent, [{ lit: 'public_key' }], true);
6565
break;

packages/core/cairo_alpha/src/contract.test.ts.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev).
99
> Snapshot 1
1010
1111
`// SPDX-License-Identifier: MIT␊
12-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
12+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
1313
1414
#[starknet::contract]␊
1515
mod Foo {␊
@@ -24,7 +24,7 @@ Generated by [AVA](https://avajs.dev).
2424
> Snapshot 1
2525
2626
`// SPDX-License-Identifier: MIT␊
27-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
27+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
2828
2929
#[starknet::contract]␊
3030
mod Foo {␊
@@ -44,7 +44,7 @@ Generated by [AVA](https://avajs.dev).
4444
> Snapshot 1
4545
4646
`// SPDX-License-Identifier: MIT␊
47-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
47+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
4848
4949
#[starknet::contract]␊
5050
mod Foo {␊
@@ -64,7 +64,7 @@ Generated by [AVA](https://avajs.dev).
6464
> Snapshot 1
6565
6666
`// SPDX-License-Identifier: MIT␊
67-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
67+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
6868
6969
#[starknet::contract]␊
7070
mod Foo {␊
@@ -89,7 +89,7 @@ Generated by [AVA](https://avajs.dev).
8989
> Snapshot 1
9090
9191
`// SPDX-License-Identifier: MIT␊
92-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
92+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
9393
9494
#[starknet::contract]␊
9595
mod Foo {␊
@@ -114,7 +114,7 @@ Generated by [AVA](https://avajs.dev).
114114
> Snapshot 1
115115
116116
`// SPDX-License-Identifier: MIT␊
117-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
117+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
118118
119119
#[starknet::contract]␊
120120
mod Foo {␊
@@ -154,7 +154,7 @@ Generated by [AVA](https://avajs.dev).
154154
> Snapshot 1
155155
156156
`// SPDX-License-Identifier: MIT␊
157-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
157+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
158158
159159
#[starknet::contract]␊
160160
mod Foo {␊
@@ -195,7 +195,7 @@ Generated by [AVA](https://avajs.dev).
195195
> Snapshot 1
196196
197197
`// SPDX-License-Identifier: MIT␊
198-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
198+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
199199
200200
#[starknet::contract]␊
201201
mod Foo {␊
@@ -237,7 +237,7 @@ Generated by [AVA](https://avajs.dev).
237237
> Snapshot 1
238238
239239
`// SPDX-License-Identifier: MIT␊
240-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
240+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
241241
242242
// Security contact: [email protected]
243243
#[starknet::contract]␊
Binary file not shown.

packages/core/cairo_alpha/src/custom.test.ts.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev).
99
> Snapshot 1
1010
1111
`// SPDX-License-Identifier: MIT␊
12-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
12+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
1313
1414
#[starknet::contract]␊
1515
mod MyContract {␊
@@ -24,12 +24,12 @@ Generated by [AVA](https://avajs.dev).
2424
> Snapshot 1
2525
2626
`// SPDX-License-Identifier: MIT␊
27-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
27+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
2828
2929
#[starknet::contract]␊
3030
mod MyContract {␊
3131
use openzeppelin::access::ownable::OwnableComponent;␊
32-
use openzeppelin::upgrades::interface::IUpgradeable;␊
32+
use openzeppelin::interfaces::upgrades::IUpgradeable;␊
3333
use openzeppelin::upgrades::UpgradeableComponent;␊
3434
use starknet::{ClassHash, ContractAddress};␊
3535
@@ -85,13 +85,13 @@ Generated by [AVA](https://avajs.dev).
8585
> Snapshot 1
8686
8787
`// SPDX-License-Identifier: MIT␊
88-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
88+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
8989
9090
#[starknet::contract]␊
9191
mod MyContract {␊
9292
use openzeppelin::access::ownable::OwnableComponent;␊
93+
use openzeppelin::interfaces::upgrades::IUpgradeable;␊
9394
use openzeppelin::security::pausable::PausableComponent;␊
94-
use openzeppelin::upgrades::interface::IUpgradeable;␊
9595
use openzeppelin::upgrades::UpgradeableComponent;␊
9696
use starknet::{ClassHash, ContractAddress};␊
9797
@@ -171,12 +171,12 @@ Generated by [AVA](https://avajs.dev).
171171
> Snapshot 1
172172
173173
`// SPDX-License-Identifier: MIT␊
174-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
174+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
175175
176176
#[starknet::contract]␊
177177
mod MyContract {␊
178178
use openzeppelin::access::ownable::OwnableComponent;␊
179-
use openzeppelin::upgrades::interface::IUpgradeable;␊
179+
use openzeppelin::interfaces::upgrades::IUpgradeable;␊
180180
use openzeppelin::upgrades::UpgradeableComponent;␊
181181
use starknet::{ClassHash, ContractAddress};␊
182182
@@ -232,7 +232,7 @@ Generated by [AVA](https://avajs.dev).
232232
> Snapshot 1
233233
234234
`// SPDX-License-Identifier: MIT␊
235-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
235+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
236236
237237
#[starknet::contract]␊
238238
mod MyContract {␊
@@ -247,12 +247,12 @@ Generated by [AVA](https://avajs.dev).
247247
> Snapshot 1
248248
249249
`// SPDX-License-Identifier: MIT␊
250-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
250+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
251251
252252
#[starknet::contract]␊
253253
mod MyContract {␊
254254
use openzeppelin::access::ownable::OwnableComponent;␊
255-
use openzeppelin::upgrades::interface::IUpgradeable;␊
255+
use openzeppelin::interfaces::upgrades::IUpgradeable;␊
256256
use openzeppelin::upgrades::UpgradeableComponent;␊
257257
use starknet::{ClassHash, ContractAddress};␊
258258
@@ -308,15 +308,15 @@ Generated by [AVA](https://avajs.dev).
308308
> Snapshot 1
309309
310310
`// SPDX-License-Identifier: MIT␊
311-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
311+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
312312
313313
const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊
314314
315315
#[starknet::contract]␊
316316
mod MyContract {␊
317317
use openzeppelin::access::accesscontrol::{AccessControlComponent, DEFAULT_ADMIN_ROLE};␊
318+
use openzeppelin::interfaces::upgrades::IUpgradeable;␊
318319
use openzeppelin::introspection::src5::SRC5Component;␊
319-
use openzeppelin::upgrades::interface::IUpgradeable;␊
320320
use openzeppelin::upgrades::UpgradeableComponent;␊
321321
use starknet::{ClassHash, ContractAddress};␊
322322
use super::UPGRADER_ROLE;␊
@@ -385,7 +385,7 @@ Generated by [AVA](https://avajs.dev).
385385
> Snapshot 1
386386
387387
`// SPDX-License-Identifier: MIT␊
388-
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0
388+
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.1
389389
390390
#[starknet::contract]␊
391391
mod MyContract {␊
Binary file not shown.

0 commit comments

Comments
 (0)