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

## 0.9.2 (2024-02-26)

- Remove code comment for Cairo lang version. ([#337](https://github.com/OpenZeppelin/contracts-wizard/pull/337))

## 0.9.1 (2024-02-22)

- Add code comments for compatible OpenZeppelin Contracts for Cairo and Cairo lang versions. ([#331](https://github.com/OpenZeppelin/contracts-wizard/pull/331))
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.9.1",
"version": "0.9.2",
"description": "A boilerplate generator to get started with OpenZeppelin Contracts for Cairo",
"license": "MIT",
"repository": "github:OpenZeppelin/contracts-wizard",
Expand Down
7 changes: 0 additions & 7 deletions packages/core-cairo/src/contract.test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod Foo {␊
Expand All @@ -26,7 +25,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod Foo {␊
Expand All @@ -47,7 +45,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod Foo {␊
Expand All @@ -68,7 +65,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod Foo {␊
Expand All @@ -94,7 +90,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod Foo {␊
Expand All @@ -120,7 +115,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod Foo {␊
Expand Down Expand Up @@ -159,7 +153,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod Foo {␊
Expand Down
Binary file modified packages/core-cairo/src/contract.test.ts.snap
Binary file not shown.
7 changes: 0 additions & 7 deletions packages/core-cairo/src/custom.test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyContract {␊
Expand All @@ -26,7 +25,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyContract {␊
Expand Down Expand Up @@ -93,7 +91,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyContract {␊
Expand Down Expand Up @@ -152,7 +149,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyContract {␊
Expand All @@ -168,7 +164,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyContract {␊
Expand Down Expand Up @@ -210,7 +205,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyContract {␊
Expand Down Expand Up @@ -263,7 +257,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyContract {␊
Expand Down
Binary file modified packages/core-cairo/src/custom.test.ts.snap
Binary file not shown.
11 changes: 0 additions & 11 deletions packages/core-cairo/src/erc20.test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyToken {␊
Expand Down Expand Up @@ -53,7 +52,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyToken {␊
Expand Down Expand Up @@ -107,7 +105,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyToken {␊
Expand Down Expand Up @@ -241,7 +238,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊
Expand Down Expand Up @@ -390,7 +386,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyToken {␊
Expand Down Expand Up @@ -532,7 +527,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyToken {␊
Expand Down Expand Up @@ -578,7 +572,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyToken {␊
Expand Down Expand Up @@ -621,7 +614,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyToken {␊
Expand Down Expand Up @@ -687,7 +679,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊
Expand Down Expand Up @@ -768,7 +759,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyToken {␊
Expand Down Expand Up @@ -936,7 +926,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊
const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊
Expand Down
Binary file modified packages/core-cairo/src/erc20.test.ts.snap
Binary file not shown.
6 changes: 0 additions & 6 deletions packages/core-cairo/src/erc721.test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyToken {␊
Expand Down Expand Up @@ -63,7 +62,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyToken {␊
Expand Down Expand Up @@ -128,7 +126,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyToken {␊
Expand Down Expand Up @@ -311,7 +308,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyToken {␊
Expand Down Expand Up @@ -405,7 +401,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊
Expand Down Expand Up @@ -506,7 +501,6 @@ Generated by [AVA](https://avajs.dev).

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0␊
// Cairo lang 2.5.3␊
#[starknet::contract]␊
mod MyToken {␊
Expand Down
Binary file modified packages/core-cairo/src/erc721.test.ts.snap
Binary file not shown.
3 changes: 1 addition & 2 deletions packages/core-cairo/src/print.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import type { Contract, Component, Argument, Value, Impl, ContractFunction, } fr

import { formatLines, spaceBetween, Lines } from './utils/format-lines';
import { getSelfArg } from './common-options';
import { compatibleCairoLangSemver, compatibleContractsSemver } from './utils/version';
import { compatibleContractsSemver } from './utils/version';

export function printContract(contract: Contract): string {
return formatLines(
...spaceBetween(
[
`// SPDX-License-Identifier: ${contract.license}`,
`// Compatible with OpenZeppelin Contracts for Cairo ${compatibleContractsSemver}`,
`// Cairo lang ${compatibleCairoLangSemver}`
],
printSuperVariables(contract),
[
Expand Down
5 changes: 0 additions & 5 deletions packages/core-cairo/src/utils/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,3 @@ export const contractsVersionTag = `v${contractsVersion}`;
* Semantic version string representing of the minimum compatible version of Contracts to display in output.
*/
export const compatibleContractsSemver = '^0.9.0';

/**
* Compatible Cairo lang version to display in output.
*/
export const compatibleCairoLangSemver = '2.5.3';