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

## 0.14.0 (2024-06-20)

- **Breaking changes**:
- Use OpenZeppelin Contracts for Cairo v0.14.0. ([#369](https://github.com/OpenZeppelin/contracts-wizard/pull/369))
- Fix compile error with ERC1155 Burnable.

## 0.13.0 (2024-05-22)

- **Breaking changes**:
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.13.0",
"version": "0.14.0",
"description": "A boilerplate generator to get started with OpenZeppelin Contracts for Cairo",
"license": "MIT",
"repository": "github:OpenZeppelin/contracts-wizard",
Expand Down
4 changes: 2 additions & 2 deletions packages/core-cairo/src/add-pausable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ const functions = defineFunctions({
getSelfArg(),
],
code: [
'self.pausable._pause()'
'self.pausable.pause()'
]
},
unpause: {
args: [
getSelfArg(),
],
code: [
'self.pausable._unpause()'
'self.pausable.unpause()'
]
},
});
Expand Down
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.13.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.14.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.13.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.14.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.13.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.14.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.13.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.14.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.13.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.14.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.13.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.14.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.13.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.14.0␊
#[starknet::contract]␊
mod Foo {␊
Expand Down
Binary file modified packages/core-cairo/src/contract.test.ts.snap
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/core-cairo/src/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class ContractBuilder implements Contract {
const key = component.name;
const present = this.componentsMap.has(key);
if (!present) {
const initializer = initializable ? { params } : undefined;
const initializer = initializable ? { params } : undefined;
const cp: Component = { initializer, ...component, impls: [ ...component.impls ] }; // spread impls to deep copy from original component
this.componentsMap.set(key, cp);
}
Expand Down
34 changes: 17 additions & 17 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.13.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.14.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.13.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.14.0␊
#[starknet::contract]␊
mod MyContract {␊
Expand Down Expand Up @@ -69,7 +69,7 @@ Generated by [AVA](https://avajs.dev).
impl UpgradeableImpl of IUpgradeable<ContractState> {␊
fn upgrade(ref self: ContractState, new_class_hash: ClassHash) {␊
self.ownable.assert_only_owner();␊
self.upgradeable._upgrade(new_class_hash);␊
self.upgradeable.upgrade(new_class_hash);␊
}␊
}␊
}␊
Expand All @@ -80,7 +80,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.14.0␊
#[starknet::contract]␊
mod MyContract {␊
Expand Down Expand Up @@ -134,7 +134,7 @@ Generated by [AVA](https://avajs.dev).
impl UpgradeableImpl of IUpgradeable<ContractState> {␊
fn upgrade(ref self: ContractState, new_class_hash: ClassHash) {␊
self.ownable.assert_only_owner();␊
self.upgradeable._upgrade(new_class_hash);␊
self.upgradeable.upgrade(new_class_hash);␊
}␊
}␊
Expand All @@ -144,13 +144,13 @@ Generated by [AVA](https://avajs.dev).
#[external(v0)]␊
fn pause(ref self: ContractState) {␊
self.ownable.assert_only_owner();␊
self.pausable._pause();␊
self.pausable.pause();␊
}␊
#[external(v0)]␊
fn unpause(ref self: ContractState) {␊
self.ownable.assert_only_owner();␊
self.pausable._unpause();␊
self.pausable.unpause();␊
}␊
}␊
}␊
Expand All @@ -161,7 +161,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.14.0␊
#[starknet::contract]␊
mod MyContract {␊
Expand Down Expand Up @@ -206,7 +206,7 @@ Generated by [AVA](https://avajs.dev).
impl UpgradeableImpl of IUpgradeable<ContractState> {␊
fn upgrade(ref self: ContractState, new_class_hash: ClassHash) {␊
self.ownable.assert_only_owner();␊
self.upgradeable._upgrade(new_class_hash);␊
self.upgradeable.upgrade(new_class_hash);␊
}␊
}␊
}␊
Expand All @@ -217,7 +217,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.14.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.13.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.14.0␊
#[starknet::contract]␊
mod MyContract {␊
Expand Down Expand Up @@ -277,7 +277,7 @@ Generated by [AVA](https://avajs.dev).
impl UpgradeableImpl of IUpgradeable<ContractState> {␊
fn upgrade(ref self: ContractState, new_class_hash: ClassHash) {␊
self.ownable.assert_only_owner();␊
self.upgradeable._upgrade(new_class_hash);␊
self.upgradeable.upgrade(new_class_hash);␊
}␊
}␊
}␊
Expand All @@ -288,7 +288,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.14.0␊
const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊
Expand Down Expand Up @@ -350,7 +350,7 @@ Generated by [AVA](https://avajs.dev).
impl UpgradeableImpl of IUpgradeable<ContractState> {␊
fn upgrade(ref self: ContractState, new_class_hash: ClassHash) {␊
self.accesscontrol.assert_only_role(UPGRADER_ROLE);␊
self.upgradeable._upgrade(new_class_hash);␊
self.upgradeable.upgrade(new_class_hash);␊
}␊
}␊
}␊
Expand All @@ -361,7 +361,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.13.0␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.14.0␊
#[starknet::contract]␊
mod MyContract {␊
Expand Down Expand Up @@ -408,13 +408,13 @@ Generated by [AVA](https://avajs.dev).
#[external(v0)]␊
fn pause(ref self: ContractState) {␊
self.ownable.assert_only_owner();␊
self.pausable._pause();␊
self.pausable.pause();␊
}␊
#[external(v0)]␊
fn unpause(ref self: ContractState) {␊
self.ownable.assert_only_owner();␊
self.pausable._unpause();␊
self.pausable.unpause();␊
}␊
}␊
}␊
Expand Down
Binary file modified packages/core-cairo/src/custom.test.ts.snap
Binary file not shown.
Loading