From c998ef09e025d148882482568b7c900dd9345b0c Mon Sep 17 00:00:00 2001 From: Eric Nordelo Date: Thu, 22 Jan 2026 15:12:38 +0100 Subject: [PATCH 1/3] feat: add supply option to ERC1155 --- .changeset/cairo-alpha-erc1155-supply.md | 5 + packages/common/src/ai/descriptions/cairo.ts | 1 + packages/core/cairo_alpha/CHANGELOG.md | 4 + packages/core/cairo_alpha/ava.config.js | 1 + packages/core/cairo_alpha/package.json | 2 +- packages/core/cairo_alpha/src/erc1155.ts | 87 ++++++++++--- .../core/cairo_alpha/src/generate/erc1155.ts | 1 + .../account/account.test.ts.md | 52 ++++---- .../account/account.test.ts.snap | Bin 2050 -> 2056 bytes .../contract/contract.test.ts.md | 18 +-- .../contract/contract.test.ts.snap | Bin 831 -> 839 bytes .../custom/custom.test.ts.md | 20 +-- .../custom/custom.test.ts.snap | Bin 1698 -> 1704 bytes .../erc1155/erc1155.test.ts.md | 48 +++---- .../erc1155/erc1155.test.ts.snap | Bin 4963 -> 4984 bytes .../erc20/erc20.test.ts.md | 46 +++---- .../erc20/erc20.test.ts.snap | Bin 4016 -> 4028 bytes .../erc721/erc721.test.ts.md | 50 ++++---- .../erc721/erc721.test.ts.snap | Bin 4724 -> 4731 bytes .../governor/governor.test.ts.md | 20 +-- .../governor/governor.test.ts.snap | Bin 2345 -> 2359 bytes .../multisig/multisig.test.ts.md | 10 +- .../multisig/multisig.test.ts.snap | Bin 890 -> 898 bytes .../vesting/vesting.test.ts.md | 12 +- .../vesting/vesting.test.ts.snap | Bin 1104 -> 1110 bytes .../account/account.test.ts.md | 52 ++++---- .../account/account.test.ts.snap | Bin 1424 -> 1432 bytes .../custom/custom.test.ts.md | 20 +-- .../custom/custom.test.ts.snap | Bin 1282 -> 1289 bytes .../erc1155/erc1155.test.ts | 4 + .../erc1155/erc1155.test.ts.md | 121 ++++++++++++++---- .../erc1155/erc1155.test.ts.snap | Bin 3799 -> 3924 bytes .../with_components_on/erc20/erc20.test.ts.md | 46 +++---- .../erc20/erc20.test.ts.snap | Bin 2803 -> 2808 bytes .../erc721/erc721.test.ts.md | 50 ++++---- .../erc721/erc721.test.ts.snap | Bin 3356 -> 3366 bytes .../governor/governor.test.ts.md | 20 +-- .../governor/governor.test.ts.snap | Bin 1698 -> 1706 bytes .../multisig/multisig.test.ts.md | 10 +- .../multisig/multisig.test.ts.snap | Bin 701 -> 709 bytes .../vesting/vesting.test.ts.md | 12 +- .../vesting/vesting.test.ts.snap | Bin 911 -> 914 bytes .../core/cairo_alpha/src/utils/version.ts | 8 +- .../core/cairo_alpha/test_project/Scarb.toml | 31 ++--- .../function-definitions/cairo-alpha.ts | 4 + .../ui/src/cairo_alpha/ERC1155Controls.svelte | 5 + 46 files changed, 458 insertions(+), 302 deletions(-) create mode 100644 .changeset/cairo-alpha-erc1155-supply.md 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..09888f5ee 100644 --- a/packages/core/cairo_alpha/CHANGELOG.md +++ b/packages/core/cairo_alpha/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 3.1.0 (Unreleased) + +- Add ERC1155 supply tracking extension ()