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
7 changes: 7 additions & 0 deletions packages/core-cairo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 0.13.0 (2024-05-22)

- **Breaking changes**:
- Use OpenZeppelin Contracts for Cairo v0.13.0. ([#359](https://github.com/OpenZeppelin/contracts-wizard/pull/359))
- Use Hooks with ERC721 and ERC1155.
- Use Hooks for Pausable.

## 0.12.0 (2024-05-01)

- Add `votes` option to ERC20. ([#355](https://github.com/OpenZeppelin/contracts-wizard/pull/355))
Expand Down
2 changes: 1 addition & 1 deletion packages/core-cairo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openzeppelin/wizard-cairo",
"version": "0.12.0",
"version": "0.13.0",
"description": "A boilerplate generator to get started with OpenZeppelin Contracts for Cairo",
"license": "MIT",
"repository": "github:OpenZeppelin/contracts-wizard",
Expand Down
5 changes: 1 addition & 4 deletions packages/core-cairo/src/add-pausable.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getSelfArg } from './common-options';
import type { BaseImplementedTrait, ContractBuilder, ContractFunction } from './contract';
import type { ContractBuilder } from './contract';
import { Access, requireAccessControl } from './set-access-control';
import { defineFunctions } from './utils/define-functions';
import { defineComponents } from './utils/define-components';
Expand Down Expand Up @@ -57,6 +57,3 @@ const functions = defineFunctions({
},
});

export function setPausable(c: ContractBuilder, t: BaseImplementedTrait, fn: ContractFunction) {
c.addFunctionCodeBefore(t, fn, 'self.pausable.assert_not_paused()');
}
14 changes: 7 additions & 7 deletions packages/core-cairo/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 ^0.12.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.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 ^0.12.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.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 ^0.12.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.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 ^0.12.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.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 ^0.12.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.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 ^0.12.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.0␊
#[starknet::contract]␊
mod Foo {␊
Expand Down Expand Up @@ -152,7 +152,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.12.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.0␊
#[starknet::contract]␊
mod Foo {␊
Expand Down
Binary file modified packages/core-cairo/src/contract.test.ts.snap
Binary file not shown.
16 changes: 8 additions & 8 deletions packages/core-cairo/src/custom.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 ^0.12.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.0␊
#[starknet::contract]␊
mod MyContract {␊
Expand All @@ -24,7 +24,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.12.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.0␊
#[starknet::contract]␊
mod MyContract {␊
Expand Down Expand Up @@ -80,7 +80,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.12.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.0␊
#[starknet::contract]␊
mod MyContract {␊
Expand Down Expand Up @@ -161,7 +161,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.12.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.0␊
#[starknet::contract]␊
mod MyContract {␊
Expand Down Expand Up @@ -217,7 +217,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.12.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.0␊
#[starknet::contract]␊
mod MyContract {␊
Expand All @@ -232,7 +232,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.12.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.0␊
#[starknet::contract]␊
mod MyContract {␊
Expand Down Expand Up @@ -288,7 +288,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.12.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.0␊
const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊
Expand Down Expand Up @@ -361,7 +361,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.12.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.0␊
#[starknet::contract]␊
mod MyContract {␊
Expand Down
Binary file modified packages/core-cairo/src/custom.test.ts.snap
Binary file not shown.
Loading