Skip to content
Merged
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
4 changes: 2 additions & 2 deletions packages/core/cairo/src/common-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ export function addSRC5Component(c: ContractBuilder, section?: string) {
}
}

export function addVotesComponent(c: ContractBuilder, name: string, version: string, section?: string) {
addSNIP12Metadata(c, name, version, section);
export function addVotesComponent(c: ContractBuilder, name: string, version: string, snip12MetadataSection?: string) {
addSNIP12Metadata(c, name, version, snip12MetadataSection);
c.addComponent(components.NoncesComponent, [], false);
c.addComponent(components.VotesComponent, [], false);
c.addImplToComponent(components.VotesComponent, {
Expand Down
5 changes: 5 additions & 0 deletions packages/core/cairo_alpha/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## Unreleased

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

## 2.0.0 (2025-06-20)

- Add AccessControlWithDelay. ([#506](https://github.com/OpenZeppelin/contracts-wizard/pull/506))
Expand Down
2 changes: 1 addition & 1 deletion packages/core/cairo_alpha/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@openzeppelin/wizard-cairo-alpha",
"private": true,
"version": "2.0.0",
"version": "3.0.0-alpha.0",
"description": "A boilerplate generator to get started with the latest alpha version of OpenZeppelin Contracts for Cairo",
"license": "AGPL-3.0-only",
"repository": "https://github.com/OpenZeppelin/contracts-wizard",
Expand Down
52 changes: 26 additions & 26 deletions packages/core/cairo_alpha/src/account.test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -86,7 +86,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -142,7 +142,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -219,7 +219,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -275,7 +275,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -346,7 +346,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -396,7 +396,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -477,7 +477,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -550,7 +550,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -623,7 +623,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -698,7 +698,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -773,7 +773,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -850,7 +850,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -927,7 +927,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -1005,7 +1005,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -1062,7 +1062,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -1140,7 +1140,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -1197,7 +1197,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -1269,7 +1269,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -1320,7 +1320,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -1402,7 +1402,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -1476,7 +1476,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -1550,7 +1550,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -1626,7 +1626,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -1702,7 +1702,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down Expand Up @@ -1780,7 +1780,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract(account)]␊
mod MyAccount {␊
Expand Down
Binary file modified packages/core/cairo_alpha/src/account.test.ts.snap
Binary file not shown.
5 changes: 3 additions & 2 deletions packages/core/cairo_alpha/src/common-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,15 @@ export function addSRC5Component(c: ContractBuilder, section?: string) {
}
}

export function addVotesComponent(c: ContractBuilder, name: string, version: string, section?: string) {
addSNIP12Metadata(c, name, version, section);
export function addVotesComponent(c: ContractBuilder, name: string, version: string, snip12MetadataSection?: string) {
addSNIP12Metadata(c, name, version, snip12MetadataSection);
c.addComponent(components.NoncesComponent, [], false);
c.addComponent(components.VotesComponent, [], false);
c.addImplToComponent(components.VotesComponent, {
name: 'VotesImpl',
value: `VotesComponent::VotesImpl<ContractState>`,
});
c.addUseClause('openzeppelin::utils::contract_clock', 'ERC6372TimestampClock');
}

export function addSNIP12Metadata(c: ContractBuilder, name: string, version: string, section?: string) {
Expand Down
18 changes: 9 additions & 9 deletions packages/core/cairo_alpha/src/contract.test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract]␊
mod Foo {␊
Expand All @@ -24,7 +24,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract]␊
mod Foo {␊
Expand All @@ -44,7 +44,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract]␊
mod Foo {␊
Expand All @@ -64,7 +64,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract]␊
mod Foo {␊
Expand All @@ -89,7 +89,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract]␊
mod Foo {␊
Expand All @@ -114,7 +114,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract]␊
mod Foo {␊
Expand Down Expand Up @@ -154,7 +154,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract]␊
mod Foo {␊
Expand Down Expand Up @@ -195,7 +195,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
#[starknet::contract]␊
mod Foo {␊
Expand Down Expand Up @@ -237,7 +237,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo 2.0.0␊
// Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.0␊
// Security contact: [email protected]
#[starknet::contract]␊
Expand Down
Binary file modified packages/core/cairo_alpha/src/contract.test.ts.snap
Binary file not shown.
Loading
Loading