diff --git a/packages/core-cairo/CHANGELOG.md b/packages/core-cairo/CHANGELOG.md index b90e5d54..2f891031 100644 --- a/packages/core-cairo/CHANGELOG.md +++ b/packages/core-cairo/CHANGELOG.md @@ -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)) diff --git a/packages/core-cairo/package.json b/packages/core-cairo/package.json index f58e4629..b2ce86d4 100644 --- a/packages/core-cairo/package.json +++ b/packages/core-cairo/package.json @@ -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", diff --git a/packages/core-cairo/src/contract.test.ts.md b/packages/core-cairo/src/contract.test.ts.md index 92ff2aba..ec16ea3c 100644 --- a/packages/core-cairo/src/contract.test.ts.md +++ b/packages/core-cairo/src/contract.test.ts.md @@ -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 {␊ @@ -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 {␊ @@ -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 {␊ @@ -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 {␊ @@ -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 {␊ @@ -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 {␊ @@ -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 {␊ diff --git a/packages/core-cairo/src/contract.test.ts.snap b/packages/core-cairo/src/contract.test.ts.snap index bb3cf6ac..df21cd12 100644 Binary files a/packages/core-cairo/src/contract.test.ts.snap and b/packages/core-cairo/src/contract.test.ts.snap differ diff --git a/packages/core-cairo/src/custom.test.ts.md b/packages/core-cairo/src/custom.test.ts.md index 6f15589e..f124755d 100644 --- a/packages/core-cairo/src/custom.test.ts.md +++ b/packages/core-cairo/src/custom.test.ts.md @@ -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 {␊ @@ -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 {␊ @@ -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 {␊ @@ -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 {␊ @@ -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 {␊ @@ -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 {␊ @@ -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 {␊ diff --git a/packages/core-cairo/src/custom.test.ts.snap b/packages/core-cairo/src/custom.test.ts.snap index bcd0e16f..99e95ea1 100644 Binary files a/packages/core-cairo/src/custom.test.ts.snap and b/packages/core-cairo/src/custom.test.ts.snap differ diff --git a/packages/core-cairo/src/erc20.test.ts.md b/packages/core-cairo/src/erc20.test.ts.md index 59f0a3d5..497095ce 100644 --- a/packages/core-cairo/src/erc20.test.ts.md +++ b/packages/core-cairo/src/erc20.test.ts.md @@ -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 {␊ @@ -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 {␊ @@ -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 {␊ @@ -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");␊ ␊ @@ -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 {␊ @@ -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 {␊ @@ -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 {␊ @@ -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 {␊ @@ -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");␊ ␊ @@ -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 {␊ @@ -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");␊ diff --git a/packages/core-cairo/src/erc20.test.ts.snap b/packages/core-cairo/src/erc20.test.ts.snap index 81ef3451..aebafc48 100644 Binary files a/packages/core-cairo/src/erc20.test.ts.snap and b/packages/core-cairo/src/erc20.test.ts.snap differ diff --git a/packages/core-cairo/src/erc721.test.ts.md b/packages/core-cairo/src/erc721.test.ts.md index 222f4962..7c1f4e35 100644 --- a/packages/core-cairo/src/erc721.test.ts.md +++ b/packages/core-cairo/src/erc721.test.ts.md @@ -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 {␊ @@ -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 {␊ @@ -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 {␊ @@ -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 {␊ @@ -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");␊ ␊ @@ -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 {␊ diff --git a/packages/core-cairo/src/erc721.test.ts.snap b/packages/core-cairo/src/erc721.test.ts.snap index 04865bad..d25dbde5 100644 Binary files a/packages/core-cairo/src/erc721.test.ts.snap and b/packages/core-cairo/src/erc721.test.ts.snap differ diff --git a/packages/core-cairo/src/print.ts b/packages/core-cairo/src/print.ts index 86a8aa90..360c4a1a 100644 --- a/packages/core-cairo/src/print.ts +++ b/packages/core-cairo/src/print.ts @@ -4,7 +4,7 @@ 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( @@ -12,7 +12,6 @@ export function printContract(contract: Contract): string { [ `// SPDX-License-Identifier: ${contract.license}`, `// Compatible with OpenZeppelin Contracts for Cairo ${compatibleContractsSemver}`, - `// Cairo lang ${compatibleCairoLangSemver}` ], printSuperVariables(contract), [ diff --git a/packages/core-cairo/src/utils/version.ts b/packages/core-cairo/src/utils/version.ts index f9974441..6ec406d8 100644 --- a/packages/core-cairo/src/utils/version.ts +++ b/packages/core-cairo/src/utils/version.ts @@ -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'; \ No newline at end of file