diff --git a/.changeset/cairo-alpha-erc1155-supply.md b/.changeset/cairo-alpha-erc1155-supply.md new file mode 100644 index 000000000..9dd3bdf16 --- /dev/null +++ b/.changeset/cairo-alpha-erc1155-supply.md @@ -0,0 +1,5 @@ +--- +"@openzeppelin/wizard-common": patch +--- + +Cairo: ERC1155 supply tracking description for AI prompts. diff --git a/packages/common/src/ai/descriptions/cairo.ts b/packages/common/src/ai/descriptions/cairo.ts index 091fdb4cb..344184009 100644 --- a/packages/common/src/ai/descriptions/cairo.ts +++ b/packages/common/src/ai/descriptions/cairo.ts @@ -66,6 +66,7 @@ export const cairoERC1155Descriptions = { baseUri: 'The location of the metadata for the token. Clients will replace any instance of {id} in this string with the tokenId.', updatableUri: 'Whether privileged accounts will be able to set a new URI for all token types.', + supply: 'Whether to keep track of total supply of tokens.', }; export const cairoGovernorDescriptions = { diff --git a/packages/core/cairo_alpha/CHANGELOG.md b/packages/core/cairo_alpha/CHANGELOG.md index 4ae634c28..a3a8bab07 100644 --- a/packages/core/cairo_alpha/CHANGELOG.md +++ b/packages/core/cairo_alpha/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 3.1.0 (Unreleased) + +- Add ERC1155 supply tracking extension ([#765](https://github.com/OpenZeppelin/contracts-wizard/pull/765)) + +- **Breaking changes**: + - Use OpenZeppelin Contracts for Cairo v4.0.0-alpha.0. + ## 3.0.0 (2026-01-10) - Add support for `with_components` macro. ([#703](https://github.com/OpenZeppelin/contracts-wizard/pull/703)) diff --git a/packages/core/cairo_alpha/ava.config.js b/packages/core/cairo_alpha/ava.config.js index cbe7726dd..c32c250be 100644 --- a/packages/core/cairo_alpha/ava.config.js +++ b/packages/core/cairo_alpha/ava.config.js @@ -1,6 +1,7 @@ module.exports = { extensions: ['ts'], require: ['ts-node/register'], + files: ['src/**/*.test.ts'], watchmode: { ignoreChanges: ['contracts', 'artifacts', 'cache'], }, diff --git a/packages/core/cairo_alpha/package.json b/packages/core/cairo_alpha/package.json index edbc6d1a9..f81af8306 100644 --- a/packages/core/cairo_alpha/package.json +++ b/packages/core/cairo_alpha/package.json @@ -1,7 +1,7 @@ { "name": "@openzeppelin/wizard-cairo-alpha", "private": true, - "version": "3.0.0", + "version": "4.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", diff --git a/packages/core/cairo_alpha/src/erc1155.ts b/packages/core/cairo_alpha/src/erc1155.ts index 7e05a6a0e..dd6696a04 100644 --- a/packages/core/cairo_alpha/src/erc1155.ts +++ b/packages/core/cairo_alpha/src/erc1155.ts @@ -23,6 +23,7 @@ export const defaults: Required = { burnable: false, pausable: false, mintable: false, + supply: false, updatableUri: true, royaltyInfo: royaltyInfoDefaults, access: commonDefaults.access, @@ -41,6 +42,7 @@ export interface ERC1155Options extends CommonContractOptions { burnable?: boolean; pausable?: boolean; mintable?: boolean; + supply?: boolean; updatableUri?: boolean; royaltyInfo?: RoyaltyInfoOptions; } @@ -52,6 +54,7 @@ function withDefaults(opts: ERC1155Options): Required { burnable: opts.burnable ?? defaults.burnable, pausable: opts.pausable ?? defaults.pausable, mintable: opts.mintable ?? defaults.mintable, + supply: opts.supply ?? defaults.supply, updatableUri: opts.updatableUri ?? defaults.updatableUri, royaltyInfo: opts.royaltyInfo ?? defaults.royaltyInfo, }; @@ -86,6 +89,10 @@ export function buildERC1155(opts: ERC1155Options): Contract { addMintable(c, allOpts.access); } + if (allOpts.supply) { + addSupply(c); + } + if (allOpts.updatableUri) { addSetBaseUri(c, allOpts.access); } @@ -101,7 +108,7 @@ export function buildERC1155(opts: ERC1155Options): Contract { } function addHooks(c: ContractBuilder, allOpts: Required) { - const usesCustomHooks = allOpts.pausable; + const usesCustomHooks = allOpts.pausable || allOpts.supply; if (usesCustomHooks) { const hooksTrait = { name: 'ERC1155HooksImpl', @@ -112,20 +119,43 @@ function addHooks(c: ContractBuilder, allOpts: Required) { c.addImplementedTrait(hooksTrait); c.addUseClause('starknet', 'ContractAddress'); - c.addFunction(hooksTrait, { - name: 'before_update', - args: [ - { - name: 'ref self', - type: `ERC1155Component::ComponentState`, - }, - { name: 'from', type: 'ContractAddress' }, - { name: 'to', type: 'ContractAddress' }, - { name: 'token_ids', type: 'Span' }, - { name: 'values', type: 'Span' }, - ], - code: ['let contract_state = self.get_contract()', 'contract_state.pausable.assert_not_paused()'], - }); + if (allOpts.pausable) { + c.addFunction(hooksTrait, { + name: 'before_update', + args: [ + { + name: 'ref self', + type: `ERC1155Component::ComponentState`, + }, + { name: 'from', type: 'ContractAddress' }, + { name: 'to', type: 'ContractAddress' }, + { name: 'token_ids', type: 'Span' }, + { name: 'values', type: 'Span' }, + ], + code: ['let contract_state = self.get_contract()', 'contract_state.pausable.assert_not_paused()'], + }); + } + + if (allOpts.supply) { + const afterUpdateFn = c.addFunction(hooksTrait, { + name: 'after_update', + args: [ + { + name: 'ref self', + type: `ERC1155Component::ComponentState`, + }, + { name: 'from', type: 'ContractAddress' }, + { name: 'to', type: 'ContractAddress' }, + { name: 'token_ids', type: 'Span' }, + { name: 'values', type: 'Span' }, + ], + code: [], + }); + afterUpdateFn.code.push( + 'let mut contract_state = self.get_contract_mut();', + 'contract_state.erc1155_supply.after_update(from, to, token_ids, values);', + ); + } } else { c.addUseClause('openzeppelin_token::erc1155', 'ERC1155HooksEmptyImpl'); } @@ -153,6 +183,10 @@ function addBurnable(c: ContractBuilder) { c.addFunction(externalTrait, functions.batchBurn); } +function addSupply(c: ContractBuilder) { + c.addComponent(components.ERC1155SupplyComponent, [], true); +} + function addMintable(c: ContractBuilder, access: Access) { c.addUseClause('starknet', 'ContractAddress'); requireAccessControl(c, externalTrait, functions.mint, access, 'MINTER', 'minter'); @@ -188,6 +222,29 @@ const components = defineComponents({ }, ], }, + ERC1155SupplyComponent: { + path: 'openzeppelin_token::erc1155::extensions', + substorage: { + name: 'erc1155_supply', + type: 'ERC1155SupplyComponent::Storage', + }, + event: { + name: 'ERC1155SupplyEvent', + type: 'ERC1155SupplyComponent::Event', + }, + impls: [ + { + name: 'ERC1155SupplyImpl', + embed: true, + value: 'ERC1155SupplyComponent::ERC1155SupplyImpl', + }, + { + name: 'ERC1155SupplyInternalImpl', + embed: false, + value: 'ERC1155SupplyComponent::InternalImpl', + }, + ], + }, }); const functions = defineFunctions({ diff --git a/packages/core/cairo_alpha/src/generate/erc1155.ts b/packages/core/cairo_alpha/src/generate/erc1155.ts index 27ce7c45c..ca875f3b7 100644 --- a/packages/core/cairo_alpha/src/generate/erc1155.ts +++ b/packages/core/cairo_alpha/src/generate/erc1155.ts @@ -24,6 +24,7 @@ function prepareBlueprint(opts: GeneratorOptions) { burnable: booleans, pausable: booleans, mintable: booleans, + supply: booleans, updatableUri: booleans, upgradeable: upgradeableOptions, royaltyInfo: resolveRoyaltyOptionsSubset(opts.royaltyInfo), diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/account/account.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_off/account/account.test.ts.md index 79af2b3f6..3547be0ec 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_off/account/account.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_off/account/account.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -86,7 +86,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -142,7 +142,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -219,7 +219,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -275,7 +275,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -346,7 +346,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -396,7 +396,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -477,7 +477,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -550,7 +550,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -623,7 +623,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -698,7 +698,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -773,7 +773,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -850,7 +850,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -927,7 +927,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -1005,7 +1005,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -1062,7 +1062,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -1140,7 +1140,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -1197,7 +1197,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -1269,7 +1269,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -1320,7 +1320,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -1402,7 +1402,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -1476,7 +1476,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -1550,7 +1550,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -1626,7 +1626,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -1702,7 +1702,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ @@ -1780,7 +1780,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ mod MyAccount {␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/account/account.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_off/account/account.test.ts.snap index 490f47924..5357d5fe0 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_off/account/account.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_off/account/account.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/contract/contract.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_off/contract/contract.test.ts.md index a3ff43432..849f51a65 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_off/contract/contract.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_off/contract/contract.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod Foo {␊ @@ -23,7 +23,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod Foo {␊ @@ -42,7 +42,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod Foo {␊ @@ -61,7 +61,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod Foo {␊ @@ -85,7 +85,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod Foo {␊ @@ -109,7 +109,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod Foo {␊ @@ -149,7 +149,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod Foo {␊ @@ -190,7 +190,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod Foo {␊ @@ -232,7 +232,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ // Security contact: security@example.com␊ #[starknet::contract]␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/contract/contract.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_off/contract/contract.test.ts.snap index 9a7ce327a..223c6fd47 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_off/contract/contract.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_off/contract/contract.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/custom/custom.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_off/custom/custom.test.ts.md index 476107de1..0a1afb35e 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_off/custom/custom.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_off/custom/custom.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyContract {␊ @@ -23,7 +23,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyContract {␊ @@ -84,7 +84,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyContract {␊ @@ -170,7 +170,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyContract {␊ @@ -231,7 +231,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyContract {␊ @@ -245,7 +245,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyContract {␊ @@ -306,7 +306,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -383,7 +383,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -464,7 +464,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -547,7 +547,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyContract {␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/custom/custom.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_off/custom/custom.test.ts.snap index 694c69caa..097a7736f 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_off/custom/custom.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_off/custom/custom.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/erc1155/erc1155.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_off/erc1155/erc1155.test.ts.md index d4d6c5f89..043d48c9e 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_off/erc1155/erc1155.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_off/erc1155/erc1155.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -81,7 +81,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -173,7 +173,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -282,7 +282,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -359,7 +359,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -484,7 +484,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -610,7 +610,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -737,7 +737,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ @@ -884,7 +884,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ @@ -1037,7 +1037,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ @@ -1192,7 +1192,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -1284,7 +1284,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -1396,7 +1396,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -1524,7 +1524,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -1660,7 +1660,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -1774,7 +1774,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -1904,7 +1904,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -2040,7 +2040,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -2178,7 +2178,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ @@ -2391,7 +2391,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ @@ -2627,7 +2627,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ @@ -2846,7 +2846,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ @@ -3067,7 +3067,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ @@ -3309,7 +3309,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/erc1155/erc1155.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_off/erc1155/erc1155.test.ts.snap index 10afcfec5..9ed26a648 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_off/erc1155/erc1155.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_off/erc1155/erc1155.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/erc20/erc20.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_off/erc20/erc20.test.ts.md index 4be7205c7..e80ea6bfb 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_off/erc20/erc20.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_off/erc20/erc20.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -51,7 +51,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -124,7 +124,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -206,7 +206,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -314,7 +314,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -441,7 +441,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -572,7 +572,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -705,7 +705,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -818,7 +818,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -893,7 +893,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -966,7 +966,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -1041,7 +1041,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -1124,7 +1124,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -1226,7 +1226,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -1332,7 +1332,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -1440,7 +1440,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -1556,7 +1556,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -1672,7 +1672,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -1758,7 +1758,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -1902,7 +1902,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -2066,7 +2066,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ @@ -2252,7 +2252,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ @@ -2442,7 +2442,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/erc20/erc20.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_off/erc20/erc20.test.ts.snap index 166e2d5ab..73930cf7b 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_off/erc20/erc20.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_off/erc20/erc20.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/erc721/erc721.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_off/erc721/erc721.test.ts.md index 13f785235..737c28900 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_off/erc721/erc721.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_off/erc721/erc721.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -55,7 +55,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -132,7 +132,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -209,7 +209,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -296,7 +296,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -410,7 +410,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -512,7 +512,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -611,7 +611,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -736,7 +736,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -855,7 +855,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -980,7 +980,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -1107,7 +1107,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -1184,7 +1184,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -1281,7 +1281,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -1391,7 +1391,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -1507,7 +1507,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -1625,7 +1625,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -1724,7 +1724,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -1836,7 +1836,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -1954,7 +1954,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -2074,7 +2074,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -2261,7 +2261,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -2384,7 +2384,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -2507,7 +2507,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ @@ -2600,7 +2600,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyToken {␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/erc721/erc721.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_off/erc721/erc721.test.ts.snap index a8c095d5f..873f062cc 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_off/erc721/erc721.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_off/erc721/erc721.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/governor/governor.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_off/governor/governor.test.ts.md index 8e5c9f874..9a6039ef3 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_off/governor/governor.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_off/governor/governor.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyGovernor {␊ @@ -153,7 +153,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyGovernor {␊ @@ -273,7 +273,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyGovernor {␊ @@ -417,7 +417,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyGovernor {␊ @@ -561,7 +561,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod CustomGovernor {␊ @@ -705,7 +705,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyGovernor {␊ @@ -849,7 +849,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyGovernor {␊ @@ -1002,7 +1002,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyGovernor {␊ @@ -1146,7 +1146,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyGovernor {␊ @@ -1290,7 +1290,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyGovernor {␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/governor/governor.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_off/governor/governor.test.ts.snap index 49a459631..0baa09b40 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_off/governor/governor.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_off/governor/governor.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/multisig/multisig.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_off/multisig/multisig.test.ts.md index 65a60782f..93dd29356 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_off/multisig/multisig.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_off/multisig/multisig.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod CustomMultisig {␊ @@ -72,7 +72,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyMultisig {␊ @@ -135,7 +135,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod CustomMultisig {␊ @@ -198,7 +198,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyMultisig {␊ @@ -261,7 +261,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyMultisig {␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/multisig/multisig.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_off/multisig/multisig.test.ts.snap index cc27d67b4..318d2463f 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_off/multisig/multisig.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_off/multisig/multisig.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/vesting/vesting.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_off/vesting/vesting.test.ts.md index 4f42257a7..2b4685daa 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_off/vesting/vesting.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_off/vesting/vesting.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod CustomVesting {␊ @@ -64,7 +64,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyVesting {␊ @@ -119,7 +119,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyVesting {␊ @@ -174,7 +174,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyVesting {␊ @@ -229,7 +229,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyVesting {␊ @@ -299,7 +299,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyVesting {␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_off/vesting/vesting.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_off/vesting/vesting.test.ts.snap index 31d413de1..422bf2d3a 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_off/vesting/vesting.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_off/vesting/vesting.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/account/account.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_on/account/account.test.ts.md index fe744c224..3a7773c41 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_on/account/account.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_on/account/account.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(Account, SRC5, SRC9, Upgradeable)]␊ @@ -51,7 +51,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(Account, SRC5, SRC9)]␊ @@ -78,7 +78,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(Account, SRC5, SRC9, Upgradeable)]␊ @@ -120,7 +120,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(Account, SRC5, SRC9)]␊ @@ -147,7 +147,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(Account, SRC5, Upgradeable)]␊ @@ -190,7 +190,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(Account, SRC5)]␊ @@ -218,7 +218,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(Account, SRC5, SRC9, Upgradeable)]␊ @@ -264,7 +264,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(Account, SRC5, Upgradeable)]␊ @@ -309,7 +309,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(Account, SRC5, Upgradeable)]␊ @@ -354,7 +354,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(Account, SRC5, Upgradeable)]␊ @@ -401,7 +401,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(Account, SRC5, Upgradeable)]␊ @@ -448,7 +448,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(Account, SRC5, Upgradeable)]␊ @@ -497,7 +497,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(Account, SRC5, Upgradeable)]␊ @@ -546,7 +546,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(EthAccount, SRC5, SRC9, Upgradeable)]␊ @@ -589,7 +589,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(EthAccount, SRC5, SRC9)]␊ @@ -618,7 +618,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(EthAccount, SRC5, SRC9, Upgradeable)]␊ @@ -661,7 +661,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(EthAccount, SRC5, SRC9)]␊ @@ -690,7 +690,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(EthAccount, SRC5, Upgradeable)]␊ @@ -734,7 +734,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(EthAccount, SRC5)]␊ @@ -764,7 +764,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(EthAccount, SRC5, SRC9, Upgradeable)]␊ @@ -811,7 +811,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(EthAccount, SRC5, Upgradeable)]␊ @@ -857,7 +857,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(EthAccount, SRC5, Upgradeable)]␊ @@ -903,7 +903,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(EthAccount, SRC5, Upgradeable)]␊ @@ -951,7 +951,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(EthAccount, SRC5, Upgradeable)]␊ @@ -999,7 +999,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(EthAccount, SRC5, Upgradeable)]␊ @@ -1049,7 +1049,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract(account)]␊ #[with_components(EthAccount, SRC5, Upgradeable)]␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/account/account.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_on/account/account.test.ts.snap index a03abcf2e..1fd3f0f21 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_on/account/account.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_on/account/account.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/custom/custom.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_on/custom/custom.test.ts.md index dd8ebb9b5..a9c25457f 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_on/custom/custom.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_on/custom/custom.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyContract {␊ @@ -23,7 +23,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Upgradeable, Ownable)]␊ @@ -62,7 +62,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Pausable, Ownable, Upgradeable)]␊ @@ -119,7 +119,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Upgradeable, Ownable)]␊ @@ -158,7 +158,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ mod MyContract {␊ @@ -172,7 +172,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Ownable, Upgradeable)]␊ @@ -211,7 +211,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -261,7 +261,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -312,7 +312,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -367,7 +367,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Pausable, Ownable)]␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/custom/custom.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_on/custom/custom.test.ts.snap index 835ed5d4e..831cb56c1 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_on/custom/custom.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_on/custom/custom.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/erc1155/erc1155.test.ts b/packages/core/cairo_alpha/src/tests/with_components_on/erc1155/erc1155.test.ts index 2b0f7f44b..1686d6e43 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_on/erc1155/erc1155.test.ts +++ b/packages/core/cairo_alpha/src/tests/with_components_on/erc1155/erc1155.test.ts @@ -69,6 +69,10 @@ testERC1155('mintable', { mintable: true, }); +testERC1155('supply tracking', { + supply: true, +}); + testERC1155('mintable + roles', { mintable: true, access: AccessControl.Roles(), diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/erc1155/erc1155.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_on/erc1155/erc1155.test.ts.md index 2df161dda..6bb0c865c 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_on/erc1155/erc1155.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_on/erc1155/erc1155.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC1155, SRC5, Ownable)]␊ @@ -54,7 +54,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC1155, SRC5, Ownable, Upgradeable)]␊ @@ -112,7 +112,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -188,7 +188,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC1155, SRC5, Upgradeable, Ownable)]␊ @@ -231,7 +231,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC1155, SRC5, Ownable, Upgradeable)]␊ @@ -322,7 +322,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC1155, SRC5, Pausable, Ownable, Upgradeable)]␊ @@ -406,7 +406,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC1155, SRC5, Ownable, Upgradeable)]␊ @@ -494,12 +494,85 @@ Generated by [AVA](https://avajs.dev). }␊ ` +## supply tracking + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ + ␊ + #[starknet::contract]␊ + #[with_components(ERC1155, SRC5, ERC1155Supply, Ownable, Upgradeable)]␊ + mod MyToken {␊ + use openzeppelin_interfaces::upgrades::IUpgradeable;␊ + use starknet::{ClassHash, ContractAddress};␊ + ␊ + // External␊ + #[abi(embed_v0)]␊ + impl ERC1155MixinImpl = ERC1155Component::ERC1155MixinImpl;␊ + #[abi(embed_v0)]␊ + impl ERC1155SupplyImpl = ERC1155SupplyComponent::ERC1155SupplyImpl;␊ + #[abi(embed_v0)]␊ + impl OwnableMixinImpl = OwnableComponent::OwnableMixinImpl;␊ + ␊ + #[storage]␊ + struct Storage {}␊ + ␊ + #[constructor]␊ + fn constructor(ref self: ContractState, owner: ContractAddress) {␊ + self.erc1155.initializer("https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/");␊ + self.erc1155_supply.initializer();␊ + self.ownable.initializer(owner);␊ + }␊ + ␊ + impl ERC1155HooksImpl of ERC1155Component::ERC1155HooksTrait {␊ + fn after_update(␊ + ref self: ERC1155Component::ComponentState,␊ + from: ContractAddress,␊ + to: ContractAddress,␊ + token_ids: Span,␊ + values: Span,␊ + ) {␊ + let mut contract_state = self.get_contract_mut();␊ + contract_state.erc1155_supply.after_update(from, to, token_ids, values);␊ + }␊ + }␊ + ␊ + #[generate_trait]␊ + #[abi(per_item)]␊ + impl ExternalImpl of ExternalTrait {␊ + #[external(v0)]␊ + fn set_base_uri(ref self: ContractState, base_uri: ByteArray) {␊ + self.ownable.assert_only_owner();␊ + self.erc1155._set_base_uri(base_uri);␊ + }␊ + ␊ + #[external(v0)]␊ + fn setBaseUri(ref self: ContractState, baseUri: ByteArray) {␊ + self.set_base_uri(baseUri);␊ + }␊ + }␊ + ␊ + //␊ + // Upgradeable␊ + //␊ + ␊ + #[abi(embed_v0)]␊ + impl UpgradeableImpl of IUpgradeable {␊ + fn upgrade(ref self: ContractState, new_class_hash: ClassHash) {␊ + self.ownable.assert_only_owner();␊ + self.upgradeable.upgrade(new_class_hash);␊ + }␊ + }␊ + }␊ + ` + ## mintable + roles > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ @@ -613,7 +686,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ @@ -730,7 +803,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ @@ -851,7 +924,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC1155, SRC5, Ownable, Upgradeable)]␊ @@ -909,7 +982,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC1155, SRC5, Ownable, Upgradeable, ERC2981)]␊ @@ -979,7 +1052,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -1066,7 +1139,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -1160,7 +1233,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC1155, SRC5, Ownable, Upgradeable, ERC2981)]␊ @@ -1233,7 +1306,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -1323,7 +1396,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -1416,7 +1489,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const URI_SETTER_ROLE: felt252 = selector!("URI_SETTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -1513,7 +1586,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ @@ -1684,7 +1757,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ @@ -1871,7 +1944,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ @@ -2045,7 +2118,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ @@ -2223,7 +2296,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ @@ -2413,7 +2486,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/erc1155/erc1155.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_on/erc1155/erc1155.test.ts.snap index fafde327f..02df82e66 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_on/erc1155/erc1155.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_on/erc1155/erc1155.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/erc20/erc20.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_on/erc20/erc20.test.ts.md index e28d6b754..259dbf10e 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_on/erc20/erc20.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_on/erc20/erc20.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC20)]␊ @@ -35,7 +35,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC20, Upgradeable, Ownable)]␊ @@ -78,7 +78,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC20, Upgradeable, Ownable)]␊ @@ -130,7 +130,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC20, Pausable, Ownable, Upgradeable)]␊ @@ -203,7 +203,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -290,7 +290,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -378,7 +378,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -470,7 +470,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC20, Pausable, Ownable, Upgradeable)]␊ @@ -548,7 +548,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC20, Upgradeable, Ownable)]␊ @@ -593,7 +593,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC20, Upgradeable, Ownable)]␊ @@ -636,7 +636,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC20, Upgradeable, Ownable)]␊ @@ -683,7 +683,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC20, Ownable, Upgradeable)]␊ @@ -736,7 +736,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -803,7 +803,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -871,7 +871,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -943,7 +943,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC20, Nonces, Votes, Upgradeable, Ownable)]␊ @@ -1018,7 +1018,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC20, Nonces, Votes, Upgradeable, Ownable)]␊ @@ -1093,7 +1093,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC20, Nonces, Votes)]␊ @@ -1152,7 +1152,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC20, Pausable, Ownable, Nonces, Votes)]␊ @@ -1255,7 +1255,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC20, Pausable, Ownable, Nonces, Votes, Upgradeable)]␊ @@ -1371,7 +1371,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ @@ -1504,7 +1504,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ @@ -1638,7 +1638,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const PAUSER_ROLE: felt252 = selector!("PAUSER_ROLE");␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/erc20/erc20.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_on/erc20/erc20.test.ts.snap index fb3cf4157..1653c5161 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_on/erc20/erc20.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_on/erc20/erc20.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/erc721/erc721.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_on/erc721/erc721.test.ts.md index c5c530e8b..e4175a6a8 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_on/erc721/erc721.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_on/erc721/erc721.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC721, SRC5)]␊ @@ -35,7 +35,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC721, SRC5, Upgradeable, Ownable)]␊ @@ -78,7 +78,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC721, SRC5, Upgradeable, Ownable)]␊ @@ -121,7 +121,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC721, SRC5, Upgradeable, Ownable)]␊ @@ -174,7 +174,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC721, SRC5, Pausable, Ownable, Upgradeable)]␊ @@ -246,7 +246,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC721, SRC5, Ownable, Upgradeable)]␊ @@ -314,7 +314,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC721, SRC5, ERC721Enumerable, Upgradeable, Ownable)]␊ @@ -371,7 +371,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC721, SRC5, Pausable, Ownable, ERC721Enumerable, Upgradeable)]␊ @@ -447,7 +447,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -533,7 +533,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -622,7 +622,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const MINTER_ROLE: felt252 = selector!("MINTER_ROLE");␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ @@ -715,7 +715,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC721, SRC5, Upgradeable, Ownable)]␊ @@ -758,7 +758,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC721, SRC5, Ownable, Upgradeable, ERC2981)]␊ @@ -813,7 +813,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -882,7 +882,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -954,7 +954,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -1030,7 +1030,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC721, SRC5, Ownable, Upgradeable, ERC2981)]␊ @@ -1088,7 +1088,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -1160,7 +1160,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -1235,7 +1235,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ const UPGRADER_ROLE: felt252 = selector!("UPGRADER_ROLE");␊ ␊ @@ -1314,7 +1314,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC721, SRC5, Pausable, Ownable, ERC721Enumerable, ERC2981, Nonces, Votes)]␊ @@ -1438,7 +1438,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC721, SRC5, Upgradeable, Ownable, Nonces, Votes)]␊ @@ -1513,7 +1513,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC721, SRC5, Upgradeable, Ownable, Nonces, Votes)]␊ @@ -1588,7 +1588,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC721, SRC5, Nonces, Votes)]␊ @@ -1647,7 +1647,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(ERC721, SRC5, Pausable, Ownable, ERC721Enumerable, Upgradeable, ERC2981, Nonces, Votes)]␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/erc721/erc721.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_on/erc721/erc721.test.ts.snap index 52534e5cf..24a1c2383 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_on/erc721/erc721.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_on/erc721/erc721.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/governor/governor.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_on/governor/governor.test.ts.md index 674f0e915..e8f7efea4 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_on/governor/governor.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_on/governor/governor.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Governor, SRC5, GovernorCountingSimple, GovernorVotesQuorumFraction, GovernorSettings, GovernorTimelockExecution, Upgradeable)]␊ @@ -94,7 +94,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Governor, SRC5, GovernorCountingSimple, GovernorVotesQuorumFraction, GovernorSettings, GovernorTimelockExecution)]␊ @@ -164,7 +164,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Governor, SRC5, GovernorCountingSimple, GovernorVotesQuorumFraction, GovernorSettings, GovernorTimelockExecution, Upgradeable)]␊ @@ -249,7 +249,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Governor, SRC5, GovernorCountingSimple, GovernorVotesQuorumFraction, GovernorSettings, GovernorTimelockExecution, Upgradeable)]␊ @@ -334,7 +334,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Governor, SRC5, GovernorCountingSimple, GovernorVotesQuorumFraction, GovernorSettings, GovernorTimelockExecution, Upgradeable)]␊ @@ -419,7 +419,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Governor, SRC5, GovernorCountingSimple, GovernorVotesQuorumFraction, GovernorSettings, GovernorTimelockExecution, Upgradeable)]␊ @@ -504,7 +504,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Governor, SRC5, GovernorCountingSimple, GovernorVotes, GovernorSettings, GovernorTimelockExecution, Upgradeable)]␊ @@ -599,7 +599,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Governor, SRC5, GovernorCountingSimple, GovernorVotesQuorumFraction, GovernorSettings, GovernorTimelockExecution, Upgradeable)]␊ @@ -684,7 +684,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Governor, SRC5, GovernorCountingSimple, GovernorVotesQuorumFraction, GovernorSettings, GovernorTimelockExecution, Upgradeable)]␊ @@ -769,7 +769,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Governor, SRC5, GovernorCountingSimple, GovernorVotes, GovernorSettings, GovernorTimelockExecution, Upgradeable)]␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/governor/governor.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_on/governor/governor.test.ts.snap index 0a3ec3bb1..96de01eb1 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_on/governor/governor.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_on/governor/governor.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/multisig/multisig.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_on/multisig/multisig.test.ts.md index c548c4f68..60314e7b0 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_on/multisig/multisig.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_on/multisig/multisig.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Multisig, Upgradeable)]␊ @@ -50,7 +50,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Multisig, Upgradeable)]␊ @@ -91,7 +91,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Multisig, Upgradeable)]␊ @@ -132,7 +132,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Multisig, Upgradeable)]␊ @@ -173,7 +173,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Multisig)]␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/multisig/multisig.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_on/multisig/multisig.test.ts.snap index dc7f6f90f..93a6d6e11 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_on/multisig/multisig.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_on/multisig/multisig.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/vesting/vesting.test.ts.md b/packages/core/cairo_alpha/src/tests/with_components_on/vesting/vesting.test.ts.md index d1fdf0bcb..b87d6b35c 100644 --- a/packages/core/cairo_alpha/src/tests/with_components_on/vesting/vesting.test.ts.md +++ b/packages/core/cairo_alpha/src/tests/with_components_on/vesting/vesting.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Vesting, Ownable)]␊ @@ -43,7 +43,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Vesting, Ownable)]␊ @@ -77,7 +77,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Vesting, Ownable)]␊ @@ -111,7 +111,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Vesting, Ownable)]␊ @@ -145,7 +145,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Vesting, Ownable)]␊ @@ -193,7 +193,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts for Cairo 3.0.0␊ + // Compatible with OpenZeppelin Contracts for Cairo 4.0.0-alpha.0␊ ␊ #[starknet::contract]␊ #[with_components(Vesting, Ownable)]␊ diff --git a/packages/core/cairo_alpha/src/tests/with_components_on/vesting/vesting.test.ts.snap b/packages/core/cairo_alpha/src/tests/with_components_on/vesting/vesting.test.ts.snap index 4006f504e..1a74b7d00 100644 Binary files a/packages/core/cairo_alpha/src/tests/with_components_on/vesting/vesting.test.ts.snap and b/packages/core/cairo_alpha/src/tests/with_components_on/vesting/vesting.test.ts.snap differ diff --git a/packages/core/cairo_alpha/src/utils/version.ts b/packages/core/cairo_alpha/src/utils/version.ts index ada7ac3e0..0909be667 100644 --- a/packages/core/cairo_alpha/src/utils/version.ts +++ b/packages/core/cairo_alpha/src/utils/version.ts @@ -1,19 +1,19 @@ /** * The actual latest version to use in links. */ -export const contractsVersion = '3.0.0'; +export const contractsVersion = '4.0.0-alpha.0'; export const contractsVersionTag = `v${contractsVersion}`; /** * Cairo compiler versions. */ export const edition = '2024_07'; -export const cairoVersion = '2.12.2'; -export const scarbVersion = '2.12.2'; +export const cairoVersion = '2.15.0'; +export const scarbVersion = '2.15.1'; /** * Semantic version string representing of the minimum compatible version of Contracts to display in output. * If this targets a stable version, it should use a range (e.g. ^2.0.0) * If this targets an alpha version, it should be pinned to the exact version (e.g. not using ^) */ -export const compatibleContractsSemver = '3.0.0'; +export const compatibleContractsSemver = '4.0.0-alpha.0'; diff --git a/packages/core/cairo_alpha/test_project/Scarb.toml b/packages/core/cairo_alpha/test_project/Scarb.toml index 6146b2cb8..77904fe27 100644 --- a/packages/core/cairo_alpha/test_project/Scarb.toml +++ b/packages/core/cairo_alpha/test_project/Scarb.toml @@ -2,23 +2,24 @@ name = "test_project" version = "0.1.0" edition = "2024_07" -cairo-version = "2.13.1" -scarb-version = "2.13.1" +cairo-version = "2.15.0" +scarb-version = "2.15.1" [dependencies] -assert_macros = "2.13.1" -starknet = "2.13.1" -openzeppelin_macros = "3.0.0" -openzeppelin_access = "3.0.0" -openzeppelin_account = "3.0.0" -openzeppelin_finance = "3.0.0" -openzeppelin_interfaces = "2.1.0" -openzeppelin_governance = "3.0.0" -openzeppelin_introspection = "3.0.0" -openzeppelin_security = "3.0.0" -openzeppelin_token = "3.0.0" -openzeppelin_upgrades = "3.0.0" -openzeppelin_utils = "2.1.0" +assert_macros = "2.15.1" +starknet = "2.15.0" +# TODO: Update this once OpenZeppelin Contracts for Cairo v4.0.0-alpha.0 is released +openzeppelin_macros = { git = "https://github.com/OpenZeppelin/cairo-contracts.git" } +openzeppelin_access = { git = "https://github.com/OpenZeppelin/cairo-contracts.git" } +openzeppelin_account = { git = "https://github.com/OpenZeppelin/cairo-contracts.git" } +openzeppelin_finance = { git = "https://github.com/OpenZeppelin/cairo-contracts.git" } +openzeppelin_interfaces = { git = "https://github.com/OpenZeppelin/cairo-contracts.git" } +openzeppelin_governance = { git = "https://github.com/OpenZeppelin/cairo-contracts.git" } +openzeppelin_introspection = { git = "https://github.com/OpenZeppelin/cairo-contracts.git" } +openzeppelin_security = { git = "https://github.com/OpenZeppelin/cairo-contracts.git" } +openzeppelin_token = { git = "https://github.com/OpenZeppelin/cairo-contracts.git" } +openzeppelin_upgrades = { git = "https://github.com/OpenZeppelin/cairo-contracts.git" } +openzeppelin_utils = { git = "https://github.com/OpenZeppelin/cairo-contracts.git" } [lib] diff --git a/packages/ui/api/ai-assistant/function-definitions/cairo-alpha.ts b/packages/ui/api/ai-assistant/function-definitions/cairo-alpha.ts index f1884157f..97fb32daa 100644 --- a/packages/ui/api/ai-assistant/function-definitions/cairo-alpha.ts +++ b/packages/ui/api/ai-assistant/function-definitions/cairo-alpha.ts @@ -113,6 +113,10 @@ export const cairoAlphaERC1155AIFunctionDefinition = { type: 'boolean', description: cairoERC1155Descriptions.updatableUri, }, + supply: { + type: 'boolean', + description: cairoERC1155Descriptions.supply, + }, }, required: contractExactRequiredKeys<'cairoAlpha', 'ERC1155'>()(['name', 'baseUri']), additionalProperties: false, diff --git a/packages/ui/src/cairo_alpha/ERC1155Controls.svelte b/packages/ui/src/cairo_alpha/ERC1155Controls.svelte index 8c2d3dbd7..733375e44 100644 --- a/packages/ui/src/cairo_alpha/ERC1155Controls.svelte +++ b/packages/ui/src/cairo_alpha/ERC1155Controls.svelte @@ -56,6 +56,11 @@ Burnable Token holders will be able to destroy their tokens. +